const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./docx-preview-CbKtHvXt.js","./package-Bop5TfAT.js","./runtime-core.esm-bundler-DO-WTVbd.js","./package-OvxnQO7z.css","./jszip.min-CoyCHGS6.js"])))=>i.map(i=>d[i]); import{r as e}from"./package-Bop5TfAT.js";import{i as t,n,r,t as i}from"./printLayout-D2pf0W9y.js";var a='(function(){var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(e&&(t=e(e=0)),t),s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),c=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;li[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},u=(n,r,a)=>(a=n==null?{}:e(i(n)),l(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),d=e=>a.call(e,`module.exports`)?e[`module.exports`]:l(t({},`__esModule`,{value:!0}),e),f=u(s(((e,t)=>{\n/*!\n\nJSZip v3.10.1 - A JavaScript class for generating and reading zip files\n\n\n(c) 2009-2016 Stuart Knightley \nDual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.\n\nJSZip uses the library pako released under the MIT license :\nhttps://github.com/nodeca/pako/blob/main/LICENSE\n*/\n(function(n){typeof e==`object`&&t!==void 0?t.exports=n():typeof define==`function`&&define.amd?define([],n):(typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:this).JSZip=n()})(function(){return function e(t,n,r){function i(o,s){if(!n[o]){if(!t[o]){var c=typeof require==`function`&&require;if(!s&&c)return c(o,!0);if(a)return a(o,!0);var l=Error(`Cannot find module \'`+o+`\'`);throw l.code=`MODULE_NOT_FOUND`,l}var u=n[o]={exports:{}};t[o][0].call(u.exports,function(e){var n=t[o][1][e];return i(n||e)},u,u.exports,e,t,n,r)}return n[o].exports}for(var a=typeof require==`function`&&require,o=0;o>2,s=(3&t)<<4|n>>4,c=1>6:64,l=2>4,n=(15&o)<<4|(s=a.indexOf(e.charAt(l++)))>>2,r=(3&s)<<6|(c=a.indexOf(e.charAt(l++))),f[u++]=t,s!==64&&(f[u++]=n),c!==64&&(f[u++]=r);return f}},{"./support":30,"./utils":32}],2:[function(e,t,n){"use strict";var r=e(`./external`),i=e(`./stream/DataWorker`),a=e(`./stream/Crc32Probe`),o=e(`./stream/DataLengthProbe`);function s(e,t,n,r,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=n,this.compression=r,this.compressedContent=i}s.prototype={getContentWorker:function(){var e=new i(r.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o(`data_length`)),t=this;return e.on(`end`,function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw Error(`Bug : uncompressed data size mismatch`)}),e},getCompressedWorker:function(){return new i(r.Promise.resolve(this.compressedContent)).withStreamInfo(`compressedSize`,this.compressedSize).withStreamInfo(`uncompressedSize`,this.uncompressedSize).withStreamInfo(`crc32`,this.crc32).withStreamInfo(`compression`,this.compression)}},s.createWorkerFrom=function(e,t,n){return e.pipe(new a).pipe(new o(`uncompressedSize`)).pipe(t.compressWorker(n)).pipe(new o(`compressedSize`)).withStreamInfo(`compression`,t)},t.exports=s},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,n){"use strict";var r=e(`./stream/GenericWorker`);n.STORE={magic:`\\0\\0`,compressWorker:function(){return new r(`STORE compression`)},uncompressWorker:function(){return new r(`STORE decompression`)}},n.DEFLATE=e(`./flate`)},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,n){"use strict";var r=e(`./utils`),i=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t){return e!==void 0&&e.length?r.getTypeOf(e)===`string`?function(e,t,n,r){var a=i,o=r+n;e^=-1;for(var s=r;s>>8^a[255&(e^t.charCodeAt(s))];return-1^e}(0|t,e,e.length,0):function(e,t,n,r){var a=i,o=r+n;e^=-1;for(var s=r;s>>8^a[255&(e^t[s])];return-1^e}(0|t,e,e.length,0):0}},{"./utils":32}],5:[function(e,t,n){"use strict";n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(e,t,n){"use strict";var r=null;r=typeof Promise<`u`?Promise:e(`lie`),t.exports={Promise:r}},{lie:37}],7:[function(e,t,n){"use strict";var r=typeof Uint8Array<`u`&&typeof Uint16Array<`u`&&typeof Uint32Array<`u`,i=e(`pako`),a=e(`./utils`),o=e(`./stream/GenericWorker`),s=r?`uint8array`:`array`;function c(e,t){o.call(this,`FlateWorker/`+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}n.magic=`\\b\\0`,a.inherits(c,o),c.prototype.processChunk=function(e){this.meta=e.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(s,e.data),!1)},c.prototype.flush=function(){o.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},c.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this._pako=null},c.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},n.compressWorker=function(e){return new c(`Deflate`,e)},n.uncompressWorker=function(){return new c(`Inflate`,{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,n){"use strict";function r(e,t){var n,r=``;for(n=0;n>>=8;return r}function i(e,t,n,i,o,u){var d,f,p=e.file,m=e.compression,h=u!==s.utf8encode,g=a.transformTo(`string`,u(p.name)),_=a.transformTo(`string`,s.utf8encode(p.name)),v=p.comment,y=a.transformTo(`string`,u(v)),b=a.transformTo(`string`,s.utf8encode(v)),x=_.length!==p.name.length,S=b.length!==v.length,C=``,w=``,T=``,E=p.dir,D=p.date,O={crc32:0,compressedSize:0,uncompressedSize:0};t&&!n||(O.crc32=e.crc32,O.compressedSize=e.compressedSize,O.uncompressedSize=e.uncompressedSize);var k=0;t&&(k|=8),h||!x&&!S||(k|=2048);var A=0,j=0;E&&(A|=16),o===`UNIX`?(j=798,A|=function(e,t){var n=e;return e||(n=t?16893:33204),(65535&n)<<16}(p.unixPermissions,E)):(j=20,A|=function(e){return 63&(e||0)}(p.dosPermissions)),d=D.getUTCHours(),d<<=6,d|=D.getUTCMinutes(),d<<=5,d|=D.getUTCSeconds()/2,f=D.getUTCFullYear()-1980,f<<=4,f|=D.getUTCMonth()+1,f<<=5,f|=D.getUTCDate(),x&&(w=r(1,1)+r(c(g),4)+_,C+=`up`+r(w.length,2)+w),S&&(T=r(1,1)+r(c(y),4)+b,C+=`uc`+r(T.length,2)+T);var M=``;return M+=`\n\\0`,M+=r(k,2),M+=m.magic,M+=r(d,2),M+=r(f,2),M+=r(O.crc32,4),M+=r(O.compressedSize,4),M+=r(O.uncompressedSize,4),M+=r(g.length,2),M+=r(C.length,2),{fileRecord:l.LOCAL_FILE_HEADER+M+g+C,dirRecord:l.CENTRAL_FILE_HEADER+r(j,2)+M+r(y.length,2)+`\\0\\0\\0\\0`+r(A,4)+r(i,4)+g+C+y}}var a=e(`../utils`),o=e(`../stream/GenericWorker`),s=e(`../utf8`),c=e(`../crc32`),l=e(`../signature`);function u(e,t,n,r){o.call(this,`ZipFileWorker`),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=r,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(u,o),u.prototype.push=function(e){var t=e.meta.percent||0,n=this.entriesCount,r=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,o.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-r-1))/n:100}}))},u.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=i(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},u.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,n=i(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),t)this.push({data:function(e){return l.DATA_DESCRIPTOR+r(e.crc32,4)+r(e.compressedSize,4)+r(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},u.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return r.transformTo(`string`,this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=i},{"../utils":32}],19:[function(e,t,n){"use strict";var r=e(`./Uint8ArrayReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,n){"use strict";var r=e(`./DataReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],21:[function(e,t,n){"use strict";var r=e(`./ArrayReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.readData=function(e){if(this.checkOffset(e),e===0)return new Uint8Array;var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,n){"use strict";var r=e(`../utils`),i=e(`../support`),a=e(`./ArrayReader`),o=e(`./StringReader`),s=e(`./NodeBufferReader`),c=e(`./Uint8ArrayReader`);t.exports=function(e){var t=r.getTypeOf(e);return r.checkSupport(t),t!==`string`||i.uint8array?t===`nodebuffer`?new s(e):i.uint8array?new c(r.transformTo(`uint8array`,e)):new a(r.transformTo(`array`,e)):new o(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,n){"use strict";n.LOCAL_FILE_HEADER=`PK`,n.CENTRAL_FILE_HEADER=`PK`,n.CENTRAL_DIRECTORY_END=`PK`,n.ZIP64_CENTRAL_DIRECTORY_LOCATOR=`PK\\x07`,n.ZIP64_CENTRAL_DIRECTORY_END=`PK`,n.DATA_DESCRIPTOR=`PK\\x07\\b`},{}],24:[function(e,t,n){"use strict";var r=e(`./GenericWorker`),i=e(`../utils`);function a(e){r.call(this,`ConvertWorker to `+e),this.destType=e}i.inherits(a,r),a.prototype.processChunk=function(e){this.push({data:i.transformTo(this.destType,e.data),meta:e.meta})},t.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,n){"use strict";var r=e(`./GenericWorker`),i=e(`../crc32`);function a(){r.call(this,`Crc32Probe`),this.withStreamInfo(`crc32`,0)}e(`../utils`).inherits(a,r),a.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,n){"use strict";var r=e(`../utils`),i=e(`./GenericWorker`);function a(e){i.call(this,`DataLengthProbe for `+e),this.propName=e,this.withStreamInfo(e,0)}r.inherits(a,i),a.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}i.prototype.processChunk.call(this,e)},t.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,n){"use strict";var r=e(`../utils`),i=e(`./GenericWorker`);function a(e){i.call(this,`DataWorker`);var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type=``,this._tickScheduled=!1,e.then(function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=r.getTypeOf(e),t.isPaused||t._tickAndRepeat()},function(e){t.error(e)})}r.inherits(a,i),a.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,r.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(r.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case`string`:e=this.data.substring(this.index,t);break;case`uint8array`:e=this.data.subarray(this.index,t);break;case`array`:case`nodebuffer`:e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,n){"use strict";function r(e){this.name=e||`default`,this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}r.prototype={push:function(e){this.emit(`data`,e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit(`end`),this.cleanUp(),this.isFinished=!0}catch(e){this.emit(`error`,e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit(`error`,e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var n=0;n `+e:e}},t.exports=r},{}],29:[function(e,t,n){"use strict";var r=e(`../utils`),i=e(`./ConvertWorker`),a=e(`./GenericWorker`),o=e(`../base64`),s=e(`../support`),c=e(`../external`),l=null;if(s.nodestream)try{l=e(`../nodejs/NodejsStreamOutputAdapter`)}catch{}function u(e,t){return new c.Promise(function(n,i){var a=[],s=e._internalType,c=e._outputType,l=e._mimeType;e.on(`data`,function(e,n){a.push(e),t&&t(n)}).on(`error`,function(e){a=[],i(e)}).on(`end`,function(){try{n(function(e,t,n){switch(e){case`blob`:return r.newBlob(r.transformTo(`arraybuffer`,t),n);case`base64`:return o.encode(t);default:return r.transformTo(e,t)}}(c,function(e,t){var n,r=0,i=null,a=0;for(n=0;n`u`)n.blob=!1;else{var r=new ArrayBuffer(0);try{n.blob=new Blob([r],{type:`application/zip`}).size===0}catch{try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(r),n.blob=i.getBlob(`application/zip`).size===0}catch{n.blob=!1}}}try{n.nodestream=!!e(`readable-stream`).Readable}catch{n.nodestream=!1}},{"readable-stream":16}],31:[function(e,t,n){"use strict";for(var r=e(`./utils`),i=e(`./support`),a=e(`./nodejsUtils`),o=e(`./stream/GenericWorker`),s=Array(256),c=0;c<256;c++)s[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;s[254]=s[254]=1;function l(){o.call(this,`utf-8 decode`),this.leftOver=null}function u(){o.call(this,`utf-8 encode`)}n.utf8encode=function(e){return i.nodebuffer?a.newBufferFrom(e,`utf-8`):function(e){var t,n,r,a,o,s=e.length,c=0;for(a=0;a>>6:(n<65536?t[o++]=224|n>>>12:(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63),t[o++]=128|n>>>6&63),t[o++]=128|63&n);return t}(e)},n.utf8decode=function(e){return i.nodebuffer?r.transformTo(`nodebuffer`,e).toString(`utf-8`):function(e){var t,n,i,a,o=e.length,c=Array(2*o);for(t=n=0;t>10&1023,c[n++]=56320|1023&i)}return c.length!==n&&(c.subarray?c=c.subarray(0,n):c.length=n),r.applyFromCharCode(c)}(e=r.transformTo(i.uint8array?`uint8array`:`array`,e))},r.inherits(l,o),l.prototype.processChunk=function(e){var t=r.transformTo(i.uint8array?`uint8array`:`array`,e.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var a=t;(t=new Uint8Array(a.length+this.leftOver.length)).set(this.leftOver,0),t.set(a,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var o=function(e,t){var n;for((t||=e.length)>e.length&&(t=e.length),n=t-1;0<=n&&(192&e[n])==128;)n--;return n<0||n===0?t:n+s[e[n]]>t?n:t}(t),c=t;o!==t.length&&(i.uint8array?(c=t.subarray(0,o),this.leftOver=t.subarray(o,t.length)):(c=t.slice(0,o),this.leftOver=t.slice(o,t.length))),this.push({data:n.utf8decode(c),meta:e.meta})},l.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=l,r.inherits(u,o),u.prototype.processChunk=function(e){this.push({data:n.utf8encode(e.data),meta:e.meta})},n.Utf8EncodeWorker=u},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,n){"use strict";var r=e(`./support`),i=e(`./base64`),a=e(`./nodejsUtils`),o=e(`./external`);function s(e){return e}function c(e,t){for(var n=0;n>8;this.dir=!!(16&this.externalFileAttributes),e==0&&(this.dosPermissions=63&this.externalFileAttributes),e==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!==`/`||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=r(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,n,r,i=e.index+this.extraFieldsLength;for(this.extraFields||={};e.index+4>>6:(n<65536?t[o++]=224|n>>>12:(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63),t[o++]=128|n>>>6&63),t[o++]=128|63&n);return t},n.buf2binstring=function(e){return c(e,e.length)},n.binstring2buf=function(e){for(var t=new r.Buf8(e.length),n=0,i=t.length;n>10&1023,l[r++]=56320|1023&i)}return c(l,r)},n.utf8border=function(e,t){var n;for((t||=e.length)>e.length&&(t=e.length),n=t-1;0<=n&&(192&e[n])==128;)n--;return n<0||n===0?t:n+o[e[n]]>t?n:t}},{"./common":41}],43:[function(e,t,n){"use strict";t.exports=function(e,t,n,r){for(var i=65535&e|0,a=e>>>16&65535|0,o=0;n!==0;){for(n-=o=2e3>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t,n,i){var a=r,o=i+n;e^=-1;for(var s=i;s>>8^a[255&(e^t[s])];return-1^e}},{}],46:[function(e,t,n){"use strict";var r,i=e(`../utils/common`),a=e(`./trees`),o=e(`./adler32`),s=e(`./crc32`),c=e(`./messages`),l=0,u=4,d=0,f=-2,p=-1,m=4,h=2,g=8,_=9,v=286,y=30,b=19,x=2*v+1,S=15,C=3,w=258,T=w+C+1,E=42,D=113,O=1,k=2,A=3,j=4;function M(e,t){return e.msg=c[t],t}function ee(e){return(e<<1)-(4e.avail_out&&(n=e.avail_out),n!==0&&(i.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))}function P(e,t){a._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,N(e.strm)}function F(e,t){e.pending_buf[e.pending++]=t}function I(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function L(e,t){var n,r,i=e.max_chain_length,a=e.strstart,o=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-T?e.strstart-(e.w_size-T):0,l=e.window,u=e.w_mask,d=e.prev,f=e.strstart+w,p=l[a+o-1],m=l[a+o];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do if(l[(n=t)+o]===m&&l[n+o-1]===p&&l[n]===l[a]&&l[++n]===l[a+1]){a+=2,n++;do;while(l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&ac&&--i!=0);return o<=e.lookahead?o:e.lookahead}function R(e){var t,n,r,a,c,l,u,d,f,p,m=e.w_size;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=m+(m-T)){for(i.arraySet(e.window,e.window,m,m,0),e.match_start-=m,e.strstart-=m,e.block_start-=m,t=n=e.hash_size;r=e.head[--t],e.head[t]=m<=r?r-m:0,--n;);for(t=n=m;r=e.prev[--t],e.prev[t]=m<=r?r-m:0,--n;);a+=m}if(e.strm.avail_in===0)break;if(l=e.strm,u=e.window,d=e.strstart+e.lookahead,f=a,p=void 0,p=l.avail_in,f=C)for(c=e.strstart-e.insert,e.ins_h=e.window[c],e.ins_h=(e.ins_h<=C&&(e.ins_h=(e.ins_h<=C)if(r=a._tr_tally(e,e.strstart-e.match_start,e.match_length-C),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=C){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<=C&&(e.ins_h=(e.ins_h<=C&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-C,r=a._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-C),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(e.ins_h=(e.ins_h<e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(R(e),e.lookahead===0&&t===l)return O;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((e.strstart===0||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,P(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-T&&(P(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(P(e,!0),e.strm.avail_out===0?A:j):(e.strstart>e.block_start&&(P(e,!1),e.strm.avail_out),O)}),new B(4,4,8,4,z),new B(4,5,16,8,z),new B(4,6,32,32,z),new B(4,4,16,16,ne),new B(8,16,32,32,ne),new B(8,16,128,128,ne),new B(8,32,128,256,ne),new B(32,128,258,1024,ne),new B(32,258,258,4096,ne)],n.deflateInit=function(e,t){return oe(e,t,g,15,8,0)},n.deflateInit2=oe,n.deflateReset=ae,n.deflateResetKeep=ie,n.deflateSetHeader=function(e,t){return e&&e.state&&e.state.wrap===2?(e.state.gzhead=t,d):f},n.deflate=function(e,t){var n,i,o,c;if(!e||!e.state||5>8&255),F(i,i.gzhead.time>>16&255),F(i,i.gzhead.time>>24&255),F(i,i.level===9?2:2<=i.strategy||i.level<2?4:0),F(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(F(i,255&i.gzhead.extra.length),F(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=s(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(F(i,0),F(i,0),F(i,0),F(i,0),F(i,0),F(i,i.level===9?2:2<=i.strategy||i.level<2?4:0),F(i,3),i.status=D);else{var p=g+(i.w_bits-8<<4)<<8;p|=(2<=i.strategy||i.level<2?0:i.level<6?1:i.level===6?2:3)<<6,i.strstart!==0&&(p|=32),p+=31-p%31,i.status=D,I(i,p),i.strstart!==0&&(I(i,e.adler>>>16),I(i,65535&e.adler)),e.adler=1}if(i.status===69)if(i.gzhead.extra){for(o=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),N(e),o=i.pending,i.pending!==i.pending_buf_size));)F(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(i.status===73)if(i.gzhead.name){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),N(e),o=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindexo&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),c===0&&(i.gzindex=0,i.status=91)}else i.status=91;if(i.status===91)if(i.gzhead.comment){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),N(e),o=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindexo&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),c===0&&(i.status=103)}else i.status=103;if(i.status===103&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&N(e),i.pending+2<=i.pending_buf_size&&(F(i,255&e.adler),F(i,e.adler>>8&255),e.adler=0,i.status=D)):i.status=D),i.pending!==0){if(N(e),e.avail_out===0)return i.last_flush=-1,d}else if(e.avail_in===0&&ee(t)<=ee(n)&&t!==u)return M(e,-5);if(i.status===666&&e.avail_in!==0)return M(e,-5);if(e.avail_in!==0||i.lookahead!==0||t!==l&&i.status!==666){var m=i.strategy===2?function(e,t){for(var n;;){if(e.lookahead===0&&(R(e),e.lookahead===0)){if(t===l)return O;break}if(e.match_length=0,n=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(P(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(P(e,!0),e.strm.avail_out===0?A:j):e.last_lit&&(P(e,!1),e.strm.avail_out===0)?O:k}(i,t):i.strategy===3?function(e,t){for(var n,r,i,o,s=e.window;;){if(e.lookahead<=w){if(R(e),e.lookahead<=w&&t===l)return O;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=C&&0e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=C?(n=a._tr_tally(e,1,e.match_length-C),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(P(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(P(e,!0),e.strm.avail_out===0?A:j):e.last_lit&&(P(e,!1),e.strm.avail_out===0)?O:k}(i,t):r[i.level].func(i,t);if(m!==A&&m!==j||(i.status=666),m===O||m===A)return e.avail_out===0&&(i.last_flush=-1),d;if(m===k&&(t===1?a._tr_align(i):t!==5&&(a._tr_stored_block(i,0,0,!1),t===3&&(te(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),N(e),e.avail_out===0))return i.last_flush=-1,d}return t===u?i.wrap<=0?1:(i.wrap===2?(F(i,255&e.adler),F(i,e.adler>>8&255),F(i,e.adler>>16&255),F(i,e.adler>>24&255),F(i,255&e.total_in),F(i,e.total_in>>8&255),F(i,e.total_in>>16&255),F(i,e.total_in>>24&255)):(I(i,e.adler>>>16),I(i,65535&e.adler)),N(e),0=n.w_size&&(s===0&&(te(n.head),n.strstart=0,n.block_start=0,n.insert=0),p=new i.Buf8(n.w_size),i.arraySet(p,t,m-n.w_size,n.w_size,0),t=p,m=n.w_size),c=e.avail_in,l=e.next_in,u=e.input,e.avail_in=m,e.next_in=0,e.input=t,R(n);n.lookahead>=C;){for(r=n.strstart,a=n.lookahead-(C-1);n.ins_h=(n.ins_h<>>=b=y>>>24,m-=b,(b=y>>>16&255)==0)E[a++]=65535&y;else{if(!(16&b)){if(!(64&b)){y=h[(65535&y)+(p&(1<>>=b,m-=b),m<15&&(p+=T[r++]<>>=b=y>>>24,m-=b,!(16&(b=y>>>16&255))){if(!(64&b)){y=g[(65535&y)+(p&(1<>>=b,m-=b,(b=a-o)>3,p&=(1<<(m-=x<<3))-1,e.next_in=r,e.next_out=a,e.avail_in=r>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function g(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function _(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg=``,t.wrap&&(e.adler=1&t.wrap),t.mode=f,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new r.Buf32(p),t.distcode=t.distdyn=new r.Buf32(m),t.sane=1,t.back=-1,u):d}function v(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,_(e)):d}function y(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15=o.wsize?(r.arraySet(o.window,t,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(i<(a=o.wsize-o.wnext)&&(a=i),r.arraySet(o.window,t,n-i,a,o.wnext),(i-=a)?(r.arraySet(o.window,t,n-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,n.check=a(n.check,R,2,0),x=b=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&b)<<8)+(b>>8))%31){e.msg=`incorrect header check`,n.mode=30;break}if((15&b)!=8){e.msg=`unknown compression method`,n.mode=30;break}if(x-=4,N=8+(15&(b>>>=4)),n.wbits===0)n.wbits=N;else if(N>n.wbits){e.msg=`invalid window size`,n.mode=30;break}n.dmax=1<>8&1),512&n.flags&&(R[0]=255&b,R[1]=b>>>8&255,n.check=a(n.check,R,2,0)),x=b=0,n.mode=3;case 3:for(;x<32;){if(v===0)break e;v--,b+=p[g++]<>>8&255,R[2]=b>>>16&255,R[3]=b>>>24&255,n.check=a(n.check,R,4,0)),x=b=0,n.mode=4;case 4:for(;x<16;){if(v===0)break e;v--,b+=p[g++]<>8),512&n.flags&&(R[0]=255&b,R[1]=b>>>8&255,n.check=a(n.check,R,2,0)),x=b=0,n.mode=5;case 5:if(1024&n.flags){for(;x<16;){if(v===0)break e;v--,b+=p[g++]<>>8&255,n.check=a(n.check,R,2,0)),x=b=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(v<(E=n.length)&&(E=v),E&&(n.head&&(N=n.head.extra_len-n.length,n.head.extra||(n.head.extra=Array(n.head.extra_len)),r.arraySet(n.head.extra,p,g,E,N)),512&n.flags&&(n.check=a(n.check,p,E,g)),v-=E,g+=E,n.length-=E),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(v===0)break e;for(E=0;N=p[g+ E++],n.head&&N&&n.length<65536&&(n.head.name+=String.fromCharCode(N)),N&&E>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;x<32;){if(v===0)break e;v--,b+=p[g++]<>>=7&x,x-=7&x,n.mode=27;break}for(;x<3;){if(v===0)break e;v--,b+=p[g++]<>>=1)){case 0:n.mode=14;break;case 1:if(w(n),n.mode=20,t!==6)break;b>>>=2,x-=2;break e;case 2:n.mode=17;break;case 3:e.msg=`invalid block type`,n.mode=30}b>>>=2,x-=2;break;case 14:for(b>>>=7&x,x-=7&x;x<32;){if(v===0)break e;v--,b+=p[g++]<>>16^65535)){e.msg=`invalid stored block lengths`,n.mode=30;break}if(n.length=65535&b,x=b=0,n.mode=15,t===6)break e;case 15:n.mode=16;case 16:if(E=n.length){if(v>>=5,x-=5,n.ndist=1+(31&b),b>>>=5,x-=5,n.ncode=4+(15&b),b>>>=4,x-=4,286>>=3,x-=3}for(;n.have<19;)n.lens[z[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,F={bits:n.lenbits},P=s(0,n.lens,0,19,n.lencode,0,n.work,F),n.lenbits=F.bits,P){e.msg=`invalid code lengths set`,n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have>>16&255,j=65535&L,!((k=L>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>>=k,x-=k,n.lens[n.have++]=j;else{if(j===16){for(I=k+2;x>>=k,x-=k,n.have===0){e.msg=`invalid bit length repeat`,n.mode=30;break}N=n.lens[n.have-1],E=3+(3&b),b>>>=2,x-=2}else if(j===17){for(I=k+3;x>>=k)),b>>>=3,x-=3}else{for(I=k+7;x>>=k)),b>>>=7,x-=7}if(n.have+E>n.nlen+n.ndist){e.msg=`invalid bit length repeat`,n.mode=30;break}for(;E--;)n.lens[n.have++]=N}}if(n.mode===30)break;if(n.lens[256]===0){e.msg=`invalid code -- missing end-of-block`,n.mode=30;break}if(n.lenbits=9,F={bits:n.lenbits},P=s(c,n.lens,0,n.nlen,n.lencode,0,n.work,F),n.lenbits=F.bits,P){e.msg=`invalid literal/lengths set`,n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,F={bits:n.distbits},P=s(l,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,F),n.distbits=F.bits,P){e.msg=`invalid distances set`,n.mode=30;break}if(n.mode=20,t===6)break e;case 20:n.mode=21;case 21:if(6<=v&&258<=y){e.next_out=_,e.avail_out=y,e.next_in=g,e.avail_in=v,n.hold=b,n.bits=x,o(e,C),_=e.next_out,m=e.output,y=e.avail_out,g=e.next_in,p=e.input,v=e.avail_in,b=n.hold,x=n.bits,n.mode===12&&(n.back=-1);break}for(n.back=0;A=(L=n.lencode[b&(1<>>16&255,j=65535&L,!((k=L>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>M)])>>>16&255,j=65535&L,!(M+(k=L>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>>=M,x-=M,n.back+=M}if(b>>>=k,x-=k,n.back+=k,n.length=j,A===0){n.mode=26;break}if(32&A){n.back=-1,n.mode=12;break}if(64&A){e.msg=`invalid literal/length code`,n.mode=30;break}n.extra=15&A,n.mode=22;case 22:if(n.extra){for(I=n.extra;x>>=n.extra,x-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;A=(L=n.distcode[b&(1<>>16&255,j=65535&L,!((k=L>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>M)])>>>16&255,j=65535&L,!(M+(k=L>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>>=M,x-=M,n.back+=M}if(b>>>=k,x-=k,n.back+=k,64&A){e.msg=`invalid distance code`,n.mode=30;break}n.offset=j,n.extra=15&A,n.mode=24;case 24:if(n.extra){for(I=n.extra;x>>=n.extra,x-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg=`invalid distance too far back`,n.mode=30;break}n.mode=25;case 25:if(y===0)break e;if(E=C-y,n.offset>E){if((E=n.offset-E)>n.whave&&n.sane){e.msg=`invalid distance too far back`,n.mode=30;break}D=E>n.wnext?(E-=n.wnext,n.wsize-E):n.wnext-E,E>n.length&&(E=n.length),O=n.window}else O=m,D=_-n.offset,E=n.length;for(yv?(b=F[I+d[w]],ee[te+d[w]]):(b=96,0),p=1<>k)+(m-=p)]=y<<24|b<<16|x|0,m!==0;);for(p=1<>=1;if(p===0?M=0:(M&=p-1,M+=p),w++,--N[C]==0){if(C===E)break;C=t[n+d[w]]}if(D>>7)]}function F(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function I(e,t,n){e.bi_valid>h-n?(e.bi_buf|=t<>h-e.bi_valid,e.bi_valid+=n-h):(e.bi_buf|=t<>>=1,n<<=1,0<--t;);return n>>>1}function z(e,t,n){var r,i,a=Array(m+1),o=0;for(r=1;r<=m;r++)a[r]=o=o+n[r-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];s!==0&&(e[2*i]=R(a[s]++,s))}}function ne(e){var t;for(t=0;t>1;1<=n;n--)ie(e,a,n);for(i=c;n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],ie(e,a,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,a[2*i]=a[2*n]+a[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,a[2*n+1]=a[2*r+1]=i,e.heap[1]=i++,ie(e,a,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,i,a,o,s,c=t.dyn_tree,l=t.max_code,u=t.stat_desc.static_tree,d=t.stat_desc.has_stree,f=t.stat_desc.extra_bits,h=t.stat_desc.extra_base,g=t.stat_desc.max_length,_=0;for(a=0;a<=m;a++)e.bl_count[a]=0;for(c[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n>=7;r>>=1)if(1&n&&e.dyn_ltree[2*t]!==0)return i;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return a;for(t=32;t>>3,(s=e.static_len+3+7>>>3)<=o&&(o=s)):o=s=n+5,n+4<=o&&t!==-1?le(e,t,n,r):e.strategy===4||s===o?(I(e,2+ +!!r,3),ae(e,T,E)):(I(e,4+ +!!r,3),function(e,t,n,r){var i;for(I(e,t-257,5),I(e,n-1,5),I(e,r-4,4),i=0;i>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,t===0?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(O[n]+l+1)]++,e.dyn_dtree[2*P(t)]++),e.last_lit===e.lit_bufsize-1},n._tr_align=function(e){I(e,2,3),L(e,_,T),function(e){e.bi_valid===16?(F(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{"../utils/common":41}],53:[function(e,t,n){"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=``,this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t,n){(function(e){(function(e,t){"use strict";if(!e.setImmediate){var n,r,i,a,o=1,s={},c=!1,l=e.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(e);u=u&&u.setTimeout?u:e,n={}.toString.call(e.process)===`[object process]`?function(e){process.nextTick(function(){f(e)})}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage(``,`*`),e.onmessage=n,t}}()?(a=`setImmediate$`+Math.random()+`$`,e.addEventListener?e.addEventListener(`message`,p,!1):e.attachEvent(`onmessage`,p),function(t){e.postMessage(a+t,`*`)}):e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){f(e.data)},function(e){i.port2.postMessage(e)}):l&&`onreadystatechange`in l.createElement(`script`)?(r=l.documentElement,function(e){var t=l.createElement(`script`);t.onreadystatechange=function(){f(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):function(e){setTimeout(f,0,e)},u.setImmediate=function(e){typeof e!=`function`&&(e=Function(``+e));for(var t=Array(arguments.length-1),r=0;r`u`?e===void 0?this:e:self)}).call(this,typeof global<`u`?global:typeof self<`u`?self:typeof window<`u`?window:{})},{}]},{},[10])(10)})}))(),1),p\n/*\n* @license\n* docx-preview \n* Released under Apache License 2.0 \n* Copyright Volodymyr Baydalka\n*/\n;(function(e){e.OfficeDocument=`http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument`,e.FontTable=`http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable`,e.Image=`http://schemas.openxmlformats.org/officeDocument/2006/relationships/image`,e.Numbering=`http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering`,e.Styles=`http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles`,e.StylesWithEffects=`http://schemas.microsoft.com/office/2007/relationships/stylesWithEffects`,e.Theme=`http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme`,e.Settings=`http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings`,e.WebSettings=`http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings`,e.Hyperlink=`http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink`,e.Footnotes=`http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes`,e.Endnotes=`http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes`,e.Footer=`http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer`,e.Header=`http://schemas.openxmlformats.org/officeDocument/2006/relationships/header`,e.ExtendedProperties=`http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties`,e.CoreProperties=`http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties`,e.CustomProperties=`http://schemas.openxmlformats.org/package/2006/relationships/metadata/custom-properties`,e.Comments=`http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments`,e.CommentsExtended=`http://schemas.microsoft.com/office/2011/relationships/commentsExtended`,e.AltChunk=`http://schemas.openxmlformats.org/officeDocument/2006/relationships/aFChunk`})(p||={});function m(e,t){return t.elements(e).map(e=>({id:t.attr(e,`Id`),type:t.attr(e,`Type`),target:t.attr(e,`Target`),targetMode:t.attr(e,`TargetMode`)}))}function h(e){return e?.replace(/[ .]+/g,`-`).replace(/[&]+/g,`and`).toLowerCase()}function g(e){return/^[^"\'].*\\s.*[^"\']$/.test(e)?`\'${e}\'`:e}function _(e){let t=e.lastIndexOf(`/`)+1;return[t==0?``:e.substring(0,t),t==0?e:e.substring(t)]}function v(e,t){try{return new URL(e,`http://docx/`+t).toString().substring(12)}catch{return`${t}${e}`}}function y(e,t){return e.reduce((e,n)=>(e[t(n)]=n,e),{})}function b(e){return new Promise((t,n)=>{let r=new FileReader;r.onloadend=()=>t(r.result),r.onerror=()=>n(),r.readAsDataURL(e)})}function x(e){return e&&typeof e==`object`&&!Array.isArray(e)}function S(e){return typeof e==`string`||e instanceof String}function C(e,...t){if(!t.length)return e;let n=t.shift();if(x(e)&&x(n))for(let t in n)x(n[t])?C(e[t]??(e[t]={}),n[t]):e[t]=n[t];return C(e,...t)}function w(e){return Array.isArray(e)?e:[e]}function T(e,t,n){return t>e?t:n/,``)),e=ee(e);let n=new DOMParser().parseFromString(e,`application/xml`),r=M(n);if(r)throw Error(r);return n}function M(e){return e.getElementsByTagName(`parsererror`)[0]?.textContent}function ee(e){return e.charCodeAt(0)===65279?e.substring(1):e}function te(e){return new XMLSerializer().serializeToString(e)}var N=class{elements(e,t=null){let n=[];for(let r=0,i=e.childNodes.length;rR(e,t))}function R(e,t){let n={name:t.attr(e,`name`),embedFontRefs:[]};for(let r of t.elements(e))switch(r.localName){case`family`:n.family=t.attr(r,`val`);break;case`altName`:n.altName=t.attr(r,`val`);break;case`embedRegular`:case`embedBold`:case`embedItalic`:case`embedBoldItalic`:n.embedFontRefs.push(z(r,t));break}return n}function z(e,t){return{id:t.attr(e,`id`),key:t.attr(e,`fontKey`),type:I[e.localName]}}var ne=class extends F{parseXml(e){this.fonts=L(e,this._package.xmlParser)}},B=class e{constructor(e,t){this._zip=e,this.options=t,this.xmlParser=new N}get(e){let t=re(e);return this._zip.files[t]??this._zip.files[t.replace(/\\//g,`\\\\`)]}update(e,t){this._zip.file(e,t)}static async load(t,n){return new e(await f.default.loadAsync(t),n)}save(e=`blob`){return this._zip.generateAsync({type:e})}load(e,t=`string`){return this.get(e)?.async(t)??Promise.resolve(null)}async loadRelationships(e=null){let t=`_rels/.rels`;if(e!=null){let[n,r]=_(e);t=`${n}_rels/${r}.rels`}let n=await this.load(t);return n?m(this.parseXmlDocument(n).firstElementChild,this.xmlParser):null}parseXmlDocument(e){return j(e,this.options.trimXmlDeclaration)}};function re(e){return e.startsWith(`/`)?e.substr(1):e}var ie=class extends F{constructor(e,t,n){super(e,t),this._documentParser=n}parseXml(e){this.body=this._documentParser.parseDocumentFile(e)}};function ae(e,t){return{type:t.attr(e,`val`),color:t.attr(e,`color`),size:t.lengthAttr(e,`sz`,D.Border),offset:t.lengthAttr(e,`space`,D.Point),frame:t.boolAttr(e,`frame`),shadow:t.boolAttr(e,`shadow`)}}function oe(e,t){var n={};for(let r of t.elements(e))switch(r.localName){case`left`:n.left=ae(r,t);break;case`top`:n.top=ae(r,t);break;case`right`:n.right=ae(r,t);break;case`bottom`:n.bottom=ae(r,t);break}return n}var se;(function(e){e.Continuous=`continuous`,e.NextPage=`nextPage`,e.NextColumn=`nextColumn`,e.EvenPage=`evenPage`,e.OddPage=`oddPage`})(se||={});function V(e,t=P){var n={};for(let r of t.elements(e))switch(r.localName){case`pgSz`:n.pageSize={width:t.lengthAttr(r,`w`),height:t.lengthAttr(r,`h`),orientation:t.attr(r,`orient`)};break;case`type`:n.type=t.attr(r,`val`);break;case`pgMar`:n.pageMargins={left:t.lengthAttr(r,`left`),right:t.lengthAttr(r,`right`),top:t.lengthAttr(r,`top`),bottom:t.lengthAttr(r,`bottom`),header:t.lengthAttr(r,`header`),footer:t.lengthAttr(r,`footer`),gutter:t.lengthAttr(r,`gutter`)};break;case`cols`:n.columns=ce(r,t);break;case`headerReference`:(n.headerRefs??=[]).push(ue(r,t));break;case`footerReference`:(n.footerRefs??=[]).push(ue(r,t));break;case`titlePg`:n.titlePage=t.boolAttr(r,`val`,!0);break;case`pgBorders`:n.pageBorders=oe(r,t);break;case`pgNumType`:n.pageNumber=le(r,t);break}return n}function ce(e,t){return{numberOfColumns:t.intAttr(e,`num`),space:t.lengthAttr(e,`space`),separator:t.boolAttr(e,`sep`),equalWidth:t.boolAttr(e,`equalWidth`,!0),columns:t.elements(e,`col`).map(e=>({width:t.lengthAttr(e,`w`),space:t.lengthAttr(e,`space`)}))}}function le(e,t){return{chapSep:t.attr(e,`chapSep`),chapStyle:t.attr(e,`chapStyle`),format:t.attr(e,`fmt`),start:t.intAttr(e,`start`)}}function ue(e,t){return{id:t.attr(e,`id`),type:t.attr(e,`type`)}}function de(e,t){return{before:t.lengthAttr(e,`before`),after:t.lengthAttr(e,`after`),line:t.intAttr(e,`line`),lineRule:t.attr(e,`lineRule`)}}function fe(e,t){let n={};for(let r of t.elements(e))pe(r,n,t);return n}function pe(e,t,n){return!!A(e,t,n)}function me(e,t){let n={};for(let r of t.elements(e))he(r,n,t);return n}function he(e,t,n){if(e.namespaceURI!=E.wordml)return!1;if(A(e,t,n))return!0;switch(e.localName){case`tabs`:t.tabs=ge(e,n);break;case`sectPr`:t.sectionProps=V(e,n);break;case`numPr`:t.numbering=_e(e,n);break;case`spacing`:return t.lineSpacing=de(e,n),!1;case`textAlignment`:return t.textAlignment=n.attr(e,`val`),!1;case`keepLines`:t.keepLines=n.boolAttr(e,`val`,!0);break;case`keepNext`:t.keepNext=n.boolAttr(e,`val`,!0);break;case`pageBreakBefore`:t.pageBreakBefore=n.boolAttr(e,`val`,!0);break;case`outlineLvl`:t.outlineLevel=n.intAttr(e,`val`);break;case`pStyle`:t.styleName=n.attr(e,`val`);break;case`rPr`:t.runProps=fe(e,n);break;default:return!1}return!0}function ge(e,t){return t.elements(e,`tab`).map(e=>({position:t.lengthAttr(e,`pos`),leader:t.attr(e,`leader`),style:t.attr(e,`val`)}))}function _e(e,t){var n={};for(let r of t.elements(e))switch(r.localName){case`numId`:n.id=t.attr(r,`val`);break;case`ilvl`:n.level=t.intAttr(r,`val`);break}return n}function ve(e,t){let n={numberings:[],abstractNumberings:[],bulletPictures:[]};for(let r of t.elements(e))switch(r.localName){case`num`:n.numberings.push(ye(r,t));break;case`abstractNum`:n.abstractNumberings.push(be(r,t));break;case`numPicBullet`:n.bulletPictures.push(Ce(r,t));break}return n}function ye(e,t){let n={id:t.attr(e,`numId`),overrides:[]};for(let r of t.elements(e))switch(r.localName){case`abstractNumId`:n.abstractId=t.attr(r,`val`);break;case`lvlOverride`:n.overrides.push(Se(r,t));break}return n}function be(e,t){let n={id:t.attr(e,`abstractNumId`),levels:[]};for(let r of t.elements(e))switch(r.localName){case`name`:n.name=t.attr(r,`val`);break;case`multiLevelType`:n.multiLevelType=t.attr(r,`val`);break;case`numStyleLink`:n.numberingStyleLink=t.attr(r,`val`);break;case`styleLink`:n.styleLink=t.attr(r,`val`);break;case`lvl`:n.levels.push(xe(r,t));break}return n}function xe(e,t){let n={level:t.intAttr(e,`ilvl`)};for(let r of t.elements(e))switch(r.localName){case`start`:n.start=t.attr(r,`val`);break;case`lvlRestart`:n.restart=t.intAttr(r,`val`);break;case`numFmt`:n.format=t.attr(r,`val`);break;case`lvlText`:n.text=t.attr(r,`val`);break;case`lvlJc`:n.justification=t.attr(r,`val`);break;case`lvlPicBulletId`:n.bulletPictureId=t.attr(r,`val`);break;case`pStyle`:n.paragraphStyle=t.attr(r,`val`);break;case`pPr`:n.paragraphProps=me(r,t);break;case`rPr`:n.runProps=fe(r,t);break}return n}function Se(e,t){let n={level:t.intAttr(e,`ilvl`)};for(let r of t.elements(e))switch(r.localName){case`startOverride`:n.start=t.intAttr(r,`val`);break;case`lvl`:n.numberingLevel=xe(r,t);break}return n}function Ce(e,t){var n=t.element(e,`pict`),r=n&&t.element(n,`shape`),i=r&&t.element(r,`imagedata`);return i?{id:t.attr(e,`numPicBulletId`),referenceId:t.attr(i,`id`),style:t.attr(r,`style`)}:null}var we=class extends F{constructor(e,t,n){super(e,t),this._documentParser=n}parseXml(e){Object.assign(this,ve(e,this._package.xmlParser)),this.domNumberings=this._documentParser.parseNumberingFile(e)}},Te=class extends F{constructor(e,t,n){super(e,t),this._documentParser=n}parseXml(e){this.styles=this._documentParser.parseStylesFile(e)}},H;(function(e){e.Document=`document`,e.Paragraph=`paragraph`,e.Run=`run`,e.Break=`break`,e.NoBreakHyphen=`noBreakHyphen`,e.Table=`table`,e.Row=`row`,e.Cell=`cell`,e.Hyperlink=`hyperlink`,e.SmartTag=`smartTag`,e.Drawing=`drawing`,e.Image=`image`,e.Text=`text`,e.Tab=`tab`,e.Symbol=`symbol`,e.BookmarkStart=`bookmarkStart`,e.BookmarkEnd=`bookmarkEnd`,e.Footer=`footer`,e.Header=`header`,e.FootnoteReference=`footnoteReference`,e.EndnoteReference=`endnoteReference`,e.Footnote=`footnote`,e.Endnote=`endnote`,e.SimpleField=`simpleField`,e.ComplexField=`complexField`,e.Instruction=`instruction`,e.VmlPicture=`vmlPicture`,e.MmlMath=`mmlMath`,e.MmlMathParagraph=`mmlMathParagraph`,e.MmlFraction=`mmlFraction`,e.MmlFunction=`mmlFunction`,e.MmlFunctionName=`mmlFunctionName`,e.MmlNumerator=`mmlNumerator`,e.MmlDenominator=`mmlDenominator`,e.MmlRadical=`mmlRadical`,e.MmlBase=`mmlBase`,e.MmlDegree=`mmlDegree`,e.MmlSuperscript=`mmlSuperscript`,e.MmlSubscript=`mmlSubscript`,e.MmlPreSubSuper=`mmlPreSubSuper`,e.MmlSubArgument=`mmlSubArgument`,e.MmlSuperArgument=`mmlSuperArgument`,e.MmlNary=`mmlNary`,e.MmlDelimiter=`mmlDelimiter`,e.MmlRun=`mmlRun`,e.MmlEquationArray=`mmlEquationArray`,e.MmlLimit=`mmlLimit`,e.MmlLimitLower=`mmlLimitLower`,e.MmlMatrix=`mmlMatrix`,e.MmlMatrixRow=`mmlMatrixRow`,e.MmlBox=`mmlBox`,e.MmlBar=`mmlBar`,e.MmlGroupChar=`mmlGroupChar`,e.VmlElement=`vmlElement`,e.Inserted=`inserted`,e.Deleted=`deleted`,e.DeletedText=`deletedText`,e.Comment=`comment`,e.CommentReference=`commentReference`,e.CommentRangeStart=`commentRangeStart`,e.CommentRangeEnd=`commentRangeEnd`,e.AltChunk=`altChunk`})(H||={});var Ee=class{constructor(){this.children=[],this.cssStyle={}}},De=class extends Ee{constructor(){super(...arguments),this.type=H.Header}},Oe=class extends Ee{constructor(){super(...arguments),this.type=H.Footer}},ke=class extends F{constructor(e,t,n){super(e,t),this._documentParser=n}parseXml(e){this.rootElement=this.createRootElement(),this.rootElement.children=this._documentParser.parseBodyElements(e)}},Ae=class extends ke{createRootElement(){return new De}},je=class extends ke{createRootElement(){return new Oe}};function Me(e,t){let n={};for(let r of t.elements(e))switch(r.localName){case`Template`:n.template=r.textContent;break;case`Pages`:n.pages=Ne(r.textContent);break;case`Words`:n.words=Ne(r.textContent);break;case`Characters`:n.characters=Ne(r.textContent);break;case`Application`:n.application=r.textContent;break;case`Lines`:n.lines=Ne(r.textContent);break;case`Paragraphs`:n.paragraphs=Ne(r.textContent);break;case`Company`:n.company=r.textContent;break;case`AppVersion`:n.appVersion=r.textContent;break}return n}function Ne(e){if(e!==void 0)return parseInt(e)}var Pe=class extends F{parseXml(e){this.props=Me(e,this._package.xmlParser)}};function Fe(e,t){let n={};for(let r of t.elements(e))switch(r.localName){case`title`:n.title=r.textContent;break;case`description`:n.description=r.textContent;break;case`subject`:n.subject=r.textContent;break;case`creator`:n.creator=r.textContent;break;case`keywords`:n.keywords=r.textContent;break;case`language`:n.language=r.textContent;break;case`lastModifiedBy`:n.lastModifiedBy=r.textContent;break;case`revision`:r.textContent&&(n.revision=parseInt(r.textContent));break}return n}var Ie=class extends F{parseXml(e){this.props=Fe(e,this._package.xmlParser)}},Le=class{};function Re(e,t){var n=new Le,r=t.element(e,`themeElements`);for(let e of t.elements(r))switch(e.localName){case`clrScheme`:n.colorScheme=ze(e,t);break;case`fontScheme`:n.fontScheme=Be(e,t);break}return n}function ze(e,t){var n={name:t.attr(e,`name`),colors:{}};for(let a of t.elements(e)){var r=t.element(a,`srgbClr`),i=t.element(a,`sysClr`);r?n.colors[a.localName]=t.attr(r,`val`):i&&(n.colors[a.localName]=t.attr(i,`lastClr`))}return n}function Be(e,t){var n={name:t.attr(e,`name`)};for(let r of t.elements(e))switch(r.localName){case`majorFont`:n.majorFont=Ve(r,t);break;case`minorFont`:n.minorFont=Ve(r,t);break}return n}function Ve(e,t){return{latinTypeface:t.elementAttr(e,`latin`,`typeface`),eaTypeface:t.elementAttr(e,`ea`,`typeface`),csTypeface:t.elementAttr(e,`cs`,`typeface`)}}var He=class extends F{constructor(e,t){super(e,t)}parseXml(e){this.theme=Re(e,this._package.xmlParser)}},Ue=class{},We=class extends Ue{constructor(){super(...arguments),this.type=H.Footnote}},Ge=class extends Ue{constructor(){super(...arguments),this.type=H.Endnote}},Ke=class extends F{constructor(e,t,n){super(e,t),this._documentParser=n}},qe=class extends Ke{constructor(e,t,n){super(e,t,n)}parseXml(e){this.notes=this._documentParser.parseNotes(e,`footnote`,We)}},Je=class extends Ke{constructor(e,t,n){super(e,t,n)}parseXml(e){this.notes=this._documentParser.parseNotes(e,`endnote`,Ge)}};function Ye(e,t){var n={};for(let r of t.elements(e))switch(r.localName){case`defaultTabStop`:n.defaultTabStop=t.lengthAttr(r,`val`);break;case`footnotePr`:n.footnoteProps=Xe(r,t);break;case`endnotePr`:n.endnoteProps=Xe(r,t);break;case`autoHyphenation`:n.autoHyphenation=t.boolAttr(r,`val`);break}return n}function Xe(e,t){var n={defaultNoteIds:[]};for(let r of t.elements(e))switch(r.localName){case`numFmt`:n.nummeringFormat=t.attr(r,`val`);break;case`footnote`:case`endnote`:n.defaultNoteIds.push(t.attr(r,`id`));break}return n}var Ze=class extends F{constructor(e,t){super(e,t)}parseXml(e){this.settings=Ye(e,this._package.xmlParser)}};function Qe(e,t){return t.elements(e,`property`).map(e=>{let n=e.firstChild;return{formatId:t.attr(e,`fmtid`),name:t.attr(e,`name`),type:n.nodeName,value:n.textContent}})}var $e=class extends F{parseXml(e){this.props=Qe(e,this._package.xmlParser)}},et=class extends F{constructor(e,t,n){super(e,t),this._documentParser=n}parseXml(e){this.comments=this._documentParser.parseComments(e),this.commentMap=y(this.comments,e=>e.id)}},tt=class extends F{constructor(e,t){super(e,t),this.comments=[]}parseXml(e){let t=this._package.xmlParser;for(let n of t.elements(e,`commentEx`))this.comments.push({paraId:t.attr(n,`paraId`),paraIdParent:t.attr(n,`paraIdParent`),done:t.boolAttr(n,`done`)});this.commentMap=y(this.comments,e=>e.paraId)}};let nt=[{type:p.OfficeDocument,target:`word/document.xml`},{type:p.ExtendedProperties,target:`docProps/app.xml`},{type:p.CoreProperties,target:`docProps/core.xml`},{type:p.CustomProperties,target:`docProps/custom.xml`}];var rt=class e{constructor(){this.parts=[],this.partsMap={}}static async load(t,n,r){var i=new e;return i._options=r,i._parser=n,i._package=await B.load(t,r),i.rels=await i._package.loadRelationships(),await Promise.all(nt.map(e=>{let t=i.rels.find(t=>t.type===e.type)??e;return i.loadRelationshipPart(t.target,t.type)})),i}save(e=`blob`){return this._package.save(e)}async loadRelationshipPart(e,t){if(this.partsMap[e])return this.partsMap[e];if(!this._package.get(e))return null;let n=null;switch(t){case p.OfficeDocument:this.documentPart=n=new ie(this._package,e,this._parser);break;case p.FontTable:this.fontTablePart=n=new ne(this._package,e);break;case p.Numbering:this.numberingPart=n=new we(this._package,e,this._parser);break;case p.Styles:this.stylesPart=n=new Te(this._package,e,this._parser);break;case p.Theme:this.themePart=n=new He(this._package,e);break;case p.Footnotes:this.footnotesPart=n=new qe(this._package,e,this._parser);break;case p.Endnotes:this.endnotesPart=n=new Je(this._package,e,this._parser);break;case p.Footer:n=new je(this._package,e,this._parser);break;case p.Header:n=new Ae(this._package,e,this._parser);break;case p.CoreProperties:this.corePropsPart=n=new Ie(this._package,e);break;case p.ExtendedProperties:this.extendedPropsPart=n=new Pe(this._package,e);break;case p.CustomProperties:n=new $e(this._package,e);break;case p.Settings:this.settingsPart=n=new Ze(this._package,e);break;case p.Comments:this.commentsPart=n=new et(this._package,e,this._parser);break;case p.CommentsExtended:this.commentsExtendedPart=n=new tt(this._package,e);break}if(n==null)return Promise.resolve(null);if(this.partsMap[e]=n,this.parts.push(n),await n.load(),n.rels?.length>0){let[e]=_(n.path);await Promise.all(n.rels.map(t=>this.loadRelationshipPart(v(t.target,e),t.type)))}return n}async loadDocumentImage(e,t){let n=await this.loadResource(t??this.documentPart,e,`blob`);return this.blobToURL(n)}async loadNumberingImage(e){let t=await this.loadResource(this.numberingPart,e,`blob`);return this.blobToURL(t)}async loadFont(e,t){let n=await this.loadResource(this.fontTablePart,e,`uint8array`);return n&&this.blobToURL(new Blob([it(n,t)]))}async loadAltChunk(e,t){return await this.loadResource(t??this.documentPart,e,`string`)}blobToURL(e){return e?this._options.useBase64URL?b(e):URL.createObjectURL(e):null}findPartByRelId(e,t=null){var n=(t.rels??this.rels).find(t=>t.id==e);let r=t?_(t.path)[0]:``;return n?this.partsMap[v(n.target,r)]:null}getPathById(e,t){let n=e.rels.find(e=>e.id==t),[r]=_(e.path);return n?v(n.target,r):null}loadResource(e,t,n){let r=this.getPathById(e,t);return r?this._package.load(r,n):Promise.resolve(null)}};function it(e,t){let n=t.replace(/{|}|-/g,``),r=Array(16);for(let e=0;e<16;e++)r[16-e-1]=parseInt(n.substring(e*2,e*2+2),16);for(let t=0;t<32;t++)e[t]=e[t]^r[t%16];return e}function at(e,t){return{type:H.BookmarkStart,id:t.attr(e,`id`),name:t.attr(e,`name`),colFirst:t.intAttr(e,`colFirst`),colLast:t.intAttr(e,`colLast`)}}function ot(e,t){return{type:H.BookmarkEnd,id:t.attr(e,`id`)}}var st=class extends Ee{constructor(){super(...arguments),this.type=H.VmlElement,this.attrs={}}};function ct(e,t){var n=new st;switch(e.localName){case`rect`:n.tagName=`rect`,Object.assign(n.attrs,{width:`100%`,height:`100%`});break;case`oval`:n.tagName=`ellipse`,Object.assign(n.attrs,{cx:`50%`,cy:`50%`,rx:`50%`,ry:`50%`});break;case`line`:n.tagName=`line`;break;case`shape`:n.tagName=`g`;break;case`textbox`:n.tagName=`foreignObject`,Object.assign(n.attrs,{width:`100%`,height:`100%`});break;default:return null}for(let t of P.attrs(e))switch(t.localName){case`style`:n.cssStyleText=t.value;break;case`fillcolor`:n.attrs.fill=t.value;break;case`from`:let[e,r]=dt(t.value);Object.assign(n.attrs,{x1:e,y1:r});break;case`to`:let[i,a]=dt(t.value);Object.assign(n.attrs,{x2:i,y2:a});break}for(let r of P.elements(e))switch(r.localName){case`stroke`:Object.assign(n.attrs,lt(r));break;case`fill`:Object.assign(n.attrs,ut());break;case`imagedata`:n.tagName=`image`,Object.assign(n.attrs,{width:`100%`,height:`100%`}),n.imageHref={id:P.attr(r,`id`),title:P.attr(r,`title`)};break;case`txbxContent`:n.children.push(...t.parseBodyElements(r));break;default:let e=ct(r,t);e&&n.children.push(e);break}return n}function lt(e){return{stroke:P.attr(e,`color`),"stroke-width":P.lengthAttr(e,`weight`,D.Emu)??`1px`}}function ut(e){return{}}function dt(e){return e.split(`,`)}var ft=class extends Ee{constructor(){super(...arguments),this.type=H.Comment}},pt=class extends Ee{constructor(e){super(),this.id=e,this.type=H.CommentReference}},mt=class extends Ee{constructor(e){super(),this.id=e,this.type=H.CommentRangeStart}},ht=class extends Ee{constructor(e){super(),this.id=e,this.type=H.CommentRangeEnd}},gt={shd:`inherit`,color:`black`,borderColor:`black`,highlight:`transparent`};let _t=[],vt={oMath:H.MmlMath,oMathPara:H.MmlMathParagraph,f:H.MmlFraction,func:H.MmlFunction,fName:H.MmlFunctionName,num:H.MmlNumerator,den:H.MmlDenominator,rad:H.MmlRadical,deg:H.MmlDegree,e:H.MmlBase,sSup:H.MmlSuperscript,sSub:H.MmlSubscript,sPre:H.MmlPreSubSuper,sup:H.MmlSuperArgument,sub:H.MmlSubArgument,d:H.MmlDelimiter,nary:H.MmlNary,eqArr:H.MmlEquationArray,lim:H.MmlLimit,limLow:H.MmlLimitLower,m:H.MmlMatrix,mr:H.MmlMatrixRow,box:H.MmlBox,bar:H.MmlBar,groupChr:H.MmlGroupChar};var yt=class{constructor(e){this.options={ignoreWidth:!1,debug:!1,...e}}parseNotes(e,t,n){var r=[];for(let i of P.elements(e,t)){let e=new n;e.id=P.attr(i,`id`),e.noteType=P.attr(i,`type`),e.children=this.parseBodyElements(i),r.push(e)}return r}parseComments(e){var t=[];for(let n of P.elements(e,`comment`)){let e=new ft;e.id=P.attr(n,`id`),e.author=P.attr(n,`author`),e.initials=P.attr(n,`initials`),e.date=P.attr(n,`date`),e.children=this.parseBodyElements(n),t.push(e)}return t}parseDocumentFile(e){var t=P.element(e,`body`),n=P.element(e,`background`),r=P.element(t,`sectPr`);return{type:H.Document,children:this.parseBodyElements(t),props:r?V(r,P):{},cssStyle:n?this.parseBackground(n):{}}}parseBackground(e){var t={},n=xt.colorAttr(e,`color`);return n&&(t[`background-color`]=n),t}parseBodyElements(e){var t=[];for(let n of P.elements(e))switch(n.localName){case`p`:t.push(this.parseParagraph(n));break;case`altChunk`:t.push(this.parseAltChunk(n));break;case`tbl`:t.push(this.parseTable(n));break;case`sdt`:t.push(...this.parseSdt(n,e=>this.parseBodyElements(e)));break}return t}parseStylesFile(e){var t=[];for(let n of P.elements(e))switch(n.localName){case`style`:t.push(this.parseStyle(n));break;case`docDefaults`:t.push(this.parseDefaultStyles(n));break}return t}parseDefaultStyles(e){var t={id:null,name:null,target:null,basedOn:null,styles:[]};for(let i of P.elements(e))switch(i.localName){case`rPrDefault`:var n=P.element(i,`rPr`);n&&t.styles.push({target:`span`,values:this.parseDefaultProperties(n,{})});break;case`pPrDefault`:var r=P.element(i,`pPr`);r&&t.styles.push({target:`p`,values:this.parseDefaultProperties(r,{})});break}return t}parseStyle(e){var t={id:P.attr(e,`styleId`),isDefault:P.boolAttr(e,`default`),name:null,target:null,basedOn:null,styles:[],linked:null};switch(P.attr(e,`type`)){case`paragraph`:t.target=`p`;break;case`table`:t.target=`table`;break;case`character`:t.target=`span`;break}for(let n of P.elements(e))switch(n.localName){case`basedOn`:t.basedOn=P.attr(n,`val`);break;case`name`:t.name=P.attr(n,`val`);break;case`link`:t.linked=P.attr(n,`val`);break;case`next`:t.next=P.attr(n,`val`);break;case`aliases`:t.aliases=P.attr(n,`val`).split(`,`);break;case`pPr`:t.styles.push({target:`p`,values:this.parseDefaultProperties(n,{})}),t.paragraphProps=me(n,P);break;case`rPr`:t.styles.push({target:`span`,values:this.parseDefaultProperties(n,{})}),t.runProps=fe(n,P);break;case`tblPr`:case`tcPr`:t.styles.push({target:`td`,values:this.parseDefaultProperties(n,{})});break;case`tblStylePr`:for(let e of this.parseTableStyle(n))t.styles.push(e);break;case`rsid`:case`qFormat`:case`hidden`:case`semiHidden`:case`unhideWhenUsed`:case`autoRedefine`:case`uiPriority`:break;default:this.options.debug&&console.warn(`DOCX: Unknown style element: ${n.localName}`)}return t}parseTableStyle(e){var t=[],n=P.attr(e,`type`),r=``,i=``;switch(n){case`firstRow`:i=`.first-row`,r=`tr.first-row td`;break;case`lastRow`:i=`.last-row`,r=`tr.last-row td`;break;case`firstCol`:i=`.first-col`,r=`td.first-col`;break;case`lastCol`:i=`.last-col`,r=`td.last-col`;break;case`band1Vert`:i=`:not(.no-vband)`,r=`td.odd-col`;break;case`band2Vert`:i=`:not(.no-vband)`,r=`td.even-col`;break;case`band1Horz`:i=`:not(.no-hband)`,r=`tr.odd-row`;break;case`band2Horz`:i=`:not(.no-hband)`,r=`tr.even-row`;break;default:return[]}for(let n of P.elements(e))switch(n.localName){case`pPr`:t.push({target:`${r} p`,mod:i,values:this.parseDefaultProperties(n,{})});break;case`rPr`:t.push({target:`${r} span`,mod:i,values:this.parseDefaultProperties(n,{})});break;case`tblPr`:case`tcPr`:t.push({target:r,mod:i,values:this.parseDefaultProperties(n,{})});break}return t}parseNumberingFile(e){var t=[],n={},r=[];for(let o of P.elements(e))switch(o.localName){case`abstractNum`:this.parseAbstractNumbering(o,r).forEach(e=>t.push(e));break;case`numPicBullet`:r.push(this.parseNumberingPicBullet(o));break;case`num`:var i=P.attr(o,`numId`),a=P.elementAttr(o,`abstractNumId`,`val`);n[a]=i;break}return t.forEach(e=>e.id=n[e.id]),t}parseNumberingPicBullet(e){var t=P.element(e,`pict`),n=t&&P.element(t,`shape`),r=n&&P.element(n,`imagedata`);return r?{id:P.intAttr(e,`numPicBulletId`),src:P.attr(r,`id`),style:P.attr(n,`style`)}:null}parseAbstractNumbering(e,t){var n=[],r=P.attr(e,`abstractNumId`);for(let i of P.elements(e))switch(i.localName){case`lvl`:n.push(this.parseNumberingLevel(r,i,t));break}return n}parseNumberingLevel(e,t,n){var r={id:e,level:P.intAttr(t,`ilvl`),start:1,pStyleName:void 0,pStyle:{},rStyle:{},suff:`tab`};for(let e of P.elements(t))switch(e.localName){case`start`:r.start=P.intAttr(e,`val`);break;case`pPr`:this.parseDefaultProperties(e,r.pStyle);break;case`rPr`:this.parseDefaultProperties(e,r.rStyle);break;case`lvlPicBulletId`:var i=P.intAttr(e,`val`);r.bullet=n.find(e=>e?.id==i);break;case`lvlText`:r.levelText=P.attr(e,`val`);break;case`pStyle`:r.pStyleName=P.attr(e,`val`);break;case`numFmt`:r.format=P.attr(e,`val`);break;case`suff`:r.suff=P.attr(e,`val`);break}return r}parseSdt(e,t){let n=P.element(e,`sdtContent`);return n?t(n):[]}parseInserted(e,t){return{type:H.Inserted,children:t(e)?.children??[]}}parseDeleted(e,t){return{type:H.Deleted,children:t(e)?.children??[]}}parseAltChunk(e){return{type:H.AltChunk,children:[],id:P.attr(e,`id`)}}parseParagraph(e){var t={type:H.Paragraph,children:[]};for(let n of P.elements(e))switch(n.localName){case`pPr`:this.parseParagraphProperties(n,t);break;case`r`:t.children.push(this.parseRun(n,t));break;case`hyperlink`:t.children.push(this.parseHyperlink(n,t));break;case`smartTag`:t.children.push(this.parseSmartTag(n,t));break;case`bookmarkStart`:t.children.push(at(n,P));break;case`bookmarkEnd`:t.children.push(ot(n,P));break;case`commentRangeStart`:t.children.push(new mt(P.attr(n,`id`)));break;case`commentRangeEnd`:t.children.push(new ht(P.attr(n,`id`)));break;case`oMath`:case`oMathPara`:t.children.push(this.parseMathElement(n));break;case`sdt`:t.children.push(...this.parseSdt(n,e=>this.parseParagraph(e).children));break;case`ins`:t.children.push(this.parseInserted(n,e=>this.parseParagraph(e)));break;case`del`:t.children.push(this.parseDeleted(n,e=>this.parseParagraph(e)));break}return t}parseParagraphProperties(e,t){this.parseDefaultProperties(e,t.cssStyle={},null,e=>{if(he(e,t,P))return!0;switch(e.localName){case`pStyle`:t.styleName=P.attr(e,`val`);break;case`cnfStyle`:t.className=St.classNameOfCnfStyle(e);break;case`framePr`:this.parseFrame(e,t);break;case`rPr`:break;default:return!1}return!0})}parseFrame(e,t){P.attr(e,`dropCap`)==`drop`&&(t.cssStyle.float=`left`)}parseHyperlink(e,t){var n={type:H.Hyperlink,parent:t,children:[]};n.anchor=P.attr(e,`anchor`),n.id=P.attr(e,`id`);for(let t of P.elements(e))switch(t.localName){case`r`:n.children.push(this.parseRun(t,n));break}return n}parseSmartTag(e,t){var n={type:H.SmartTag,parent:t,children:[]},r=P.attr(e,`uri`),i=P.attr(e,`element`);r&&(n.uri=r),i&&(n.element=i);for(let t of P.elements(e))switch(t.localName){case`r`:n.children.push(this.parseRun(t,n));break}return n}parseRun(e,t){var n={type:H.Run,parent:t,children:[]};for(let t of P.elements(e))switch(t=this.checkAlternateContent(t),t.localName){case`t`:n.children.push({type:H.Text,text:t.textContent});break;case`delText`:n.children.push({type:H.DeletedText,text:t.textContent});break;case`commentReference`:n.children.push(new pt(P.attr(t,`id`)));break;case`fldSimple`:n.children.push({type:H.SimpleField,instruction:P.attr(t,`instr`),lock:P.boolAttr(t,`lock`,!1),dirty:P.boolAttr(t,`dirty`,!1)});break;case`instrText`:n.fieldRun=!0,n.children.push({type:H.Instruction,text:t.textContent});break;case`fldChar`:n.fieldRun=!0,n.children.push({type:H.ComplexField,charType:P.attr(t,`fldCharType`),lock:P.boolAttr(t,`lock`,!1),dirty:P.boolAttr(t,`dirty`,!1)});break;case`noBreakHyphen`:n.children.push({type:H.NoBreakHyphen});break;case`br`:n.children.push({type:H.Break,break:P.attr(t,`type`)||`textWrapping`});break;case`lastRenderedPageBreak`:n.children.push({type:H.Break,break:`lastRenderedPageBreak`});break;case`sym`:n.children.push({type:H.Symbol,font:g(P.attr(t,`font`)),char:P.attr(t,`char`)});break;case`tab`:n.children.push({type:H.Tab});break;case`footnoteReference`:n.children.push({type:H.FootnoteReference,id:P.attr(t,`id`)});break;case`endnoteReference`:n.children.push({type:H.EndnoteReference,id:P.attr(t,`id`)});break;case`drawing`:let e=this.parseDrawing(t);e&&(n.children=[e]);break;case`pict`:n.children.push(this.parseVmlPicture(t));break;case`rPr`:this.parseRunProperties(t,n);break}return n}parseMathElement(e){let t=`${e.localName}Pr`,n={type:vt[e.localName],children:[]};for(let i of P.elements(e))if(vt[i.localName])n.children.push(this.parseMathElement(i));else if(i.localName==`r`){var r=this.parseRun(i);r.type=H.MmlRun,n.children.push(r)}else i.localName==t&&(n.props=this.parseMathProperies(i));return n}parseMathProperies(e){let t={};for(let n of P.elements(e))switch(n.localName){case`chr`:t.char=P.attr(n,`val`);break;case`vertJc`:t.verticalJustification=P.attr(n,`val`);break;case`pos`:t.position=P.attr(n,`val`);break;case`degHide`:t.hideDegree=P.boolAttr(n,`val`);break;case`begChr`:t.beginChar=P.attr(n,`val`);break;case`endChr`:t.endChar=P.attr(n,`val`);break}return t}parseRunProperties(e,t){this.parseDefaultProperties(e,t.cssStyle={},null,e=>{switch(e.localName){case`rStyle`:t.styleName=P.attr(e,`val`);break;case`vertAlign`:t.verticalAlign=St.valueOfVertAlign(e,!0);break;default:return!1}return!0})}parseVmlPicture(e){let t={type:H.VmlPicture,children:[]};for(let n of P.elements(e)){let e=ct(n,this);e&&t.children.push(e)}return t}checkAlternateContent(e){if(e.localName!=`AlternateContent`)return e;var t=P.element(e,`Choice`);if(t){var n=P.attr(t,`Requires`),r=e.lookupNamespaceURI(n);if(_t.includes(r))return t.firstElementChild}return P.element(e,`Fallback`)?.firstElementChild}parseDrawing(e){for(var t of P.elements(e))switch(t.localName){case`inline`:case`anchor`:return this.parseDrawingWrapper(t)}}parseDrawingWrapper(e){var t={type:H.Drawing,children:[],cssStyle:{}},n=e.localName==`anchor`;let r=null,i=P.boolAttr(e,`simplePos`);P.boolAttr(e,`behindDoc`);let a={relative:`page`,align:`left`,offset:`0`},o={relative:`page`,align:`top`,offset:`0`};for(var s of P.elements(e))switch(s.localName){case`simplePos`:i&&(a.offset=P.lengthAttr(s,`x`,D.Emu),o.offset=P.lengthAttr(s,`y`,D.Emu));break;case`extent`:t.cssStyle.width=P.lengthAttr(s,`cx`,D.Emu),t.cssStyle.height=P.lengthAttr(s,`cy`,D.Emu);break;case`positionH`:case`positionV`:if(!i){let e=s.localName==`positionH`?a:o;var c=P.element(s,`align`),l=P.element(s,`posOffset`);e.relative=P.attr(s,`relativeFrom`)??e.relative,c&&(e.align=c.textContent),l&&(e.offset=O(l.textContent,D.Emu))}break;case`wrapTopAndBottom`:r=`wrapTopAndBottom`;break;case`wrapNone`:r=`wrapNone`;break;case`graphic`:var u=this.parseGraphic(s);u&&t.children.push(u);break}return r==`wrapTopAndBottom`?(t.cssStyle.display=`block`,a.align&&(t.cssStyle[`text-align`]=a.align,t.cssStyle.width=`100%`)):r==`wrapNone`?(t.cssStyle.display=`block`,t.cssStyle.position=`relative`,t.cssStyle.width=`0px`,t.cssStyle.height=`0px`,a.offset&&(t.cssStyle.left=a.offset),o.offset&&(t.cssStyle.top=o.offset)):n&&(a.align==`left`||a.align==`right`)&&(t.cssStyle.float=a.align),t}parseGraphic(e){var t=P.element(e,`graphicData`);for(let e of P.elements(t))switch(e.localName){case`pic`:return this.parsePicture(e)}return null}parsePicture(e){var t={type:H.Image,src:``,cssStyle:{}},n=P.element(e,`blipFill`),r=P.element(n,`blip`),i=P.element(n,`srcRect`);t.src=P.attr(r,`embed`),i&&(t.srcRect=[P.intAttr(i,`l`,0)/1e5,P.intAttr(i,`t`,0)/1e5,P.intAttr(i,`r`,0)/1e5,P.intAttr(i,`b`,0)/1e5]);var a=P.element(e,`spPr`),o=P.element(a,`xfrm`);if(t.cssStyle.position=`relative`,o){t.rotation=P.intAttr(o,`rot`,0)/6e4;for(var s of P.elements(o))switch(s.localName){case`ext`:t.cssStyle.width=P.lengthAttr(s,`cx`,D.Emu),t.cssStyle.height=P.lengthAttr(s,`cy`,D.Emu);break;case`off`:t.cssStyle.left=P.lengthAttr(s,`x`,D.Emu),t.cssStyle.top=P.lengthAttr(s,`y`,D.Emu);break}}return t}parseTable(e){var t={type:H.Table,children:[]};for(let n of P.elements(e))switch(n.localName){case`tr`:t.children.push(this.parseTableRow(n));break;case`tblGrid`:t.columns=this.parseTableColumns(n);break;case`tblPr`:this.parseTableProperties(n,t);break}return t}parseTableColumns(e){var t=[];for(let n of P.elements(e))switch(n.localName){case`gridCol`:t.push({width:P.lengthAttr(n,`w`)});break}return t}parseTableProperties(e,t){switch(t.cssStyle={},t.cellStyle={},this.parseDefaultProperties(e,t.cssStyle,t.cellStyle,e=>{switch(e.localName){case`tblStyle`:t.styleName=P.attr(e,`val`);break;case`tblLook`:t.className=St.classNameOftblLook(e);break;case`tblpPr`:this.parseTablePosition(e,t);break;case`tblStyleColBandSize`:t.colBandSize=P.intAttr(e,`val`);break;case`tblStyleRowBandSize`:t.rowBandSize=P.intAttr(e,`val`);break;case`hidden`:t.cssStyle.display=`none`;break;default:return!1}return!0}),t.cssStyle[`text-align`]){case`center`:delete t.cssStyle[`text-align`],t.cssStyle[`margin-left`]=`auto`,t.cssStyle[`margin-right`]=`auto`;break;case`right`:delete t.cssStyle[`text-align`],t.cssStyle[`margin-left`]=`auto`;break}}parseTablePosition(e,t){var n=P.lengthAttr(e,`topFromText`),r=P.lengthAttr(e,`bottomFromText`),i=P.lengthAttr(e,`rightFromText`),a=P.lengthAttr(e,`leftFromText`);t.cssStyle.float=`left`,t.cssStyle[`margin-bottom`]=St.addSize(t.cssStyle[`margin-bottom`],r),t.cssStyle[`margin-left`]=St.addSize(t.cssStyle[`margin-left`],a),t.cssStyle[`margin-right`]=St.addSize(t.cssStyle[`margin-right`],i),t.cssStyle[`margin-top`]=St.addSize(t.cssStyle[`margin-top`],n)}parseTableRow(e){var t={type:H.Row,children:[]};for(let n of P.elements(e))switch(n.localName){case`tc`:t.children.push(this.parseTableCell(n));break;case`trPr`:case`tblPrEx`:this.parseTableRowProperties(n,t);break}return t}parseTableRowProperties(e,t){t.cssStyle=this.parseDefaultProperties(e,{},null,e=>{switch(e.localName){case`cnfStyle`:t.className=St.classNameOfCnfStyle(e);break;case`tblHeader`:t.isHeader=P.boolAttr(e,`val`);break;case`gridBefore`:t.gridBefore=P.intAttr(e,`val`);break;case`gridAfter`:t.gridAfter=P.intAttr(e,`val`);break;default:return!1}return!0})}parseTableCell(e){var t={type:H.Cell,children:[]};for(let n of P.elements(e))switch(n.localName){case`tbl`:t.children.push(this.parseTable(n));break;case`p`:t.children.push(this.parseParagraph(n));break;case`tcPr`:this.parseTableCellProperties(n,t);break}return t}parseTableCellProperties(e,t){t.cssStyle=this.parseDefaultProperties(e,{},null,e=>{switch(e.localName){case`gridSpan`:t.span=P.intAttr(e,`val`,null);break;case`vMerge`:t.verticalMerge=P.attr(e,`val`)??`continue`;break;case`cnfStyle`:t.className=St.classNameOfCnfStyle(e);break;default:return!1}return!0}),this.parseTableCellVerticalText(e,t)}parseTableCellVerticalText(e,t){let n={btLr:{writingMode:`vertical-rl`,transform:`rotate(180deg)`},lrTb:{writingMode:`vertical-lr`,transform:`none`},tbRl:{writingMode:`vertical-rl`,transform:`none`}};for(let r of P.elements(e))if(r.localName===`textDirection`){let e=n[P.attr(r,`val`)]||{writingMode:`horizontal-tb`};t.cssStyle[`writing-mode`]=e.writingMode,t.cssStyle.transform=e.transform}}parseDefaultProperties(e,t=null,n=null,r=null){t||={};for(let i of P.elements(e))if(!r?.(i))switch(i.localName){case`jc`:t[`text-align`]=St.valueOfJc(i);break;case`textAlignment`:t[`vertical-align`]=St.valueOfTextAlignment(i);break;case`color`:t.color=xt.colorAttr(i,`val`,null,gt.color);break;case`sz`:t[`font-size`]=t[`min-height`]=P.lengthAttr(i,`val`,D.FontSize);break;case`shd`:t[`background-color`]=xt.colorAttr(i,`fill`,null,gt.shd);break;case`highlight`:t[`background-color`]=xt.colorAttr(i,`val`,null,gt.highlight);break;case`vertAlign`:break;case`position`:t.verticalAlign=P.lengthAttr(i,`val`,D.FontSize);break;case`tcW`:if(this.options.ignoreWidth)break;case`tblW`:t.width=St.valueOfSize(i,`w`);break;case`trHeight`:this.parseTrHeight(i,t);break;case`strike`:t[`text-decoration`]=P.boolAttr(i,`val`,!0)?`line-through`:`none`;break;case`b`:t[`font-weight`]=P.boolAttr(i,`val`,!0)?`bold`:`normal`;break;case`i`:t[`font-style`]=P.boolAttr(i,`val`,!0)?`italic`:`normal`;break;case`caps`:t[`text-transform`]=P.boolAttr(i,`val`,!0)?`uppercase`:`none`;break;case`smallCaps`:t[`font-variant`]=P.boolAttr(i,`val`,!0)?`small-caps`:`none`;break;case`u`:this.parseUnderline(i,t);break;case`ind`:case`tblInd`:this.parseIndentation(i,t);break;case`rFonts`:this.parseFont(i,t);break;case`tblBorders`:this.parseBorderProperties(i,n||t);break;case`tblCellSpacing`:t[`border-spacing`]=St.valueOfMargin(i),t[`border-collapse`]=`separate`;break;case`pBdr`:this.parseBorderProperties(i,t);break;case`bdr`:t.border=St.valueOfBorder(i);break;case`tcBorders`:this.parseBorderProperties(i,t);break;case`vanish`:P.boolAttr(i,`val`,!0)&&(t.display=`none`);break;case`kern`:break;case`noWrap`:break;case`tblCellMar`:case`tcMar`:this.parseMarginProperties(i,n||t);break;case`tblLayout`:t[`table-layout`]=St.valueOfTblLayout(i);break;case`vAlign`:t[`vertical-align`]=St.valueOfTextAlignment(i);break;case`spacing`:e.localName==`pPr`&&this.parseSpacing(i,t);break;case`wordWrap`:P.boolAttr(i,`val`)&&(t[`overflow-wrap`]=`break-word`);break;case`suppressAutoHyphens`:t.hyphens=P.boolAttr(i,`val`,!0)?`none`:`auto`;break;case`lang`:t.$lang=P.attr(i,`val`);break;case`rtl`:case`bidi`:P.boolAttr(i,`val`,!0)&&(t.direction=`rtl`);break;case`bCs`:case`iCs`:case`szCs`:case`tabs`:case`outlineLvl`:case`contextualSpacing`:case`tblStyleColBandSize`:case`tblStyleRowBandSize`:case`webHidden`:case`pageBreakBefore`:case`suppressLineNumbers`:case`keepLines`:case`keepNext`:case`widowControl`:case`bidi`:case`rtl`:case`noProof`:break;default:this.options.debug&&console.warn(`DOCX: Unknown document element: ${e.localName}.${i.localName}`);break}return t}parseUnderline(e,t){var n=P.attr(e,`val`);if(n!=null){switch(n){case`dash`:case`dashDotDotHeavy`:case`dashDotHeavy`:case`dashedHeavy`:case`dashLong`:case`dashLongHeavy`:case`dotDash`:case`dotDotDash`:t[`text-decoration`]=`underline dashed`;break;case`dotted`:case`dottedHeavy`:t[`text-decoration`]=`underline dotted`;break;case`double`:t[`text-decoration`]=`underline double`;break;case`single`:case`thick`:t[`text-decoration`]=`underline`;break;case`wave`:case`wavyDouble`:case`wavyHeavy`:t[`text-decoration`]=`underline wavy`;break;case`words`:t[`text-decoration`]=`underline`;break;case`none`:t[`text-decoration`]=`none`;break}var r=xt.colorAttr(e,`color`);r&&(t[`text-decoration-color`]=r)}}parseFont(e,t){var n=[P.attr(e,`ascii`),St.themeValue(e,`asciiTheme`),P.attr(e,`eastAsia`)].filter(e=>e).map(e=>g(e));n.length>0&&(t[`font-family`]=[...new Set(n)].join(`, `))}parseIndentation(e,t){var n=P.lengthAttr(e,`firstLine`),r=P.lengthAttr(e,`hanging`),i=P.lengthAttr(e,`left`),a=P.lengthAttr(e,`start`),o=P.lengthAttr(e,`right`),s=P.lengthAttr(e,`end`);n&&(t[`text-indent`]=n),r&&(t[`text-indent`]=`-${r}`),(i||a)&&(t[`margin-inline-start`]=i||a),(o||s)&&(t[`margin-inline-end`]=o||s)}parseSpacing(e,t){var n=P.lengthAttr(e,`before`),r=P.lengthAttr(e,`after`),i=P.intAttr(e,`line`,null),a=P.attr(e,`lineRule`);if(n&&(t[`margin-top`]=n),r&&(t[`margin-bottom`]=r),i!==null)switch(a){case`auto`:t[`line-height`]=`${(i/240).toFixed(2)}`;break;case`atLeast`:t[`line-height`]=`calc(100% + ${i/20}pt)`;break;default:t[`line-height`]=t[`min-height`]=`${i/20}pt`;break}}parseMarginProperties(e,t){for(let n of P.elements(e))switch(n.localName){case`left`:t[`padding-left`]=St.valueOfMargin(n);break;case`right`:t[`padding-right`]=St.valueOfMargin(n);break;case`top`:t[`padding-top`]=St.valueOfMargin(n);break;case`bottom`:t[`padding-bottom`]=St.valueOfMargin(n);break}}parseTrHeight(e,t){switch(P.attr(e,`hRule`)){case`exact`:t.height=P.lengthAttr(e,`val`);break;default:t.height=P.lengthAttr(e,`val`);break}}parseBorderProperties(e,t){for(let n of P.elements(e))switch(n.localName){case`start`:case`left`:t[`border-left`]=St.valueOfBorder(n);break;case`end`:case`right`:t[`border-right`]=St.valueOfBorder(n);break;case`top`:t[`border-top`]=St.valueOfBorder(n);break;case`bottom`:t[`border-bottom`]=St.valueOfBorder(n);break}}};let bt=[`black`,`blue`,`cyan`,`darkBlue`,`darkCyan`,`darkGray`,`darkGreen`,`darkMagenta`,`darkRed`,`darkYellow`,`green`,`lightGray`,`magenta`,`none`,`red`,`white`,`yellow`];var xt=class{static colorAttr(e,t,n=null,r=`black`){var i=P.attr(e,t);if(i)return i==`auto`?r:bt.includes(i)?i:`#${i}`;var a=P.attr(e,`themeColor`);return a?`var(--docx-${a}-color)`:n}},St=class e{static themeValue(e,t){var n=P.attr(e,t);return n?`var(--docx-${n}-font)`:null}static valueOfSize(e,t){var n=D.Dxa;switch(P.attr(e,`type`)){case`dxa`:break;case`pct`:n=D.Percent;break;case`auto`:return`auto`}return P.lengthAttr(e,t,n)}static valueOfMargin(e){return P.lengthAttr(e,`w`)}static valueOfBorder(t){var n=e.parseBorderType(P.attr(t,`val`));if(n==`none`)return`none`;var r=xt.colorAttr(t,`color`);return`${P.lengthAttr(t,`sz`,D.Border)} ${n} ${r==`auto`?gt.borderColor:r}`}static parseBorderType(e){switch(e){case`single`:return`solid`;case`dashDotStroked`:return`solid`;case`dashed`:return`dashed`;case`dashSmallGap`:return`dashed`;case`dotDash`:return`dotted`;case`dotDotDash`:return`dotted`;case`dotted`:return`dotted`;case`double`:return`double`;case`doubleWave`:return`double`;case`inset`:return`inset`;case`nil`:return`none`;case`none`:return`none`;case`outset`:return`outset`;case`thick`:return`solid`;case`thickThinLargeGap`:return`solid`;case`thickThinMediumGap`:return`solid`;case`thickThinSmallGap`:return`solid`;case`thinThickLargeGap`:return`solid`;case`thinThickMediumGap`:return`solid`;case`thinThickSmallGap`:return`solid`;case`thinThickThinLargeGap`:return`solid`;case`thinThickThinMediumGap`:return`solid`;case`thinThickThinSmallGap`:return`solid`;case`threeDEmboss`:return`solid`;case`threeDEngrave`:return`solid`;case`triple`:return`double`;case`wave`:return`solid`}return`solid`}static valueOfTblLayout(e){return P.attr(e,`val`)==`fixed`?`fixed`:`auto`}static classNameOfCnfStyle(e){let t=P.attr(e,`val`);return[`first-row`,`last-row`,`first-col`,`last-col`,`odd-col`,`even-col`,`odd-row`,`even-row`,`ne-cell`,`nw-cell`,`se-cell`,`sw-cell`].filter((e,n)=>t[n]==`1`).join(` `)}static valueOfJc(e){var t=P.attr(e,`val`);switch(t){case`start`:case`left`:return`left`;case`center`:return`center`;case`end`:case`right`:return`right`;case`both`:return`justify`}return t}static valueOfVertAlign(e,t=!1){var n=P.attr(e,`val`);switch(n){case`subscript`:return`sub`;case`superscript`:return t?`sup`:`super`}return t?null:n}static valueOfTextAlignment(e){var t=P.attr(e,`val`);switch(t){case`auto`:case`baseline`:return`baseline`;case`top`:return`top`;case`center`:return`middle`;case`bottom`:return`bottom`}return t}static addSize(e,t){return e==null?t:t==null?e:`calc(${e} + ${t})`}static classNameOftblLook(e){let t=P.hexAttr(e,`val`,0),n=``;return(P.boolAttr(e,`firstRow`)||t&32)&&(n+=` first-row`),(P.boolAttr(e,`lastRow`)||t&64)&&(n+=` last-row`),(P.boolAttr(e,`firstColumn`)||t&128)&&(n+=` first-col`),(P.boolAttr(e,`lastColumn`)||t&256)&&(n+=` last-col`),(P.boolAttr(e,`noHBand`)||t&512)&&(n+=` no-hband`),(P.boolAttr(e,`noVBand`)||t&1024)&&(n+=` no-vband`),n.trim()}};let Ct={pos:0,leader:`none`,style:`left`};function wt(e=document.body){let t=document.createElement(`div`);t.style.width=`100pt`,e.appendChild(t);let n=100/t.offsetWidth;return e.removeChild(t),n}function Tt(e,t,n,r=72/96){let i=e.closest(`p`),a=e.getBoundingClientRect(),o=i.getBoundingClientRect(),s=getComputedStyle(i),c=t?.length>0?t.map(e=>({pos:Et(e.position),leader:e.leader,style:e.style})).sort((e,t)=>e.pos-t.pos):[Ct],l=c[c.length-1],u=o.width*r,d=Et(n),f=l.pos+d;if(fe.style!=`clear`&&e.pos>h);if(g==null)return;let _=1;if(g.style==`right`||g.style==`center`){let t=Array.from(i.querySelectorAll(`.${e.className}`)),n=t.indexOf(e)+1,a=document.createRange();a.setStart(e,1),ne.id)),e.endnotesPart&&(this.endnoteMap=y(e.endnotesPart.notes,e=>e.id)),e.settingsPart&&(this.defaultTabSize=e.settingsPart.settings?.defaultTabStop),!r.ignoreFonts&&e.fontTablePart&&this.renderFontTable(e.fontTablePart,n);var i=this.renderSections(e.documentPart.body);this.options.inWrapper?t.appendChild(this.renderWrapper(i)):kt(t,i),this.commentHighlight&&r.renderComments&&CSS.highlights.set(`${this.className}-comments`,this.commentHighlight),this.postRenderTasks.forEach(e=>e()),await Promise.allSettled(this.tasks),this.refreshTabStops()}renderTheme(e,t){let n={},r=e.theme?.fontScheme;r&&(r.majorFont&&(n[`--docx-majorHAnsi-font`]=r.majorFont.latinTypeface),r.minorFont&&(n[`--docx-minorHAnsi-font`]=r.minorFont.latinTypeface));let i=e.theme?.colorScheme;if(i)for(let[e,t]of Object.entries(i.colors))n[`--docx-${e}-color`]=`#${t}`;let a=this.styleToString(`.${this.className}`,n);t.appendChild(this.createStyleElement(a))}renderFontTable(e,t){for(let n of e.fonts)for(let e of n.embedFontRefs)this.tasks.push(this.document.loadFont(e.id,e.key).then(r=>{let i={"font-family":g(n.name),src:`url(${r})`};(e.type==`bold`||e.type==`boldItalic`)&&(i[`font-weight`]=`bold`),(e.type==`italic`||e.type==`boldItalic`)&&(i[`font-style`]=`italic`);let a=this.styleToString(`@font-face`,i);t.appendChild(this.createComment(`docxjs ${n.name} font`)),t.appendChild(this.createStyleElement(a))}))}processStyleName(e){return e?`${this.className}_${h(e)}`:this.className}processStyles(e){let t=y(e.filter(e=>e.id!=null),e=>e.id);for(let r of e.filter(e=>e.basedOn)){var n=t[r.basedOn];if(n){r.paragraphProps=C(r.paragraphProps,n.paragraphProps),r.runProps=C(r.runProps,n.runProps);for(let e of n.styles){let t=r.styles.find(t=>t.target==e.target);t?this.copyStyleProperties(e.values,t.values):r.styles.push({...e,values:{...e.values}})}}else this.options.debug&&console.warn(`Can\'t find base style ${r.basedOn}`)}for(let t of e)t.cssName=this.processStyleName(t.id);return t}prodessNumberings(e){for(let t of e.filter(e=>e.pStyleName)){let e=this.findStyle(t.pStyleName);e?.paragraphProps?.numbering&&(e.paragraphProps.numbering.level=t.level)}}processElement(e){if(e.children)for(var t of e.children)t.parent=e,t.type==H.Table?this.processTable(t):this.processElement(t)}processTable(e){for(var t of e.children)for(var n of t.children)n.cssStyle=this.copyStyleProperties(e.cellStyle,n.cssStyle,[`border-left`,`border-right`,`border-top`,`border-bottom`,`padding-left`,`padding-right`,`padding-top`,`padding-bottom`]),this.processElement(n)}copyStyleProperties(e,t,n=null){if(!e)return t;t??={},n??=Object.getOwnPropertyNames(e);for(var r of n)e.hasOwnProperty(r)&&!t.hasOwnProperty(r)&&(t[r]=e[r]);return t}createPageElement(e,t){var n=this.createElement(`section`,{className:e});return t&&(t.pageMargins&&(n.style.paddingLeft=t.pageMargins.left,n.style.paddingRight=t.pageMargins.right,n.style.paddingTop=t.pageMargins.top,n.style.paddingBottom=t.pageMargins.bottom),t.pageSize&&(this.options.ignoreWidth||(n.style.width=t.pageSize.width),this.options.ignoreHeight||(n.style.minHeight=t.pageSize.height))),n}createSectionContent(e){var t=this.createElement(`article`);return e.columns&&e.columns.numberOfColumns&&(t.style.columnCount=`${e.columns.numberOfColumns}`,t.style.columnGap=e.columns.space,e.columns.separator&&(t.style.columnRule=`1px solid black`)),t}renderSections(e){let t=[];this.processElement(e);let n=this.splitBySection(e.children,e.props),r=this.groupByPageBreaks(n),i=null;for(let n=0,o=r.length;ne.type==`first`):null)??(n%2==1?e.find(e=>e.type==`even`):null)??e.find(e=>e.type=="default"),o=a&&this.document.findPartByRelId(a.id,this.document.documentPart);if(o){this.currentPart=o,this.usedHederFooterParts.includes(o.path)||(this.processElement(o.rootElement),this.usedHederFooterParts.push(o.path));let[e]=this.renderElements([o.rootElement],i);t?.pageMargins&&(o.rootElement.type===H.Header?(e.style.marginTop=`calc(${t.pageMargins.header} - ${t.pageMargins.top})`,e.style.minHeight=`calc(${t.pageMargins.top} - ${t.pageMargins.header})`):o.rootElement.type===H.Footer&&(e.style.marginBottom=`calc(${t.pageMargins.footer} - ${t.pageMargins.bottom})`,e.style.minHeight=`calc(${t.pageMargins.bottom} - ${t.pageMargins.footer})`)),this.currentPart=null}}}isPageBreakElement(e){return e.type==H.Break?e.break==`lastRenderedPageBreak`?!this.options.ignoreLastRenderedPageBreak:e.break==`page`:!1}isPageBreakSection(e,t){return!e||!t?!1:e.pageSize?.orientation!=t.pageSize?.orientation||e.pageSize?.width!=t.pageSize?.width||e.pageSize?.height!=t.pageSize?.height}splitBySection(e,t){var n={sectProps:null,elements:[],pageBreak:!1},r=[n];for(let t of e)if(t.type==H.Paragraph&&this.findStyle(t.styleName)?.paragraphProps?.pageBreakBefore&&(n.sectProps=i,n.pageBreak=!0,n={sectProps:null,elements:[],pageBreak:!1},r.push(n)),n.elements.push(t),t.type==H.Paragraph){let e=t;var i=e.sectionProps,a=-1,o=-1;if(this.options.breakPages&&e.children&&(a=e.children.findIndex(e=>(o=e.children?.findIndex(this.isPageBreakElement.bind(this))??-1,o!=-1))),(i||a!=-1)&&(n.sectProps=i,n.pageBreak=a!=-1,n={sectProps:null,elements:[],pageBreak:!1},r.push(n)),a!=-1){let r=e.children[a],i=o=0;e--)r[e].sectProps==null?r[e].sectProps=l??t:l=r[e].sectProps;return r}groupByPageBreaks(e){let t=[],n,r=[t];for(let i of e)t.push(i),(this.options.ignoreLastRenderedPageBreak||i.pageBreak||this.isPageBreakSection(n,i.sectProps))&&r.push(t=[]),n=i.sectProps;return r.filter(e=>e.length>0)}renderWrapper(e){return this.createElement(`div`,{className:`${this.className}-wrapper`},e)}renderDefaultStyle(){var e=this.className,t=`\n.${e}-wrapper { background: gray; padding: 30px; padding-bottom: 0px; display: flex; flex-flow: column; align-items: center; } \n.${e}-wrapper>section.${e} { background: white; box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); margin-bottom: 30px; }`;this.options.hideWrapperOnPrint&&(t=`@media not print { ${t} }`);var n=`${t}\n.${e} { color: black; hyphens: auto; text-underline-position: from-font; }\nsection.${e} { box-sizing: border-box; display: flex; flex-flow: column nowrap; position: relative; overflow: hidden; }\nsection.${e}>article { margin-bottom: auto; z-index: 1; }\nsection.${e}>footer { z-index: 1; }\n.${e} table { border-collapse: collapse; }\n.${e} table td, .${e} table th { vertical-align: top; }\n.${e} p { margin: 0pt; min-height: 1em; }\n.${e} span { white-space: pre-wrap; overflow-wrap: break-word; }\n.${e} a { color: inherit; text-decoration: inherit; }\n.${e} svg { fill: transparent; }\n`;return this.options.renderComments&&(n+=`\n.${e}-comment-ref { cursor: default; }\n.${e}-comment-popover { display: none; z-index: 1000; padding: 0.5rem; background: white; position: absolute; box-shadow: 0 0 0.25rem rgba(0, 0, 0, 0.25); width: 30ch; }\n.${e}-comment-ref:hover~.${e}-comment-popover { display: block; }\n.${e}-comment-author,.${e}-comment-date { font-size: 0.875rem; color: #888; }\n`),this.createStyleElement(n)}renderNumbering(e,t){var n=``,r=[];for(var i of e){var a=`p.${this.numberingClass(i.id,i.level)}`,o=`none`;if(i.bullet){let e=`--${this.className}-${i.bullet.src}`.toLowerCase();n+=this.styleToString(`${a}:before`,{content:`\' \'`,display:`inline-block`,background:`var(${e})`},i.bullet.style),this.tasks.push(this.document.loadNumberingImage(i.bullet.src).then(n=>{var r=`${this.rootSelector} { ${e}: url(${n}) }`;t.appendChild(this.createStyleElement(r))}))}else if(i.levelText){let e=this.numberingCounter(i.id,i.level),t=e+` `+(i.start-1);i.level>0&&(n+=this.styleToString(`p.${this.numberingClass(i.id,i.level-1)}`,{"counter-set":t})),r.push(t),n+=this.styleToString(`${a}:before`,{content:this.levelTextToContent(i.levelText,i.suff,i.id,this.numFormatToCssValue(i.format)),"counter-increment":e,...i.rStyle})}else o=this.numFormatToCssValue(i.format);n+=this.styleToString(a,{display:`list-item`,"list-style-position":`inside`,"list-style-type":o,...i.pStyle})}return r.length>0&&(n+=this.styleToString(this.rootSelector,{"counter-reset":r.join(` `)})),this.createStyleElement(n)}renderStyles(e){var t=``;let n=this.styleMap,r=y(e.filter(e=>e.isDefault),e=>e.target);for(let s of e){var i=s.styles;if(s.linked){var a=s.linked&&n[s.linked];a?i=i.concat(a.styles):this.options.debug&&console.warn(`Can\'t find linked style ${s.linked}`)}for(let e of i){var o=`${s.target??``}.${s.cssName}`;s.target!=e.target&&(o+=` ${e.target}`),r[s.target]==s&&(o=`.${this.className} ${s.target}, `+o),t+=this.styleToString(o,e.values)}}return this.createStyleElement(t)}renderNotes(e,t,n){var r=e.map(e=>t[e]).filter(e=>e);if(r.length>0){var i=this.createElement(`ol`,null,this.renderElements(r));n.appendChild(i)}}renderElement(e){switch(e.type){case H.Paragraph:return this.renderParagraph(e);case H.BookmarkStart:return this.renderBookmarkStart(e);case H.BookmarkEnd:return null;case H.Run:return this.renderRun(e);case H.Table:return this.renderTable(e);case H.Row:return this.renderTableRow(e);case H.Cell:return this.renderTableCell(e);case H.Hyperlink:return this.renderHyperlink(e);case H.SmartTag:return this.renderSmartTag(e);case H.Drawing:return this.renderDrawing(e);case H.Image:return this.renderImage(e);case H.Text:return this.renderText(e);case H.Text:return this.renderText(e);case H.DeletedText:return this.renderDeletedText(e);case H.Tab:return this.renderTab(e);case H.Symbol:return this.renderSymbol(e);case H.Break:return this.renderBreak(e);case H.Footer:return this.renderContainer(e,`footer`);case H.Header:return this.renderContainer(e,`header`);case H.Footnote:case H.Endnote:return this.renderContainer(e,`li`);case H.FootnoteReference:return this.renderFootnoteReference(e);case H.EndnoteReference:return this.renderEndnoteReference(e);case H.NoBreakHyphen:return this.createElement(`wbr`);case H.VmlPicture:return this.renderVmlPicture(e);case H.VmlElement:return this.renderVmlElement(e);case H.MmlMath:return this.renderContainerNS(e,U.mathML,`math`,{xmlns:U.mathML});case H.MmlMathParagraph:return this.renderContainer(e,`span`);case H.MmlFraction:return this.renderContainerNS(e,U.mathML,`mfrac`);case H.MmlBase:return this.renderContainerNS(e,U.mathML,e.parent.type==H.MmlMatrixRow?`mtd`:`mrow`);case H.MmlNumerator:case H.MmlDenominator:case H.MmlFunction:case H.MmlLimit:case H.MmlBox:return this.renderContainerNS(e,U.mathML,`mrow`);case H.MmlGroupChar:return this.renderMmlGroupChar(e);case H.MmlLimitLower:return this.renderContainerNS(e,U.mathML,`munder`);case H.MmlMatrix:return this.renderContainerNS(e,U.mathML,`mtable`);case H.MmlMatrixRow:return this.renderContainerNS(e,U.mathML,`mtr`);case H.MmlRadical:return this.renderMmlRadical(e);case H.MmlSuperscript:return this.renderContainerNS(e,U.mathML,`msup`);case H.MmlSubscript:return this.renderContainerNS(e,U.mathML,`msub`);case H.MmlDegree:case H.MmlSuperArgument:case H.MmlSubArgument:return this.renderContainerNS(e,U.mathML,`mn`);case H.MmlFunctionName:return this.renderContainerNS(e,U.mathML,`ms`);case H.MmlDelimiter:return this.renderMmlDelimiter(e);case H.MmlRun:return this.renderMmlRun(e);case H.MmlNary:return this.renderMmlNary(e);case H.MmlPreSubSuper:return this.renderMmlPreSubSuper(e);case H.MmlBar:return this.renderMmlBar(e);case H.MmlEquationArray:return this.renderMllList(e);case H.Inserted:return this.renderInserted(e);case H.Deleted:return this.renderDeleted(e);case H.CommentRangeStart:return this.renderCommentRangeStart(e);case H.CommentRangeEnd:return this.renderCommentRangeEnd(e);case H.CommentReference:return this.renderCommentReference(e);case H.AltChunk:return this.renderAltChunk(e)}return null}renderElements(e,t){if(e==null)return null;var n=e.flatMap(e=>this.renderElement(e)).filter(e=>e!=null);return t&&kt(t,n),n}renderContainer(e,t,n){return this.createElement(t,n,this.renderElements(e.children))}renderContainerNS(e,t,n,r){return this.createElementNS(t,n,r,this.renderElements(e.children))}renderParagraph(e){var t=this.renderContainer(e,`p`);let n=this.findStyle(e.styleName);e.tabs??=n?.paragraphProps?.tabs,this.renderClass(e,t),this.renderStyleValues(e.cssStyle,t),this.renderCommonProperties(t.style,e);let r=e.numbering??n?.paragraphProps?.numbering;return r&&t.classList.add(this.numberingClass(r.id,r.level)),t}renderRunProperties(e,t){this.renderCommonProperties(e,t)}renderCommonProperties(e,t){t!=null&&(t.color&&(e.color=t.color),t.fontSize&&(e[`font-size`]=t.fontSize))}renderHyperlink(e){var t=this.renderContainer(e,`a`);this.renderStyleValues(e.cssStyle,t);let n=``;return e.id&&(n=this.document.documentPart.rels.find(t=>t.id==e.id&&t.targetMode===`External`)?.target??n),e.anchor&&(n+=`#${e.anchor}`),t.href=n,t}renderSmartTag(e){return this.renderContainer(e,`span`)}renderCommentRangeStart(e){if(!this.options.renderComments)return null;let t=new Range;this.commentHighlight?.add(t);let n=this.createComment(`start of comment #${e.id}`);return this.later(()=>t.setStart(n,0)),this.commentMap[e.id]=t,n}renderCommentRangeEnd(e){if(!this.options.renderComments)return null;let t=this.commentMap[e.id],n=this.createComment(`end of comment #${e.id}`);return this.later(()=>t?.setEnd(n,0)),n}renderCommentReference(e){if(!this.options.renderComments)return null;var t=this.document.commentsPart?.commentMap[e.id];if(!t)return null;let n=new DocumentFragment,r=this.createElement(`span`,{className:`${this.className}-comment-ref`},[`💬`]),i=this.createElement(`div`,{className:`${this.className}-comment-popover`});return this.renderCommentContent(t,i),n.appendChild(this.createComment(`comment #${t.id} by ${t.author} on ${t.date}`)),n.appendChild(r),n.appendChild(i),n}renderAltChunk(e){if(!this.options.renderAltChunks)return null;var t=this.createElement(`iframe`);return this.tasks.push(this.document.loadAltChunk(e.id,this.currentPart).then(e=>{t.srcdoc=e})),t}renderCommentContent(e,t){t.appendChild(this.createElement(`div`,{className:`${this.className}-comment-author`},[e.author])),t.appendChild(this.createElement(`div`,{className:`${this.className}-comment-date`},[new Date(e.date).toLocaleString()])),this.renderElements(e.children,t)}renderDrawing(e){var t=this.renderContainer(e,`div`);return t.style.display=`inline-block`,t.style.position=`relative`,t.style.textIndent=`0px`,this.renderStyleValues(e.cssStyle,t),t}renderImage(e){let t=this.createElement(`img`),n=e.cssStyle?.transform;if(this.renderStyleValues(e.cssStyle,t),e.srcRect&&e.srcRect.some(e=>e!=0)){var[r,i,a,o]=e.srcRect;n=`scale(${1/(1-r-a)}, ${1/(1-i-o)})`,t.style[`clip-path`]=`rect(${(100*i).toFixed(2)}% ${(100*(1-a)).toFixed(2)}% ${(100*(1-o)).toFixed(2)}% ${(100*r).toFixed(2)}%)`}return e.rotation&&(n=`rotate(${e.rotation}deg) ${n??``}`),t.style.transform=n?.trim(),this.document&&this.tasks.push(this.document.loadDocumentImage(e.src,this.currentPart).then(e=>{t.src=e})),t}renderText(e){return this.htmlDocument.createTextNode(e.text)}renderDeletedText(e){return this.options.renderChanges?this.renderText(e):null}renderBreak(e){return e.break==`textWrapping`?this.createElement(`br`):null}renderInserted(e){return this.options.renderChanges?this.renderContainer(e,`ins`):this.renderElements(e.children)}renderDeleted(e){return this.options.renderChanges?this.renderContainer(e,`del`):null}renderSymbol(e){var t=this.createElement(`span`);return t.style.fontFamily=e.font,t.innerHTML=`&#x${e.char};`,t}renderFootnoteReference(e){var t=this.createElement(`sup`);return this.currentFootnoteIds.push(e.id),t.textContent=`${this.currentFootnoteIds.length}`,t}renderEndnoteReference(e){var t=this.createElement(`sup`);return this.currentEndnoteIds.push(e.id),t.textContent=`${this.currentEndnoteIds.length}`,t}renderTab(e){var t=this.createElement(`span`);if(t.innerHTML=` `,this.options.experimental){t.className=this.tabStopClass();var n=At(e,H.Paragraph)?.tabs;this.currentTabs.push({stops:n,span:t})}return t}renderBookmarkStart(e){return this.createElement(`span`,{id:e.name})}renderRun(e){if(e.fieldRun)return null;let t=this.createElement(`span`);if(e.id&&(t.id=e.id),this.renderClass(e,t),this.renderStyleValues(e.cssStyle,t),e.verticalAlign){let n=this.createElement(e.verticalAlign);this.renderElements(e.children,n),t.appendChild(n)}else this.renderElements(e.children,t);return t}renderTable(e){let t=this.createElement(`table`);return this.tableCellPositions.push(this.currentCellPosition),this.tableVerticalMerges.push(this.currentVerticalMerge),this.currentVerticalMerge={},this.currentCellPosition={col:0,row:0},e.columns&&t.appendChild(this.renderTableColumns(e.columns)),this.renderClass(e,t),this.renderElements(e.children,t),this.renderStyleValues(e.cssStyle,t),this.currentVerticalMerge=this.tableVerticalMerges.pop(),this.currentCellPosition=this.tableCellPositions.pop(),t}renderTableColumns(e){let t=this.createElement(`colgroup`);for(let n of e){let e=this.createElement(`col`);n.width&&(e.style.width=n.width),t.appendChild(e)}return t}renderTableRow(e){let t=this.createElement(`tr`);return this.currentCellPosition.col=0,e.gridBefore&&t.appendChild(this.renderTableCellPlaceholder(e.gridBefore)),this.renderClass(e,t),this.renderElements(e.children,t),this.renderStyleValues(e.cssStyle,t),e.gridAfter&&t.appendChild(this.renderTableCellPlaceholder(e.gridAfter)),this.currentCellPosition.row++,t}renderTableCellPlaceholder(e){let t=this.createElement(`td`,{colSpan:e});return t.style.border=`none`,t}renderTableCell(e){let t=this.renderContainer(e,`td`),n=this.currentCellPosition.col;return e.verticalMerge?e.verticalMerge==`restart`?(this.currentVerticalMerge[n]=t,t.rowSpan=1):this.currentVerticalMerge[n]&&(this.currentVerticalMerge[n].rowSpan+=1,t.style.display=`none`):this.currentVerticalMerge[n]=null,this.renderClass(e,t),this.renderStyleValues(e.cssStyle,t),e.span&&(t.colSpan=e.span),this.currentCellPosition.col+=t.colSpan,t}renderVmlPicture(e){return this.renderContainer(e,`div`)}renderVmlElement(e){var t=this.createSvgElement(`svg`);t.setAttribute(`style`,e.cssStyleText);let n=this.renderVmlChildElement(e);return e.imageHref?.id&&this.tasks.push(this.document?.loadDocumentImage(e.imageHref.id,this.currentPart).then(e=>n.setAttribute(`href`,e))),t.appendChild(n),requestAnimationFrame(()=>{let e=t.firstElementChild.getBBox();t.setAttribute(`width`,`${Math.ceil(e.x+e.width)}`),t.setAttribute(`height`,`${Math.ceil(e.y+e.height)}`)}),t}renderVmlChildElement(e){let t=this.createSvgElement(e.tagName);Object.entries(e.attrs).forEach(([e,n])=>t.setAttribute(e,n));for(let n of e.children)n.type==H.VmlElement?t.appendChild(this.renderVmlChildElement(n)):t.appendChild(...w(this.renderElement(n)));return t}renderMmlRadical(e){let t=e.children.find(e=>e.type==H.MmlBase);if(e.props?.hideDegree)return this.createElementNS(U.mathML,`msqrt`,null,this.renderElements([t]));let n=e.children.find(e=>e.type==H.MmlDegree);return this.createElementNS(U.mathML,`mroot`,null,this.renderElements([t,n]))}renderMmlDelimiter(e){let t=[];return t.push(this.createElementNS(U.mathML,`mo`,null,[e.props.beginChar??`(`])),t.push(...this.renderElements(e.children)),t.push(this.createElementNS(U.mathML,`mo`,null,[e.props.endChar??`)`])),this.createElementNS(U.mathML,`mrow`,null,t)}renderMmlNary(e){let t=[],n=y(e.children,e=>e.type),r=n[H.MmlSuperArgument],i=n[H.MmlSubArgument],a=r?this.createElementNS(U.mathML,`mo`,null,w(this.renderElement(r))):null,o=i?this.createElementNS(U.mathML,`mo`,null,w(this.renderElement(i))):null,s=this.createElementNS(U.mathML,`mo`,null,[e.props?.char??`∫`]);return a||o?t.push(this.createElementNS(U.mathML,`munderover`,null,[s,o,a])):a?t.push(this.createElementNS(U.mathML,`mover`,null,[s,a])):o?t.push(this.createElementNS(U.mathML,`munder`,null,[s,o])):t.push(s),t.push(...this.renderElements(n[H.MmlBase].children)),this.createElementNS(U.mathML,`mrow`,null,t)}renderMmlPreSubSuper(e){let t=[],n=y(e.children,e=>e.type),r=n[H.MmlSuperArgument],i=n[H.MmlSubArgument],a=r?this.createElementNS(U.mathML,`mo`,null,w(this.renderElement(r))):null,o=i?this.createElementNS(U.mathML,`mo`,null,w(this.renderElement(i))):null,s=this.createElementNS(U.mathML,`mo`,null);return t.push(this.createElementNS(U.mathML,`msubsup`,null,[s,o,a])),t.push(...this.renderElements(n[H.MmlBase].children)),this.createElementNS(U.mathML,`mrow`,null,t)}renderMmlGroupChar(e){let t=e.props.verticalJustification===`bot`?`mover`:`munder`,n=this.renderContainerNS(e,U.mathML,t);return e.props.char&&n.appendChild(this.createElementNS(U.mathML,`mo`,null,[e.props.char])),n}renderMmlBar(e){let t=this.renderContainerNS(e,U.mathML,`mrow`);switch(e.props.position){case`top`:t.style.textDecoration=`overline`;break;case`bottom`:t.style.textDecoration=`underline`;break}return t}renderMmlRun(e){let t=this.createElementNS(U.mathML,`ms`,null,this.renderElements(e.children));return this.renderClass(e,t),this.renderStyleValues(e.cssStyle,t),t}renderMllList(e){let t=this.createElementNS(U.mathML,`mtable`);this.renderClass(e,t),this.renderStyleValues(e.cssStyle,t);for(let n of this.renderElements(e.children))t.appendChild(this.createElementNS(U.mathML,`mtr`,null,[this.createElementNS(U.mathML,`mtd`,null,[n])]));return t}renderStyleValues(e,t){for(let n in e)n.startsWith(`$`)?t.setAttribute(n.slice(1),e[n]):t.style[n]=e[n]}renderClass(e,t){e.className&&(t.className=e.className),e.styleName&&t.classList.add(this.processStyleName(e.styleName))}findStyle(e){return e&&this.styleMap?.[e]}numberingClass(e,t){return`${this.className}-num-${e}-${t}`}tabStopClass(){return`${this.className}-tab-stop`}styleToString(e,t,n=null){let r=`${e} {\\r\\n`;for(let e in t)e.startsWith(`$`)||(r+=` ${e}: ${t[e]};\\r\\n`);return n&&(r+=n),r+`}\\r\n`}numberingCounter(e,t){return`${this.className}-num-${e}-${t}`}levelTextToContent(e,t,n,r){return`"${e.replace(/%\\d*/g,e=>{let t=parseInt(e.substring(1),10)-1;return`"counter(${this.numberingCounter(n,t)}, ${r})"`})}${{tab:`\\\\9`,space:`\\\\a0`}[t]??``}"`}numFormatToCssValue(e){return{none:`none`,bullet:`disc`,decimal:`decimal`,lowerLetter:`lower-alpha`,upperLetter:`upper-alpha`,lowerRoman:`lower-roman`,upperRoman:`upper-roman`,decimalZero:`decimal-leading-zero`,aiueo:`katakana`,aiueoFullWidth:`katakana`,chineseCounting:`simp-chinese-informal`,chineseCountingThousand:`simp-chinese-informal`,chineseLegalSimplified:`simp-chinese-formal`,chosung:`hangul-consonant`,ideographDigital:`cjk-ideographic`,ideographTraditional:`cjk-heavenly-stem`,ideographLegalTraditional:`trad-chinese-formal`,ideographZodiac:`cjk-earthly-branch`,iroha:`katakana-iroha`,irohaFullWidth:`katakana-iroha`,japaneseCounting:`japanese-informal`,japaneseDigitalTenThousand:`cjk-decimal`,japaneseLegal:`japanese-formal`,thaiNumbers:`thai`,koreanCounting:`korean-hangul-formal`,koreanDigital:`korean-hangul-formal`,koreanDigital2:`korean-hanja-informal`,hebrew1:`hebrew`,hebrew2:`hebrew`,hindiNumbers:`devanagari`,ganada:`hangul`,taiwaneseCounting:`cjk-ideographic`,taiwaneseCountingThousand:`cjk-ideographic`,taiwaneseDigital:`cjk-decimal`}[e]??e}refreshTabStops(){this.options.experimental&&setTimeout(()=>{let e=wt();for(let t of this.currentTabs)Tt(t.span,t.stops,this.defaultTabSize,e)},500)}createElementNS(e,t,n,r){var i=e?this.htmlDocument.createElementNS(e,t):this.htmlDocument.createElement(t);return Object.assign(i,n),r&&kt(i,r),i}createElement(e,t,n){return this.createElementNS(void 0,e,t,n)}createSvgElement(e,t,n){return this.createElementNS(U.svg,e,t,n)}createStyleElement(e){return this.createElement(`style`,{innerHTML:e})}createComment(e){return this.htmlDocument.createComment(e)}later(e){this.postRenderTasks.push(e)}};function Ot(e){e.innerHTML=``}function kt(e,t){t.forEach(t=>e.appendChild(S(t)?document.createTextNode(t):t))}function At(e,t){for(var n=e.parent;n!=null&&n.type!=t;)n=n.parent;return n}let jt={ignoreHeight:!1,ignoreWidth:!1,ignoreFonts:!1,breakPages:!0,debug:!1,experimental:!1,className:`docx`,inWrapper:!0,hideWrapperOnPrint:!1,trimXmlDeclaration:!0,ignoreLastRenderedPageBreak:!0,renderHeaders:!0,renderFooters:!0,renderFootnotes:!0,renderEndnotes:!0,useBase64URL:!1,renderChanges:!1,renderComments:!1,renderAltChunks:!0};function Mt(e,t){let n={...jt,...t};return rt.load(e,new yt(n),n)}async function Nt(e,t,n,r){let i={...jt,...r};return await new Dt(window.document).render(e,t,n,i)}async function Pt(e,t,n,r){let i=await Mt(e,r);return await Nt(i,t,n,r),i}var Ft=s((e=>{function t(e,t,n){if(n===void 0&&(n=Array.prototype),e&&typeof n.find==`function`)return n.find.call(e,t);for(var i=0;i-1}var _=n({HTML:`http://www.w3.org/1999/xhtml`,SVG:`http://www.w3.org/2000/svg`,XML:`http://www.w3.org/XML/1998/namespace`,XMLNS:`http://www.w3.org/2000/xmlns/`});e.assign=i,e.find=t,e.freeze=n,e.HTML_BOOLEAN_ATTRIBUTES=a,e.HTML_RAW_TEXT_ELEMENTS=l,e.HTML_VOID_ELEMENTS=s,e.hasDefaultHTMLNamespace=p,e.hasOwn=r,e.isHTMLBooleanAttribute=o,e.isHTMLRawTextElement=u,e.isHTMLEscapableRawTextElement=d,e.isHTMLMimeType=f,e.isHTMLVoidElement=c,e.isValidMimeType=g,e.MIME_TYPE=m,e.NAMESPACE=_})),It=s((e=>{var t=Ft();function n(e,t){e.prototype=Object.create(Error.prototype,{constructor:{value:e},name:{value:e.name,enumerable:!0,writable:t}})}var r=t.freeze({Error:`Error`,IndexSizeError:`IndexSizeError`,DomstringSizeError:`DomstringSizeError`,HierarchyRequestError:`HierarchyRequestError`,WrongDocumentError:`WrongDocumentError`,InvalidCharacterError:`InvalidCharacterError`,NoDataAllowedError:`NoDataAllowedError`,NoModificationAllowedError:`NoModificationAllowedError`,NotFoundError:`NotFoundError`,NotSupportedError:`NotSupportedError`,InUseAttributeError:`InUseAttributeError`,InvalidStateError:`InvalidStateError`,SyntaxError:`SyntaxError`,InvalidModificationError:`InvalidModificationError`,NamespaceError:`NamespaceError`,InvalidAccessError:`InvalidAccessError`,ValidationError:`ValidationError`,TypeMismatchError:`TypeMismatchError`,SecurityError:`SecurityError`,NetworkError:`NetworkError`,AbortError:`AbortError`,URLMismatchError:`URLMismatchError`,QuotaExceededError:`QuotaExceededError`,TimeoutError:`TimeoutError`,InvalidNodeTypeError:`InvalidNodeTypeError`,DataCloneError:`DataCloneError`,EncodingError:`EncodingError`,NotReadableError:`NotReadableError`,UnknownError:`UnknownError`,ConstraintError:`ConstraintError`,DataError:`DataError`,TransactionInactiveError:`TransactionInactiveError`,ReadOnlyError:`ReadOnlyError`,VersionError:`VersionError`,OperationError:`OperationError`,NotAllowedError:`NotAllowedError`,OptOutError:`OptOutError`}),i=Object.keys(r);function a(e){return typeof e==`number`&&e>=1&&e<=25}function o(e){return typeof e==`string`&&e.substring(e.length-r.Error.length)===r.Error}function s(e,t){a(e)?(this.name=i[e],this.message=t||``):(this.message=e,this.name=o(t)?t:r.Error),Error.captureStackTrace&&Error.captureStackTrace(this,s)}n(s,!0),Object.defineProperties(s.prototype,{code:{enumerable:!0,get:function(){var e=i.indexOf(this.name);return a(e)?e:0}}});for(var c={INDEX_SIZE_ERR:1,DOMSTRING_SIZE_ERR:2,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,INVALID_CHARACTER_ERR:5,NO_DATA_ALLOWED_ERR:6,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INUSE_ATTRIBUTE_ERR:10,INVALID_STATE_ERR:11,SYNTAX_ERR:12,INVALID_MODIFICATION_ERR:13,NAMESPACE_ERR:14,INVALID_ACCESS_ERR:15,VALIDATION_ERR:16,TYPE_MISMATCH_ERR:17,SECURITY_ERR:18,NETWORK_ERR:19,ABORT_ERR:20,URL_MISMATCH_ERR:21,QUOTA_EXCEEDED_ERR:22,TIMEOUT_ERR:23,INVALID_NODE_TYPE_ERR:24,DATA_CLONE_ERR:25},l=Object.entries(c),u=0;u{function t(e){try{typeof e!=`function`&&(e=RegExp);var t=new e(`𝌆`,`u`).exec(`𝌆`);return!!t&&t[0].length===2}catch{}return!1}var n=t();function r(e){if(e.source[0]!==`[`)throw Error(e+` can not be used with chars`);return e.source.slice(1,e.source.lastIndexOf(`]`))}function i(e,t){if(e.source[0]!==`[`)throw Error(`/`+e.source+`/ can not be used with chars_without`);if(!t||typeof t!=`string`)throw Error(JSON.stringify(t)+` is not a valid search`);if(e.source.indexOf(t)===-1)throw Error(`"`+t+`" is not is /`+e.source+`/`);if(t===`-`&&e.source.indexOf(t)!==1)throw Error(`"`+t+`" is not at the first postion of /`+e.source+`/`);return new RegExp(e.source.replace(t,``),n?`u`:``)}function a(e){var t=this;return new RegExp(Array.prototype.slice.call(arguments).map(function(e){var n=typeof e==`string`;if(n&&t===void 0&&e===`|`)throw Error("use regg instead of reg to wrap expressions with `|`!");return n?e:e.source}).join(``),n?`mu`:`m`)}function o(e){if(arguments.length===0)throw Error(`no parameters provided`);return a.apply(o,[`(?:`].concat(Array.prototype.slice.call(arguments),[`)`]))}var s=`�`,c=/[-\\x09\\x0A\\x0D\\x20-\\x2C\\x2E-\\uD7FF\\uE000-\\uFFFD]/;n&&(c=a(`[`,r(c),`\\\\u{10000}-\\\\u{10FFFF}`,`]`));var l=RegExp(`[^`+r(c)+`]`,n?`u`:``),u=/[\\x20\\x09\\x0D\\x0A]/,d=r(u),f=a(u,`+`),p=a(u,`*`),m=/[:_a-zA-Z\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02FF\\u0370-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]/;n&&(m=a(`[`,r(m),`\\\\u{10000}-\\\\u{10FFFF}`,`]`));var h=a(`[`,r(m),r(/[-.0-9\\xB7]/),r(/[\\u0300-\\u036F\\u203F-\\u2040]/),`]`),g=a(m,h,`*`),_=a(h,`+`),v=o(a(`&`,g,`;`),`|`,o(/&#[0-9]+;|&#x[0-9a-fA-F]+;/)),y=a(`%`,g,`;`),b=o(a(`"`,o(/[^%&"]/,`|`,y,`|`,v),`*`,`"`),`|`,a(`\'`,o(/[^%&\']/,`|`,y,`|`,v),`*`,`\'`)),x=o(`"`,o(/[^<&"]/,`|`,v),`*`,`"`,`|`,`\'`,o(/[^<&\']/,`|`,v),`*`,`\'`),S=a(i(m,`:`),i(h,`:`),`*`),C=a(S,o(`:`,S),`?`),w=a(`^`,C,`$`),T=a(`(`,C,`)`),E=o(/"[^"]*"|\'[^\']*\'/),D=a(/^<\\?/,`(`,g,`)`,o(f,`(`,c,`*?)`),`?`,/\\?>/),O=/[\\x20\\x0D\\x0Aa-zA-Z0-9-\'()+,./:=?;!*#@$_%]/,k=o(`"`,O,`*"`,`|`,`\'`,i(O,`\'`),`*\'`),A=``,M=a(A,o(i(c,`-`),`|`,a(`-`,i(c,`-`))),`*`,j),ee=`#PCDATA`,te=o(`EMPTY`,`|`,`ANY`,`|`,o(a(/\\(/,p,ee,o(p,/\\|/,p,C),`*`,p,/\\)\\*/),`|`,a(/\\(/,p,ee,p,/\\)/)),`|`,a(/\\([^>]+\\)/,/[?*+]?/)),N=a(``),P=a(``),F=`about:legacy-compat`,I=o(`"`+F+`"`,`|`,`\'`+F+`\'`),L=`SYSTEM`,R=`PUBLIC`,z=o(o(L,f,E),`|`,o(R,f,k,f,E)),ne=a(`^`,o(o(L,f,`(?`,E,`)`),`|`,o(R,f,`(?`,k,`)`,f,`(?`,E,`)`))),B=a(`^`,k,`$`),re=a(`^`,E,`$`),ie=o(b,`|`,o(z,o(f,`NDATA`,f,g),`?`)),ae=``),`|`,a(ae,f,`%`,f,g,f,o(b,`|`,z),p,`>`)),se=a(``),V=a(p,`=`,p),ce=/1[.]\\d+/,le=a(f,`version`,V,o(`\'`,ce,`\'`,`|`,`"`,ce,`"`)),ue=/[A-Za-z][-A-Za-z0-9._]*/,de=a(/^<\\?xml/,le,o(f,`encoding`,V,o(`"`,ue,`"`,`|`,`\'`,ue,`\'`)),`?`,o(f,`standalone`,V,o(`\'`,o(`yes`,`|`,`no`),`\'`,`|`,`"`,o(`yes`,`|`,`no`),`"`)),`?`,p,/\\?>/),fe=``,he=a(//));e.chars=r,e.chars_without=i,e.detectUnicodeSupport=t,e.reg=a,e.regg=o,e.ABOUT_LEGACY_COMPAT=F,e.ABOUT_LEGACY_COMPAT_SystemLiteral=I,e.AttlistDecl=P,e.CDATA_START=pe,e.CDATA_END=me,e.CDSect=he,e.Char=c,e.Comment=M,e.COMMENT_START=A,e.COMMENT_END=j,e.DOCTYPE_DECL_START=fe,e.elementdecl=N,e.EntityDecl=oe,e.EntityValue=b,e.ExternalID=z,e.ExternalID_match=ne,e.Name=g,e.NotationDecl=se,e.Reference=v,e.PEReference=y,e.PI=D,e.PUBLIC=R,e.PubidLiteral=k,e.PubidLiteral_match=B,e.QName=C,e.QName_exact=w,e.QName_group=T,e.S=f,e.SChar_s=d,e.S_OPT=p,e.SYSTEM=L,e.SystemLiteral=E,e.SystemLiteral_match=re,e.InvalidChar=l,e.UNICODE_REPLACEMENT_CHARACTER=s,e.UNICODE_SUPPORT=n,e.XMLDecl=de})),Rt=s((e=>{var t=Ft(),n=t.find,r=t.hasDefaultHTMLNamespace,i=t.hasOwn,a=t.isHTMLMimeType,o=t.isHTMLRawTextElement,s=t.isHTMLVoidElement,c=t.MIME_TYPE,l=t.NAMESPACE,u=Symbol(),d=It(),f=d.DOMException,p=d.DOMExceptionName,m=Lt();function h(e){if(e!==u)throw TypeError(`Illegal constructor`)}function g(e){return e!==``}function _(e){return e?e.split(/[\\t\\n\\f\\r ]+/).filter(g):[]}function v(e,t){return i(e,t)||(e[t]=!0),e}function y(e){if(!e)return[];var t=_(e);return Object.keys(t.reduce(v,{}))}function b(e){return function(t){return e&&e.indexOf(t)!==-1}}function x(e){if(!m.QName_exact.test(e))throw new f(f.INVALID_CHARACTER_ERR,`invalid character in qualified name "`+e+`"`)}function S(e,n){x(n),e||=null;var r=null,i=n;if(n.indexOf(`:`)>=0){var a=n.split(`:`);r=a[0],i=a[1]}if(r!==null&&e===null)throw new f(f.NAMESPACE_ERR,`prefix is non-null and namespace is null`);if(r===`xml`&&e!==t.NAMESPACE.XML)throw new f(f.NAMESPACE_ERR,`prefix is "xml" and namespace is not the XML namespace`);if((r===`xmlns`||n===`xmlns`)&&e!==t.NAMESPACE.XMLNS)throw new f(f.NAMESPACE_ERR,`either qualifiedName or prefix is "xmlns" and namespace is not the XMLNS namespace`);if(e===t.NAMESPACE.XMLNS&&r!==`xmlns`&&n!==`xmlns`)throw new f(f.NAMESPACE_ERR,`namespace is the XMLNS namespace and neither qualifiedName nor prefix is "xmlns"`);return[e,r,i]}function C(e,t){for(var n in e)i(e,n)&&(t[n]=e[n])}function w(e,t){var n=e.prototype;if(!(n instanceof t)){function r(){}r.prototype=t.prototype,r=new r,C(n,r),e.prototype=n=r}n.constructor!=e&&(typeof e!=`function`&&console.error(`unknown Class:`+e),n.constructor=e)}var T={},E=T.ELEMENT_NODE=1,D=T.ATTRIBUTE_NODE=2,O=T.TEXT_NODE=3,k=T.CDATA_SECTION_NODE=4,A=T.ENTITY_REFERENCE_NODE=5,j=T.ENTITY_NODE=6,M=T.PROCESSING_INSTRUCTION_NODE=7,ee=T.COMMENT_NODE=8,te=T.DOCUMENT_NODE=9,N=T.DOCUMENT_TYPE_NODE=10,P=T.DOCUMENT_FRAGMENT_NODE=11,F=T.NOTATION_NODE=12,I=t.freeze({DOCUMENT_POSITION_DISCONNECTED:1,DOCUMENT_POSITION_PRECEDING:2,DOCUMENT_POSITION_FOLLOWING:4,DOCUMENT_POSITION_CONTAINS:8,DOCUMENT_POSITION_CONTAINED_BY:16,DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:32});function L(e,t){if(t.length=0&&e=0){for(var i=t.length-1;r<=i;)t[r]=t[++r];if(t.length=i,e){var a=e.ownerDocument;a&&pe(a,e,n),n.ownerElement=null}}}re.prototype={length:0,item:z.prototype.item,getNamedItem:function(e){this._ownerElement&&this._ownerElement._isInHTMLDocumentAndNamespace()&&(e=e.toLowerCase());for(var t=0;t0;){var n=t.pop(),r=n.node,i=n.other;if(r.nodeType!==i.nodeType)return!1;switch(r.nodeType){case r.DOCUMENT_TYPE_NODE:if(r.name!==i.name||r.publicId!==i.publicId||r.systemId!==i.systemId)return!1;break;case r.ELEMENT_NODE:if(r.namespaceURI!==i.namespaceURI||r.prefix!==i.prefix||r.localName!==i.localName||r.attributes.length!==i.attributes.length)return!1;for(var a=0;a=0;a--)t.push({node:r.childNodes[a],other:i.childNodes[a]})}return!0},isSameNode:function(e){return this===e},insertBefore:function(e,t){return H(this,e,t)},replaceChild:function(e,t){H(this,e,t,Te),t&&this.removeChild(t)},removeChild:function(e){return he(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(e){return We(this.ownerDocument||this,this,e)},normalize:function(){ue(this,null,{enter:function(e){for(var t=e.firstChild;t;){var n=t.nextSibling;n!==null&&n.nodeType===O&&t.nodeType===O?(e.removeChild(n),t.appendData(n.data)):t=n}return!0}})},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},lookupPrefix:function(e){for(var t=this;t;){var n=t._nsMap;if(n){for(var r in n)if(i(n,r)&&n[r]===e)return r}t=t.nodeType==D?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&i(n,e))return n[e];t=t.nodeType==D?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return this.lookupPrefix(e)==null},compareDocumentPosition:function(e){if(this===e)return 0;var t=e,n=this,r=null,i=null;if(t instanceof De&&(r=t,t=r.ownerElement),n instanceof De&&(i=n,n=i.ownerElement,r&&t&&n===t))for(var a=0,o;o=n.attributes[a];a++){if(o===r)return I.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+I.DOCUMENT_POSITION_PRECEDING;if(o===i)return I.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+I.DOCUMENT_POSITION_FOLLOWING}if(!t||!n||n.ownerDocument!==t.ownerDocument)return I.DOCUMENT_POSITION_DISCONNECTED+I.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+(R(n.ownerDocument)>R(t.ownerDocument)?I.DOCUMENT_POSITION_FOLLOWING:I.DOCUMENT_POSITION_PRECEDING);if(i&&t===n)return I.DOCUMENT_POSITION_CONTAINS+I.DOCUMENT_POSITION_PRECEDING;if(r&&t===n)return I.DOCUMENT_POSITION_CONTAINED_BY+I.DOCUMENT_POSITION_FOLLOWING;for(var s=[],c=t.parentNode;c;){if(!i&&c===n)return I.DOCUMENT_POSITION_CONTAINED_BY+I.DOCUMENT_POSITION_FOLLOWING;s.push(c),c=c.parentNode}s.reverse();for(var l=[],u=n.parentNode;u;){if(!r&&u===t)return I.DOCUMENT_POSITION_CONTAINS+I.DOCUMENT_POSITION_PRECEDING;l.push(u),u=u.parentNode}l.reverse();var d=L(s,l);for(var f in d.childNodes){var p=d.childNodes[f];if(p===n)return I.DOCUMENT_POSITION_FOLLOWING;if(p===t)return I.DOCUMENT_POSITION_PRECEDING;if(l.indexOf(p)>=0)return I.DOCUMENT_POSITION_FOLLOWING;if(s.indexOf(p)>=0)return I.DOCUMENT_POSITION_PRECEDING}return 0}};function ce(e){return e==`<`&&`<`||e==`>`&&`>`||e==`&`&&`&`||e==`"`&&`"`||`&#`+e.charCodeAt()+`;`}C(T,V),C(T,V.prototype),C(I,V),C(I,V.prototype);function le(e,t){ue(e,null,{enter:function(e){return t(e)?ue.STOP:!0}})}function ue(e,t,n){for(var r=[{node:e,context:t,phase:ue.ENTER}];r.length>0;){var i=r.pop();if(i.phase===ue.ENTER){var a=n.enter(i.node,i.context);if(a===ue.STOP)return ue.STOP;if(r.push({node:i.node,context:a,phase:ue.EXIT}),a==null)continue;for(var o=i.node.lastChild;o;)r.push({node:o,context:a,phase:ue.ENTER}),o=o.previousSibling}else n.exit&&n.exit(i.node,i.context)}}ue.STOP=Symbol(`walkDOM.STOP`),ue.ENTER=0,ue.EXIT=1;function de(e,t){h(e);var n=t||{};this.ownerDocument=this,this.contentType=n.contentType||c.XML_APPLICATION,this.type=a(this.contentType)?`html`:`xml`}function fe(e,t,n){e&&e._inc++,n.namespaceURI===l.XMLNS&&(t._nsMap[n.prefix?n.localName:``]=n.value)}function pe(e,t,n,r){e&&e._inc++,n.namespaceURI===l.XMLNS&&delete t._nsMap[n.prefix?n.localName:``]}function me(e,t,n){if(e&&e._inc){e._inc++;var r=t.childNodes;if(n&&!n.nextSibling)r[r.length++]=n;else{for(var i=t.firstChild,a=0;i;)r[a++]=i,i=i.nextSibling;r.length=a,delete r[r.length]}}}function he(e,t){if(e!==t.parentNode)throw new f(f.NOT_FOUND_ERR,`child\'s parent is not parent`);var n=t.previousSibling,r=t.nextSibling;return n?n.nextSibling=r:e.firstChild=r,r?r.previousSibling=n:e.lastChild=n,me(e.ownerDocument,e),t.parentNode=null,t.previousSibling=null,t.nextSibling=null,t}function ge(e){return e&&(e.nodeType===V.DOCUMENT_NODE||e.nodeType===V.DOCUMENT_FRAGMENT_NODE||e.nodeType===V.ELEMENT_NODE)}function _e(e){return e&&(e.nodeType===V.CDATA_SECTION_NODE||e.nodeType===V.COMMENT_NODE||e.nodeType===V.DOCUMENT_FRAGMENT_NODE||e.nodeType===V.DOCUMENT_TYPE_NODE||e.nodeType===V.ELEMENT_NODE||e.nodeType===V.PROCESSING_INSTRUCTION_NODE||e.nodeType===V.TEXT_NODE)}function ve(e){return e&&e.nodeType===V.DOCUMENT_TYPE_NODE}function ye(e){return e&&e.nodeType===V.ELEMENT_NODE}function be(e){return e&&e.nodeType===V.TEXT_NODE}function xe(e,t){var r=e.childNodes||[];if(n(r,ye)||ve(t))return!1;var i=n(r,ve);return!(t&&i&&r.indexOf(i)>r.indexOf(t))}function Se(e,t){var r=e.childNodes||[];function i(e){return ye(e)&&e!==t}if(n(r,i))return!1;var a=n(r,ve);return!(t&&a&&r.indexOf(a)>r.indexOf(t))}function Ce(e,t,n){if(!ge(e))throw new f(f.HIERARCHY_REQUEST_ERR,`Unexpected parent node type `+e.nodeType);if(n&&n.parentNode!==e)throw new f(f.NOT_FOUND_ERR,`child not in parent`);if(!_e(t)||ve(t)&&e.nodeType!==V.DOCUMENT_NODE)throw new f(f.HIERARCHY_REQUEST_ERR,`Unexpected node type `+t.nodeType+` for parent node type `+e.nodeType)}function we(e,t,r){var i=e.childNodes||[],a=t.childNodes||[];if(t.nodeType===V.DOCUMENT_FRAGMENT_NODE){var o=a.filter(ye);if(o.length>1||n(a,be))throw new f(f.HIERARCHY_REQUEST_ERR,`More than one element or text in fragment`);if(o.length===1&&!xe(e,r))throw new f(f.HIERARCHY_REQUEST_ERR,`Element in fragment can not be inserted before doctype`)}if(ye(t)&&!xe(e,r))throw new f(f.HIERARCHY_REQUEST_ERR,`Only one element can be added and only after doctype`);if(ve(t)){if(n(i,ve))throw new f(f.HIERARCHY_REQUEST_ERR,`Only one doctype is allowed`);var s=n(i,ye);if(r&&i.indexOf(s)1||n(a,be))throw new f(f.HIERARCHY_REQUEST_ERR,`More than one element or text in fragment`);if(o.length===1&&!Se(e,r))throw new f(f.HIERARCHY_REQUEST_ERR,`Element in fragment can not be inserted before doctype`)}if(ye(t)&&!Se(e,r))throw new f(f.HIERARCHY_REQUEST_ERR,`Only one element can be added and only after doctype`);if(ve(t)){function s(e){return ve(e)&&e!==r}if(n(i,s))throw new f(f.HIERARCHY_REQUEST_ERR,`Only one doctype is allowed`);var c=n(i,ye);if(r&&i.indexOf(c)`)!==-1)throw new f(f.INVALID_CHARACTER_ERR,`data contains "]]>"`);var t=new je(u);return t.ownerDocument=this,t.childNodes=new z,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new Le(u);return n.ownerDocument=this,n.childNodes=new z,n.nodeName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){if(!m.QName_exact.test(e))throw new f(f.INVALID_CHARACTER_ERR,`invalid character in name "`+e+`"`);return this.type===`html`&&(e=e.toLowerCase()),this._createAttribute(e)},_createAttribute:function(e){var t=new De(u);return t.ownerDocument=this,t.childNodes=new z,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){if(!m.Name.test(e))throw new f(f.INVALID_CHARACTER_ERR,`not a valid xml name "`+e+`"`);if(this.type===`html`)throw new f(`document is an html document`,p.NotSupportedError);var t=new Fe(u);return t.ownerDocument=this,t.childNodes=new z,t.nodeName=e,t},createElementNS:function(e,t){var n=S(e,t),r=new Ee(u),i=r.attributes=new re;return r.childNodes=new z,r.ownerDocument=this,r.nodeName=t,r.tagName=t,r.namespaceURI=n[0],r.prefix=n[1],r.localName=n[2],i._ownerElement=r,r},createAttributeNS:function(e,t){var n=S(e,t),r=new De(u);return r.ownerDocument=this,r.childNodes=new z,r.nodeName=t,r.name=t,r.specified=!0,r.namespaceURI=n[0],r.prefix=n[1],r.localName=n[2],r}},w(de,V);function Ee(e){h(e),this._nsMap=Object.create(null)}Ee.prototype={nodeType:E,attributes:null,getQualifiedName:function(){return this.prefix?this.prefix+`:`+this.localName:this.localName},_isInHTMLDocumentAndNamespace:function(){return this.ownerDocument.type===`html`&&this.namespaceURI===l.HTML},hasAttributes:function(){return!!(this.attributes&&this.attributes.length)},hasAttribute:function(e){return!!this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t?t.value:null},getAttributeNode:function(e){return this._isInHTMLDocumentAndNamespace()&&(e=e.toLowerCase()),this.attributes.getNamedItem(e)},setAttribute:function(e,t){this._isInHTMLDocumentAndNamespace()&&(e=e.toLowerCase());var n=this.getAttributeNode(e);n?n.value=n.nodeValue=``+t:(n=this.ownerDocument._createAttribute(e),n.value=n.nodeValue=``+t,this.setAttributeNode(n))},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n)},hasAttributeNS:function(e,t){return this.getAttributeNodeNS(e,t)!=null},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n?n.value:null},setAttributeNS:function(e,t,n){var r=S(e,t)[2],i=this.getAttributeNodeNS(e,r);i?i.value=i.nodeValue=``+n:(i=this.ownerDocument.createAttributeNS(e,t),i.value=i.nodeValue=``+n,this.setAttributeNode(i))},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByClassName:function(e){var t=y(e);return new ne(this,function(n){var r=[];return t.length>0&&le(n,function(i){if(i!==n&&i.nodeType===E){var a=i.getAttribute(`class`);if(a){var o=e===a;if(!o){var s=y(a);o=t.every(b(s))}o&&r.push(i)}}}),r})},getElementsByTagName:function(e){var t=(this.nodeType===te?this:this.ownerDocument).type===`html`,n=e.toLowerCase();return new ne(this,function(r){var i=[];return le(r,function(a){a===r||a.nodeType!==E||(e===`*`||a.getQualifiedName()===(t&&a.namespaceURI===l.HTML?n:e))&&i.push(a)}),i})},getElementsByTagNameNS:function(e,t){return new ne(this,function(n){var r=[];return le(n,function(i){i!==n&&i.nodeType===E&&(e===`*`||i.namespaceURI===e)&&(t===`*`||i.localName==t)&&r.push(i)}),r})}},de.prototype.getElementsByClassName=Ee.prototype.getElementsByClassName,de.prototype.getElementsByTagName=Ee.prototype.getElementsByTagName,de.prototype.getElementsByTagNameNS=Ee.prototype.getElementsByTagNameNS,w(Ee,V);function De(e){h(e),this.namespaceURI=null,this.prefix=null,this.ownerElement=null}De.prototype.nodeType=D,w(De,V);function Oe(e){h(e)}Oe.prototype={data:``,substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},deleteData:function(e,t){this.replaceData(e,t,``)},replaceData:function(e,t,n){var r=this.data.substring(0,e),i=this.data.substring(e+t);n=r+n+i,this.nodeValue=this.data=n,this.length=n.length}},w(Oe,V);function ke(e){h(e)}ke.prototype={nodeName:`#text`,nodeType:O,splitText:function(e){var t=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var r=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}},w(ke,Oe);function Ae(e){h(e)}Ae.prototype={nodeName:`#comment`,nodeType:ee},w(Ae,Oe);function je(e){h(e)}je.prototype={nodeName:`#cdata-section`,nodeType:k},w(je,ke);function Me(e){h(e)}Me.prototype.nodeType=N,w(Me,V);function Ne(e){h(e)}Ne.prototype.nodeType=F,w(Ne,V);function Pe(e){h(e)}Pe.prototype.nodeType=j,w(Pe,V);function Fe(e){h(e)}Fe.prototype.nodeType=A,w(Fe,V);function Ie(e){h(e)}Ie.prototype.nodeName=`#document-fragment`,Ie.prototype.nodeType=P,w(Ie,V);function Le(e){h(e)}Le.prototype.nodeType=M,w(Le,Oe);function Re(){}Re.prototype.serializeToString=function(e,t){return ze.call(e,t)},V.prototype.toString=ze;function ze(e){var t=typeof e==`function`?{requireWellFormed:!1,splitCDATASections:!0,nodeFilter:e}:e==null?{requireWellFormed:!1,splitCDATASections:!0,nodeFilter:null}:{requireWellFormed:!!e.requireWellFormed,splitCDATASections:e.splitCDATASections!==!1,nodeFilter:e.nodeFilter||null},n=[],r=this.nodeType===te&&this.documentElement||this,i=r.prefix,a=r.namespaceURI;if(a&&i==null){var i=r.lookupPrefix(a);if(i==null)var o=[{namespace:a,prefix:null}]}return He(this,n,o,t),n.join(``)}function Be(e,t,n){var r=e.prefix||``,i=e.namespaceURI;if(!i||r===`xml`&&i===l.XML||i===l.XMLNS)return!1;for(var a=n.length;a--;){var o=n[a];if(o.prefix===r)return o.namespace!==i}return!0}function Ve(e,t,n){e.push(` `,t,`="`,n.replace(/[<>&"\\t\\n\\r]/g,ce),`"`)}function He(e,t,n,r){n||=[];var i=r.nodeFilter,a=r.requireWellFormed,c=r.splitCDATASections,u=(e.nodeType===te?e:e.ownerDocument).type===`html`;ue(e,{ns:n},{enter:function(e,n){var d=n.ns;if(i)if(e=i(e),e){if(typeof e==`string`)return t.push(e),null}else return null;switch(e.nodeType){case E:var h=e.attributes,g=h.length,_=e.tagName,v=_;if(!u&&!e.prefix&&e.namespaceURI){for(var y,b=0;b=0;x--){var S=d[x];if(S.prefix===``&&S.namespace===e.namespaceURI){y=S.namespace;break}}if(y!==e.namespaceURI)for(var x=d.length-1;x>=0;x--){var S=d[x];if(S.namespace===e.namespaceURI){S.prefix&&(v=S.prefix+`:`+_);break}}}t.push(`<`,v);for(var C=d.slice(),w=0;w`),null;if(t.push(`>`),u&&o(_)){for(var z=e.firstChild;z;)z.data?t.push(z.data):He(z,t,C.slice(),r),z=z.nextSibling;return t.push(``),null}return{ns:C,tag:v};case te:case P:if(a&&e.nodeType===te&&e.documentElement==null)throw new f(`The Document has no documentElement`,p.InvalidStateError);return{ns:d};case D:return Ve(t,e.name,e.value),null;case O:if(a&&m.InvalidChar.test(e.data))throw new f(`The Text node data contains characters outside the XML Char production`,p.InvalidStateError);return t.push(e.data.replace(/[<&>]/g,ce)),null;case k:if(a&&e.data.indexOf(`]]>`)!==-1)throw new f(`The CDATASection data contains "]]>"`,p.InvalidStateError);return c?t.push(m.CDATA_START,e.data.replace(/]]>/g,`]]]]>`),m.CDATA_END):t.push(m.CDATA_START,e.data,m.CDATA_END),null;case ee:if(a){if(m.InvalidChar.test(e.data))throw new f(`The comment node data contains characters outside the XML Char production`,p.InvalidStateError);if(e.data.indexOf(`--`)!==-1||e.data[e.data.length-1]===`-`)throw new f(`The comment node data contains "--" or ends with "-"`,p.InvalidStateError)}return t.push(m.COMMENT_START,e.data,m.COMMENT_END),null;case N:var ne=e.publicId,B=e.systemId;if(a){if(ne&&!m.PubidLiteral_match.test(ne))throw new f(`DocumentType publicId is not a valid PubidLiteral`,p.InvalidStateError);if(B&&B!==`.`&&!m.SystemLiteral_match.test(B))throw new f(`DocumentType systemId is not a valid SystemLiteral`,p.InvalidStateError);if(e.internalSubset&&e.internalSubset.indexOf(`]>`)!==-1)throw new f(`DocumentType internalSubset contains "]>"`,p.InvalidStateError)}return t.push(m.DOCTYPE_DECL_START,` `,e.name),ne?(t.push(` `,m.PUBLIC,` `,ne),B&&B!==`.`&&t.push(` `,B)):B&&B!==`.`&&t.push(` `,m.SYSTEM,` `,B),e.internalSubset&&t.push(` [`,e.internalSubset,`]`),t.push(`>`),null;case M:if(a){if(e.target.indexOf(`:`)!==-1||e.target.toLowerCase()===`xml`)throw new f(`The ProcessingInstruction target is not well-formed`,p.InvalidStateError);if(m.InvalidChar.test(e.data))throw new f(`The ProcessingInstruction data contains characters outside the XML Char production`,p.InvalidStateError);if(e.data.indexOf(`?>`)!==-1)throw new f(`The ProcessingInstruction data contains "?>"`,p.InvalidStateError)}return t.push(``),null;case A:return t.push(`&`,e.nodeName,`;`),null;default:return t.push(`??`,e.nodeName),null}},exit:function(e,n){n&&n.tag&&t.push(``)}})}function Ue(e,t,n){var r;return ue(t,null,{enter:function(t,i){var a=t.cloneNode(!1);return a.ownerDocument=e,a.parentNode=null,i===null?r=a:i.appendChild(a),t.nodeType===D||n?a:null}}),r}function We(e,t,n){var r;return ue(t,null,{enter:function(t,a){var o=new t.constructor(u);for(var s in t)if(i(t,s)){var c=t[s];typeof c!=`object`&&c!=o[s]&&(o[s]=c)}t.childNodes&&(o.childNodes=new z),o.ownerDocument=e;var l=n;switch(o.nodeType){case E:var d=t.attributes,f=o.attributes=new re,p=d.length;f._ownerElement=o;for(var m=0;m{var t=Ft().freeze;e.XML_ENTITIES=t({amp:`&`,apos:`\'`,gt:`>`,lt:`<`,quot:`"`}),e.HTML_ENTITIES=t({Aacute:`Á`,aacute:`á`,Abreve:`Ă`,abreve:`ă`,ac:`∾`,acd:`∿`,acE:`∾̳`,Acirc:`Â`,acirc:`â`,acute:`´`,Acy:`А`,acy:`а`,AElig:`Æ`,aelig:`æ`,af:`⁡`,Afr:`𝔄`,afr:`𝔞`,Agrave:`À`,agrave:`à`,alefsym:`ℵ`,aleph:`ℵ`,Alpha:`Α`,alpha:`α`,Amacr:`Ā`,amacr:`ā`,amalg:`⨿`,AMP:`&`,amp:`&`,And:`⩓`,and:`∧`,andand:`⩕`,andd:`⩜`,andslope:`⩘`,andv:`⩚`,ang:`∠`,ange:`⦤`,angle:`∠`,angmsd:`∡`,angmsdaa:`⦨`,angmsdab:`⦩`,angmsdac:`⦪`,angmsdad:`⦫`,angmsdae:`⦬`,angmsdaf:`⦭`,angmsdag:`⦮`,angmsdah:`⦯`,angrt:`∟`,angrtvb:`⊾`,angrtvbd:`⦝`,angsph:`∢`,angst:`Å`,angzarr:`⍼`,Aogon:`Ą`,aogon:`ą`,Aopf:`𝔸`,aopf:`𝕒`,ap:`≈`,apacir:`⩯`,apE:`⩰`,ape:`≊`,apid:`≋`,apos:`\'`,ApplyFunction:`⁡`,approx:`≈`,approxeq:`≊`,Aring:`Å`,aring:`å`,Ascr:`𝒜`,ascr:`𝒶`,Assign:`≔`,ast:`*`,asymp:`≈`,asympeq:`≍`,Atilde:`Ã`,atilde:`ã`,Auml:`Ä`,auml:`ä`,awconint:`∳`,awint:`⨑`,backcong:`≌`,backepsilon:`϶`,backprime:`‵`,backsim:`∽`,backsimeq:`⋍`,Backslash:`∖`,Barv:`⫧`,barvee:`⊽`,Barwed:`⌆`,barwed:`⌅`,barwedge:`⌅`,bbrk:`⎵`,bbrktbrk:`⎶`,bcong:`≌`,Bcy:`Б`,bcy:`б`,bdquo:`„`,becaus:`∵`,Because:`∵`,because:`∵`,bemptyv:`⦰`,bepsi:`϶`,bernou:`ℬ`,Bernoullis:`ℬ`,Beta:`Β`,beta:`β`,beth:`ℶ`,between:`≬`,Bfr:`𝔅`,bfr:`𝔟`,bigcap:`⋂`,bigcirc:`◯`,bigcup:`⋃`,bigodot:`⨀`,bigoplus:`⨁`,bigotimes:`⨂`,bigsqcup:`⨆`,bigstar:`★`,bigtriangledown:`▽`,bigtriangleup:`△`,biguplus:`⨄`,bigvee:`⋁`,bigwedge:`⋀`,bkarow:`⤍`,blacklozenge:`⧫`,blacksquare:`▪`,blacktriangle:`▴`,blacktriangledown:`▾`,blacktriangleleft:`◂`,blacktriangleright:`▸`,blank:`␣`,blk12:`▒`,blk14:`░`,blk34:`▓`,block:`█`,bne:`=⃥`,bnequiv:`≡⃥`,bNot:`⫭`,bnot:`⌐`,Bopf:`𝔹`,bopf:`𝕓`,bot:`⊥`,bottom:`⊥`,bowtie:`⋈`,boxbox:`⧉`,boxDL:`╗`,boxDl:`╖`,boxdL:`╕`,boxdl:`┐`,boxDR:`╔`,boxDr:`╓`,boxdR:`╒`,boxdr:`┌`,boxH:`═`,boxh:`─`,boxHD:`╦`,boxHd:`╤`,boxhD:`╥`,boxhd:`┬`,boxHU:`╩`,boxHu:`╧`,boxhU:`╨`,boxhu:`┴`,boxminus:`⊟`,boxplus:`⊞`,boxtimes:`⊠`,boxUL:`╝`,boxUl:`╜`,boxuL:`╛`,boxul:`┘`,boxUR:`╚`,boxUr:`╙`,boxuR:`╘`,boxur:`└`,boxV:`║`,boxv:`│`,boxVH:`╬`,boxVh:`╫`,boxvH:`╪`,boxvh:`┼`,boxVL:`╣`,boxVl:`╢`,boxvL:`╡`,boxvl:`┤`,boxVR:`╠`,boxVr:`╟`,boxvR:`╞`,boxvr:`├`,bprime:`‵`,Breve:`˘`,breve:`˘`,brvbar:`¦`,Bscr:`ℬ`,bscr:`𝒷`,bsemi:`⁏`,bsim:`∽`,bsime:`⋍`,bsol:`\\\\`,bsolb:`⧅`,bsolhsub:`⟈`,bull:`•`,bullet:`•`,bump:`≎`,bumpE:`⪮`,bumpe:`≏`,Bumpeq:`≎`,bumpeq:`≏`,Cacute:`Ć`,cacute:`ć`,Cap:`⋒`,cap:`∩`,capand:`⩄`,capbrcup:`⩉`,capcap:`⩋`,capcup:`⩇`,capdot:`⩀`,CapitalDifferentialD:`ⅅ`,caps:`∩︀`,caret:`⁁`,caron:`ˇ`,Cayleys:`ℭ`,ccaps:`⩍`,Ccaron:`Č`,ccaron:`č`,Ccedil:`Ç`,ccedil:`ç`,Ccirc:`Ĉ`,ccirc:`ĉ`,Cconint:`∰`,ccups:`⩌`,ccupssm:`⩐`,Cdot:`Ċ`,cdot:`ċ`,cedil:`¸`,Cedilla:`¸`,cemptyv:`⦲`,cent:`¢`,CenterDot:`·`,centerdot:`·`,Cfr:`ℭ`,cfr:`𝔠`,CHcy:`Ч`,chcy:`ч`,check:`✓`,checkmark:`✓`,Chi:`Χ`,chi:`χ`,cir:`○`,circ:`ˆ`,circeq:`≗`,circlearrowleft:`↺`,circlearrowright:`↻`,circledast:`⊛`,circledcirc:`⊚`,circleddash:`⊝`,CircleDot:`⊙`,circledR:`®`,circledS:`Ⓢ`,CircleMinus:`⊖`,CirclePlus:`⊕`,CircleTimes:`⊗`,cirE:`⧃`,cire:`≗`,cirfnint:`⨐`,cirmid:`⫯`,cirscir:`⧂`,ClockwiseContourIntegral:`∲`,CloseCurlyDoubleQuote:`”`,CloseCurlyQuote:`’`,clubs:`♣`,clubsuit:`♣`,Colon:`∷`,colon:`:`,Colone:`⩴`,colone:`≔`,coloneq:`≔`,comma:`,`,commat:`@`,comp:`∁`,compfn:`∘`,complement:`∁`,complexes:`ℂ`,cong:`≅`,congdot:`⩭`,Congruent:`≡`,Conint:`∯`,conint:`∮`,ContourIntegral:`∮`,Copf:`ℂ`,copf:`𝕔`,coprod:`∐`,Coproduct:`∐`,COPY:`©`,copy:`©`,copysr:`℗`,CounterClockwiseContourIntegral:`∳`,crarr:`↵`,Cross:`⨯`,cross:`✗`,Cscr:`𝒞`,cscr:`𝒸`,csub:`⫏`,csube:`⫑`,csup:`⫐`,csupe:`⫒`,ctdot:`⋯`,cudarrl:`⤸`,cudarrr:`⤵`,cuepr:`⋞`,cuesc:`⋟`,cularr:`↶`,cularrp:`⤽`,Cup:`⋓`,cup:`∪`,cupbrcap:`⩈`,CupCap:`≍`,cupcap:`⩆`,cupcup:`⩊`,cupdot:`⊍`,cupor:`⩅`,cups:`∪︀`,curarr:`↷`,curarrm:`⤼`,curlyeqprec:`⋞`,curlyeqsucc:`⋟`,curlyvee:`⋎`,curlywedge:`⋏`,curren:`¤`,curvearrowleft:`↶`,curvearrowright:`↷`,cuvee:`⋎`,cuwed:`⋏`,cwconint:`∲`,cwint:`∱`,cylcty:`⌭`,Dagger:`‡`,dagger:`†`,daleth:`ℸ`,Darr:`↡`,dArr:`⇓`,darr:`↓`,dash:`‐`,Dashv:`⫤`,dashv:`⊣`,dbkarow:`⤏`,dblac:`˝`,Dcaron:`Ď`,dcaron:`ď`,Dcy:`Д`,dcy:`д`,DD:`ⅅ`,dd:`ⅆ`,ddagger:`‡`,ddarr:`⇊`,DDotrahd:`⤑`,ddotseq:`⩷`,deg:`°`,Del:`∇`,Delta:`Δ`,delta:`δ`,demptyv:`⦱`,dfisht:`⥿`,Dfr:`𝔇`,dfr:`𝔡`,dHar:`⥥`,dharl:`⇃`,dharr:`⇂`,DiacriticalAcute:`´`,DiacriticalDot:`˙`,DiacriticalDoubleAcute:`˝`,DiacriticalGrave:"`",DiacriticalTilde:`˜`,diam:`⋄`,Diamond:`⋄`,diamond:`⋄`,diamondsuit:`♦`,diams:`♦`,die:`¨`,DifferentialD:`ⅆ`,digamma:`ϝ`,disin:`⋲`,div:`÷`,divide:`÷`,divideontimes:`⋇`,divonx:`⋇`,DJcy:`Ђ`,djcy:`ђ`,dlcorn:`⌞`,dlcrop:`⌍`,dollar:`$`,Dopf:`𝔻`,dopf:`𝕕`,Dot:`¨`,dot:`˙`,DotDot:`⃜`,doteq:`≐`,doteqdot:`≑`,DotEqual:`≐`,dotminus:`∸`,dotplus:`∔`,dotsquare:`⊡`,doublebarwedge:`⌆`,DoubleContourIntegral:`∯`,DoubleDot:`¨`,DoubleDownArrow:`⇓`,DoubleLeftArrow:`⇐`,DoubleLeftRightArrow:`⇔`,DoubleLeftTee:`⫤`,DoubleLongLeftArrow:`⟸`,DoubleLongLeftRightArrow:`⟺`,DoubleLongRightArrow:`⟹`,DoubleRightArrow:`⇒`,DoubleRightTee:`⊨`,DoubleUpArrow:`⇑`,DoubleUpDownArrow:`⇕`,DoubleVerticalBar:`∥`,DownArrow:`↓`,Downarrow:`⇓`,downarrow:`↓`,DownArrowBar:`⤓`,DownArrowUpArrow:`⇵`,DownBreve:`̑`,downdownarrows:`⇊`,downharpoonleft:`⇃`,downharpoonright:`⇂`,DownLeftRightVector:`⥐`,DownLeftTeeVector:`⥞`,DownLeftVector:`↽`,DownLeftVectorBar:`⥖`,DownRightTeeVector:`⥟`,DownRightVector:`⇁`,DownRightVectorBar:`⥗`,DownTee:`⊤`,DownTeeArrow:`↧`,drbkarow:`⤐`,drcorn:`⌟`,drcrop:`⌌`,Dscr:`𝒟`,dscr:`𝒹`,DScy:`Ѕ`,dscy:`ѕ`,dsol:`⧶`,Dstrok:`Đ`,dstrok:`đ`,dtdot:`⋱`,dtri:`▿`,dtrif:`▾`,duarr:`⇵`,duhar:`⥯`,dwangle:`⦦`,DZcy:`Џ`,dzcy:`џ`,dzigrarr:`⟿`,Eacute:`É`,eacute:`é`,easter:`⩮`,Ecaron:`Ě`,ecaron:`ě`,ecir:`≖`,Ecirc:`Ê`,ecirc:`ê`,ecolon:`≕`,Ecy:`Э`,ecy:`э`,eDDot:`⩷`,Edot:`Ė`,eDot:`≑`,edot:`ė`,ee:`ⅇ`,efDot:`≒`,Efr:`𝔈`,efr:`𝔢`,eg:`⪚`,Egrave:`È`,egrave:`è`,egs:`⪖`,egsdot:`⪘`,el:`⪙`,Element:`∈`,elinters:`⏧`,ell:`ℓ`,els:`⪕`,elsdot:`⪗`,Emacr:`Ē`,emacr:`ē`,empty:`∅`,emptyset:`∅`,EmptySmallSquare:`◻`,emptyv:`∅`,EmptyVerySmallSquare:`▫`,emsp:` `,emsp13:` `,emsp14:` `,ENG:`Ŋ`,eng:`ŋ`,ensp:` `,Eogon:`Ę`,eogon:`ę`,Eopf:`𝔼`,eopf:`𝕖`,epar:`⋕`,eparsl:`⧣`,eplus:`⩱`,epsi:`ε`,Epsilon:`Ε`,epsilon:`ε`,epsiv:`ϵ`,eqcirc:`≖`,eqcolon:`≕`,eqsim:`≂`,eqslantgtr:`⪖`,eqslantless:`⪕`,Equal:`⩵`,equals:`=`,EqualTilde:`≂`,equest:`≟`,Equilibrium:`⇌`,equiv:`≡`,equivDD:`⩸`,eqvparsl:`⧥`,erarr:`⥱`,erDot:`≓`,Escr:`ℰ`,escr:`ℯ`,esdot:`≐`,Esim:`⩳`,esim:`≂`,Eta:`Η`,eta:`η`,ETH:`Ð`,eth:`ð`,Euml:`Ë`,euml:`ë`,euro:`€`,excl:`!`,exist:`∃`,Exists:`∃`,expectation:`ℰ`,ExponentialE:`ⅇ`,exponentiale:`ⅇ`,fallingdotseq:`≒`,Fcy:`Ф`,fcy:`ф`,female:`♀`,ffilig:`ffi`,fflig:`ff`,ffllig:`ffl`,Ffr:`𝔉`,ffr:`𝔣`,filig:`fi`,FilledSmallSquare:`◼`,FilledVerySmallSquare:`▪`,fjlig:`fj`,flat:`♭`,fllig:`fl`,fltns:`▱`,fnof:`ƒ`,Fopf:`𝔽`,fopf:`𝕗`,ForAll:`∀`,forall:`∀`,fork:`⋔`,forkv:`⫙`,Fouriertrf:`ℱ`,fpartint:`⨍`,frac12:`½`,frac13:`⅓`,frac14:`¼`,frac15:`⅕`,frac16:`⅙`,frac18:`⅛`,frac23:`⅔`,frac25:`⅖`,frac34:`¾`,frac35:`⅗`,frac38:`⅜`,frac45:`⅘`,frac56:`⅚`,frac58:`⅝`,frac78:`⅞`,frasl:`⁄`,frown:`⌢`,Fscr:`ℱ`,fscr:`𝒻`,gacute:`ǵ`,Gamma:`Γ`,gamma:`γ`,Gammad:`Ϝ`,gammad:`ϝ`,gap:`⪆`,Gbreve:`Ğ`,gbreve:`ğ`,Gcedil:`Ģ`,Gcirc:`Ĝ`,gcirc:`ĝ`,Gcy:`Г`,gcy:`г`,Gdot:`Ġ`,gdot:`ġ`,gE:`≧`,ge:`≥`,gEl:`⪌`,gel:`⋛`,geq:`≥`,geqq:`≧`,geqslant:`⩾`,ges:`⩾`,gescc:`⪩`,gesdot:`⪀`,gesdoto:`⪂`,gesdotol:`⪄`,gesl:`⋛︀`,gesles:`⪔`,Gfr:`𝔊`,gfr:`𝔤`,Gg:`⋙`,gg:`≫`,ggg:`⋙`,gimel:`ℷ`,GJcy:`Ѓ`,gjcy:`ѓ`,gl:`≷`,gla:`⪥`,glE:`⪒`,glj:`⪤`,gnap:`⪊`,gnapprox:`⪊`,gnE:`≩`,gne:`⪈`,gneq:`⪈`,gneqq:`≩`,gnsim:`⋧`,Gopf:`𝔾`,gopf:`𝕘`,grave:"`",GreaterEqual:`≥`,GreaterEqualLess:`⋛`,GreaterFullEqual:`≧`,GreaterGreater:`⪢`,GreaterLess:`≷`,GreaterSlantEqual:`⩾`,GreaterTilde:`≳`,Gscr:`𝒢`,gscr:`ℊ`,gsim:`≳`,gsime:`⪎`,gsiml:`⪐`,Gt:`≫`,GT:`>`,gt:`>`,gtcc:`⪧`,gtcir:`⩺`,gtdot:`⋗`,gtlPar:`⦕`,gtquest:`⩼`,gtrapprox:`⪆`,gtrarr:`⥸`,gtrdot:`⋗`,gtreqless:`⋛`,gtreqqless:`⪌`,gtrless:`≷`,gtrsim:`≳`,gvertneqq:`≩︀`,gvnE:`≩︀`,Hacek:`ˇ`,hairsp:` `,half:`½`,hamilt:`ℋ`,HARDcy:`Ъ`,hardcy:`ъ`,hArr:`⇔`,harr:`↔`,harrcir:`⥈`,harrw:`↭`,Hat:`^`,hbar:`ℏ`,Hcirc:`Ĥ`,hcirc:`ĥ`,hearts:`♥`,heartsuit:`♥`,hellip:`…`,hercon:`⊹`,Hfr:`ℌ`,hfr:`𝔥`,HilbertSpace:`ℋ`,hksearow:`⤥`,hkswarow:`⤦`,hoarr:`⇿`,homtht:`∻`,hookleftarrow:`↩`,hookrightarrow:`↪`,Hopf:`ℍ`,hopf:`𝕙`,horbar:`―`,HorizontalLine:`─`,Hscr:`ℋ`,hscr:`𝒽`,hslash:`ℏ`,Hstrok:`Ħ`,hstrok:`ħ`,HumpDownHump:`≎`,HumpEqual:`≏`,hybull:`⁃`,hyphen:`‐`,Iacute:`Í`,iacute:`í`,ic:`⁣`,Icirc:`Î`,icirc:`î`,Icy:`И`,icy:`и`,Idot:`İ`,IEcy:`Е`,iecy:`е`,iexcl:`¡`,iff:`⇔`,Ifr:`ℑ`,ifr:`𝔦`,Igrave:`Ì`,igrave:`ì`,ii:`ⅈ`,iiiint:`⨌`,iiint:`∭`,iinfin:`⧜`,iiota:`℩`,IJlig:`IJ`,ijlig:`ij`,Im:`ℑ`,Imacr:`Ī`,imacr:`ī`,image:`ℑ`,ImaginaryI:`ⅈ`,imagline:`ℐ`,imagpart:`ℑ`,imath:`ı`,imof:`⊷`,imped:`Ƶ`,Implies:`⇒`,in:`∈`,incare:`℅`,infin:`∞`,infintie:`⧝`,inodot:`ı`,Int:`∬`,int:`∫`,intcal:`⊺`,integers:`ℤ`,Integral:`∫`,intercal:`⊺`,Intersection:`⋂`,intlarhk:`⨗`,intprod:`⨼`,InvisibleComma:`⁣`,InvisibleTimes:`⁢`,IOcy:`Ё`,iocy:`ё`,Iogon:`Į`,iogon:`į`,Iopf:`𝕀`,iopf:`𝕚`,Iota:`Ι`,iota:`ι`,iprod:`⨼`,iquest:`¿`,Iscr:`ℐ`,iscr:`𝒾`,isin:`∈`,isindot:`⋵`,isinE:`⋹`,isins:`⋴`,isinsv:`⋳`,isinv:`∈`,it:`⁢`,Itilde:`Ĩ`,itilde:`ĩ`,Iukcy:`І`,iukcy:`і`,Iuml:`Ï`,iuml:`ï`,Jcirc:`Ĵ`,jcirc:`ĵ`,Jcy:`Й`,jcy:`й`,Jfr:`𝔍`,jfr:`𝔧`,jmath:`ȷ`,Jopf:`𝕁`,jopf:`𝕛`,Jscr:`𝒥`,jscr:`𝒿`,Jsercy:`Ј`,jsercy:`ј`,Jukcy:`Є`,jukcy:`є`,Kappa:`Κ`,kappa:`κ`,kappav:`ϰ`,Kcedil:`Ķ`,kcedil:`ķ`,Kcy:`К`,kcy:`к`,Kfr:`𝔎`,kfr:`𝔨`,kgreen:`ĸ`,KHcy:`Х`,khcy:`х`,KJcy:`Ќ`,kjcy:`ќ`,Kopf:`𝕂`,kopf:`𝕜`,Kscr:`𝒦`,kscr:`𝓀`,lAarr:`⇚`,Lacute:`Ĺ`,lacute:`ĺ`,laemptyv:`⦴`,lagran:`ℒ`,Lambda:`Λ`,lambda:`λ`,Lang:`⟪`,lang:`⟨`,langd:`⦑`,langle:`⟨`,lap:`⪅`,Laplacetrf:`ℒ`,laquo:`«`,Larr:`↞`,lArr:`⇐`,larr:`←`,larrb:`⇤`,larrbfs:`⤟`,larrfs:`⤝`,larrhk:`↩`,larrlp:`↫`,larrpl:`⤹`,larrsim:`⥳`,larrtl:`↢`,lat:`⪫`,lAtail:`⤛`,latail:`⤙`,late:`⪭`,lates:`⪭︀`,lBarr:`⤎`,lbarr:`⤌`,lbbrk:`❲`,lbrace:`{`,lbrack:`[`,lbrke:`⦋`,lbrksld:`⦏`,lbrkslu:`⦍`,Lcaron:`Ľ`,lcaron:`ľ`,Lcedil:`Ļ`,lcedil:`ļ`,lceil:`⌈`,lcub:`{`,Lcy:`Л`,lcy:`л`,ldca:`⤶`,ldquo:`“`,ldquor:`„`,ldrdhar:`⥧`,ldrushar:`⥋`,ldsh:`↲`,lE:`≦`,le:`≤`,LeftAngleBracket:`⟨`,LeftArrow:`←`,Leftarrow:`⇐`,leftarrow:`←`,LeftArrowBar:`⇤`,LeftArrowRightArrow:`⇆`,leftarrowtail:`↢`,LeftCeiling:`⌈`,LeftDoubleBracket:`⟦`,LeftDownTeeVector:`⥡`,LeftDownVector:`⇃`,LeftDownVectorBar:`⥙`,LeftFloor:`⌊`,leftharpoondown:`↽`,leftharpoonup:`↼`,leftleftarrows:`⇇`,LeftRightArrow:`↔`,Leftrightarrow:`⇔`,leftrightarrow:`↔`,leftrightarrows:`⇆`,leftrightharpoons:`⇋`,leftrightsquigarrow:`↭`,LeftRightVector:`⥎`,LeftTee:`⊣`,LeftTeeArrow:`↤`,LeftTeeVector:`⥚`,leftthreetimes:`⋋`,LeftTriangle:`⊲`,LeftTriangleBar:`⧏`,LeftTriangleEqual:`⊴`,LeftUpDownVector:`⥑`,LeftUpTeeVector:`⥠`,LeftUpVector:`↿`,LeftUpVectorBar:`⥘`,LeftVector:`↼`,LeftVectorBar:`⥒`,lEg:`⪋`,leg:`⋚`,leq:`≤`,leqq:`≦`,leqslant:`⩽`,les:`⩽`,lescc:`⪨`,lesdot:`⩿`,lesdoto:`⪁`,lesdotor:`⪃`,lesg:`⋚︀`,lesges:`⪓`,lessapprox:`⪅`,lessdot:`⋖`,lesseqgtr:`⋚`,lesseqqgtr:`⪋`,LessEqualGreater:`⋚`,LessFullEqual:`≦`,LessGreater:`≶`,lessgtr:`≶`,LessLess:`⪡`,lesssim:`≲`,LessSlantEqual:`⩽`,LessTilde:`≲`,lfisht:`⥼`,lfloor:`⌊`,Lfr:`𝔏`,lfr:`𝔩`,lg:`≶`,lgE:`⪑`,lHar:`⥢`,lhard:`↽`,lharu:`↼`,lharul:`⥪`,lhblk:`▄`,LJcy:`Љ`,ljcy:`љ`,Ll:`⋘`,ll:`≪`,llarr:`⇇`,llcorner:`⌞`,Lleftarrow:`⇚`,llhard:`⥫`,lltri:`◺`,Lmidot:`Ŀ`,lmidot:`ŀ`,lmoust:`⎰`,lmoustache:`⎰`,lnap:`⪉`,lnapprox:`⪉`,lnE:`≨`,lne:`⪇`,lneq:`⪇`,lneqq:`≨`,lnsim:`⋦`,loang:`⟬`,loarr:`⇽`,lobrk:`⟦`,LongLeftArrow:`⟵`,Longleftarrow:`⟸`,longleftarrow:`⟵`,LongLeftRightArrow:`⟷`,Longleftrightarrow:`⟺`,longleftrightarrow:`⟷`,longmapsto:`⟼`,LongRightArrow:`⟶`,Longrightarrow:`⟹`,longrightarrow:`⟶`,looparrowleft:`↫`,looparrowright:`↬`,lopar:`⦅`,Lopf:`𝕃`,lopf:`𝕝`,loplus:`⨭`,lotimes:`⨴`,lowast:`∗`,lowbar:`_`,LowerLeftArrow:`↙`,LowerRightArrow:`↘`,loz:`◊`,lozenge:`◊`,lozf:`⧫`,lpar:`(`,lparlt:`⦓`,lrarr:`⇆`,lrcorner:`⌟`,lrhar:`⇋`,lrhard:`⥭`,lrm:`‎`,lrtri:`⊿`,lsaquo:`‹`,Lscr:`ℒ`,lscr:`𝓁`,Lsh:`↰`,lsh:`↰`,lsim:`≲`,lsime:`⪍`,lsimg:`⪏`,lsqb:`[`,lsquo:`‘`,lsquor:`‚`,Lstrok:`Ł`,lstrok:`ł`,Lt:`≪`,LT:`<`,lt:`<`,ltcc:`⪦`,ltcir:`⩹`,ltdot:`⋖`,lthree:`⋋`,ltimes:`⋉`,ltlarr:`⥶`,ltquest:`⩻`,ltri:`◃`,ltrie:`⊴`,ltrif:`◂`,ltrPar:`⦖`,lurdshar:`⥊`,luruhar:`⥦`,lvertneqq:`≨︀`,lvnE:`≨︀`,macr:`¯`,male:`♂`,malt:`✠`,maltese:`✠`,Map:`⤅`,map:`↦`,mapsto:`↦`,mapstodown:`↧`,mapstoleft:`↤`,mapstoup:`↥`,marker:`▮`,mcomma:`⨩`,Mcy:`М`,mcy:`м`,mdash:`—`,mDDot:`∺`,measuredangle:`∡`,MediumSpace:` `,Mellintrf:`ℳ`,Mfr:`𝔐`,mfr:`𝔪`,mho:`℧`,micro:`µ`,mid:`∣`,midast:`*`,midcir:`⫰`,middot:`·`,minus:`−`,minusb:`⊟`,minusd:`∸`,minusdu:`⨪`,MinusPlus:`∓`,mlcp:`⫛`,mldr:`…`,mnplus:`∓`,models:`⊧`,Mopf:`𝕄`,mopf:`𝕞`,mp:`∓`,Mscr:`ℳ`,mscr:`𝓂`,mstpos:`∾`,Mu:`Μ`,mu:`μ`,multimap:`⊸`,mumap:`⊸`,nabla:`∇`,Nacute:`Ń`,nacute:`ń`,nang:`∠⃒`,nap:`≉`,napE:`⩰̸`,napid:`≋̸`,napos:`ʼn`,napprox:`≉`,natur:`♮`,natural:`♮`,naturals:`ℕ`,nbsp:`\\xA0`,nbump:`≎̸`,nbumpe:`≏̸`,ncap:`⩃`,Ncaron:`Ň`,ncaron:`ň`,Ncedil:`Ņ`,ncedil:`ņ`,ncong:`≇`,ncongdot:`⩭̸`,ncup:`⩂`,Ncy:`Н`,ncy:`н`,ndash:`–`,ne:`≠`,nearhk:`⤤`,neArr:`⇗`,nearr:`↗`,nearrow:`↗`,nedot:`≐̸`,NegativeMediumSpace:`​`,NegativeThickSpace:`​`,NegativeThinSpace:`​`,NegativeVeryThinSpace:`​`,nequiv:`≢`,nesear:`⤨`,nesim:`≂̸`,NestedGreaterGreater:`≫`,NestedLessLess:`≪`,NewLine:`\n`,nexist:`∄`,nexists:`∄`,Nfr:`𝔑`,nfr:`𝔫`,ngE:`≧̸`,nge:`≱`,ngeq:`≱`,ngeqq:`≧̸`,ngeqslant:`⩾̸`,nges:`⩾̸`,nGg:`⋙̸`,ngsim:`≵`,nGt:`≫⃒`,ngt:`≯`,ngtr:`≯`,nGtv:`≫̸`,nhArr:`⇎`,nharr:`↮`,nhpar:`⫲`,ni:`∋`,nis:`⋼`,nisd:`⋺`,niv:`∋`,NJcy:`Њ`,njcy:`њ`,nlArr:`⇍`,nlarr:`↚`,nldr:`‥`,nlE:`≦̸`,nle:`≰`,nLeftarrow:`⇍`,nleftarrow:`↚`,nLeftrightarrow:`⇎`,nleftrightarrow:`↮`,nleq:`≰`,nleqq:`≦̸`,nleqslant:`⩽̸`,nles:`⩽̸`,nless:`≮`,nLl:`⋘̸`,nlsim:`≴`,nLt:`≪⃒`,nlt:`≮`,nltri:`⋪`,nltrie:`⋬`,nLtv:`≪̸`,nmid:`∤`,NoBreak:`⁠`,NonBreakingSpace:`\\xA0`,Nopf:`ℕ`,nopf:`𝕟`,Not:`⫬`,not:`¬`,NotCongruent:`≢`,NotCupCap:`≭`,NotDoubleVerticalBar:`∦`,NotElement:`∉`,NotEqual:`≠`,NotEqualTilde:`≂̸`,NotExists:`∄`,NotGreater:`≯`,NotGreaterEqual:`≱`,NotGreaterFullEqual:`≧̸`,NotGreaterGreater:`≫̸`,NotGreaterLess:`≹`,NotGreaterSlantEqual:`⩾̸`,NotGreaterTilde:`≵`,NotHumpDownHump:`≎̸`,NotHumpEqual:`≏̸`,notin:`∉`,notindot:`⋵̸`,notinE:`⋹̸`,notinva:`∉`,notinvb:`⋷`,notinvc:`⋶`,NotLeftTriangle:`⋪`,NotLeftTriangleBar:`⧏̸`,NotLeftTriangleEqual:`⋬`,NotLess:`≮`,NotLessEqual:`≰`,NotLessGreater:`≸`,NotLessLess:`≪̸`,NotLessSlantEqual:`⩽̸`,NotLessTilde:`≴`,NotNestedGreaterGreater:`⪢̸`,NotNestedLessLess:`⪡̸`,notni:`∌`,notniva:`∌`,notnivb:`⋾`,notnivc:`⋽`,NotPrecedes:`⊀`,NotPrecedesEqual:`⪯̸`,NotPrecedesSlantEqual:`⋠`,NotReverseElement:`∌`,NotRightTriangle:`⋫`,NotRightTriangleBar:`⧐̸`,NotRightTriangleEqual:`⋭`,NotSquareSubset:`⊏̸`,NotSquareSubsetEqual:`⋢`,NotSquareSuperset:`⊐̸`,NotSquareSupersetEqual:`⋣`,NotSubset:`⊂⃒`,NotSubsetEqual:`⊈`,NotSucceeds:`⊁`,NotSucceedsEqual:`⪰̸`,NotSucceedsSlantEqual:`⋡`,NotSucceedsTilde:`≿̸`,NotSuperset:`⊃⃒`,NotSupersetEqual:`⊉`,NotTilde:`≁`,NotTildeEqual:`≄`,NotTildeFullEqual:`≇`,NotTildeTilde:`≉`,NotVerticalBar:`∤`,npar:`∦`,nparallel:`∦`,nparsl:`⫽⃥`,npart:`∂̸`,npolint:`⨔`,npr:`⊀`,nprcue:`⋠`,npre:`⪯̸`,nprec:`⊀`,npreceq:`⪯̸`,nrArr:`⇏`,nrarr:`↛`,nrarrc:`⤳̸`,nrarrw:`↝̸`,nRightarrow:`⇏`,nrightarrow:`↛`,nrtri:`⋫`,nrtrie:`⋭`,nsc:`⊁`,nsccue:`⋡`,nsce:`⪰̸`,Nscr:`𝒩`,nscr:`𝓃`,nshortmid:`∤`,nshortparallel:`∦`,nsim:`≁`,nsime:`≄`,nsimeq:`≄`,nsmid:`∤`,nspar:`∦`,nsqsube:`⋢`,nsqsupe:`⋣`,nsub:`⊄`,nsubE:`⫅̸`,nsube:`⊈`,nsubset:`⊂⃒`,nsubseteq:`⊈`,nsubseteqq:`⫅̸`,nsucc:`⊁`,nsucceq:`⪰̸`,nsup:`⊅`,nsupE:`⫆̸`,nsupe:`⊉`,nsupset:`⊃⃒`,nsupseteq:`⊉`,nsupseteqq:`⫆̸`,ntgl:`≹`,Ntilde:`Ñ`,ntilde:`ñ`,ntlg:`≸`,ntriangleleft:`⋪`,ntrianglelefteq:`⋬`,ntriangleright:`⋫`,ntrianglerighteq:`⋭`,Nu:`Ν`,nu:`ν`,num:`#`,numero:`№`,numsp:` `,nvap:`≍⃒`,nVDash:`⊯`,nVdash:`⊮`,nvDash:`⊭`,nvdash:`⊬`,nvge:`≥⃒`,nvgt:`>⃒`,nvHarr:`⤄`,nvinfin:`⧞`,nvlArr:`⤂`,nvle:`≤⃒`,nvlt:`<⃒`,nvltrie:`⊴⃒`,nvrArr:`⤃`,nvrtrie:`⊵⃒`,nvsim:`∼⃒`,nwarhk:`⤣`,nwArr:`⇖`,nwarr:`↖`,nwarrow:`↖`,nwnear:`⤧`,Oacute:`Ó`,oacute:`ó`,oast:`⊛`,ocir:`⊚`,Ocirc:`Ô`,ocirc:`ô`,Ocy:`О`,ocy:`о`,odash:`⊝`,Odblac:`Ő`,odblac:`ő`,odiv:`⨸`,odot:`⊙`,odsold:`⦼`,OElig:`Œ`,oelig:`œ`,ofcir:`⦿`,Ofr:`𝔒`,ofr:`𝔬`,ogon:`˛`,Ograve:`Ò`,ograve:`ò`,ogt:`⧁`,ohbar:`⦵`,ohm:`Ω`,oint:`∮`,olarr:`↺`,olcir:`⦾`,olcross:`⦻`,oline:`‾`,olt:`⧀`,Omacr:`Ō`,omacr:`ō`,Omega:`Ω`,omega:`ω`,Omicron:`Ο`,omicron:`ο`,omid:`⦶`,ominus:`⊖`,Oopf:`𝕆`,oopf:`𝕠`,opar:`⦷`,OpenCurlyDoubleQuote:`“`,OpenCurlyQuote:`‘`,operp:`⦹`,oplus:`⊕`,Or:`⩔`,or:`∨`,orarr:`↻`,ord:`⩝`,order:`ℴ`,orderof:`ℴ`,ordf:`ª`,ordm:`º`,origof:`⊶`,oror:`⩖`,orslope:`⩗`,orv:`⩛`,oS:`Ⓢ`,Oscr:`𝒪`,oscr:`ℴ`,Oslash:`Ø`,oslash:`ø`,osol:`⊘`,Otilde:`Õ`,otilde:`õ`,Otimes:`⨷`,otimes:`⊗`,otimesas:`⨶`,Ouml:`Ö`,ouml:`ö`,ovbar:`⌽`,OverBar:`‾`,OverBrace:`⏞`,OverBracket:`⎴`,OverParenthesis:`⏜`,par:`∥`,para:`¶`,parallel:`∥`,parsim:`⫳`,parsl:`⫽`,part:`∂`,PartialD:`∂`,Pcy:`П`,pcy:`п`,percnt:`%`,period:`.`,permil:`‰`,perp:`⊥`,pertenk:`‱`,Pfr:`𝔓`,pfr:`𝔭`,Phi:`Φ`,phi:`φ`,phiv:`ϕ`,phmmat:`ℳ`,phone:`☎`,Pi:`Π`,pi:`π`,pitchfork:`⋔`,piv:`ϖ`,planck:`ℏ`,planckh:`ℎ`,plankv:`ℏ`,plus:`+`,plusacir:`⨣`,plusb:`⊞`,pluscir:`⨢`,plusdo:`∔`,plusdu:`⨥`,pluse:`⩲`,PlusMinus:`±`,plusmn:`±`,plussim:`⨦`,plustwo:`⨧`,pm:`±`,Poincareplane:`ℌ`,pointint:`⨕`,Popf:`ℙ`,popf:`𝕡`,pound:`£`,Pr:`⪻`,pr:`≺`,prap:`⪷`,prcue:`≼`,prE:`⪳`,pre:`⪯`,prec:`≺`,precapprox:`⪷`,preccurlyeq:`≼`,Precedes:`≺`,PrecedesEqual:`⪯`,PrecedesSlantEqual:`≼`,PrecedesTilde:`≾`,preceq:`⪯`,precnapprox:`⪹`,precneqq:`⪵`,precnsim:`⋨`,precsim:`≾`,Prime:`″`,prime:`′`,primes:`ℙ`,prnap:`⪹`,prnE:`⪵`,prnsim:`⋨`,prod:`∏`,Product:`∏`,profalar:`⌮`,profline:`⌒`,profsurf:`⌓`,prop:`∝`,Proportion:`∷`,Proportional:`∝`,propto:`∝`,prsim:`≾`,prurel:`⊰`,Pscr:`𝒫`,pscr:`𝓅`,Psi:`Ψ`,psi:`ψ`,puncsp:` `,Qfr:`𝔔`,qfr:`𝔮`,qint:`⨌`,Qopf:`ℚ`,qopf:`𝕢`,qprime:`⁗`,Qscr:`𝒬`,qscr:`𝓆`,quaternions:`ℍ`,quatint:`⨖`,quest:`?`,questeq:`≟`,QUOT:`"`,quot:`"`,rAarr:`⇛`,race:`∽̱`,Racute:`Ŕ`,racute:`ŕ`,radic:`√`,raemptyv:`⦳`,Rang:`⟫`,rang:`⟩`,rangd:`⦒`,range:`⦥`,rangle:`⟩`,raquo:`»`,Rarr:`↠`,rArr:`⇒`,rarr:`→`,rarrap:`⥵`,rarrb:`⇥`,rarrbfs:`⤠`,rarrc:`⤳`,rarrfs:`⤞`,rarrhk:`↪`,rarrlp:`↬`,rarrpl:`⥅`,rarrsim:`⥴`,Rarrtl:`⤖`,rarrtl:`↣`,rarrw:`↝`,rAtail:`⤜`,ratail:`⤚`,ratio:`∶`,rationals:`ℚ`,RBarr:`⤐`,rBarr:`⤏`,rbarr:`⤍`,rbbrk:`❳`,rbrace:`}`,rbrack:`]`,rbrke:`⦌`,rbrksld:`⦎`,rbrkslu:`⦐`,Rcaron:`Ř`,rcaron:`ř`,Rcedil:`Ŗ`,rcedil:`ŗ`,rceil:`⌉`,rcub:`}`,Rcy:`Р`,rcy:`р`,rdca:`⤷`,rdldhar:`⥩`,rdquo:`”`,rdquor:`”`,rdsh:`↳`,Re:`ℜ`,real:`ℜ`,realine:`ℛ`,realpart:`ℜ`,reals:`ℝ`,rect:`▭`,REG:`®`,reg:`®`,ReverseElement:`∋`,ReverseEquilibrium:`⇋`,ReverseUpEquilibrium:`⥯`,rfisht:`⥽`,rfloor:`⌋`,Rfr:`ℜ`,rfr:`𝔯`,rHar:`⥤`,rhard:`⇁`,rharu:`⇀`,rharul:`⥬`,Rho:`Ρ`,rho:`ρ`,rhov:`ϱ`,RightAngleBracket:`⟩`,RightArrow:`→`,Rightarrow:`⇒`,rightarrow:`→`,RightArrowBar:`⇥`,RightArrowLeftArrow:`⇄`,rightarrowtail:`↣`,RightCeiling:`⌉`,RightDoubleBracket:`⟧`,RightDownTeeVector:`⥝`,RightDownVector:`⇂`,RightDownVectorBar:`⥕`,RightFloor:`⌋`,rightharpoondown:`⇁`,rightharpoonup:`⇀`,rightleftarrows:`⇄`,rightleftharpoons:`⇌`,rightrightarrows:`⇉`,rightsquigarrow:`↝`,RightTee:`⊢`,RightTeeArrow:`↦`,RightTeeVector:`⥛`,rightthreetimes:`⋌`,RightTriangle:`⊳`,RightTriangleBar:`⧐`,RightTriangleEqual:`⊵`,RightUpDownVector:`⥏`,RightUpTeeVector:`⥜`,RightUpVector:`↾`,RightUpVectorBar:`⥔`,RightVector:`⇀`,RightVectorBar:`⥓`,ring:`˚`,risingdotseq:`≓`,rlarr:`⇄`,rlhar:`⇌`,rlm:`‏`,rmoust:`⎱`,rmoustache:`⎱`,rnmid:`⫮`,roang:`⟭`,roarr:`⇾`,robrk:`⟧`,ropar:`⦆`,Ropf:`ℝ`,ropf:`𝕣`,roplus:`⨮`,rotimes:`⨵`,RoundImplies:`⥰`,rpar:`)`,rpargt:`⦔`,rppolint:`⨒`,rrarr:`⇉`,Rrightarrow:`⇛`,rsaquo:`›`,Rscr:`ℛ`,rscr:`𝓇`,Rsh:`↱`,rsh:`↱`,rsqb:`]`,rsquo:`’`,rsquor:`’`,rthree:`⋌`,rtimes:`⋊`,rtri:`▹`,rtrie:`⊵`,rtrif:`▸`,rtriltri:`⧎`,RuleDelayed:`⧴`,ruluhar:`⥨`,rx:`℞`,Sacute:`Ś`,sacute:`ś`,sbquo:`‚`,Sc:`⪼`,sc:`≻`,scap:`⪸`,Scaron:`Š`,scaron:`š`,sccue:`≽`,scE:`⪴`,sce:`⪰`,Scedil:`Ş`,scedil:`ş`,Scirc:`Ŝ`,scirc:`ŝ`,scnap:`⪺`,scnE:`⪶`,scnsim:`⋩`,scpolint:`⨓`,scsim:`≿`,Scy:`С`,scy:`с`,sdot:`⋅`,sdotb:`⊡`,sdote:`⩦`,searhk:`⤥`,seArr:`⇘`,searr:`↘`,searrow:`↘`,sect:`§`,semi:`;`,seswar:`⤩`,setminus:`∖`,setmn:`∖`,sext:`✶`,Sfr:`𝔖`,sfr:`𝔰`,sfrown:`⌢`,sharp:`♯`,SHCHcy:`Щ`,shchcy:`щ`,SHcy:`Ш`,shcy:`ш`,ShortDownArrow:`↓`,ShortLeftArrow:`←`,shortmid:`∣`,shortparallel:`∥`,ShortRightArrow:`→`,ShortUpArrow:`↑`,shy:`­`,Sigma:`Σ`,sigma:`σ`,sigmaf:`ς`,sigmav:`ς`,sim:`∼`,simdot:`⩪`,sime:`≃`,simeq:`≃`,simg:`⪞`,simgE:`⪠`,siml:`⪝`,simlE:`⪟`,simne:`≆`,simplus:`⨤`,simrarr:`⥲`,slarr:`←`,SmallCircle:`∘`,smallsetminus:`∖`,smashp:`⨳`,smeparsl:`⧤`,smid:`∣`,smile:`⌣`,smt:`⪪`,smte:`⪬`,smtes:`⪬︀`,SOFTcy:`Ь`,softcy:`ь`,sol:`/`,solb:`⧄`,solbar:`⌿`,Sopf:`𝕊`,sopf:`𝕤`,spades:`♠`,spadesuit:`♠`,spar:`∥`,sqcap:`⊓`,sqcaps:`⊓︀`,sqcup:`⊔`,sqcups:`⊔︀`,Sqrt:`√`,sqsub:`⊏`,sqsube:`⊑`,sqsubset:`⊏`,sqsubseteq:`⊑`,sqsup:`⊐`,sqsupe:`⊒`,sqsupset:`⊐`,sqsupseteq:`⊒`,squ:`□`,Square:`□`,square:`□`,SquareIntersection:`⊓`,SquareSubset:`⊏`,SquareSubsetEqual:`⊑`,SquareSuperset:`⊐`,SquareSupersetEqual:`⊒`,SquareUnion:`⊔`,squarf:`▪`,squf:`▪`,srarr:`→`,Sscr:`𝒮`,sscr:`𝓈`,ssetmn:`∖`,ssmile:`⌣`,sstarf:`⋆`,Star:`⋆`,star:`☆`,starf:`★`,straightepsilon:`ϵ`,straightphi:`ϕ`,strns:`¯`,Sub:`⋐`,sub:`⊂`,subdot:`⪽`,subE:`⫅`,sube:`⊆`,subedot:`⫃`,submult:`⫁`,subnE:`⫋`,subne:`⊊`,subplus:`⪿`,subrarr:`⥹`,Subset:`⋐`,subset:`⊂`,subseteq:`⊆`,subseteqq:`⫅`,SubsetEqual:`⊆`,subsetneq:`⊊`,subsetneqq:`⫋`,subsim:`⫇`,subsub:`⫕`,subsup:`⫓`,succ:`≻`,succapprox:`⪸`,succcurlyeq:`≽`,Succeeds:`≻`,SucceedsEqual:`⪰`,SucceedsSlantEqual:`≽`,SucceedsTilde:`≿`,succeq:`⪰`,succnapprox:`⪺`,succneqq:`⪶`,succnsim:`⋩`,succsim:`≿`,SuchThat:`∋`,Sum:`∑`,sum:`∑`,sung:`♪`,Sup:`⋑`,sup:`⊃`,sup1:`¹`,sup2:`²`,sup3:`³`,supdot:`⪾`,supdsub:`⫘`,supE:`⫆`,supe:`⊇`,supedot:`⫄`,Superset:`⊃`,SupersetEqual:`⊇`,suphsol:`⟉`,suphsub:`⫗`,suplarr:`⥻`,supmult:`⫂`,supnE:`⫌`,supne:`⊋`,supplus:`⫀`,Supset:`⋑`,supset:`⊃`,supseteq:`⊇`,supseteqq:`⫆`,supsetneq:`⊋`,supsetneqq:`⫌`,supsim:`⫈`,supsub:`⫔`,supsup:`⫖`,swarhk:`⤦`,swArr:`⇙`,swarr:`↙`,swarrow:`↙`,swnwar:`⤪`,szlig:`ß`,Tab:` `,target:`⌖`,Tau:`Τ`,tau:`τ`,tbrk:`⎴`,Tcaron:`Ť`,tcaron:`ť`,Tcedil:`Ţ`,tcedil:`ţ`,Tcy:`Т`,tcy:`т`,tdot:`⃛`,telrec:`⌕`,Tfr:`𝔗`,tfr:`𝔱`,there4:`∴`,Therefore:`∴`,therefore:`∴`,Theta:`Θ`,theta:`θ`,thetasym:`ϑ`,thetav:`ϑ`,thickapprox:`≈`,thicksim:`∼`,ThickSpace:`  `,thinsp:` `,ThinSpace:` `,thkap:`≈`,thksim:`∼`,THORN:`Þ`,thorn:`þ`,Tilde:`∼`,tilde:`˜`,TildeEqual:`≃`,TildeFullEqual:`≅`,TildeTilde:`≈`,times:`×`,timesb:`⊠`,timesbar:`⨱`,timesd:`⨰`,tint:`∭`,toea:`⤨`,top:`⊤`,topbot:`⌶`,topcir:`⫱`,Topf:`𝕋`,topf:`𝕥`,topfork:`⫚`,tosa:`⤩`,tprime:`‴`,TRADE:`™`,trade:`™`,triangle:`▵`,triangledown:`▿`,triangleleft:`◃`,trianglelefteq:`⊴`,triangleq:`≜`,triangleright:`▹`,trianglerighteq:`⊵`,tridot:`◬`,trie:`≜`,triminus:`⨺`,TripleDot:`⃛`,triplus:`⨹`,trisb:`⧍`,tritime:`⨻`,trpezium:`⏢`,Tscr:`𝒯`,tscr:`𝓉`,TScy:`Ц`,tscy:`ц`,TSHcy:`Ћ`,tshcy:`ћ`,Tstrok:`Ŧ`,tstrok:`ŧ`,twixt:`≬`,twoheadleftarrow:`↞`,twoheadrightarrow:`↠`,Uacute:`Ú`,uacute:`ú`,Uarr:`↟`,uArr:`⇑`,uarr:`↑`,Uarrocir:`⥉`,Ubrcy:`Ў`,ubrcy:`ў`,Ubreve:`Ŭ`,ubreve:`ŭ`,Ucirc:`Û`,ucirc:`û`,Ucy:`У`,ucy:`у`,udarr:`⇅`,Udblac:`Ű`,udblac:`ű`,udhar:`⥮`,ufisht:`⥾`,Ufr:`𝔘`,ufr:`𝔲`,Ugrave:`Ù`,ugrave:`ù`,uHar:`⥣`,uharl:`↿`,uharr:`↾`,uhblk:`▀`,ulcorn:`⌜`,ulcorner:`⌜`,ulcrop:`⌏`,ultri:`◸`,Umacr:`Ū`,umacr:`ū`,uml:`¨`,UnderBar:`_`,UnderBrace:`⏟`,UnderBracket:`⎵`,UnderParenthesis:`⏝`,Union:`⋃`,UnionPlus:`⊎`,Uogon:`Ų`,uogon:`ų`,Uopf:`𝕌`,uopf:`𝕦`,UpArrow:`↑`,Uparrow:`⇑`,uparrow:`↑`,UpArrowBar:`⤒`,UpArrowDownArrow:`⇅`,UpDownArrow:`↕`,Updownarrow:`⇕`,updownarrow:`↕`,UpEquilibrium:`⥮`,upharpoonleft:`↿`,upharpoonright:`↾`,uplus:`⊎`,UpperLeftArrow:`↖`,UpperRightArrow:`↗`,Upsi:`ϒ`,upsi:`υ`,upsih:`ϒ`,Upsilon:`Υ`,upsilon:`υ`,UpTee:`⊥`,UpTeeArrow:`↥`,upuparrows:`⇈`,urcorn:`⌝`,urcorner:`⌝`,urcrop:`⌎`,Uring:`Ů`,uring:`ů`,urtri:`◹`,Uscr:`𝒰`,uscr:`𝓊`,utdot:`⋰`,Utilde:`Ũ`,utilde:`ũ`,utri:`▵`,utrif:`▴`,uuarr:`⇈`,Uuml:`Ü`,uuml:`ü`,uwangle:`⦧`,vangrt:`⦜`,varepsilon:`ϵ`,varkappa:`ϰ`,varnothing:`∅`,varphi:`ϕ`,varpi:`ϖ`,varpropto:`∝`,vArr:`⇕`,varr:`↕`,varrho:`ϱ`,varsigma:`ς`,varsubsetneq:`⊊︀`,varsubsetneqq:`⫋︀`,varsupsetneq:`⊋︀`,varsupsetneqq:`⫌︀`,vartheta:`ϑ`,vartriangleleft:`⊲`,vartriangleright:`⊳`,Vbar:`⫫`,vBar:`⫨`,vBarv:`⫩`,Vcy:`В`,vcy:`в`,VDash:`⊫`,Vdash:`⊩`,vDash:`⊨`,vdash:`⊢`,Vdashl:`⫦`,Vee:`⋁`,vee:`∨`,veebar:`⊻`,veeeq:`≚`,vellip:`⋮`,Verbar:`‖`,verbar:`|`,Vert:`‖`,vert:`|`,VerticalBar:`∣`,VerticalLine:`|`,VerticalSeparator:`❘`,VerticalTilde:`≀`,VeryThinSpace:` `,Vfr:`𝔙`,vfr:`𝔳`,vltri:`⊲`,vnsub:`⊂⃒`,vnsup:`⊃⃒`,Vopf:`𝕍`,vopf:`𝕧`,vprop:`∝`,vrtri:`⊳`,Vscr:`𝒱`,vscr:`𝓋`,vsubnE:`⫋︀`,vsubne:`⊊︀`,vsupnE:`⫌︀`,vsupne:`⊋︀`,Vvdash:`⊪`,vzigzag:`⦚`,Wcirc:`Ŵ`,wcirc:`ŵ`,wedbar:`⩟`,Wedge:`⋀`,wedge:`∧`,wedgeq:`≙`,weierp:`℘`,Wfr:`𝔚`,wfr:`𝔴`,Wopf:`𝕎`,wopf:`𝕨`,wp:`℘`,wr:`≀`,wreath:`≀`,Wscr:`𝒲`,wscr:`𝓌`,xcap:`⋂`,xcirc:`◯`,xcup:`⋃`,xdtri:`▽`,Xfr:`𝔛`,xfr:`𝔵`,xhArr:`⟺`,xharr:`⟷`,Xi:`Ξ`,xi:`ξ`,xlArr:`⟸`,xlarr:`⟵`,xmap:`⟼`,xnis:`⋻`,xodot:`⨀`,Xopf:`𝕏`,xopf:`𝕩`,xoplus:`⨁`,xotime:`⨂`,xrArr:`⟹`,xrarr:`⟶`,Xscr:`𝒳`,xscr:`𝓍`,xsqcup:`⨆`,xuplus:`⨄`,xutri:`△`,xvee:`⋁`,xwedge:`⋀`,Yacute:`Ý`,yacute:`ý`,YAcy:`Я`,yacy:`я`,Ycirc:`Ŷ`,ycirc:`ŷ`,Ycy:`Ы`,ycy:`ы`,yen:`¥`,Yfr:`𝔜`,yfr:`𝔶`,YIcy:`Ї`,yicy:`ї`,Yopf:`𝕐`,yopf:`𝕪`,Yscr:`𝒴`,yscr:`𝓎`,YUcy:`Ю`,yucy:`ю`,Yuml:`Ÿ`,yuml:`ÿ`,Zacute:`Ź`,zacute:`ź`,Zcaron:`Ž`,zcaron:`ž`,Zcy:`З`,zcy:`з`,Zdot:`Ż`,zdot:`ż`,zeetrf:`ℨ`,ZeroWidthSpace:`​`,Zeta:`Ζ`,zeta:`ζ`,Zfr:`ℨ`,zfr:`𝔷`,ZHcy:`Ж`,zhcy:`ж`,zigrarr:`⇝`,Zopf:`ℤ`,zopf:`𝕫`,Zscr:`𝒵`,zscr:`𝓏`,zwj:`‍`,zwnj:`‌`}),e.entityMap=e.HTML_ENTITIES})),Bt=s((e=>{var t=Ft(),n=Lt(),r=It(),i=t.isHTMLEscapableRawTextElement,a=t.isHTMLMimeType,o=t.isHTMLRawTextElement,s=t.hasOwn,c=t.NAMESPACE,l=r.ParseError,u=r.DOMException,d=0,f=1,p=2,m=3,h=4,g=5,_=6,v=7;function y(){}y.prototype={parse:function(e,t,n){var r=this.domBuilder;r.startDocument(),E(t,t=Object.create(null)),x(e,t,n,r,this.errorHandler),r.endDocument()}};var b=/&#?\\w+;?/g;function x(e,r,i,o,c){var d=a(o.mimeType);e.indexOf(n.UNICODE_REPLACEMENT_CHARACTER)>=0&&c.warning(`Unicode replacement character detected, source encoding issues?`);function f(e){if(e>65535){e-=65536;var t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}else return String.fromCharCode(e)}function p(e){var t=e[e.length-1]===`;`?e:e+`;`;if(!d&&t!==e)return c.error(`EntityRef: expecting ;`),e;var r=n.Reference.exec(t);if(!r||r[0].length!==t.length)return c.error(`entity not matching Reference production: `+e),e;var a=t.slice(1,-1);return s(i,a)?i[a]:a.charAt(0)===`#`?f(parseInt(a.substring(1).replace(`x`,`0x`))):(c.error(`entity not found:`+e),e)}function m(t){if(t>D){var n=e.substring(D,t).replace(b,p);v&&y(D),o.characters(n,0,t-D),D=t}}var h=0,g=0,_=/\\r\\n?|\\n|$/g,v=o.locator;function y(t,n){for(;t>=g&&(n=_.exec(e));)h=g,g=n.index+n[0].length,v.lineNumber++;v.columnNumber=t-h+1}for(var x=[{currentNSMap:r}],E=[],D=0;;){try{var O=e.indexOf(`<`,D);if(O<0){if(!d&&E.length>0)return c.fatalError(`unclosed xml tag(s): `+E.join(`, `));if(!e.substring(D).match(/^\\s*$/)){var M=o.doc,ee=M.createTextNode(e.substring(D));if(M.documentElement)return c.error(`Extra content at the end of the document`);M.appendChild(ee),o.currentElement=ee}return}if(O>D){var te=e.substring(D,O);!d&&E.length===0&&(te=te.replace(new RegExp(n.S_OPT.source,`g`),``),te&&c.error(`Unexpected content outside root element: \'`+te+`\'`)),m(O)}switch(e.charAt(O+1)){case`/`:var N=e.indexOf(`>`,O+2),P=e.substring(O+2,N>0?N:void 0);if(!P)return c.fatalError(`end tag name missing`);var F=N>0&&n.reg(`^`,n.QName_group,n.S_OPT,`$`).exec(P);if(!F)return c.fatalError(`end tag name contains invalid characters: "`+P+`"`);if(!o.currentElement&&!o.doc.documentElement)return;var I=E[E.length-1]||o.currentElement.tagName||o.doc.documentElement.tagName||``;if(I!==F[1]){var L=F[1].toLowerCase();if(!d||I.toLowerCase()!==L)return c.fatalError(`Opening and ending tag mismatch: "`+I+`" != "`+P+`"`)}var R=x.pop();E.pop();var z=R.localNSMap;if(o.endElement(R.uri,R.localName,I),z)for(var ne in z)s(z,ne)&&o.endPrefixMapping(ne);N++;break;case`?`:v&&y(O),N=A(e,O,o,c);break;case`!`:v&&y(O),N=k(e,O,o,c,d);break;default:v&&y(O);var B=new j,re=x[x.length-1].currentNSMap,N=C(e,O,B,re,p,c,d),ie=B.length;if(B.closed||(d&&t.isHTMLVoidElement(B.tagName)?B.closed=!0:E.push(B.tagName)),v&&ie){for(var ae=S(v,{}),oe=0;oeD?D=N:m(Math.max(O,D)+1)}}function S(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function C(e,t,n,r,i,a,o){function c(e,t,r){if(s(n.attributeNames,e))return a.fatalError(`Attribute `+e+` redefined`);if(!o&&t.indexOf(`<`)>=0)return a.fatalError(`Unescaped \'<\' not allowed in attributes values`);n.addValue(e,t.replace(/[\\t\\n\\r]/g,` `).replace(b,i),r)}for(var l,u,y=++t,x=d;;){var S=e.charAt(y);switch(S){case`=`:if(x===f)l=e.slice(t,y),x=m;else if(x===p)x=m;else throw Error(`attribute equal must after attrName`);break;case`\'`:case`"`:if(x===m||x===f)if(x===f&&(a.warning(`attribute value must after "="`),l=e.slice(t,y)),t=y+1,y=e.indexOf(S,t),y>0)u=e.slice(t,y),c(l,u,t-1),x=g;else throw Error(`attribute value no end \'`+S+`\' match`);else if(x==h)u=e.slice(t,y),c(l,u,t),a.warning(`attribute "`+l+`" missed start quot(`+S+`)!!`),t=y+1,x=g;else throw Error(`attribute value must after "="`);break;case`/`:switch(x){case d:n.setTagName(e.slice(t,y));case g:case _:case v:x=v,n.closed=!0;case h:case f:break;case p:n.closed=!0;break;default:throw Error(`attribute invalid close char(\'/\')`)}break;case``:return a.error(`unexpected end of input`),x==d&&n.setTagName(e.slice(t,y)),y;case`>`:switch(x){case d:n.setTagName(e.slice(t,y));case g:case _:case v:break;case h:case f:u=e.slice(t,y),u.slice(-1)===`/`&&(n.closed=!0,u=u.slice(0,-1));case p:x===p&&(u=l),x==h?(a.warning(`attribute "`+u+`" missed quot(")!`),c(l,u,t)):(o||a.warning(`attribute "`+u+`" missed value!! "`+u+`" instead!!`),c(u,u,t));break;case m:if(!o)return a.fatalError(`AttValue: \' or " expected`)}return y;case`€`:S=` `;default:if(S<=` `)switch(x){case d:n.setTagName(e.slice(t,y)),x=_;break;case f:l=e.slice(t,y),x=p;break;case h:var u=e.slice(t,y);a.warning(`attribute "`+u+`" missed quot(")!!`),c(l,u,t);case g:x=_;break}else switch(x){case p:o||a.warning(`attribute "`+l+`" missed value!! "`+l+`" instead2!!`),c(l,l,t),t=y,x=f;break;case g:a.warning(`attribute space is required"`+l+`"!!`);case _:x=f,t=y;break;case m:x=h,t=y;break;case v:throw Error(`elements closed character \'/\' and \'>\' must be connected to`)}}y++}}function w(e,t,n){for(var r=e.tagName,i=null,a=e.length;a--;){var o=e[a],l=o.qName,u=o.value,d=l.indexOf(`:`);if(d>0)var f=o.prefix=l.slice(0,d),p=l.slice(d+1),m=f===`xmlns`&&p;else p=l,f=null,m=l===`xmlns`&&``;o.localName=p,m!==!1&&(i??(i=Object.create(null),E(n,n=Object.create(null))),n[m]=i[m]=u,o.uri=c.XMLNS,t.startPrefixMapping(m,u))}for(var a=e.length;a--;)o=e[a],o.prefix&&(o.prefix===`xml`&&(o.uri=c.XML),o.prefix!==`xmlns`&&(o.uri=n[o.prefix]));var d=r.indexOf(`:`);d>0?(f=e.prefix=r.slice(0,d),p=e.localName=r.slice(d+1)):(f=null,p=e.localName=r);var h=e.uri=n[f||``];if(t.startElement(h,p,r,e),e.closed){if(t.endElement(h,p,r),i)for(f in i)s(i,f)&&t.endPrefixMapping(f)}else return e.currentNSMap=n,e.localNSMap=i,!0}function T(e,t,n,r,a){var s=i(n);if(s||o(n)){var c=e.indexOf(``,t),l=e.substring(t+1,c);return s&&(l=l.replace(b,r)),a.characters(l,0,l.length),c}return t+1}function E(e,t){for(var n in e)s(e,n)&&(t[n]=e[n])}function D(e,t){var r=t;function i(t){return t||=0,e.charAt(r+t)}function a(e){e||=1,r+=e}function o(){for(var t=0;r`?(o.skip(1),r.startDTD(l.name,l.publicId,l.systemId,l.internalSubset),r.endDTD(),o.getIndex()):i.fatalError(`doctype not terminated with > at position `+o.getIndex());default:return i.fatalError(`Not well-formed XML starting with "0)return i.fatalError(`processing instruction at position `+t+` is an xml declaration which is only at the start of the document`);if(!n.XMLDecl.test(e.substring(t)))return i.fatalError(`xml declaration is not well-formed`)}return r.processingInstruction(a[1],a[2]),t+a[0].length}function j(){this.attributeNames=Object.create(null)}j.prototype={setTagName:function(e){if(!n.QName_exact.test(e))throw Error(`invalid tagName:`+e);this.tagName=e},addValue:function(e,t,r){if(!n.QName_exact.test(e))throw Error(`invalid attribute:`+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:r}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},e.XMLReader=y,e.parseUtils=D,e.parseDoctypeCommentOrCData=k})),Vt=s((e=>{var t=Ft(),n=Rt(),r=It(),i=zt(),a=Bt(),o=n.DOMImplementation,s=t.hasDefaultHTMLNamespace,c=t.isHTMLMimeType,l=t.isValidMimeType,u=t.MIME_TYPE,d=t.NAMESPACE,f=r.ParseError,p=a.XMLReader;function m(e){return e.replace(/\\r[\\n\\u0085]/g,`\n`).replace(/[\\r\\u0085\\u2028\\u2029]/g,`\n`)}function h(e){if(e||={},e.locator===void 0&&(e.locator=!0),this.assign=e.assign||t.assign,this.domHandler=e.domHandler||g,this.onError=e.onError||e.errorHandler,e.errorHandler&&typeof e.errorHandler!=`function`)throw TypeError(`errorHandler object is no longer supported, switch to onError!`);e.errorHandler&&e.errorHandler(`warning`,"The `errorHandler` option has been deprecated, use `onError` instead!",this),this.normalizeLineEndings=e.normalizeLineEndings||m,this.locator=!!e.locator,this.xmlns=this.assign(Object.create(null),e.xmlns)}h.prototype.parseFromString=function(e,n){if(!l(n))throw TypeError(`DOMParser.parseFromString: the provided mimeType "`+n+`" is not valid.`);var r=this.assign(Object.create(null),this.xmlns),a=i.XML_ENTITIES,o=r[``]||null;s(n)?(a=i.HTML_ENTITIES,o=d.HTML):n===u.XML_SVG_IMAGE&&(o=d.SVG),r[``]=o,r.xml=r.xml||d.XML;var c=new this.domHandler({mimeType:n,defaultNamespace:o,onError:this.onError}),f=this.locator?{}:void 0;this.locator&&c.setDocumentLocator(f);var m=new p;return m.errorHandler=c,m.domBuilder=c,!t.isHTMLMimeType(n)&&typeof e!=`string`&&m.errorHandler.fatalError(`source is not a string`),m.parse(this.normalizeLineEndings(String(e)),r,a),c.doc.documentElement||m.errorHandler.fatalError(`missing root element`),c.doc};function g(e){var t=e||{};this.mimeType=t.mimeType||u.XML_APPLICATION,this.defaultNamespace=t.defaultNamespace||null,this.cdata=!1,this.currentElement=void 0,this.doc=void 0,this.locator=void 0,this.onError=t.onError}function _(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}g.prototype={startDocument:function(){var e=new o;this.doc=c(this.mimeType)?e.createHTMLDocument(!1):e.createDocument(this.defaultNamespace,``)},startElement:function(e,t,n,r){var i=this.doc,a=i.createElementNS(e,n||t),o=r.length;b(this,a),this.currentElement=a,this.locator&&_(this.locator,a);for(var s=0;s=t+n||t?new java.lang.String(e,t,n)+``:e}`endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl`.replace(/\\w+/g,function(e){g.prototype[e]=function(){return null}});function b(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}function x(e){if(e===`error`)throw`onErrorStopParsing`}function S(){throw`onWarningStopParsing`}e.__DOMHandler=g,e.DOMParser=h,e.normalizeLineEndings=m,e.onErrorStopParsing=x,e.onWarningStopParsing=S})),Ht=s((e=>{var t=Ft();e.assign=t.assign,e.hasDefaultHTMLNamespace=t.hasDefaultHTMLNamespace,e.isHTMLMimeType=t.isHTMLMimeType,e.isValidMimeType=t.isValidMimeType,e.MIME_TYPE=t.MIME_TYPE,e.NAMESPACE=t.NAMESPACE;var n=It();e.DOMException=n.DOMException,e.DOMExceptionName=n.DOMExceptionName,e.ExceptionCode=n.ExceptionCode,e.ParseError=n.ParseError;var r=Rt();e.Attr=r.Attr,e.CDATASection=r.CDATASection,e.CharacterData=r.CharacterData,e.Comment=r.Comment,e.Document=r.Document,e.DocumentFragment=r.DocumentFragment,e.DocumentType=r.DocumentType,e.DOMImplementation=r.DOMImplementation,e.Element=r.Element,e.Entity=r.Entity,e.EntityReference=r.EntityReference,e.LiveNodeList=r.LiveNodeList,e.NamedNodeMap=r.NamedNodeMap,e.Node=r.Node,e.NodeList=r.NodeList,e.Notation=r.Notation,e.ProcessingInstruction=r.ProcessingInstruction,e.Text=r.Text,e.XMLSerializer=r.XMLSerializer;var i=Vt();e.DOMParser=i.DOMParser,e.normalizeLineEndings=i.normalizeLineEndings,e.onErrorStopParsing=i.onErrorStopParsing,e.onWarningStopParsing=i.onWarningStopParsing}))();let Ut=Symbol(`changed`),Wt=Symbol(`classList`),Gt=Symbol(`CustomElements`),Kt=Symbol(`content`),qt=Symbol(`dataset`),Jt=Symbol(`doctype`),Yt=Symbol(`DOMParser`),W=Symbol(`end`),Xt=Symbol(`EventTarget`),Zt=Symbol(`globals`),Qt=Symbol(`image`),$t=Symbol(`mime`),en=Symbol(`MutationObserver`),G=Symbol(`next`),tn=Symbol(`ownerElement`),nn=Symbol(`prev`),rn=Symbol(`private`),an=Symbol(`sheet`),on=Symbol(`start`),sn=Symbol(`style`),cn=Symbol(`upgrade`),ln=Symbol(`value`),un=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),dn=String.fromCodePoint??(e=>{let t=``;return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t});function fn(e){return e>=55296&&e<=57343||e>1114111?65533:un.get(e)??e}function pn(e){let t=typeof atob==`function`?atob(e):typeof Buffer.from==`function`?Buffer.from(e,`base64`).toString(`binary`):new Buffer(e,`base64`).toString(`binary`),n=t.length&-2,r=new Uint16Array(n/2);for(let e=0,i=0;e=_n.ZERO&&e<=_n.NINE}function yn(e){return e>=_n.UPPER_A&&e<=_n.UPPER_F||e>=_n.LOWER_A&&e<=_n.LOWER_F}function bn(e){return e>=_n.UPPER_A&&e<=_n.UPPER_Z||e>=_n.LOWER_A&&e<=_n.LOWER_Z||vn(e)}function xn(e){return e===_n.EQUALS||bn(e)}var Sn;(function(e){e[e.EntityStart=0]=`EntityStart`,e[e.NumericStart=1]=`NumericStart`,e[e.NumericDecimal=2]=`NumericDecimal`,e[e.NumericHex=3]=`NumericHex`,e[e.NamedEntity=4]=`NamedEntity`})(Sn||={});var Cn;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(Cn||={});var wn=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=Sn.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Cn.Strict,this.runConsumed=0}startEntity(e){this.decodeMode=e,this.state=Sn.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1,this.runConsumed=0}write(e,t){switch(this.state){case Sn.EntityStart:return e.charCodeAt(t)===_n.NUM?(this.state=Sn.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=Sn.NamedEntity,this.stateNamedEntity(e,t));case Sn.NumericStart:return this.stateNumericStart(e,t);case Sn.NumericDecimal:return this.stateNumericDecimal(e,t);case Sn.NumericHex:return this.stateNumericHex(e,t);case Sn.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|32)===_n.LOWER_X?(this.state=Sn.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=Sn.NumericDecimal,this.stateNumericDecimal(e,t))}stateNumericHex(e,t){for(;t>14;for(;t>7;if(this.runConsumed===0){let n=r&gn.JUMP_TABLE;if(e.charCodeAt(t)!==n)return this.result===0?0:this.emitNotTerminatedNamedEntity();t++,this.excess++,this.runConsumed++}for(;this.runConsumed=e.length)return-1;let r=this.runConsumed-1,i=n[this.treeIndex+1+(r>>1)],a=r%2==0?i&255:i>>8&255;if(e.charCodeAt(t)!==a)return this.runConsumed=0,this.result===0?0:this.emitNotTerminatedNamedEntity();t++,this.excess++,this.runConsumed++}this.runConsumed=0,this.treeIndex+=1+(a>>1),r=n[this.treeIndex],i=(r&gn.VALUE_LENGTH)>>14}if(t>=e.length)break;let a=e.charCodeAt(t);if(a===_n.SEMI&&i!==0&&(r&gn.FLAG13)!==0)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);if(this.treeIndex=Tn(n,r,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===Cn.Attribute&&(i===0||xn(a))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&gn.VALUE_LENGTH)>>14,i!==0){if(a===_n.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==Cn.Strict&&(r&gn.FLAG13)===0&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}t++,this.excess++}return-1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:n}=this,r=(n[t]&gn.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),(e=this.errors)==null||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(t===1?r[e]&~(gn.VALUE_LENGTH|gn.FLAG13):r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case Sn.NamedEntity:return this.result!==0&&(this.decodeMode!==Cn.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Sn.NumericDecimal:return this.emitNumericEntity(0,2);case Sn.NumericHex:return this.emitNumericEntity(0,3);case Sn.NumericStart:return(e=this.errors)==null||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Sn.EntityStart:return 0}}};function Tn(e,t,n,r){let i=(t&gn.BRANCH_LENGTH)>>7,a=t&gn.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){let t=r-a;return t<0||t>=i?-1:e[n+t]-1}let o=i+1>>1,s=0,c=i-1;for(;s<=c;){let t=s+c>>>1,i=e[n+(t>>1)]>>(t&1)*8&255;if(ir)c=t-1;else return e[n+o+t]}return-1}var K;(function(e){e[e.Tab=9]=`Tab`,e[e.NewLine=10]=`NewLine`,e[e.FormFeed=12]=`FormFeed`,e[e.CarriageReturn=13]=`CarriageReturn`,e[e.Space=32]=`Space`,e[e.ExclamationMark=33]=`ExclamationMark`,e[e.Number=35]=`Number`,e[e.Amp=38]=`Amp`,e[e.SingleQuote=39]=`SingleQuote`,e[e.DoubleQuote=34]=`DoubleQuote`,e[e.Dash=45]=`Dash`,e[e.Slash=47]=`Slash`,e[e.Zero=48]=`Zero`,e[e.Nine=57]=`Nine`,e[e.Semi=59]=`Semi`,e[e.Lt=60]=`Lt`,e[e.Eq=61]=`Eq`,e[e.Gt=62]=`Gt`,e[e.Questionmark=63]=`Questionmark`,e[e.UpperA=65]=`UpperA`,e[e.LowerA=97]=`LowerA`,e[e.UpperF=70]=`UpperF`,e[e.LowerF=102]=`LowerF`,e[e.UpperZ=90]=`UpperZ`,e[e.LowerZ=122]=`LowerZ`,e[e.LowerX=120]=`LowerX`,e[e.OpeningSquareBracket=91]=`OpeningSquareBracket`})(K||={});var q;(function(e){e[e.Text=1]=`Text`,e[e.BeforeTagName=2]=`BeforeTagName`,e[e.InTagName=3]=`InTagName`,e[e.InSelfClosingTag=4]=`InSelfClosingTag`,e[e.BeforeClosingTagName=5]=`BeforeClosingTagName`,e[e.InClosingTagName=6]=`InClosingTagName`,e[e.AfterClosingTagName=7]=`AfterClosingTagName`,e[e.BeforeAttributeName=8]=`BeforeAttributeName`,e[e.InAttributeName=9]=`InAttributeName`,e[e.AfterAttributeName=10]=`AfterAttributeName`,e[e.BeforeAttributeValue=11]=`BeforeAttributeValue`,e[e.InAttributeValueDq=12]=`InAttributeValueDq`,e[e.InAttributeValueSq=13]=`InAttributeValueSq`,e[e.InAttributeValueNq=14]=`InAttributeValueNq`,e[e.BeforeDeclaration=15]=`BeforeDeclaration`,e[e.InDeclaration=16]=`InDeclaration`,e[e.InProcessingInstruction=17]=`InProcessingInstruction`,e[e.BeforeComment=18]=`BeforeComment`,e[e.CDATASequence=19]=`CDATASequence`,e[e.InSpecialComment=20]=`InSpecialComment`,e[e.InCommentLike=21]=`InCommentLike`,e[e.BeforeSpecialS=22]=`BeforeSpecialS`,e[e.BeforeSpecialT=23]=`BeforeSpecialT`,e[e.SpecialStartSequence=24]=`SpecialStartSequence`,e[e.InSpecialTag=25]=`InSpecialTag`,e[e.InEntity=26]=`InEntity`})(q||={});function En(e){return e===K.Space||e===K.NewLine||e===K.Tab||e===K.FormFeed||e===K.CarriageReturn}function Dn(e){return e===K.Slash||e===K.Gt||En(e)}function On(e){return e>=K.LowerA&&e<=K.LowerZ||e>=K.UpperA&&e<=K.UpperZ}var kn;(function(e){e[e.NoValue=0]=`NoValue`,e[e.Unquoted=1]=`Unquoted`,e[e.Single=2]=`Single`,e[e.Double=3]=`Double`})(kn||={});let An={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97]),XmpEnd:new Uint8Array([60,47,120,109,112])};var jn=class{constructor({xmlMode:e=!1,decodeEntities:t=!0},n){this.cbs=n,this.state=q.Text,this.buffer=``,this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=q.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.xmlMode=e,this.decodeEntities=t,this.entityDecoder=new wn(e?hn:mn,(e,t)=>this.emitCodePoint(e,t))}reset(){this.state=q.Text,this.buffer=``,this.sectionStart=0,this.index=0,this.baseState=q.Text,this.currentSequence=void 0,this.running=!0,this.offset=0}write(e){this.offset+=this.buffer.length,this.buffer=e,this.parse()}end(){this.running&&this.finish()}pause(){this.running=!1}resume(){this.running=!0,this.indexthis.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=q.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&e===K.Amp&&this.startEntity()}stateSpecialStartSequence(e){let t=this.sequenceIndex===this.currentSequence.length;if(!(t?Dn(e):(e|32)===this.currentSequence[this.sequenceIndex]))this.isSpecial=!1;else if(!t){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=q.InTagName,this.stateInTagName(e)}stateInSpecialTag(e){if(this.sequenceIndex===this.currentSequence.length){if(e===K.Gt||En(e)){let t=this.index-this.currentSequence.length;if(this.sectionStart=0)this.state=this.baseState,t===0&&--this.index;else{if(e=e||(this.state===q.InCommentLike?this.currentSequence===An.CdataEnd?this.cbs.oncdata(this.sectionStart,e,0):this.cbs.oncomment(this.sectionStart,e,0):this.state===q.InTagName||this.state===q.BeforeAttributeName||this.state===q.BeforeAttributeValue||this.state===q.AfterAttributeName||this.state===q.InAttributeName||this.state===q.InAttributeValueSq||this.state===q.InAttributeValueDq||this.state===q.InAttributeValueNq||this.state===q.InClosingTagName||this.cbs.ontext(this.sectionStart,e))}emitCodePoint(e,t){this.baseState!==q.Text&&this.baseState!==q.InSpecialTag?(this.sectionStart0&&a.has(this.stack[0]);){let e=this.stack.shift();(n=(t=this.cbs).onclosetag)==null||n.call(t,e,!0)}this.isVoidElement(e)||(this.stack.unshift(e),this.htmlMode&&(zn.has(e)?this.foreignContext.unshift(!0):Bn.has(e)&&this.foreignContext.unshift(!1))),(i=(r=this.cbs).onopentagname)==null||i.call(r,e),this.cbs.onopentag&&(this.attribs={})}endOpenTag(e){var t,n;this.startIndex=this.openTagStart,this.attribs&&=((n=(t=this.cbs).onopentag)==null||n.call(t,this.tagname,this.attribs,e),null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=``}onopentagend(e){this.endIndex=e,this.endOpenTag(!1),this.startIndex=e+1}onclosetag(e,t){var n,r,i,a,o,s,c,l;this.endIndex=t;let u=this.getSlice(e,t);if(this.lowerCaseTagNames&&(u=u.toLowerCase()),this.htmlMode&&(zn.has(u)||Bn.has(u))&&this.foreignContext.shift(),this.isVoidElement(u))this.htmlMode&&u===`br`&&((a=(i=this.cbs).onopentagname)==null||a.call(i,`br`),(s=(o=this.cbs).onopentag)==null||s.call(o,`br`,{},!0),(l=(c=this.cbs).onclosetag)==null||l.call(c,`br`,!1));else{let e=this.stack.indexOf(u);if(e!==-1)for(let t=0;t<=e;t++){let i=this.stack.shift();(r=(n=this.cbs).onclosetag)==null||r.call(n,i,t!==e)}else this.htmlMode&&u===`p`&&(this.emitOpenTag(`p`),this.closeCurrentTag(!0))}this.startIndex=t+1}onselfclosingtag(e){this.endIndex=e,this.recognizeSelfClosing||this.foreignContext[0]?(this.closeCurrentTag(!1),this.startIndex=e+1):this.onopentagend(e)}closeCurrentTag(e){var t,n;let r=this.tagname;this.endOpenTag(e),this.stack[0]===r&&((n=(t=this.cbs).onclosetag)==null||n.call(t,r,!e),this.stack.shift())}onattribname(e,t){this.startIndex=e;let n=this.getSlice(e,t);this.attribname=this.lowerCaseAttributeNames?n.toLowerCase():n}onattribdata(e,t){this.attribvalue+=this.getSlice(e,t)}onattribentity(e){this.attribvalue+=dn(e)}onattribend(e,t){var n,r;this.endIndex=t,(r=(n=this.cbs).onattribute)==null||r.call(n,this.attribname,this.attribvalue,e===kn.Double?`"`:e===kn.Single?`\'`:e===kn.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=``}getInstructionName(e){let t=e.search(Vn),n=t<0?e:e.substr(0,t);return this.lowerCaseTagNames&&(n=n.toLowerCase()),n}ondeclaration(e,t){this.endIndex=t;let n=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){let e=this.getInstructionName(n);this.cbs.onprocessinginstruction(`!${e}`,`!${n}`)}this.startIndex=t+1}onprocessinginstruction(e,t){this.endIndex=t;let n=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){let e=this.getInstructionName(n);this.cbs.onprocessinginstruction(`?${e}`,`?${n}`)}this.startIndex=t+1}oncomment(e,t,n){var r,i,a,o;this.endIndex=t,(i=(r=this.cbs).oncomment)==null||i.call(r,this.getSlice(e,t-n)),(o=(a=this.cbs).oncommentend)==null||o.call(a),this.startIndex=t+1}oncdata(e,t,n){var r,i,a,o,s,c,l,u,d,f;this.endIndex=t;let p=this.getSlice(e,t-n);!this.htmlMode||this.options.recognizeCDATA?((i=(r=this.cbs).oncdatastart)==null||i.call(r),(o=(a=this.cbs).ontext)==null||o.call(a,p),(c=(s=this.cbs).oncdataend)==null||c.call(s)):((u=(l=this.cbs).oncomment)==null||u.call(l,`[CDATA[${p}]]`),(f=(d=this.cbs).oncommentend)==null||f.call(d)),this.startIndex=t+1}onend(){var e,t;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(let e=0;e=this.buffers[0].length;)this.shiftBuffer();let n=this.buffers[0].slice(e-this.bufferOffset,t-this.bufferOffset);for(;t-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),n+=this.buffers[0].slice(0,t-this.bufferOffset);return n}shiftBuffer(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()}write(e){var t,n;if(this.ended){(n=(t=this.cbs).onerror)==null||n.call(t,Error(`.write() after done!`));return}this.buffers.push(e),this.tokenizer.running&&(this.tokenizer.write(e),this.writeIndex++)}end(e){var t,n;if(this.ended){(n=(t=this.cbs).onerror)==null||n.call(t,Error(`.end() after done!`));return}e&&this.write(e),this.ended=!0,this.tokenizer.end()}pause(){this.tokenizer.pause()}resume(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndexQn,Comment:()=>Jn,Directive:()=>qn,Doctype:()=>$n,ElementType:()=>J,Root:()=>Gn,Script:()=>Yn,Style:()=>Xn,Tag:()=>Zn,Text:()=>Kn,isTag:()=>Wn}),J;(function(e){e.Root=`root`,e.Text=`text`,e.Directive=`directive`,e.Comment=`comment`,e.Script=`script`,e.Style=`style`,e.Tag=`tag`,e.CDATA=`cdata`,e.Doctype=`doctype`})(J||={});function Wn(e){return e.type===J.Tag||e.type===J.Script||e.type===J.Style}let Gn=J.Root,Kn=J.Text,qn=J.Directive,Jn=J.Comment,Yn=J.Script,Xn=J.Style,Zn=J.Tag,Qn=J.CDATA,$n=J.Doctype;var er=class{constructor(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}get parentNode(){return this.parent}set parentNode(e){this.parent=e}get previousSibling(){return this.prev}set previousSibling(e){this.prev=e}get nextSibling(){return this.next}set nextSibling(e){this.next=e}cloneNode(e=!1){return gr(this,e)}},tr=class extends er{constructor(e){super(),this.data=e}get nodeValue(){return this.data}set nodeValue(e){this.data=e}},nr=class extends tr{constructor(){super(...arguments),this.type=J.Text}get nodeType(){return 3}},rr=class extends tr{constructor(){super(...arguments),this.type=J.Comment}get nodeType(){return 8}},ir=class extends tr{constructor(e,t){super(t),this.name=e,this.type=J.Directive}get nodeType(){return 1}},ar=class extends er{constructor(e){super(),this.children=e}get firstChild(){return this.children[0]??null}get lastChild(){return this.children.length>0?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(e){this.children=e}},or=class extends ar{constructor(){super(...arguments),this.type=J.CDATA}get nodeType(){return 4}},sr=class extends ar{constructor(){super(...arguments),this.type=J.Root}get nodeType(){return 9}},cr=class extends ar{constructor(e,t,n=[],r=e===`script`?J.Script:e===`style`?J.Style:J.Tag){super(n),this.name=e,this.attribs=t,this.type=r}get nodeType(){return 1}get tagName(){return this.name}set tagName(e){this.name=e}get attributes(){return Object.keys(this.attribs).map(e=>({name:e,value:this.attribs[e],namespace:this[`x-attribsNamespace`]?.[e],prefix:this[`x-attribsPrefix`]?.[e]}))}};function lr(e){return Wn(e)}function ur(e){return e.type===J.CDATA}function dr(e){return e.type===J.Text}function fr(e){return e.type===J.Comment}function pr(e){return e.type===J.Directive}function mr(e){return e.type===J.Root}function hr(e){return Object.prototype.hasOwnProperty.call(e,`children`)}function gr(e,t=!1){let n;if(dr(e))n=new nr(e.data);else if(fr(e))n=new rr(e.data);else if(lr(e)){let r=t?_r(e.children):[],i=new cr(e.name,{...e.attribs},r);r.forEach(e=>e.parent=i),e.namespace!=null&&(i.namespace=e.namespace),e[`x-attribsNamespace`]&&(i[`x-attribsNamespace`]={...e[`x-attribsNamespace`]}),e[`x-attribsPrefix`]&&(i[`x-attribsPrefix`]={...e[`x-attribsPrefix`]}),n=i}else if(ur(e)){let r=t?_r(e.children):[],i=new or(r);r.forEach(e=>e.parent=i),n=i}else if(mr(e)){let r=t?_r(e.children):[],i=new sr(r);r.forEach(e=>e.parent=i),e[`x-mode`]&&(i[`x-mode`]=e[`x-mode`]),n=i}else if(pr(e)){let t=new ir(e.name,e.data);e[`x-name`]!=null&&(t[`x-name`]=e[`x-name`],t[`x-publicId`]=e[`x-publicId`],t[`x-systemId`]=e[`x-systemId`]),n=t}else throw Error(`Not implemented yet: ${e.type}`);return n.startIndex=e.startIndex,n.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function _r(e){let t=e.map(e=>gr(e,!0));for(let e=1;ebr(e.charCodeAt(t))?(e.charCodeAt(t)-55296)*1024+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t):(e,t)=>e.codePointAt(t),Sr=/["&\'<>$\\x80-\\uFFFF]/g,Cr=new Map([[34,`"`],[38,`&`],[39,`'`],[60,`<`],[62,`>`]]);function wr(e){let t=``,n=0,r;for(;(r=Sr.exec(e))!==null;){let i=r.index,a=e.charCodeAt(i),o=Cr.get(a);o===void 0?(t+=`${e.substring(n,i)}&#x${xr(e,i).toString(16)};`,n=Sr.lastIndex+=Number((a&65408)==55296)):(t+=e.substring(n,i)+o,n=i+1)}return t+e.substr(n)}function Tr(e,t){return function(n){let r,i=0,a=``;for(;r=e.exec(n);)i!==r.index&&(a+=n.substring(i,r.index)),a+=t.get(r[0].charCodeAt(0)),i=r.index+1;return a+n.substring(i)}}let Er=Tr(/["&\\u00A0]/g,new Map([[34,`"`],[38,`&`],[160,` `]])),Dr=Tr(/[&<>\\u00A0]/g,new Map([[38,`&`],[60,`<`],[62,`>`],[160,` `]])),Or=new Map(`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.textPath`.split(`.`).map(e=>[e.toLowerCase(),e])),kr=new Map(`definitionURL.attributeName.attributeType.baseFrequency.baseProfile.calcMode.clipPathUnits.diffuseConstant.edgeMode.filterUnits.glyphRef.gradientTransform.gradientUnits.kernelMatrix.kernelUnitLength.keyPoints.keySplines.keyTimes.lengthAdjust.limitingConeAngle.markerHeight.markerUnits.markerWidth.maskContentUnits.maskUnits.numOctaves.pathLength.patternContentUnits.patternTransform.patternUnits.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.refX.refY.repeatCount.repeatDur.requiredExtensions.requiredFeatures.specularConstant.specularExponent.spreadMethod.startOffset.stdDeviation.stitchTiles.surfaceScale.systemLanguage.tableValues.targetX.targetY.textLength.viewBox.viewTarget.xChannelSelector.yChannelSelector.zoomAndPan`.split(`.`).map(e=>[e.toLowerCase(),e])),Ar=new Set([`style`,`script`,`xmp`,`iframe`,`noembed`,`noframes`,`plaintext`,`noscript`]);function jr(e){return e.replace(/"/g,`"`)}function Mr(e,t){if(!e)return;let n=(t.encodeEntities??t.decodeEntities)===!1?jr:t.xmlMode||t.encodeEntities!==`utf8`?wr:Er;return Object.keys(e).map(r=>{let i=e[r]??``;return t.xmlMode===`foreign`&&(r=kr.get(r)??r),!t.emptyAttrs&&!t.xmlMode&&i===``?r:`${r}="${n(i)}"`}).join(` `)}let Nr=new Set([`area`,`base`,`basefont`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`img`,`input`,`isindex`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`]);function Pr(e,t={}){let n=`length`in e?e:[e],r=``;for(let e=0;e`):(n+=`>`,e.children.length>0&&(n+=Pr(e.children,t)),(t.xmlMode||!Nr.has(e.name))&&(n+=``)),n}function zr(e){return`<${e.data}>`}function Br(e,t){let n=e.data||``;return(t.encodeEntities??t.decodeEntities)!==!1&&!(!t.xmlMode&&e.parent&&Ar.has(e.parent.name))&&(n=t.xmlMode||t.encodeEntities!==`utf8`?wr(n):Dr(n)),n}function Vr(e){return``}function Hr(e){return``}function Ur(e,t){return Pr(e,t)}function Wr(e,t){return hr(e)?e.children.map(e=>Ur(e,t)).join(``):``}function Gr(e){return Array.isArray(e)?e.map(Gr).join(``):lr(e)?e.name===`br`?`\n`:Gr(e.children):ur(e)?Gr(e.children):dr(e)?e.data:``}function Kr(e){return Array.isArray(e)?e.map(Kr).join(``):hr(e)&&!fr(e)?Kr(e.children):dr(e)?e.data:``}function qr(e){return Array.isArray(e)?e.map(qr).join(``):hr(e)&&(e.type===J.Tag||ur(e))?qr(e.children):dr(e)?e.data:``}function Jr(e){return hr(e)?e.children:[]}function Yr(e){return e.parent||null}function Xr(e){let t=Yr(e);if(t!=null)return Jr(t);let n=[e],{prev:r,next:i}=e;for(;r!=null;)n.unshift(r),{prev:r}=r;for(;i!=null;)n.push(i),{next:i}=i;return n}function Zr(e,t){return e.attribs?.[t]}function Qr(e,t){return e.attribs!=null&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&e.attribs[t]!=null}function $r(e){return e.name}function ei(e){let{next:t}=e;for(;t!==null&&!lr(t);)({next:t}=t);return t}function ti(e){let{prev:t}=e;for(;t!==null&&!lr(t);)({prev:t}=t);return t}function ni(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){let t=e.parent.children,n=t.lastIndexOf(e);n>=0&&t.splice(n,1)}e.next=null,e.prev=null,e.parent=null}function ri(e,t){let n=t.prev=e.prev;n&&(n.next=t);let r=t.next=e.next;r&&(r.prev=t);let i=t.parent=e.parent;if(i){let n=i.children;n[n.lastIndexOf(e)]=t,e.parent=null}}function ii(e,t){if(ni(t),t.next=null,t.parent=e,e.children.push(t)>1){let n=e.children[e.children.length-2];n.next=t,t.prev=n}else t.prev=null}function ai(e,t){ni(t);let{parent:n}=e,r=e.next;if(t.next=r,t.prev=e,e.next=t,t.parent=n,r){if(r.prev=t,n){let e=n.children;e.splice(e.lastIndexOf(r),0,t)}}else n&&n.children.push(t)}function oi(e,t){if(ni(t),t.parent=e,t.prev=null,e.children.unshift(t)!==1){let n=e.children[1];n.prev=t,t.next=n}else t.next=null}function si(e,t){ni(t);let{parent:n}=e;if(n){let r=n.children;r.splice(r.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=n,t.prev=e.prev,t.next=e,e.prev=t}function ci(e,t,n=!0,r=1/0){return li(e,Array.isArray(t)?t:[t],n,r)}function li(e,t,n,r){let i=[],a=[Array.isArray(t)?t:[t]],o=[0];for(;;){if(o[0]>=a[0].length){if(o.length===1)return i;a.shift(),o.shift();continue}let t=a[0][o[0]++];if(e(t)&&(i.push(t),--r<=0))return i;n&&hr(t)&&t.children.length>0&&(o.unshift(0),a.unshift(t.children))}}function ui(e,t){return t.find(e)}function di(e,t,n=!0){let r=Array.isArray(t)?t:[t];for(let t=0;t0){let t=di(e,i.children,!0);if(t)return t}}return null}function fi(e,t){return(Array.isArray(t)?t:[t]).some(t=>lr(t)&&e(t)||hr(t)&&fi(e,t.children))}function pi(e,t){let n=[],r=[Array.isArray(t)?t:[t]],i=[0];for(;;){if(i[0]>=r[0].length){if(r.length===1)return n;r.shift(),i.shift();continue}let t=r[0][i[0]++];lr(t)&&e(t)&&n.push(t),hr(t)&&t.children.length>0&&(i.unshift(0),r.unshift(t.children))}}let mi={tag_name(e){return typeof e==`function`?t=>lr(t)&&e(t.name):e===`*`?lr:t=>lr(t)&&t.name===e},tag_type(e){return typeof e==`function`?t=>e(t.type):t=>t.type===e},tag_contains(e){return typeof e==`function`?t=>dr(t)&&e(t.data):t=>dr(t)&&t.data===e}};function hi(e,t){return typeof t==`function`?n=>lr(n)&&t(n.attribs[e]):n=>lr(n)&&n.attribs[e]===t}function gi(e,t){return n=>e(n)||t(n)}function _i(e){let t=Object.keys(e).map(t=>{let n=e[t];return Object.prototype.hasOwnProperty.call(mi,t)?mi[t](n):hi(t,n)});return t.length===0?null:t.reduce(gi)}function vi(e,t){let n=_i(e);return n?n(t):!0}function yi(e,t,n,r=1/0){let i=_i(e);return i?ci(i,t,n,r):[]}function bi(e,t,n=!0){return Array.isArray(t)||(t=[t]),di(hi(`id`,e),t,n)}function xi(e,t,n=!0,r=1/0){return ci(mi.tag_name(e),t,n,r)}function Si(e,t,n=!0,r=1/0){return ci(hi(`class`,e),t,n,r)}function Ci(e,t,n=!0,r=1/0){return ci(mi.tag_type(e),t,n,r)}function wi(e){let t=e.length;for(;--t>=0;){let n=e[t];if(t>0&&e.lastIndexOf(n,t-1)>=0){e.splice(t,1);continue}for(let r=n.parent;r;r=r.parent)if(e.includes(r)){e.splice(t,1);break}}return e}var Ti;(function(e){e[e.DISCONNECTED=1]=`DISCONNECTED`,e[e.PRECEDING=2]=`PRECEDING`,e[e.FOLLOWING=4]=`FOLLOWING`,e[e.CONTAINS=8]=`CONTAINS`,e[e.CONTAINED_BY=16]=`CONTAINED_BY`})(Ti||={});function Ei(e,t){let n=[],r=[];if(e===t)return 0;let i=hr(e)?e:e.parent;for(;i;)n.unshift(i),i=i.parent;for(i=hr(t)?t:t.parent;i;)r.unshift(i),i=i.parent;let a=Math.min(n.length,r.length),o=0;for(;oc.indexOf(u)?s===t?Ti.FOLLOWING|Ti.CONTAINED_BY:Ti.FOLLOWING:s===e?Ti.PRECEDING|Ti.CONTAINS:Ti.PRECEDING}function Di(e){return e=e.filter((e,t,n)=>!n.includes(e,t+1)),e.sort((e,t)=>{let n=Ei(e,t);return n&Ti.PRECEDING?-1:n&Ti.FOLLOWING?1:0}),e}function Oi(e){let t=Pi(Li,e);return t?t.name===`feed`?ki(t):Ai(t):null}function ki(e){let t=e.children,n={type:`atom`,items:xi(`entry`,t).map(e=>{let{children:t}=e,n={media:Ni(t)};Ii(n,`id`,`id`,t),Ii(n,`title`,`title`,t);let r=Pi(`link`,t)?.attribs.href;r&&(n.link=r);let i=Fi(`summary`,t)||Fi(`content`,t);i&&(n.description=i);let a=Fi(`updated`,t);return a&&(n.pubDate=new Date(a)),n})};Ii(n,`id`,`id`,t),Ii(n,`title`,`title`,t);let r=Pi(`link`,t)?.attribs.href;r&&(n.link=r),Ii(n,`description`,`subtitle`,t);let i=Fi(`updated`,t);return i&&(n.updated=new Date(i)),Ii(n,`author`,`email`,t,!0),n}function Ai(e){let t=Pi(`channel`,e.children)?.children??[],n={type:e.name.substr(0,3),id:``,items:xi(`item`,e.children).map(e=>{let{children:t}=e,n={media:Ni(t)};Ii(n,`id`,`guid`,t),Ii(n,`title`,`title`,t),Ii(n,`link`,`link`,t),Ii(n,`description`,`description`,t);let r=Fi(`pubDate`,t)||Fi(`dc:date`,t);return r&&(n.pubDate=new Date(r)),n})};Ii(n,`title`,`title`,t),Ii(n,`link`,`link`,t),Ii(n,`description`,`description`,t);let r=Fi(`lastBuildDate`,t);return r&&(n.updated=new Date(r)),Ii(n,`author`,`managingEditor`,t,!0),n}let ji=[`url`,`type`,`lang`],Mi=[`fileSize`,`bitrate`,`framerate`,`samplingrate`,`channels`,`duration`,`height`,`width`];function Ni(e){return xi(`media:content`,e).map(e=>{let{attribs:t}=e,n={medium:t.medium,isDefault:!!t.isDefault};for(let e of ji)t[e]&&(n[e]=t[e]);for(let e of Mi)t[e]&&(n[e]=parseInt(t[e],10));return t.expression&&(n.expression=t.expression),n})}function Pi(e,t){return xi(e,t,!0,1)[0]}function Fi(e,t,n=!1){return Kr(xi(e,t,n,1)).trim()}function Ii(e,t,n,r,i=!1){let a=Fi(n,r,i);a&&(e[t]=a)}function Li(e){return e===`rss`||e===`feed`||e===`rdf:RDF`}var Ri=c({DocumentPosition:()=>Ti,append:()=>ai,appendChild:()=>ii,compareDocumentPosition:()=>Ei,existsOne:()=>fi,filter:()=>ci,find:()=>li,findAll:()=>pi,findOne:()=>di,findOneChild:()=>ui,getAttributeValue:()=>Zr,getChildren:()=>Jr,getElementById:()=>bi,getElements:()=>yi,getElementsByClassName:()=>Si,getElementsByTagName:()=>xi,getElementsByTagType:()=>Ci,getFeed:()=>Oi,getInnerHTML:()=>Wr,getName:()=>$r,getOuterHTML:()=>Ur,getParent:()=>Yr,getSiblings:()=>Xr,getText:()=>Gr,hasAttrib:()=>Qr,hasChildren:()=>hr,innerText:()=>qr,isCDATA:()=>ur,isComment:()=>fr,isDocument:()=>mr,isTag:()=>lr,isText:()=>dr,nextElementSibling:()=>ei,prepend:()=>si,prependChild:()=>oi,prevElementSibling:()=>ti,removeElement:()=>ni,removeSubsets:()=>wi,replaceElement:()=>ri,testElement:()=>vi,textContent:()=>Kr,uniqueSort:()=>Di}),zi=c({DefaultHandler:()=>yr,DomHandler:()=>yr,DomUtils:()=>Ri,ElementType:()=>Un,Parser:()=>Hn,QuoteType:()=>kn,Tokenizer:()=>jn,createDocumentStream:()=>Hi,createDomStream:()=>Ui,getFeed:()=>Oi,parseDOM:()=>Vi,parseDocument:()=>Bi,parseFeed:()=>Gi});function Bi(e,t){let n=new yr(void 0,t);return new Hn(n,t).end(e),n.root}function Vi(e,t){return Bi(e,t).children}function Hi(e,t,n){let r=new yr(t=>e(t,r.root),t,n);return new Hn(r,t)}function Ui(e,t,n){return new Hn(new yr(e,t,n),t)}let Wi={xmlMode:!0};function Gi(e,t=Wi){return Oi(Vi(e,t))}let Ki=new Set(`ARTICLE.ASIDE.BLOCKQUOTE.BODY.BR.BUTTON.CANVAS.CAPTION.COL.COLGROUP.DD.DIV.DL.DT.EMBED.FIELDSET.FIGCAPTION.FIGURE.FOOTER.FORM.H1.H2.H3.H4.H5.H6.LI.UL.OL.P`.split(`.`)),qi=`http://www.w3.org/2000/svg`,{assign:Ji,create:Yi,defineProperties:Xi,entries:Zi,getOwnPropertyDescriptors:Qi,keys:$i,setPrototypeOf:ea}=Object,ta=String,na=e=>e.nodeType===1?e[W]:e,ra=({ownerDocument:e})=>e[$t].ignoreCase,ia=(e,t)=>{e[G]=t,t[nn]=e},aa=(e,t,n)=>{ia(e,t),ia(na(t),n)},oa=(e,t,n,r)=>{ia(e,t),ia(na(n),r)},sa=(e,t,n)=>{ia(e,t),ia(t,n)},ca=({localName:e,ownerDocument:t})=>t[$t].ignoreCase?e.toUpperCase():e,la=(e,t)=>{e&&(e[G]=t),t&&(t[nn]=e)},ua=(e,t)=>{let n=e.createDocumentFragment(),r=e.createElement(``);r.innerHTML=t;let{firstChild:i,lastChild:a}=r;if(i){oa(n,i,a,n[W]);let e=i;do e.parentNode=n;while(e!==a&&(e=na(e)[G]))}return n},da=new WeakMap,fa=!1,pa=new WeakMap,ma=new WeakMap,ha=(e,t,n,r)=>{fa&&ma.has(e)&&e.attributeChangedCallback&&e.constructor.observedAttributes.includes(t)&&e.attributeChangedCallback(t,n,r)},ga=(e,t)=>n=>{if(ma.has(n)){let r=ma.get(n);r.connected!==t&&n.isConnected===t&&(r.connected=t,e in n&&n[e]())}},_a=ga(`connectedCallback`,!0),va=e=>{if(fa){_a(e),da.has(e)&&(e=da.get(e).shadowRoot);let{[G]:t,[W]:n}=e;for(;t!==n;)t.nodeType===1&&_a(t),t=t[G]}},ya=ga(`disconnectedCallback`,!1),ba=e=>{if(fa){ya(e),da.has(e)&&(e=da.get(e).shadowRoot);let{[G]:t,[W]:n}=e;for(;t!==n;)t.nodeType===1&&ya(t),t=t[G]}};var xa=class{constructor(e){this.ownerDocument=e,this.registry=new Map,this.waiting=new Map,this.active=!1}define(e,t,n={}){let{ownerDocument:r,registry:i,waiting:a}=this;if(i.has(e))throw Error(`unable to redefine `+e);if(pa.has(t))throw Error(`unable to redefine the same class: `+t);this.active=fa=!0;let{extends:o}=n;pa.set(t,{ownerDocument:r,options:{is:o?e:``},localName:o||e});let s=o?t=>t.localName===o&&t.getAttribute(`is`)===e:t=>t.localName===e;if(i.set(e,{Class:t,check:s}),a.has(e)){for(let n of a.get(e))n(t);a.delete(e)}r.querySelectorAll(o?`${o}[is="${e}"]`:e).forEach(this.upgrade,this)}upgrade(e){if(ma.has(e))return;let{ownerDocument:t,registry:n}=this,r=e.getAttribute(`is`)||e.localName;if(n.has(r)){let{Class:i,check:a}=n.get(r);if(a(e)){let{attributes:n,isConnected:a}=e;for(let t of n)e.removeAttributeNode(t);let o=Zi(e);for(let[t]of o)delete e[t];ea(e,i.prototype),t[cn]={element:e,values:o},new i(t,r),ma.set(e,{connected:a});for(let t of n)e.setAttributeNode(t);a&&e.connectedCallback&&e.connectedCallback()}}}whenDefined(e){let{registry:t,waiting:n}=this;return new Promise(r=>{t.has(e)?r(t.get(e).Class):(n.has(e)||n.set(e,[]),n.get(e).push(r))})}get(e){let t=this.registry.get(e);return t&&t.Class}getName(e){if(pa.has(e)){let{localName:t}=pa.get(e);return t}return null}};let{Parser:Sa}=zi,Ca=(e,t,n)=>{let r=e[W];return t.parentNode=e,aa(r[nn],t,r),n&&t.nodeType===1&&va(t),t},wa=(e,t,n,r,i)=>{n[ln]=r,n.ownerElement=e,sa(t[nn],n,t),n.name===`class`&&(e.className=r),i&&ha(e,n.name,null,r)},Ta=(e,t,n)=>{let{active:r,registry:i}=e[Gt],a=e,o=null,s=!1,c=new Sa({onprocessinginstruction(t,n){t.toLowerCase()===`!doctype`&&(e.doctype=n.slice(t.length).trim())},onopentag(n,s){let c=!0;if(t){if(o)a=Ca(a,e.createElementNS(qi,n),r),a.ownerSVGElement=o,c=!1;else if(n===`svg`||n===`SVG`)o=e.createElementNS(qi,n),a=Ca(a,o,r),c=!1;else if(r){let e=n.includes(`-`)?n:s.is||``;if(e&&i.has(e)){let{Class:t}=i.get(e);a=Ca(a,new t,r),delete s.is,c=!1}}}c&&(a=Ca(a,e.createElement(n),!1));let l=a[W];for(let t of $i(s))wa(a,l,e.createAttribute(t),s[t],r)},oncomment(t){Ca(a,e.createComment(t),r)},ontext(t){s?Ca(a,e.createCDATASection(t),r):Ca(a,e.createTextNode(t),r)},oncdatastart(){s=!0},oncdataend(){s=!1},onclosetag(){t&&a===o&&(o=null),a=a.parentNode}},{lowerCaseAttributeNames:!1,decodeEntities:!0,xmlMode:!t});return c.write(n),c.end(),e},Ea=new Map,Da=(e,t)=>{for(let n of[].concat(e))Ea.set(n,t),Ea.set(n.toUpperCase(),t)},Oa=({[G]:e,[W]:t},n)=>{for(;e!==t;){switch(e.nodeType){case 2:ka(e,n);break;case 3:case 8:case 4:Aa(e,n);break;case 1:Na(e,n),e=na(e);break;case 10:Ma(e,n);break}e=e[G]}let r=n.length-1,i=n[r];typeof i==`number`&&i<0?n[r]+=-1:n.push(-1)},ka=(e,t)=>{t.push(2,e.name);let n=e[ln].trim();n&&t.push(n)},Aa=(e,t)=>{let n=e[ln];n.trim()&&t.push(e.nodeType,n)},ja=(e,t)=>{t.push(e.nodeType),Oa(e,t)},Ma=({name:e,publicId:t,systemId:n},r)=>{r.push(10,e),t&&r.push(t),n&&r.push(n)},Na=(e,t)=>{t.push(1,e.localName),Oa(e,t)},Pa=(e,t,n,r,i,a,o)=>({type:e,target:t,addedNodes:r,removedNodes:i,attributeName:a,oldValue:o,previousSibling:n?.previousSibling||null,nextSibling:n?.nextSibling||null}),Fa=(e,t,n,r,i,a)=>{if(!r||r.includes(n)){let{callback:r,records:o,scheduled:s}=e;o.push(Pa(`attributes`,t,null,[],[],n,i?a:void 0)),s||(e.scheduled=!0,Promise.resolve().then(()=>{e.scheduled=!1,r(o.splice(0),e)}))}},Ia=(e,t,n)=>{let{ownerDocument:r}=e,{active:i,observers:a}=r[en];if(i){for(let i of a)for(let[a,{childList:o,subtree:s,attributes:c,attributeFilter:l,attributeOldValue:u}]of i.nodes)if(o){if(s&&(a===r||a.contains(e))||!s&&a.children.includes(e)){Fa(i,e,t,l,u,n);break}}else if(c&&a===e){Fa(i,e,t,l,u,n);break}}},La=(e,t)=>{let{ownerDocument:n}=e,{active:r,observers:i}=n[en];if(r){for(let r of i)for(let[i,{subtree:a,childList:o,characterData:s}]of r.nodes)if(o&&(t&&(i===t||a&&i.contains(t))||!t&&(a&&(i===n||i.contains(e))||!a&&i[s?`childNodes`:`children`].includes(e)))){let{callback:n,records:a,scheduled:o}=r;a.push(Pa(`childList`,i,e,t?[]:[e],t?[e]:[])),o||(r.scheduled=!0,Promise.resolve().then(()=>{r.scheduled=!1,n(a.splice(0),r)}));break}}};var Ra=class{constructor(e){let t=new Set;this.observers=t,this.active=!1,this.class=class{constructor(e){this.callback=e,this.nodes=new Map,this.records=[],this.scheduled=!1}disconnect(){this.records.splice(0),this.nodes.clear(),t.delete(this),e[en].active=!!t.size}observe(n,r={subtree:!1,childList:!1,attributes:!1,attributeFilter:null,attributeOldValue:!1,characterData:!1}){(`attributeOldValue`in r||`attributeFilter`in r)&&(r.attributes=!0),r.childList=!!r.childList,r.subtree=!!r.subtree,this.nodes.set(n,r),t.add(this),e[en].active=!0}takeRecords(){return this.records.splice(0)}}}};let za=new Set(`allowfullscreen.allowpaymentrequest.async.autofocus.autoplay.checked.class.contenteditable.controls.default.defer.disabled.draggable.formnovalidate.hidden.id.ismap.itemscope.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.selected.style.truespeed`.split(`.`)),Ba=(e,t)=>{let{[ln]:n,name:r}=t;t.ownerElement=e,sa(e,t,e[G]),r===`class`&&(e.className=n),Ia(e,r,null),ha(e,r,null,n)},Va=(e,t)=>{let{[ln]:n,name:r}=t;ia(t[nn],t[G]),t.ownerElement=t[nn]=t[G]=null,r===`class`&&(e[Wt]=null),Ia(e,r,n),ha(e,r,n,null)},Ha={get(e,t){return e.hasAttribute(t)},set(e,t,n){n?e.setAttribute(t,``):e.removeAttribute(t)}},Ua={get(e,t){return parseFloat(e.getAttribute(t)||0)},set(e,t,n){e.setAttribute(t,n)}},Y={get(e,t){return e.getAttribute(t)||``},set(e,t,n){e.setAttribute(t,n)}},Wa=new WeakMap;function Ga(e,t){return typeof t==`function`?t.call(e.target,e):t.handleEvent(e),e._stopImmediatePropagationFlag}function Ka({currentTarget:e,target:t}){let n=Wa.get(e);if(n&&n.has(this.type)){let r=n.get(this.type);e===t?this.eventPhase=this.AT_TARGET:this.eventPhase=this.BUBBLING_PHASE,this.currentTarget=e,this.target=t;for(let[e,t]of r)if(t&&t.once&&r.delete(e),Ga(this,e))break;return delete this.currentTarget,delete this.target,this.cancelBubble}}var qa=class{constructor(){Wa.set(this,new Map)}_getParent(){return null}addEventListener(e,t,n){let r=Wa.get(this);r.has(e)||r.set(e,new Map),r.get(e).set(t,n)}removeEventListener(e,t){let n=Wa.get(this);if(n.has(e)){let r=n.get(e);r.delete(t)&&!r.size&&n.delete(e)}}dispatchEvent(e){let t=this;for(e.eventPhase=e.CAPTURING_PHASE;t;)t.dispatchEvent&&e._path.push({currentTarget:t,target:this}),t=e.bubbles&&t._getParent&&t._getParent();return e._path.some(Ka,e),e._path=[],e.eventPhase=e.NONE,!e.defaultPrevented}},Ja=class extends Array{item(e){return e{let t=0;for(;e;)t++,e=e.parentNode;return t};var Xa=class extends qa{static get ELEMENT_NODE(){return 1}static get ATTRIBUTE_NODE(){return 2}static get TEXT_NODE(){return 3}static get CDATA_SECTION_NODE(){return 4}static get COMMENT_NODE(){return 8}static get DOCUMENT_NODE(){return 9}static get DOCUMENT_FRAGMENT_NODE(){return 11}static get DOCUMENT_TYPE_NODE(){return 10}constructor(e,t,n){super(),this.ownerDocument=e,this.localName=t,this.nodeType=n,this.parentNode=null,this[G]=null,this[nn]=null}get ELEMENT_NODE(){return 1}get ATTRIBUTE_NODE(){return 2}get TEXT_NODE(){return 3}get CDATA_SECTION_NODE(){return 4}get COMMENT_NODE(){return 8}get DOCUMENT_NODE(){return 9}get DOCUMENT_FRAGMENT_NODE(){return 11}get DOCUMENT_TYPE_NODE(){return 10}get baseURI(){let e=this.nodeType===9?this:this.ownerDocument;if(e){let t=e.querySelector(`base`);if(t)return t.getAttribute(`href`);let{location:n}=e.defaultView;if(n)return n.href}return null}get isConnected(){return!1}get nodeName(){return this.localName}get parentElement(){return null}get previousSibling(){return null}get previousElementSibling(){return null}get nextSibling(){return null}get nextElementSibling(){return null}get childNodes(){return new Ja}get firstChild(){return null}get lastChild(){return null}get nodeValue(){return null}set nodeValue(e){}get textContent(){return null}set textContent(e){}normalize(){}cloneNode(){return null}contains(){return!1}insertBefore(e,t){return e}appendChild(e){return e}replaceChild(e,t){return t}removeChild(e){return e}toString(){return``}hasChildNodes(){return!!this.lastChild}isSameNode(e){return this===e}compareDocumentPosition(e){let t=0;if(this!==e){let n=Ya(this),r=Ya(e);if(ne.isEqualNode(n[t]))}}return this.toString()===e.toString()}return!1}_getParent(){return this.parentNode}getRootNode(){let e=this;for(;e.parentNode;)e=e.parentNode;return e}};let{replace:Za}=``,Qa=/[<>&\\xA0]/g,$a={"\\xA0":` `,"&":`&`,"<":`<`,">":`>`},eo=e=>$a[e],to=e=>Za.call(e,Qa,eo),no=/"/g;var ro=class e extends Xa{constructor(e,t,n=``){super(e,t,2),this.ownerElement=null,this.name=ta(t),this[ln]=ta(n),this[Ut]=!1}get value(){return this[ln]}set value(e){let{[ln]:t,name:n,ownerElement:r}=this;this[ln]=ta(e),this[Ut]=!0,r&&(Ia(r,n,t),ha(r,n,t,this[ln]))}cloneNode(){let{ownerDocument:t,name:n,[ln]:r}=this;return new e(t,n,r)}toString(){let{name:e,[ln]:t}=this;return za.has(e)&&!t?ra(this)?e:`${e}=""`:`${e}="${(ra(this)?t:to(t)).replace(no,`"`)}"`}toJSON(){let e=[];return ka(this,e),e}};let io=({ownerDocument:e,parentNode:t})=>{for(;t;){if(t===e)return!0;t=t.parentNode||t.host}return!1},ao=({parentNode:e})=>{if(e)switch(e.nodeType){case 9:case 11:return null}return e},oo=({[nn]:e})=>{switch(e?e.nodeType:0){case-1:return e[on];case 3:case 8:case 4:return e}return null},so=e=>{let t=na(e)[G];return t&&(t.nodeType===-1?null:t)},co=e=>{let t=so(e);for(;t&&t.nodeType!==1;)t=so(t);return t},lo=e=>{let t=oo(e);for(;t&&t.nodeType!==1;)t=oo(t);return t},uo=(e,t)=>{let n=e.createDocumentFragment();return n.append(...t),n},fo=(e,t)=>{let{ownerDocument:n,parentNode:r}=e;r&&r.insertBefore(uo(n,t),e)},po=(e,t)=>{let{ownerDocument:n,parentNode:r}=e;r&&r.insertBefore(uo(n,t),na(e)[G])},mo=(e,t)=>{let{ownerDocument:n,parentNode:r}=e;r&&(t.includes(e)&&mo(e,[e=e.cloneNode()]),r.insertBefore(uo(n,t),e),e.remove())},ho=(e,t,n)=>{let{parentNode:r,nodeType:i}=t;(e||n)&&(la(e,n),t[nn]=null,na(t)[G]=null),r&&(t.parentNode=null,La(t,r),i===1&&ba(t))};var go=class extends Xa{constructor(e,t,n,r){super(e,t,n),this[ln]=ta(r)}get isConnected(){return io(this)}get parentElement(){return ao(this)}get previousSibling(){return oo(this)}get nextSibling(){return so(this)}get previousElementSibling(){return lo(this)}get nextElementSibling(){return co(this)}before(...e){fo(this,e)}after(...e){po(this,e)}replaceWith(...e){mo(this,e)}remove(){ho(this[nn],this,this[G])}get data(){return this[ln]}set data(e){this[ln]=ta(e),La(this,this.parentNode)}get nodeValue(){return this.data}set nodeValue(e){this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}get length(){return this.data.length}substringData(e,t){return this.data.substr(e,t)}appendData(e){this.data+=e}insertData(e,t){let{data:n}=this;this.data=n.slice(0,e)+t+n.slice(e)}deleteData(e,t){let{data:n}=this;this.data=n.slice(0,e)+n.slice(e+t)}replaceData(e,t,n){let{data:r}=this;this.data=r.slice(0,e)+n+r.slice(e+t)}toJSON(){let e=[];return Aa(this,e),e}},_o=class e extends go{constructor(e,t=``){super(e,`#cdatasection`,4,t)}cloneNode(){let{ownerDocument:t,[ln]:n}=this;return new e(t,n)}toString(){return``}},vo=class e extends go{constructor(e,t=``){super(e,`#comment`,8,t)}cloneNode(){let{ownerDocument:t,[ln]:n}=this;return new e(t,n)}toString(){return``}};function yo(e){return Wn(e)}function bo(e){return e.type===J.CDATA}function xo(e){return e.type===J.Text}function So(e){return e.type===J.Comment}function Co(e){return e.type===J.Root}function wo(e){return Object.prototype.hasOwnProperty.call(e,`children`)}function To(e,t){return Pr(e,t)}function Eo(e,t){return wo(e)?e.children.map(e=>To(e,t)).join(``):``}function Do(e){return Array.isArray(e)?e.map(Do).join(``):yo(e)?e.name===`br`?`\n`:Do(e.children):bo(e)?Do(e.children):xo(e)?e.data:``}function Oo(e){return Array.isArray(e)?e.map(Oo).join(``):wo(e)&&!So(e)?Oo(e.children):xo(e)?e.data:``}function ko(e){return Array.isArray(e)?e.map(ko).join(``):wo(e)&&(e.type===J.Tag||bo(e))?ko(e.children):xo(e)?e.data:``}function Ao(e){return wo(e)?e.children:[]}function jo(e){return e.parent||null}function Mo(e){let t=jo(e);if(t!=null)return Ao(t);let n=[e],{prev:r,next:i}=e;for(;r!=null;)n.unshift(r),{prev:r}=r;for(;i!=null;)n.push(i),{next:i}=i;return n}function No(e,t){return e.attribs?.[t]}function Po(e,t){return e.attribs!=null&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&e.attribs[t]!=null}function Fo(e){return e.name}function Io(e){let{next:t}=e;for(;t!==null&&!yo(t);)({next:t}=t);return t}function Lo(e){let{prev:t}=e;for(;t!==null&&!yo(t);)({prev:t}=t);return t}function Ro(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){let t=e.parent.children;t.splice(t.lastIndexOf(e),1)}}function zo(e,t){let n=t.prev=e.prev;n&&(n.next=t);let r=t.next=e.next;r&&(r.prev=t);let i=t.parent=e.parent;if(i){let n=i.children;n[n.lastIndexOf(e)]=t,e.parent=null}}function Bo(e,t){if(Ro(t),t.next=null,t.parent=e,e.children.push(t)>1){let n=e.children[e.children.length-2];n.next=t,t.prev=n}else t.prev=null}function Vo(e,t){Ro(t);let{parent:n}=e,r=e.next;if(t.next=r,t.prev=e,e.next=t,t.parent=n,r){if(r.prev=t,n){let e=n.children;e.splice(e.lastIndexOf(r),0,t)}}else n&&n.children.push(t)}function Ho(e,t){if(Ro(t),t.parent=e,t.prev=null,e.children.unshift(t)!==1){let n=e.children[1];n.prev=t,t.next=n}else t.next=null}function Uo(e,t){Ro(t);let{parent:n}=e;if(n){let r=n.children;r.splice(r.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=n,t.prev=e.prev,t.next=e,e.prev=t}function Wo(e,t,n=!0,r=1/0){return Array.isArray(t)||(t=[t]),Go(e,t,n,r)}function Go(e,t,n,r){let i=[];for(let a of t){if(e(a)&&(i.push(a),--r<=0))break;if(n&&wo(a)&&a.children.length>0){let t=Go(e,a.children,n,r);if(i.push(...t),r-=t.length,r<=0)break}}return i}function Ko(e,t){return t.find(e)}function qo(e,t,n=!0){let r=null;for(let i=0;i0&&(r=qo(e,a.children,!0));else continue}return r}function Jo(e,t){return t.some(t=>yo(t)&&(e(t)||t.children.length>0&&Jo(e,t.children)))}function Yo(e,t){let n=[],r=t.filter(yo),i;for(;i=r.shift();){let t=i.children?.filter(yo);t&&t.length>0&&r.unshift(...t),e(i)&&n.push(i)}return n}let Xo={tag_name(e){return typeof e==`function`?t=>yo(t)&&e(t.name):e===`*`?yo:t=>yo(t)&&t.name===e},tag_type(e){return typeof e==`function`?t=>e(t.type):t=>t.type===e},tag_contains(e){return typeof e==`function`?t=>xo(t)&&e(t.data):t=>xo(t)&&t.data===e}};function Zo(e,t){return typeof t==`function`?n=>yo(n)&&t(n.attribs[e]):n=>yo(n)&&n.attribs[e]===t}function Qo(e,t){return n=>e(n)||t(n)}function $o(e){let t=Object.keys(e).map(t=>{let n=e[t];return Object.prototype.hasOwnProperty.call(Xo,t)?Xo[t](n):Zo(t,n)});return t.length===0?null:t.reduce(Qo)}function es(e,t){let n=$o(e);return n?n(t):!0}function ts(e,t,n,r=1/0){let i=$o(e);return i?Wo(i,t,n,r):[]}function ns(e,t,n=!0){return Array.isArray(t)||(t=[t]),qo(Zo(`id`,e),t,n)}function rs(e,t,n=!0,r=1/0){return Wo(Xo.tag_name(e),t,n,r)}function is(e,t,n=!0,r=1/0){return Wo(Xo.tag_type(e),t,n,r)}function as(e){let t=e.length;for(;--t>=0;){let n=e[t];if(t>0&&e.lastIndexOf(n,t-1)>=0){e.splice(t,1);continue}for(let r=n.parent;r;r=r.parent)if(e.includes(r)){e.splice(t,1);break}}return e}var os;(function(e){e[e.DISCONNECTED=1]=`DISCONNECTED`,e[e.PRECEDING=2]=`PRECEDING`,e[e.FOLLOWING=4]=`FOLLOWING`,e[e.CONTAINS=8]=`CONTAINS`,e[e.CONTAINED_BY=16]=`CONTAINED_BY`})(os||={});function ss(e,t){let n=[],r=[];if(e===t)return 0;let i=wo(e)?e:e.parent;for(;i;)n.unshift(i),i=i.parent;for(i=wo(t)?t:t.parent;i;)r.unshift(i),i=i.parent;let a=Math.min(n.length,r.length),o=0;for(;oc.indexOf(u)?s===t?os.FOLLOWING|os.CONTAINED_BY:os.FOLLOWING:s===e?os.PRECEDING|os.CONTAINS:os.PRECEDING}function cs(e){return e=e.filter((e,t,n)=>!n.includes(e,t+1)),e.sort((e,t)=>{let n=ss(e,t);return n&os.PRECEDING?-1:n&os.FOLLOWING?1:0}),e}function ls(e){let t=hs(vs,e);return t?t.name===`feed`?us(t):ds(t):null}function us(e){let t=e.children,n={type:`atom`,items:rs(`entry`,t).map(e=>{let{children:t}=e,n={media:ms(t)};_s(n,`id`,`id`,t),_s(n,`title`,`title`,t);let r=hs(`link`,t)?.attribs.href;r&&(n.link=r);let i=gs(`summary`,t)||gs(`content`,t);i&&(n.description=i);let a=gs(`updated`,t);return a&&(n.pubDate=new Date(a)),n})};_s(n,`id`,`id`,t),_s(n,`title`,`title`,t);let r=hs(`link`,t)?.attribs.href;r&&(n.link=r),_s(n,`description`,`subtitle`,t);let i=gs(`updated`,t);return i&&(n.updated=new Date(i)),_s(n,`author`,`email`,t,!0),n}function ds(e){let t=hs(`channel`,e.children)?.children??[],n={type:e.name.substr(0,3),id:``,items:rs(`item`,e.children).map(e=>{let{children:t}=e,n={media:ms(t)};_s(n,`id`,`guid`,t),_s(n,`title`,`title`,t),_s(n,`link`,`link`,t),_s(n,`description`,`description`,t);let r=gs(`pubDate`,t);return r&&(n.pubDate=new Date(r)),n})};_s(n,`title`,`title`,t),_s(n,`link`,`link`,t),_s(n,`description`,`description`,t);let r=gs(`lastBuildDate`,t);return r&&(n.updated=new Date(r)),_s(n,`author`,`managingEditor`,t,!0),n}let fs=[`url`,`type`,`lang`],ps=[`fileSize`,`bitrate`,`framerate`,`samplingrate`,`channels`,`duration`,`height`,`width`];function ms(e){return rs(`media:content`,e).map(e=>{let{attribs:t}=e,n={medium:t.medium,isDefault:!!t.isDefault};for(let e of fs)t[e]&&(n[e]=t[e]);for(let e of ps)t[e]&&(n[e]=parseInt(t[e],10));return t.expression&&(n.expression=t.expression),n})}function hs(e,t){return rs(e,t,!0,1)[0]}function gs(e,t,n=!1){return Oo(rs(e,t,n,1)).trim()}function _s(e,t,n,r,i=!1){let a=gs(n,r,i);a&&(e[t]=a)}function vs(e){return e===`rss`||e===`feed`||e===`rdf:RDF`}var ys=c({DocumentPosition:()=>os,append:()=>Vo,appendChild:()=>Bo,compareDocumentPosition:()=>ss,existsOne:()=>Jo,filter:()=>Wo,find:()=>Go,findAll:()=>Yo,findOne:()=>qo,findOneChild:()=>Ko,getAttributeValue:()=>No,getChildren:()=>Ao,getElementById:()=>ns,getElements:()=>ts,getElementsByTagName:()=>rs,getElementsByTagType:()=>is,getFeed:()=>ls,getInnerHTML:()=>Eo,getName:()=>Fo,getOuterHTML:()=>To,getParent:()=>jo,getSiblings:()=>Mo,getText:()=>Do,hasAttrib:()=>Po,hasChildren:()=>wo,innerText:()=>ko,isCDATA:()=>bo,isComment:()=>So,isDocument:()=>Co,isTag:()=>yo,isText:()=>xo,nextElementSibling:()=>Io,prepend:()=>Uo,prependChild:()=>Ho,prevElementSibling:()=>Lo,removeElement:()=>Ro,removeSubsets:()=>as,replaceElement:()=>zo,testElement:()=>es,textContent:()=>Oo,uniqueSort:()=>cs}),bs=s(((e,t)=>{t.exports={trueFunc:function(){return!0},falseFunc:function(){return!1}}})),X;(function(e){e.Attribute=`attribute`,e.Pseudo=`pseudo`,e.PseudoElement=`pseudo-element`,e.Tag=`tag`,e.Universal=`universal`,e.Adjacent=`adjacent`,e.Child=`child`,e.Descendant=`descendant`,e.Parent=`parent`,e.Sibling=`sibling`,e.ColumnCombinator=`column-combinator`})(X||={});var xs;(function(e){e.Any=`any`,e.Element=`element`,e.End=`end`,e.Equals=`equals`,e.Exists=`exists`,e.Hyphen=`hyphen`,e.Not=`not`,e.Start=`start`})(xs||={});let Ss=/^[^\\\\#]?(?:\\\\(?:[\\da-f]{1,6}\\s?|.)|[\\w\\-\\u00b0-\\uFFFF])+/,Cs=/\\\\([\\da-f]{1,6}\\s?|(\\s)|.)/gi,ws=new Map([[126,xs.Element],[94,xs.Start],[36,xs.End],[42,xs.Any],[33,xs.Not],[124,xs.Hyphen]]),Ts=new Set([`has`,`not`,`matches`,`is`,`where`,`host`,`host-context`]);function Es(e){switch(e.type){case X.Adjacent:case X.Child:case X.Descendant:case X.Parent:case X.Sibling:case X.ColumnCombinator:return!0;default:return!1}}let Ds=new Set([`contains`,`icontains`]);function Os(e,t,n){let r=parseInt(t,16)-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,r&1023|56320)}function ks(e){return e.replace(Cs,Os)}function As(e){return e===39||e===34}function js(e){return e===32||e===9||e===10||e===12||e===13}function Ms(e){let t=[],n=Ns(t,`${e}`,0);if(n0&&n0&&Es(r[r.length-1]))throw Error(`Did not expect successive traversals.`)}function l(e){if(r.length>0&&r[r.length-1].type===X.Descendant){r[r.length-1].type=e;return}c(),r.push({type:e})}function u(e,t){r.push({type:X.Attribute,name:e,action:t,value:i(1),namespace:null,ignoreCase:`quirks`})}function d(){if(r.length&&r[r.length-1].type===X.Descendant&&r.pop(),r.length===0)throw Error(`Empty sub-selector`);e.push(r)}if(a(0),t.length===n)return n;loop:for(;n=0&&r>=1)):e.type===X.Pseudo&&(e.data?e.name===`has`||e.name===`contains`?t=0:Array.isArray(e.data)?(t=Math.min(...e.data.map(e=>Math.min(...e.map(Rs)))),t<0&&(t=0)):t=2:t=3),t}let zs=/[-[\\]{}()*+?.,\\\\^$|#\\s]/g;function Bs(e){return e.replace(zs,`\\\\$&`)}let Vs=new Set(`accept.accept-charset.align.alink.axis.bgcolor.charset.checked.clear.codetype.color.compact.declare.defer.dir.direction.disabled.enctype.face.frame.hreflang.http-equiv.lang.language.link.media.method.multiple.nohref.noresize.noshade.nowrap.readonly.rel.rev.rules.scope.scrolling.selected.shape.target.text.type.valign.valuetype.vlink`.split(`.`));function Hs(e,t){return typeof e.ignoreCase==`boolean`?e.ignoreCase:e.ignoreCase===`quirks`?!!t.quirksMode:!t.xmlMode&&Vs.has(e.name)}let Us={equals(e,t,n){let{adapter:r}=n,{name:i}=t,{value:a}=t;return Hs(t,n)?(a=a.toLowerCase(),t=>{let n=r.getAttributeValue(t,i);return n!=null&&n.length===a.length&&n.toLowerCase()===a&&e(t)}):t=>r.getAttributeValue(t,i)===a&&e(t)},hyphen(e,t,n){let{adapter:r}=n,{name:i}=t,{value:a}=t,o=a.length;return Hs(t,n)?(a=a.toLowerCase(),function(t){let n=r.getAttributeValue(t,i);return n!=null&&(n.length===o||n.charAt(o)===`-`)&&n.substr(0,o).toLowerCase()===a&&e(t)}):function(t){let n=r.getAttributeValue(t,i);return n!=null&&(n.length===o||n.charAt(o)===`-`)&&n.substr(0,o)===a&&e(t)}},element(e,t,n){let{adapter:r}=n,{name:i,value:a}=t;if(/\\s/.test(a))return Z.default.falseFunc;let o=RegExp(`(?:^|\\\\s)${Bs(a)}(?:$|\\\\s)`,Hs(t,n)?`i`:``);return function(t){let n=r.getAttributeValue(t,i);return n!=null&&n.length>=a.length&&o.test(n)&&e(t)}},exists(e,{name:t},{adapter:n}){return r=>n.hasAttrib(r,t)&&e(r)},start(e,t,n){let{adapter:r}=n,{name:i}=t,{value:a}=t,o=a.length;return o===0?Z.default.falseFunc:Hs(t,n)?(a=a.toLowerCase(),t=>{let n=r.getAttributeValue(t,i);return n!=null&&n.length>=o&&n.substr(0,o).toLowerCase()===a&&e(t)}):t=>!!r.getAttributeValue(t,i)?.startsWith(a)&&e(t)},end(e,t,n){let{adapter:r}=n,{name:i}=t,{value:a}=t,o=-a.length;return o===0?Z.default.falseFunc:Hs(t,n)?(a=a.toLowerCase(),t=>r.getAttributeValue(t,i)?.substr(o).toLowerCase()===a&&e(t)):t=>!!r.getAttributeValue(t,i)?.endsWith(a)&&e(t)},any(e,t,n){let{adapter:r}=n,{name:i,value:a}=t;if(a===``)return Z.default.falseFunc;if(Hs(t,n)){let t=new RegExp(Bs(a),`i`);return function(n){let o=r.getAttributeValue(n,i);return o!=null&&o.length>=a.length&&t.test(o)&&e(n)}}return t=>!!r.getAttributeValue(t,i)?.includes(a)&&e(t)},not(e,t,n){let{adapter:r}=n,{name:i}=t,{value:a}=t;return a===``?t=>!!r.getAttributeValue(t,i)&&e(t):Hs(t,n)?(a=a.toLowerCase(),t=>{let n=r.getAttributeValue(t,i);return(n==null||n.length!==a.length||n.toLowerCase()!==a)&&e(t)}):t=>r.getAttributeValue(t,i)!==a&&e(t)}},Ws=new Set([9,10,12,13,32]);function Gs(e){if(e=e.trim().toLowerCase(),e===`even`)return[2,0];if(e===`odd`)return[2,1];let t=0,n=0,r=a(),i=o();if(t=48&&e.charCodeAt(t)<=57;)r=r*10+(e.charCodeAt(t)-48),t++;return t===n?null:r}function s(){for(;te<=n;if(t===0)return e=>e===n;if(t===1)return n<0?Z.default.trueFunc:e=>e>=n;let r=Math.abs(t),i=(n%r+r)%r;return t>1?e=>e>=n&&e%r===i:e=>e<=n&&e%r===i}function qs(e){return Ks(Gs(e))}function Js(e,t){return n=>{let r=t.getParent(n);return r!=null&&t.isTag(r)&&e(n)}}let Ys={contains(e,t,{adapter:n}){return function(r){return e(r)&&n.getText(r).includes(t)}},icontains(e,t,{adapter:n}){let r=t.toLowerCase();return function(t){return e(t)&&n.getText(t).toLowerCase().includes(r)}},"nth-child"(e,t,{adapter:n,equals:r}){let i=qs(t);return i===Z.default.falseFunc?Z.default.falseFunc:i===Z.default.trueFunc?Js(e,n):function(t){let a=n.getSiblings(t),o=0;for(let e=0;e=0&&!r(t,a[e]);e--)n.isTag(a[e])&&o++;return i(o)&&e(t)}},"nth-of-type"(e,t,{adapter:n,equals:r}){let i=qs(t);return i===Z.default.falseFunc?Z.default.falseFunc:i===Z.default.trueFunc?Js(e,n):function(t){let a=n.getSiblings(t),o=0;for(let e=0;e=0;e--){let i=a[e];if(r(t,i))break;n.isTag(i)&&n.getName(i)===n.getName(t)&&o++}return i(o)&&e(t)}},root(e,t,{adapter:n}){return t=>{let r=n.getParent(t);return(r==null||!n.isTag(r))&&e(t)}},scope(e,t,n,r){let{equals:i}=n;return!r||r.length===0?Ys.root(e,t,n):r.length===1?t=>i(r[0],t)&&e(t):t=>r.includes(t)&&e(t)},hover:Xs(`isHovered`),visited:Xs(`isVisited`),active:Xs(`isActive`)};function Xs(e){return function(t,n,{adapter:r}){let i=r[e];return typeof i==`function`?function(e){return i(e)&&t(e)}:Z.default.falseFunc}}let Zs={empty(e,{adapter:t}){return!t.getChildren(e).some(e=>t.isTag(e)||t.getText(e)!==``)},"first-child"(e,{adapter:t,equals:n}){if(t.prevElementSibling)return t.prevElementSibling(e)==null;let r=t.getSiblings(e).find(e=>t.isTag(e));return r!=null&&n(e,r)},"last-child"(e,{adapter:t,equals:n}){let r=t.getSiblings(e);for(let i=r.length-1;i>=0;i--){if(n(e,r[i]))return!0;if(t.isTag(r[i]))break}return!1},"first-of-type"(e,{adapter:t,equals:n}){let r=t.getSiblings(e),i=t.getName(e);for(let a=0;a=0;a--){let o=r[a];if(n(e,o))return!0;if(t.isTag(o)&&t.getName(o)===i)break}return!1},"only-of-type"(e,{adapter:t,equals:n}){let r=t.getName(e);return t.getSiblings(e).every(i=>n(e,i)||!t.isTag(i)||t.getName(i)!==r)},"only-child"(e,{adapter:t,equals:n}){return t.getSiblings(e).every(r=>n(e,r)||!t.isTag(r))}};function Qs(e,t,n,r){if(n===null){if(e.length>r)throw Error(`Pseudo-class :${t} requires an argument`)}else if(e.length===r)throw Error(`Pseudo-class :${t} doesn\'t have any arguments`)}let $s={"any-link":`:is(a, area, link)[href]`,link:`:any-link:not(:visited)`,disabled:`:is(\n :is(button, input, select, textarea, optgroup, option)[disabled],\n optgroup[disabled] > option,\n fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)\n )`,enabled:`:not(:disabled)`,checked:`:is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)`,required:`:is(input, select, textarea)[required]`,optional:`:is(input, select, textarea):not([required])`,selected:`option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)`,checkbox:`[type=checkbox]`,file:`[type=file]`,password:`[type=password]`,radio:`[type=radio]`,reset:`[type=reset]`,image:`[type=image]`,submit:`[type=submit]`,parent:`:not(:empty)`,header:`:is(h1, h2, h3, h4, h5, h6)`,button:`:is(button, input[type=button])`,input:`:is(input, textarea, select, button)`,text:`input:is(:not([type!=\'\']), [type=text])`},ec={};function tc(e,t){return e===Z.default.falseFunc?Z.default.falseFunc:n=>t.isTag(n)&&e(n)}function nc(e,t){let n=t.getSiblings(e);if(n.length<=1)return[];let r=n.indexOf(e);return r<0||r===n.length-1?[]:n.slice(r+1).filter(t.isTag)}function rc(e){return{xmlMode:!!e.xmlMode,lowerCaseAttributeNames:!!e.lowerCaseAttributeNames,lowerCaseTags:!!e.lowerCaseTags,quirksMode:!!e.quirksMode,cacheResults:!!e.cacheResults,pseudos:e.pseudos,adapter:e.adapter,equals:e.equals}}let ic=(e,t,n,r,i)=>{let a=i(t,rc(n),r);return a===Z.default.trueFunc?e:a===Z.default.falseFunc?Z.default.falseFunc:t=>a(t)&&e(t)},ac={is:ic,matches:ic,where:ic,not(e,t,n,r,i){let a=i(t,rc(n),r);return a===Z.default.falseFunc?e:a===Z.default.trueFunc?Z.default.falseFunc:t=>!a(t)&&e(t)},has(e,t,n,r,i){let{adapter:a}=n,o=rc(n);o.relativeSelector=!0;let s=t.some(e=>e.some(Fs))?[ec]:void 0,c=i(t,o,s);if(c===Z.default.falseFunc)return Z.default.falseFunc;let l=tc(c,a);if(s&&c!==Z.default.trueFunc){let{shouldTestNextSiblings:t=!1}=c;return n=>{if(!e(n))return!1;s[0]=n;let r=a.getChildren(n),i=t?[...r,...nc(n,a)]:r;return a.existsOne(l,i)}}return t=>e(t)&&a.existsOne(l,a.getChildren(t))}};function oc(e,t,n,r,i){let{name:a,data:o}=t;if(Array.isArray(o)){if(!(a in ac))throw Error(`Unknown pseudo-class :${a}(${o})`);return ac[a](e,o,n,r,i)}let s=n.pseudos?.[a],c=typeof s==`string`?s:$s[a];if(typeof c==`string`){if(o!=null)throw Error(`Pseudo ${a} doesn\'t have any arguments`);let t=Ms(c);return ac.is(e,t,n,r,i)}if(typeof s==`function`)return Qs(s,a,o,1),t=>s(t,o)&&e(t);if(a in Ys)return Ys[a](e,o,n,r);if(a in Zs){let t=Zs[a];return Qs(t,a,o,2),r=>t(r,n,o)&&e(r)}throw Error(`Unknown pseudo-class :${a}`)}function sc(e,t){let n=t.getParent(e);return n&&t.isTag(n)?n:null}function cc(e,t,n,r,i){let{adapter:a,equals:o}=n;switch(t.type){case X.PseudoElement:throw Error(`Pseudo-elements are not supported by css-select`);case X.ColumnCombinator:throw Error(`Column combinators are not yet supported by css-select`);case X.Attribute:if(t.namespace!=null)throw Error(`Namespaced attributes are not yet supported by css-select`);return(!n.xmlMode||n.lowerCaseAttributeNames)&&(t.name=t.name.toLowerCase()),Us[t.action](e,t,n);case X.Pseudo:return oc(e,t,n,r,i);case X.Tag:{if(t.namespace!=null)throw Error(`Namespaced tag names are not yet supported by css-select`);let{name:r}=t;return(!n.xmlMode||n.lowerCaseTags)&&(r=r.toLowerCase()),function(t){return a.getName(t)===r&&e(t)}}case X.Descendant:{if(n.cacheResults===!1||typeof WeakSet>`u`)return function(t){let n=t;for(;n=sc(n,a);)if(e(n))return!0;return!1};let t=new WeakSet;return function(n){let r=n;for(;r=sc(r,a);)if(!t.has(r)){if(a.isTag(r)&&e(r))return!0;t.add(r)}return!1}}case`_flexibleDescendant`:return function(t){let n=t;do if(e(n))return!0;while(n=sc(n,a));return!1};case X.Parent:return function(t){return a.getChildren(t).some(t=>a.isTag(t)&&e(t))};case X.Child:return function(t){let n=a.getParent(t);return n!=null&&a.isTag(n)&&e(n)};case X.Sibling:return function(t){let n=a.getSiblings(t);for(let r=0;re.some(dc)))}let fc={type:X.Descendant},pc={type:`_flexibleDescendant`},mc={type:X.Pseudo,name:`scope`,data:null};function hc(e,{adapter:t},n){let r=!!n?.every(e=>{let n=t.isTag(e)&&t.getParent(e);return e===ec||n&&t.isTag(n)});for(let t of e){if(!(t.length>0&&Fs(t[0])&&t[0].type!==X.Descendant))if(r&&!t.some(dc))t.unshift(fc);else continue;t.unshift(mc)}}function gc(e,t,n){e.forEach(Ls),n=t.context??n;let r=Array.isArray(n),i=n&&(Array.isArray(n)?n:[n]);if(t.relativeSelector!==!1)hc(e,t,i);else if(e.some(e=>e.length>0&&Fs(e[0])))throw Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");let a=!1,o=e.map(e=>{if(e.length>=2){let[t,n]=e;t.type!==X.Pseudo||t.name!==`scope`||(r&&n.type===X.Descendant?e[1]=pc:(n.type===X.Adjacent||n.type===X.Sibling)&&(a=!0))}return _c(e,t,i)}).reduce(vc,Z.default.falseFunc);return o.shouldTestNextSiblings=a,o}function _c(e,t,n){return e.reduce((e,r)=>e===Z.default.falseFunc?Z.default.falseFunc:cc(e,r,t,n,gc),t.rootFunc??Z.default.trueFunc)}function vc(e,t){return t===Z.default.falseFunc||e===Z.default.trueFunc?e:e===Z.default.falseFunc||t===Z.default.trueFunc?t:function(n){return e(n)||t(n)}}let yc=(e,t)=>e===t,bc={adapter:ys,equals:yc};function xc(e){let t=e??bc;return t.adapter??=ys,t.equals??=t.adapter?.equals??yc,t}function Sc(e){return function(t,n,r){return e(t,xc(n),r)}}let Cc=Sc(lc);function wc(e,t,n){let r=xc(n);return(typeof t==`function`?t:lc(t,r))(e)}let{isArray:Tc}=Array,Ec=({nodeType:e})=>e===1,Dc=(e,t)=>t.some(t=>Ec(t)&&(e(t)||Dc(e,kc(t)))),Oc=(e,t)=>t===`class`?e.classList.value:e.getAttribute(t),kc=({childNodes:e})=>e,Ac=e=>{let{localName:t}=e;return ra(e)?t.toLowerCase():t},jc=({parentNode:e})=>e,Mc=e=>{let{parentNode:t}=e;return t?kc(t):e},Nc=e=>Tc(e)?e.map(Nc).join(``):Ec(e)?Nc(kc(e)):e.nodeType===3?e.data:``,Pc=(e,t)=>e.hasAttribute(t),Fc=e=>{let{length:t}=e;for(;t--;){let n=e[t];if(t&&-1{let n=[];for(let r of t)Ec(r)&&(e(r)&&n.push(r),n.push(...Ic(e,kc(r))));return n},Lc=(e,t)=>{for(let n of t)if(e(n)||(n=Lc(e,kc(n))))return n;return null},Rc={isTag:Ec,existsOne:Dc,getAttributeValue:Oc,getChildren:kc,getName:Ac,getParent:jc,getSiblings:Mc,getText:Nc,hasAttrib:Pc,removeSubsets:Fc,findAll:Ic,findOne:Lc},zc=(e,t)=>Cc(t,{context:t.includes(`:scope`)?e:void 0,xmlMode:!ra(e),adapter:Rc}),Bc=(e,t)=>wc(e,t,{strict:!0,context:t.includes(`:scope`)?e:void 0,xmlMode:!ra(e),adapter:Rc});var Vc=class e extends go{constructor(e,t=``){super(e,`#text`,3,t)}get wholeText(){let e=[],{previousSibling:t,nextSibling:n}=this;for(;t&&t.nodeType===3;)e.unshift(t[ln]),t=t.previousSibling;for(e.push(this[ln]);n&&n.nodeType===3;)e.push(n[ln]),n=n.nextSibling;return e.join(``)}cloneNode(){let{ownerDocument:t,[ln]:n}=this;return new e(t,n)}toString(){return to(this[ln])}};let Hc=e=>e instanceof Xa,Uc=(e,t,n)=>{let{ownerDocument:r}=e;for(let i of n)e.insertBefore(Hc(i)?i:new Vc(r,i),t)};var Wc=class extends Xa{constructor(e,t,n){super(e,t,n),this[rn]=null,this[G]=this[W]={[G]:null,[nn]:this,[on]:this,nodeType:-1,ownerDocument:this.ownerDocument,parentNode:null}}get childNodes(){let e=new Ja,{firstChild:t}=this;for(;t;)e.push(t),t=so(t);return e}get children(){let e=new Ja,{firstElementChild:t}=this;for(;t;)e.push(t),t=co(t);return e}get firstChild(){let{[G]:e,[W]:t}=this;for(;e.nodeType===2;)e=e[G];return e===t?null:e}get firstElementChild(){let{firstChild:e}=this;for(;e;){if(e.nodeType===1)return e;e=so(e)}return null}get lastChild(){let e=this[W][nn];switch(e.nodeType){case-1:return e[on];case 2:return null}return e===this?null:e}get lastElementChild(){let{lastChild:e}=this;for(;e;){if(e.nodeType===1)return e;e=oo(e)}return null}get childElementCount(){return this.children.length}prepend(...e){Uc(this,this.firstChild,e)}append(...e){Uc(this,this[W],e)}replaceChildren(...e){let{[G]:t,[W]:n}=this;for(;t!==n&&t.nodeType===2;)t=t[G];for(;t!==n;){let e=na(t)[G];t.remove(),t=e}e.length&&Uc(this,n,e)}getElementsByClassName(e){let t=new Ja,{[G]:n,[W]:r}=this;for(;n!==r;)n.nodeType===1&&n.hasAttribute(`class`)&&n.classList.has(e)&&t.push(n),n=n[G];return t}getElementsByTagName(e){let t=new Ja,{[G]:n,[W]:r}=this;for(;n!==r;)n.nodeType===1&&(n.localName===e||ca(n)===e)&&t.push(n),n=n[G];return t}querySelector(e){let t=zc(this,e),{[G]:n,[W]:r}=this;for(;n!==r;){if(n.nodeType===1&&t(n))return n;n=n.nodeType===1&&n.localName===`template`?n[W]:n[G]}return null}querySelectorAll(e){let t=zc(this,e),n=new Ja,{[G]:r,[W]:i}=this;for(;r!==i;)r.nodeType===1&&t(r)&&n.push(r),r=r.nodeType===1&&r.localName===`template`?r[W]:r[G];return n}appendChild(e){return this.insertBefore(e,this[W])}contains(e){let t=e;for(;t&&t!==this;)t=t.parentNode;return t===this}insertBefore(e,t=null){if(e===t)return e;if(e===this)throw Error(`unable to append a node to itself`);let n=t||this[W];switch(e.nodeType){case 1:e.remove(),e.parentNode=this,aa(n[nn],e,n),La(e,null),va(e);break;case 11:{let{[rn]:t,firstChild:r,lastChild:i}=e;if(r){oa(n[nn],r,i,n),ia(e,e[W]),t&&t.replaceChildren();do r.parentNode=this,La(r,null),r.nodeType===1&&va(r);while(r!==i&&(r=so(r)))}break}case 3:case 8:case 4:e.remove();default:e.parentNode=this,sa(n[nn],e,n),La(e,null);break}return e}normalize(){let{[G]:e,[W]:t}=this;for(;e!==t;){let{[G]:t,[nn]:n,nodeType:r}=e;r===3&&(e[ln]?n&&n.nodeType===3&&(n.textContent+=e.textContent,e.remove()):e.remove()),e=t}}removeChild(e){if(e.parentNode!==this)throw Error(`node is not a child`);return e.remove(),e}replaceChild(e,t){let n=na(t)[G];return t.remove(),this.insertBefore(e,n),t}},Gc=class extends Wc{getElementById(e){let{[G]:t,[W]:n}=this;for(;t!==n;){if(t.nodeType===1&&t.id===e)return t;t=t[G]}return null}cloneNode(e){let{ownerDocument:t,constructor:n}=this,r=new n(t);if(e){let{[W]:t}=r;for(let n of this.childNodes)r.insertBefore(n.cloneNode(e),t)}return r}toString(){let{childNodes:e,localName:t}=this;return`<${t}>${e.join(``)}`}toJSON(){let e=[];return ja(this,e),e}},Kc=class extends Gc{constructor(e){super(e,`#document-fragment`,11)}},qc=class e extends Xa{constructor(e,t,n=``,r=``){super(e,`#document-type`,10),this.name=t,this.publicId=n,this.systemId=r}cloneNode(){let{ownerDocument:t,name:n,publicId:r,systemId:i}=this;return new e(t,n,r,i)}toString(){let{name:e,publicId:t,systemId:n}=this,r=0`}toJSON(){let e=[];return Ma(this,e),e}};let Jc=e=>e.childNodes.join(``),Yc=(e,t)=>{let{ownerDocument:n}=e,{constructor:r}=n,i=new r;i[Gt]=n[Gt];let{childNodes:a}=Ta(i,ra(e),t);e.replaceChildren(...a.map(Xc,n))};function Xc(e){switch(e.ownerDocument=this,e.nodeType){case 1:case 11:e.childNodes.forEach(Xc,this);break}return e}var Zc=e=>e.replace(/(([A-Z0-9])([A-Z0-9][a-z]))|(([a-z0-9]+)([A-Z]))/g,`$2$5-$3$6`).toLowerCase();let Qc=new WeakMap,$c=e=>`data-${Zc(e)}`,el=e=>e.slice(5).replace(/-([a-z])/g,(e,t)=>t.toUpperCase()),tl={get(e,t){if(t in e)return Qc.get(e).getAttribute($c(t))},set(e,t,n){return e[t]=n,Qc.get(e).setAttribute($c(t),n),!0},deleteProperty(e,t){return t in e&&Qc.get(e).removeAttribute($c(t)),delete e[t]}};var nl=class{constructor(e){for(let{name:t,value:n}of e.attributes)/^data-/.test(t)&&(this[el(t)]=n);return Qc.set(this,e),new Proxy(this,tl)}};ea(nl.prototype,null);let{add:rl}=Set.prototype,il=(e,t)=>{for(let n of t)n&&rl.call(e,n)},al=({[tn]:e,value:t})=>{let n=e.getAttributeNode(`class`);n?n.value=t:Ba(e,new ro(e.ownerDocument,`class`,t))};var ol=class extends Set{constructor(e){super(),this[tn]=e;let t=e.getAttributeNode(`class`);t&&il(this,t.value.split(/\\s+/))}get length(){return this.size}get value(){return[...this].join(` `)}add(...e){il(this,e),al(this)}contains(e){return this.has(e)}remove(...e){for(let t of e)this.delete(t);al(this)}toggle(e,t){if(this.has(e)){if(t)return!0;this.delete(e),al(this)}else if(t||arguments.length===1)return super.add(e),al(this),!0;return!1}replace(e,t){return this.has(e)?(this.delete(e),super.add(t),al(this),!0):!1}supports(){return!0}};let sl=new WeakMap,cl=e=>[...e.keys()].filter(e=>e!==rn),ll=e=>{let t=sl.get(e).getAttributeNode(`style`);if((!t||t[Ut]||e.get(rn)!==t)&&(e.clear(),t)){e.set(rn,t);for(let n of t[ln].split(/\\s*;\\s*/)){let[t,...r]=n.split(`:`);if(r.length>0){t=t.trim();let n=r.join(`:`).trim();t&&n&&e.set(t,n)}}}return t},ul={get(e,t){return t in fl?e[t]:(ll(e),t===`length`?cl(e).length:/^\\d+$/.test(t)?cl(e)[t]:e.get(Zc(t)))},set(e,t,n){if(t===`cssText`)e[t]=n;else{let r=ll(e);if(n==null?e.delete(Zc(t)):e.set(Zc(t),n),!r){let t=sl.get(e);r=t.ownerDocument.createAttribute(`style`),t.setAttributeNode(r),e.set(rn,r)}r[Ut]=!1,r[ln]=e.toString()}return!0}};var dl=class extends Map{constructor(e){return super(),sl.set(this,e),new Proxy(this,ul)}get cssText(){return this.toString()}set cssText(e){sl.get(this).setAttribute(`style`,e)}getPropertyValue(e){let t=this[rn];return ul.get(t,e)}setProperty(e,t){let n=this[rn];ul.set(n,e,t)}removeProperty(e){let t=this[rn];ul.set(t,e,null)}[Symbol.iterator](){let e=this[rn];ll(e);let t=cl(e),{length:n}=t,r=0;return{next(){let e=r===n;return{done:e,value:e?null:t[r++]}}}}get[rn](){return this}toString(){let e=this[rn];ll(e);let t=[];return e.forEach(pl,t),t.join(`;`)}};let{prototype:fl}=dl;function pl(e,t){t!==rn&&this.push(`${t}:${e}`)}function ml(e){return e.currentTarget}var hl=class{static get BUBBLING_PHASE(){return 3}static get AT_TARGET(){return 2}static get CAPTURING_PHASE(){return 1}static get NONE(){return 0}constructor(e,t={}){this.type=e,this.bubbles=!!t.bubbles,this.cancelBubble=!1,this._stopImmediatePropagationFlag=!1,this.cancelable=!!t.cancelable,this.eventPhase=this.NONE,this.timeStamp=Date.now(),this.defaultPrevented=!1,this.originalTarget=null,this.returnValue=null,this.srcElement=null,this.target=null,this._path=[]}get BUBBLING_PHASE(){return 3}get AT_TARGET(){return 2}get CAPTURING_PHASE(){return 1}get NONE(){return 0}preventDefault(){this.defaultPrevented=!0}composedPath(){return this._path.map(ml)}stopPropagation(){this.cancelBubble=!0}stopImmediatePropagation(){this.stopPropagation(),this._stopImmediatePropagationFlag=!0}},gl=class extends Array{constructor(e){super(),this.ownerElement=e}getNamedItem(e){return this.ownerElement.getAttributeNode(e)}setNamedItem(e){this.ownerElement.setAttributeNode(e),this.unshift(e)}removeNamedItem(e){let t=this.getNamedItem(e);this.ownerElement.removeAttribute(e),this.splice(this.indexOf(t),1)}item(e){return ee===t)}},yl=(e,t,n)=>{if(`ownerSVGElement`in t){let r=e.createElementNS(qi,n);return r.ownerSVGElement=t.ownerSVGElement,r}return e.createElement(n)},bl=({localName:e,ownerDocument:t})=>t[$t].voidElements.test(e);var xl=class extends Wc{constructor(e,t){super(e,t,1),this[Wt]=null,this[qt]=null,this[sn]=null}get isConnected(){return io(this)}get parentElement(){return ao(this)}get previousSibling(){return oo(this)}get nextSibling(){return so(this)}get namespaceURI(){return`http://www.w3.org/1999/xhtml`}get previousElementSibling(){return lo(this)}get nextElementSibling(){return co(this)}before(...e){fo(this,e)}after(...e){po(this,e)}replaceWith(...e){mo(this,e)}remove(){ho(this[nn],this,this[W][G])}get id(){return Y.get(this,`id`)}set id(e){Y.set(this,`id`,e)}get className(){return this.classList.value}set className(e){let{classList:t}=this;t.clear(),t.add(...ta(e).split(/\\s+/))}get nodeName(){return ca(this)}get tagName(){return ca(this)}get classList(){return this[Wt]||(this[Wt]=new ol(this))}get dataset(){return this[qt]||(this[qt]=new nl(this))}getBoundingClientRect(){return{x:0,y:0,bottom:0,height:0,left:0,right:0,top:0,width:0}}get nonce(){return Y.get(this,`nonce`)}set nonce(e){Y.set(this,`nonce`,e)}get style(){return this[sn]||(this[sn]=new dl(this))}get tabIndex(){return Ua.get(this,`tabindex`)||-1}set tabIndex(e){Ua.set(this,`tabindex`,e)}get slot(){return Y.get(this,`slot`)}set slot(e){Y.set(this,`slot`,e)}get innerText(){let e=[],{[G]:t,[W]:n}=this;for(;t!==n;)t.nodeType===3?e.push(t.textContent.replace(/\\s+/g,` `)):e.length&&t[G]!=n&&Ki.has(t.tagName)&&e.push(`\n`),t=t[G];return e.join(``)}get textContent(){let e=[],{[G]:t,[W]:n}=this;for(;t!==n;){let n=t.nodeType;(n===3||n===4)&&e.push(t.textContent),t=t[G]}return e.join(``)}set textContent(e){this.replaceChildren(),e!=null&&e!==``&&this.appendChild(new Vc(this.ownerDocument,e))}get innerHTML(){return Jc(this)}set innerHTML(e){Yc(this,e)}get outerHTML(){return this.toString()}set outerHTML(e){let t=this.ownerDocument.createElement(``);t.innerHTML=e,this.replaceWith(...t.childNodes)}get attributes(){let e=new gl(this),t=this[G];for(;t.nodeType===2;)e.push(t),t=t[G];return new Proxy(e,vl)}focus(){this.dispatchEvent(new hl(`focus`))}getAttribute(e){if(e===`class`)return this.className;let t=this.getAttributeNode(e);return t&&(ra(this)?t.value:to(t.value))}getAttributeNode(e){let t=this[G];for(;t.nodeType===2;){if(t.name===e)return t;t=t[G]}return null}getAttributeNames(){let e=new Ja,t=this[G];for(;t.nodeType===2;)e.push(t.name),t=t[G];return e}hasAttribute(e){return!!this.getAttributeNode(e)}hasAttributes(){return this[G].nodeType===2}removeAttribute(e){e===`class`&&this[Wt]&&this[Wt].clear();let t=this[G];for(;t.nodeType===2;){if(t.name===e){Va(this,t);return}t=t[G]}}removeAttributeNode(e){let t=this[G];for(;t.nodeType===2;){if(t===e){Va(this,t);return}t=t[G]}}setAttribute(e,t){if(e===`class`)this.className=t;else{let n=this.getAttributeNode(e);n?n.value=t:Ba(this,new ro(this.ownerDocument,e,t))}}setAttributeNode(e){let{name:t}=e,n=this.getAttributeNode(t);if(n!==e){n&&this.removeAttributeNode(n);let{ownerElement:t}=e;t&&t.removeAttributeNode(e),Ba(this,e)}return n}toggleAttribute(e,t){return this.hasAttribute(e)?t?!0:(this.removeAttribute(e),!1):t||arguments.length===1?(this.setAttribute(e,``),!0):!1}get shadowRoot(){if(da.has(this)){let{mode:e,shadowRoot:t}=da.get(this);if(e===`open`)return t}return null}attachShadow(e){if(da.has(this))throw Error(`operation not supported`);let t=new _l(this);return da.set(this,{mode:e.mode,shadowRoot:t}),t}matches(e){return Bc(this,e)}closest(e){let t=this,n=zc(t,e);for(;t&&!n(t);)t=t.parentElement;return t}insertAdjacentElement(e,t){let{parentElement:n}=this;switch(e){case`beforebegin`:if(n){n.insertBefore(t,this);break}return null;case`afterbegin`:this.insertBefore(t,this.firstChild);break;case`beforeend`:this.insertBefore(t,null);break;case`afterend`:if(n){n.insertBefore(t,this.nextSibling);break}return null}return t}insertAdjacentHTML(e,t){this.insertAdjacentElement(e,ua(this.ownerDocument,t))}insertAdjacentText(e,t){let n=this.ownerDocument.createTextNode(t);this.insertAdjacentElement(e,n)}cloneNode(e=!1){let{ownerDocument:t,localName:n}=this,r=e=>{e.parentNode=a,ia(o,e),o=e},i=yl(t,this,n),a=i,o=i,{[G]:s,[W]:c}=this;for(;s!==c&&(e||s.nodeType===2);){switch(s.nodeType){case-1:ia(o,a[W]),o=a[W],a=a.parentNode;break;case 1:{let e=yl(t,s,s.localName);r(e),a=e;break}case 2:{let t=s.cloneNode(e);t.ownerElement=a,r(t);break}case 3:case 8:case 4:r(s.cloneNode(e));break}s=s[G]}return ia(o,i[W]),i}toString(){let e=[],{[W]:t}=this,n={[G]:this},r=!1;do switch(n=n[G],n.nodeType){case 2:{let t=` `+n;switch(t){case` id`:case` class`:case` style`:break;default:e.push(t)}break}case-1:{let t=n[on];r?(`ownerSVGElement`in t?e.push(` />`):bl(t)?e.push(ra(t)?`>`:` />`):e.push(`>`),r=!1):e.push(``);break}case 1:r&&e.push(`>`),n.toString===this.toString?(e.push(`<${n.localName}`),r=!0):(e.push(n.toString()),n=n[W],r=!1);break;case 3:case 8:case 4:e.push((r?`>`:``)+n),r=!1;break}while(n!==t);return e.join(``)}toJSON(){let e=[];return Na(this,e),e}getAttributeNS(e,t){return this.getAttribute(t)}getElementsByTagNameNS(e,t){return this.getElementsByTagName(t)}hasAttributeNS(e,t){return this.hasAttribute(t)}removeAttributeNS(e,t){this.removeAttribute(t)}setAttributeNS(e,t,n){this.setAttribute(t,n)}setAttributeNodeNS(e){return this.setAttributeNode(e)}};let Sl=new WeakMap,Cl={get(e,t){return e[t]},set(e,t,n){return e[t]=n,!0}};var wl=class extends xl{constructor(e,t,n=null){super(e,t),this.ownerSVGElement=n}get className(){return Sl.has(this)||Sl.set(this,new Proxy({baseVal:``,animVal:``},Cl)),Sl.get(this)}set className(e){let{classList:t}=this;t.clear(),t.add(...ta(e).split(/\\s+/))}get namespaceURI(){return`http://www.w3.org/2000/svg`}getAttribute(e){return e===`class`?[...this.classList].join(` `):super.getAttribute(e)}setAttribute(e,t){if(e===`class`)this.className=t;else if(e===`style`){let{className:e}=this;e.baseVal=e.animVal=t}super.setAttribute(e,t)}};let Tl=()=>{throw TypeError(`Illegal constructor`)};function El(){Tl()}ea(El,ro),El.prototype=ro.prototype;function Dl(){Tl()}ea(Dl,_o),Dl.prototype=_o.prototype;function Ol(){Tl()}ea(Ol,go),Ol.prototype=go.prototype;function kl(){Tl()}ea(kl,vo),kl.prototype=vo.prototype;function Al(){Tl()}ea(Al,Kc),Al.prototype=Kc.prototype;function jl(){Tl()}ea(jl,qc),jl.prototype=qc.prototype;function Ml(){Tl()}ea(Ml,xl),Ml.prototype=xl.prototype;function Nl(){Tl()}ea(Nl,Xa),Nl.prototype=Xa.prototype;function Pl(){Tl()}ea(Pl,_l),Pl.prototype=_l.prototype;function Fl(){Tl()}ea(Fl,Vc),Fl.prototype=Vc.prototype;function Il(){Tl()}ea(Il,wl),Il.prototype=wl.prototype;let Ll={Attr:El,CDATASection:Dl,CharacterData:Ol,Comment:kl,DocumentFragment:Al,DocumentType:jl,Element:Ml,Node:Nl,ShadowRoot:Pl,Text:Fl,SVGElement:Il},Rl=new WeakMap,Q={get(e,t){return Rl.has(e)&&Rl.get(e)[t]||null},set(e,t,n){Rl.has(e)||Rl.set(e,{});let r=Rl.get(e),i=t.slice(2);r[t]&&e.removeEventListener(i,r[t],!1),(r[t]=n)&&e.addEventListener(i,n,!1)}};var $=class extends xl{static get observedAttributes(){return[]}constructor(e=null,t=``){super(e,t);let n=!e,r;if(n){let{constructor:n}=this;if(!pa.has(n))throw Error(`unable to initialize this Custom Element`);({ownerDocument:e,localName:t,options:r}=pa.get(n))}if(e[cn]){let{element:t,values:n}=e[cn];e[cn]=null;for(let[e,r]of n)t[e]=r;return t}n&&(this.ownerDocument=this[W].ownerDocument=e,this.localName=t,ma.set(this,{connected:!1}),r.is&&this.setAttribute(`is`,r.is))}blur(){this.dispatchEvent(new hl(`blur`))}click(){let e=new hl(`click`,{bubbles:!0,cancelable:!0});e.button=0,this.dispatchEvent(e)}get accessKeyLabel(){let{accessKey:e}=this;return e&&`Alt+Shift+${e}`}get isContentEditable(){return this.hasAttribute(`contenteditable`)}get contentEditable(){return Ha.get(this,`contenteditable`)}set contentEditable(e){Ha.set(this,`contenteditable`,e)}get draggable(){return Ha.get(this,`draggable`)}set draggable(e){Ha.set(this,`draggable`,e)}get hidden(){return Ha.get(this,`hidden`)}set hidden(e){Ha.set(this,`hidden`,e)}get spellcheck(){return Ha.get(this,`spellcheck`)}set spellcheck(e){Ha.set(this,`spellcheck`,e)}get accessKey(){return Y.get(this,`accesskey`)}set accessKey(e){Y.set(this,`accesskey`,e)}get dir(){return Y.get(this,`dir`)}set dir(e){Y.set(this,`dir`,e)}get lang(){return Y.get(this,`lang`)}set lang(e){Y.set(this,`lang`,e)}get title(){return Y.get(this,`title`)}set title(e){Y.set(this,`title`,e)}get onabort(){return Q.get(this,`onabort`)}set onabort(e){Q.set(this,`onabort`,e)}get onblur(){return Q.get(this,`onblur`)}set onblur(e){Q.set(this,`onblur`,e)}get oncancel(){return Q.get(this,`oncancel`)}set oncancel(e){Q.set(this,`oncancel`,e)}get oncanplay(){return Q.get(this,`oncanplay`)}set oncanplay(e){Q.set(this,`oncanplay`,e)}get oncanplaythrough(){return Q.get(this,`oncanplaythrough`)}set oncanplaythrough(e){Q.set(this,`oncanplaythrough`,e)}get onchange(){return Q.get(this,`onchange`)}set onchange(e){Q.set(this,`onchange`,e)}get onclick(){return Q.get(this,`onclick`)}set onclick(e){Q.set(this,`onclick`,e)}get onclose(){return Q.get(this,`onclose`)}set onclose(e){Q.set(this,`onclose`,e)}get oncontextmenu(){return Q.get(this,`oncontextmenu`)}set oncontextmenu(e){Q.set(this,`oncontextmenu`,e)}get oncuechange(){return Q.get(this,`oncuechange`)}set oncuechange(e){Q.set(this,`oncuechange`,e)}get ondblclick(){return Q.get(this,`ondblclick`)}set ondblclick(e){Q.set(this,`ondblclick`,e)}get ondrag(){return Q.get(this,`ondrag`)}set ondrag(e){Q.set(this,`ondrag`,e)}get ondragend(){return Q.get(this,`ondragend`)}set ondragend(e){Q.set(this,`ondragend`,e)}get ondragenter(){return Q.get(this,`ondragenter`)}set ondragenter(e){Q.set(this,`ondragenter`,e)}get ondragleave(){return Q.get(this,`ondragleave`)}set ondragleave(e){Q.set(this,`ondragleave`,e)}get ondragover(){return Q.get(this,`ondragover`)}set ondragover(e){Q.set(this,`ondragover`,e)}get ondragstart(){return Q.get(this,`ondragstart`)}set ondragstart(e){Q.set(this,`ondragstart`,e)}get ondrop(){return Q.get(this,`ondrop`)}set ondrop(e){Q.set(this,`ondrop`,e)}get ondurationchange(){return Q.get(this,`ondurationchange`)}set ondurationchange(e){Q.set(this,`ondurationchange`,e)}get onemptied(){return Q.get(this,`onemptied`)}set onemptied(e){Q.set(this,`onemptied`,e)}get onended(){return Q.get(this,`onended`)}set onended(e){Q.set(this,`onended`,e)}get onerror(){return Q.get(this,`onerror`)}set onerror(e){Q.set(this,`onerror`,e)}get onfocus(){return Q.get(this,`onfocus`)}set onfocus(e){Q.set(this,`onfocus`,e)}get oninput(){return Q.get(this,`oninput`)}set oninput(e){Q.set(this,`oninput`,e)}get oninvalid(){return Q.get(this,`oninvalid`)}set oninvalid(e){Q.set(this,`oninvalid`,e)}get onkeydown(){return Q.get(this,`onkeydown`)}set onkeydown(e){Q.set(this,`onkeydown`,e)}get onkeypress(){return Q.get(this,`onkeypress`)}set onkeypress(e){Q.set(this,`onkeypress`,e)}get onkeyup(){return Q.get(this,`onkeyup`)}set onkeyup(e){Q.set(this,`onkeyup`,e)}get onload(){return Q.get(this,`onload`)}set onload(e){Q.set(this,`onload`,e)}get onloadeddata(){return Q.get(this,`onloadeddata`)}set onloadeddata(e){Q.set(this,`onloadeddata`,e)}get onloadedmetadata(){return Q.get(this,`onloadedmetadata`)}set onloadedmetadata(e){Q.set(this,`onloadedmetadata`,e)}get onloadstart(){return Q.get(this,`onloadstart`)}set onloadstart(e){Q.set(this,`onloadstart`,e)}get onmousedown(){return Q.get(this,`onmousedown`)}set onmousedown(e){Q.set(this,`onmousedown`,e)}get onmouseenter(){return Q.get(this,`onmouseenter`)}set onmouseenter(e){Q.set(this,`onmouseenter`,e)}get onmouseleave(){return Q.get(this,`onmouseleave`)}set onmouseleave(e){Q.set(this,`onmouseleave`,e)}get onmousemove(){return Q.get(this,`onmousemove`)}set onmousemove(e){Q.set(this,`onmousemove`,e)}get onmouseout(){return Q.get(this,`onmouseout`)}set onmouseout(e){Q.set(this,`onmouseout`,e)}get onmouseover(){return Q.get(this,`onmouseover`)}set onmouseover(e){Q.set(this,`onmouseover`,e)}get onmouseup(){return Q.get(this,`onmouseup`)}set onmouseup(e){Q.set(this,`onmouseup`,e)}get onmousewheel(){return Q.get(this,`onmousewheel`)}set onmousewheel(e){Q.set(this,`onmousewheel`,e)}get onpause(){return Q.get(this,`onpause`)}set onpause(e){Q.set(this,`onpause`,e)}get onplay(){return Q.get(this,`onplay`)}set onplay(e){Q.set(this,`onplay`,e)}get onplaying(){return Q.get(this,`onplaying`)}set onplaying(e){Q.set(this,`onplaying`,e)}get onprogress(){return Q.get(this,`onprogress`)}set onprogress(e){Q.set(this,`onprogress`,e)}get onratechange(){return Q.get(this,`onratechange`)}set onratechange(e){Q.set(this,`onratechange`,e)}get onreset(){return Q.get(this,`onreset`)}set onreset(e){Q.set(this,`onreset`,e)}get onresize(){return Q.get(this,`onresize`)}set onresize(e){Q.set(this,`onresize`,e)}get onscroll(){return Q.get(this,`onscroll`)}set onscroll(e){Q.set(this,`onscroll`,e)}get onseeked(){return Q.get(this,`onseeked`)}set onseeked(e){Q.set(this,`onseeked`,e)}get onseeking(){return Q.get(this,`onseeking`)}set onseeking(e){Q.set(this,`onseeking`,e)}get onselect(){return Q.get(this,`onselect`)}set onselect(e){Q.set(this,`onselect`,e)}get onshow(){return Q.get(this,`onshow`)}set onshow(e){Q.set(this,`onshow`,e)}get onstalled(){return Q.get(this,`onstalled`)}set onstalled(e){Q.set(this,`onstalled`,e)}get onsubmit(){return Q.get(this,`onsubmit`)}set onsubmit(e){Q.set(this,`onsubmit`,e)}get onsuspend(){return Q.get(this,`onsuspend`)}set onsuspend(e){Q.set(this,`onsuspend`,e)}get ontimeupdate(){return Q.get(this,`ontimeupdate`)}set ontimeupdate(e){Q.set(this,`ontimeupdate`,e)}get ontoggle(){return Q.get(this,`ontoggle`)}set ontoggle(e){Q.set(this,`ontoggle`,e)}get onvolumechange(){return Q.get(this,`onvolumechange`)}set onvolumechange(e){Q.set(this,`onvolumechange`,e)}get onwaiting(){return Q.get(this,`onwaiting`)}set onwaiting(e){Q.set(this,`onwaiting`,e)}get onauxclick(){return Q.get(this,`onauxclick`)}set onauxclick(e){Q.set(this,`onauxclick`,e)}get ongotpointercapture(){return Q.get(this,`ongotpointercapture`)}set ongotpointercapture(e){Q.set(this,`ongotpointercapture`,e)}get onlostpointercapture(){return Q.get(this,`onlostpointercapture`)}set onlostpointercapture(e){Q.set(this,`onlostpointercapture`,e)}get onpointercancel(){return Q.get(this,`onpointercancel`)}set onpointercancel(e){Q.set(this,`onpointercancel`,e)}get onpointerdown(){return Q.get(this,`onpointerdown`)}set onpointerdown(e){Q.set(this,`onpointerdown`,e)}get onpointerenter(){return Q.get(this,`onpointerenter`)}set onpointerenter(e){Q.set(this,`onpointerenter`,e)}get onpointerleave(){return Q.get(this,`onpointerleave`)}set onpointerleave(e){Q.set(this,`onpointerleave`,e)}get onpointermove(){return Q.get(this,`onpointermove`)}set onpointermove(e){Q.set(this,`onpointermove`,e)}get onpointerout(){return Q.get(this,`onpointerout`)}set onpointerout(e){Q.set(this,`onpointerout`,e)}get onpointerover(){return Q.get(this,`onpointerover`)}set onpointerover(e){Q.set(this,`onpointerover`,e)}get onpointerup(){return Q.get(this,`onpointerup`)}set onpointerup(e){Q.set(this,`onpointerup`,e)}};let zl=`template`;var Bl=class extends ${constructor(e){super(e,zl);let t=this.ownerDocument.createDocumentFragment();(this[Kt]=t)[rn]=this}get content(){if(this.hasChildNodes()&&!this[Kt].hasChildNodes())for(let e of this.childNodes)this[Kt].appendChild(e.cloneNode(!0));return this[Kt]}};Da(zl,Bl);var Vl=class extends ${constructor(e,t=`html`){super(e,t)}};let{toString:Hl}=$.prototype;var Ul=class extends ${get innerHTML(){return this.textContent}set innerHTML(e){this.textContent=e}toString(){return Hl.call(this.cloneNode()).replace(`><`,()=>`>${this.textContent}<`)}};let Wl=`script`;var Gl=class extends Ul{constructor(e,t=Wl){super(e,t)}get type(){return Y.get(this,`type`)}set type(e){Y.set(this,`type`,e)}get src(){return Y.get(this,`src`)}set src(e){Y.set(this,`src`,e)}get defer(){return Ha.get(this,`defer`)}set defer(e){Ha.set(this,`defer`,e)}get crossOrigin(){return Y.get(this,`crossorigin`)}set crossOrigin(e){Y.set(this,`crossorigin`,e)}get nomodule(){return Ha.get(this,`nomodule`)}set nomodule(e){Ha.set(this,`nomodule`,e)}get referrerPolicy(){return Y.get(this,`referrerpolicy`)}set referrerPolicy(e){Y.set(this,`referrerpolicy`,e)}get nonce(){return Y.get(this,`nonce`)}set nonce(e){Y.set(this,`nonce`,e)}get async(){return Ha.get(this,`async`)}set async(e){Ha.set(this,`async`,e)}get text(){return this.textContent}set text(e){this.textContent=e}};Da(Wl,Gl);var Kl=class extends ${constructor(e,t=`frame`){super(e,t)}};let ql=`iframe`;var Jl=class extends ${constructor(e,t=ql){super(e,t)}get src(){return Y.get(this,`src`)}set src(e){Y.set(this,`src`,e)}get srcdoc(){return Y.get(this,`srcdoc`)}set srcdoc(e){Y.set(this,`srcdoc`,e)}get name(){return Y.get(this,`name`)}set name(e){Y.set(this,`name`,e)}get allow(){return Y.get(this,`allow`)}set allow(e){Y.set(this,`allow`,e)}get allowFullscreen(){return Ha.get(this,`allowfullscreen`)}set allowFullscreen(e){Ha.set(this,`allowfullscreen`,e)}get referrerPolicy(){return Y.get(this,`referrerpolicy`)}set referrerPolicy(e){Y.set(this,`referrerpolicy`,e)}get loading(){return Y.get(this,`loading`)}set loading(e){Y.set(this,`loading`,e)}};Da(ql,Jl);var Yl=class extends ${constructor(e,t=`object`){super(e,t)}},Xl=class extends ${constructor(e,t=`head`){super(e,t)}},Zl=class extends ${constructor(e,t=`body`){super(e,t)}},Ql=s((e=>{var t={};t.StyleSheet=function(){this.parentStyleSheet=null},e.StyleSheet=t.StyleSheet})),$l=s((e=>{var t={};t.CSSRule=function(){this.parentRule=null,this.parentStyleSheet=null},t.CSSRule.UNKNOWN_RULE=0,t.CSSRule.STYLE_RULE=1,t.CSSRule.CHARSET_RULE=2,t.CSSRule.IMPORT_RULE=3,t.CSSRule.MEDIA_RULE=4,t.CSSRule.FONT_FACE_RULE=5,t.CSSRule.PAGE_RULE=6,t.CSSRule.KEYFRAMES_RULE=7,t.CSSRule.KEYFRAME_RULE=8,t.CSSRule.MARGIN_RULE=9,t.CSSRule.NAMESPACE_RULE=10,t.CSSRule.COUNTER_STYLE_RULE=11,t.CSSRule.SUPPORTS_RULE=12,t.CSSRule.DOCUMENT_RULE=13,t.CSSRule.FONT_FEATURE_VALUES_RULE=14,t.CSSRule.VIEWPORT_RULE=15,t.CSSRule.REGION_STYLE_RULE=16,t.CSSRule.prototype={constructor:t.CSSRule},e.CSSRule=t.CSSRule})),eu=s((e=>{var t={CSSStyleDeclaration:_u().CSSStyleDeclaration,CSSRule:$l().CSSRule};t.CSSStyleRule=function(){t.CSSRule.call(this),this.selectorText=``,this.style=new t.CSSStyleDeclaration,this.style.parentRule=this},t.CSSStyleRule.prototype=new t.CSSRule,t.CSSStyleRule.prototype.constructor=t.CSSStyleRule,t.CSSStyleRule.prototype.type=1,Object.defineProperty(t.CSSStyleRule.prototype,"cssText",{get:function(){return this.selectorText?this.selectorText+` {`+this.style.cssText+`}`:``},set:function(e){var n=t.CSSStyleRule.parse(e);this.style=n.style,this.selectorText=n.selectorText}}),t.CSSStyleRule.parse=function(e){for(var n=0,r=`selector`,i,a=n,o=``,s={selector:!0,value:!0},c=new t.CSSStyleRule,l,u=``,d;d=e.charAt(n);n++)switch(d){case` `:case` `:case`\\r`:case`\n`:case`\\f`:if(s[r])switch(e.charAt(n-1)){case` `:case` `:case`\\r`:case`\n`:case`\\f`:break;default:o+=` `;break}break;case`"`:if(a=n+1,i=e.indexOf(`"`,a)+1,!i)throw`" is missing`;o+=e.slice(n,i),n=i-1;break;case`\'`:if(a=n+1,i=e.indexOf(`\'`,a)+1,!i)throw`\' is missing`;o+=e.slice(n,i),n=i-1;break;case`/`:if(e.charAt(n+1)===`*`){if(n+=2,i=e.indexOf(`*/`,n),i===-1)throw SyntaxError(`Missing */`);n=i+1}else o+=d;break;case`{`:r===`selector`&&(c.selectorText=o.trim(),o=``,r=`name`);break;case`:`:r===`name`?(l=o.trim(),o=``,r=`value`):o+=d;break;case`!`:r===`value`&&e.indexOf(`!important`,n)===n?(u=`important`,n+=9):o+=d;break;case`;`:r===`value`?(c.style.setProperty(l,o.trim(),u),u=``,o=``,r=`name`):o+=d;break;case`}`:if(r===`value`)c.style.setProperty(l,o.trim(),u),u=``,o=``;else if(r===`name`)break;else o+=d;r=`selector`;break;default:o+=d;break}return c},e.CSSStyleRule=t.CSSStyleRule})),tu=s((e=>{var t={StyleSheet:Ql().StyleSheet,CSSStyleRule:eu().CSSStyleRule};t.CSSStyleSheet=function(){t.StyleSheet.call(this),this.cssRules=[]},t.CSSStyleSheet.prototype=new t.StyleSheet,t.CSSStyleSheet.prototype.constructor=t.CSSStyleSheet,t.CSSStyleSheet.prototype.insertRule=function(e,n){if(n<0||n>this.cssRules.length)throw RangeError(`INDEX_SIZE_ERR`);var r=t.parse(e).cssRules[0];return r.parentStyleSheet=this,this.cssRules.splice(n,0,r),n},t.CSSStyleSheet.prototype.deleteRule=function(e){if(e<0||e>=this.cssRules.length)throw RangeError(`INDEX_SIZE_ERR`);this.cssRules.splice(e,1)},t.CSSStyleSheet.prototype.toString=function(){for(var e=``,t=this.cssRules,n=0;n{var t={};t.MediaList=function(){this.length=0},t.MediaList.prototype={constructor:t.MediaList,get mediaText(){return Array.prototype.join.call(this,`, `)},set mediaText(e){for(var t=e.split(`,`),n=this.length=t.length,r=0;r{var t={CSSRule:$l().CSSRule,CSSStyleSheet:tu().CSSStyleSheet,MediaList:nu().MediaList};t.CSSImportRule=function(){t.CSSRule.call(this),this.href=``,this.media=new t.MediaList,this.styleSheet=new t.CSSStyleSheet},t.CSSImportRule.prototype=new t.CSSRule,t.CSSImportRule.prototype.constructor=t.CSSImportRule,t.CSSImportRule.prototype.type=3,Object.defineProperty(t.CSSImportRule.prototype,"cssText",{get:function(){var e=this.media.mediaText;return`@import url(`+this.href+`)`+(e?` `+e:``)+`;`},set:function(e){for(var t=0,n=``,r=``,i,a;a=e.charAt(t);t++)switch(a){case` `:case` `:case`\\r`:case`\n`:case`\\f`:n===`after-import`?n=`url`:r+=a;break;case`@`:!n&&e.indexOf(`@import`,t)===t&&(n=`after-import`,t+=6,r=``);break;case`u`:if(n===`url`&&e.indexOf(`url(`,t)===t){if(i=e.indexOf(`)`,t+1),i===-1)throw t+`: ")" not found`;t+=4;var o=e.slice(t,i);o[0]===o[o.length-1]&&(o[0]===`"`||o[0]===`\'`)&&(o=o.slice(1,-1)),this.href=o,t=i,n=`media`}break;case`"`:if(n===`url`){if(i=e.indexOf(`"`,t+1),!i)throw t+`: \'"\' not found`;this.href=e.slice(t+1,i),t=i,n=`media`}break;case`\'`:if(n===`url`){if(i=e.indexOf(`\'`,t+1),!i)throw t+`: "\'" not found`;this.href=e.slice(t+1,i),t=i,n=`media`}break;case`;`:n===`media`&&r&&(this.media.mediaText=r.trim());break;default:n===`media`&&(r+=a);break}}}),e.CSSImportRule=t.CSSImportRule})),iu=s((e=>{var t={CSSRule:$l().CSSRule};t.CSSGroupingRule=function(){t.CSSRule.call(this),this.cssRules=[]},t.CSSGroupingRule.prototype=new t.CSSRule,t.CSSGroupingRule.prototype.constructor=t.CSSGroupingRule,t.CSSGroupingRule.prototype.insertRule=function(e,n){if(n<0||n>this.cssRules.length)throw RangeError(`INDEX_SIZE_ERR`);var r=t.parse(e).cssRules[0];return r.parentRule=this,this.cssRules.splice(n,0,r),n},t.CSSGroupingRule.prototype.deleteRule=function(e){if(e<0||e>=this.cssRules.length)throw RangeError(`INDEX_SIZE_ERR`);this.cssRules.splice(e,1)[0].parentRule=null},e.CSSGroupingRule=t.CSSGroupingRule})),au=s((e=>{var t={CSSRule:$l().CSSRule,CSSGroupingRule:iu().CSSGroupingRule};t.CSSConditionRule=function(){t.CSSGroupingRule.call(this),this.cssRules=[]},t.CSSConditionRule.prototype=new t.CSSGroupingRule,t.CSSConditionRule.prototype.constructor=t.CSSConditionRule,t.CSSConditionRule.prototype.conditionText=``,t.CSSConditionRule.prototype.cssText=``,e.CSSConditionRule=t.CSSConditionRule})),ou=s((e=>{var t={CSSRule:$l().CSSRule,CSSGroupingRule:iu().CSSGroupingRule,CSSConditionRule:au().CSSConditionRule,MediaList:nu().MediaList};t.CSSMediaRule=function(){t.CSSConditionRule.call(this),this.media=new t.MediaList},t.CSSMediaRule.prototype=new t.CSSConditionRule,t.CSSMediaRule.prototype.constructor=t.CSSMediaRule,t.CSSMediaRule.prototype.type=4,Object.defineProperties(t.CSSMediaRule.prototype,{conditionText:{get:function(){return this.media.mediaText},set:function(e){this.media.mediaText=e},configurable:!0,enumerable:!0},cssText:{get:function(){for(var e=[],t=0,n=this.cssRules.length;t{var t={CSSRule:$l().CSSRule,CSSGroupingRule:iu().CSSGroupingRule,CSSConditionRule:au().CSSConditionRule};t.CSSSupportsRule=function(){t.CSSConditionRule.call(this)},t.CSSSupportsRule.prototype=new t.CSSConditionRule,t.CSSSupportsRule.prototype.constructor=t.CSSSupportsRule,t.CSSSupportsRule.prototype.type=12,Object.defineProperty(t.CSSSupportsRule.prototype,"cssText",{get:function(){for(var e=[],t=0,n=this.cssRules.length;t{var t={CSSStyleDeclaration:_u().CSSStyleDeclaration,CSSRule:$l().CSSRule};t.CSSFontFaceRule=function(){t.CSSRule.call(this),this.style=new t.CSSStyleDeclaration,this.style.parentRule=this},t.CSSFontFaceRule.prototype=new t.CSSRule,t.CSSFontFaceRule.prototype.constructor=t.CSSFontFaceRule,t.CSSFontFaceRule.prototype.type=5,Object.defineProperty(t.CSSFontFaceRule.prototype,"cssText",{get:function(){return`@font-face {`+this.style.cssText+`}`}}),e.CSSFontFaceRule=t.CSSFontFaceRule})),lu=s((e=>{var t={CSSRule:$l().CSSRule};t.CSSHostRule=function(){t.CSSRule.call(this),this.cssRules=[]},t.CSSHostRule.prototype=new t.CSSRule,t.CSSHostRule.prototype.constructor=t.CSSHostRule,t.CSSHostRule.prototype.type=1001,Object.defineProperty(t.CSSHostRule.prototype,"cssText",{get:function(){for(var e=[],t=0,n=this.cssRules.length;t{var t={CSSRule:$l().CSSRule,CSSStyleDeclaration:_u().CSSStyleDeclaration};t.CSSKeyframeRule=function(){t.CSSRule.call(this),this.keyText=``,this.style=new t.CSSStyleDeclaration,this.style.parentRule=this},t.CSSKeyframeRule.prototype=new t.CSSRule,t.CSSKeyframeRule.prototype.constructor=t.CSSKeyframeRule,t.CSSKeyframeRule.prototype.type=8,Object.defineProperty(t.CSSKeyframeRule.prototype,"cssText",{get:function(){return this.keyText+` {`+this.style.cssText+`} `}}),e.CSSKeyframeRule=t.CSSKeyframeRule})),du=s((e=>{var t={CSSRule:$l().CSSRule};t.CSSKeyframesRule=function(){t.CSSRule.call(this),this.name=``,this.cssRules=[]},t.CSSKeyframesRule.prototype=new t.CSSRule,t.CSSKeyframesRule.prototype.constructor=t.CSSKeyframesRule,t.CSSKeyframesRule.prototype.type=7,Object.defineProperty(t.CSSKeyframesRule.prototype,"cssText",{get:function(){for(var e=[],t=0,n=this.cssRules.length;t{var t={};t.CSSValue=function(){},t.CSSValue.prototype={constructor:t.CSSValue,set cssText(e){var t=this._getConstructorName();throw Error(`DOMException: property "cssText" of "`+t+`" is readonly and can not be replaced with "`+e+`"!`)},get cssText(){var e=this._getConstructorName();throw Error(`getter "cssText" of "`+e+`" is not implemented!`)},_getConstructorName:function(){return this.constructor.toString().match(/function\\s([^\\(]+)/)[1]}},e.CSSValue=t.CSSValue})),pu=s((e=>{var t={CSSValue:fu().CSSValue};t.CSSValueExpression=function(e,t){this._token=e,this._idx=t},t.CSSValueExpression.prototype=new t.CSSValue,t.CSSValueExpression.prototype.constructor=t.CSSValueExpression,t.CSSValueExpression.prototype.parse=function(){for(var e=this._token,t=this._idx,n=``,r=``,i=``,a,o=[];;++t){if(n=e.charAt(t),n===``){i=`css expression error: unfinished expression!`;break}switch(n){case`(`:o.push(n),r+=n;break;case`)`:o.pop(n),r+=n;break;case`/`:(a=this._parseJSComment(e,t))?a.error?i=`css expression error: unfinished comment in expression!`:t=a.idx:(a=this._parseJSRexExp(e,t))?(t=a.idx,r+=a.text):r+=n;break;case`\'`:case`"`:a=this._parseJSString(e,t,n),a?(t=a.idx,r+=a.text):r+=n;break;default:r+=n;break}if(i||o.length===0)break}return i?{error:i}:{idx:t,expression:r}},t.CSSValueExpression.prototype._parseJSComment=function(e,t){var n=e.charAt(t+1),r;if(n===`/`||n===`*`){var i=t,a,o;return n===`/`?o=`\n`:n===`*`&&(o=`*/`),a=e.indexOf(o,i+1+1),a===-1?{error:`css expression error: unfinished comment in expression!`}:(a=a+o.length-1,r=e.substring(t,a+1),{idx:a,text:r})}else return!1},t.CSSValueExpression.prototype._parseJSString=function(e,t,n){var r=this._findMatchedIdx(e,t,n),i;return r===-1?!1:(i=e.substring(t,r+n.length),{idx:r,text:i})},t.CSSValueExpression.prototype._parseJSRexExp=function(e,t){var n=e.substring(0,t).replace(/\\s+$/,``);return[/^$/,/\\($/,/\\[$/,/\\!$/,/\\+$/,/\\-$/,/\\*$/,/\\/\\s+/,/\\%$/,/\\=$/,/\\>$/,/<$/,/\\&$/,/\\|$/,/\\^$/,/\\~$/,/\\?$/,/\\,$/,/delete$/,/in$/,/instanceof$/,/new$/,/typeof$/,/void$/].some(function(e){return e.test(n)})?this._parseJSString(e,t,`/`):!1},t.CSSValueExpression.prototype._findMatchedIdx=function(e,t,n){for(var r=t,i,a=-1;;)if(i=e.indexOf(n,r+1),i===-1){i=a;break}else{var o=e.substring(t+1,i).match(/\\\\+$/);if(!o||o[0]%2==0)break;r=i}return e.indexOf(`\n`,t+1){var t={};t.MatcherList=function(){this.length=0},t.MatcherList.prototype={constructor:t.MatcherList,get matcherText(){return Array.prototype.join.call(this,`, `)},set matcherText(e){for(var t=e.split(`,`),n=this.length=t.length,r=0;r{var t={CSSRule:$l().CSSRule,MatcherList:mu().MatcherList};t.CSSDocumentRule=function(){t.CSSRule.call(this),this.matcher=new t.MatcherList,this.cssRules=[]},t.CSSDocumentRule.prototype=new t.CSSRule,t.CSSDocumentRule.prototype.constructor=t.CSSDocumentRule,t.CSSDocumentRule.prototype.type=10,Object.defineProperty(t.CSSDocumentRule.prototype,"cssText",{get:function(){for(var e=[],t=0,n=this.cssRules.length;t{var t={};t.parse=function(e){for(var n=0,r=`before-selector`,i,a=``,o=0,s={selector:!0,value:!0,"value-parenthesis":!0,atRule:!0,"importRule-begin":!0,importRule:!0,atBlock:!0,conditionBlock:!0,"documentRule-begin":!0},c=new t.CSSStyleSheet,l=c,u,d=[],f=!1,p,m,h=``,g,_,v,y,b,x,S,C,w=/@(-(?:\\w+-)+)?keyframes/g,T=function(t){var r=e.substring(0,n).split(`\n`),i=r.length,a=r.pop().length+1,o=Error(t+` (line `+i+`, char `+a+`)`);throw o.line=i,o.char=a,o.styleSheet=c,o},E;E=e.charAt(n);n++)switch(E){case` `:case` `:case`\\r`:case`\n`:case`\\f`:s[r]&&(a+=E);break;case`"`:i=n+1;do i=e.indexOf(`"`,i)+1,i||T(`Unmatched "`);while(e[i-2]===`\\\\`);switch(a+=e.slice(n,i),n=i-1,r){case`before-value`:r=`value`;break;case`importRule-begin`:r=`importRule`;break}break;case`\'`:i=n+1;do i=e.indexOf(`\'`,i)+1,i||T(`Unmatched \'`);while(e[i-2]===`\\\\`);switch(a+=e.slice(n,i),n=i-1,r){case`before-value`:r=`value`;break;case`importRule-begin`:r=`importRule`;break}break;case`/`:e.charAt(n+1)===`*`?(n+=2,i=e.indexOf(`*/`,n),i===-1?T(`Missing */`):n=i+1):a+=E,r===`importRule-begin`&&(a+=` `,r=`importRule`);break;case`@`:if(e.indexOf(`@-moz-document`,n)===n){r=`documentRule-begin`,S=new t.CSSDocumentRule,S.__starts=n,n+=13,a=``;break}else if(e.indexOf(`@media`,n)===n){r=`atBlock`,_=new t.CSSMediaRule,_.__starts=n,n+=5,a=``;break}else if(e.indexOf(`@supports`,n)===n){r=`conditionBlock`,v=new t.CSSSupportsRule,v.__starts=n,n+=8,a=``;break}else if(e.indexOf(`@host`,n)===n){r=`hostRule-begin`,n+=4,C=new t.CSSHostRule,C.__starts=n,a=``;break}else if(e.indexOf(`@import`,n)===n){r=`importRule-begin`,n+=6,a+=`@import`;break}else if(e.indexOf(`@font-face`,n)===n){r=`fontFaceRule-begin`,n+=9,b=new t.CSSFontFaceRule,b.__starts=n,a=``;break}else{w.lastIndex=n;var D=w.exec(e);if(D&&D.index===n){r=`keyframesRule-begin`,x=new t.CSSKeyframesRule,x.__starts=n,x._vendorPrefix=D[1],n+=D[0].length-1,a=``;break}else r===`selector`&&(r=`atRule`)}a+=E;break;case`{`:r===`selector`||r===`atRule`?(g.selectorText=a.trim(),g.style.__starts=n,a=``,r=`before-name`):r===`atBlock`?(_.media.mediaText=a.trim(),u&&d.push(u),l=u=_,_.parentStyleSheet=c,a=``,r=`before-selector`):r===`conditionBlock`?(v.conditionText=a.trim(),u&&d.push(u),l=u=v,v.parentStyleSheet=c,a=``,r=`before-selector`):r===`hostRule-begin`?(u&&d.push(u),l=u=C,C.parentStyleSheet=c,a=``,r=`before-selector`):r===`fontFaceRule-begin`?(u&&(b.parentRule=u),b.parentStyleSheet=c,g=b,a=``,r=`before-name`):r===`keyframesRule-begin`?(x.name=a.trim(),u&&(d.push(u),x.parentRule=u),x.parentStyleSheet=c,l=u=x,a=``,r=`keyframeRule-begin`):r===`keyframeRule-begin`?(g=new t.CSSKeyframeRule,g.keyText=a.trim(),g.__starts=n,a=``,r=`before-name`):r===`documentRule-begin`&&(S.matcher.matcherText=a.trim(),u&&(d.push(u),S.parentRule=u),l=u=S,S.parentStyleSheet=c,a=``,r=`before-selector`);break;case`:`:r===`name`?(m=a.trim(),a=``,r=`before-value`):a+=E;break;case`(`:if(r===`value`)if(a.trim()===`expression`){var O=new t.CSSValueExpression(e,n).parse();O.error?T(O.error):(a+=O.expression,n=O.idx)}else r=`value-parenthesis`,o=1,a+=E;else r===`value-parenthesis`&&o++,a+=E;break;case`)`:r===`value-parenthesis`&&(o--,o===0&&(r=`value`)),a+=E;break;case`!`:r===`value`&&e.indexOf(`!important`,n)===n?(h=`important`,n+=9):a+=E;break;case`;`:switch(r){case`value`:g.style.setProperty(m,a.trim(),h),h=``,a=``,r=`before-name`;break;case`atRule`:a=``,r=`before-selector`;break;case`importRule`:y=new t.CSSImportRule,y.parentStyleSheet=y.styleSheet.parentStyleSheet=c,y.cssText=a+E,c.cssRules.push(y),a=``,r=`before-selector`;break;default:a+=E;break}break;case`}`:switch(r){case`value`:g.style.setProperty(m,a.trim(),h),h=``;case`before-name`:case`name`:g.__ends=n+1,u&&(g.parentRule=u),g.parentStyleSheet=c,l.cssRules.push(g),a=``,r=l.constructor===t.CSSKeyframesRule?`keyframeRule-begin`:`before-selector`;break;case`keyframeRule-begin`:case`before-selector`:case`selector`:for(u||T(`Unexpected }`),f=d.length>0;d.length>0;){if(u=d.pop(),u.constructor.name===`CSSMediaRule`||u.constructor.name===`CSSSupportsRule`){p=l,l=u,l.cssRules.push(p);break}d.length===0&&(f=!1)}f||(l.__ends=n+1,c.cssRules.push(l),l=c,u=null),a=``,r=`before-selector`;break}break;default:switch(r){case`before-selector`:r=`selector`,g=new t.CSSStyleRule,g.__starts=n;break;case`before-name`:r=`name`;break;case`before-value`:r=`value`;break;case`importRule-begin`:r=`importRule`;break}a+=E;break}return c},e.parse=t.parse,t.CSSStyleSheet=tu().CSSStyleSheet,t.CSSStyleRule=eu().CSSStyleRule,t.CSSImportRule=ru().CSSImportRule,t.CSSGroupingRule=iu().CSSGroupingRule,t.CSSMediaRule=ou().CSSMediaRule,t.CSSConditionRule=au().CSSConditionRule,t.CSSSupportsRule=su().CSSSupportsRule,t.CSSFontFaceRule=cu().CSSFontFaceRule,t.CSSHostRule=lu().CSSHostRule,t.CSSStyleDeclaration=_u().CSSStyleDeclaration,t.CSSKeyframeRule=uu().CSSKeyframeRule,t.CSSKeyframesRule=du().CSSKeyframesRule,t.CSSValueExpression=pu().CSSValueExpression,t.CSSDocumentRule=hu().CSSDocumentRule})),_u=s((e=>{var t={};t.CSSStyleDeclaration=function(){this.length=0,this.parentRule=null,this._importants={}},t.CSSStyleDeclaration.prototype={constructor:t.CSSStyleDeclaration,getPropertyValue:function(e){return this[e]||``},setProperty:function(e,t,n){this[e]?Array.prototype.indexOf.call(this,e)<0&&(this[this.length]=e,this.length++):(this[this.length]=e,this.length++),this[e]=t+``,this._importants[e]=n},removeProperty:function(e){if(!(e in this))return``;var t=Array.prototype.indexOf.call(this,e);if(t<0)return``;var n=this[e];return this[e]=``,Array.prototype.splice.call(this,t,1),n},getPropertyCSSValue:function(){},getPropertyPriority:function(e){return this._importants[e]||``},getPropertyShorthand:function(){},isPropertyImplicit:function(){},get cssText(){for(var e=[],t=0,n=this.length;t{var t={CSSStyleSheet:tu().CSSStyleSheet,CSSRule:$l().CSSRule,CSSStyleRule:eu().CSSStyleRule,CSSGroupingRule:iu().CSSGroupingRule,CSSConditionRule:au().CSSConditionRule,CSSMediaRule:ou().CSSMediaRule,CSSSupportsRule:su().CSSSupportsRule,CSSStyleDeclaration:_u().CSSStyleDeclaration,CSSKeyframeRule:uu().CSSKeyframeRule,CSSKeyframesRule:du().CSSKeyframesRule};t.clone=function e(n){var r=new t.CSSStyleSheet,i=n.cssRules;if(!i)return r;for(var a=0,o=i.length;a{e.CSSStyleDeclaration=_u().CSSStyleDeclaration,e.CSSRule=$l().CSSRule,e.CSSGroupingRule=iu().CSSGroupingRule,e.CSSConditionRule=au().CSSConditionRule,e.CSSStyleRule=eu().CSSStyleRule,e.MediaList=nu().MediaList,e.CSSMediaRule=ou().CSSMediaRule,e.CSSSupportsRule=su().CSSSupportsRule,e.CSSImportRule=ru().CSSImportRule,e.CSSFontFaceRule=cu().CSSFontFaceRule,e.CSSHostRule=lu().CSSHostRule,e.StyleSheet=Ql().StyleSheet,e.CSSStyleSheet=tu().CSSStyleSheet,e.CSSKeyframesRule=du().CSSKeyframesRule,e.CSSKeyframeRule=uu().CSSKeyframeRule,e.MatcherList=mu().MatcherList,e.CSSDocumentRule=hu().CSSDocumentRule,e.CSSValue=fu().CSSValue,e.CSSValueExpression=pu().CSSValueExpression,e.parse=gu().parse,e.clone=vu().clone}))();let bu=`style`;var xu=class extends Ul{constructor(e,t=bu){super(e,t),this[an]=null}get sheet(){let e=this[an];return e===null?this[an]=(0,yu.parse)(this.textContent):e}get innerHTML(){return super.innerHTML||``}set innerHTML(e){super.textContent=e,this[an]=null}get innerText(){return super.innerText||``}set innerText(e){super.textContent=e,this[an]=null}get textContent(){return super.textContent||``}set textContent(e){super.textContent=e,this[an]=null}};Da(bu,xu);var Su=class extends ${constructor(e,t=`time`){super(e,t)}get dateTime(){return Y.get(this,`datetime`)}set dateTime(e){Y.set(this,`datetime`,e)}};Da(`time`,Su);var Cu=class extends ${constructor(e,t=`fieldset`){super(e,t)}},wu=class extends ${constructor(e,t=`embed`){super(e,t)}},Tu=class extends ${constructor(e,t=`hr`){super(e,t)}},Eu=class extends ${constructor(e,t=`progress`){super(e,t)}},Du=class extends ${constructor(e,t=`p`){super(e,t)}},Ou=class extends ${constructor(e,t=`table`){super(e,t)}},ku=class extends ${constructor(e,t=`frameset`){super(e,t)}},Au=class extends ${constructor(e,t=`li`){super(e,t)}},ju=class extends ${constructor(e,t=`base`){super(e,t)}},Mu=class extends ${constructor(e,t=`datalist`){super(e,t)}};let Nu=`input`;var Pu=class extends ${constructor(e,t=Nu){super(e,t)}get autofocus(){return Ha.get(this,`autofocus`)||-1}set autofocus(e){Ha.set(this,`autofocus`,e)}get disabled(){return Ha.get(this,`disabled`)}set disabled(e){Ha.set(this,`disabled`,e)}get name(){return this.getAttribute(`name`)}set name(e){this.setAttribute(`name`,e)}get placeholder(){return this.getAttribute(`placeholder`)}set placeholder(e){this.setAttribute(`placeholder`,e)}get type(){return this.getAttribute(`type`)}set type(e){this.setAttribute(`type`,e)}get value(){return Y.get(this,`value`)}set value(e){Y.set(this,`value`,e)}};Da(Nu,Pu);var Fu=class extends ${constructor(e,t=`param`){super(e,t)}},Iu=class extends ${constructor(e,t=`media`){super(e,t)}},Lu=class extends ${constructor(e,t=`audio`){super(e,t)}},Ru=class extends ${constructor(e,t=`h1`){super(e,t)}};Da([`h1`,`h2`,`h3`,`h4`,`h5`,`h6`],Ru);var zu=class extends ${constructor(e,t=`dir`){super(e,t)}},Bu=class extends ${constructor(e,t=`quote`){super(e,t)}},Vu=c({default:()=>Hu}),Hu,Uu=o((()=>{throw Hu={},Error(`Could not resolve "canvas" imported by "linkedom". Is it installed?`)})),Wu=s(((e,t)=>{var n=class{constructor(e,t){this.width=e,this.height=t}getContext(){return null}toDataURL(){return``}};t.exports={createCanvas:(e,t)=>new n(e,t)}}));let{createCanvas:Gu}=u(s(((e,t)=>{try{t.exports=(Uu(),d(Vu))}catch{t.exports=Wu()}}))(),1).default,Ku=`canvas`;var qu=class extends ${constructor(e,t=Ku){super(e,t),this[Qt]=Gu(300,150)}get width(){return this[Qt].width}set width(e){Ua.set(this,`width`,e),this[Qt].width=e}get height(){return this[Qt].height}set height(e){Ua.set(this,`height`,e),this[Qt].height=e}getContext(e){return this[Qt].getContext(e)}toDataURL(...e){return this[Qt].toDataURL(...e)}};Da(Ku,qu);var Ju=class extends ${constructor(e,t=`legend`){super(e,t)}};let Yu=`option`;var Xu=class extends ${constructor(e,t=Yu){super(e,t)}get value(){return Y.get(this,`value`)}set value(e){Y.set(this,`value`,e)}get selected(){return Ha.get(this,`selected`)}set selected(e){let t=this.parentElement?.querySelector(`option[selected]`);t&&t!==this&&(t.selected=!1),Ha.set(this,`selected`,e)}};Da(Yu,Xu);var Zu=class extends ${constructor(e,t=`span`){super(e,t)}},Qu=class extends ${constructor(e,t=`meter`){super(e,t)}},$u=class extends ${constructor(e,t=`video`){super(e,t)}},ed=class extends ${constructor(e,t=`td`){super(e,t)}};let td=`title`;var nd=class extends Ul{constructor(e,t=td){super(e,t)}};Da(td,nd);var rd=class extends ${constructor(e,t=`output`){super(e,t)}},id=class extends ${constructor(e,t=`tr`){super(e,t)}},ad=class extends ${constructor(e,t=`data`){super(e,t)}},od=class extends ${constructor(e,t=`menu`){super(e,t)}};let sd=`select`;var cd=class extends ${constructor(e,t=sd){super(e,t)}get options(){let e=new Ja,{firstElementChild:t}=this;for(;t;)t.tagName===`OPTGROUP`?e.push(...t.children):e.push(t),t=t.nextElementSibling;return e}get disabled(){return Ha.get(this,`disabled`)}set disabled(e){Ha.set(this,`disabled`,e)}get name(){return this.getAttribute(`name`)}set name(e){this.setAttribute(`name`,e)}get value(){return this.querySelector(`option[selected]`)?.value}};Da(sd,cd);var ld=class extends ${constructor(e,t=`br`){super(e,t)}};let ud=`button`;var dd=class extends ${constructor(e,t=ud){super(e,t)}get disabled(){return Ha.get(this,`disabled`)}set disabled(e){Ha.set(this,`disabled`,e)}get name(){return this.getAttribute(`name`)}set name(e){this.setAttribute(`name`,e)}get type(){return this.getAttribute(`type`)}set type(e){this.setAttribute(`type`,e)}};Da(ud,dd);var fd=class extends ${constructor(e,t=`map`){super(e,t)}},pd=class extends ${constructor(e,t=`optgroup`){super(e,t)}},md=class extends ${constructor(e,t=`dl`){super(e,t)}};let hd=`textarea`;var gd=class extends Ul{constructor(e,t=hd){super(e,t)}get disabled(){return Ha.get(this,`disabled`)}set disabled(e){Ha.set(this,`disabled`,e)}get name(){return this.getAttribute(`name`)}set name(e){this.setAttribute(`name`,e)}get placeholder(){return this.getAttribute(`placeholder`)}set placeholder(e){this.setAttribute(`placeholder`,e)}get type(){return this.getAttribute(`type`)}set type(e){this.setAttribute(`type`,e)}get value(){return this.textContent}set value(e){this.textContent=e}};Da(hd,gd);var _d=class extends ${constructor(e,t=`font`){super(e,t)}},vd=class extends ${constructor(e,t=`div`){super(e,t)}};let yd=`link`;var bd=class extends ${constructor(e,t=yd){super(e,t)}get disabled(){return Ha.get(this,`disabled`)}set disabled(e){Ha.set(this,`disabled`,e)}get href(){return Y.get(this,`href`).trim()}set href(e){Y.set(this,`href`,e)}get hreflang(){return Y.get(this,`hreflang`)}set hreflang(e){Y.set(this,`hreflang`,e)}get media(){return Y.get(this,`media`)}set media(e){Y.set(this,`media`,e)}get rel(){return Y.get(this,`rel`)}set rel(e){Y.set(this,`rel`,e)}get type(){return Y.get(this,`type`)}set type(e){Y.set(this,`type`,e)}};Da(yd,bd);let xd=`slot`;var Sd=class extends ${constructor(e,t=xd){super(e,t)}get name(){return this.getAttribute(`name`)}set name(e){this.setAttribute(`name`,e)}assign(){}assignedNodes(e){let t=!!this.name,n=this.getRootNode().host?.childNodes??[],r;if(r=t?[...n].filter(e=>e.slot===this.name):[...n].filter(e=>!e.slot),e?.flatten){let e=[];for(let t of r)t.localName===`slot`?e.push(...t.assignedNodes({flatten:!0})):e.push(t);r=e}return r.length?r:[...this.childNodes]}assignedElements(e){let t=this.assignedNodes(e).filter(e=>e.nodeType===1);return t.length?t:[...this.children]}};Da(xd,Sd);var Cd=class extends ${constructor(e,t=`form`){super(e,t)}},wd=class extends ${constructor(e,t=`img`){super(e,t)}get alt(){return Y.get(this,`alt`)}set alt(e){Y.set(this,`alt`,e)}get sizes(){return Y.get(this,`sizes`)}set sizes(e){Y.set(this,`sizes`,e)}get src(){return Y.get(this,`src`)}set src(e){Y.set(this,`src`,e)}get srcset(){return Y.get(this,`srcset`)}set srcset(e){Y.set(this,`srcset`,e)}get title(){return Y.get(this,`title`)}set title(e){Y.set(this,`title`,e)}get width(){return Ua.get(this,`width`)}set width(e){Ua.set(this,`width`,e)}get height(){return Ua.get(this,`height`)}set height(e){Ua.set(this,`height`,e)}};Da(`img`,wd);var Td=class extends ${constructor(e,t=`pre`){super(e,t)}},Ed=class extends ${constructor(e,t=`ul`){super(e,t)}};let Dd=`meta`;var Od=class extends ${constructor(e,t=Dd){super(e,t)}get name(){return Y.get(this,`name`)}set name(e){Y.set(this,`name`,e)}get httpEquiv(){return Y.get(this,`http-equiv`)}set httpEquiv(e){Y.set(this,`http-equiv`,e)}get content(){return Y.get(this,`content`)}set content(e){Y.set(this,`content`,e)}get charset(){return Y.get(this,`charset`)}set charset(e){Y.set(this,`charset`,e)}get media(){return Y.get(this,`media`)}set media(e){Y.set(this,`media`,e)}};Da(Dd,Od);var kd=class extends ${constructor(e,t=`picture`){super(e,t)}},Ad=class extends ${constructor(e,t=`area`){super(e,t)}},jd=class extends ${constructor(e,t=`ol`){super(e,t)}},Md=class extends ${constructor(e,t=`caption`){super(e,t)}},Nd=class extends ${constructor(e,t=`a`){super(e,t)}get href(){return encodeURI(decodeURI(Y.get(this,`href`))).trim()}set href(e){Y.set(this,`href`,decodeURI(e))}get download(){return encodeURI(decodeURI(Y.get(this,`download`)))}set download(e){Y.set(this,`download`,decodeURI(e))}get target(){return Y.get(this,`target`)}set target(e){Y.set(this,`target`,e)}get type(){return Y.get(this,`type`)}set type(e){Y.set(this,`type`,e)}get rel(){return Y.get(this,`rel`)}set rel(e){Y.set(this,`rel`,e)}};Da(`a`,Nd);var Pd=class extends ${constructor(e,t=`label`){super(e,t)}},Fd=class extends ${constructor(e,t=`unknown`){super(e,t)}},Id=class extends ${constructor(e,t=`mod`){super(e,t)}},Ld=class extends ${constructor(e,t=`details`){super(e,t)}};let Rd=`source`;var zd=class extends ${constructor(e,t=Rd){super(e,t)}get src(){return Y.get(this,`src`)}set src(e){Y.set(this,`src`,e)}get srcset(){return Y.get(this,`srcset`)}set srcset(e){Y.set(this,`srcset`,e)}get sizes(){return Y.get(this,`sizes`)}set sizes(e){Y.set(this,`sizes`,e)}get type(){return Y.get(this,`type`)}set type(e){Y.set(this,`type`,e)}};Da(Rd,zd);let Bd={HTMLElement:$,HTMLTemplateElement:Bl,HTMLHtmlElement:Vl,HTMLScriptElement:Gl,HTMLFrameElement:Kl,HTMLIFrameElement:Jl,HTMLObjectElement:Yl,HTMLHeadElement:Xl,HTMLBodyElement:Zl,HTMLStyleElement:xu,HTMLTimeElement:Su,HTMLFieldSetElement:Cu,HTMLEmbedElement:wu,HTMLHRElement:Tu,HTMLProgressElement:Eu,HTMLParagraphElement:Du,HTMLTableElement:Ou,HTMLFrameSetElement:ku,HTMLLIElement:Au,HTMLBaseElement:ju,HTMLDataListElement:Mu,HTMLInputElement:Pu,HTMLParamElement:Fu,HTMLMediaElement:Iu,HTMLAudioElement:Lu,HTMLHeadingElement:Ru,HTMLDirectoryElement:zu,HTMLQuoteElement:Bu,HTMLCanvasElement:qu,HTMLLegendElement:Ju,HTMLOptionElement:Xu,HTMLSpanElement:Zu,HTMLMeterElement:Qu,HTMLVideoElement:$u,HTMLTableCellElement:ed,HTMLTitleElement:nd,HTMLOutputElement:rd,HTMLTableRowElement:id,HTMLDataElement:ad,HTMLMenuElement:od,HTMLSelectElement:cd,HTMLBRElement:ld,HTMLButtonElement:dd,HTMLMapElement:fd,HTMLOptGroupElement:pd,HTMLDListElement:md,HTMLTextAreaElement:gd,HTMLFontElement:_d,HTMLDivElement:vd,HTMLLinkElement:bd,HTMLSlotElement:Sd,HTMLFormElement:Cd,HTMLImageElement:wd,HTMLPreElement:Td,HTMLUListElement:Ed,HTMLMetaElement:Od,HTMLPictureElement:kd,HTMLAreaElement:Ad,HTMLOListElement:jd,HTMLTableCaptionElement:Md,HTMLAnchorElement:Nd,HTMLLabelElement:Pd,HTMLUnknownElement:Fd,HTMLModElement:Id,HTMLDetailsElement:Ld,HTMLSourceElement:zd,HTMLTrackElement:class extends ${constructor(e,t=`track`){super(e,t)}},HTMLMarqueeElement:class extends ${constructor(e,t=`marquee`){super(e,t)}}},Vd={test:()=>!0},Hd={"text/html":{docType:``,ignoreCase:!0,voidElements:/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i},"image/svg+xml":{docType:``,ignoreCase:!1,voidElements:Vd},"text/xml":{docType:``,ignoreCase:!1,voidElements:Vd},"application/xml":{docType:``,ignoreCase:!1,voidElements:Vd},"application/xhtml+xml":{docType:``,ignoreCase:!1,voidElements:Vd}};var Ud=class extends hl{constructor(e,t={}){super(e,t),this.detail=t.detail}},Wd=class extends hl{constructor(e,t={}){super(e,t),this.inputType=t.inputType,this.data=t.data,this.dataTransfer=t.dataTransfer,this.isComposing=t.isComposing||!1,this.ranges=t.ranges}};let Gd=e=>class extends wd{constructor(t,n){switch(super(e),arguments.length){case 1:this.height=t,this.width=t;break;case 2:this.height=n,this.width=t;break}}},Kd=({[on]:e,[W]:t},n=null)=>{la(e[nn],t[G]);do{let r=na(e),i=r===t?r:r[G];n?n.insertBefore(e,n[W]):e.remove(),e=i}while(e!==t)};var qd=class e{constructor(){this[on]=null,this[W]=null,this.commonAncestorContainer=null}insertNode(e){this[W].parentNode.insertBefore(e,this[on])}selectNode(e){this[on]=e,this[W]=na(e)}selectNodeContents(e){this.selectNode(e),this.commonAncestorContainer=e}surroundContents(e){e.replaceChildren(this.extractContents())}setStartBefore(e){this[on]=e}setStartAfter(e){this[on]=e.nextSibling}setEndBefore(e){this[W]=na(e.previousSibling)}setEndAfter(e){this[W]=na(e)}cloneContents(){let{[on]:e,[W]:t}=this,n=e.ownerDocument.createDocumentFragment();for(;e!==t;)n.insertBefore(e.cloneNode(!0),n[W]),e=na(e),e!==t&&(e=e[G]);return n}deleteContents(){Kd(this)}extractContents(){let e=this[on].ownerDocument.createDocumentFragment();return Kd(this,e),e}createContextualFragment(e){let{commonAncestorContainer:t}=this,n=`ownerSVGElement`in t,r=n?t.ownerDocument:t,i=ua(r,e);if(n){let e=[...i.childNodes];i=r.createDocumentFragment(),Object.setPrototypeOf(i,wl.prototype),i.ownerSVGElement=r;for(let t of e)Object.setPrototypeOf(t,wl.prototype),t.ownerSVGElement=r,i.appendChild(t)}else this.selectNode(i);return i}cloneRange(){let t=new e;return t[on]=this[on],t[W]=this[W],t}};let Jd=({nodeType:e},t)=>{switch(e){case 1:return t&1;case 3:return t&4;case 8:return t&128;case 4:return t&8}return 0};var Yd=class{constructor(e,t=-1){this.root=e,this.currentNode=e,this.whatToShow=t;let{[G]:n,[W]:r}=e;if(e.nodeType===9){let{documentElement:t}=e;n=t,r=t[W]}let i=[];for(;n&&n!==r;)Jd(n,t)&&i.push(n),n=n[G];this[rn]={i:0,nodes:i}}nextNode(){let e=this[rn];return this.currentNode=e.i{let{[G]:r,[W]:i}=t;return e.call({ownerDocument:t,[G]:r,[W]:i},n)},Zd=Ji({},Ll,Bd,{CustomEvent:Ud,Event:hl,EventTarget:qa,InputEvent:Wd,NamedNodeMap:gl,NodeList:Ja}),Qd=new WeakMap;var $d=class extends Gc{constructor(e){super(null,`#document`,9),this[Gt]={active:!1,registry:null},this[en]={active:!1,class:null},this[$t]=Hd[e],this[Jt]=null,this[Yt]=null,this[Zt]=null,this[Qt]=null,this[cn]=null}get defaultView(){return Qd.has(this)||Qd.set(this,new Proxy(globalThis,{set:(e,t,n)=>{switch(t){case`addEventListener`:case`removeEventListener`:case`dispatchEvent`:this[Xt][t]=n;break;default:e[t]=n;break}return!0},get:(e,t)=>{switch(t){case`addEventListener`:case`removeEventListener`:case`dispatchEvent`:if(!this[Xt]){let e=this[Xt]=new qa;e.dispatchEvent=e.dispatchEvent.bind(e),e.addEventListener=e.addEventListener.bind(e),e.removeEventListener=e.removeEventListener.bind(e)}return this[Xt][t];case`document`:return this;case`navigator`:return{userAgent:`Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36`};case`window`:return Qd.get(this);case`customElements`:return this[Gt].registry||(this[Gt]=new xa(this)),this[Gt];case`performance`:return e.performance;case`DOMParser`:return this[Yt];case`Image`:return this[Qt]||(this[Qt]=Gd(this)),this[Qt];case`MutationObserver`:return this[en].class||(this[en]=new Ra(this)),this[en].class}return this[Zt]&&this[Zt][t]||Zd[t]||e[t]}})),Qd.get(this)}get doctype(){let e=this[Jt];if(e)return e;let{firstChild:t}=this;return t&&t.nodeType===10?this[Jt]=t:null}set doctype(e){if(/^([a-z:]+)(\\s+system|\\s+public(\\s+"([^"]+)")?)?(\\s+"([^"]+)")?/i.test(e)){let{$1:e,$4:t,$6:n}=RegExp;this[Jt]=new qc(this,e,t,n),sa(this,this[Jt],this[G])}}get documentElement(){return this.firstElementChild}get isConnected(){return!0}_getParent(){return this[Xt]}createAttribute(e){return new ro(this,e)}createCDATASection(e){return new _o(this,e)}createComment(e){return new vo(this,e)}createDocumentFragment(){return new Kc(this)}createDocumentType(e,t,n){return new qc(this,e,t,n)}createElement(e){return new xl(this,e)}createRange(){let e=new qd;return e.commonAncestorContainer=this,e}createTextNode(e){return new Vc(this,e)}createTreeWalker(e,t=-1){return new Yd(e,t)}createNodeIterator(e,t=-1){return this.createTreeWalker(e,t)}createEvent(e){let t=Yi(e===`Event`?new hl(``):new Ud(``));return t.initEvent=t.initCustomEvent=(e,n=!1,r=!1,i)=>{t.bubbles=!!n,Xi(t,{type:{value:e},canBubble:{value:n},cancelable:{value:r},detail:{value:i}})},t}cloneNode(e=!1){let{constructor:t,[Gt]:n,[Jt]:r}=this,i=new t;if(i[Gt]=n,e){let e=i[W],{childNodes:t}=this;for(let{length:n}=t,r=0;r{let{ownerDocument:t,nodeType:n}=e;e.ownerDocument=this,i&&t!==this&&n===1&&r.upgrade(e)};if(a(n),t)switch(n.nodeType){case 1:case 11:{let{[G]:e,[W]:t}=n;for(;e!==t;)e.nodeType===1&&a(e),e=e[G];break}}return n}toString(){return this.childNodes.join(``)}querySelector(e){return Xd(super.querySelector,this,e)}querySelectorAll(e){return Xd(super.querySelectorAll,this,e)}getElementsByTagNameNS(e,t){return this.getElementsByTagName(t)}createAttributeNS(e,t){return this.createAttribute(t)}createElementNS(e,t,n){return e===`http://www.w3.org/2000/svg`?new wl(this,t,null):this.createElement(t,n)}};ea(Zd.Document=function(){Tl()},$d).prototype=$d.prototype;let ef=(e,t,n,r)=>{if(!t&&Ea.has(n))return new(Ea.get(n))(e,n);let{[Gt]:{active:i,registry:a}}=e;if(i){let i=t?r.is:n;if(a.has(i)){let{Class:t}=a.get(i),r=new t(e,n);return ma.set(r,{connected:!1}),r}}return new $(e,n)};var tf=class extends $d{constructor(){super(`text/html`)}get all(){let e=new Ja,{[G]:t,[W]:n}=this;for(;t!==n;){switch(t.nodeType){case 1:e.push(t);break}t=t[G]}return e}get head(){let{documentElement:e}=this,{firstElementChild:t}=e;return(!t||t.tagName!==`HEAD`)&&(t=this.createElement(`head`),e.prepend(t)),t}get body(){let{head:e}=this,{nextElementSibling:t}=e;return(!t||t.tagName!==`BODY`)&&(t=this.createElement(`body`),e.after(t)),t}get title(){let{head:e}=this;return e.getElementsByTagName(`title`).at(0)?.textContent||``}set title(e){let{head:t}=this,n=t.getElementsByTagName(`title`).at(0);n?n.textContent=e:t.insertBefore(this.createElement(`title`),t.firstChild).textContent=e}createElement(e,t){let n=!!(t&&t.is),r=ef(this,n,e,t);return n&&r.setAttribute(`is`,t.is),r}},nf=class extends $d{constructor(){super(`image/svg+xml`)}toString(){return this[$t].docType+super.toString()}},rf=class extends $d{constructor(){super(`text/xml`)}toString(){return this[$t].docType+super.toString()}},af=class e{parseFromString(t,n,r=null){let i=!1,a;return n===`text/html`?(i=!0,a=new tf):a=n===`image/svg+xml`?new nf:new rf,a[Yt]=e,r&&(a[Zt]=r),i&&t===`...`&&(t=``),t?Ta(a,i,t):a}};let{parse:of}=JSON,sf=(e,t=null)=>new af().parseFromString(e,`text/html`,t).defaultView;function cf(){Tl()}ea(cf,$d).prototype=$d.prototype;let lf=self,uf=function(){let e=this.childNodes;if(!e)return null;for(let t=0;t{if(!e||typeof e!=`object`)return;let t=Object.getPrototypeOf(e);!t||Object.prototype.hasOwnProperty.call(t,`firstElementChild`)||Object.defineProperty(t,"firstElementChild",{configurable:!0,get:uf})};var ff=class extends Ht.DOMParser{parseFromString(e,t){let n=super.parseFromString(e,t);return df(n),df(n.documentElement),n}};let pf=(e,t)=>t instanceof Error?{id:e,ok:!1,message:t.message,stack:t.stack}:{id:e,ok:!1,message:String(t)},mf=()=>{let{window:e}=sf(``),t=globalThis;return t.window=e,t.document=e.document,t.DOMParser=ff,t.Node=e.Node,t.Element=e.Element,t.HTMLElement=e.HTMLElement,t.DocumentFragment=e.DocumentFragment,t.XMLSerializer=Ht.XMLSerializer,e.document},hf=async e=>{let t=mf(),n=t.createElement(`div`),r=t.createElement(`div`);return t.body.appendChild(n),t.body.appendChild(r),await Pt(e.buffer,r,n,{...e.options,experimental:!1,useBase64URL:!0}),`${n.innerHTML}${r.innerHTML}`};lf.addEventListener(`message`,async e=>{let t=e.data;try{let e=await hf(t);lf.postMessage({id:t.id,ok:!0,html:e})}catch(e){lf.postMessage(pf(t.id,e))}})})();',o=typeof self<`u`&&self.Blob&&new Blob([`(self.URL || self.webkitURL).revokeObjectURL(self.location.href);`,a],{type:`text/javascript;charset=utf-8`});function s(e){let t;try{if(t=o&&(self.URL||self.webkitURL).createObjectURL(o),!t)throw``;let n=new Worker(t,{name:e?.name});return n.addEventListener(`error`,()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),n}catch{return new Worker(`data:text/javascript;charset=utf-8,`+encodeURIComponent(a),{name:e?.name})}}var c={width:794,height:1123},l=2,u=15e3,d=0,f=(()=>{let t={module:null,async load(){return this.module||=e(()=>import(`./docx-preview-CbKtHvXt.js`),__vite__mapDeps([0,1,2,3,4]),import.meta.url),this.module}};return async()=>await t.load()})(),p=(e=!0)=>({debug:!1,experimental:e}),m=e=>e?.options?.docx?.worker!==!1&&typeof Worker<`u`,h=e=>e?.options?.docx?.progressive!==!1&&typeof document<`u`,g=()=>new Promise(e=>{if(typeof window>`u`||typeof window.requestAnimationFrame!=`function`){setTimeout(e,0);return}window.requestAnimationFrame(()=>e())});async function _(e,t,n){if(!h(n)){t.innerHTML=e,n?.onProgressiveRender?.();return}let r=document.createElement(`template`);r.innerHTML=e;let i=r.content.querySelector(`.docx-wrapper`);if(!i){t.innerHTML=e,n?.onProgressiveRender?.();return}let a=Array.from(i.children),o=i.cloneNode(!1),s=!1;t.innerHTML=``,Array.from(r.content.childNodes).forEach(e=>{if(e===i){t.appendChild(o);return}t.appendChild(e)});for(let e=0;e{o.appendChild(e)}),s||(s=!0,n?.onProgressiveRender?.()),e+l{let c=!1,l,u=()=>{l!==void 0&&window.clearTimeout(l),i.removeEventListener(`message`,f),i.removeEventListener(`error`,p),i.removeEventListener(`messageerror`,m),i.terminate()},d=e=>{c||(c=!0,u(),console.warn(`[file-viewer] DOCX Worker 渲染失败,回退到 docx-preview 主线程渲染。`,e),s(!1))},f=e=>{if(e.data?.id===a&&!c){if(c=!0,u(),e.data.ok){_(e.data.html,t,r).then(()=>s(!0)).catch(e=>{console.warn(`[file-viewer] DOCX 渐进挂载失败,回退到 docx-preview 主线程渲染。`,e),s(!1)});return}console.warn(`[file-viewer] DOCX Worker 渲染失败,回退到 docx-preview 主线程渲染。`,e.data.message),s(!1)}},p=e=>{d(e.error||e.message)},m=()=>{d(`DOCX Worker 消息无法结构化传输`)};i.addEventListener(`message`,f),i.addEventListener(`error`,p),i.addEventListener(`messageerror`,m),Number.isFinite(o)&&o>0&&(l=window.setTimeout(()=>{d(`DOCX Worker 超过 ${o}ms 未返回结果`)},o));let h=e.slice(0);i.postMessage({id:a,buffer:h,options:{...n,experimental:!1,useBase64URL:!0}},[h])})}var y=` .docx-fit-viewer { box-sizing: border-box; height: 100%; overflow: auto; background: #ececec; } .docx-fit-viewer .docx-wrapper { box-sizing: border-box; min-width: 0 !important; width: 100% !important; padding: 24px 14px 40px !important; background: #e7e9ec !important; } .docx-fit-viewer .docx-page-frame { position: relative; width: 100%; min-width: 0; margin: 0 auto 24px; overflow: visible; } .docx-fit-viewer .docx-page-frame > section.docx { position: absolute; top: 0; left: 50%; margin: 0 !important; background: #ffffff !important; box-shadow: 0 2px 14px rgba(25, 35, 48, 0.18); box-sizing: border-box; color: #111827; overflow: hidden; transform-origin: top center; } `;function b(e){let t=document.createElement(`style`);return t.textContent=y,e.prepend(t),t}function x(e,t,n){let r=e.cloneNode(!1);r.innerHTML=``,r.dataset.docxPaginated=`true`,r.style.minHeight=`${n}px`,r.style.height=`${n}px`,r.style.overflow=`hidden`;let i=t.cloneNode(!1);return r.appendChild(i),Array.from(e.children).forEach(e=>{e!==t&&r.appendChild(e.cloneNode(!0))}),{page:r,article:i}}function S(e){let t=window.getComputedStyle(e),n=parseFloat(t.minHeight);return Number.isFinite(n)&&n>0?n:e.offsetHeight}function C(e){let t=e.querySelector(`.docx-wrapper`);t&&Array.from(t.children).forEach(e=>{if(!(e instanceof HTMLElement)||!e.matches(`section.docx`))return;let t=e.querySelector(`:scope > article`);if(!(t instanceof HTMLElement))return;let n=S(e),r=Array.from(t.childNodes);if(!n||r.length<2||e.scrollHeight<=n*1.15)return;let i=x(e,t,n);e.before(i.page),r.forEach(r=>{i.article.appendChild(r),!(i.page.scrollHeight<=n+1||i.article.childNodes.length===1)&&(i.article.removeChild(r),i=x(e,t,n),e.before(i.page),i.article.appendChild(r))}),e.remove()})}function w(e){let t=e.querySelector(`.docx-wrapper`);return t?Array.from(t.children).flatMap(e=>{if(!(e instanceof HTMLElement)||!e.matches(`section.docx`))return[];let t=document.createElement(`div`);return t.className=`docx-page-frame`,e.before(t),t.appendChild(e),[t]}):[]}function T(e){e.classList.add(`docx-fit-viewer`);let t=b(e);C(e);let n=w(e),r=0,i=()=>{window.cancelAnimationFrame(r),r=window.requestAnimationFrame(()=>{n.forEach(e=>{let t=e.firstElementChild;if(!(t instanceof HTMLElement))return;t.style.transform=`translateX(-50%)`;let n=t.offsetWidth,r=t.offsetHeight;if(!n||!r)return;let i=Math.max(e.clientWidth-8,120),a=Math.min(1,Math.max(.24,i/n));t.style.transform=`translateX(-50%) scale(${a})`,e.style.height=`${Math.ceil(r*a)}px`})})},a=new ResizeObserver(i);return a.observe(e),n.forEach(e=>a.observe(e)),i(),()=>{window.cancelAnimationFrame(r),a.disconnect(),t.remove(),e.classList.remove(`docx-fit-viewer`)}}function E(e){let t=e.firstElementChild;return t instanceof HTMLElement?t:null}function D(e){let n=e?E(e):null;return n?t(n,c):c}function O(e,t){let n=r(t.width),a=r(t.height);i(e,t),e.style.margin=`0 auto 18px`;let o=E(e);o&&(o.style.position=`relative`,o.style.top=`auto`,o.style.left=`auto`,o.style.width=n,o.style.maxWidth=`none`,o.style.minHeight=a,o.style.height=a,o.style.margin=`0 auto`,o.style.transform=`none`,o.style.transformOrigin=`top left`,o.style.overflow=`hidden`,o.style.boxShadow=`none`)}function ee(e){let t=D(e.querySelector(`.docx-page-frame`)||void 0);return n({selector:`.viewer-export-content .docx-page-frame`,width:t.width,height:t.height})}function te(e){let t=Array.from(e.querySelectorAll(`.docx-page-frame`)),n=e.cloneNode(!0),r=document.createElement(`div`);r.className=`docx-print-document`;let i=Array.from(n.querySelectorAll(`style`)).filter(e=>!e.textContent?.includes(`.docx-fit-viewer`)).map(e=>e.outerHTML).join(``);return n.querySelectorAll(`.docx-page-frame`).forEach((e,n)=>{O(e,D(t[n])),r.appendChild(e.cloneNode(!0))}),r.childElementCount?`${i}${r.outerHTML}`:n.innerHTML}async function ne(e,t,n){let r=p(),i=await v(e,t,r,n);if(t.dataset.docxWorker=i?`true`:`false`,!i){let{defaultOptions:n,renderAsync:i}=await f();await i(e,t,void 0,{...n,...r})}let a=T(t);return n?.registerExportAdapter?.({includeDocumentStyles:!1,beforeSnapshot:()=>{window.dispatchEvent(new Event(`resize`))},printStyle:()=>ee(t),toHtml:()=>te(t)}),{$el:t,unmount(){n?.registerExportAdapter?.(null),a(),delete t.dataset.docxWorker,t.innerHTML=``}}}var re=globalThis.Buffer,ie=0;function k(e){return String(e).replace(/&/g,`&`).replace(//g,`>`).replace(/"/g,`"`).replace(/'/g,`'`)}function A(e=`id`){return ie+=1,`${e}-${ie}`}function j(e){return e%2==0?e:e+1}function ae(e){let t=e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength);if(re)return re.from(t).toString(`base64`);let n=``,r=32768;for(let e=0;e=0&&e+t<=this.length}u8(e){return this.ensure(e,1)?this.view.getUint8(e):0}i8(e){return this.ensure(e,1)?this.view.getInt8(e):0}u16(e){return this.ensure(e,2)?this.view.getUint16(e,!0):0}i16(e){return this.ensure(e,2)?this.view.getInt16(e,!0):0}u32(e){return this.ensure(e,4)?this.view.getUint32(e,!0):0}i32(e){return this.ensure(e,4)?this.view.getInt32(e,!0):0}u64(e){let t=this.u32(e);return this.u32(e+4)*4294967296+t}slice(e,t){return this.ensure(e,t)?this.bytes.subarray(e,e+t):new Uint8Array}array(e,t,n){let r=[],i=n.byteWidth??1;for(let a=0;a=e.length)throw Error(`Sector ${n} is out of bounds`);if(i<=e.length)return e.subarray(r,i);let a=new Uint8Array(t);return a.set(e.subarray(r)),a}function Se(e,t,n=ve){let r=[],i=new Set,a=e,o=0;for(;a!==F&&a!==P&&a>=0;){if(i.has(a))throw Error(`Detected sector loop at ${a}`);if(i.add(a),r.push(a),a=t(a),o+=1,o>n)throw Error(`Sector chain exceeds safe limit`)}return r}function I(e,t,n,r,i=null){if(n===F||n===P||n<0)return new Uint8Array;let a=Se(n,e=>r[e]??F),o=new Uint8Array(a.length*t),s=0;for(let n of a)o.set(xe(e,t,n),s),s+=t;return i==null?o:o.subarray(0,Math.min(i,o.length))}function Ce(e){function t(n,r){if(n<0||n>=e.length)return;let i=e[n];i&&(t(i.leftSiblingId,r),r.push(n),t(i.rightSiblingId,r))}function n(r){let i=e[r];if(!i||i.childId<0)return;let a=[];t(i.childId,a),i.children=a;for(let t of a){let i=e[t];i&&(i.parentId=r,n(t))}}let r=e.find(e=>e.objectType===5);if(!r)throw Error(`CFB root storage not found`);return n(r.id),r}function we(e){let t=new Map;for(let n of e){if(!n||!n.name)continue;let r=[],i=n;for(;i;)i.objectType!==5&&r.push(i.name),i=i.parentId==null?null:e[i.parentId]??null;let a=`/${r.reverse().join(`/`)}`;n.path=a===`/`?`/${n.name}`:a,t.set(n.path,n)}return t}function Te(e){return e.replace(/\u0000+$/,``)}function Ee(e,t={}){let n=me(e),r=new N(n),i=[];for(let e=0;e=0&&y.push(t)}let b=[...y],x=_,S=0;for(;x!==F&&x!==P&&x>=0;){let e=new N(xe(n,c,x)),t=c/4-1;for(let n=0;n=0&&b.push(t)}if(x=e.i32(c-4),S+=1,S>v+4){le(i,`DIFAT chain exceeded declared sector count; stopping early`);break}}d&&b.length=0){let e=I(n,c,h,C),t=new N(e);for(let n=0;n+4<=e.length;n+=4)ee.push(t.i32(n))}let te=I(n,c,D.startSector,C,D.streamSize);function ne(e){if(e.startSector<0)return new Uint8Array;let t=Se(e.startSector,e=>ee[e]??F),n=new Uint8Array(t.length*l),r=0;for(let e of t){let t=e*l,i=t+l;if(i>te.length)throw Error(`Mini sector ${e} is out of bounds`);n.set(te.subarray(t,i),r),r+=l}return n.subarray(0,Math.min(e.streamSize,n.length))}function re(e){let t=typeof e==`string`?O.get(e)??null:e;return!t||t.objectType!==2&&t.objectType!==5?null:t.objectType===5?te:t.streamSize=0&&ee.length?ne(t):I(n,c,t.startSector,C,t.streamSize)}function ie(e){let t=typeof e==`string`?O.get(e)??null:e;return t?(t.children||[]).map(e=>E[e]).filter(e=>!!e):[]}return{bytes:n,majorVersion:a,sectorSize:c,miniSectorSize:l,numDirSectors:u,numFatSectors:d,firstDirSector:f,transactionSignature:p,miniStreamCutoffSize:m,warnings:i,entries:E,root:D,pathMap:O,getEntry(e){return O.get(e)??null},getStream:re,listChildren:ie,findByName(e,t=`/`){let n=t===`/`?D:O.get(t)??null;if(!n)return null;let r=[n];for(;r.length;){let t=r.pop();if(t){if(t.name===e)return t;for(let e of t.children||[]){let t=E[e];t&&r.push(t)}}}return null}}}var De={"‚":`‚`,"ƒ":`ƒ`,"„":`„`,"…":`…`,"†":`†`,"‡":`‡`,"ˆ":`ˆ`,"‰":`‰`,"Š":`Š`,"‹":`‹`,"Œ":`Œ`,"‘":`‘`,"’":`’`,"“":`“`,"”":`”`,"•":`•`,"–":`–`,"—":`—`,"˜":`˜`,"™":`™`,"š":`š`,"›":`›`,"œ":`œ`,"Ÿ":`Ÿ`};function Oe(e){return e.replace(/[\x82-\x8C\x91-\x9C\x9F]/g,e=>De[e]||e)}function ke(e){let t=``;for(let n=0;n>>0,s=t.u16(a+6),c=!!(o&1073741824),l=o&1073741823,u=r[e]??0,d=r[e+1]??u,f=c?Math.floor(l/2):l,p=c?d-u:(d-u)*2;i.push({index:e,descriptor:n,fNoParaLast:!!(n&1),fRaw:!!(n&2),prm:s,compressed:c,fcRaw:o,fc:l,cpStart:u,cpEnd:d,actualByteStart:f,byteLength:p,actualByteEnd:f+p}),a+=8}return{cps:r,pieces:i}}function Ne(e,t){let n=e.subarray(t.actualByteStart,t.actualByteEnd);return t.compressed?ke(n):Ae(n)}function Pe(e,t){return t.pcdt.pieceTable.pieces.map(t=>Ne(e,t))}function Fe(e,t,n=null){let r=e.pcdt.pieceTable.pieces,i=n??!!(t&1073741824),a=n==null?t&1073741823:t,o=i?Math.floor(a/2):a;for(let e of r){if(oe.actualByteEnd)continue;let t=o-e.actualByteStart,n=e.cpStart+Math.floor(t/(e.compressed?1:2));if(n>=e.cpStart&&n<=e.cpEnd)return n}for(let e of r){if(te.actualByteEnd)continue;let n=t-e.actualByteStart,r=e.cpStart+Math.floor(n/(e.compressed?1:2));if(r>=e.cpStart&&r<=e.cpEnd)return r}return null}function Ie(e,t,n,r,i){if(i<=r)return``;let a=[];for(let e=0;e=i)break;let s=Math.max(r,o.cpStart)-o.cpStart,c=Math.min(i,o.cpEnd)-o.cpStart;a.push((n[e]??``).slice(s,c))}return a.join(``)}function Le(e){let t=[],n=0;for(let r=0;r>4&15,fEncrypted:!!(a&256),fWhichTblStm:a&512?1:0,fReadOnlyRecommended:!!(a&1024),fWriteReservation:!!(a&2048),fExtChar:!!(a&4096),fLoadOverride:!!(a&8192),fFarEast:!!(a&16384),fObfuscated:!!(a&32768),nFibBack:e.u16(12),lKey:e.u32(14),envr:e.u8(18),fMac:!!(o&1),fEmptySpecial:!!(o&2),fLoadOverridePage:!!(o&4)}}function Ge(e){let t=new N(e),n=[];for(let r=0;r+4<=e.length;r+=4)n.push(t.i32(r));return{raw:n,cbMac:n[0]??0,ccpText:n[3]??0,ccpFtn:n[4]??0,ccpHdd:n[5]??0,ccpMcr:n[6]??0,ccpAtn:n[7]??0,ccpEdn:n[8]??0,ccpTxbx:n[9]??0,ccpHdrTxbx:n[10]??0}}function Ke(e,t){let n=new N(e),r={_pairs:[]},i=[];for(let a=0;a>13&7}function z(e,t=0){return t+2>e.length?0:(e[t]??0)|(e[t+1]??0)<<8}function B(e,t=0){let n=z(e,t);return n>32767?n-65536:n}function Ye(e,t=0){return t+4>e.length?0:((e[t]??0)|(e[t+1]??0)<<8|(e[t+2]??0)<<16|(e[t+3]??0)<<24>>>0)>>>0}function V(e,t=0){return{first:e[t]??0,lim:e[t+1]??0}}function H(e,t=0){if(t+4>e.length)return null;let n=Ye(e,t)>>>0;return{raw:n,lineWidth:n&255,borderType:n>>8&255,color:n>>16&255}}function Xe(e,t=0){let n=z(e,t);return{raw:n,horzMerge:n&3,textFlow:n>>2&7,vertMerge:n>>5&3,vertAlign:n>>7&3,ftsWidth:n>>9&7,fitText:!!(n&4096),noWrap:!!(n&8192),hideMark:!!(n&16384)}}function Ze(e,t=0){return t+20>e.length?null:{tcgrf:Xe(e,t),wWidth:z(e,t+2),borders:{top:H(e,t+4)||{},left:H(e,t+8)||{},bottom:H(e,t+12)||{},right:H(e,t+16)||{}}}}function Qe(e){if(e.length<3)return null;let t=z(e,0),n=e[2]??0,r=3,i=[];for(let t=0;t>13&7;if(t>=e.length)return 0;if(n===R.sprmTDefTable){let n=z(e,t);return n?n+1:0}if(qe.has(n))return(e[t]??0)+1;switch(r){case 0:return 1;case 1:return 1;case 2:return 2;case 3:return 4;case 4:return 2;case 5:return 2;case 6:return(e[t]??0)+1;case 7:return 3;default:return 0}}function W(e){return!!(e[0]??0)}function G(e,t,n,r,i){return{kind:e,name:t,value:n,raw:r,operandBytes:i}}function it(e,t){let n=Je(e),r=t,i=e;switch(e){case R.sprmCPicLocation:return G(`char`,`pictureOffset`,Ye(r,0)>>>0,i,r);case R.sprmCFData:return G(`char`,`data`,W(r),i,r);case R.sprmCFOle2:return G(`char`,`ole2`,W(r),i,r);case R.sprmCIstd:return G(`char`,`charStyleId`,z(r,0),i,r);case R.sprmCPlain:return G(`char`,`plain`,W(r),i,r);case R.sprmCFBold:return G(`char`,`bold`,W(r),i,r);case R.sprmCFItalic:return G(`char`,`italic`,W(r),i,r);case R.sprmCFStrike:return G(`char`,`strike`,W(r),i,r);case R.sprmCFOutline:return G(`char`,`outline`,W(r),i,r);case R.sprmCFShadow:return G(`char`,`shadow`,W(r),i,r);case R.sprmCFSmallCaps:return G(`char`,`smallCaps`,W(r),i,r);case R.sprmCFCaps:return G(`char`,`caps`,W(r),i,r);case R.sprmCFVanish:return G(`char`,`hidden`,W(r),i,r);case R.sprmCKul:return G(`char`,`underline`,r[0]??0,i,r);case R.sprmCDxaSpace:return G(`char`,`spacing`,B(r,0),i,r);case R.sprmCIco:case R.sprmCIcoBi:return G(`char`,`colorIndex`,r[0]??0,i,r);case R.sprmCHighlight:{let e=r[0]??0;return G(`char`,`highlight`,{index:e,color:Ve[e]},i,r)}case R.sprmCHps:case R.sprmCHpsBi:return G(`char`,`fontSizeHalfPoints`,z(r,0),i,r);case R.sprmCHpsPos:return G(`char`,`positionHalfPoints`,B(r,0),i,r);case R.sprmCSymbol:return G(`char`,`symbol`,{font:z(r,0),charCode:z(r,2)},i,r);case R.sprmCRgFtc0:case R.sprmCRgFtc1:case R.sprmCRgFtc2:case R.sprmCFtcBi:return G(`char`,`fontFamilyId`,z(r,0),i,r);case R.sprmCCharScale:return G(`char`,`scale`,z(r,0),i,r);case R.sprmCFDStrike:return G(`char`,`doubleStrike`,W(r),i,r);case R.sprmCFImprint:return G(`char`,`imprint`,W(r),i,r);case R.sprmCFSpec:return G(`char`,`special`,W(r),i,r);case R.sprmCFObj:return G(`char`,`object`,W(r),i,r);case R.sprmCFEmboss:return G(`char`,`emboss`,W(r),i,r);case R.sprmCFBiDi:return G(`char`,`rtl`,W(r),i,r);case R.sprmCFBoldBi:return G(`char`,`boldBi`,W(r),i,r);case R.sprmCFItalicBi:return G(`char`,`italicBi`,W(r),i,r);case R.sprmPIstd:return G(`para`,`styleId`,z(r,0),i,r);case R.sprmPJc80:case R.sprmPJc:return G(`para`,`alignment`,r[0]??0,i,r);case R.sprmPFKeep:return G(`para`,`keepLines`,W(r),i,r);case R.sprmPFKeepFollow:return G(`para`,`keepNext`,W(r),i,r);case R.sprmPFPageBreakBefore:return G(`para`,`pageBreakBefore`,W(r),i,r);case R.sprmPIlvl:return G(`para`,`listLevel`,r[0]??0,i,r);case R.sprmPIlfo:return G(`para`,`listId`,z(r,0),i,r);case R.sprmPDxaRight80:case R.sprmPDxaRight:return G(`para`,`rightIndent`,B(r,0),i,r);case R.sprmPDxaLeft80:case R.sprmPDxaLeft:return G(`para`,`leftIndent`,B(r,0),i,r);case R.sprmPDxaLeft180:case R.sprmPDxaLeft1:return G(`para`,`firstLineIndent`,B(r,0),i,r);case R.sprmPDyaLine:return G(`para`,`lineSpacing`,B(r,0),i,r);case R.sprmPDyaBefore:return G(`para`,`spacingBefore`,B(r,0),i,r);case R.sprmPDyaAfter:return G(`para`,`spacingAfter`,B(r,0),i,r);case R.sprmPFInTable:return G(`para`,`inTable`,W(r),i,r);case R.sprmPFTtp:return G(`para`,`tableRowEnd`,W(r),i,r);case R.sprmPDxaAbs:return G(`para`,`frameLeft`,B(r,0),i,r);case R.sprmPDyaAbs:return G(`para`,`frameTop`,B(r,0),i,r);case R.sprmPDxaWidth:return G(`para`,`frameWidth`,B(r,0),i,r);case R.sprmPPc:return G(`para`,`framePosition`,r[0]??0,i,r);case R.sprmPWr:return G(`para`,`frameWrap`,r[0]??0,i,r);case R.sprmPBrcTop80:case R.sprmPBrcTop:return G(`para`,`borderTop`,H(r,0),i,r);case R.sprmPBrcLeft80:case R.sprmPBrcLeft:return G(`para`,`borderLeft`,H(r,0),i,r);case R.sprmPBrcBottom80:case R.sprmPBrcBottom:return G(`para`,`borderBottom`,H(r,0),i,r);case R.sprmPBrcRight80:case R.sprmPBrcRight:return G(`para`,`borderRight`,H(r,0),i,r);case R.sprmPBrcBetween80:case R.sprmPBrcBetween:return G(`para`,`borderBetween`,H(r,0),i,r);case R.sprmPBrcBar80:case R.sprmPBrcBar:return G(`para`,`borderBar`,H(r,0),i,r);case R.sprmPWHeightAbs:return G(`para`,`frameHeight`,B(r,0),i,r);case R.sprmPShd80:case R.sprmPShd:return G(`para`,`shading`,r.slice(),i,r);case R.sprmPDyaFromText:return G(`para`,`distanceFromTextY`,B(r,0),i,r);case R.sprmPDxaFromText:return G(`para`,`distanceFromTextX`,B(r,0),i,r);case R.sprmPFLocked:return G(`para`,`locked`,W(r),i,r);case R.sprmPFWidowControl:return G(`para`,`widowControl`,W(r),i,r);case R.sprmPFBiDi:return G(`para`,`rtlPara`,W(r),i,r);case R.sprmPFAdjustRight:return G(`para`,`adjustRight`,W(r),i,r);case R.sprmPItap:return G(`para`,`itap`,Ye(r,0),i,r);case R.sprmPDtap:return G(`para`,`dtap`,Ye(r,0),i,r);case R.sprmPFInnerTableCell:return G(`para`,`innerTableCell`,W(r),i,r);case R.sprmPFInnerTtp:return G(`para`,`innerTableRowEnd`,W(r),i,r);case R.sprmPFDyaBeforeAuto:return G(`para`,`spacingBeforeAuto`,W(r),i,r);case R.sprmPFDyaAfterAuto:return G(`para`,`spacingAfterAuto`,W(r),i,r);case R.sprmTJc90:return G(`table`,`alignment`,z(r,0),i,r);case R.sprmTDxaLeft:return G(`table`,`leftIndent`,B(r,0),i,r);case R.sprmTDxaGapHalf:return G(`table`,`gapHalf`,z(r,0),i,r);case R.sprmTFCantSplit90:return G(`table`,`cantSplit`,W(r),i,r);case R.sprmTTableHeader:return G(`table`,`header`,W(r),i,r);case R.sprmTDyaRowHeight:return G(`table`,`rowHeight`,B(r,0),i,r);case R.sprmTDefTable:return G(`table`,`defTable`,Qe(r),i,r);case R.sprmTFBiDi:return G(`table`,`rtl`,W(r),i,r);case R.sprmTPc:return G(`table`,`positionCode`,r[0]??0,i,r);case R.sprmTDxaAbs:return G(`table`,`absLeft`,B(r,0),i,r);case R.sprmTDyaAbs:return G(`table`,`absTop`,B(r,0),i,r);case R.sprmTDxaFromText:return G(`table`,`distanceLeft`,B(r,0),i,r);case R.sprmTDyaFromText:return G(`table`,`distanceTop`,B(r,0),i,r);case R.sprmTTableWidth:return G(`table`,`tableWidth`,tt(r),i,r);case R.sprmTFAutofit:return G(`table`,`autoFit`,W(r),i,r);case R.sprmTWidthBefore:return G(`table`,`widthBefore`,tt(r),i,r);case R.sprmTWidthAfter:return G(`table`,`widthAfter`,tt(r),i,r);case R.sprmTInsert:return G(`table`,`insertCells`,nt(r),i,r);case R.sprmTDelete:return G(`table`,`deleteCells`,V(r,0),i,r);case R.sprmTDxaCol:return G(`table`,`columnWidth`,$e(r),i,r);case R.sprmTMerge:return G(`table`,`merge`,V(r,0),i,r);case R.sprmTSplit:return G(`table`,`split`,V(r,0),i,r);case R.sprmTTextFlow:return G(`table`,`textFlow`,U(r),i,r);case R.sprmTVertMerge:return G(`table`,`vertMerge`,U(r),i,r);case R.sprmTVertAlign:return G(`table`,`vertAlign`,U(r),i,r);case R.sprmTSetShd:case R.sprmTSetShdOdd:return G(`table`,`setShading`,U(r),i,r);case R.sprmTSetBrc80:case R.sprmTSetBrc:return G(`table`,`setBorder`,et(r),i,r);case R.sprmTCellPadding:case R.sprmTCellPaddingDefault:return G(`table`,`cellPadding`,$e(r),i,r);case R.sprmTCellWidth:return G(`table`,`cellWidth`,$e(r),i,r);case R.sprmTFitText:return G(`table`,`fitText`,U(r),i,r);case R.sprmTFCellNoWrap:return G(`table`,`cellNoWrap`,U(r),i,r);case R.sprmTIstd:return G(`table`,`styleId`,z(r,0),i,r);default:return{kind:n===1?`para`:n===2?`char`:n===5?`table`:`unknown`,name:`sprm_${e.toString(16)}`,value:r,raw:e,operandBytes:r}}}function K(e,t,n){let r=[],i=t;for(;i+2<=n;){let t=z(e,i);i+=2;let a=rt(e,i,t);if(!a||i+a>n)break;let o=e.subarray(i,i+a);i+=a,r.push(it(t,o))}return r}function at(e,t,n){if(t==null||n==null||n<=0)return{aFC:[],pages:[]};let r=new N(e.subarray(t,t+n)),i=Math.floor((n-4)/8);if(i<=0)return{aFC:[],pages:[]};let a=[];for(let e=0;e<=i;e+=1)a.push(r.u32(e*4)>>>0);let o=[],s=(i+1)*4;for(let e=0;e100)return null;let o=[];for(let e=0;e<=a;e+=1)o.push(i.u32(e*4)>>>0);let s=[],c=[],l=(a+1)*4;for(let e=0;e29)return null;let o=[];for(let e=0;e<=a;e+=1)o.push(i.u32(e*4)>>>0);let s=(a+1)*4,c=[],l=[];for(let e=0;ee.cpStart-t.cpStart||e.cpEnd-t.cpEnd),s}function lt(e,t,n,r){let i=n.fibRgFcLcb.fcPlcfBtePapx,a=n.fibRgFcLcb.lcbPlcfBtePapx,o=at(t,i,a),s=[];for(let t of o.pages){let n=st(e,t);if(n)for(let t=0;te.cpStart-t.cpStart||e.cpEnd-t.cpEnd),s}function ut(e,t){if(t==null||t<0||t>=e.length)return[];let n=e[t]??0;if(!n)return[];let r=t+1;return K(e,r,Math.min(e.length,r+n))}function dt(e,t){if(t==null||t<0||t>=e.length)return{styleId:0,properties:[]};let n=new N(e),r=n.u8(t);if(r===0&&!n.ensure(t+1,1))return{styleId:0,properties:[]};let i,a;return r===0?(a=n.u8(t+1)*2,i=t+2):(a=r-1,i=t+1),a<2||!n.ensure(i,Math.max(2,a))?{styleId:0,properties:[]}:{styleId:n.u16(i),properties:K(e,i+2,Math.min(e.length,i+a))}}function ft(e,t){let n=t;for(;n+140){let t=new TextDecoder(`utf-16le`).decode(e.subarray(40)).split(`\0`).filter(Boolean);if(u=t[0]||``,d=t[1]||``,!d&&s){let t=40+s*2;t+2<=e.length&&(d=ft(e,t).value)}}return{index:t,cbFfnM1:r,ffid:i,weight:a,charset:o,ixchSzAlt:s,panose:c,fontSignature:l,name:u,altName:d}}function mt(e,t){let n=t.fcSttbfFfn,r=t.lcbSttbfFfn;if(n==null||r==null||r<=0)return{header:null,fonts:[],byIndex(e){return null}};let i=e.subarray(n,n+r),a=new N(i),o=a.u16(0),s=a.u16(2),c=4,l=[];for(let e=0;ee.length)return!1;for(let r=0;r0&&t+n<=e.length)return t+n}return e.length}function xt(e,t){if(t+48<=e.length){let n=new N(e.subarray(t)).u32(40);if(n>0&&t+n<=e.length)return t+n}return e.length}function St(e,t,n={}){if(!e||t==null||t<0||t+68>e.length)return null;let r=new N(e),i=r.i32(t),a=r.u16(t+4),o=i>0&&t+i<=e.length?i:Math.min(e.length-t,n.maxPictureBytes||8*1024*1024),s=e.subarray(t,t+o),c=Math.min(a||68,s.length),l=gt(s.subarray(c));if(!l)return{id:A(`asset-img`),type:`image`,mime:`application/octet-stream`,bytes:s,dataUrl:oe(s,`application/octet-stream`),meta:{pictureOffset:t,lcb:i,cbHeader:a}};let u=c+l.start,d=Math.min(c+l.end,s.length),f=s.subarray(u,d);return{id:A(`asset-img`),type:`image`,mime:l.mime,bytes:f,dataUrl:oe(f,l.mime),meta:{pictureOffset:t,lcb:i,cbHeader:a}}}function Ct(e,t){let n=t;for(;ne.length)continue;let s=t.u32(r);if(r+=4,s>0&&r+s<=e.length){let t=e.subarray(r,r+s);return{label:i.value,originalPath:a.value,tempPath:o.value,dataSize:s,bytes:t}}}catch{}return null}function Tt(e,t){let n=e.listChildren(t).filter(e=>e.objectType===2||e.objectType===5),r=new Map(n.map(e=>[e.name.toLowerCase(),e])),i=r.get(`objinfo`)||r.get(`objinfo`)||r.get(`objinfo`),a=r.get(`ole10native`)||r.get(`ole10native`)||r.get(`ole10native`),o=r.get(`package`)||r.get(`contents`)||r.get(`content`),s={entry:t,streams:n,displayName:t.name,attachment:null,objectData:null};if(a){let n=wt(e.getStream(a)||new Uint8Array);if(n){let e=n.label||n.originalPath.split(/[\\/]/).pop()||`${t.name}.bin`;return s.attachment={id:A(`asset-ole`),type:`attachment`,name:e,mime:`application/octet-stream`,bytes:n.bytes,dataUrl:oe(n.bytes,`application/octet-stream`),meta:n},s}}if(o){let n=e.getStream(o)||new Uint8Array;s.attachment={id:A(`asset-pkg`),type:`attachment`,name:`${se(t.name)}.bin`,mime:`application/octet-stream`,bytes:n,dataUrl:oe(n,`application/octet-stream`),meta:{stream:o.name}}}return i&&(s.objectData=e.getStream(i)||new Uint8Array),s}function Et(e){let t=e.getEntry(`/ObjectPool`);if(!t)return new Map;let n=e.listChildren(t).filter(e=>e.objectType===1),r=new Map;for(let t of n)r.set(t.name,Tt(e,t));return r}function Dt(e){let t={bold:!1,italic:!1,strike:!1,underline:0,fontSizeHalfPoints:void 0,fontFamilyId:void 0,colorIndex:void 0,highlight:void 0,spacing:0,positionHalfPoints:0,scale:100,hidden:!1,smallCaps:!1,caps:!1,outline:!1,shadow:!1,emboss:!1,imprint:!1,rtl:!1,pictureOffset:void 0,data:!1,ole2:!1,object:!1,special:!1,charStyleId:void 0};for(let n of e||[])switch(n.name){case`plain`:n.value&&(t.bold=!1,t.italic=!1,t.strike=!1,t.underline=0,t.smallCaps=!1,t.caps=!1);break;case`bold`:case`italic`:case`strike`:case`hidden`:case`smallCaps`:case`caps`:case`outline`:case`shadow`:case`emboss`:case`imprint`:case`rtl`:case`data`:case`ole2`:case`object`:case`special`:t[n.name]=!!n.value;break;case`underline`:t.underline=n.value??0;break;case`fontSizeHalfPoints`:t.fontSizeHalfPoints=n.value;break;case`fontFamilyId`:t.fontFamilyId=n.value;break;case`colorIndex`:t.colorIndex=n.value;break;case`highlight`:t.highlight=n.value;break;case`spacing`:t.spacing=n.value||0;break;case`positionHalfPoints`:t.positionHalfPoints=n.value||0;break;case`scale`:t.scale=n.value||100;break;case`pictureOffset`:t.pictureOffset=n.value;break;case`charStyleId`:t.charStyleId=n.value;break;default:t[n.name]=n.value;break}return t}function Ot(e){let t={styleId:0,alignment:0,spacingBefore:0,spacingAfter:0,lineSpacing:0,leftIndent:0,rightIndent:0,firstLineIndent:0,keepLines:!1,keepNext:!1,pageBreakBefore:!1,widowControl:!1,inTable:!1,tableRowEnd:!1,innerTableCell:!1,innerTableRowEnd:!1,itap:0,dtap:0,listLevel:void 0,listId:void 0,rtlPara:!1,adjustRight:!1,frameLeft:void 0,frameTop:void 0,frameWidth:void 0,frameHeight:void 0,framePosition:void 0,frameWrap:void 0,borders:{},shading:void 0};for(let n of e||[])switch(n.name){case`styleId`:t.styleId=n.value||0;break;case`alignment`:t.alignment=n.value??0;break;case`spacingBefore`:t.spacingBefore=n.value||0;break;case`spacingAfter`:t.spacingAfter=n.value||0;break;case`lineSpacing`:t.lineSpacing=n.value||0;break;case`leftIndent`:t.leftIndent=n.value||0;break;case`rightIndent`:t.rightIndent=n.value||0;break;case`firstLineIndent`:t.firstLineIndent=n.value||0;break;case`keepLines`:case`keepNext`:case`pageBreakBefore`:case`widowControl`:case`inTable`:case`tableRowEnd`:case`innerTableCell`:case`innerTableRowEnd`:case`rtlPara`:case`adjustRight`:t[n.name]=!!n.value;break;case`itap`:t.itap=n.value||0;break;case`dtap`:t.dtap=n.value||0;break;case`listLevel`:t.listLevel=n.value;break;case`listId`:t.listId=n.value;break;case`frameLeft`:t.frameLeft=n.value;break;case`frameTop`:t.frameTop=n.value;break;case`frameWidth`:t.frameWidth=n.value;break;case`frameHeight`:t.frameHeight=n.value;break;case`framePosition`:t.framePosition=n.value;break;case`frameWrap`:t.frameWrap=n.value;break;case`borderTop`:t.borders.top=n.value;break;case`borderLeft`:t.borders.left=n.value;break;case`borderBottom`:t.borders.bottom=n.value;break;case`borderRight`:t.borders.right=n.value;break;case`borderBetween`:t.borders.between=n.value;break;case`borderBar`:t.borders.bar=n.value;break;case`shading`:t.shading=n.value;break;default:t[n.name]=n.value;break}return t}function kt(e){let t={styleId:void 0,alignment:0,leftIndent:0,gapHalf:0,cantSplit:!1,header:!1,rowHeight:0,rtl:!1,positionCode:void 0,absLeft:void 0,absTop:void 0,distanceLeft:void 0,distanceTop:void 0,tableWidth:void 0,autoFit:void 0,widthBefore:void 0,widthAfter:void 0,defTable:void 0,operations:[]};for(let n of e||[])switch(n.name){case`styleId`:t.styleId=n.value;break;case`alignment`:t.alignment=n.value??0;break;case`leftIndent`:t.leftIndent=n.value||0;break;case`gapHalf`:t.gapHalf=n.value||0;break;case`cantSplit`:case`header`:case`rtl`:t[n.name]=!!n.value;break;case`rowHeight`:t.rowHeight=n.value||0;break;case`positionCode`:t.positionCode=n.value;break;case`absLeft`:t.absLeft=n.value;break;case`absTop`:t.absTop=n.value;break;case`distanceLeft`:t.distanceLeft=n.value;break;case`distanceTop`:t.distanceTop=n.value;break;case`tableWidth`:t.tableWidth=n.value;break;case`autoFit`:t.autoFit=n.value;break;case`widthBefore`:t.widthBefore=n.value;break;case`widthAfter`:t.widthAfter=n.value;break;case`defTable`:t.defTable=n.value;break;default:t.operations.push(n);break}return t}function At(e){return e?.inTable?Math.max(1,e.itap||(e.dtap?e.dtap:1)):0}function jt(e){return ze[e]||`left`}function Mt(e){return Re[e]||(e?`single`:`none`)}function Nt(e){return Be[e]||`top`}function q(e,t,n){if(!t)return;let r=Math.max(0,t.first||0),i=Math.max(r,t.lim||r);for(let t=r;t({index:n,width:e?.wWidth,ftsWidth:e?.tcgrf?.ftsWidth,borders:e?.borders||{},merge:e?.tcgrf?.horzMerge||0,vertMerge:e?.tcgrf?.vertMerge||0,vertAlign:e?.tcgrf?.vertAlign||0,fitText:!!e?.tcgrf?.fitText,noWrap:!!e?.tcgrf?.noWrap,hideMark:!!e?.tcgrf?.hideMark,textFlow:e?.tcgrf?.textFlow||0,rightBoundary:t.rgdxaCenter?.[n+1],leftBoundary:t.rgdxaCenter?.[n]}));for(let t of e.operations||[])switch(t.name){case`merge`:q(n,t.value,(e,n)=>{n===t.value.first?e.merge=2:e.merge=1});break;case`split`:q(n,t.value,e=>{e.merge=0});break;case`cellWidth`:case`columnWidth`:q(n,t.value.range,e=>{let n=t.value;e.width=n.width,e.ftsWidth=n.ftsWidth});break;case`vertMerge`:q(n,t.value.range,e=>{e.vertMerge=t.value.value});break;case`vertAlign`:q(n,t.value.range,e=>{e.vertAlign=t.value.value});break;case`setBorder`:q(n,t.value.range,e=>{e.borders={...e.borders||{},all:t.value.border}});break;case`setShading`:q(n,t.value.range,e=>{e.shading=t.value.value});break;case`fitText`:q(n,t.value.range,e=>{e.fitText=!!t.value.value});break;case`cellNoWrap`:q(n,t.value.range,e=>{e.noWrap=!!t.value.value});break;case`textFlow`:q(n,t.value.range,e=>{e.textFlow=t.value.value});break;default:break}return n}function J(...e){let t=new Map;for(let n of e)for(let e of n||[])t.set(`${e.kind}:${e.name}`,e);return Array.from(t.values())}function Ft(e){let t={para:[],char:[],table:[]};for(let n of e||[])n.kind===`para`?t.para.push(n):n.kind===`char`?t.char.push(n):n.kind===`table`&&t.table.push(n);return t}function It(e,t){let n=new N(e),r=n.u16(t),i=t+2,a=r*2,o=n.utf16le(i,a),s=i+a+2;return{value:o.replace(/\u0000+$/,``),nextOffset:s}}function Lt(e,t){let n=new N(e),r=n.u16(t),i=n.u16(t+2),a=n.u16(t+4);return{sti:r&4095,flags1:r>>12,stk:i&15,istdBase:i>>4&4095,cupx:a&15,istdNext:a>>4&4095,bchUpe:n.u16(t+6),grfstd:n.u16(t+8)}}function Rt(e,t){let n=new N(e).u16(t),r=t+2,i=r+n,a=e.subarray(r,Math.min(i,e.length)),o=0,s=[];return a.length>=2&&(o=a[0]|(a[1]??0)<<8,s=K(a,2,a.length)),{cbUpx:n,styleId:o,properties:s,nextOffset:j(i)}}function zt(e,t){let n=new N(e).u16(t),r=t+2,i=r+n,a=e.subarray(r,Math.min(i,e.length));return{cbUpx:n,properties:K(a,0,a.length),nextOffset:j(i)}}function Bt(e,t){let n=new N(e).u16(t),r=t+2,i=r+n,a=e.subarray(r,Math.min(i,e.length));return{cbUpx:n,properties:K(a,0,a.length),nextOffset:j(i)}}function Vt(e,t,n){if(!e.length)return{istd:n,empty:!0,name:``,stdfBase:{istdBase:4095,istdNext:0,stk:1,cupx:0},paraProps:[],charProps:[],tableProps:[]};let r=Math.max(10,Math.min(t||10,e.length)),i=Lt(e,0),a=r,o=It(e,a);a=o.nextOffset;let s=[],c=[],l=[];try{if(i.stk===1){if(i.cupx>=1&&a+2<=e.length){let t=Rt(e,a);s=t.properties,a=t.nextOffset}i.cupx>=2&&a+2<=e.length&&(c=zt(e,a).properties)}else if(i.stk===2)a+2<=e.length&&(c=zt(e,a).properties);else if(i.stk===3){if(i.cupx>=1&&a+2<=e.length){let t=Bt(e,a);l=t.properties,a=t.nextOffset}if(i.cupx>=2&&a+2<=e.length){let t=Rt(e,a);s=t.properties,a=t.nextOffset}i.cupx>=3&&a+2<=e.length&&(c=zt(e,a).properties)}}catch{}return{istd:n,name:o.value,stdfBase:i,paraProps:s,charProps:c,tableProps:l,empty:!1}}function Ht(e,t){let n=t.fcStshf,r=t.lcbStshf;if(n==null||r==null||r<=0)return{styles:new Map,header:null,resolveStyle(e){return Ut(new Map,e)}};let i=e.subarray(n,n+r),a=new N(i),o=a.u16(0),s=a.u16(2),c=a.u16(4),l={cbStshi:o,cstd:s,cbSTDBaseInFile:c,ftcAsci:a.u16(12),ftcFE:a.u16(14),ftcOther:a.u16(16)},u=2+o,d=new Map;for(let e=0;et&&a.push(e[o]),o+=1;return a}function Gt(e){return String(e||``).trim()}function Kt(e){let t=String(e||``).replace(/[\r\n\t]+/g,` `).replace(/\s+/g,` `).trim();if(!t)return null;let n=t.toUpperCase();if(n.startsWith(`HYPERLINK`)){let e=t.slice(9).trim(),n=e.match(/"([^"]+)"/)?.[1]||e.split(/\s+/)[0]||``;return n?{type:`hyperlink`,href:n}:null}if(n.startsWith(`INCLUDEPICTURE`)){let e=t.slice(14).trim();return{type:`includePicture`,target:e.match(/"([^"]+)"/)?.[1]||e.split(/\s+/)[0]||``}}return n.startsWith(`EMBED`)?{type:`embed`,raw:t}:n.startsWith(`LINK`)?{type:`link`,raw:t}:{type:`unknown`,raw:t}}function qt(e,t){if(!t.text)return;let n=e[e.length-1];if(n&&n.type===`text`&&n.href===t.href&&ce(n.style,t.style)){n.text+=t.text;return}e.push(t)}function Y(e,t,n){if(!n)return;let r=e.length?e[e.length-1].nodes:t;n.type===`text`?qt(r,n):r.push(n)}function Jt(e,t){let n=[`_${t}`,`_${String(t)}`,`_${t.toString(16)}`,`_${t.toString(16).toUpperCase()}`];for(let t of n)if(e.has(t))return e.get(t)||null;return null}function Yt(e,t,n,r,i,a={}){return function(o){let s=o?.pictureOffset;if(s==null)return null;if(i.has(s))return i.get(s)||null;let c=null,l=Jt(t,s);if((o.ole2||o.object||o.data)&&l?.attachment&&(c=l.attachment,r.add(l.entry.name)),!c&&e?.length){let t=St(e,s,a);t&&t.mime!==`application/octet-stream`?c=t:!c&&l?.attachment?(c=l.attachment,r.add(l.entry.name)):t&&(c=t)}return!c&&l?.attachment&&(c=l.attachment,r.add(l.entry.name)),c&&n.push(c),i.set(s,c),c}}function Xt(e){switch(e){case L.nonBreakingHyphen:return`-`;case L.nonRequiredHyphen:return``;case L.annotationRef:return``;default:return e}}function Zt(e,t){let n=[],r=[];for(let i of e)if(!(!i.text||i.state.hidden))for(let e of i.text){let a=Xt(e);if(a===L.fieldStart){r.push({instruction:``,parsed:null,readingInstruction:!0,nodes:[]});continue}if(a===L.fieldSeparator){let e=r[r.length-1];e&&(e.parsed=Kt(e.instruction),e.readingInstruction=!1);continue}if(a===L.fieldEnd){let e=r.pop();if(!e)continue;let t=e.nodes;if(e.readingInstruction&&(e.parsed=Kt(e.instruction)),e.parsed?.type===`hyperlink`){let n=e.parsed.href;t=t.map(e=>e.type===`lineBreak`||e.type===`pageBreak`?e:{...e,href:n})}for(let e of t)Y(r,n,e);continue}let o=r[r.length-1];if(o?.readingInstruction){o.instruction+=a;continue}if(a===L.hardLineBreak){Y(r,n,{type:`lineBreak`});continue}if(a===L.pageBreak){Y(r,n,{type:`pageBreak`});continue}if(a===L.picture){let e=t(i.state);e?.type===`image`?Y(r,n,{type:`image`,asset:e,style:i.state}):e?.type===`attachment`&&Y(r,n,{type:`attachment`,asset:e,style:i.state});continue}Y(r,n,{type:`text`,text:ue(a),style:i.state})}for(;r.length;){let e=r.pop();for(let t of e.nodes)Y(r,n,t)}return n}function Qt(e,t,n,r,i,a,o){let s=Wt(n,e.cpStart,e.cpEnd,o),c=new Set([e.cpStart,e.cpEnd]);for(let t of s)c.add(Math.max(e.cpStart,t.cpStart)),c.add(Math.min(e.cpEnd,t.cpEnd));let l=Array.from(c).sort((e,t)=>e-t),u=[];for(let n=0;ne.cpStart<=o&&e.cpEnd>=c)?.properties||[],f=Dt(d),p=Dt(J(i,f.charStyleId==null?[]:r.resolveStyle(f.charStyleId).charProps,d)),m=a(p.fontFamilyId);m&&(p.fontFamily=m.name||m.altName||void 0);let h=o-e.cpStart,g=c-e.cpStart,_=t.slice(h,g);if(!_)continue;let v=u[u.length-1];if(v&&ce(v.state,p)){v.text+=_,v.cpEnd=c;continue}u.push({cpStart:o,cpEnd:c,text:_,state:p})}if(!u.length&&t){let n=Dt(i),r=a(n.fontFamilyId);r&&(n.fontFamily=r.name||r.altName||void 0),u.push({cpStart:e.cpStart,cpEnd:e.cpEnd,text:t,state:n})}return u}function $t(e,t,n,r,i,a,o){let s=Ft(e.properties||[]),c=e.styleId||s.para.find(e=>e.name===`styleId`)?.value||0,l=n.resolveStyle(c),u=J(l.paraProps,s.para),d=Ot(u),f=kt(s.table),p=J(f.styleId==null?[]:n.resolveStyle(f.styleId).tableProps,s.table),m=kt(p),h=l.charProps,g=Qt(e,t,i,n,h,e=>r.byIndex(e),o),_=Zt(g,a);return{id:A(`para`),cpStart:e.cpStart,cpEnd:e.cpEnd,terminator:e.terminator||``,text:t,rawProperties:e.properties||[],styleId:c,styleName:Gt(n.styles.get(c)?.name),paraProps:u,paraState:d,tableProps:p,tableState:m,segments:g,inlines:_}}function en(e){for(let t of e)for(let e=0;e1){let r=e+1;for(;r1){let n=t+1;for(;ne.length&&n.cells[n.cells.length-1].paragraphs.every(e=>!e.text&&!(e.inlines||[]).length);)n.cells.pop();n.cells.forEach((t,n)=>{t.meta=e[n]||{index:n}});let r=e.length?(e[e.length-1].rightBoundary||0)-(e[0].leftBoundary||0):0;t.push({id:A(`row`),cells:n.cells,state:i.tableState,gridWidthTwips:r}),n={cells:[]}}r.length&&n.cells.push({id:A(`cell`),paragraphs:r.map(tn),meta:null}),n.cells.length&&t.push({id:A(`row`),cells:n.cells,state:e[0]?.tableState||kt([]),gridWidthTwips:0}),en(t);let i=t.find(e=>e.gridWidthTwips)?.gridWidthTwips||0,a=Math.max(...e.map(e=>At(e.paraState)),1);return{type:`table`,id:A(`table`),depth:a,rows:t,state:t[0]?.state||kt([]),gridWidthTwips:i}}function rn(e){let t=[],n=0;for(;n0;)i.push(e[n]),n+=1;t.push(nn(i))}return t}function an(e,t={}){let n=[],r=Ee(e,t);n.push(...r.warnings||[]);let i=r.getStream(`/WordDocument`);if(!i)throw Error(`Missing WordDocument stream`);let a=Ue(i);if(a.base.wIdent!==42476&&le(n,`Unexpected FIB identifier: 0x${a.base.wIdent.toString(16)}`),a.base.fEncrypted)throw Error(`Encrypted .doc files are not supported yet`);let o=r.getStream(a.base.fWhichTblStm?`/1Table`:`/0Table`);if(!o)throw Error(`Missing table stream`);let s=r.getStream(`/Data`)||new Uint8Array,c=je(o,a.fibRgFcLcb),l=Pe(i,c),u=l.join(``),d=a.fibRgLw.ccpText>0?a.fibRgLw.ccpText:u.length,f=Ht(o,a.fibRgFcLcb),p=mt(o,a.fibRgFcLcb),m=ct(i,o,a,c).filter(e=>e.cpStarte.cpStart({...e,cpEnd:Math.min(e.cpEnd,d)})),g=h.length?h.map(e=>({cpStart:e.cpStart,cpEnd:e.cpEnd,terminator:u[e.cpEnd-1]||``,styleId:e.styleId,properties:e.properties})):Le(u.slice(0,d)).map(e=>({...e,styleId:0,properties:[]})),_=Et(r),v=[],y=new Set,b=Yt(s,_,v,y,new Map,t),x={index:0},S=g.map(e=>{let t=Ie(i,c,l,e.cpStart,e.cpEnd),n=e.terminator===L.paragraph||e.terminator===L.cellMark?e.terminator:``,r=n&&t.endsWith(n)?t.slice(0,-1):t;return $t({...e,terminator:n},r,f,p,m,b,x)}),C=rn(S),w=Array.from(_.values()).filter(e=>e?.attachment&&!y.has(e.entry.name)).map(e=>e.attachment);for(let e of w)v.push(e);return w.length&&C.push({type:`attachments`,id:A(`attachments`),items:w}),{kind:`msdoc`,version:1,warnings:n,meta:{fib:{wIdent:a.base.wIdent,nFib:a.base.nFib,fWhichTblStm:a.base.fWhichTblStm,fComplex:a.base.fComplex,fEncrypted:a.base.fEncrypted,ccpText:a.fibRgLw.ccpText},counts:{paragraphs:S.length,blocks:C.length,assets:v.length,styles:f.styles.size,fonts:p.fonts.length}},fonts:p.fonts,styles:Array.from(f.styles.values()).map(e=>({istd:e.istd,name:e.name,type:e.stdfBase?.stk,basedOn:e.stdfBase?.istdBase,next:e.stdfBase?.istdNext})),blocks:C,assets:v}}var X={1:`#000000`,2:`#0000ff`,3:`#00ffff`,4:`#00ff00`,5:`#ff00ff`,6:`#ff0000`,7:`#ffff00`,8:`#ffffff`,9:`#000080`,10:`#008080`,11:`#008000`,12:`#800080`,13:`#800000`,14:`#808000`,15:`#808080`,16:`#c0c0c0`};function Z(e){return Object.entries(e).filter(([,e])=>e!=null&&e!==``).map(([e,t])=>`${e}:${t}`).join(`;`)}function Q(e){if(!e)return null;let t=Math.max(1,Math.round((e.lineWidth??8)/8*1.3333)),n=e.borderType,r=n===6?`double`:n===3?`dotted`:n===2?`dashed`:`solid`,i=e.color;return`${t}px ${r} ${i&&X[i]||`#666`}`}function on(e){let t={"text-align":jt(e.alignment)},n=M(e.spacingBefore),r=M(e.spacingAfter),i=M(e.leftIndent),a=M(e.rightIndent),o=M(e.firstLineIndent);if(n&&(t[`margin-top`]=`${n}px`),r&&(t[`margin-bottom`]=`${r}px`),i&&(t[`margin-left`]=`${i}px`),a&&(t[`margin-right`]=`${a}px`),o&&(t[`text-indent`]=`${o}px`),e.lineSpacing){let n=Math.abs(e.lineSpacing)/240;n&&(t[`line-height`]=String(Math.max(1,n)))}e.keepLines&&(t[`break-inside`]=`avoid`),e.keepNext&&(t[`break-after`]=`avoid`),e.pageBreakBefore&&(t[`break-before`]=`page`),e.rtlPara&&(t.direction=`rtl`);let s=Q(e.borders?.top),c=Q(e.borders?.right),l=Q(e.borders?.bottom),u=Q(e.borders?.left);return s&&(t[`border-top`]=s),c&&(t[`border-right`]=c),l&&(t[`border-bottom`]=l),u&&(t[`border-left`]=u),t}function sn(e){let t=Mt(e);if(!e||t===`none`)return{};let n={"text-decoration-line":`underline`};return t===`double`||t===`wavy-double`?n[`text-decoration-style`]=`double`:t.includes(`dot`)||t===`dotted-heavy`?n[`text-decoration-style`]=`dotted`:t.includes(`dash`)?n[`text-decoration-style`]=`dashed`:t.includes(`wave`)||t.includes(`wavy`)?n[`text-decoration-style`]=`wavy`:n[`text-decoration-style`]=`solid`,n}function cn(e){let t={};(e.bold||e.boldBi)&&(t[`font-weight`]=`700`),(e.italic||e.italicBi)&&(t[`font-style`]=`italic`),(e.strike||e.doubleStrike)&&(t[`text-decoration-line`]=`${t[`text-decoration-line`]?`${t[`text-decoration-line`]} `:``}line-through`),Object.assign(t,sn(e.underline)),e.fontSizeHalfPoints&&(t[`font-size`]=`${e.fontSizeHalfPoints/2}pt`),e.fontFamily&&(t[`font-family`]=`'${String(e.fontFamily).replace(/'/g,`\\'`)}', sans-serif`),e.colorIndex&&X[e.colorIndex]&&(t.color=X[e.colorIndex]);let n=typeof e.highlight==`number`?e.highlight:e.highlight?.index;return n&&Ve[n]&&(t[`background-color`]=Ve[n]),e.smallCaps&&(t[`font-variant-caps`]=`small-caps`),e.caps&&(t[`text-transform`]=`uppercase`),e.scale&&e.scale!==100&&(t.display=`inline-block`,t.transform=`scaleX(${e.scale/100})`,t[`transform-origin`]=`left center`),e.positionHalfPoints>0&&(t[`vertical-align`]=`super`),e.positionHalfPoints<0&&(t[`vertical-align`]=`sub`),e.outline&&(t[`text-shadow`]=`0 0 0.02em currentColor`),(e.shadow||e.emboss||e.imprint)&&(t[`text-shadow`]=t[`text-shadow`]?`${t[`text-shadow`]}, 0.06em 0.06em 0.08em rgba(0,0,0,.25)`:`0.06em 0.06em 0.08em rgba(0,0,0,.25)`),e.rtl&&(t.direction=`rtl`),t}function ln(e){let t=k(e.text),n=cn(e.style);n[`white-space`]=`break-spaces`;let r=Z(n),i=`${t}`;return e.href?`${i}`:i}function un(e){let t=cn(e.style);t[`max-width`]=`100%`,t.height=`auto`;let n=``;return e.href?`${n}`:n}function dn(e){let t=k(e.asset.name||`embedded-file`),n=`📎 ${t}`;return e.href?`${n}`:n}function fn(e){return e.map(e=>e.type===`text`?ln(e):e.type===`image`?un(e):e.type===`attachment`?dn(e):e.type===`lineBreak`?`
`:e.type===`pageBreak`?``:``).join(``)}function pn(e,t={}){let n=t.inline?`div`:`p`,r=Z(on(e.paraState)),i=fn(e.inlines||[])||`
`,a=[`msdoc-paragraph`];return e.styleName&&a.push(`msdoc-style-${se(e.styleName)}`),`<${n} class="${a.join(` `)}"${r?` style="${r}"`:``}>${i}`}function mn(e){let t={},n=M(e.meta?.rightBoundary!=null&&e.meta?.leftBoundary!=null?e.meta.rightBoundary-e.meta.leftBoundary:e.meta?.width);n&&(t.width=`${n}px`),e.meta?.noWrap&&(t[`white-space`]=`nowrap`),e.meta?.fitText&&(t[`text-align`]=`justify`),e.meta?.vertAlign!=null&&(t[`vertical-align`]=Nt(e.meta.vertAlign));let r=Q(e.meta?.borders?.all),i=Q(e.meta?.borders?.top)||r,a=Q(e.meta?.borders?.right)||r,o=Q(e.meta?.borders?.bottom)||r,s=Q(e.meta?.borders?.left)||r;i&&(t[`border-top`]=i),a&&(t[`border-right`]=a),o&&(t[`border-bottom`]=o),s&&(t[`border-left`]=s);let c=typeof e.meta?.shading==`object`&&e.meta?.shading&&`color`in e.meta.shading?e.meta.shading.color:void 0;return c&&X[c]&&(t[`background-color`]=X[c]),t}function hn(e){let t={},n=M(e.gridWidthTwips||e.state?.tableWidth?.wWidth);n?t.width=`${n}px`:t.width=`100%`;let r=M(e.state?.leftIndent);return r&&(t[`margin-left`]=`${r}px`),t[`border-collapse`]=`collapse`,t[`table-layout`]=`fixed`,t}function gn(e){let t=e.rows.map(e=>{let t=e.state?.rowHeight?M(Math.abs(e.state.rowHeight)):null;return`${e.cells.filter(e=>!e.hidden).map(e=>{let t=[];(e.colspan??1)>1&&t.push(` colspan="${e.colspan}"`),(e.rowspan??1)>1&&t.push(` rowspan="${e.rowspan}"`);let n=Z(mn(e)),r=e.paragraphs.map(e=>pn(e,{inline:!0})).join(``);return`${r||`

`}`}).join(``)}`}).join(``);return`${t}
`}function _n(e){return`
Embedded attachments
`}function vn(){return` .msdoc-root{box-sizing:border-box;max-width:100%;padding:24px;background:#fff;color:#111;font:14px/1.6 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif} .msdoc-root *{box-sizing:border-box} .msdoc-paragraph{margin:0 0 8px;white-space:normal;word-break:break-word;overflow-wrap:anywhere} .msdoc-paragraph:last-child{margin-bottom:0} .msdoc-table{margin:12px 0;border-collapse:collapse;border-spacing:0;max-width:100%} .msdoc-cell{padding:6px 8px;vertical-align:top;word-break:break-word;overflow-wrap:anywhere} .msdoc-link{color:#1a73e8;text-decoration:none} .msdoc-link:hover{text-decoration:underline} .msdoc-image{display:inline-block;vertical-align:middle} .msdoc-attachment{display:inline-flex;align-items:center;gap:6px;padding:4px 8px;border:1px solid #d0d7de;border-radius:6px;background:#f6f8fa;color:#0969da;text-decoration:none} .msdoc-attachments{margin-top:20px;padding-top:12px;border-top:1px solid #e5e7eb} .msdoc-attachments-title{font-weight:600;margin-bottom:8px} .msdoc-page-break{display:block;height:0;border-top:1px dashed #cbd5e1;margin:16px 0} `}function yn(e,t={}){let n=t.css??vn();return{html:e.blocks.map(e=>e.type===`paragraph`?pn(e):e.type===`table`?gn(e):e.type===`attachments`?_n(e):``).join(``),css:n,warnings:e.warnings||[],meta:e.meta,assets:e.assets||[],parsed:e}}async function bn(e){if(e instanceof ArrayBuffer)return e;if(ArrayBuffer.isView(e)){let t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),t.buffer}if(typeof Blob<`u`&&e instanceof Blob)return await e.arrayBuffer();if(typeof e==`string`){let t=await fetch(e);if(!t.ok)throw Error(`Failed to fetch document: ${t.status}`);return await t.arrayBuffer()}throw TypeError(`Unsupported input type`)}async function xn(e,t={}){let n=await bn(e);return t.workerClient?t.workerClient.parseToHtml(n,{parseOptions:t.parseOptions||{},renderOptions:t.renderOptions||{}}):yn(an(n,t.parseOptions||{}),t.renderOptions||{})}var Sn=``,Cn=`


`,$={width:794,height:1123},wn=` .msdoc-stage{ box-sizing:border-box; min-height:100%; padding:32px 24px 48px; background:#ececec; display:flex; flex-direction:column; align-items:center; gap:24px; } .msdoc-page{ width:min(100%,794px); box-sizing:border-box; } .msdoc-page > .msdoc-root{ box-sizing:border-box; width:100%; max-width:none; min-height:1123px; padding:clamp(24px,7%,96px) clamp(20px,6%,88px); background:#fff; border:1px solid #d9d9d9; box-shadow:0 1px 3px rgba(0,0,0,0.08), 0 12px 32px rgba(0,0,0,0.12); overflow-wrap:anywhere; } /* 表格不能沿用正文的 anywhere 断词,否则旧 DOC 的列宽和单元格内容会被过度压缩。 */ .msdoc-page .msdoc-table{ display:table; width:auto; max-width:100%; table-layout:auto!important; border-collapse:collapse; border-spacing:0; } .msdoc-page .msdoc-table tbody, .msdoc-page .msdoc-table tr{ width:auto; } .msdoc-page .msdoc-cell{ min-width:1.5em; padding:4px 6px; vertical-align:top; word-break:normal; overflow-wrap:normal; white-space:normal; } .msdoc-page .msdoc-cell .msdoc-paragraph{ margin:0 0 4px; word-break:normal; overflow-wrap:break-word; } .msdoc-page .msdoc-cell .msdoc-paragraph:last-child{ margin-bottom:0; } .msdoc-page .msdoc-cell span{ white-space:normal!important; } .msdoc-page .msdoc-page-break{ display:none; } @media (max-width: 860px){ .msdoc-stage{ padding:16px 12px 24px; gap:16px; } .msdoc-page{ width:100%; } .msdoc-page > .msdoc-root{ min-height:auto; padding:24px 20px; box-shadow:none; } } `;function Tn(e){return e.replace(/<(p|table|section)([^>]*?)style="([^"]*?\bbreak-before\s*:\s*page;?[^"]*?)"([^>]*)>/gi,e=>`${Sn}${e}`)}function En(e){return`
${Tn(e).split(Sn).map(e=>`
${e||Cn}
`).join(``)}
`}function Dn(e){let t=e.cloneNode(!0);return t.querySelectorAll(`.msdoc-stage, .msdoc-page, .msdoc-root`).forEach(e=>{e.style.height=`auto`,e.style.maxHeight=`none`,e.style.overflow=`visible`}),t.querySelectorAll(`.msdoc-page`).forEach(e=>{i(e,$,{heightMode:`min`});let t=e.querySelector(`.msdoc-root`);t&&(t.style.width=r($.width),t.style.maxWidth=`none`,t.style.minHeight=r($.height),t.style.height=`auto`,t.style.boxShadow=`none`,t.style.border=`0`,t.style.overflow=`visible`)}),t.innerHTML}function On(){return n({selector:`.viewer-export-content .msdoc-page`,width:$.width,height:$.height,heightMode:`min`})}async function kn(e,t,n){let r=await xn(e,{renderOptions:{css:`${vn()}\n${wn}`}});return t.innerHTML=`${En(r.html)}`,n?.registerExportAdapter?.({includeDocumentStyles:!1,printStyle:On,toHtml:()=>Dn(t)}),{$el:t,unmount(){n?.registerExportAdapter?.(null),t.innerHTML=``}}}export{kn as renderDoc,ne as renderDocx};