oasis-editor 0.0.161 → 0.0.162

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,7 +9,7 @@
9
9
 
10
10
  JSZip uses the library pako released under the MIT license :
11
11
  https://github.com/nodeca/pako/blob/main/LICENSE
12
- */Pb.exports=function e(t,n,a){function r(i,l){if(!n[i]){if(!t[i]){if(!l&&zb)return zb(i);if(o)return o(i,!0);var s=new Error("Cannot find module '"+i+"'");throw s.code="MODULE_NOT_FOUND",s}var d=n[i]={exports:{}};t[i][0].call(d.exports,function(e){return r(t[i][1][e]||e)},d,d.exports,e,t,n,a)}return n[i].exports}for(var o=zb,i=0;i<a.length;i++)r(a[i]);return r}({1:[function(e,t,n){var a=e("./utils"),r=e("./support"),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.encode=function(e){for(var t,n,r,i,l,s,d,c=[],u=0,p=e.length,h=p,f="string"!==a.getTypeOf(e);u<e.length;)h=p-u,r=f?(t=e[u++],n=u<p?e[u++]:0,u<p?e[u++]:0):(t=e.charCodeAt(u++),n=u<p?e.charCodeAt(u++):0,u<p?e.charCodeAt(u++):0),i=t>>2,l=(3&t)<<4|n>>4,s=1<h?(15&n)<<2|r>>6:64,d=2<h?63&r:64,c.push(o.charAt(i)+o.charAt(l)+o.charAt(s)+o.charAt(d));return c.join("")},n.decode=function(e){var t,n,a,i,l,s,d=0,c=0,u="data:";if(e.substr(0,u.length)===u)throw new Error("Invalid base64 input, it looks like a data url.");var p,h=3*(e=e.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(e.charAt(e.length-1)===o.charAt(64)&&h--,e.charAt(e.length-2)===o.charAt(64)&&h--,h%1!=0)throw new Error("Invalid base64 input, bad content length.");for(p=r.uint8array?new Uint8Array(0|h):new Array(0|h);d<e.length;)t=o.indexOf(e.charAt(d++))<<2|(i=o.indexOf(e.charAt(d++)))>>4,n=(15&i)<<4|(l=o.indexOf(e.charAt(d++)))>>2,a=(3&l)<<6|(s=o.indexOf(e.charAt(d++))),p[c++]=t,64!==l&&(p[c++]=n),64!==s&&(p[c++]=a);return p}},{"./support":30,"./utils":32}],2:[function(e,t,n){var a=e("./external"),r=e("./stream/DataWorker"),o=e("./stream/Crc32Probe"),i=e("./stream/DataLengthProbe");function l(e,t,n,a,r){this.compressedSize=e,this.uncompressedSize=t,this.crc32=n,this.compression=a,this.compressedContent=r}l.prototype={getContentWorker:function(){var e=new r(a.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new i("data_length")),t=this;return e.on("end",function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),e},getCompressedWorker:function(){return new r(a.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},l.createWorkerFrom=function(e,t,n){return e.pipe(new o).pipe(new i("uncompressedSize")).pipe(t.compressWorker(n)).pipe(new i("compressedSize")).withStreamInfo("compression",t)},t.exports=l},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,n){var a=e("./stream/GenericWorker");n.STORE={magic:"\0\0",compressWorker:function(){return new a("STORE compression")},uncompressWorker:function(){return new a("STORE decompression")}},n.DEFLATE=e("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,n){var a=e("./utils"),r=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var a=0;a<8;a++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t){return void 0!==e&&e.length?"string"!==a.getTypeOf(e)?function(e,t,n,a){var o=r,i=a+n;e^=-1;for(var l=a;l<i;l++)e=e>>>8^o[255&(e^t[l])];return-1^e}(0|t,e,e.length,0):function(e,t,n,a){var o=r,i=a+n;e^=-1;for(var l=a;l<i;l++)e=e>>>8^o[255&(e^t.charCodeAt(l))];return-1^e}(0|t,e,e.length,0):0}},{"./utils":32}],5:[function(e,t,n){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){var a=null;a="undefined"!=typeof Promise?Promise:e("lie"),t.exports={Promise:a}},{lie:37}],7:[function(e,t,n){var a="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,r=e("pako"),o=e("./utils"),i=e("./stream/GenericWorker"),l=a?"uint8array":"array";function s(e,t){i.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}n.magic="\b\0",o.inherits(s,i),s.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(o.transformTo(l,e.data),!1)},s.prototype.flush=function(){i.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},s.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this._pako=null},s.prototype._createPako=function(){this._pako=new r[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 s("Deflate",e)},n.uncompressWorker=function(){return new s("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,n){function a(e,t){var n,a="";for(n=0;n<t;n++)a+=String.fromCharCode(255&e),e>>>=8;return a}function r(e,t,n,r,i,c){var u,p,h=e.file,f=e.compression,g=c!==l.utf8encode,m=o.transformTo("string",c(h.name)),b=o.transformTo("string",l.utf8encode(h.name)),v=h.comment,y=o.transformTo("string",c(v)),w=o.transformTo("string",l.utf8encode(v)),x=b.length!==h.name.length,M=w.length!==v.length,S="",A="",I="",C=h.dir,T=h.date,k={crc32:0,compressedSize:0,uncompressedSize:0};t&&!n||(k.crc32=e.crc32,k.compressedSize=e.compressedSize,k.uncompressedSize=e.uncompressedSize);var R=0;t&&(R|=8),g||!x&&!M||(R|=2048);var E,L,V,N=0,z=0;C&&(N|=16),"UNIX"===i?(z=798,N|=(E=h.unixPermissions,L=C,V=E,E||(V=L?16893:33204),(65535&V)<<16)):(z=20,N|=function(e){return 63&(e||0)}(h.dosPermissions)),u=T.getUTCHours(),u<<=6,u|=T.getUTCMinutes(),u<<=5,u|=T.getUTCSeconds()/2,p=T.getUTCFullYear()-1980,p<<=4,p|=T.getUTCMonth()+1,p<<=5,p|=T.getUTCDate(),x&&(A=a(1,1)+a(s(m),4)+b,S+="up"+a(A.length,2)+A),M&&(I=a(1,1)+a(s(y),4)+w,S+="uc"+a(I.length,2)+I);var P="";return P+="\n\0",P+=a(R,2),P+=f.magic,P+=a(u,2),P+=a(p,2),P+=a(k.crc32,4),P+=a(k.compressedSize,4),P+=a(k.uncompressedSize,4),P+=a(m.length,2),P+=a(S.length,2),{fileRecord:d.LOCAL_FILE_HEADER+P+m+S,dirRecord:d.CENTRAL_FILE_HEADER+a(z,2)+P+a(y.length,2)+"\0\0\0\0"+a(N,4)+a(r,4)+m+S+y}}var o=e("../utils"),i=e("../stream/GenericWorker"),l=e("../utf8"),s=e("../crc32"),d=e("../signature");function c(e,t,n,a){i.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=a,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(c,i),c.prototype.push=function(e){var t=e.meta.percent||0,n=this.entriesCount,a=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,i.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-a-1))/n:100}}))},c.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=r(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},c.prototype.closedSource=function(e){this.accumulate=!1;var t,n=this.streamFiles&&!e.file.dir,o=r(e,n,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(o.dirRecord),n)this.push({data:(t=e,d.DATA_DESCRIPTOR+a(t.crc32,4)+a(t.compressedSize,4)+a(t.uncompressedSize,4)),meta:{percent:100}});else for(this.push({data:o.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},c.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t<this.dirRecords.length;t++)this.push({data:this.dirRecords[t],meta:{percent:100}});var n,r,i,l,s,c,u=this.bytesWritten-e,p=(n=this.dirRecords.length,r=u,i=e,l=this.zipComment,s=this.encodeFileName,c=o.transformTo("string",s(l)),d.CENTRAL_DIRECTORY_END+"\0\0\0\0"+a(n,2)+a(n,2)+a(r,4)+a(i,4)+a(c.length,2)+c);this.push({data:p,meta:{percent:100}})},c.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},c.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;return e.on("data",function(e){t.processChunk(e)}),e.on("end",function(){t.closedSource(t.previous.streamInfo),t._sources.length?t.prepareNextSource():t.end()}),e.on("error",function(e){t.error(e)}),this},c.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},c.prototype.error=function(e){var t=this._sources;if(!i.prototype.error.call(this,e))return!1;for(var n=0;n<t.length;n++)try{t[n].error(e)}catch(a){}return!0},c.prototype.lock=function(){i.prototype.lock.call(this);for(var e=this._sources,t=0;t<e.length;t++)e[t].lock()},t.exports=c},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(e,t,n){var a=e("../compressions"),r=e("./ZipFileWorker");n.generateWorker=function(e,t,n){var o=new r(t.streamFiles,n,t.platform,t.encodeFileName),i=0;try{e.forEach(function(e,n){i++;var r=function(e,t){var n=e||t,r=a[n];if(!r)throw new Error(n+" is not a valid compression method !");return r}(n.options.compression,t.compression),l=n.options.compressionOptions||t.compressionOptions||{},s=n.dir,d=n.date;n._compressWorker(r,l).withStreamInfo("file",{name:e,dir:s,date:d,comment:n.comment||"",unixPermissions:n.unixPermissions,dosPermissions:n.dosPermissions}).pipe(o)}),o.entriesCount=i}catch(l){o.error(l)}return o}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(e,t,n){function a(){if(!(this instanceof a))return new a;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var e=new a;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e}}(a.prototype=e("./object")).loadAsync=e("./load"),a.support=e("./support"),a.defaults=e("./defaults"),a.version="3.10.1",a.loadAsync=function(e,t){return(new a).loadAsync(e,t)},a.external=e("./external"),t.exports=a},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(e,t,n){var a=e("./utils"),r=e("./external"),o=e("./utf8"),i=e("./zipEntries"),l=e("./stream/Crc32Probe"),s=e("./nodejsUtils");function d(e){return new r.Promise(function(t,n){var a=e.decompressed.getContentWorker().pipe(new l);a.on("error",function(e){n(e)}).on("end",function(){a.streamInfo.crc32!==e.decompressed.crc32?n(new Error("Corrupted zip : CRC32 mismatch")):t()}).resume()})}t.exports=function(e,t){var n=this;return t=a.extend(t||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:o.utf8decode}),s.isNode&&s.isStream(e)?r.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):a.prepareContent("the loaded zip file",e,!0,t.optimizedBinaryString,t.base64).then(function(e){var n=new i(t);return n.load(e),n}).then(function(e){var n=[r.Promise.resolve(e)],a=e.files;if(t.checkCRC32)for(var o=0;o<a.length;o++)n.push(d(a[o]));return r.Promise.all(n)}).then(function(e){for(var r=e.shift(),o=r.files,i=0;i<o.length;i++){var l=o[i],s=l.fileNameStr,d=a.resolve(l.fileNameStr);n.file(d,l.decompressed,{binary:!0,optimizedBinaryString:!0,date:l.date,dir:l.dir,comment:l.fileCommentStr.length?l.fileCommentStr:null,unixPermissions:l.unixPermissions,dosPermissions:l.dosPermissions,createFolders:t.createFolders}),l.dir||(n.file(d).unsafeOriginalName=s)}return r.zipComment.length&&(n.comment=r.zipComment),n})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(e,t,n){var a=e("../utils"),r=e("../stream/GenericWorker");function o(e,t){r.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=!1,this._bindStream(t)}a.inherits(o,r),o.prototype._bindStream=function(e){var t=this;(this._stream=e).pause(),e.on("data",function(e){t.push({data:e,meta:{percent:0}})}).on("error",function(e){t.isPaused?this.generatedError=e:t.error(e)}).on("end",function(){t.isPaused?t._upstreamEnded=!0:t.end()})},o.prototype.pause=function(){return!!r.prototype.pause.call(this)&&(this._stream.pause(),!0)},o.prototype.resume=function(){return!!r.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},t.exports=o},{"../stream/GenericWorker":28,"../utils":32}],13:[function(e,t,n){var a=e("readable-stream").Readable;function r(e,t,n){a.call(this,t),this._helper=e;var r=this;e.on("data",function(e,t){r.push(e)||r._helper.pause(),n&&n(t)}).on("error",function(e){r.emit("error",e)}).on("end",function(){r.push(null)})}e("../utils").inherits(r,a),r.prototype._read=function(){this._helper.resume()},t.exports=r},{"../utils":32,"readable-stream":16}],14:[function(e,t,n){t.exports={isNode:"undefined"!=typeof Buffer,newBufferFrom:function(e,t){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(e,t);if("number"==typeof e)throw new Error('The "data" argument must not be a number');return new Buffer(e,t)},allocBuffer:function(e){if(Buffer.alloc)return Buffer.alloc(e);var t=new Buffer(e);return t.fill(0),t},isBuffer:function(e){return Buffer.isBuffer(e)},isStream:function(e){return e&&"function"==typeof e.on&&"function"==typeof e.pause&&"function"==typeof e.resume}}},{}],15:[function(e,t,n){function a(e,t,n){var a,r=o.getTypeOf(t),l=o.extend(n||{},s);l.date=l.date||new Date,null!==l.compression&&(l.compression=l.compression.toUpperCase()),"string"==typeof l.unixPermissions&&(l.unixPermissions=parseInt(l.unixPermissions,8)),l.unixPermissions&&16384&l.unixPermissions&&(l.dir=!0),l.dosPermissions&&16&l.dosPermissions&&(l.dir=!0),l.dir&&(e=g(e)),l.createFolders&&(a=f(e))&&m.call(this,a,!0);var u="string"===r&&!1===l.binary&&!1===l.base64;n&&void 0!==n.binary||(l.binary=!u),(t instanceof d&&0===t.uncompressedSize||l.dir||!t||0===t.length)&&(l.base64=!1,l.binary=!0,t="",l.compression="STORE",r="string");var b=null;b=t instanceof d||t instanceof i?t:p.isNode&&p.isStream(t)?new h(e,t):o.prepareContent(e,t,l.binary,l.optimizedBinaryString,l.base64);var v=new c(e,b,l);this.files[e]=v}var r=e("./utf8"),o=e("./utils"),i=e("./stream/GenericWorker"),l=e("./stream/StreamHelper"),s=e("./defaults"),d=e("./compressedObject"),c=e("./zipObject"),u=e("./generate"),p=e("./nodejsUtils"),h=e("./nodejs/NodejsStreamInputAdapter"),f=function(e){"/"===e.slice(-1)&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return 0<t?e.substring(0,t):""},g=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},m=function(e,t){return t=void 0!==t?t:s.createFolders,e=g(e),this.files[e]||a.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function b(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var v={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,n,a;for(t in this.files)a=this.files[t],(n=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(n,a)},filter:function(e){var t=[];return this.forEach(function(n,a){e(n,a)&&t.push(a)}),t},file:function(e,t,n){if(1!==arguments.length)return e=this.root+e,a.call(this,e,t,n),this;if(b(e)){var r=e;return this.filter(function(e,t){return!t.dir&&r.test(e)})}var o=this.files[this.root+e];return o&&!o.dir?o:null},folder:function(e){if(!e)return this;if(b(e))return this.filter(function(t,n){return n.dir&&e.test(t)});var t=this.root+e,n=m.call(this,t),a=this.clone();return a.root=n.name,a},remove:function(e){e=this.root+e;var t=this.files[e];if(t||("/"!==e.slice(-1)&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var n=this.filter(function(t,n){return n.name.slice(0,e.length)===e}),a=0;a<n.length;a++)delete this.files[n[a].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(e){var t,n={};try{if((n=o.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:r.utf8encode})).type=n.type.toLowerCase(),n.compression=n.compression.toUpperCase(),"binarystring"===n.type&&(n.type="string"),!n.type)throw new Error("No output type specified.");o.checkSupport(n.type),"darwin"!==n.platform&&"freebsd"!==n.platform&&"linux"!==n.platform&&"sunos"!==n.platform||(n.platform="UNIX"),"win32"===n.platform&&(n.platform="DOS");var a=n.comment||this.comment||"";t=u.generateWorker(this,n,a)}catch(s){(t=new i("error")).error(s)}return new l(t,n.type||"string",n.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){return(e=e||{}).type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(t)}};t.exports=v},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(e,t,n){t.exports=e("stream")},{stream:void 0}],17:[function(e,t,n){var a=e("./DataReader");function r(e){a.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=255&e[t]}e("../utils").inherits(r,a),r.prototype.byteAt=function(e){return this.data[this.zero+e]},r.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),n=e.charCodeAt(1),a=e.charCodeAt(2),r=e.charCodeAt(3),o=this.length-4;0<=o;--o)if(this.data[o]===t&&this.data[o+1]===n&&this.data[o+2]===a&&this.data[o+3]===r)return o-this.zero;return-1},r.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1),a=e.charCodeAt(2),r=e.charCodeAt(3),o=this.readData(4);return t===o[0]&&n===o[1]&&a===o[2]&&r===o[3]},r.prototype.readData=function(e){if(this.checkOffset(e),0===e)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=r},{"../utils":32,"./DataReader":18}],18:[function(e,t,n){var a=e("../utils");function r(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}r.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length<this.zero+e||e<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e},skip:function(e){this.setIndex(this.index+e)},byteAt:function(){},readInt:function(e){var t,n=0;for(this.checkOffset(e),t=this.index+e-1;t>=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return a.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=r},{"../utils":32}],19:[function(e,t,n){var a=e("./Uint8ArrayReader");function r(e){a.call(this,e)}e("../utils").inherits(r,a),r.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=r},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,n){var a=e("./DataReader");function r(e){a.call(this,e)}e("../utils").inherits(r,a),r.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},r.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},r.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},r.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=r},{"../utils":32,"./DataReader":18}],21:[function(e,t,n){var a=e("./ArrayReader");function r(e){a.call(this,e)}e("../utils").inherits(r,a),r.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=r},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,n){var a=e("../utils"),r=e("../support"),o=e("./ArrayReader"),i=e("./StringReader"),l=e("./NodeBufferReader"),s=e("./Uint8ArrayReader");t.exports=function(e){var t=a.getTypeOf(e);return a.checkSupport(t),"string"!==t||r.uint8array?"nodebuffer"===t?new l(e):r.uint8array?new s(a.transformTo("uint8array",e)):new o(a.transformTo("array",e)):new i(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,n){n.LOCAL_FILE_HEADER="PK",n.CENTRAL_FILE_HEADER="PK",n.CENTRAL_DIRECTORY_END="PK",n.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",n.ZIP64_CENTRAL_DIRECTORY_END="PK",n.DATA_DESCRIPTOR="PK\b"},{}],24:[function(e,t,n){var a=e("./GenericWorker"),r=e("../utils");function o(e){a.call(this,"ConvertWorker to "+e),this.destType=e}r.inherits(o,a),o.prototype.processChunk=function(e){this.push({data:r.transformTo(this.destType,e.data),meta:e.meta})},t.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,n){var a=e("./GenericWorker"),r=e("../crc32");function o(){a.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}e("../utils").inherits(o,a),o.prototype.processChunk=function(e){this.streamInfo.crc32=r(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,n){var a=e("../utils"),r=e("./GenericWorker");function o(e){r.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}a.inherits(o,r),o.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}r.prototype.processChunk.call(this,e)},t.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,n){var a=e("../utils"),r=e("./GenericWorker");function o(e){r.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=a.getTypeOf(e),t.isPaused||t._tickAndRepeat()},function(e){t.error(e)})}a.inherits(o,r),o.prototype.cleanUp=function(){r.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!r.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,a.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(a.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.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=o},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,n){function a(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}a.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<this._listeners[e].length;n++)this._listeners[e][n].call(this,t)},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=e.streamInfo,this.mergeStreamInfo(),this.previous=e;var t=this;return e.on("data",function(e){t.processChunk(e)}),e.on("end",function(){t.end()}),e.on("error",function(e){t.error(e)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var e=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),e=!0),this.previous&&this.previous.resume(),!e},flush:function(){},processChunk:function(e){this.push(e)},withStreamInfo:function(e,t){return this.extraStreamInfo[e]=t,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,e)&&(this.streamInfo[e]=this.extraStreamInfo[e])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var e="Worker "+this.name;return this.previous?this.previous+" -> "+e:e}},t.exports=a},{}],29:[function(e,t,n){var a=e("../utils"),r=e("./ConvertWorker"),o=e("./GenericWorker"),i=e("../base64"),l=e("../support"),s=e("../external"),d=null;if(l.nodestream)try{d=e("../nodejs/NodejsStreamOutputAdapter")}catch(p){}function c(e,t){return new s.Promise(function(n,r){var o=[],l=e._internalType,s=e._outputType,d=e._mimeType;e.on("data",function(e,n){o.push(e),t&&t(n)}).on("error",function(e){o=[],r(e)}).on("end",function(){try{var e=function(e,t,n){switch(e){case"blob":return a.newBlob(a.transformTo("arraybuffer",t),n);case"base64":return i.encode(t);default:return a.transformTo(e,t)}}(s,function(e,t){var n,a=0,r=null,o=0;for(n=0;n<t.length;n++)o+=t[n].length;switch(e){case"string":return t.join("");case"array":return Array.prototype.concat.apply([],t);case"uint8array":for(r=new Uint8Array(o),n=0;n<t.length;n++)r.set(t[n],a),a+=t[n].length;return r;case"nodebuffer":return Buffer.concat(t);default:throw new Error("concat : unsupported type '"+e+"'")}}(l,o),d);n(e)}catch(t){r(t)}o=[]}).resume()})}function u(e,t,n){var i=t;switch(t){case"blob":case"arraybuffer":i="uint8array";break;case"base64":i="string"}try{this._internalType=i,this._outputType=t,this._mimeType=n,a.checkSupport(i),this._worker=e.pipe(new r(i)),e.lock()}catch(l){this._worker=new o("error"),this._worker.error(l)}}u.prototype={accumulate:function(e){return c(this,e)},on:function(e,t){var n=this;return"data"===e?this._worker.on(e,function(e){t.call(n,e.data,e.meta)}):this._worker.on(e,function(){a.delay(t,arguments,n)}),this},resume:function(){return a.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(a.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new d(this,{objectMode:"nodebuffer"!==this._outputType},e)}},t.exports=u},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(e,t,n){if(n.base64=!0,n.array=!0,n.string=!0,n.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,n.nodebuffer="undefined"!=typeof Buffer,n.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)n.blob=!1;else{var a=new ArrayBuffer(0);try{n.blob=0===new Blob([a],{type:"application/zip"}).size}catch(o){try{var r=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);r.append(a),n.blob=0===r.getBlob("application/zip").size}catch(i){n.blob=!1}}}try{n.nodestream=!!e("readable-stream").Readable}catch(o){n.nodestream=!1}},{"readable-stream":16}],31:[function(e,t,n){for(var a=e("./utils"),r=e("./support"),o=e("./nodejsUtils"),i=e("./stream/GenericWorker"),l=new Array(256),s=0;s<256;s++)l[s]=252<=s?6:248<=s?5:240<=s?4:224<=s?3:192<=s?2:1;function d(){i.call(this,"utf-8 decode"),this.leftOver=null}function c(){i.call(this,"utf-8 encode")}l[254]=l[254]=1,n.utf8encode=function(e){return r.nodebuffer?o.newBufferFrom(e,"utf-8"):function(e){var t,n,a,o,i,l=e.length,s=0;for(o=0;o<l;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1<l&&56320==(64512&(a=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(a-56320),o++),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=r.uint8array?new Uint8Array(s):new Array(s),o=i=0;i<s;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1<l&&56320==(64512&(a=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(a-56320),o++),n<128?t[i++]=n:(n<2048?t[i++]=192|n>>>6:(n<65536?t[i++]=224|n>>>12:(t[i++]=240|n>>>18,t[i++]=128|n>>>12&63),t[i++]=128|n>>>6&63),t[i++]=128|63&n);return t}(e)},n.utf8decode=function(e){return r.nodebuffer?a.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,n,r,o,i=e.length,s=new Array(2*i);for(t=n=0;t<i;)if((r=e[t++])<128)s[n++]=r;else if(4<(o=l[r]))s[n++]=65533,t+=o-1;else{for(r&=2===o?31:3===o?15:7;1<o&&t<i;)r=r<<6|63&e[t++],o--;1<o?s[n++]=65533:r<65536?s[n++]=r:(r-=65536,s[n++]=55296|r>>10&1023,s[n++]=56320|1023&r)}return s.length!==n&&(s.subarray?s=s.subarray(0,n):s.length=n),a.applyFromCharCode(s)}(e=a.transformTo(r.uint8array?"uint8array":"array",e))},a.inherits(d,i),d.prototype.processChunk=function(e){var t=a.transformTo(r.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(r.uint8array){var o=t;(t=new Uint8Array(o.length+this.leftOver.length)).set(this.leftOver,0),t.set(o,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var i=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;0<=n&&128==(192&e[n]);)n--;return n<0||0===n?t:n+l[e[n]]>t?n:t}(t),s=t;i!==t.length&&(r.uint8array?(s=t.subarray(0,i),this.leftOver=t.subarray(i,t.length)):(s=t.slice(0,i),this.leftOver=t.slice(i,t.length))),this.push({data:n.utf8decode(s),meta:e.meta})},d.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=d,a.inherits(c,i),c.prototype.processChunk=function(e){this.push({data:n.utf8encode(e.data),meta:e.meta})},n.Utf8EncodeWorker=c},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,n){var a=e("./support"),r=e("./base64"),o=e("./nodejsUtils"),i=e("./external");function l(e){return e}function s(e,t){for(var n=0;n<e.length;++n)t[n]=255&e.charCodeAt(n);return t}e("setimmediate"),n.newBlob=function(e,t){n.checkSupport("blob");try{return new Blob([e],{type:t})}catch(r){try{var a=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return a.append(e),a.getBlob(t)}catch(o){throw new Error("Bug : can't construct the Blob.")}}};var d={stringifyByChunk:function(e,t,n){var a=[],r=0,o=e.length;if(o<=n)return String.fromCharCode.apply(null,e);for(;r<o;)"array"===t||"nodebuffer"===t?a.push(String.fromCharCode.apply(null,e.slice(r,Math.min(r+n,o)))):a.push(String.fromCharCode.apply(null,e.subarray(r,Math.min(r+n,o)))),r+=n;return a.join("")},stringifyByChar:function(e){for(var t="",n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t},applyCanBeUsed:{uint8array:function(){try{return a.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(e){return!1}}(),nodebuffer:function(){try{return a.nodebuffer&&1===String.fromCharCode.apply(null,o.allocBuffer(1)).length}catch(e){return!1}}()}};function c(e){var t=65536,a=n.getTypeOf(e),r=!0;if("uint8array"===a?r=d.applyCanBeUsed.uint8array:"nodebuffer"===a&&(r=d.applyCanBeUsed.nodebuffer),r)for(;1<t;)try{return d.stringifyByChunk(e,a,t)}catch(o){t=Math.floor(t/2)}return d.stringifyByChar(e)}function u(e,t){for(var n=0;n<e.length;n++)t[n]=e[n];return t}n.applyFromCharCode=c;var p={};p.string={string:l,array:function(e){return s(e,new Array(e.length))},arraybuffer:function(e){return p.string.uint8array(e).buffer},uint8array:function(e){return s(e,new Uint8Array(e.length))},nodebuffer:function(e){return s(e,o.allocBuffer(e.length))}},p.array={string:c,array:l,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return o.newBufferFrom(e)}},p.arraybuffer={string:function(e){return c(new Uint8Array(e))},array:function(e){return u(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:l,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return o.newBufferFrom(new Uint8Array(e))}},p.uint8array={string:c,array:function(e){return u(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:l,nodebuffer:function(e){return o.newBufferFrom(e)}},p.nodebuffer={string:c,array:function(e){return u(e,new Array(e.length))},arraybuffer:function(e){return p.nodebuffer.uint8array(e).buffer},uint8array:function(e){return u(e,new Uint8Array(e.length))},nodebuffer:l},n.transformTo=function(e,t){if(t=t||"",!e)return t;n.checkSupport(e);var a=n.getTypeOf(t);return p[a][e](t)},n.resolve=function(e){for(var t=e.split("/"),n=[],a=0;a<t.length;a++){var r=t[a];"."===r||""===r&&0!==a&&a!==t.length-1||(".."===r?n.pop():n.push(r))}return n.join("/")},n.getTypeOf=function(e){return"string"==typeof e?"string":"[object Array]"===Object.prototype.toString.call(e)?"array":a.nodebuffer&&o.isBuffer(e)?"nodebuffer":a.uint8array&&e instanceof Uint8Array?"uint8array":a.arraybuffer&&e instanceof ArrayBuffer?"arraybuffer":void 0},n.checkSupport=function(e){if(!a[e.toLowerCase()])throw new Error(e+" is not supported by this platform")},n.MAX_VALUE_16BITS=65535,n.MAX_VALUE_32BITS=-1,n.pretty=function(e){var t,n,a="";for(n=0;n<(e||"").length;n++)a+="\\x"+((t=e.charCodeAt(n))<16?"0":"")+t.toString(16).toUpperCase();return a},n.delay=function(e,t,n){setImmediate(function(){e.apply(n||null,t||[])})},n.inherits=function(e,t){function n(){}n.prototype=t.prototype,e.prototype=new n},n.extend=function(){var e,t,n={};for(e=0;e<arguments.length;e++)for(t in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],t)&&void 0===n[t]&&(n[t]=arguments[e][t]);return n},n.prepareContent=function(e,t,o,l,d){return i.Promise.resolve(t).then(function(e){return a.blob&&(e instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(e)))&&"undefined"!=typeof FileReader?new i.Promise(function(t,n){var a=new FileReader;a.onload=function(e){t(e.target.result)},a.onerror=function(e){n(e.target.error)},a.readAsArrayBuffer(e)}):e}).then(function(t){var c,u=n.getTypeOf(t);return u?("arraybuffer"===u?t=n.transformTo("uint8array",t):"string"===u&&(d?t=r.decode(t):o&&!0!==l&&(t=s(c=t,a.uint8array?new Uint8Array(c.length):new Array(c.length)))),t):i.Promise.reject(new Error("Can't read the data of '"+e+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(e,t,n){var a=e("./reader/readerFor"),r=e("./utils"),o=e("./signature"),i=e("./zipEntry"),l=e("./support");function s(e){this.files=[],this.loadOptions=e}s.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var t=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+r.pretty(t)+", expected "+r.pretty(e)+")")}},isSignature:function(e,t){var n=this.reader.index;this.reader.setIndex(e);var a=this.reader.readString(4)===t;return this.reader.setIndex(n),a},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var e=this.reader.readData(this.zipCommentLength),t=l.uint8array?"uint8array":"array",n=r.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(n)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var e,t,n,a=this.zip64EndOfCentralSize-44;0<a;)e=this.reader.readInt(2),t=this.reader.readInt(4),n=this.reader.readData(t),this.zip64ExtensibleData[e]={id:e,length:t,value:n}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e<this.files.length;e++)t=this.files[e],this.reader.setIndex(t.localHeaderOffset),this.checkSignature(o.LOCAL_FILE_HEADER),t.readLocalPart(this.reader),t.handleUTF8(),t.processAttributes()},readCentralDir:function(){var e;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(o.CENTRAL_FILE_HEADER);)(e=new i({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(e);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature(o.CENTRAL_DIRECTORY_END);if(e<0)throw this.isSignature(0,o.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(e);var t=e;if(this.checkSignature(o.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===r.MAX_VALUE_16BITS||this.diskWithCentralDirStart===r.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===r.MAX_VALUE_16BITS||this.centralDirRecords===r.MAX_VALUE_16BITS||this.centralDirSize===r.MAX_VALUE_32BITS||this.centralDirOffset===r.MAX_VALUE_32BITS){if(this.zip64=!0,(e=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(e),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,o.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var n=this.centralDirOffset+this.centralDirSize;this.zip64&&(n+=20,n+=12+this.zip64EndOfCentralSize);var a=t-n;if(0<a)this.isSignature(t,o.CENTRAL_FILE_HEADER)||(this.reader.zero=a);else if(a<0)throw new Error("Corrupted zip: missing "+Math.abs(a)+" bytes.")},prepareReader:function(e){this.reader=a(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},t.exports=s},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(e,t,n){var a=e("./reader/readerFor"),r=e("./utils"),o=e("./compressedObject"),i=e("./crc32"),l=e("./utf8"),s=e("./compressions"),d=e("./support");function c(e,t){this.options=e,this.loadOptions=t}c.prototype={isEncrypted:function(){return!(1&~this.bitFlag)},useUTF8:function(){return!(2048&~this.bitFlag)},readLocalPart:function(e){var t,n;if(e.skip(22),this.fileNameLength=e.readInt(2),n=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(n),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(t=function(e){for(var t in s)if(Object.prototype.hasOwnProperty.call(s,t)&&s[t].magic===e)return s[t];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+r.pretty(this.compressionMethod)+" unknown (inner file : "+r.transformTo("string",this.fileName)+")");this.decompressed=new o(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0==e&&(this.dosPermissions=63&this.externalFileAttributes),3==e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=a(this.extraFields[1].value);this.uncompressedSize===r.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===r.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===r.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===r.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,n,a,r=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+4<r;)t=e.readInt(2),n=e.readInt(2),a=e.readData(n),this.extraFields[t]={id:t,length:n,value:a};e.setIndex(r)},handleUTF8:function(){var e=d.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=l.utf8decode(this.fileName),this.fileCommentStr=l.utf8decode(this.fileComment);else{var t=this.findExtraFieldUnicodePath();if(null!==t)this.fileNameStr=t;else{var n=r.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(n)}var a=this.findExtraFieldUnicodeComment();if(null!==a)this.fileCommentStr=a;else{var o=r.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(o)}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var t=a(e.value);return 1!==t.readInt(1)||i(this.fileName)!==t.readInt(4)?null:l.utf8decode(t.readData(e.length-5))}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var t=a(e.value);return 1!==t.readInt(1)||i(this.fileComment)!==t.readInt(4)?null:l.utf8decode(t.readData(e.length-5))}return null}},t.exports=c},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(e,t,n){function a(e,t,n){this.name=e,this.dir=n.dir,this.date=n.date,this.comment=n.comment,this.unixPermissions=n.unixPermissions,this.dosPermissions=n.dosPermissions,this._data=t,this._dataBinary=n.binary,this.options={compression:n.compression,compressionOptions:n.compressionOptions}}var r=e("./stream/StreamHelper"),o=e("./stream/DataWorker"),i=e("./utf8"),l=e("./compressedObject"),s=e("./stream/GenericWorker");a.prototype={internalStream:function(e){var t=null,n="string";try{if(!e)throw new Error("No output type specified.");var a="string"===(n=e.toLowerCase())||"text"===n;"binarystring"!==n&&"text"!==n||(n="string"),t=this._decompressWorker();var o=!this._dataBinary;o&&!a&&(t=t.pipe(new i.Utf8EncodeWorker)),!o&&a&&(t=t.pipe(new i.Utf8DecodeWorker))}catch(l){(t=new s("error")).error(l)}return new r(t,n,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof l&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var n=this._decompressWorker();return this._dataBinary||(n=n.pipe(new i.Utf8EncodeWorker)),l.createWorkerFrom(n,e,t)},_decompressWorker:function(){return this._data instanceof l?this._data.getContentWorker():this._data instanceof s?this._data:new o(this._data)}};for(var d=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],c=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},u=0;u<d.length;u++)a.prototype[d[u]]=c;t.exports=a},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(e,t,n){(function(e){var n,a,r=e.MutationObserver||e.WebKitMutationObserver;if(r){var o=0,i=new r(c),l=e.document.createTextNode("");i.observe(l,{characterData:!0}),n=function(){l.data=o=++o%2}}else if(e.setImmediate||void 0===e.MessageChannel)n="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){c(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(c,0)};else{var s=new e.MessageChannel;s.port1.onmessage=c,n=function(){s.port2.postMessage(0)}}var d=[];function c(){var e,t;a=!0;for(var n=d.length;n;){for(t=d,d=[],e=-1;++e<n;)t[e]();n=d.length}a=!1}t.exports=function(e){1!==d.push(e)||a||n()}}).call(this,void 0!==ps?ps:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],37:[function(e,t,n){var a=e("immediate");function r(){}var o={},i=["REJECTED"],l=["FULFILLED"],s=["PENDING"];function d(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=s,this.queue=[],this.outcome=void 0,e!==r&&h(this,e)}function c(e,t,n){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof n&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function u(e,t,n){a(function(){var a;try{a=t(n)}catch(r){return o.reject(e,r)}a===e?o.reject(e,new TypeError("Cannot resolve promise with itself")):o.resolve(e,a)})}function p(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function h(e,t){var n=!1;function a(t){n||(n=!0,o.reject(e,t))}function r(t){n||(n=!0,o.resolve(e,t))}var i=f(function(){t(r,a)});"error"===i.status&&a(i.value)}function f(e,t){var n={};try{n.value=e(t),n.status="success"}catch(a){n.status="error",n.value=a}return n}(t.exports=d).prototype.finally=function(e){if("function"!=typeof e)return this;var t=this.constructor;return this.then(function(n){return t.resolve(e()).then(function(){return n})},function(n){return t.resolve(e()).then(function(){throw n})})},d.prototype.catch=function(e){return this.then(null,e)},d.prototype.then=function(e,t){if("function"!=typeof e&&this.state===l||"function"!=typeof t&&this.state===i)return this;var n=new this.constructor(r);return this.state!==s?u(n,this.state===l?e:t,this.outcome):this.queue.push(new c(n,e,t)),n},c.prototype.callFulfilled=function(e){o.resolve(this.promise,e)},c.prototype.otherCallFulfilled=function(e){u(this.promise,this.onFulfilled,e)},c.prototype.callRejected=function(e){o.reject(this.promise,e)},c.prototype.otherCallRejected=function(e){u(this.promise,this.onRejected,e)},o.resolve=function(e,t){var n=f(p,t);if("error"===n.status)return o.reject(e,n.value);var a=n.value;if(a)h(e,a);else{e.state=l,e.outcome=t;for(var r=-1,i=e.queue.length;++r<i;)e.queue[r].callFulfilled(t)}return e},o.reject=function(e,t){e.state=i,e.outcome=t;for(var n=-1,a=e.queue.length;++n<a;)e.queue[n].callRejected(t);return e},d.resolve=function(e){return e instanceof this?e:o.resolve(new this(r),e)},d.reject=function(e){var t=new this(r);return o.reject(t,e)},d.all=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,a=!1;if(!n)return this.resolve([]);for(var i=new Array(n),l=0,s=-1,d=new this(r);++s<n;)c(e[s],s);return d;function c(e,r){t.resolve(e).then(function(e){i[r]=e,++l!==n||a||(a=!0,o.resolve(d,i))},function(e){a||(a=!0,o.reject(d,e))})}},d.race=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,a=!1;if(!n)return this.resolve([]);for(var i,l=-1,s=new this(r);++l<n;)i=e[l],t.resolve(i).then(function(e){a||(a=!0,o.resolve(s,e))},function(e){a||(a=!0,o.reject(s,e))});return s}},{immediate:36}],38:[function(e,t,n){var a={};(0,e("./lib/utils/common").assign)(a,e("./lib/deflate"),e("./lib/inflate"),e("./lib/zlib/constants")),t.exports=a},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(e,t,n){var a=e("./zlib/deflate"),r=e("./utils/common"),o=e("./utils/strings"),i=e("./zlib/messages"),l=e("./zlib/zstream"),s=Object.prototype.toString,d=0,c=-1,u=0,p=8;function h(e){if(!(this instanceof h))return new h(e);this.options=r.assign({level:c,method:p,chunkSize:16384,windowBits:15,memLevel:8,strategy:u,to:""},e||{});var t=this.options;t.raw&&0<t.windowBits?t.windowBits=-t.windowBits:t.gzip&&0<t.windowBits&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var n=a.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==d)throw new Error(i[n]);if(t.header&&a.deflateSetHeader(this.strm,t.header),t.dictionary){var f;if(f="string"==typeof t.dictionary?o.string2buf(t.dictionary):"[object ArrayBuffer]"===s.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(n=a.deflateSetDictionary(this.strm,f))!==d)throw new Error(i[n]);this._dict_set=!0}}function f(e,t){var n=new h(t);if(n.push(e,!0),n.err)throw n.msg||i[n.err];return n.result}h.prototype.push=function(e,t){var n,i,l=this.strm,c=this.options.chunkSize;if(this.ended)return!1;i=t===~~t?t:!0===t?4:0,"string"==typeof e?l.input=o.string2buf(e):"[object ArrayBuffer]"===s.call(e)?l.input=new Uint8Array(e):l.input=e,l.next_in=0,l.avail_in=l.input.length;do{if(0===l.avail_out&&(l.output=new r.Buf8(c),l.next_out=0,l.avail_out=c),1!==(n=a.deflate(l,i))&&n!==d)return this.onEnd(n),!(this.ended=!0);0!==l.avail_out&&(0!==l.avail_in||4!==i&&2!==i)||("string"===this.options.to?this.onData(o.buf2binstring(r.shrinkBuf(l.output,l.next_out))):this.onData(r.shrinkBuf(l.output,l.next_out)))}while((0<l.avail_in||0===l.avail_out)&&1!==n);return 4===i?(n=a.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===d):2!==i||(this.onEnd(d),!(l.avail_out=0))},h.prototype.onData=function(e){this.chunks.push(e)},h.prototype.onEnd=function(e){e===d&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},n.Deflate=h,n.deflate=f,n.deflateRaw=function(e,t){return(t=t||{}).raw=!0,f(e,t)},n.gzip=function(e,t){return(t=t||{}).gzip=!0,f(e,t)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(e,t,n){var a=e("./zlib/inflate"),r=e("./utils/common"),o=e("./utils/strings"),i=e("./zlib/constants"),l=e("./zlib/messages"),s=e("./zlib/zstream"),d=e("./zlib/gzheader"),c=Object.prototype.toString;function u(e){if(!(this instanceof u))return new u(e);this.options=r.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&0<=t.windowBits&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(0<=t.windowBits&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),15<t.windowBits&&t.windowBits<48&&!(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;var n=a.inflateInit2(this.strm,t.windowBits);if(n!==i.Z_OK)throw new Error(l[n]);this.header=new d,a.inflateGetHeader(this.strm,this.header)}function p(e,t){var n=new u(t);if(n.push(e,!0),n.err)throw n.msg||l[n.err];return n.result}u.prototype.push=function(e,t){var n,l,s,d,u,p,h=this.strm,f=this.options.chunkSize,g=this.options.dictionary,m=!1;if(this.ended)return!1;l=t===~~t?t:!0===t?i.Z_FINISH:i.Z_NO_FLUSH,"string"==typeof e?h.input=o.binstring2buf(e):"[object ArrayBuffer]"===c.call(e)?h.input=new Uint8Array(e):h.input=e,h.next_in=0,h.avail_in=h.input.length;do{if(0===h.avail_out&&(h.output=new r.Buf8(f),h.next_out=0,h.avail_out=f),(n=a.inflate(h,i.Z_NO_FLUSH))===i.Z_NEED_DICT&&g&&(p="string"==typeof g?o.string2buf(g):"[object ArrayBuffer]"===c.call(g)?new Uint8Array(g):g,n=a.inflateSetDictionary(this.strm,p)),n===i.Z_BUF_ERROR&&!0===m&&(n=i.Z_OK,m=!1),n!==i.Z_STREAM_END&&n!==i.Z_OK)return this.onEnd(n),!(this.ended=!0);h.next_out&&(0!==h.avail_out&&n!==i.Z_STREAM_END&&(0!==h.avail_in||l!==i.Z_FINISH&&l!==i.Z_SYNC_FLUSH)||("string"===this.options.to?(s=o.utf8border(h.output,h.next_out),d=h.next_out-s,u=o.buf2string(h.output,s),h.next_out=d,h.avail_out=f-d,d&&r.arraySet(h.output,h.output,s,d,0),this.onData(u)):this.onData(r.shrinkBuf(h.output,h.next_out)))),0===h.avail_in&&0===h.avail_out&&(m=!0)}while((0<h.avail_in||0===h.avail_out)&&n!==i.Z_STREAM_END);return n===i.Z_STREAM_END&&(l=i.Z_FINISH),l===i.Z_FINISH?(n=a.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===i.Z_OK):l!==i.Z_SYNC_FLUSH||(this.onEnd(i.Z_OK),!(h.avail_out=0))},u.prototype.onData=function(e){this.chunks.push(e)},u.prototype.onEnd=function(e){e===i.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},n.Inflate=u,n.inflate=p,n.inflateRaw=function(e,t){return(t=t||{}).raw=!0,p(e,t)},n.ungzip=p},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(e,t,n){var a="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;n.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var a in n)n.hasOwnProperty(a)&&(e[a]=n[a])}}return e},n.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var r={arraySet:function(e,t,n,a,r){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+a),r);else for(var o=0;o<a;o++)e[r+o]=t[n+o]},flattenChunks:function(e){var t,n,a,r,o,i;for(t=a=0,n=e.length;t<n;t++)a+=e[t].length;for(i=new Uint8Array(a),t=r=0,n=e.length;t<n;t++)o=e[t],i.set(o,r),r+=o.length;return i}},o={arraySet:function(e,t,n,a,r){for(var o=0;o<a;o++)e[r+o]=t[n+o]},flattenChunks:function(e){return[].concat.apply([],e)}};n.setTyped=function(e){e?(n.Buf8=Uint8Array,n.Buf16=Uint16Array,n.Buf32=Int32Array,n.assign(n,r)):(n.Buf8=Array,n.Buf16=Array,n.Buf32=Array,n.assign(n,o))},n.setTyped(a)},{}],42:[function(e,t,n){var a=e("./common"),r=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(d){r=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(d){o=!1}for(var i=new a.Buf8(256),l=0;l<256;l++)i[l]=252<=l?6:248<=l?5:240<=l?4:224<=l?3:192<=l?2:1;function s(e,t){if(t<65537&&(e.subarray&&o||!e.subarray&&r))return String.fromCharCode.apply(null,a.shrinkBuf(e,t));for(var n="",i=0;i<t;i++)n+=String.fromCharCode(e[i]);return n}i[254]=i[254]=1,n.string2buf=function(e){var t,n,r,o,i,l=e.length,s=0;for(o=0;o<l;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1<l&&56320==(64512&(r=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(r-56320),o++),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new a.Buf8(s),o=i=0;i<s;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1<l&&56320==(64512&(r=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(r-56320),o++),n<128?t[i++]=n:(n<2048?t[i++]=192|n>>>6:(n<65536?t[i++]=224|n>>>12:(t[i++]=240|n>>>18,t[i++]=128|n>>>12&63),t[i++]=128|n>>>6&63),t[i++]=128|63&n);return t},n.buf2binstring=function(e){return s(e,e.length)},n.binstring2buf=function(e){for(var t=new a.Buf8(e.length),n=0,r=t.length;n<r;n++)t[n]=e.charCodeAt(n);return t},n.buf2string=function(e,t){var n,a,r,o,l=t||e.length,d=new Array(2*l);for(n=a=0;n<l;)if((r=e[n++])<128)d[a++]=r;else if(4<(o=i[r]))d[a++]=65533,n+=o-1;else{for(r&=2===o?31:3===o?15:7;1<o&&n<l;)r=r<<6|63&e[n++],o--;1<o?d[a++]=65533:r<65536?d[a++]=r:(r-=65536,d[a++]=55296|r>>10&1023,d[a++]=56320|1023&r)}return s(d,a)},n.utf8border=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;0<=n&&128==(192&e[n]);)n--;return n<0||0===n?t:n+i[e[n]]>t?n:t}},{"./common":41}],43:[function(e,t,n){t.exports=function(e,t,n,a){for(var r=65535&e,o=e>>>16&65535,i=0;0!==n;){for(n-=i=2e3<n?2e3:n;o=o+(r=r+t[a++]|0)|0,--i;);r%=65521,o%=65521}return r|o<<16}},{}],44:[function(e,t,n){t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(e,t,n){var a=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var a=0;a<8;a++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t,n,r){var o=a,i=r+n;e^=-1;for(var l=r;l<i;l++)e=e>>>8^o[255&(e^t[l])];return-1^e}},{}],46:[function(e,t,n){var a,r=e("../utils/common"),o=e("./trees"),i=e("./adler32"),l=e("./crc32"),s=e("./messages"),d=0,c=4,u=0,p=-2,h=-1,f=4,g=2,m=8,b=9,v=286,y=30,w=19,x=2*v+1,M=15,S=3,A=258,I=A+S+1,C=42,T=113,k=1,R=2,E=3,L=4;function V(e,t){return e.msg=s[t],t}function N(e){return(e<<1)-(4<e?9:0)}function z(e){for(var t=e.length;0<=--t;)e[t]=0}function P(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(r.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,0===t.pending&&(t.pending_out=0))}function O(e,t){o._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,P(e.strm)}function q(e,t){e.pending_buf[e.pending++]=t}function B(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function W(e,t){var n,a,r=e.max_chain_length,o=e.strstart,i=e.prev_length,l=e.nice_match,s=e.strstart>e.w_size-I?e.strstart-(e.w_size-I):0,d=e.window,c=e.w_mask,u=e.prev,p=e.strstart+A,h=d[o+i-1],f=d[o+i];e.prev_length>=e.good_match&&(r>>=2),l>e.lookahead&&(l=e.lookahead);do{if(d[(n=t)+i]===f&&d[n+i-1]===h&&d[n]===d[o]&&d[++n]===d[o+1]){o+=2,n++;do{}while(d[++o]===d[++n]&&d[++o]===d[++n]&&d[++o]===d[++n]&&d[++o]===d[++n]&&d[++o]===d[++n]&&d[++o]===d[++n]&&d[++o]===d[++n]&&d[++o]===d[++n]&&o<p);if(a=A-(p-o),o=p-A,i<a){if(e.match_start=t,l<=(i=a))break;h=d[o+i-1],f=d[o+i]}}}while((t=u[t&c])>s&&0!=--r);return i<=e.lookahead?i:e.lookahead}function F(e){var t,n,a,o,s,d,c,u,p,h,f=e.w_size;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=f+(f-I)){for(r.arraySet(e.window,e.window,f,f,0),e.match_start-=f,e.strstart-=f,e.block_start-=f,t=n=e.hash_size;a=e.head[--t],e.head[t]=f<=a?a-f:0,--n;);for(t=n=f;a=e.prev[--t],e.prev[t]=f<=a?a-f:0,--n;);o+=f}if(0===e.strm.avail_in)break;if(d=e.strm,c=e.window,u=e.strstart+e.lookahead,h=void 0,(p=o)<(h=d.avail_in)&&(h=p),n=0===h?0:(d.avail_in-=h,r.arraySet(c,d.input,d.next_in,h,u),1===d.state.wrap?d.adler=i(d.adler,c,h,u):2===d.state.wrap&&(d.adler=l(d.adler,c,h,u)),d.next_in+=h,d.total_in+=h,h),e.lookahead+=n,e.lookahead+e.insert>=S)for(s=e.strstart-e.insert,e.ins_h=e.window[s],e.ins_h=(e.ins_h<<e.hash_shift^e.window[s+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[s+S-1])&e.hash_mask,e.prev[s&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=s,s++,e.insert--,!(e.lookahead+e.insert<S)););}while(e.lookahead<I&&0!==e.strm.avail_in)}function D(e,t){for(var n,a;;){if(e.lookahead<I){if(F(e),e.lookahead<I&&t===d)return k;if(0===e.lookahead)break}if(n=0,e.lookahead>=S&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+S-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-I&&(e.match_length=W(e,n)),e.match_length>=S)if(a=o._tr_tally(e,e.strstart-e.match_start,e.match_length-S),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=S){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+S-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart,0!=--e.match_length;);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else a=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(a&&(O(e,!1),0===e.strm.avail_out))return k}return e.insert=e.strstart<S-1?e.strstart:S-1,t===c?(O(e,!0),0===e.strm.avail_out?E:L):e.last_lit&&(O(e,!1),0===e.strm.avail_out)?k:R}function H(e,t){for(var n,a,r;;){if(e.lookahead<I){if(F(e),e.lookahead<I&&t===d)return k;if(0===e.lookahead)break}if(n=0,e.lookahead>=S&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+S-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=S-1,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-I&&(e.match_length=W(e,n),e.match_length<=5&&(1===e.strategy||e.match_length===S&&4096<e.strstart-e.match_start)&&(e.match_length=S-1)),e.prev_length>=S&&e.match_length<=e.prev_length){for(r=e.strstart+e.lookahead-S,a=o._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-S),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=r&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+S-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!=--e.prev_length;);if(e.match_available=0,e.match_length=S-1,e.strstart++,a&&(O(e,!1),0===e.strm.avail_out))return k}else if(e.match_available){if((a=o._tr_tally(e,0,e.window[e.strstart-1]))&&O(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return k}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(a=o._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<S-1?e.strstart:S-1,t===c?(O(e,!0),0===e.strm.avail_out?E:L):e.last_lit&&(O(e,!1),0===e.strm.avail_out)?k:R}function U(e,t,n,a,r){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=a,this.func=r}function G(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=m,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new r.Buf16(2*x),this.dyn_dtree=new r.Buf16(2*(2*y+1)),this.bl_tree=new r.Buf16(2*(2*w+1)),z(this.dyn_ltree),z(this.dyn_dtree),z(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new r.Buf16(M+1),this.heap=new r.Buf16(2*v+1),z(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new r.Buf16(2*v+1),z(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function j(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=g,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?C:T,e.adler=2===t.wrap?0:1,t.last_flush=d,o._tr_init(t),u):V(e,p)}function Z(e){var t,n=j(e);return n===u&&((t=e.state).window_size=2*t.w_size,z(t.head),t.max_lazy_match=a[t.level].max_lazy,t.good_match=a[t.level].good_length,t.nice_match=a[t.level].nice_length,t.max_chain_length=a[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=S-1,t.match_available=0,t.ins_h=0),n}function K(e,t,n,a,o,i){if(!e)return p;var l=1;if(t===h&&(t=6),a<0?(l=0,a=-a):15<a&&(l=2,a-=16),o<1||b<o||n!==m||a<8||15<a||t<0||9<t||i<0||f<i)return V(e,p);8===a&&(a=9);var s=new G;return(e.state=s).strm=e,s.wrap=l,s.gzhead=null,s.w_bits=a,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=o+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+S-1)/S),s.window=new r.Buf8(2*s.w_size),s.head=new r.Buf16(s.hash_size),s.prev=new r.Buf16(s.w_size),s.lit_bufsize=1<<o+6,s.pending_buf_size=4*s.lit_bufsize,s.pending_buf=new r.Buf8(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=3*s.lit_bufsize,s.level=t,s.strategy=i,s.method=n,Z(e)}a=[new U(0,0,0,0,function(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(F(e),0===e.lookahead&&t===d)return k;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var a=e.block_start+n;if((0===e.strstart||e.strstart>=a)&&(e.lookahead=e.strstart-a,e.strstart=a,O(e,!1),0===e.strm.avail_out))return k;if(e.strstart-e.block_start>=e.w_size-I&&(O(e,!1),0===e.strm.avail_out))return k}return e.insert=0,t===c?(O(e,!0),0===e.strm.avail_out?E:L):(e.strstart>e.block_start&&(O(e,!1),e.strm.avail_out),k)}),new U(4,4,8,4,D),new U(4,5,16,8,D),new U(4,6,32,32,D),new U(4,4,16,16,H),new U(8,16,32,32,H),new U(8,16,128,128,H),new U(8,32,128,256,H),new U(32,128,258,1024,H),new U(32,258,258,4096,H)],n.deflateInit=function(e,t){return K(e,t,m,15,8,0)},n.deflateInit2=K,n.deflateReset=Z,n.deflateResetKeep=j,n.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?p:(e.state.gzhead=t,u):p},n.deflate=function(e,t){var n,r,i,s;if(!e||!e.state||5<t||t<0)return e?V(e,p):p;if(r=e.state,!e.output||!e.input&&0!==e.avail_in||666===r.status&&t!==c)return V(e,0===e.avail_out?-5:p);if(r.strm=e,n=r.last_flush,r.last_flush=t,r.status===C)if(2===r.wrap)e.adler=0,q(r,31),q(r,139),q(r,8),r.gzhead?(q(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),q(r,255&r.gzhead.time),q(r,r.gzhead.time>>8&255),q(r,r.gzhead.time>>16&255),q(r,r.gzhead.time>>24&255),q(r,9===r.level?2:2<=r.strategy||r.level<2?4:0),q(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(q(r,255&r.gzhead.extra.length),q(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=l(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(q(r,0),q(r,0),q(r,0),q(r,0),q(r,0),q(r,9===r.level?2:2<=r.strategy||r.level<2?4:0),q(r,3),r.status=T);else{var h=m+(r.w_bits-8<<4)<<8;h|=(2<=r.strategy||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(h|=32),h+=31-h%31,r.status=T,B(r,h),0!==r.strstart&&(B(r,e.adler>>>16),B(r,65535&e.adler)),e.adler=1}if(69===r.status)if(r.gzhead.extra){for(i=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>i&&(e.adler=l(e.adler,r.pending_buf,r.pending-i,i)),P(e),i=r.pending,r.pending!==r.pending_buf_size));)q(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>i&&(e.adler=l(e.adler,r.pending_buf,r.pending-i,i)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=l(e.adler,r.pending_buf,r.pending-i,i)),P(e),i=r.pending,r.pending===r.pending_buf_size)){s=1;break}s=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,q(r,s)}while(0!==s);r.gzhead.hcrc&&r.pending>i&&(e.adler=l(e.adler,r.pending_buf,r.pending-i,i)),0===s&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=l(e.adler,r.pending_buf,r.pending-i,i)),P(e),i=r.pending,r.pending===r.pending_buf_size)){s=1;break}s=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,q(r,s)}while(0!==s);r.gzhead.hcrc&&r.pending>i&&(e.adler=l(e.adler,r.pending_buf,r.pending-i,i)),0===s&&(r.status=103)}else r.status=103;if(103===r.status&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&P(e),r.pending+2<=r.pending_buf_size&&(q(r,255&e.adler),q(r,e.adler>>8&255),e.adler=0,r.status=T)):r.status=T),0!==r.pending){if(P(e),0===e.avail_out)return r.last_flush=-1,u}else if(0===e.avail_in&&N(t)<=N(n)&&t!==c)return V(e,-5);if(666===r.status&&0!==e.avail_in)return V(e,-5);if(0!==e.avail_in||0!==r.lookahead||t!==d&&666!==r.status){var f=2===r.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(F(e),0===e.lookahead)){if(t===d)return k;break}if(e.match_length=0,n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(O(e,!1),0===e.strm.avail_out))return k}return e.insert=0,t===c?(O(e,!0),0===e.strm.avail_out?E:L):e.last_lit&&(O(e,!1),0===e.strm.avail_out)?k:R}(r,t):3===r.strategy?function(e,t){for(var n,a,r,i,l=e.window;;){if(e.lookahead<=A){if(F(e),e.lookahead<=A&&t===d)return k;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=S&&0<e.strstart&&(a=l[r=e.strstart-1])===l[++r]&&a===l[++r]&&a===l[++r]){i=e.strstart+A;do{}while(a===l[++r]&&a===l[++r]&&a===l[++r]&&a===l[++r]&&a===l[++r]&&a===l[++r]&&a===l[++r]&&a===l[++r]&&r<i);e.match_length=A-(i-r),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=S?(n=o._tr_tally(e,1,e.match_length-S),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(O(e,!1),0===e.strm.avail_out))return k}return e.insert=0,t===c?(O(e,!0),0===e.strm.avail_out?E:L):e.last_lit&&(O(e,!1),0===e.strm.avail_out)?k:R}(r,t):a[r.level].func(r,t);if(f!==E&&f!==L||(r.status=666),f===k||f===E)return 0===e.avail_out&&(r.last_flush=-1),u;if(f===R&&(1===t?o._tr_align(r):5!==t&&(o._tr_stored_block(r,0,0,!1),3===t&&(z(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),P(e),0===e.avail_out))return r.last_flush=-1,u}return t!==c?u:r.wrap<=0?1:(2===r.wrap?(q(r,255&e.adler),q(r,e.adler>>8&255),q(r,e.adler>>16&255),q(r,e.adler>>24&255),q(r,255&e.total_in),q(r,e.total_in>>8&255),q(r,e.total_in>>16&255),q(r,e.total_in>>24&255)):(B(r,e.adler>>>16),B(r,65535&e.adler)),P(e),0<r.wrap&&(r.wrap=-r.wrap),0!==r.pending?u:1)},n.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status)!==C&&69!==t&&73!==t&&91!==t&&103!==t&&t!==T&&666!==t?V(e,p):(e.state=null,t===T?V(e,-3):u):p},n.deflateSetDictionary=function(e,t){var n,a,o,l,s,d,c,h,f=t.length;if(!e||!e.state)return p;if(2===(l=(n=e.state).wrap)||1===l&&n.status!==C||n.lookahead)return p;for(1===l&&(e.adler=i(e.adler,t,f,0)),n.wrap=0,f>=n.w_size&&(0===l&&(z(n.head),n.strstart=0,n.block_start=0,n.insert=0),h=new r.Buf8(n.w_size),r.arraySet(h,t,f-n.w_size,n.w_size,0),t=h,f=n.w_size),s=e.avail_in,d=e.next_in,c=e.input,e.avail_in=f,e.next_in=0,e.input=t,F(n);n.lookahead>=S;){for(a=n.strstart,o=n.lookahead-(S-1);n.ins_h=(n.ins_h<<n.hash_shift^n.window[a+S-1])&n.hash_mask,n.prev[a&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=a,a++,--o;);n.strstart=a,n.lookahead=S-1,F(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=S-1,n.match_available=0,e.next_in=d,e.input=c,e.avail_in=s,n.wrap=l,u},n.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(e,t,n){t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(e,t,n){t.exports=function(e,t){var n,a,r,o,i,l,s,d,c,u,p,h,f,g,m,b,v,y,w,x,M,S,A,I,C;n=e.state,a=e.next_in,I=e.input,r=a+(e.avail_in-5),o=e.next_out,C=e.output,i=o-(t-e.avail_out),l=o+(e.avail_out-257),s=n.dmax,d=n.wsize,c=n.whave,u=n.wnext,p=n.window,h=n.hold,f=n.bits,g=n.lencode,m=n.distcode,b=(1<<n.lenbits)-1,v=(1<<n.distbits)-1;e:do{f<15&&(h+=I[a++]<<f,f+=8,h+=I[a++]<<f,f+=8),y=g[h&b];t:for(;;){if(h>>>=w=y>>>24,f-=w,0==(w=y>>>16&255))C[o++]=65535&y;else{if(!(16&w)){if(!(64&w)){y=g[(65535&y)+(h&(1<<w)-1)];continue t}if(32&w){n.mode=12;break e}e.msg="invalid literal/length code",n.mode=30;break e}x=65535&y,(w&=15)&&(f<w&&(h+=I[a++]<<f,f+=8),x+=h&(1<<w)-1,h>>>=w,f-=w),f<15&&(h+=I[a++]<<f,f+=8,h+=I[a++]<<f,f+=8),y=m[h&v];n:for(;;){if(h>>>=w=y>>>24,f-=w,!(16&(w=y>>>16&255))){if(!(64&w)){y=m[(65535&y)+(h&(1<<w)-1)];continue n}e.msg="invalid distance code",n.mode=30;break e}if(M=65535&y,f<(w&=15)&&(h+=I[a++]<<f,(f+=8)<w&&(h+=I[a++]<<f,f+=8)),s<(M+=h&(1<<w)-1)){e.msg="invalid distance too far back",n.mode=30;break e}if(h>>>=w,f-=w,(w=o-i)<M){if(c<(w=M-w)&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(A=p,(S=0)===u){if(S+=d-w,w<x){for(x-=w;C[o++]=p[S++],--w;);S=o-M,A=C}}else if(u<w){if(S+=d+u-w,(w-=u)<x){for(x-=w;C[o++]=p[S++],--w;);if(S=0,u<x){for(x-=w=u;C[o++]=p[S++],--w;);S=o-M,A=C}}}else if(S+=u-w,w<x){for(x-=w;C[o++]=p[S++],--w;);S=o-M,A=C}for(;2<x;)C[o++]=A[S++],C[o++]=A[S++],C[o++]=A[S++],x-=3;x&&(C[o++]=A[S++],1<x&&(C[o++]=A[S++]))}else{for(S=o-M;C[o++]=C[S++],C[o++]=C[S++],C[o++]=C[S++],2<(x-=3););x&&(C[o++]=C[S++],1<x&&(C[o++]=C[S++]))}break}}break}}while(a<r&&o<l);a-=x=f>>3,h&=(1<<(f-=x<<3))-1,e.next_in=a,e.next_out=o,e.avail_in=a<r?r-a+5:5-(a-r),e.avail_out=o<l?l-o+257:257-(o-l),n.hold=h,n.bits=f}},{}],49:[function(e,t,n){var a=e("../utils/common"),r=e("./adler32"),o=e("./crc32"),i=e("./inffast"),l=e("./inftrees"),s=1,d=2,c=0,u=-2,p=1,h=852,f=592;function g(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function m(){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 a.Buf16(320),this.work=new a.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function b(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=p,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new a.Buf32(h),t.distcode=t.distdyn=new a.Buf32(f),t.sane=1,t.back=-1,c):u}function v(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,b(e)):u}function y(e,t){var n,a;return e&&e.state?(a=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15<t)?u:(null!==a.window&&a.wbits!==t&&(a.window=null),a.wrap=n,a.wbits=t,v(e))):u}function w(e,t){var n,a;return e?(a=new m,(e.state=a).window=null,(n=y(e,t))!==c&&(e.state=null),n):u}var x,M,S=!0;function A(e){if(S){var t;for(x=new a.Buf32(512),M=new a.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(l(s,e.lens,0,288,x,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;l(d,e.lens,0,32,M,0,e.work,{bits:5}),S=!1}e.lencode=x,e.lenbits=9,e.distcode=M,e.distbits=5}function I(e,t,n,r){var o,i=e.state;return null===i.window&&(i.wsize=1<<i.wbits,i.wnext=0,i.whave=0,i.window=new a.Buf8(i.wsize)),r>=i.wsize?(a.arraySet(i.window,t,n-i.wsize,i.wsize,0),i.wnext=0,i.whave=i.wsize):(r<(o=i.wsize-i.wnext)&&(o=r),a.arraySet(i.window,t,n-r,o,i.wnext),(r-=o)?(a.arraySet(i.window,t,n-r,r,0),i.wnext=r,i.whave=i.wsize):(i.wnext+=o,i.wnext===i.wsize&&(i.wnext=0),i.whave<i.wsize&&(i.whave+=o))),0}n.inflateReset=v,n.inflateReset2=y,n.inflateResetKeep=b,n.inflateInit=function(e){return w(e,15)},n.inflateInit2=w,n.inflate=function(e,t){var n,h,f,m,b,v,y,w,x,M,S,C,T,k,R,E,L,V,N,z,P,O,q,B,W=0,F=new a.Buf8(4),D=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return u;12===(n=e.state).mode&&(n.mode=13),b=e.next_out,f=e.output,y=e.avail_out,m=e.next_in,h=e.input,v=e.avail_in,w=n.hold,x=n.bits,M=v,S=y,O=c;e:for(;;)switch(n.mode){case p:if(0===n.wrap){n.mode=13;break}for(;x<16;){if(0===v)break e;v--,w+=h[m++]<<x,x+=8}if(2&n.wrap&&35615===w){F[n.check=0]=255&w,F[1]=w>>>8&255,n.check=o(n.check,F,2,0),x=w=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&w)<<8)+(w>>8))%31){e.msg="incorrect header check",n.mode=30;break}if(8!=(15&w)){e.msg="unknown compression method",n.mode=30;break}if(x-=4,P=8+(15&(w>>>=4)),0===n.wbits)n.wbits=P;else if(P>n.wbits){e.msg="invalid window size",n.mode=30;break}n.dmax=1<<P,e.adler=n.check=1,n.mode=512&w?10:12,x=w=0;break;case 2:for(;x<16;){if(0===v)break e;v--,w+=h[m++]<<x,x+=8}if(n.flags=w,8!=(255&n.flags)){e.msg="unknown compression method",n.mode=30;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=30;break}n.head&&(n.head.text=w>>8&1),512&n.flags&&(F[0]=255&w,F[1]=w>>>8&255,n.check=o(n.check,F,2,0)),x=w=0,n.mode=3;case 3:for(;x<32;){if(0===v)break e;v--,w+=h[m++]<<x,x+=8}n.head&&(n.head.time=w),512&n.flags&&(F[0]=255&w,F[1]=w>>>8&255,F[2]=w>>>16&255,F[3]=w>>>24&255,n.check=o(n.check,F,4,0)),x=w=0,n.mode=4;case 4:for(;x<16;){if(0===v)break e;v--,w+=h[m++]<<x,x+=8}n.head&&(n.head.xflags=255&w,n.head.os=w>>8),512&n.flags&&(F[0]=255&w,F[1]=w>>>8&255,n.check=o(n.check,F,2,0)),x=w=0,n.mode=5;case 5:if(1024&n.flags){for(;x<16;){if(0===v)break e;v--,w+=h[m++]<<x,x+=8}n.length=w,n.head&&(n.head.extra_len=w),512&n.flags&&(F[0]=255&w,F[1]=w>>>8&255,n.check=o(n.check,F,2,0)),x=w=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(v<(C=n.length)&&(C=v),C&&(n.head&&(P=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),a.arraySet(n.head.extra,h,m,C,P)),512&n.flags&&(n.check=o(n.check,h,C,m)),v-=C,m+=C,n.length-=C),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===v)break e;for(C=0;P=h[m+C++],n.head&&P&&n.length<65536&&(n.head.name+=String.fromCharCode(P)),P&&C<v;);if(512&n.flags&&(n.check=o(n.check,h,C,m)),v-=C,m+=C,P)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===v)break e;for(C=0;P=h[m+C++],n.head&&P&&n.length<65536&&(n.head.comment+=String.fromCharCode(P)),P&&C<v;);if(512&n.flags&&(n.check=o(n.check,h,C,m)),v-=C,m+=C,P)break e}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;x<16;){if(0===v)break e;v--,w+=h[m++]<<x,x+=8}if(w!==(65535&n.check)){e.msg="header crc mismatch",n.mode=30;break}x=w=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;x<32;){if(0===v)break e;v--,w+=h[m++]<<x,x+=8}e.adler=n.check=g(w),x=w=0,n.mode=11;case 11:if(0===n.havedict)return e.next_out=b,e.avail_out=y,e.next_in=m,e.avail_in=v,n.hold=w,n.bits=x,2;e.adler=n.check=1,n.mode=12;case 12:if(5===t||6===t)break e;case 13:if(n.last){w>>>=7&x,x-=7&x,n.mode=27;break}for(;x<3;){if(0===v)break e;v--,w+=h[m++]<<x,x+=8}switch(n.last=1&w,x-=1,3&(w>>>=1)){case 0:n.mode=14;break;case 1:if(A(n),n.mode=20,6!==t)break;w>>>=2,x-=2;break e;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=30}w>>>=2,x-=2;break;case 14:for(w>>>=7&x,x-=7&x;x<32;){if(0===v)break e;v--,w+=h[m++]<<x,x+=8}if((65535&w)!=(w>>>16^65535)){e.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&w,x=w=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(C=n.length){if(v<C&&(C=v),y<C&&(C=y),0===C)break e;a.arraySet(f,h,m,C,b),v-=C,m+=C,y-=C,b+=C,n.length-=C;break}n.mode=12;break;case 17:for(;x<14;){if(0===v)break e;v--,w+=h[m++]<<x,x+=8}if(n.nlen=257+(31&w),w>>>=5,x-=5,n.ndist=1+(31&w),w>>>=5,x-=5,n.ncode=4+(15&w),w>>>=4,x-=4,286<n.nlen||30<n.ndist){e.msg="too many length or distance symbols",n.mode=30;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;x<3;){if(0===v)break e;v--,w+=h[m++]<<x,x+=8}n.lens[D[n.have++]]=7&w,w>>>=3,x-=3}for(;n.have<19;)n.lens[D[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,q={bits:n.lenbits},O=l(0,n.lens,0,19,n.lencode,0,n.work,q),n.lenbits=q.bits,O){e.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;E=(W=n.lencode[w&(1<<n.lenbits)-1])>>>16&255,L=65535&W,!((R=W>>>24)<=x);){if(0===v)break e;v--,w+=h[m++]<<x,x+=8}if(L<16)w>>>=R,x-=R,n.lens[n.have++]=L;else{if(16===L){for(B=R+2;x<B;){if(0===v)break e;v--,w+=h[m++]<<x,x+=8}if(w>>>=R,x-=R,0===n.have){e.msg="invalid bit length repeat",n.mode=30;break}P=n.lens[n.have-1],C=3+(3&w),w>>>=2,x-=2}else if(17===L){for(B=R+3;x<B;){if(0===v)break e;v--,w+=h[m++]<<x,x+=8}x-=R,P=0,C=3+(7&(w>>>=R)),w>>>=3,x-=3}else{for(B=R+7;x<B;){if(0===v)break e;v--,w+=h[m++]<<x,x+=8}x-=R,P=0,C=11+(127&(w>>>=R)),w>>>=7,x-=7}if(n.have+C>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=30;break}for(;C--;)n.lens[n.have++]=P}}if(30===n.mode)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,q={bits:n.lenbits},O=l(s,n.lens,0,n.nlen,n.lencode,0,n.work,q),n.lenbits=q.bits,O){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,q={bits:n.distbits},O=l(d,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,q),n.distbits=q.bits,O){e.msg="invalid distances set",n.mode=30;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(6<=v&&258<=y){e.next_out=b,e.avail_out=y,e.next_in=m,e.avail_in=v,n.hold=w,n.bits=x,i(e,S),b=e.next_out,f=e.output,y=e.avail_out,m=e.next_in,h=e.input,v=e.avail_in,w=n.hold,x=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;E=(W=n.lencode[w&(1<<n.lenbits)-1])>>>16&255,L=65535&W,!((R=W>>>24)<=x);){if(0===v)break e;v--,w+=h[m++]<<x,x+=8}if(E&&!(240&E)){for(V=R,N=E,z=L;E=(W=n.lencode[z+((w&(1<<V+N)-1)>>V)])>>>16&255,L=65535&W,!(V+(R=W>>>24)<=x);){if(0===v)break e;v--,w+=h[m++]<<x,x+=8}w>>>=V,x-=V,n.back+=V}if(w>>>=R,x-=R,n.back+=R,n.length=L,0===E){n.mode=26;break}if(32&E){n.back=-1,n.mode=12;break}if(64&E){e.msg="invalid literal/length code",n.mode=30;break}n.extra=15&E,n.mode=22;case 22:if(n.extra){for(B=n.extra;x<B;){if(0===v)break e;v--,w+=h[m++]<<x,x+=8}n.length+=w&(1<<n.extra)-1,w>>>=n.extra,x-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;E=(W=n.distcode[w&(1<<n.distbits)-1])>>>16&255,L=65535&W,!((R=W>>>24)<=x);){if(0===v)break e;v--,w+=h[m++]<<x,x+=8}if(!(240&E)){for(V=R,N=E,z=L;E=(W=n.distcode[z+((w&(1<<V+N)-1)>>V)])>>>16&255,L=65535&W,!(V+(R=W>>>24)<=x);){if(0===v)break e;v--,w+=h[m++]<<x,x+=8}w>>>=V,x-=V,n.back+=V}if(w>>>=R,x-=R,n.back+=R,64&E){e.msg="invalid distance code",n.mode=30;break}n.offset=L,n.extra=15&E,n.mode=24;case 24:if(n.extra){for(B=n.extra;x<B;){if(0===v)break e;v--,w+=h[m++]<<x,x+=8}n.offset+=w&(1<<n.extra)-1,w>>>=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(0===y)break e;if(C=S-y,n.offset>C){if((C=n.offset-C)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=30;break}T=C>n.wnext?(C-=n.wnext,n.wsize-C):n.wnext-C,C>n.length&&(C=n.length),k=n.window}else k=f,T=b-n.offset,C=n.length;for(y<C&&(C=y),y-=C,n.length-=C;f[b++]=k[T++],--C;);0===n.length&&(n.mode=21);break;case 26:if(0===y)break e;f[b++]=n.length,y--,n.mode=21;break;case 27:if(n.wrap){for(;x<32;){if(0===v)break e;v--,w|=h[m++]<<x,x+=8}if(S-=y,e.total_out+=S,n.total+=S,S&&(e.adler=n.check=n.flags?o(n.check,f,S,b-S):r(n.check,f,S,b-S)),S=y,(n.flags?w:g(w))!==n.check){e.msg="incorrect data check",n.mode=30;break}x=w=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;x<32;){if(0===v)break e;v--,w+=h[m++]<<x,x+=8}if(w!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=30;break}x=w=0}n.mode=29;case 29:O=1;break e;case 30:O=-3;break e;case 31:return-4;default:return u}return e.next_out=b,e.avail_out=y,e.next_in=m,e.avail_in=v,n.hold=w,n.bits=x,(n.wsize||S!==e.avail_out&&n.mode<30&&(n.mode<27||4!==t))&&I(e,e.output,e.next_out,S-e.avail_out)?(n.mode=31,-4):(M-=e.avail_in,S-=e.avail_out,e.total_in+=M,e.total_out+=S,n.total+=S,n.wrap&&S&&(e.adler=n.check=n.flags?o(n.check,f,S,e.next_out-S):r(n.check,f,S,e.next_out-S)),e.data_type=n.bits+(n.last?64:0)+(12===n.mode?128:0)+(20===n.mode||15===n.mode?256:0),(0==M&&0===S||4===t)&&O===c&&(O=-5),O)},n.inflateEnd=function(e){if(!e||!e.state)return u;var t=e.state;return t.window&&(t.window=null),e.state=null,c},n.inflateGetHeader=function(e,t){var n;return e&&e.state&&2&(n=e.state).wrap?((n.head=t).done=!1,c):u},n.inflateSetDictionary=function(e,t){var n,a=t.length;return e&&e.state?0!==(n=e.state).wrap&&11!==n.mode?u:11===n.mode&&r(1,t,a,0)!==n.check?-3:I(e,t,a,a)?(n.mode=31,-4):(n.havedict=1,c):u},n.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(e,t,n){var a=e("../utils/common"),r=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],i=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],l=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,n,s,d,c,u,p){var h,f,g,m,b,v,y,w,x,M=p.bits,S=0,A=0,I=0,C=0,T=0,k=0,R=0,E=0,L=0,V=0,N=null,z=0,P=new a.Buf16(16),O=new a.Buf16(16),q=null,B=0;for(S=0;S<=15;S++)P[S]=0;for(A=0;A<s;A++)P[t[n+A]]++;for(T=M,C=15;1<=C&&0===P[C];C--);if(C<T&&(T=C),0===C)return d[c++]=20971520,d[c++]=20971520,p.bits=1,0;for(I=1;I<C&&0===P[I];I++);for(T<I&&(T=I),S=E=1;S<=15;S++)if(E<<=1,(E-=P[S])<0)return-1;if(0<E&&(0===e||1!==C))return-1;for(O[1]=0,S=1;S<15;S++)O[S+1]=O[S]+P[S];for(A=0;A<s;A++)0!==t[n+A]&&(u[O[t[n+A]]++]=A);if(v=0===e?(N=q=u,19):1===e?(N=r,z-=257,q=o,B-=257,256):(N=i,q=l,-1),S=I,b=c,R=A=V=0,g=-1,m=(L=1<<(k=T))-1,1===e&&852<L||2===e&&592<L)return 1;for(;;){for(y=S-R,x=u[A]<v?(w=0,u[A]):u[A]>v?(w=q[B+u[A]],N[z+u[A]]):(w=96,0),h=1<<S-R,I=f=1<<k;d[b+(V>>R)+(f-=h)]=y<<24|w<<16|x,0!==f;);for(h=1<<S-1;V&h;)h>>=1;if(0!==h?(V&=h-1,V+=h):V=0,A++,0==--P[S]){if(S===C)break;S=t[n+u[A]]}if(T<S&&(V&m)!==g){for(0===R&&(R=T),b+=I,E=1<<(k=S-R);k+R<C&&!((E-=P[k+R])<=0);)k++,E<<=1;if(L+=1<<k,1===e&&852<L||2===e&&592<L)return 1;d[g=V&m]=T<<24|k<<16|b-c}}return 0!==V&&(d[b+V]=S-R<<24|64<<16),p.bits=T,0}},{"../utils/common":41}],51:[function(e,t,n){t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(e,t,n){var a=e("../utils/common"),r=0,o=1;function i(e){for(var t=e.length;0<=--t;)e[t]=0}var l=0,s=29,d=256,c=d+1+s,u=30,p=19,h=2*c+1,f=15,g=16,m=7,b=256,v=16,y=17,w=18,x=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],M=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],S=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],A=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],I=new Array(2*(c+2));i(I);var C=new Array(2*u);i(C);var T=new Array(512);i(T);var k=new Array(256);i(k);var R=new Array(s);i(R);var E,L,V,N=new Array(u);function z(e,t,n,a,r){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=a,this.max_length=r,this.has_stree=e&&e.length}function P(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function O(e){return e<256?T[e]:T[256+(e>>>7)]}function q(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function B(e,t,n){e.bi_valid>g-n?(e.bi_buf|=t<<e.bi_valid&65535,q(e,e.bi_buf),e.bi_buf=t>>g-e.bi_valid,e.bi_valid+=n-g):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function W(e,t,n){B(e,n[2*t],n[2*t+1])}function F(e,t){for(var n=0;n|=1&e,e>>>=1,n<<=1,0<--t;);return n>>>1}function D(e,t,n){var a,r,o=new Array(f+1),i=0;for(a=1;a<=f;a++)o[a]=i=i+n[a-1]<<1;for(r=0;r<=t;r++){var l=e[2*r+1];0!==l&&(e[2*r]=F(o[l]++,l))}}function H(e){var t;for(t=0;t<c;t++)e.dyn_ltree[2*t]=0;for(t=0;t<u;t++)e.dyn_dtree[2*t]=0;for(t=0;t<p;t++)e.bl_tree[2*t]=0;e.dyn_ltree[2*b]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function U(e){8<e.bi_valid?q(e,e.bi_buf):0<e.bi_valid&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function G(e,t,n,a){var r=2*t,o=2*n;return e[r]<e[o]||e[r]===e[o]&&a[t]<=a[n]}function j(e,t,n){for(var a=e.heap[n],r=n<<1;r<=e.heap_len&&(r<e.heap_len&&G(t,e.heap[r+1],e.heap[r],e.depth)&&r++,!G(t,a,e.heap[r],e.depth));)e.heap[n]=e.heap[r],n=r,r<<=1;e.heap[n]=a}function Z(e,t,n){var a,r,o,i,l=0;if(0!==e.last_lit)for(;a=e.pending_buf[e.d_buf+2*l]<<8|e.pending_buf[e.d_buf+2*l+1],r=e.pending_buf[e.l_buf+l],l++,0===a?W(e,r,t):(W(e,(o=k[r])+d+1,t),0!==(i=x[o])&&B(e,r-=R[o],i),W(e,o=O(--a),n),0!==(i=M[o])&&B(e,a-=N[o],i)),l<e.last_lit;);W(e,b,t)}function K(e,t){var n,a,r,o=t.dyn_tree,i=t.stat_desc.static_tree,l=t.stat_desc.has_stree,s=t.stat_desc.elems,d=-1;for(e.heap_len=0,e.heap_max=h,n=0;n<s;n++)0!==o[2*n]?(e.heap[++e.heap_len]=d=n,e.depth[n]=0):o[2*n+1]=0;for(;e.heap_len<2;)o[2*(r=e.heap[++e.heap_len]=d<2?++d:0)]=1,e.depth[r]=0,e.opt_len--,l&&(e.static_len-=i[2*r+1]);for(t.max_code=d,n=e.heap_len>>1;1<=n;n--)j(e,o,n);for(r=s;n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],j(e,o,1),a=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=a,o[2*r]=o[2*n]+o[2*a],e.depth[r]=(e.depth[n]>=e.depth[a]?e.depth[n]:e.depth[a])+1,o[2*n+1]=o[2*a+1]=r,e.heap[1]=r++,j(e,o,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,a,r,o,i,l,s=t.dyn_tree,d=t.max_code,c=t.stat_desc.static_tree,u=t.stat_desc.has_stree,p=t.stat_desc.extra_bits,g=t.stat_desc.extra_base,m=t.stat_desc.max_length,b=0;for(o=0;o<=f;o++)e.bl_count[o]=0;for(s[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<h;n++)m<(o=s[2*s[2*(a=e.heap[n])+1]+1]+1)&&(o=m,b++),s[2*a+1]=o,d<a||(e.bl_count[o]++,i=0,g<=a&&(i=p[a-g]),l=s[2*a],e.opt_len+=l*(o+i),u&&(e.static_len+=l*(c[2*a+1]+i)));if(0!==b){do{for(o=m-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[m]--,b-=2}while(0<b);for(o=m;0!==o;o--)for(a=e.bl_count[o];0!==a;)d<(r=e.heap[--n])||(s[2*r+1]!==o&&(e.opt_len+=(o-s[2*r+1])*s[2*r],s[2*r+1]=o),a--)}}(e,t),D(o,d,e.bl_count)}function X(e,t,n){var a,r,o=-1,i=t[1],l=0,s=7,d=4;for(0===i&&(s=138,d=3),t[2*(n+1)+1]=65535,a=0;a<=n;a++)r=i,i=t[2*(a+1)+1],++l<s&&r===i||(l<d?e.bl_tree[2*r]+=l:0!==r?(r!==o&&e.bl_tree[2*r]++,e.bl_tree[2*v]++):l<=10?e.bl_tree[2*y]++:e.bl_tree[2*w]++,o=r,d=(l=0)===i?(s=138,3):r===i?(s=6,3):(s=7,4))}function Y(e,t,n){var a,r,o=-1,i=t[1],l=0,s=7,d=4;for(0===i&&(s=138,d=3),a=0;a<=n;a++)if(r=i,i=t[2*(a+1)+1],!(++l<s&&r===i)){if(l<d)for(;W(e,r,e.bl_tree),0!=--l;);else 0!==r?(r!==o&&(W(e,r,e.bl_tree),l--),W(e,v,e.bl_tree),B(e,l-3,2)):l<=10?(W(e,y,e.bl_tree),B(e,l-3,3)):(W(e,w,e.bl_tree),B(e,l-11,7));o=r,d=(l=0)===i?(s=138,3):r===i?(s=6,3):(s=7,4)}}i(N);var J=!1;function Q(e,t,n,r){var o,i,s;B(e,(l<<1)+(r?1:0),3),i=t,s=n,U(o=e),q(o,s),q(o,~s),a.arraySet(o.pending_buf,o.window,i,s,o.pending),o.pending+=s}n._tr_init=function(e){J||(function(){var e,t,n,a,r,o=new Array(f+1);for(a=n=0;a<s-1;a++)for(R[a]=n,e=0;e<1<<x[a];e++)k[n++]=a;for(k[n-1]=a,a=r=0;a<16;a++)for(N[a]=r,e=0;e<1<<M[a];e++)T[r++]=a;for(r>>=7;a<u;a++)for(N[a]=r<<7,e=0;e<1<<M[a]-7;e++)T[256+r++]=a;for(t=0;t<=f;t++)o[t]=0;for(e=0;e<=143;)I[2*e+1]=8,e++,o[8]++;for(;e<=255;)I[2*e+1]=9,e++,o[9]++;for(;e<=279;)I[2*e+1]=7,e++,o[7]++;for(;e<=287;)I[2*e+1]=8,e++,o[8]++;for(D(I,c+1,o),e=0;e<u;e++)C[2*e+1]=5,C[2*e]=F(e,5);E=new z(I,x,d+1,c,f),L=new z(C,M,0,u,f),V=new z(new Array(0),S,0,p,m)}(),J=!0),e.l_desc=new P(e.dyn_ltree,E),e.d_desc=new P(e.dyn_dtree,L),e.bl_desc=new P(e.bl_tree,V),e.bi_buf=0,e.bi_valid=0,H(e)},n._tr_stored_block=Q,n._tr_flush_block=function(e,t,n,a){var i,l,s=0;0<e.level?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return r;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return o;for(t=32;t<d;t++)if(0!==e.dyn_ltree[2*t])return o;return r}(e)),K(e,e.l_desc),K(e,e.d_desc),s=function(e){var t;for(X(e,e.dyn_ltree,e.l_desc.max_code),X(e,e.dyn_dtree,e.d_desc.max_code),K(e,e.bl_desc),t=p-1;3<=t&&0===e.bl_tree[2*A[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(l=e.static_len+3+7>>>3)<=i&&(i=l)):i=l=n+5,n+4<=i&&-1!==t?Q(e,t,n,a):4===e.strategy||l===i?(B(e,2+(a?1:0),3),Z(e,I,C)):(B(e,4+(a?1:0),3),function(e,t,n,a){var r;for(B(e,t-257,5),B(e,n-1,5),B(e,a-4,4),r=0;r<a;r++)B(e,e.bl_tree[2*A[r]+1],3);Y(e,e.dyn_ltree,t-1),Y(e,e.dyn_dtree,n-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,s+1),Z(e,e.dyn_ltree,e.dyn_dtree)),H(e),a&&U(e)},n._tr_tally=function(e,t,n){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>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++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(k[n]+d+1)]++,e.dyn_dtree[2*O(t)]++),e.last_lit===e.lit_bufsize-1},n._tr_align=function(e){var t;B(e,2,3),W(e,b,I),16===(t=e).bi_valid?(q(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):8<=t.bi_valid&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}},{"../utils/common":41}],53:[function(e,t,n){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){if(!e.setImmediate){var n,a,r,o,i=1,l={},s=!1,d=e.document,c=Object.getPrototypeOf&&Object.getPrototypeOf(e);c=c&&c.setTimeout?c:e,n="[object process]"==={}.toString.call(e.process)?function(e){process.nextTick(function(){p(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}}()?(o="setImmediate$"+Math.random()+"$",e.addEventListener?e.addEventListener("message",h,!1):e.attachEvent("onmessage",h),function(t){e.postMessage(o+t,"*")}):e.MessageChannel?((r=new MessageChannel).port1.onmessage=function(e){p(e.data)},function(e){r.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(a=d.documentElement,function(e){var t=d.createElement("script");t.onreadystatechange=function(){p(e),t.onreadystatechange=null,a.removeChild(t),t=null},a.appendChild(t)}):function(e){setTimeout(p,0,e)},c.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),a=0;a<t.length;a++)t[a]=arguments[a+1];var r={callback:e,args:t};return l[i]=r,n(i),i++},c.clearImmediate=u}function u(e){delete l[e]}function p(e){if(s)setTimeout(p,0,e);else{var n=l[e];if(n){s=!0;try{!function(e){var n=e.callback,a=e.args;switch(a.length){case 0:n();break;case 1:n(a[0]);break;case 2:n(a[0],a[1]);break;case 3:n(a[0],a[1],a[2]);break;default:n.apply(t,a)}}(n)}finally{u(e),s=!1}}}}function h(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(o)&&p(+t.data.slice(o.length))}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,void 0!==ps?ps:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[10])(10);const Ob=hs(Pb.exports);var qb={};function Bb(e,t){return void 0===t&&(t=Object),t&&"function"==typeof t.getOwnPropertyDescriptors&&(e=t.create(null,t.getOwnPropertyDescriptors(e))),t&&"function"==typeof t.freeze?t.freeze(e):e}function Wb(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Fb=Bb({allowfullscreen:!0,async:!0,autofocus:!0,autoplay:!0,checked:!0,controls:!0,default:!0,defer:!0,disabled:!0,formnovalidate:!0,hidden:!0,ismap:!0,itemscope:!0,loop:!0,multiple:!0,muted:!0,nomodule:!0,novalidate:!0,open:!0,playsinline:!0,readonly:!0,required:!0,reversed:!0,selected:!0});var Db=Bb({area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});var Hb=Bb({script:!1,style:!1,textarea:!0,title:!0});function Ub(e){return e===Gb.HTML}var Gb=Bb({HTML:"text/html",XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),jb=Object.keys(Gb).map(function(e){return Gb[e]});var Zb=Bb({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/"});qb.assign=function(e,t){if(null===e||"object"!=typeof e)throw new TypeError("target is not an object");for(var n in t)Wb(t,n)&&(e[n]=t[n]);return e},qb.find=function(e,t,n){if(void 0===n&&(n=Array.prototype),e&&"function"==typeof n.find)return n.find.call(e,t);for(var a=0;a<e.length;a++)if(Wb(e,a)){var r=e[a];if(t.call(void 0,r,a,e))return r}},qb.freeze=Bb,qb.HTML_BOOLEAN_ATTRIBUTES=Fb,qb.HTML_RAW_TEXT_ELEMENTS=Hb,qb.HTML_VOID_ELEMENTS=Db,qb.hasDefaultHTMLNamespace=function(e){return Ub(e)||e===Gb.XML_XHTML_APPLICATION},qb.hasOwn=Wb,qb.isHTMLBooleanAttribute=function(e){return Wb(Fb,e.toLowerCase())},qb.isHTMLRawTextElement=function(e){var t=e.toLowerCase();return Wb(Hb,t)&&!Hb[t]},qb.isHTMLEscapableRawTextElement=function(e){var t=e.toLowerCase();return Wb(Hb,t)&&Hb[t]},qb.isHTMLMimeType=Ub,qb.isHTMLVoidElement=function(e){return Wb(Db,e.toLowerCase())},qb.isValidMimeType=function(e){return jb.indexOf(e)>-1},qb.MIME_TYPE=Gb,qb.NAMESPACE=Zb;var Kb={};function Xb(e,t){e.prototype=Object.create(Error.prototype,{constructor:{value:e},name:{value:e.name,enumerable:!0,writable:t}})}var Yb=qb.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"}),Jb=Object.keys(Yb);function Qb(e){return"number"==typeof e&&e>=1&&e<=25}function $b(e,t){var n;Qb(e)?(this.name=Jb[e],this.message=t||""):(this.message=e,this.name="string"==typeof(n=t)&&n.substring(n.length-Yb.Error.length)===Yb.Error?t:Yb.Error),Error.captureStackTrace&&Error.captureStackTrace(this,$b)}Xb($b,!0),Object.defineProperties($b.prototype,{code:{enumerable:!0,get:function(){var e=Jb.indexOf(this.name);return Qb(e)?e:0}}});for(var _b={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},ev=Object.entries(_b),tv=0;tv<ev.length;tv++){$b[ev[tv][0]]=ev[tv][1]}function nv(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,nv)}Xb(nv),Kb.DOMException=$b,Kb.DOMExceptionName=Yb,Kb.ExceptionCode=_b,Kb.ParseError=nv;var av={},rv={};function ov(e){try{"function"!=typeof e&&(e=RegExp);var t=new e("𝌆","u").exec("𝌆");return!!t&&2===t[0].length}catch(n){}return!1}var iv=ov();function lv(e){if("["!==e.source[0])throw new Error(e+" can not be used with chars");return e.source.slice(1,e.source.lastIndexOf("]"))}function sv(e,t){if("["!==e.source[0])throw new Error("/"+e.source+"/ can not be used with chars_without");if(!t||"string"!=typeof t)throw new Error(JSON.stringify(t)+" is not a valid search");if(-1===e.source.indexOf(t))throw new Error('"'+t+'" is not is /'+e.source+"/");if("-"===t&&1!==e.source.indexOf(t))throw new Error('"'+t+'" is not at the first postion of /'+e.source+"/");return new RegExp(e.source.replace(t,""),iv?"u":"")}function dv(e){var t=this;return new RegExp(Array.prototype.slice.call(arguments).map(function(e){var n="string"==typeof e;if(n&&void 0===t&&"|"===e)throw new Error("use regg instead of reg to wrap expressions with `|`!");return n?e:e.source}).join(""),iv?"mu":"m")}function cv(e){if(0===arguments.length)throw new Error("no parameters provided");return dv.apply(cv,["(?:"].concat(Array.prototype.slice.call(arguments),[")"]))}var uv=/[-\x09\x0A\x0D\x20-\x2C\x2E-\uD7FF\uE000-\uFFFD]/;iv&&(uv=dv("[",lv(uv),"\\u{10000}-\\u{10FFFF}","]"));var pv=new RegExp("[^"+lv(uv)+"]",iv?"u":""),hv=/[\x20\x09\x0D\x0A]/,fv=lv(hv),gv=dv(hv,"+"),mv=dv(hv,"*"),bv=/[:_a-zA-Z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;iv&&(bv=dv("[",lv(bv),"\\u{10000}-\\u{10FFFF}","]"));var vv=dv("[",lv(bv),lv(/[-.0-9\xB7]/),lv(/[\u0300-\u036F\u203F-\u2040]/),"]"),yv=dv(bv,vv,"*"),wv=dv(vv,"+"),xv=dv("&",yv,";"),Mv=cv(/&#[0-9]+;|&#x[0-9a-fA-F]+;/),Sv=cv(xv,"|",Mv),Av=dv("%",yv,";"),Iv=cv(dv('"',cv(/[^%&"]/,"|",Av,"|",Sv),"*",'"'),"|",dv("'",cv(/[^%&']/,"|",Av,"|",Sv),"*","'")),Cv=cv('"',cv(/[^<&"]/,"|",Sv),"*",'"',"|","'",cv(/[^<&']/,"|",Sv),"*","'"),Tv=dv(sv(bv,":"),sv(vv,":"),"*"),kv=dv(Tv,cv(":",Tv),"?"),Rv=dv("^",kv,"$"),Ev=dv("(",kv,")"),Lv=cv(/"[^"]*"|'[^']*'/),Vv=dv(/^<\?/,"(",yv,")",cv(gv,"(",uv,"*?)"),"?",/\?>/),Nv=/[\x20\x0D\x0Aa-zA-Z0-9-'()+,./:=?;!*#@$_%]/,zv=cv('"',Nv,'*"',"|","'",sv(Nv,"'"),"*'"),Pv="\x3c!--",Ov=dv(Pv,cv(sv(uv,"-"),"|",dv("-",sv(uv,"-"))),"*","--\x3e"),qv="#PCDATA",Bv=cv(dv(/\(/,mv,qv,cv(mv,/\|/,mv,kv),"*",mv,/\)\*/),"|",dv(/\(/,mv,qv,mv,/\)/)),Wv=cv("EMPTY","|","ANY","|",Bv,"|",dv(/\([^>]+\)/,/[?*+]?/)),Fv=dv("<!ELEMENT",gv,cv(kv,"|",Av),gv,cv(Wv,"|",Av),mv,">"),Dv=dv("NOTATION",gv,/\(/,mv,yv,cv(mv,/\|/,mv,yv),"*",mv,/\)/),Hv=dv(/\(/,mv,wv,cv(mv,/\|/,mv,wv),"*",mv,/\)/),Uv=cv(Dv,"|",Hv),Gv=cv(/CDATA|ID|IDREF|IDREFS|ENTITY|ENTITIES|NMTOKEN|NMTOKENS/,"|",Uv),jv=cv(/#REQUIRED|#IMPLIED/,"|",cv(cv("#FIXED",gv),"?",Cv)),Zv=dv("<!ATTLIST",gv,yv,cv(gv,yv,gv,Gv,gv,jv),"*",mv,">"),Kv="about:legacy-compat",Xv=cv('"'+Kv+'"',"|","'"+Kv+"'"),Yv="SYSTEM",Jv="PUBLIC",Qv=cv(cv(Yv,gv,Lv),"|",cv(Jv,gv,zv,gv,Lv)),$v=dv("^",cv(cv(Yv,gv,"(?<SystemLiteralOnly>",Lv,")"),"|",cv(Jv,gv,"(?<PubidLiteral>",zv,")",gv,"(?<SystemLiteral>",Lv,")"))),_v=dv("^",zv,"$"),ey=dv("^",Lv,"$"),ty=cv(gv,"NDATA",gv,yv),ny="<!ENTITY",ay=dv(ny,gv,yv,gv,cv(Iv,"|",cv(Qv,ty,"?")),mv,">"),ry=cv(Iv,"|",Qv),oy=cv(ay,"|",dv(ny,gv,"%",gv,yv,gv,ry,mv,">")),iy=dv(Jv,gv,zv),ly=dv("<!NOTATION",gv,yv,gv,cv(Qv,"|",iy),mv,">"),sy=dv(mv,"=",mv),dy=/1[.]\d+/,cy=dv(gv,"version",sy,cv("'",dy,"'","|",'"',dy,'"')),uy=/[A-Za-z][-A-Za-z0-9._]*/,py=dv(/^<\?xml/,cy,cv(gv,"encoding",sy,cv('"',uy,'"',"|","'",uy,"'")),"?",cv(gv,"standalone",sy,cv("'",cv("yes","|","no"),"'","|",'"',cv("yes","|","no"),'"')),"?",mv,/\?>/),hy=dv(uv,"*?",/\]\]>/),fy=dv(/<!\[CDATA\[/,hy);rv.chars=lv,rv.chars_without=sv,rv.detectUnicodeSupport=ov,rv.reg=dv,rv.regg=cv,rv.ABOUT_LEGACY_COMPAT=Kv,rv.ABOUT_LEGACY_COMPAT_SystemLiteral=Xv,rv.AttlistDecl=Zv,rv.CDATA_START="<![CDATA[",rv.CDATA_END="]]>",rv.CDSect=fy,rv.Char=uv,rv.Comment=Ov,rv.COMMENT_START=Pv,rv.COMMENT_END="--\x3e",rv.DOCTYPE_DECL_START="<!DOCTYPE",rv.elementdecl=Fv,rv.EntityDecl=oy,rv.EntityValue=Iv,rv.ExternalID=Qv,rv.ExternalID_match=$v,rv.Name=yv,rv.NotationDecl=ly,rv.Reference=Sv,rv.PEReference=Av,rv.PI=Vv,rv.PUBLIC=Jv,rv.PubidLiteral=zv,rv.PubidLiteral_match=_v,rv.QName=kv,rv.QName_exact=Rv,rv.QName_group=Ev,rv.S=gv,rv.SChar_s=fv,rv.S_OPT=mv,rv.SYSTEM=Yv,rv.SystemLiteral=Lv,rv.SystemLiteral_match=ey,rv.InvalidChar=pv,rv.UNICODE_REPLACEMENT_CHARACTER="�",rv.UNICODE_SUPPORT=iv,rv.XMLDecl=py;var gy=qb,my=gy.find,by=gy.hasDefaultHTMLNamespace,vy=gy.hasOwn,yy=gy.isHTMLMimeType,wy=gy.isHTMLRawTextElement,xy=gy.isHTMLVoidElement,My=gy.MIME_TYPE,Sy=gy.NAMESPACE,Ay=Symbol(),Iy=Kb,Cy=Iy.DOMException,Ty=Iy.DOMExceptionName,ky=rv;function Ry(e){if(e!==Ay)throw new TypeError("Illegal constructor")}function Ey(e){return""!==e}function Ly(e,t){return vy(e,t)||(e[t]=!0),e}function Vy(e){if(!e)return[];var t=function(e){return e?e.split(/[\t\n\f\r ]+/).filter(Ey):[]}(e);return Object.keys(t.reduce(Ly,{}))}function Ny(e){if(!ky.QName_exact.test(e))throw new Cy(Cy.INVALID_CHARACTER_ERR,'invalid character in qualified name "'+e+'"')}function zy(e,t){Ny(t),e=e||null;var n=null,a=t;if(t.indexOf(":")>=0){var r=t.split(":");n=r[0],a=r[1]}if(null!==n&&null===e)throw new Cy(Cy.NAMESPACE_ERR,"prefix is non-null and namespace is null");if("xml"===n&&e!==gy.NAMESPACE.XML)throw new Cy(Cy.NAMESPACE_ERR,'prefix is "xml" and namespace is not the XML namespace');if(("xmlns"===n||"xmlns"===t)&&e!==gy.NAMESPACE.XMLNS)throw new Cy(Cy.NAMESPACE_ERR,'either qualifiedName or prefix is "xmlns" and namespace is not the XMLNS namespace');if(e===gy.NAMESPACE.XMLNS&&"xmlns"!==n&&"xmlns"!==t)throw new Cy(Cy.NAMESPACE_ERR,'namespace is the XMLNS namespace and neither qualifiedName nor prefix is "xmlns"');return[e,n,a]}function Py(e,t){for(var n in e)vy(e,n)&&(t[n]=e[n])}function Oy(e,t){var n=e.prototype;if(!(n instanceof t)){let a=function(){};a.prototype=t.prototype,a=new a,Py(n,a),e.prototype=n=a}n.constructor!=e&&("function"!=typeof e&&console.error("unknown Class:"+e),n.constructor=e)}var qy={},By=qy.ELEMENT_NODE=1,Wy=qy.ATTRIBUTE_NODE=2,Fy=qy.TEXT_NODE=3,Dy=qy.CDATA_SECTION_NODE=4,Hy=qy.ENTITY_REFERENCE_NODE=5,Uy=qy.ENTITY_NODE=6,Gy=qy.PROCESSING_INSTRUCTION_NODE=7,jy=qy.COMMENT_NODE=8,Zy=qy.DOCUMENT_NODE=9,Ky=qy.DOCUMENT_TYPE_NODE=10,Xy=qy.DOCUMENT_FRAGMENT_NODE=11,Yy=qy.NOTATION_NODE=12,Jy=gy.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 Qy(e,t){if(t.length<e.length)return Qy(t,e);var n=null;for(var a in e){if(e[a]!==t[a])return n;n=e[a]}return n}function $y(e){return e.guid||(e.guid=Math.random()),e.guid}function _y(){}function ew(e,t){this._node=e,this._refresh=t,tw(this)}function tw(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==t){var n=e._refresh(e._node);if(Hw(e,"length",n.length),!e.$$length||n.length<e.$$length)for(var a=n.length;a in e;a++)vy(e,a)&&delete e[a];Py(n,e),e._inc=t}}function nw(){}function aw(e,t){for(var n=0;n<e.length;){if(e[n]===t)return n;n++}}function rw(e,t,n,a){if(a?t[aw(t,a)]=n:(t[t.length]=n,t.length++),e){n.ownerElement=e;var r=e.ownerDocument;r&&(a&&pw(r,e,a),function(e,t,n){e&&e._inc++;var a=n.namespaceURI;a===Sy.XMLNS&&(t._nsMap[n.prefix?n.localName:""]=n.value)}(r,e,n))}}function ow(e,t,n){var a=aw(t,n);if(a>=0){for(var r=t.length-1;a<=r;)t[a]=t[++a];if(t.length=r,e){var o=e.ownerDocument;o&&pw(o,e,n),n.ownerElement=null}}}function iw(){}function lw(e){Ry(e)}function sw(e){return("<"==e?"&lt;":">"==e&&"&gt;")||"&"==e&&"&amp;"||'"'==e&&"&quot;"||"&#"+e.charCodeAt()+";"}function dw(e,t){cw(e,null,{enter:function(e){return!t(e)||cw.STOP}})}function cw(e,t,n){for(var a=[{node:e,context:t,phase:cw.ENTER}];a.length>0;){var r=a.pop();if(r.phase===cw.ENTER){var o=n.enter(r.node,r.context);if(o===cw.STOP)return cw.STOP;if(a.push({node:r.node,context:o,phase:cw.EXIT}),null==o)continue;for(var i=r.node.lastChild;i;)a.push({node:i,context:o,phase:cw.ENTER}),i=i.previousSibling}else n.exit&&n.exit(r.node,r.context)}}function uw(e,t){Ry(e);var n=t||{};this.ownerDocument=this,this.contentType=n.contentType||My.XML_APPLICATION,this.type=yy(this.contentType)?"html":"xml"}function pw(e,t,n,a){e&&e._inc++,n.namespaceURI===Sy.XMLNS&&delete t._nsMap[n.prefix?n.localName:""]}function hw(e,t,n){if(e&&e._inc){e._inc++;var a=t.childNodes;if(n&&!n.nextSibling)a[a.length++]=n;else{for(var r=t.firstChild,o=0;r;)a[o++]=r,r=r.nextSibling;a.length=o,delete a[a.length]}}}function fw(e,t){if(e!==t.parentNode)throw new Cy(Cy.NOT_FOUND_ERR,"child's parent is not parent");var n=t.previousSibling,a=t.nextSibling;return n?n.nextSibling=a:e.firstChild=a,a?a.previousSibling=n:e.lastChild=n,hw(e.ownerDocument,e),t.parentNode=null,t.previousSibling=null,t.nextSibling=null,t}function gw(e){return e&&e.nodeType===lw.DOCUMENT_TYPE_NODE}function mw(e){return e&&e.nodeType===lw.ELEMENT_NODE}function bw(e){return e&&e.nodeType===lw.TEXT_NODE}function vw(e,t){var n=e.childNodes||[];if(my(n,mw)||gw(t))return!1;var a=my(n,gw);return!(t&&a&&n.indexOf(a)>n.indexOf(t))}function yw(e,t){var n=e.childNodes||[];if(my(n,function(e){return mw(e)&&e!==t}))return!1;var a=my(n,gw);return!(t&&a&&n.indexOf(a)>n.indexOf(t))}function ww(e,t,n){if(!function(e){return e&&(e.nodeType===lw.DOCUMENT_NODE||e.nodeType===lw.DOCUMENT_FRAGMENT_NODE||e.nodeType===lw.ELEMENT_NODE)}(e))throw new Cy(Cy.HIERARCHY_REQUEST_ERR,"Unexpected parent node type "+e.nodeType);if(n&&n.parentNode!==e)throw new Cy(Cy.NOT_FOUND_ERR,"child not in parent");if(!function(e){return e&&(e.nodeType===lw.CDATA_SECTION_NODE||e.nodeType===lw.COMMENT_NODE||e.nodeType===lw.DOCUMENT_FRAGMENT_NODE||e.nodeType===lw.DOCUMENT_TYPE_NODE||e.nodeType===lw.ELEMENT_NODE||e.nodeType===lw.PROCESSING_INSTRUCTION_NODE||e.nodeType===lw.TEXT_NODE)}(t)||gw(t)&&e.nodeType!==lw.DOCUMENT_NODE)throw new Cy(Cy.HIERARCHY_REQUEST_ERR,"Unexpected node type "+t.nodeType+" for parent node type "+e.nodeType)}function xw(e,t,n){var a=e.childNodes||[],r=t.childNodes||[];if(t.nodeType===lw.DOCUMENT_FRAGMENT_NODE){var o=r.filter(mw);if(o.length>1||my(r,bw))throw new Cy(Cy.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(1===o.length&&!vw(e,n))throw new Cy(Cy.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(mw(t)&&!vw(e,n))throw new Cy(Cy.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(gw(t)){if(my(a,gw))throw new Cy(Cy.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var i=my(a,mw);if(n&&a.indexOf(i)<a.indexOf(n))throw new Cy(Cy.HIERARCHY_REQUEST_ERR,"Doctype can only be inserted before an element");if(!n&&i)throw new Cy(Cy.HIERARCHY_REQUEST_ERR,"Doctype can not be appended since element is present")}}function Mw(e,t,n){var a=e.childNodes||[],r=t.childNodes||[];if(t.nodeType===lw.DOCUMENT_FRAGMENT_NODE){var o=r.filter(mw);if(o.length>1||my(r,bw))throw new Cy(Cy.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(1===o.length&&!yw(e,n))throw new Cy(Cy.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(mw(t)&&!yw(e,n))throw new Cy(Cy.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(gw(t)){if(my(a,function(e){return gw(e)&&e!==n}))throw new Cy(Cy.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var i=my(a,mw);if(n&&a.indexOf(i)<a.indexOf(n))throw new Cy(Cy.HIERARCHY_REQUEST_ERR,"Doctype can only be inserted before an element")}}function Sw(e,t,n,a){ww(e,t,n),e.nodeType===lw.DOCUMENT_NODE&&(a||xw)(e,t,n);var r=t.parentNode;if(r&&r.removeChild(t),t.nodeType===Xy){var o=t.firstChild;if(null==o)return t;var i=t.lastChild}else o=i=t;var l=n?n.previousSibling:e.lastChild;o.previousSibling=l,i.nextSibling=n,l?l.nextSibling=o:e.firstChild=o,null==n?e.lastChild=i:n.previousSibling=i;do{o.parentNode=e}while(o!==i&&(o=o.nextSibling));return hw(e.ownerDocument||e,e,t),t.nodeType==Xy&&(t.firstChild=t.lastChild=null),t}function Aw(e){Ry(e),this._nsMap=Object.create(null)}function Iw(e){Ry(e),this.namespaceURI=null,this.prefix=null,this.ownerElement=null}function Cw(e){Ry(e)}function Tw(e){Ry(e)}function kw(e){Ry(e)}function Rw(e){Ry(e)}function Ew(e){Ry(e)}function Lw(e){Ry(e)}function Vw(e){Ry(e)}function Nw(e){Ry(e)}function zw(e){Ry(e)}function Pw(e){Ry(e)}function Ow(){}function qw(e){var t;t="function"==typeof e?{requireWellFormed:!1,splitCDATASections:!0,nodeFilter:e}:null!=e?{requireWellFormed:!!e.requireWellFormed,splitCDATASections:!1!==e.splitCDATASections,nodeFilter:e.nodeFilter||null}:{requireWellFormed:!1,splitCDATASections:!0,nodeFilter:null};var n=[],a=this.nodeType===Zy&&this.documentElement||this,r=a.prefix,o=a.namespaceURI;if(o&&null==r&&null==(r=a.lookupPrefix(o)))var i=[{namespace:o,prefix:null}];return Fw(this,n,i,t),n.join("")}function Bw(e,t,n){var a=e.prefix||"",r=e.namespaceURI;if(!r)return!1;if("xml"===a&&r===Sy.XML||r===Sy.XMLNS)return!1;for(var o=n.length;o--;){var i=n[o];if(i.prefix===a)return i.namespace!==r}return!0}function Ww(e,t,n){e.push(" ",t,'="',n.replace(/[<>&"\t\n\r]/g,sw),'"')}function Fw(e,t,n,a){n||(n=[]);var r=a.nodeFilter,o=a.requireWellFormed,i=a.splitCDATASections,l="html"===(e.nodeType===Zy?e:e.ownerDocument).type;cw(e,{ns:n},{enter:function(e,n){var s=n.ns;if(r){if(!(e=r(e)))return null;if("string"==typeof e)return t.push(e),null}switch(e.nodeType){case By:var d=e.attributes,c=d.length,u=e.tagName,p=u;if(!l&&!e.prefix&&e.namespaceURI){for(var h,f=0;f<d.length;f++)if("xmlns"===d.item(f).name){h=d.item(f).value;break}if(!h)for(var g=s.length-1;g>=0;g--){if(""===(m=s[g]).prefix&&m.namespace===e.namespaceURI){h=m.namespace;break}}if(h!==e.namespaceURI)for(g=s.length-1;g>=0;g--){var m;if((m=s[g]).namespace===e.namespaceURI){m.prefix&&(p=m.prefix+":"+u);break}}}t.push("<",p);for(var b=s.slice(),v=0;v<c;v++){"xmlns"==(y=d.item(v)).prefix?b.push({prefix:y.localName,namespace:y.value}):"xmlns"==y.nodeName&&b.push({prefix:"",namespace:y.value})}for(v=0;v<c;v++){var y;if(Bw(y=d.item(v),0,b)){var w=y.prefix||"",x=y.namespaceURI;Ww(t,w?"xmlns:"+w:"xmlns",x),b.push({prefix:w,namespace:x})}var M=r?r(y):y;M&&("string"==typeof M?t.push(M):Ww(t,M.name,M.value))}if(u===p&&Bw(e,0,b)){var S=e.prefix||"";x=e.namespaceURI;Ww(t,S?"xmlns:"+S:"xmlns",x),b.push({prefix:S,namespace:x})}var A=!e.firstChild;if(A&&(l||e.namespaceURI===Sy.HTML)&&(A=xy(u)),A)return t.push("/>"),null;if(t.push(">"),l&&wy(u)){for(var I=e.firstChild;I;)I.data?t.push(I.data):Fw(I,t,b.slice(),a),I=I.nextSibling;return t.push("</",p,">"),null}return{ns:b,tag:p};case Zy:case Xy:if(o&&e.nodeType===Zy&&null==e.documentElement)throw new Cy("The Document has no documentElement",Ty.InvalidStateError);return{ns:s};case Wy:return Ww(t,e.name,e.value),null;case Fy:if(o&&ky.InvalidChar.test(e.data))throw new Cy("The Text node data contains characters outside the XML Char production",Ty.InvalidStateError);return t.push(e.data.replace(/[<&>]/g,sw)),null;case Dy:if(o&&-1!==e.data.indexOf("]]>"))throw new Cy('The CDATASection data contains "]]>"',Ty.InvalidStateError);return i?t.push(ky.CDATA_START,e.data.replace(/]]>/g,"]]]]><![CDATA[>"),ky.CDATA_END):t.push(ky.CDATA_START,e.data,ky.CDATA_END),null;case jy:if(o){if(ky.InvalidChar.test(e.data))throw new Cy("The comment node data contains characters outside the XML Char production",Ty.InvalidStateError);if(-1!==e.data.indexOf("--")||"-"===e.data[e.data.length-1])throw new Cy('The comment node data contains "--" or ends with "-"',Ty.InvalidStateError)}return t.push(ky.COMMENT_START,e.data,ky.COMMENT_END),null;case Ky:var C=e.publicId,T=e.systemId;if(o){if(C&&!ky.PubidLiteral_match.test(C))throw new Cy("DocumentType publicId is not a valid PubidLiteral",Ty.InvalidStateError);if(T&&"."!==T&&!ky.SystemLiteral_match.test(T))throw new Cy("DocumentType systemId is not a valid SystemLiteral",Ty.InvalidStateError);if(e.internalSubset&&-1!==e.internalSubset.indexOf("]>"))throw new Cy('DocumentType internalSubset contains "]>"',Ty.InvalidStateError)}return t.push(ky.DOCTYPE_DECL_START," ",e.name),C?(t.push(" ",ky.PUBLIC," ",C),T&&"."!==T&&t.push(" ",T)):T&&"."!==T&&t.push(" ",ky.SYSTEM," ",T),e.internalSubset&&t.push(" [",e.internalSubset,"]"),t.push(">"),null;case Gy:if(o){if(-1!==e.target.indexOf(":")||"xml"===e.target.toLowerCase())throw new Cy("The ProcessingInstruction target is not well-formed",Ty.InvalidStateError);if(ky.InvalidChar.test(e.data))throw new Cy("The ProcessingInstruction data contains characters outside the XML Char production",Ty.InvalidStateError);if(-1!==e.data.indexOf("?>"))throw new Cy('The ProcessingInstruction data contains "?>"',Ty.InvalidStateError)}return t.push("<?",e.target," ",e.data,"?>"),null;case Hy:return t.push("&",e.nodeName,";"),null;default:return t.push("??",e.nodeName),null}},exit:function(e,n){n&&n.tag&&t.push("</",n.tag,">")}})}function Dw(e,t,n){var a;return cw(t,null,{enter:function(t,r){var o=new t.constructor(Ay);for(var i in t)if(vy(t,i)){var l=t[i];"object"!=typeof l&&l!=o[i]&&(o[i]=l)}t.childNodes&&(o.childNodes=new _y),o.ownerDocument=e;var s=n;switch(o.nodeType){case By:var d=t.attributes,c=o.attributes=new nw,u=d.length;c._ownerElement=o;for(var p=0;p<u;p++)o.setAttributeNode(Dw(e,d.item(p),!0));break;case Wy:s=!0}return null!==r?r.appendChild(o):a=o,s?o:null}}),a}function Hw(e,t,n){e[t]=n}function Uw(e){for(var t=[],n=e.firstChild;n;)n.nodeType===By&&t.push(n),n=n.nextSibling;return t}_y.prototype={length:0,item:function(e){return e>=0&&e<this.length?this[e]:null},toString:function(e){var t;t="function"==typeof e?{requireWellFormed:!1,splitCDATASections:!0,nodeFilter:e}:e?{requireWellFormed:!!e.requireWellFormed,splitCDATASections:!1!==e.splitCDATASections,nodeFilter:e.nodeFilter||null}:{requireWellFormed:!1,splitCDATASections:!0,nodeFilter:null};for(var n=[],a=0;a<this.length;a++)Fw(this[a],n,null,t);return n.join("")},filter:function(e){return Array.prototype.filter.call(this,e)},indexOf:function(e){return Array.prototype.indexOf.call(this,e)}},_y.prototype[Symbol.iterator]=function(){var e=this,t=0;return{next:function(){return t<e.length?{value:e[t++],done:!1}:{done:!0}},return:function(){return{done:!0}}}},ew.prototype.item=function(e){return tw(this),this[e]||null},Oy(ew,_y),nw.prototype={length:0,item:_y.prototype.item,getNamedItem:function(e){this._ownerElement&&this._ownerElement._isInHTMLDocumentAndNamespace()&&(e=e.toLowerCase());for(var t=0;t<this.length;){var n=this[t];if(n.nodeName===e)return n;t++}return null},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!==this._ownerElement)throw new Cy(Cy.INUSE_ATTRIBUTE_ERR);var n=this.getNamedItemNS(e.namespaceURI,e.localName);return n===e?e:(rw(this._ownerElement,this,e,n),n)},setNamedItemNS:function(e){return this.setNamedItem(e)},removeNamedItem:function(e){var t=this.getNamedItem(e);if(!t)throw new Cy(Cy.NOT_FOUND_ERR,e);return ow(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var n=this.getNamedItemNS(e,t);if(!n)throw new Cy(Cy.NOT_FOUND_ERR,e?e+" : "+t:t);return ow(this._ownerElement,this,n),n},getNamedItemNS:function(e,t){e||(e=null);for(var n=0;n<this.length;){var a=this[n];if(a.localName===t&&a.namespaceURI===e)return a;n++}return null}},nw.prototype[Symbol.iterator]=function(){var e=this,t=0;return{next:function(){return t<e.length?{value:e[t++],done:!1}:{done:!0}},return:function(){return{done:!0}}}},iw.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,n){var a=My.XML_APPLICATION;e===Sy.HTML?a=My.XML_XHTML_APPLICATION:e===Sy.SVG&&(a=My.XML_SVG_IMAGE);var r=new uw(Ay,{contentType:a});if(r.implementation=this,r.childNodes=new _y,r.doctype=n||null,n&&r.appendChild(n),t){var o=r.createElementNS(e,t);r.appendChild(o)}return r},createDocumentType:function(e,t,n,a){Ny(e);var r=new Ew(Ay);return r.name=e,r.nodeName=e,r.publicId=t||"",r.systemId=n||"",r.internalSubset=a||"",r.childNodes=new _y,r},createHTMLDocument:function(e){var t=new uw(Ay,{contentType:My.HTML});if(t.implementation=this,t.childNodes=new _y,!1!==e){t.doctype=this.createDocumentType("html"),t.doctype.ownerDocument=t,t.appendChild(t.doctype);var n=t.createElement("html");t.appendChild(n);var a=t.createElement("head");if(n.appendChild(a),"string"==typeof e){var r=t.createElement("title");r.appendChild(t.createTextNode(e)),a.appendChild(r)}n.appendChild(t.createElement("body"))}return t}},lw.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,parentNode:null,get parentElement(){return this.parentNode&&this.parentNode.nodeType===this.ELEMENT_NODE?this.parentNode:null},childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,baseURI:"about:blank",get isConnected(){var e=this.getRootNode();return e&&e.nodeType===e.DOCUMENT_NODE},contains:function(e){if(!e)return!1;var t=e;do{if(this===t)return!0;t=t.parentNode}while(t);return!1},getRootNode:function(e){var t=this;do{if(!t.parentNode)return t;t=t.parentNode}while(t)},isEqualNode:function(e){if(!e)return!1;for(var t=[{node:this,other:e}];t.length>0;){var n=t.pop(),a=n.node,r=n.other;if(a.nodeType!==r.nodeType)return!1;switch(a.nodeType){case a.DOCUMENT_TYPE_NODE:if(a.name!==r.name)return!1;if(a.publicId!==r.publicId)return!1;if(a.systemId!==r.systemId)return!1;break;case a.ELEMENT_NODE:if(a.namespaceURI!==r.namespaceURI)return!1;if(a.prefix!==r.prefix)return!1;if(a.localName!==r.localName)return!1;if(a.attributes.length!==r.attributes.length)return!1;for(var o=0;o<a.attributes.length;o++){var i=a.attributes.item(o),l=r.getAttributeNodeNS(i.namespaceURI,i.localName);if(!l)return!1;t.push({node:i,other:l})}break;case a.ATTRIBUTE_NODE:if(a.namespaceURI!==r.namespaceURI)return!1;if(a.localName!==r.localName)return!1;if(a.value!==r.value)return!1;break;case a.PROCESSING_INSTRUCTION_NODE:if(a.target!==r.target||a.data!==r.data)return!1;break;case a.TEXT_NODE:case a.CDATA_SECTION_NODE:case a.COMMENT_NODE:if(a.data!==r.data)return!1}if(a.childNodes.length!==r.childNodes.length)return!1;for(o=a.childNodes.length-1;o>=0;o--)t.push({node:a.childNodes[o],other:r.childNodes[o]})}return!0},isSameNode:function(e){return this===e},insertBefore:function(e,t){return Sw(this,e,t)},replaceChild:function(e,t){Sw(this,e,t,Mw),t&&this.removeChild(t)},removeChild:function(e){return fw(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return Dw(this.ownerDocument||this,this,e)},normalize:function(){cw(this,null,{enter:function(e){for(var t=e.firstChild;t;){var n=t.nextSibling;null!==n&&n.nodeType===Fy&&t.nodeType===Fy?(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 a in n)if(vy(n,a)&&n[a]===e)return a;t=t.nodeType==Wy?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&vy(n,e))return n[e];t=t.nodeType==Wy?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)},compareDocumentPosition:function(e){if(this===e)return 0;var t=e,n=this,a=null,r=null;if(t instanceof Iw&&(t=(a=t).ownerElement),n instanceof Iw&&(n=(r=n).ownerElement,a&&t&&n===t))for(var o,i=0;o=n.attributes[i];i++){if(o===a)return Jy.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+Jy.DOCUMENT_POSITION_PRECEDING;if(o===r)return Jy.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+Jy.DOCUMENT_POSITION_FOLLOWING}if(!t||!n||n.ownerDocument!==t.ownerDocument)return Jy.DOCUMENT_POSITION_DISCONNECTED+Jy.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+($y(n.ownerDocument)>$y(t.ownerDocument)?Jy.DOCUMENT_POSITION_FOLLOWING:Jy.DOCUMENT_POSITION_PRECEDING);if(r&&t===n)return Jy.DOCUMENT_POSITION_CONTAINS+Jy.DOCUMENT_POSITION_PRECEDING;if(a&&t===n)return Jy.DOCUMENT_POSITION_CONTAINED_BY+Jy.DOCUMENT_POSITION_FOLLOWING;for(var l=[],s=t.parentNode;s;){if(!r&&s===n)return Jy.DOCUMENT_POSITION_CONTAINED_BY+Jy.DOCUMENT_POSITION_FOLLOWING;l.push(s),s=s.parentNode}l.reverse();for(var d=[],c=n.parentNode;c;){if(!a&&c===t)return Jy.DOCUMENT_POSITION_CONTAINS+Jy.DOCUMENT_POSITION_PRECEDING;d.push(c),c=c.parentNode}d.reverse();var u=Qy(l,d);for(var p in u.childNodes){var h=u.childNodes[p];if(h===n)return Jy.DOCUMENT_POSITION_FOLLOWING;if(h===t)return Jy.DOCUMENT_POSITION_PRECEDING;if(d.indexOf(h)>=0)return Jy.DOCUMENT_POSITION_FOLLOWING;if(l.indexOf(h)>=0)return Jy.DOCUMENT_POSITION_PRECEDING}return 0}},Py(qy,lw),Py(qy,lw.prototype),Py(Jy,lw),Py(Jy,lw.prototype),cw.STOP=Symbol("walkDOM.STOP"),cw.ENTER=0,cw.EXIT=1,uw.prototype={implementation:null,nodeName:"#document",nodeType:Zy,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType===Xy){for(var n=e.firstChild;n;){var a=n.nextSibling;this.insertBefore(n,t),n=a}return e}return Sw(this,e,t),e.ownerDocument=this,null===this.documentElement&&e.nodeType===By&&(this.documentElement=e),e},removeChild:function(e){var t=fw(this,e);return t===this.documentElement&&(this.documentElement=null),t},replaceChild:function(e,t){Sw(this,e,t,Mw),e.ownerDocument=this,t&&this.removeChild(t),mw(e)&&(this.documentElement=e)},importNode:function(e,t){return function(e,t,n){var a;return cw(t,null,{enter:function(t,r){var o=t.cloneNode(!1);return o.ownerDocument=e,o.parentNode=null,null===r?a=o:r.appendChild(o),t.nodeType===Wy||n?o:null}}),a}(this,e,t)},getElementById:function(e){var t=null;return dw(this.documentElement,function(n){if(n.nodeType==By&&n.getAttribute("id")==e)return t=n,!0}),t},createElement:function(e){var t=new Aw(Ay);return t.ownerDocument=this,"html"===this.type&&(e=e.toLowerCase()),by(this.contentType)&&(t.namespaceURI=Sy.HTML),t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new _y,(t.attributes=new nw)._ownerElement=t,t},createDocumentFragment:function(){var e=new zw(Ay);return e.ownerDocument=this,e.childNodes=new _y,e},createTextNode:function(e){var t=new Tw(Ay);return t.ownerDocument=this,t.childNodes=new _y,t.appendData(e),t},createComment:function(e){var t=new kw(Ay);return t.ownerDocument=this,t.childNodes=new _y,t.appendData(e),t},createCDATASection:function(e){if(-1!==e.indexOf("]]>"))throw new Cy(Cy.INVALID_CHARACTER_ERR,'data contains "]]>"');var t=new Rw(Ay);return t.ownerDocument=this,t.childNodes=new _y,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new Pw(Ay);return n.ownerDocument=this,n.childNodes=new _y,n.nodeName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){if(!ky.QName_exact.test(e))throw new Cy(Cy.INVALID_CHARACTER_ERR,'invalid character in name "'+e+'"');return"html"===this.type&&(e=e.toLowerCase()),this._createAttribute(e)},_createAttribute:function(e){var t=new Iw(Ay);return t.ownerDocument=this,t.childNodes=new _y,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){if(!ky.Name.test(e))throw new Cy(Cy.INVALID_CHARACTER_ERR,'not a valid xml name "'+e+'"');if("html"===this.type)throw new Cy("document is an html document",Ty.NotSupportedError);var t=new Nw(Ay);return t.ownerDocument=this,t.childNodes=new _y,t.nodeName=e,t},createElementNS:function(e,t){var n=zy(e,t),a=new Aw(Ay),r=a.attributes=new nw;return a.childNodes=new _y,a.ownerDocument=this,a.nodeName=t,a.tagName=t,a.namespaceURI=n[0],a.prefix=n[1],a.localName=n[2],r._ownerElement=a,a},createAttributeNS:function(e,t){var n=zy(e,t),a=new Iw(Ay);return a.ownerDocument=this,a.childNodes=new _y,a.nodeName=t,a.name=t,a.specified=!0,a.namespaceURI=n[0],a.prefix=n[1],a.localName=n[2],a}},Oy(uw,lw),Aw.prototype={nodeType:By,attributes:null,getQualifiedName:function(){return this.prefix?this.prefix+":"+this.localName:this.localName},_isInHTMLDocumentAndNamespace:function(){return"html"===this.ownerDocument.type&&this.namespaceURI===Sy.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)).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 null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n?n.value:null},setAttributeNS:function(e,t,n){var a=zy(e,t)[2],r=this.getAttributeNodeNS(e,a);r?r.value=r.nodeValue=""+n:((r=this.ownerDocument.createAttributeNS(e,t)).value=r.nodeValue=""+n,this.setAttributeNode(r))},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByClassName:function(e){var t=Vy(e);return new ew(this,function(n){var a=[];return t.length>0&&dw(n,function(r){if(r!==n&&r.nodeType===By){var o=r.getAttribute("class");if(o){var i=e===o;if(!i){var l=Vy(o);i=t.every((s=l,function(e){return s&&-1!==s.indexOf(e)}))}i&&a.push(r)}}var s}),a})},getElementsByTagName:function(e){var t="html"===(this.nodeType===Zy?this:this.ownerDocument).type,n=e.toLowerCase();return new ew(this,function(a){var r=[];return dw(a,function(o){o!==a&&o.nodeType===By&&(("*"===e||o.getQualifiedName()===(t&&o.namespaceURI===Sy.HTML?n:e))&&r.push(o))}),r})},getElementsByTagNameNS:function(e,t){return new ew(this,function(n){var a=[];return dw(n,function(r){r===n||r.nodeType!==By||"*"!==e&&r.namespaceURI!==e||"*"!==t&&r.localName!=t||a.push(r)}),a})}},uw.prototype.getElementsByClassName=Aw.prototype.getElementsByClassName,uw.prototype.getElementsByTagName=Aw.prototype.getElementsByTagName,uw.prototype.getElementsByTagNameNS=Aw.prototype.getElementsByTagNameNS,Oy(Aw,lw),Iw.prototype.nodeType=Wy,Oy(Iw,lw),Cw.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){n=this.data.substring(0,e)+n+this.data.substring(e+t),this.nodeValue=this.data=n,this.length=n.length}},Oy(Cw,lw),Tw.prototype={nodeName:"#text",nodeType:Fy,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 a=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling),a}},Oy(Tw,Cw),kw.prototype={nodeName:"#comment",nodeType:jy},Oy(kw,Cw),Rw.prototype={nodeName:"#cdata-section",nodeType:Dy},Oy(Rw,Tw),Ew.prototype.nodeType=Ky,Oy(Ew,lw),Lw.prototype.nodeType=Yy,Oy(Lw,lw),Vw.prototype.nodeType=Uy,Oy(Vw,lw),Nw.prototype.nodeType=Hy,Oy(Nw,lw),zw.prototype.nodeName="#document-fragment",zw.prototype.nodeType=Xy,Oy(zw,lw),Pw.prototype.nodeType=Gy,Oy(Pw,Cw),Ow.prototype.serializeToString=function(e,t){return qw.call(e,t)},lw.prototype.toString=qw;try{Object.defineProperty&&(Object.defineProperty(ew.prototype,"length",{get:function(){return tw(this),this.$$length}}),Object.defineProperty(lw.prototype,"textContent",{get:function(){if(this.nodeType===By||this.nodeType===Xy){var e=[];return cw(this,null,{enter:function(t){return t.nodeType===By||t.nodeType===Xy||(t.nodeType===Gy||t.nodeType===jy?null:void e.push(t.nodeValue))}}),e.join("")}return this.nodeValue},set:function(e){switch(this.nodeType){case By:case Xy:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),Object.defineProperty(Aw.prototype,"children",{get:function(){return new ew(this,Uw)}}),Object.defineProperty(uw.prototype,"children",{get:function(){return new ew(this,Uw)}}),Object.defineProperty(zw.prototype,"children",{get:function(){return new ew(this,Uw)}}),Hw=function(e,t,n){e["$$"+t]=n})}catch(r$){}av._updateLiveList=tw,av.Attr=Iw,av.CDATASection=Rw,av.CharacterData=Cw,av.Comment=kw,av.Document=uw,av.DocumentFragment=zw,av.DocumentType=Ew,av.DOMImplementation=iw,av.Element=Aw,av.Entity=Vw,av.EntityReference=Nw,av.LiveNodeList=ew,av.NamedNodeMap=nw,av.Node=lw,av.NodeList=_y,av.Notation=Lw,av.Text=Tw,av.ProcessingInstruction=Pw,av.walkDOM=cw,av.XMLSerializer=Ow;var Gw,jw,Zw={},Kw={};Gw=Kw,jw=qb.freeze,Gw.XML_ENTITIES=jw({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),Gw.HTML_ENTITIES=jw({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:" ",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:" ",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:"\t",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:"‌"}),Gw.entityMap=Gw.HTML_ENTITIES;var Xw={},Yw=qb,Jw=rv,Qw=Kb,$w=Yw.isHTMLEscapableRawTextElement,_w=Yw.isHTMLMimeType,ex=Yw.isHTMLRawTextElement,tx=Yw.hasOwn,nx=Yw.NAMESPACE,ax=Qw.ParseError,rx=Qw.DOMException;function ox(){}ox.prototype={parse:function(e,t,n){var a=this.domBuilder;a.startDocument(),ux(t,t=Object.create(null)),function(e,t,n,a,r){var o=_w(a.mimeType);e.indexOf(Jw.UNICODE_REPLACEMENT_CHARACTER)>=0&&r.warning("Unicode replacement character detected, source encoding issues?");function i(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}function l(e){var t=";"===e[e.length-1]?e:e+";";if(!o&&t!==e)return r.error("EntityRef: expecting ;"),e;var a=Jw.Reference.exec(t);if(!a||a[0].length!==t.length)return r.error("entity not matching Reference production: "+e),e;var l=t.slice(1,-1);return tx(n,l)?n[l]:"#"===l.charAt(0)?i(parseInt(l.substring(1).replace("x","0x"))):(r.error("entity not found:"+e),e)}function s(t){if(t>m){var n=e.substring(m,t).replace(ix,l);p&&h(m),a.characters(n,0,t-m),m=t}}var d=0,c=0,u=/\r\n?|\n|$/g,p=a.locator;function h(t,n){for(;t>=c&&(n=u.exec(e));)d=c,c=n.index+n[0].length,p.lineNumber++;p.columnNumber=t-d+1}var f=[{currentNSMap:t}],g=[],m=0;for(;;){try{var b=e.indexOf("<",m);if(b<0){if(!o&&g.length>0)return r.fatalError("unclosed xml tag(s): "+g.join(", "));if(!e.substring(m).match(/^\s*$/)){var v=a.doc,y=v.createTextNode(e.substring(m));if(v.documentElement)return r.error("Extra content at the end of the document");v.appendChild(y),a.currentElement=y}return}if(b>m){var w=e.substring(m,b);o||0!==g.length||(w=w.replace(new RegExp(Jw.S_OPT.source,"g"),""))&&r.error("Unexpected content outside root element: '"+w+"'"),s(b)}switch(e.charAt(b+1)){case"/":var x=e.indexOf(">",b+2),M=e.substring(b+2,x>0?x:void 0);if(!M)return r.fatalError("end tag name missing");var S=x>0&&Jw.reg("^",Jw.QName_group,Jw.S_OPT,"$").exec(M);if(!S)return r.fatalError('end tag name contains invalid characters: "'+M+'"');if(!a.currentElement&&!a.doc.documentElement)return;var A=g[g.length-1]||a.currentElement.tagName||a.doc.documentElement.tagName||"";if(A!==S[1]){var I=S[1].toLowerCase();if(!o||A.toLowerCase()!==I)return r.fatalError('Opening and ending tag mismatch: "'+A+'" != "'+M+'"')}var C=f.pop();g.pop();var T=C.localNSMap;if(a.endElement(C.uri,C.localName,A),T)for(var k in T)tx(T,k)&&a.endPrefixMapping(k);x++;break;case"?":p&&h(b),x=fx(e,b,a,r);break;case"!":p&&h(b),x=hx(e,b,a,r,o);break;default:p&&h(b);var R=new gx,E=f[f.length-1].currentNSMap,L=(x=sx(e,b,R,E,l,r,o),R.length);if(R.closed||(o&&Yw.isHTMLVoidElement(R.tagName)?R.closed=!0:g.push(R.tagName)),p&&L){for(var V=lx(p,{}),N=0;N<L;N++){var z=R[N];h(z.offset),z.locator=lx(p,{})}a.locator=V,dx(R,a,E)&&f.push(R),a.locator=p}else dx(R,a,E)&&f.push(R);o&&!R.closed?x=cx(e,x,R.tagName,l,a):x++}}catch(r$){if(r$ instanceof ax)throw r$;if(r$ instanceof rx)throw new ax(r$.name+": "+r$.message,a.locator,r$);r.error("element parse error: "+r$),x=-1}x>m?m=x:s(Math.max(b,m)+1)}}(e,t,n,a,this.errorHandler),a.endDocument()}};var ix=/&#?\w+;?/g;function lx(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function sx(e,t,n,a,r,o,i){function l(e,t,a){return tx(n.attributeNames,e)?o.fatalError("Attribute "+e+" redefined"):!i&&t.indexOf("<")>=0?o.fatalError("Unescaped '<' not allowed in attributes values"):void n.addValue(e,t.replace(/[\t\n\r]/g," ").replace(ix,r),a)}for(var s,d=++t,c=0;;){var u=e.charAt(d);switch(u){case"=":if(1===c)s=e.slice(t,d),c=3;else{if(2!==c)throw new Error("attribute equal must after attrName");c=3}break;case"'":case'"':if(3===c||1===c){if(1===c&&(o.warning('attribute value must after "="'),s=e.slice(t,d)),t=d+1,!((d=e.indexOf(u,t))>0))throw new Error("attribute value no end '"+u+"' match");l(s,p=e.slice(t,d),t-1),c=5}else{if(4!=c)throw new Error('attribute value must after "="');l(s,p=e.slice(t,d),t),o.warning('attribute "'+s+'" missed start quot('+u+")!!"),t=d+1,c=5}break;case"/":switch(c){case 0:n.setTagName(e.slice(t,d));case 5:case 6:case 7:c=7,n.closed=!0;case 4:case 1:break;case 2:n.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return o.error("unexpected end of input"),0==c&&n.setTagName(e.slice(t,d)),d;case">":switch(c){case 0:n.setTagName(e.slice(t,d));case 5:case 6:case 7:break;case 4:case 1:"/"===(p=e.slice(t,d)).slice(-1)&&(n.closed=!0,p=p.slice(0,-1));case 2:2===c&&(p=s),4==c?(o.warning('attribute "'+p+'" missed quot(")!'),l(s,p,t)):(i||o.warning('attribute "'+p+'" missed value!! "'+p+'" instead!!'),l(p,p,t));break;case 3:if(!i)return o.fatalError("AttValue: ' or \" expected")}return d;case"€":u=" ";default:if(u<=" ")switch(c){case 0:n.setTagName(e.slice(t,d)),c=6;break;case 1:s=e.slice(t,d),c=2;break;case 4:var p=e.slice(t,d);o.warning('attribute "'+p+'" missed quot(")!!'),l(s,p,t);case 5:c=6}else switch(c){case 2:i||o.warning('attribute "'+s+'" missed value!! "'+s+'" instead2!!'),l(s,s,t),t=d,c=1;break;case 5:o.warning('attribute space is required"'+s+'"!!');case 6:c=1,t=d;break;case 3:c=4,t=d;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}d++}}function dx(e,t,n){for(var a=e.tagName,r=null,o=e.length;o--;){var i=e[o],l=i.qName,s=i.value;if((p=l.indexOf(":"))>0)var d=i.prefix=l.slice(0,p),c=l.slice(p+1),u="xmlns"===d&&c;else c=l,d=null,u="xmlns"===l&&"";i.localName=c,!1!==u&&(null==r&&(r=Object.create(null),ux(n,n=Object.create(null))),n[u]=r[u]=s,i.uri=nx.XMLNS,t.startPrefixMapping(u,s))}for(o=e.length;o--;)(i=e[o]).prefix&&("xml"===i.prefix&&(i.uri=nx.XML),"xmlns"!==i.prefix&&(i.uri=n[i.prefix]));var p;(p=a.indexOf(":"))>0?(d=e.prefix=a.slice(0,p),c=e.localName=a.slice(p+1)):(d=null,c=e.localName=a);var h=e.uri=n[d||""];if(t.startElement(h,c,a,e),!e.closed)return e.currentNSMap=n,e.localNSMap=r,!0;if(t.endElement(h,c,a),r)for(d in r)tx(r,d)&&t.endPrefixMapping(d)}function cx(e,t,n,a,r){var o=$w(n);if(o||ex(n)){var i=e.indexOf("</"+n+">",t),l=e.substring(t+1,i);return o&&(l=l.replace(ix,a)),r.characters(l,0,l.length),i}return t+1}function ux(e,t){for(var n in e)tx(e,n)&&(t[n]=e[n])}function px(e,t){var n=t;function a(t){return t=t||0,e.charAt(n+t)}function r(e){n+=e=e||1}function o(){return e.substring(n)}return{char:a,getIndex:function(){return n},getMatch:function(e){var t=Jw.reg("^",e).exec(o());return t?(r(t[0].length),t[0]):null},getSource:function(){return e},skip:r,skipBlanks:function(){for(var t=0;n<e.length;){var o=a();if(" "!==o&&"\n"!==o&&"\t"!==o&&"\r"!==o)return t;t++,r()}return-1},substringFromIndex:o,substringStartsWith:function(t){return e.substring(n,n+t.length)===t},substringStartsWithCaseInsensitive:function(t){return e.substring(n,n+t.length).toUpperCase()===t.toUpperCase()}}}function hx(e,t,n,a,r){var o=px(e,t);switch(r?o.char(2).toUpperCase():o.char(2)){case"-":var i=o.getMatch(Jw.Comment);return i?(n.comment(i,Jw.COMMENT_START.length,i.length-Jw.COMMENT_START.length-Jw.COMMENT_END.length),o.getIndex()):a.fatalError("comment is not well-formed at position "+o.getIndex());case"[":var l=o.getMatch(Jw.CDSect);return l?r||n.currentElement?(n.startCDATA(),n.characters(l,Jw.CDATA_START.length,l.length-Jw.CDATA_START.length-Jw.CDATA_END.length),n.endCDATA(),o.getIndex()):a.fatalError("CDATA outside of element"):a.fatalError("Invalid CDATA starting at position "+t);case"D":if(n.doc&&n.doc.documentElement)return a.fatalError("Doctype not allowed inside or after documentElement at position "+o.getIndex());if(r?!o.substringStartsWithCaseInsensitive(Jw.DOCTYPE_DECL_START):!o.substringStartsWith(Jw.DOCTYPE_DECL_START))return a.fatalError("Expected "+Jw.DOCTYPE_DECL_START+" at position "+o.getIndex());if(o.skip(Jw.DOCTYPE_DECL_START.length),o.skipBlanks()<1)return a.fatalError("Expected whitespace after "+Jw.DOCTYPE_DECL_START+" at position "+o.getIndex());var s={name:void 0,publicId:void 0,systemId:void 0,internalSubset:void 0};if(s.name=o.getMatch(Jw.Name),!s.name)return a.fatalError("doctype name missing or contains unexpected characters at position "+o.getIndex());if(r&&"html"!==s.name.toLowerCase()&&a.warning("Unexpected DOCTYPE in HTML document at position "+o.getIndex()),o.skipBlanks(),o.substringStartsWith(Jw.PUBLIC)||o.substringStartsWith(Jw.SYSTEM)){var d=Jw.ExternalID_match.exec(o.substringFromIndex());if(!d)return a.fatalError("doctype external id is not well-formed at position "+o.getIndex());void 0!==d.groups.SystemLiteralOnly?s.systemId=d.groups.SystemLiteralOnly:(s.systemId=d.groups.SystemLiteral,s.publicId=d.groups.PubidLiteral),o.skip(d[0].length)}else if(r&&o.substringStartsWithCaseInsensitive(Jw.SYSTEM)){if(o.skip(Jw.SYSTEM.length),o.skipBlanks()<1)return a.fatalError("Expected whitespace after "+Jw.SYSTEM+" at position "+o.getIndex());if(s.systemId=o.getMatch(Jw.ABOUT_LEGACY_COMPAT_SystemLiteral),!s.systemId)return a.fatalError("Expected "+Jw.ABOUT_LEGACY_COMPAT+" in single or double quotes after "+Jw.SYSTEM+" at position "+o.getIndex())}return r&&s.systemId&&!Jw.ABOUT_LEGACY_COMPAT_SystemLiteral.test(s.systemId)&&a.warning("Unexpected doctype.systemId in HTML document at position "+o.getIndex()),r||(o.skipBlanks(),s.internalSubset=function(e,t){function n(e,t){var n=Jw.PI.exec(e.substringFromIndex());return n?"xml"===n[1].toLowerCase()?t.fatalError("xml declaration is only allowed at the start of the document, but found at position "+e.getIndex()):(e.skip(n[0].length),n[0]):t.fatalError("processing instruction is not well-formed at position "+e.getIndex())}var a=e.getSource();if("["===e.char()){e.skip(1);for(var r=e.getIndex();e.getIndex()<a.length;){if(e.skipBlanks(),"]"===e.char()){var o=a.substring(r,e.getIndex());return e.skip(1),o}var i=null;if("<"===e.char()&&"!"===e.char(1))switch(e.char(2)){case"E":"L"===e.char(3)?i=e.getMatch(Jw.elementdecl):"N"===e.char(3)&&(i=e.getMatch(Jw.EntityDecl));break;case"A":i=e.getMatch(Jw.AttlistDecl);break;case"N":i=e.getMatch(Jw.NotationDecl);break;case"-":i=e.getMatch(Jw.Comment)}else if("<"===e.char()&&"?"===e.char(1))i=n(e,t);else{if("%"!==e.char())return t.fatalError("Error detected in Markup declaration");i=e.getMatch(Jw.PEReference)}if(!i)return t.fatalError("Error in internal subset at position "+e.getIndex())}return t.fatalError("doctype internal subset is not well-formed, missing ]")}}(o,a)),o.skipBlanks(),">"!==o.char()?a.fatalError("doctype not terminated with > at position "+o.getIndex()):(o.skip(1),n.startDTD(s.name,s.publicId,s.systemId,s.internalSubset),n.endDTD(),o.getIndex());default:return a.fatalError('Not well-formed XML starting with "<!" at position '+t)}}function fx(e,t,n,a){var r=e.substring(t).match(Jw.PI);if(!r)return a.fatalError("Invalid processing instruction starting at position "+t);if("xml"===r[1].toLowerCase()){if(t>0)return a.fatalError("processing instruction at position "+t+" is an xml declaration which is only at the start of the document");if(!Jw.XMLDecl.test(e.substring(t)))return a.fatalError("xml declaration is not well-formed")}return n.processingInstruction(r[1],r[2]),t+r[0].length}function gx(){this.attributeNames=Object.create(null)}gx.prototype={setTagName:function(e){if(!Jw.QName_exact.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,n){if(!Jw.QName_exact.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:n}},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}},Xw.XMLReader=ox,Xw.parseUtils=px,Xw.parseDoctypeCommentOrCData=hx;var mx=qb,bx=Kb,vx=Kw,yx=Xw,wx=av.DOMImplementation,xx=mx.hasDefaultHTMLNamespace,Mx=mx.isHTMLMimeType,Sx=mx.isValidMimeType,Ax=mx.MIME_TYPE,Ix=mx.NAMESPACE,Cx=bx.ParseError,Tx=yx.XMLReader;function kx(e){return e.replace(/\r[\n\u0085]/g,"\n").replace(/[\r\u0085\u2028\u2029]/g,"\n")}function Rx(e){if(void 0===(e=e||{}).locator&&(e.locator=!0),this.assign=e.assign||mx.assign,this.domHandler=e.domHandler||Ex,this.onError=e.onError||e.errorHandler,e.errorHandler&&"function"!=typeof e.errorHandler)throw new 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||kx,this.locator=!!e.locator,this.xmlns=this.assign(Object.create(null),e.xmlns)}function Ex(e){var t=e||{};this.mimeType=t.mimeType||Ax.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 Lx(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function Vx(e,t,n){return"string"==typeof e?e.substr(t,n):e.length>=t+n||t?new java.lang.String(e,t,n)+"":e}function Nx(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}Rx.prototype.parseFromString=function(e,t){if(!Sx(t))throw new TypeError('DOMParser.parseFromString: the provided mimeType "'+t+'" is not valid.');var n=this.assign(Object.create(null),this.xmlns),a=vx.XML_ENTITIES,r=n[""]||null;xx(t)?(a=vx.HTML_ENTITIES,r=Ix.HTML):t===Ax.XML_SVG_IMAGE&&(r=Ix.SVG),n[""]=r,n.xml=n.xml||Ix.XML;var o=new this.domHandler({mimeType:t,defaultNamespace:r,onError:this.onError}),i=this.locator?{}:void 0;this.locator&&o.setDocumentLocator(i);var l=new Tx;return l.errorHandler=o,l.domBuilder=o,!mx.isHTMLMimeType(t)&&"string"!=typeof e&&l.errorHandler.fatalError("source is not a string"),l.parse(this.normalizeLineEndings(String(e)),n,a),o.doc.documentElement||l.errorHandler.fatalError("missing root element"),o.doc},Ex.prototype={startDocument:function(){var e=new wx;this.doc=Mx(this.mimeType)?e.createHTMLDocument(!1):e.createDocument(this.defaultNamespace,"")},startElement:function(e,t,n,a){var r=this.doc,o=r.createElementNS(e,n||t),i=a.length;Nx(this,o),this.currentElement=o,this.locator&&Lx(this.locator,o);for(var l=0;l<i;l++){e=a.getURI(l);var s=a.getValue(l),d=(n=a.getQName(l),r.createAttributeNS(e,n));this.locator&&Lx(a.getLocator(l),d),d.value=d.nodeValue=s,o.setAttributeNode(d)}},endElement:function(e,t,n){this.currentElement=this.currentElement.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var n=this.doc.createProcessingInstruction(e,t);this.locator&&Lx(this.locator,n),Nx(this,n)},ignorableWhitespace:function(e,t,n){},characters:function(e,t,n){if(e=Vx.apply(this,arguments)){if(this.cdata)var a=this.doc.createCDATASection(e);else a=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(a):/^\s*$/.test(e)&&this.doc.appendChild(a),this.locator&&Lx(this.locator,a)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){e&&(e.lineNumber=0),this.locator=e},comment:function(e,t,n){e=Vx.apply(this,arguments);var a=this.doc.createComment(e);this.locator&&Lx(this.locator,a),Nx(this,a)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,n,a){var r=this.doc.implementation;if(r&&r.createDocumentType){var o=r.createDocumentType(e,t,n,a);this.locator&&Lx(this.locator,o),Nx(this,o),this.doc.doctype=o}},reportError:function(e,t){if("function"==typeof this.onError)try{this.onError(e,t,this)}catch(r$){throw new Cx("Reporting "+e+' "'+t+'" caused '+r$,this.locator)}else console.error("[xmldom "+e+"]\t"+t,function(e){if(e)return"\n@#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}(this.locator))},warning:function(e){this.reportError("warning",e)},error:function(e){this.reportError("error",e)},fatalError:function(e){throw this.reportError("fatalError",e),new Cx(e,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(e){Ex.prototype[e]=function(){return null}}),Zw.__DOMHandler=Ex,Zw.DOMParser=Rx,Zw.normalizeLineEndings=kx,Zw.onErrorStopParsing=function(e){if("error"===e)throw"onErrorStopParsing"},Zw.onWarningStopParsing=function(){throw"onWarningStopParsing"};var zx=qb;zx.assign,zx.hasDefaultHTMLNamespace,zx.isHTMLMimeType,zx.isValidMimeType,zx.MIME_TYPE,zx.NAMESPACE;var Px=av.XMLSerializer,Ox=Zw.DOMParser;const qx="http://schemas.openxmlformats.org/markup-compatibility/2006",Bx={supportedNamespaces:new Set};function Wx(e,...t){return{supportedNamespaces:new Set([...e.supportedNamespaces,...t])}}function Fx(e){const t=[];for(let n=0;n<e.childNodes.length;n+=1){const a=e.childNodes[n];(null==a?void 0:a.nodeType)===a.ELEMENT_NODE&&t.push(a)}return t}function Dx(e){const t=e.parentNode;return 1===(null==t?void 0:t.nodeType)?t:null}function Hx(e,t){let n=e;const a=t?`xmlns:${t}`:"xmlns";for(;n;){const e=n.getAttribute(a);if(e)return e;n=Dx(n)}}function Ux(e,t){return e.getAttributeNS(qx,t)??e.getAttribute(`mc:${t}`)??void 0}function Gx(e,t){const n=[];let a=e;for(;a;)n.push(a),a=Dx(a);const r=[];for(const o of n.reverse()){const e=Ux(o,t);if(e)for(const t of e.split(/\s+/).filter(Boolean))r.push({element:o,token:t})}return r}function jx(e,t){const n=t.indexOf(":");if(n<1||n===t.length-1)return;const a=t.slice(0,n),r=t.slice(n+1),o=Hx(e,a);return o?`${o}\0${r}`:void 0}function Zx(e,t){var n;const a=null==(n=e.getAttribute("Requires"))?void 0:n.trim();return!!a&&a.split(/\s+/).every(n=>{const a=Hx(e,n);return Boolean(a&&t.supportedNamespaces.has(a))})}function Kx(e,t){let n;for(const a of Fx(e))if(a.namespaceURI===qx){if("Choice"===a.localName&&Zx(a,t))return a;"Fallback"===a.localName&&(n=a)}return n}function Xx(e,t=Bx){const n=[],a=function(e){const t=new Set;for(const n of Gx(e,"Ignorable")){const e=Hx(n.element,n.token);e&&t.add(e)}return t}(e),r=function(e){const t=new Set;for(const n of Gx(e,"ProcessContent")){const e=jx(n.element,n.token);e&&t.add(e)}return t}(e);for(const o of Fx(e)){if(o.namespaceURI===qx&&"AlternateContent"===o.localName){const e=Kx(o,t);e&&n.push(...Xx(e,t));continue}const e=o.namespaceURI??"";if(a.has(e)&&!t.supportedNamespaces.has(e)){const a=`${e}\0${o.localName??o.tagName}`;r.has(a)&&n.push(...Xx(o,t));continue}n.push(o)}return n}const Yx="http://schemas.openxmlformats.org/wordprocessingml/2006/main",Jx="http://schemas.openxmlformats.org/drawingml/2006/main",Qx="http://schemas.microsoft.com/office/word/2010/wordml",$x="http://schemas.microsoft.com/office/word/2012/wordml",_x=Wx(Bx,Qx),eM=Wx(Bx,$x);function tM(e,t,n){return e?Xx(e).filter(e=>e.namespaceURI===t&&e.localName===n):[]}const nM=["lrTb","tbRl","btLr","lrTbV","tbRlV"];function aM(e){return nM.includes(e)?e:void 0}function rM(e,t,n){return tM(e,t,n)[0]??null}function oM(e,t){return e?Xx(e,_x).find(e=>e.namespaceURI===Qx&&e.localName===t)??null:null}function iM(e,t){return e?Xx(e,eM).find(e=>e.namespaceURI===$x&&e.localName===t)??null:null}function lM(e,t){return e?e.getAttributeNS(Yx,t)??e.getAttributeNS(Qx,t)??e.getAttributeNS($x,t)??e.getAttribute(`w:${t}`)??e.getAttribute(`w14:${t}`)??e.getAttribute(`w15:${t}`)??e.getAttribute(t):null}function sM(e,t){for(let n=0;n<e.childNodes.length;n+=1){const a=e.childNodes[n];if(1===(null==a?void 0:a.nodeType)){const e=a;if(e.localName===t)return e;const n=sM(e,t);if(n)return n}}return null}function dM(e){const t={},n=e.attributes;for(let a=0;a<n.length;a+=1){const e=n[a];if(!e)continue;const r=e.namespaceURI;if(!r||r===Yx||r===qx)continue;if("xmlns"===e.prefix||"xmlns"===e.localName)continue;const o=e.localName??e.name;if(!o)continue;t[e.prefix?`${e.prefix}:${o}`:o]=e.value}return Object.keys(t).length>0?t:void 0}function cM(e){return"1"===e||"true"===e||"on"===e}function uM(e,t){const n=rM(e,Yx,t);if(!n)return;const a=lM(n,"val");return null==a||"0"!==a&&"false"!==a&&"off"!==a&&cM(a)}function pM(e,t){return lM(rM(e,Yx,t),"val")??void 0}async function hM(e,t){t>0&&t%e===0&&await new Promise(e=>setTimeout(e,0))}const fM={png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",bmp:"image/bmp",tif:"image/tiff",tiff:"image/tiff",svg:"image/svg+xml",emf:"image/x-emf",wmf:"image/x-wmf"},gM={"image/png":"png","image/jpeg":"jpg","image/gif":"gif","image/bmp":"bmp","image/tiff":"tif","image/svg+xml":"svg","image/x-emf":"emf","image/x-wmf":"wmf"};function mM(e){return gM[e.toLowerCase()]??null}async function bM(e,t,n){let a=n;a.startsWith("/")&&(a=a.slice(1)),a.startsWith("word/")||(a="word/"+n);const r=e.file(a),o=function(e){var t;const n=null==(t=e.split(".").pop())?void 0:t.toLowerCase();return n?fM[n]??null:null}(n)??"image/png",i=await(null==r?void 0:r.async("base64"));if(i)return function(e,t,n){const a=e.byPath.get(t);if(a)return`${Ot}${a}`;const r=`img-${e.nextId}`;return e.nextId+=1,e.assets[r]={id:r,url:n},e.byPath.set(t,r),`${Ot}${r}`}(t,a,`data:${o};base64,${i}`)}function vM(e){var t;const n=new Map;if(!e)return n;const a=null==(t=(new Ox).parseFromString(e,"application/xml").documentElement)?void 0:t.childNodes;if(!a)return n;for(let r=0;r<a.length;r+=1){const e=a[r];if(1===(null==e?void 0:e.nodeType)){const t=e;if("Relationship"===t.localName){const e=t.getAttribute("Id"),a=t.getAttribute("Target");e&&a&&n.set(e,a)}}}return n}async function yM(e,t){var n;const a=t.lastIndexOf("/"),r=a>=0?t.slice(0,a):"",o=a>=0?t.slice(a+1):t,i=r?`${r}/_rels/${o}.rels`:`_rels/${o}.rels`;return vM(await(null==(n=e.file(i))?void 0:n.async("string")))}const wM=e=>{var t;const n=rM(e,Jx,"latin");return(null==(t=null==n?void 0:n.getAttribute("typeface"))?void 0:t.trim())||void 0},xM=e=>{var t;const n=rM(e,Jx,"cs");return(null==(t=null==n?void 0:n.getAttribute("typeface"))?void 0:t.trim())||wM(e)},MM=e=>{var t;const n=rM(e,Jx,"ea");return(null==(t=null==n?void 0:n.getAttribute("typeface"))?void 0:t.trim())||wM(e)};function SM(e,t){const n=e?Number(e):Number.NaN;return Number.isFinite(n)?Math.round(n/gt*dt):t}function AM(e){const t=e?Number(e):Number.NaN;if(Number.isFinite(t))return Ac(t/20,4)}function IM(e){const t=null==e?void 0:e.trim();if(t&&"auto"!==t&&"none"!==t)return t.startsWith("#")?t:`#${t.toUpperCase()}`}const CM=["dk1","lt1","dk2","lt2","accent1","accent2","accent3","accent4","accent5","accent6","hlink","folHlink"];function TM(e){const t=rM(e,Jx,"srgbClr");if(t)return IM(lM(t,"val"));const n=rM(e,Jx,"sysClr");return n?IM(lM(n,"lastClr")):void 0}function kM(e){if(!e)return;const t=Number.parseInt(e,16);return Number.isFinite(t)?t/255:void 0}function RM(e,t,n){const a=e=>{return(t=e,Math.min(255,Math.max(0,Math.round(t)))).toString(16).padStart(2,"0").toUpperCase();var t};return`#${a(e)}${a(t)}${a(n)}`}function EM(e,t){const n=lM(e,"themeColor");if(!n)return;const a=function(e){switch(e){case"dark1":case"text1":return"dk1";case"light1":case"background1":return"lt1";case"dark2":case"text2":return"dk2";case"light2":case"background2":return"lt2";case"accent1":case"accent2":case"accent3":case"accent4":case"accent5":case"accent6":return e;case"hyperlink":return"hlink";case"followedHyperlink":return"folHlink";default:return}}(n),r=a?t[a]:void 0;if(!r)return;let o=Number.parseInt(r.slice(1,3),16),i=Number.parseInt(r.slice(3,5),16),l=Number.parseInt(r.slice(5,7),16);const s=kM(lM(e,"themeShade"));void 0!==s&&(o*=s,i*=s,l*=s);const d=kM(lM(e,"themeTint"));if(void 0!==d){const e=255*(1-d);o=o*d+e,i=i*d+e,l=l*d+e}return RM(o,i,l)}function LM(e){if(!e)return{fonts:{},colors:{}};const t=(new Ox).parseFromString(e,"application/xml").documentElement,n=t?tM(t,Jx,"themeElements")[0]??null:null,a=function(e){const t=rM(e,Jx,"fontScheme"),n=rM(t,Jx,"majorFont"),a=rM(t,Jx,"minorFont");return{majorHAnsi:wM(n),minorHAnsi:wM(a),majorEastAsia:MM(n),minorEastAsia:MM(a),majorBidi:xM(n),minorBidi:xM(a)}}(n),r=function(e){const t=rM(e,Jx,"clrScheme");if(!t)return{};const n={};for(const a of CM){const e=TM(rM(t,Jx,a));e&&(n[a]=e)}return n}(n),o=n?tM(n,Jx,"fmtScheme")[0]:void 0;return{fonts:a,colors:r,data:{name:(null==t?void 0:t.getAttribute("name"))||void 0,colors:{...r},fonts:{major:Object.fromEntries(Object.entries(a).filter(([e])=>e.startsWith("major"))),minor:Object.fromEntries(Object.entries(a).filter(([e])=>e.startsWith("minor")))},effectsXml:o?Array.from(o.childNodes).map(e=>(new Px).serializeToString(e)).join(""):void 0,sourceXml:e}}}const VM={decimal:"decimal",lowerRoman:"lowerRoman",upperRoman:"upperRoman",lowerLetter:"lowerLetter",upperLetter:"upperLetter",symbol:"symbol"},NM={continuous:"continuous",eachSect:"eachSection"};function zM(e){if(!e)return;const t={},n=lM(rM(e,Yx,"numFmt"),"val");n&&VM[n]&&(t.numberFormat=VM[n]);const a=Number.parseInt(lM(rM(e,Yx,"numStart"),"val")??"",10);Number.isFinite(a)&&a>0&&(t.startAt=a);const r=lM(rM(e,Yx,"numRestart"),"val");return r&&NM[r]&&(t.restart=NM[r]),Object.keys(t).length>0?t:void 0}function PM(e){return e.ooxmlNumbering}function OM(e){const t=PM(e);if((null==t?void 0:t.format)&&t.importedKind===e.kind&&t.importedFormat===e.format)return t.format}const qM={decimal:"decimal",lowerLetter:"lowerLetter",upperLetter:"upperLetter",lowerRoman:"lowerRoman",upperRoman:"upperRoman",bullet:"bullet"};function BM(e){const t=lM(e,"val");if(null==t)return;const n=Number.parseInt(t,10);return Number.isFinite(n)?n:void 0}function WM(e,t){if(!e||!/^\d+$/.test(e))return;const n=Number.parseInt(e,10);return Number.isSafeInteger(n)&&n>=t?n:void 0}function FM(e){const t={},n=lM(rM(e,Yx,"numFmt"),"val");n&&(t.kind="bullet"===n?"bullet":"ordered",t.format=qM[n],t.rawFormat=n);const a=lM(rM(e,Yx,"suff"),"val");"tab"!==a&&"space"!==a&&"nothing"!==a||(t.suffix=a);const r=BM(rM(e,Yx,"start"));void 0!==r&&(t.startAt=r),t.levelText=lM(rM(e,Yx,"lvlText"),"val")??void 0;const o=lM(rM(e,Yx,"lvlJc"),"val");"left"!==o&&"center"!==o&&"right"!==o||(t.alignment=o);const i=rM(e,Yx,"isLgl");var l;i&&(t.legal=null==(l=lM(i,"val"))||"1"===l||"true"===l||"on"===l);const s=BM(rM(e,Yx,"lvlRestart"));void 0!==s&&(t.restartAfterLevel=s),t.paragraphStyleId=lM(rM(e,Yx,"pStyle"),"val")??void 0,"bullet"===t.kind&&t.levelText&&(t.bulletGlyph=t.levelText);const d=rM(e,Yx,"rPr"),c=rM(d,Yx,"rFonts");t.bulletFont=lM(c,"ascii")??lM(c,"hAnsi")??void 0;const u=rM(e,Yx,"pPr"),p=rM(u,Yx,"ind");if(p){const e=lM(p,"left")??lM(p,"start"),n=lM(p,"hanging"),a=null!=e?SM(e,0):void 0,r=null!=n?SM(n,0):void 0;void 0===a&&void 0===r||(t.indent={left:a,hanging:r})}return t}function DM(e,t,n){const a=e.numToAbstractId.get(t),r=a?e.abstractLevels.get(`${a}:${n}`):void 0;return e.numOverrideLevels.get(`${t}:${n}`)??r??{}}function HM(e){if(!e)return;const t=lM(e,"val");if("nil"===t||"none"===t)return{width:0,type:"none",color:"transparent"};const n=Number(lM(e,"sz")),a=Number.isFinite(n)&&n>0?Ac(n/8,4):.75,r=IM(lM(e,"color"))??"#000000",o=(null==t?void 0:t.toLowerCase())??"single";return{width:a,type:o.includes("dotted")||o.includes("dot")?"dotted":o.includes("dash")?"dashed":"solid",color:r}}function UM(e){return e?{borderTop:HM(rM(e,Yx,"top")),borderRight:HM(rM(e,Yx,"right")),borderBottom:HM(rM(e,Yx,"bottom")),borderLeft:HM(rM(e,Yx,"left")),borderStart:HM(rM(e,Yx,"start")),borderEnd:HM(rM(e,Yx,"end")),borderTopLeftToBottomRight:HM(rM(e,Yx,"tl2br")),borderTopRightToBottomLeft:HM(rM(e,Yx,"tr2bl")),borderBetween:HM(rM(e,Yx,"between")),borderBar:HM(rM(e,Yx,"bar"))}:{}}function GM(e){const t=Object.entries(e).filter(([,e])=>void 0!==e);return t.length>0?Object.fromEntries(t):void 0}function jM(e){return Object.keys(e).length>0?e:void 0}function ZM(e,t){return jM({...e??{},...t??{}})}function KM(e,t){const n=IM(lM(e,"fill"));return n||(t?EM(e,t):void 0)}function XM(e){const t=rM(e,Qx,"solidFill");if(t){const e=function(e){const t=rM(e,Qx,"srgbClr");if(!t)return null;const n=lM(t,"val");return n?IM(n)??null:null}(t);if(e)return{type:"solid",color:e}}const n=rM(e,Qx,"gradFill");if(n){const e=rM(n,Qx,"gsLst");if(e){const t=[];for(let n=0;n<e.childNodes.length;n++){const a=e.childNodes[n];if((null==a?void 0:a.nodeType)!==a.ELEMENT_NODE)continue;const r=a;if(r.namespaceURI!==Qx||"gs"!==r.localName)continue;const o=lM(r,"pos"),i=null!==o?Number(o)/mt:NaN;if(!Number.isFinite(i))continue;const l=rM(r,Qx,"srgbClr");if(!l)continue;const s=lM(l,"val");if(!s)continue;const d=IM(s);if(!d)continue;const c=rM(l,Qx,"alpha"),u=c?lM(c,"val"):null,p=null!==u?Number(u)/mt:void 0,h={position:i,color:d};void 0!==p&&Number.isFinite(p)&&(h.alpha=p),t.push(h)}if(t.length>0){const e=rM(n,Qx,"lin"),a=e?lM(e,"ang"):null,r=null!==a?Number(a)/bt:void 0,o={type:"gradient",stops:t};return void 0!==r&&Number.isFinite(r)&&(o.angle=r),o}}}return null}function YM(e){const t=rM(e,Qx,"srgbClr");if(!t)return null;const n=lM(t,"val"),a=n?IM(n)??null:null;if(!a)return null;const r=rM(t,Qx,"alpha"),o=r?lM(r,"val"):null,i=null!==o&&Number.isFinite(Number(o))?Number(o)/mt:void 0;return{color:a,...void 0!==i?{alpha:i}:{}}}function JM(e,t){if(!e)return;const n=ln(e,t,Mt),a=ln(void 0,t,Mt),r=(e,t)=>e!==t?e:void 0,o=(e,t,n)=>void 0!==e?e:r(t,n);return GM({styleId:e.styleId,bold:o(e.bold,n.bold,a.bold),italic:o(e.italic,n.italic,a.italic),underline:r(n.underline,a.underline),underlineStyle:r(n.underlineStyle,a.underlineStyle),underlineColor:r(n.underlineColor,a.underlineColor),strike:o(e.strike,n.strike,a.strike),doubleStrike:o(e.doubleStrike,n.doubleStrike,a.doubleStrike),superscript:r(n.superscript,a.superscript),subscript:r(n.subscript,a.subscript),smallCaps:o(e.smallCaps,n.smallCaps,a.smallCaps),allCaps:o(e.allCaps,n.allCaps,a.allCaps),hidden:o(e.hidden,n.hidden,a.hidden),noProof:o(e.noProof,n.noProof,a.noProof),webHidden:o(e.webHidden,n.webHidden,a.webHidden),specVanish:o(e.specVanish,n.specVanish,a.specVanish),rtl:o(e.rtl,n.rtl,a.rtl),complexScript:o(e.complexScript,n.complexScript,a.complexScript),snapToGrid:o(e.snapToGrid,n.snapToGrid,a.snapToGrid),outline:o(e.outline,n.outline,a.outline),shadow:o(e.shadow,n.shadow,a.shadow),emboss:o(e.emboss,n.emboss,a.emboss),imprint:o(e.imprint,n.imprint,a.imprint),fitText:r(n.fitText,a.fitText),emphasisMark:r(n.emphasisMark,a.emphasisMark),textBorder:r(n.textBorder,a.textBorder),textEffect:r(n.textEffect,a.textEffect),characterScale:r(n.characterScale,a.characterScale),characterSpacing:r(n.characterSpacing,a.characterSpacing),baselineShift:r(n.baselineShift,a.baselineShift),kerningThreshold:r(n.kerningThreshold,a.kerningThreshold),ligatures:r(n.ligatures,a.ligatures),numberSpacing:r(n.numberSpacing,a.numberSpacing),numberForm:r(n.numberForm,a.numberForm),stylisticSet:r(n.stylisticSet,a.stylisticSet),contextualAlternates:r(n.contextualAlternates,a.contextualAlternates),fontFamily:o(e.fontFamily,n.fontFamily,a.fontFamily),fontSize:o(e.fontSize,n.fontSize,a.fontSize),color:r(n.color,a.color),textFill:r(n.textFill,a.textFill),textOutline:r(n.textOutline,a.textOutline),textShadow:r(n.textShadow,a.textShadow),glow:r(n.glow,a.glow),reflection:r(n.reflection,a.reflection),scene3dXml:r(n.scene3dXml,a.scene3dXml),props3dXml:r(n.props3dXml,a.props3dXml),highlight:r(n.highlight,a.highlight),shading:r(n.shading,a.shading),language:r(n.language,a.language),link:r(n.link,a.link)})}function QM(e,t){if(!e)return;const n={},a=pM(e,"rStyle");a&&(n.styleId=a);const r=uM(e,"b"),o=uM(e,"bCs");void 0===r&&void 0===o||(n.bold=!0===r||!0===o);const i=uM(e,"i"),l=uM(e,"iCs");void 0===i&&void 0===l||(n.italic=!0===i||!0===l);const s=uM(e,"strike");void 0!==s&&(n.strike=s);const d=uM(e,"dstrike");void 0!==d&&(n.doubleStrike=d);const c=uM(e,"smallCaps");void 0!==c&&(n.smallCaps=c);const u=uM(e,"caps");void 0!==u&&(n.allCaps=u);const p=uM(e,"vanish");void 0!==p&&(n.hidden=p);const h=uM(e,"noProof");void 0!==h&&(n.noProof=h);const f=uM(e,"webHidden");void 0!==f&&(n.webHidden=f);const g=uM(e,"specVanish");void 0!==g&&(n.specVanish=g);const m=uM(e,"rtl");void 0!==m&&(n.rtl=m);const b=uM(e,"cs");void 0!==b&&(n.complexScript=b);const v=uM(e,"snapToGrid");void 0!==v&&(n.snapToGrid=v);const y=uM(e,"outline");void 0!==y&&(n.outline=y);const w=uM(e,"shadow");void 0!==w&&(n.shadow=w);const x=uM(e,"emboss");void 0!==x&&(n.emboss=x);const M=uM(e,"imprint");void 0!==M&&(n.imprint=M);const S=lM(rM(e,Yx,"em"),"val");"dot"!==S&&"comma"!==S&&"circle"!==S&&"underDot"!==S&&"none"!==S||(n.emphasisMark=S);const A=lM(rM(e,Yx,"fitText"),"val");if(A){const e=AM(A);void 0!==e&&e>0&&(n.fitText=e)}const I=HM(rM(e,Yx,"bdr"));I&&(n.textBorder=I);const C=lM(rM(e,Yx,"effect"),"val");C&&(n.textEffect=C);const T=lM(rM(e,Yx,"w"),"val");if(T){const e=Number(T);Number.isFinite(e)&&e>0&&(n.characterScale=e)}const k=lM(rM(e,Yx,"spacing"),"val");if(k){const e=AM(k);void 0!==e&&(n.characterSpacing=e)}const R=lM(rM(e,Yx,"position"),"val");if(R){const e=Number(R);Number.isFinite(e)&&(n.baselineShift=e/2)}const E=lM(rM(e,Yx,"kern"),"val");if(E){const e=Number(E);Number.isFinite(e)&&e>=0&&(n.kerningThreshold=e/2)}const L=lM(rM(e,Qx,"ligatures"),"val");"none"!==L&&"standard"!==L&&"contextual"!==L&&"historical"!==L&&"standardContextual"!==L||(n.ligatures=L);const V=lM(rM(e,Qx,"numSpacing"),"val");"proportional"!==V&&"tabular"!==V||(n.numberSpacing=V);const N=lM(rM(e,Qx,"numForm"),"val");"lining"!==N&&"oldStyle"!==N||(n.numberForm=N);const z=lM(rM(e,Qx,"stylisticSets"),"val");if(z){const e=/^[0-9a-fA-F]+$/.test(z)&&z.length>2?Number.parseInt(z,16):Number(z);if(Number.isFinite(e)&&e>0)for(let t=1;t<=20;t+=1)if(e&1<<t-1){n.stylisticSet=t;break}}const P=lM(rM(e,Qx,"cntxtAlts"),"val");null===P?rM(e,Qx,"cntxtAlts")&&(n.contextualAlternates=!0):cM(P)&&(n.contextualAlternates=!0);const O=rM(e,Yx,"u"),q=lM(O,"val");if(O&&"none"!==q){n.underline=!0,q&&"single"!==q&&(n.underlineStyle=q);const e=lM(O,"color");e&&"auto"!==e&&(n.underlineColor=IM(e))}const B=lM(rM(e,Yx,"vertAlign"),"val");"superscript"===B&&(n.superscript=!0),"subscript"===B&&(n.subscript=!0);const W=rM(e,Yx,"rFonts"),F=lM(W,"ascii")??lM(W,"hAnsi")??lM(W,"cs")??lM(W,"eastAsia")??function(e,t){const n=lM(e,"asciiTheme")??lM(e,"hAnsiTheme")??lM(e,"eastAsiaTheme")??lM(e,"cstheme");if(!n)return;const a="majorAscii"===n||"majorHAnsi"===n?"majorHAnsi":"minorAscii"===n||"minorHAnsi"===n?"minorHAnsi":"majorEastAsia"===n?"majorEastAsia":"minorEastAsia"===n?"minorEastAsia":"majorBidi"===n?"majorBidi":"minorBidi"===n?"minorBidi":void 0;return a?t[a]:void 0}(W,t.fonts);F&&(n.fontFamily=function(e){const t=null==e?void 0:e.trim();if(!t)return;return`${/[\s,]/.test(t)?`"${t.replace(/"/g,'\\"')}"`:t}, ${/times/i.test(t)?"serif":"sans-serif"}`}(F));const D=lM(rM(e,Yx,"sz")??rM(e,Yx,"szCs"),"val");if(D){const e=function(e){const t=e?Number(e):Number.NaN;return Number.isFinite(t)?Ac(t/2/72*dt,4):null}(D);null!==e&&(n.fontSize=e)}const H=rM(e,Yx,"color"),U=lM(H,"val");if(U&&"auto"!==U)n.color=IM(U);else if("auto"!==U){const e=EM(H,t.colors);e&&(n.color=e)}const G=oM(e,"textFill");if(G){const e=XM(G);e&&(n.textFill=e)}const j=oM(e,"textOutline");if(j){const e=j.getAttributeNS(Qx,"w"),t=null!==e?Number(e):NaN,a={widthPt:Number.isFinite(t)&&t>0?t/ft:.5},r=XM(j);r&&(a.fill=r,"solid"===r.type?a.color=r.color:"gradient"===r.type&&r.stops[0]&&(a.color=r.stops[0].color)),n.textOutline=a}const Z=oM(e,"shadow");if(Z){const e=function(e){const t=YM(e);if(!t)return null;const n=e.getAttributeNS(Qx,"blurRad"),a=e.getAttributeNS(Qx,"dist"),r=e.getAttributeNS(Qx,"dir"),o=n?Number(n)/ft:0,i=a?Number(a)/ft:0,l=r?Number(r)/bt:0;return{color:t.color,...void 0!==t.alpha?{alpha:t.alpha}:{},blurPt:o,distPt:i,dirDeg:l}}(Z);e&&(n.textShadow=e)}const K=oM(e,"glow");if(K){const e=function(e){const t=YM(e);if(!t)return null;const n=e.getAttributeNS(Qx,"rad"),a=n?Number(n)/ft:0;return{color:t.color,...void 0!==t.alpha?{alpha:t.alpha}:{},radiusPt:a}}(K);e&&(n.glow=e)}const X=oM(e,"reflection");X&&(n.reflection=function(e){const t=e.getAttributeNS(Qx,"blurRad"),n=e.getAttributeNS(Qx,"stA"),a=e.getAttributeNS(Qx,"stPos"),r=e.getAttributeNS(Qx,"endA"),o=e.getAttributeNS(Qx,"endPos"),i=e.getAttributeNS(Qx,"dist");return{blurPt:t?Number(t)/ft:0,startAlpha:null!==n?Number(n)/mt:.55,startPos:null!==a?Number(a)/mt:0,endAlpha:null!==r?Number(r)/mt:0,endPos:null!==o?Number(o)/mt:1,distPt:i?Number(i)/ft:0}}(X));const Y=oM(e,"scene3d");Y&&(n.scene3dXml=(new Px).serializeToString(Y));const J=oM(e,"props3d");J&&(n.props3dXml=(new Px).serializeToString(J));const Q=lM(rM(e,Yx,"highlight"),"val");Q&&"none"!==Q&&(n.highlight=Q);const $=KM(rM(e,Yx,"shd"),t.colors);$&&(n.shading=$);const _=rM(e,Yx,"lang");if(_){const e=lM(_,"val"),t=lM(_,"eastAsia"),a=lM(_,"bidi"),r={};e&&(r.value=e),t&&(r.eastAsia=t),a&&(r.bidi=a),Object.keys(r).length>0&&(n.language=r)}return jM(n)}const $M=[["firstRow","firstRow"],["lastRow","lastRow"],["firstColumn","firstCol"],["lastColumn","lastCol"],["oddVBand","band1Vert"],["evenVBand","band2Vert"],["oddHBand","band1Horz"],["evenHBand","band2Horz"],["firstRowFirstColumn","nwCell"],["firstRowLastColumn","neCell"],["lastRowFirstColumn","swCell"],["lastRowLastColumn","seCell"]],_M=[["top","borderTop"],["left","borderLeft"],["bottom","borderBottom"],["right","borderRight"],["insideH","borderInsideH"],["insideV","borderInsideV"]];function eS(e){if(!e)return;const t=lM(e,"type"),n=lM(e,"w");if("auto"===t)return"auto";if("pct"===t){if(!n)return;const e=n.trim().endsWith("%")?Number.parseFloat(n):Number(n)/50;return Number.isFinite(e)?`${Ac(e,4)}%`:void 0}return AM(n)}function tS(e,t){const n=lM(rM(e,Yx,t),"val"),a=n?Number(n):Number.NaN;return Number.isFinite(a)&&a>0?Math.floor(a):void 0}function nS(e){const t=rM(e,Yx,"cnfStyle");if(!t)return;const n=lM(t,"val")??"",a={};return $M.forEach(([e,r],o)=>{const i=lM(t,e);"1"===i||"true"===i||"on"===i?a[r]=!0:"0"===i||"false"===i||"off"===i?a[r]=!1:12===n.length&&"1"===n[o]&&(a[r]=!0)}),Object.keys(a).length>0?a:void 0}function aS(e){const t=lM(e,"date"),n=t?Date.parse(t):Number.NaN;return{id:lM(e,"id")??`revision:${e.localName}`,author:lM(e,"author")??"Unknown",date:Number.isFinite(n)?n:0}}function rS(e){if(!e)return;const t=t=>AM(lM(rM(e,Yx,t),"w")),n={},a=t("top"),r=t("right"),o=t("bottom"),i=t("left"),l=t("start"),s=t("end");return void 0!==a&&(n.top=a),void 0!==r&&(n.right=r),void 0!==o&&(n.bottom=o),void 0!==i&&(n.left=i),void 0!==l&&(n.start=l),void 0!==s&&(n.end=s),Object.keys(n).length>0?n:void 0}function oS(e,t){const n={};t&&(n.styleId=t);const a=lM(rM(e,Yx,"tblCaption"),"val");a&&(n.altTitle=a);const r=lM(rM(e,Yx,"tblDescription"),"val");r&&(n.altDescription=r);const o=eS(rM(e,Yx,"tblW"));void 0!==o&&(n.width=o);const i=eS(rM(e,Yx,"tblInd"));void 0!==i&&(n.indentLeft=i);const l=lM(rM(e,Yx,"jc"),"val");"left"===l||"start"===l?n.align="left":"center"===l?n.align="center":"right"!==l&&"end"!==l||(n.align="right");const s=function(e){const t=lM(rM(e,Yx,"tblLayout"),"type");return"fixed"===t||"autofit"===t?t:void 0}(e);s&&(n.layout=s);const d=eS(rM(e,Yx,"tblCellSpacing"));void 0!==d&&(n.cellSpacing=d);const c=(u=rM(e,Yx,"tblBorders"))?{...UM(u),borderInsideH:HM(rM(u,Yx,"insideH")),borderInsideV:HM(rM(u,Yx,"insideV"))}:{};var u;Object.keys(c).length>0&&(n.borders=c);const p=rS(rM(e,Yx,"tblCellMar"));p&&(n.defaultCellMargins=p);const h=e?uM(e,"bidiVisual"):void 0;void 0!==h&&(n.bidiVisual=h);const f=lM(rM(e,Yx,"tblOverlap"),"val");"overlap"!==f&&"never"!==f||(n.tblOverlap=f);const g=function(e){const t=rM(e,Yx,"tblpPr");if(!t||!t.attributes||0===t.attributes.length)return;const n={};for(let s=0;s<t.attributes.length;s+=1){const e=t.attributes.item(s);(null==e?void 0:e.namespaceURI)!==Yx&&"w"!==(null==e?void 0:e.prefix)||(n[e.localName||e.name.replace(/^w:/,"")]=e.value)}const a=e=>AM(n[e]??null),r="margin"===n.horzAnchor||"page"===n.horzAnchor||"text"===n.horzAnchor?n.horzAnchor:void 0,o="margin"===n.vertAnchor||"page"===n.vertAnchor||"text"===n.vertAnchor?n.vertAnchor:void 0,i="left"===n.tblpXSpec||"center"===n.tblpXSpec||"right"===n.tblpXSpec||"inside"===n.tblpXSpec||"outside"===n.tblpXSpec?n.tblpXSpec:void 0,l="top"===n.tblpYSpec||"center"===n.tblpYSpec||"bottom"===n.tblpYSpec||"inside"===n.tblpYSpec||"outside"===n.tblpYSpec?n.tblpYSpec:void 0;return{...r?{horizontalAnchor:r}:{},...o?{verticalAnchor:o}:{},...void 0!==a("tblpX")?{x:a("tblpX")}:{},...void 0!==a("tblpY")?{y:a("tblpY")}:{},...i?{xAlign:i}:{},...l?{yAlign:l}:{},...void 0!==a("topFromText")?{distanceTop:a("topFromText")}:{},...void 0!==a("rightFromText")?{distanceRight:a("rightFromText")}:{},...void 0!==a("bottomFromText")?{distanceBottom:a("bottomFromText")}:{},...void 0!==a("leftFromText")?{distanceLeft:a("leftFromText")}:{}}}(e);g&&(n.floating=g);const m=tS(e,"tblStyleRowBandSize");void 0!==m&&(n.rowBandSize=m);const b=tS(e,"tblStyleColBandSize");void 0!==b&&(n.colBandSize=b);const v=rM(e,Yx,"tblLook");if(v){const e=lM(v,"val"),t=e?Number.parseInt(e,16):Number.NaN,a=(e,n,a)=>{const r=lM(v,e);return null!==r&&""!==r?"1"===r||"true"===r||"on"===r:Number.isFinite(t)?0!==(t&n):a};n.tblLook={firstRow:a("firstRow",32,!0),lastRow:a("lastRow",64,!1),firstCol:a("firstColumn",128,!0),lastCol:a("lastColumn",256,!1),noHBand:a("noHBand",512,!1),noVBand:a("noVBand",1024,!1)}}const y=rM(e,Yx,"tblPrChange"),w=rM(y,Yx,"tblPr");return y&&w&&(n.revision={...aS(y),type:"property",previous:oS(w)??{}}),jM(n)}function iS(e){if(!e)return;const t={},n=uM(e,"tblHeader");void 0!==n&&(t.isHeader=n);const a=tS(e,"gridBefore");void 0!==a&&(t.gridBefore=a);const r=tS(e,"gridAfter");void 0!==r&&(t.gridAfter=r);const o=eS(rM(e,Yx,"wBefore"));void 0!==o&&(t.widthBefore=o);const i=eS(rM(e,Yx,"wAfter"));void 0!==i&&(t.widthAfter=i);const l=rM(e,Yx,"trHeight"),s=AM(lM(l,"val"));void 0!==s&&(t.height=s);const d=lM(l,"hRule");"auto"!==d&&"exact"!==d&&"atLeast"!==d||(t.heightRule=d);const c=eS(rM(e,Yx,"tblCellSpacing"));void 0!==c&&(t.cellSpacing=c);const u=lM(rM(e,Yx,"jc"),"val");"left"===u||"start"===u?t.align="left":"center"===u?t.align="center":"right"!==u&&"end"!==u||(t.align="right");const p=uM(e,"cantSplit");void 0!==p&&(t.cantSplit=p);const h=uM(e,"hidden");void 0!==h&&(t.hidden=h);const f=rM(e,Yx,"trPrChange"),g=rM(f,Yx,"trPr");f&&g&&(t.propertyRevision={...aS(f),type:"property",previous:iS(g)??{}});const m=rM(e,Yx,"ins"),b=rM(e,Yx,"del"),v=m??b;return v&&(t.revision={...aS(v),type:m?"insert":"delete"}),jM(t)}function lS(e){if(!e)return 1;const t=lM(rM(e,Yx,"gridSpan"),"val"),n=t?Number(t):1;return Number.isFinite(n)&&n>1?Math.floor(n):1}function sS(e){if(!e)return;const t=rM(e,Yx,"vMerge");if(!t)return;return"restart"===lM(t,"val")?"restart":"continue"}function dS(e){if(!e)return;const t=rM(e,Yx,"hMerge");if(!t)return;return"restart"===lM(t,"val")?"restart":"continue"}function cS(e,t,n){if(!e)return;const a={},r=KM(rM(e,Yx,"shd"),n);r&&(a.shading=r);const o=rM(e,Yx,"tcW"),i=lM(o,"type"),l=lM(o,"w");if("dxa"===i){const e=AM(l);void 0!==e&&(a.width=e)}else if("pct"===i&&l){const e=Number(l);Number.isFinite(e)&&(a.width=`${Ac(e/50,4)}%`)}const s=rS(rM(e,Yx,"tcMar"));s&&(void 0!==s.top&&(a.paddingTop=s.top),void 0!==s.bottom&&(a.paddingBottom=s.bottom),void 0!==s.left&&(a.paddingLeft=s.left),void 0!==s.right&&(a.paddingRight=s.right),void 0!==s.start&&(a.paddingStart=s.start),void 0!==s.end&&(a.paddingEnd=s.end));const d=function(e){if(!e)return;const t=lM(rM(e,Yx,"vAlign"),"val");return"top"===t||"bottom"===t?t:"center"===t?"middle":void 0}(e);d&&(a.verticalAlign=d);const c=aM(lM(rM(e,Yx,"textDirection"),"val"));c&&(a.textDirection=c);const u=uM(e,"noWrap");void 0!==u&&(a.noWrap=u);const p=uM(e,"tcFitText");void 0!==p&&(a.fitText=p);const h=uM(e,"hideMark");void 0!==h&&(a.hideMark=h);const f=lM(rM(e,Yx,"headers"),"val");f&&(a.headers=f);const g=rM(e,Yx,"tcPrChange"),m=rM(g,Yx,"tcPr");g&&m&&(a.propertyRevision={...aS(g),type:"property",previous:cS(m,void 0,n)??{}});const b=rM(e,Yx,"cellIns"),v=rM(e,Yx,"cellDel"),y=rM(e,Yx,"cellMerge"),w=b??v??y;if(w){const e=lM(w,"vMergeOrig");a.revision={...aS(w),type:b?"insert":v?"delete":"merge",...y&&e?{previous:{vMerge:"restart"===e?"restart":"continue"}}:{}}}for(const[x,M]of Object.entries(function(e){return e?UM(rM(e,Yx,"tcBorders")):{}}(e)))M&&(a[x]=M);return jM(a)}function uS(e){const t=rM(e,Yx,"trPr");return!!t&&!0===uM(t,"tblHeader")}function pS(e){return void 0!==(null==e?void 0:e.lineHeight)?e:{...e??{},lineHeight:1.1}}function hS(e,t){if(!e)return;const n={},a=pM(e,"pStyle");a&&(n.styleId=a);const r=lM(rM(e,Yx,"jc"),"val");"left"===r||"start"===r||"center"===r||"right"===r||"end"===r||"justify"===r?n.align="start"===r?"left":"end"===r?"right":r:"both"!==r&&"distribute"!==r||(n.align="justify");const o=rM(e,Yx,"spacing"),i=lM(o,"before"),l=lM(o,"after"),s=lM(o,"line"),d=lM(o,"lineRule");i&&(n.spacingBefore=SM(i,0)),l&&(n.spacingAfter=SM(l,0)),s&&("exact"===d||"atLeast"===d?(n.lineHeight=Ac(Number(s)/1440*96,4),n.lineRule=d):n.lineHeight=Number(s)/240);const c=uM(e,"contextualSpacing");void 0!==c&&(n.contextualSpacing=c);const u=uM(e,"snapToGrid");void 0!==u&&(n.snapToGrid=u);const p=rM(e,Yx,"ind"),h=lM(p,"start")??lM(p,"left"),f=lM(p,"end")??lM(p,"right"),g=lM(p,"firstLine"),m=lM(p,"hanging");h&&(n.indentLeft=SM(h,0)),f&&(n.indentRight=SM(f,0)),m?(n.indentHanging=SM(m,0),n.indentFirstLine=void 0):g&&(n.indentFirstLine=SM(g,0));const b=function(e){const t=rM(e,Yx,"tabs");if(!t)return[];const n=[];for(const a of tM(t,Yx,"tab")){const e=AM(lM(a,"pos"));if(void 0===e)continue;const t=lM(a,"val"),r="center"===t||"right"===t||"decimal"===t||"bar"===t||"clear"===t?t:"left",o=lM(a,"leader"),i="dot"===o||"hyphen"===o||"underscore"===o||"heavy"===o||"middleDot"===o?o:"none"===o?"none":void 0;n.push({position:e,type:r,...void 0!==i?{leader:i}:{}})}return n}(e);b.length>0&&(n.tabs=b);const v=uM(e,"pageBreakBefore");void 0!==v&&(n.pageBreakBefore=v);const y=uM(e,"keepNext");void 0!==y&&(n.keepWithNext=y);const w=uM(e,"keepLines");void 0!==w&&(n.keepLinesTogether=w);const x=uM(e,"widowControl");void 0!==x&&(n.widowControl=x);const M=uM(e,"mirrorIndents");void 0!==M&&(n.mirrorIndents=M);const S=rM(e,Yx,"pBdr");if(S){const{borderTop:e,borderRight:t,borderBottom:a,borderLeft:r,borderBetween:o,borderBar:i}=UM(S);e&&(n.borderTop=e),t&&(n.borderRight=t),a&&(n.borderBottom=a),r&&(n.borderLeft=r),o&&(n.borderBetween=o),i&&(n.borderBar=i)}const A=KM(rM(e,Yx,"shd"),t);A&&(n.shading=A);const I=aM(lM(rM(e,Yx,"textDirection"),"val"));I&&(n.textDirection=I);const C=lM(rM(e,Yx,"outlineLvl"),"val");if(void 0!==C){const e=Number(C);Number.isFinite(e)&&e>=0&&e<=8&&(n.outlineLevel=e)}const T=uM(e,"suppressLineNumbers");void 0!==T&&(n.suppressLineNumbers=T);const k=uM(e,"suppressAutoHyphens");void 0!==k&&(n.suppressAutoHyphens=k);const R=uM(e,"bidi");void 0!==R&&(n.bidi=R);const E=uM(e,"kinsoku");void 0!==E&&(n.kinsoku=E);const L=uM(e,"wordWrap");void 0!==L&&(n.wordWrap=L);const V=uM(e,"overflowPunct");void 0!==V&&(n.overflowPunct=V);const N=uM(e,"topLinePunct");void 0!==N&&(n.topLinePunct=N);const z=uM(e,"autoSpaceDE");void 0!==z&&(n.autoSpaceDE=z);const P=uM(e,"autoSpaceDN");void 0!==P&&(n.autoSpaceDN=P);const O=uM(e,"adjustRightInd");void 0!==O&&(n.adjustRightInd=O);const q=lM(rM(e,Yx,"textAlignment"),"val");"auto"!==q&&"top"!==q&&"center"!==q&&"baseline"!==q&&"bottom"!==q||(n.textAlignment=q);const B=lM(rM(e,Yx,"textboxTightWrap"),"val");"none"!==B&&"allLines"!==B&&"firstLineOnly"!==B&&"firstLastLine"!==B||(n.textboxTightWrap=B);const W=lM(rM(e,Yx,"divId"),"val");if(null!==W){const e=Number(W);Number.isFinite(e)&&e>=0&&(n.divId=Math.floor(e))}const F=nS(e);F&&(n.conditionalStyle=F);const D=rM(e,Yx,"framePr");if(D){const e=lM(D,"dropCap");e&&"none"!==e||(n.framePrXml=(new Px).serializeToString(D))}return jM(n)}function fS(e){return"1"===e||"true"===e||"on"===e}function gS(e){const t=rM(e,Yx,"cols");if(!t)return;const n=Number.parseInt(lM(t,"num")??"1",10);if(!Number.isFinite(n)||n<=1)return;const a=SM(lM(t,"space"),0),r=lM(t,"sep"),o=lM(t,"equalWidth"),i=tM(t,Yx,"col").map(e=>({width:SM(lM(e,"w"),0),space:SM(lM(e,"space"),a)})),l=null==o||fS(o);return{count:n,space:a,...fS(r)?{separator:!0}:{},...l?{}:{equalWidth:!1},...!l&&i.length>0?{columns:i}:{}}}function mS(e){const t=rM(e,Yx,"pgSz"),n=rM(e,Yx,"pgMar"),a=gS(e),r=rM(e,Yx,"pgBorders"),o=rM(r,Yx,"top"),i=lM(o,"val"),l=lM(o,"color"),s=Number.parseInt(lM(o,"sz")??"0",10),d=i&&l&&"nil"!==i?{style:"double"===i||"dashed"===i||"dotted"===i?i:"single",color:`#${l.replace(/^#/,"")}`,width:Number.isFinite(s)&&s>0?s/8:1,distance:Number(lM(o,"space")??0)}:void 0;let c;if(t||n||a){const e=SM(lM(t,"w"),816),r=SM(lM(t,"h"),1056),o=lM(t,"orient");c={width:e,height:r,orientation:"landscape"===o?"landscape":"portrait"===o?"portrait":e>r?"landscape":"portrait",margins:{top:SM(lM(n,"top"),96),right:SM(lM(n,"right"),96),bottom:SM(lM(n,"bottom"),96),left:SM(lM(n,"left"),96),header:SM(lM(n,"header"),48),footer:SM(lM(n,"footer"),48),gutter:SM(lM(n,"gutter"),0)},...a?{columns:a}:{}}}const u=t=>{const n={};for(const a of tM(e,Yx,t)){const e=lM(a,"type")??"default";if("default"!==e&&"first"!==e&&"even"!==e)continue;const t=a.getAttribute("r:id")??a.getAttributeNS("http://schemas.openxmlformats.org/officeDocument/2006/relationships","id")??null;t&&(n[e]=t)}return n},p=u("headerReference"),h=u("footerReference"),f=rM(e,Yx,"docGrid"),g=lM(f,"type"),m=SM(lM(f,"linePitch"),Number.NaN),b=lM(rM(e,Yx,"type"),"val"),v="continuous"===b||"nextPage"===b||"evenPage"===b||"oddPage"===b||"nextColumn"===b?b:void 0,y=rM(e,Yx,"pgNumType");let w;if(y){const e=lM(y,"start"),t=null!==e?Number.parseInt(e,10):void 0,n=lM(y,"fmt")??void 0,a=lM(y,"chapStyle")??void 0,r=lM(y,"chapSep")??void 0;(void 0!==t&&Number.isFinite(t)||n||a||r)&&(w={...void 0!==t&&Number.isFinite(t)?{start:t}:{},...n?{format:n}:{},...a?{chapterStyle:a}:{},...r?{chapterSeparator:r}:{}})}const x=lM(rM(e,Yx,"vAlign"),"val"),M="center"===x||"both"===x||"bottom"===x?x:void 0,S=uM(e,"bidi");return{pageSettings:c,...d?{pageBorder:d}:{},headerRIds:p,footerRIds:h,docGridLinePitchPx:Number.isFinite(m)&&m>0?m:void 0,docGridMode:"lines"===g||"linesAndChars"===g?"explicit":void 0,docGridType:g,breakType:v,pageNumbering:w,verticalAlignment:M,bidi:S}}function bS(e){if(!e)return;const t=rM(e,Yx,"sectPr");if(!t)return;const n=rM(t,Yx,"pgSz"),a=rM(t,Yx,"pgMar"),r=gS(t);if(!n&&!a&&!r)return;const o=SM(lM(n,"w"),816),i=SM(lM(n,"h"),1056),l=lM(n,"orient");return{width:o,height:i,orientation:"landscape"===l?"landscape":"portrait"===l?"portrait":o>i?"landscape":"portrait",margins:{top:SM(lM(a,"top"),96),right:SM(lM(a,"right"),96),bottom:SM(lM(a,"bottom"),96),left:SM(lM(a,"left"),96),header:SM(lM(a,"header"),48),footer:SM(lM(a,"footer"),48),gutter:SM(lM(a,"gutter"),0)},...r?{columns:r}:{}}}function vS(e,t,n,a,r){var o,i,l;if(t&&n)for(const s of e){if("paragraph"===s.type){const e=(null==(o=s.style)?void 0:o.styleId)&&/heading/i.test(s.style.styleId);void 0!==(null==(i=s.style)?void 0:i.lineHeight)||!1===(null==(l=s.style)?void 0:l.snapToGrid)||e||(s.style={...s.style??{},lineGridPitch:t,lineGridType:a});continue}if(r.adjustLineHeightInTable)for(const e of s.rows)for(const o of e.cells)vS(o.blocks,t,n,a,r)}}const yS="http://schemas.openxmlformats.org/officeDocument/2006/math",wS=new Px;function xS(e,t){const n=[];for(let a=0;a<e.childNodes.length;a+=1){const r=e.childNodes[a];(null==r?void 0:r.nodeType)!==r.ELEMENT_NODE||r.namespaceURI!==yS||t&&r.localName!==t||n.push(r)}return n}function MS(e,t){return xS(e,t)[0]}function SS(e,t){return(null==e?void 0:e.getAttributeNS(yS,t))??(null==e?void 0:e.getAttribute(`m:${t}`))??(null==e?void 0:e.getAttribute(t))??void 0}function AS(e){return e?xS(e).map(IS):[]}function IS(e){switch(e.localName){case"r":return function(e){var t;const n=(null==(t=MS(e,"t"))?void 0:t.textContent)??"",a=MS(e,"rPr"),r=a?{...MS(a,"sty")?{script:SS(MS(a,"sty"),"val")}:{},...MS(a,"nor")?{normalText:!0}:{},...MS(a,"b")?{bold:"0"!==SS(MS(a,"b"),"val")}:{},...MS(a,"i")?{italic:"0"!==SS(MS(a,"i"),"val")}:{}}:void 0;return{kind:"text",value:n,...r&&Object.keys(r).length>0?{style:r}:{}}}(e);case"f":return{kind:"fraction",numerator:AS(MS(e,"num")),denominator:AS(MS(e,"den"))};case"rad":return{kind:"radical",radicand:AS(MS(e,"e")),...MS(e,"deg")?{degree:AS(MS(e,"deg"))}:{}};case"sSub":case"sSup":case"sSubSup":return function(e,t){const n=AS(MS(e,"e")),a=AS(MS(e,"sub")),r=AS(MS(e,"sup"));return{kind:t,base:n,...a.length>0?{subscript:a}:{},...r.length>0?{superscript:r}:{}}}(e,"script");case"d":{const t=MS(e,"dPr");return{kind:"delimiter",children:xS(e,"e").map(AS),...SS(MS(t,"begChr"),"val")?{begin:SS(MS(t,"begChr"),"val")}:{},...SS(MS(t,"endChr"),"val")?{end:SS(MS(t,"endChr"),"val")}:{},...SS(MS(t,"sepChr"),"val")?{separator:SS(MS(t,"sepChr"),"val")}:{},grow:"0"!==SS(MS(t,"grow"),"val")}}case"acc":{const t=MS(e,"accPr");return{kind:"accent",accent:SS(MS(t,"chr"),"val")??"¯",children:AS(MS(e,"e"))}}case"nary":{const t=MS(e,"naryPr");return{kind:"nary",operator:SS(MS(t,"chr"),"val")??"∑",children:AS(MS(e,"e")),...xS(e,"sub").length>0?{subscript:AS(MS(e,"sub"))}:{},...xS(e,"sup").length>0?{superscript:AS(MS(e,"sup"))}:{},grow:"0"!==SS(MS(t,"grow"),"val")}}case"limLow":return{kind:"limit",operator:"low",base:AS(MS(e,"e")),limit:AS(MS(e,"lim"))};case"limUpp":return{kind:"limit",operator:"upper",base:AS(MS(e,"e")),limit:AS(MS(e,"lim"))};case"m":return{kind:"matrix",rows:xS(e,"mr").map(e=>xS(e,"e").map(AS))};case"box":case"borderBox":return{kind:"box",children:AS(MS(e,"e")),border:!0};case"phant":return{kind:"box",children:AS(MS(e,"e")),hidden:!0};case"groupChr":{const t=MS(e,"groupChrPr");return{kind:"accent",accent:SS(MS(t,"chr"),"val")??"¯",children:AS(MS(e,"e"))}}case"func":return{kind:"group",children:[...AS(MS(e,"fName")),...AS(MS(e,"e"))]};default:return{kind:"raw",xml:wS.serializeToString(e),fallbackText:e.textContent??""}}}function CS(e){const t="oMathPara"===e.localName?MS(e,"oMath"):e;return{version:1,children:t?xS(t).map(IS):[],display:"oMathPara"===e.localName,sourceXml:wS.serializeToString(e)}}const TS=new Set(["alias","tag","id","lock","placeholder","dataBinding","temporary","appearance","showingPlcHdr","color","text","richText","picture","comboBox","dropDownList","date","repeatingSection","repeatingSectionItem","group","equation","citation","bibliography"]),kS=new Set(["repeatingSection","repeatingSectionItem"]);function RS(e){if(!e)return{};const t={},n=rM(e,Yx,"alias");if(n){const e=lM(n,"val");null!==e&&(t.alias=e)}const a=rM(e,Yx,"tag");if(a){const e=lM(a,"val");null!==e&&(t.tag=e)}const r=rM(e,Yx,"id");if(r){const e=lM(r,"val");null!==e&&(t.id=e)}const o=rM(e,Yx,"lock");if(o){const e=lM(o,"val");null!==e&&(t.lock=e)}const i=rM(e,Yx,"appearance");if(i){const e=lM(i,"val");null!==e&&(t.appearance=e)}const l=rM(e,Yx,"showingPlcHdr");l&&(t.showingPlcHdr=cM(lM(l,"val")));const s=rM(e,Yx,"temporary");s&&(t.temporary=cM(lM(s,"val")));const d=rM(e,Yx,"color");if(d){const e=lM(d,"val");null!==e&&(t.color=e)}const c=rM(e,Yx,"placeholder");if(c){const e=rM(c,Yx,"docPart");if(e){const n=lM(e,"val");null!==n&&(t.placeholderDocPart=n)}}const u=rM(e,Yx,"dataBinding");if(u){const e=function(e){const t={},n=lM(e,"prefixMappings"),a=lM(e,"xpath"),r=lM(e,"storeItemID");null!==n&&(t.prefixMappings=n);null!==a&&(t.xpath=a);null!==r&&(t.storeItemID=r);if(void 0===t.prefixMappings){const n=lM(rM(e,Yx,"prefixMappings"),"val");null!==n&&(t.prefixMappings=n)}if(void 0===t.xpath){const n=lM(rM(e,Yx,"xpath"),"val");null!==n&&(t.xpath=n)}if(void 0===t.storeItemID){const n=lM(rM(e,Yx,"storeItemID"),"val");null!==n&&(t.storeItemID=n)}return void 0===t.prefixMappings&&void 0===t.xpath&&void 0===t.storeItemID?null:t}(u);e&&(t.dataBinding=e)}const p=function(e){const t=rM(e,Yx,"comboBox");if(t){const e=rM(t,Yx,"lastSelectedValue");return{kind:"comboBox",listItems:ES(t),...e?{lastSelectedValue:lM(e,"val")??void 0}:{}}}const n=rM(e,Yx,"dropDownList");if(n){const e=rM(n,Yx,"lastSelectedValue");return{kind:"dropDownList",listItems:ES(n),...e?{lastSelectedValue:lM(e,"val")??void 0}:{}}}const a=rM(e,Yx,"date");if(a){const e=lM(a,"fullDate")??void 0,t=rM(a,Yx,"dateFormat"),n=rM(a,Yx,"lid"),r=rM(a,Yx,"calendar"),o=rM(a,Yx,"storeMappedDataAs");return{kind:"date",fullDate:e,dateFormat:t?lM(t,"val")??void 0:void 0,lid:n?lM(n,"val")??void 0:void 0,calendar:r?lM(r,"val")??void 0:void 0,storeMappedDataAs:o?lM(o,"val")??void 0:void 0}}if(rM(e,Yx,"text"))return{kind:"text"};for(const o of["richText","picture","group","equation","citation","bibliography"])if(rM(e,Yx,o))return{kind:o};if(iM(e,"repeatingSection")||rM(e,Yx,"repeatingSection"))return{kind:"repeatingSection"};if(iM(e,"repeatingSectionItem")||rM(e,Yx,"repeatingSectionItem"))return{kind:"repeatingSectionItem"};const r=oM(e,"checkbox");if(r){const e=rM(r,Qx,"checked"),t=rM(r,Qx,"checkedState"),n=rM(r,Qx,"uncheckedState"),a=e?cM(lM(e,"val")):void 0;return{kind:"checkbox",...void 0!==a?{checked:a}:{},...t?{checkedStateFont:lM(t,"font")??void 0,checkedStateChar:lM(t,"char")??void 0}:{},...n?{uncheckedStateFont:lM(n,"font")??void 0,uncheckedStateChar:lM(n,"char")??void 0}:{}}}return}(e);if(p&&(t.subtype=p,"repeatingSection"===p.kind)){const n=iM(e,"repeatingSection")??rM(e,Yx,"repeatingSection");if(n){const e=iM(n,"sectionTitle"),a=iM(n,"doNotAllowInsertDeleteSection"),r={},o=lM(e,"val");if(null!==o&&(r.sectionTitle=o),a){const e=lM(a,"val");r.doNotAllowInsertDeleteSection=null===e||cM(e)}Object.keys(r).length>0&&(t.repeatingSectionProperties=r)}}const h=function(e){let t="";for(let n=0;n<e.childNodes.length;n+=1){const a=e.childNodes[n];if((null==a?void 0:a.nodeType)!==a.ELEMENT_NODE)continue;const r=a,o=r.localName&&r.namespaceURI===Yx&&TS.has(r.localName),i=r.localName&&r.namespaceURI===$x&&kS.has(r.localName);o||i||(t+=(new Px).serializeToString(r))}return t}(e);return h.length>0&&(t.unknownXml=h),t}function ES(e){const t=tM(e,Yx,"listItem");if(0!==t.length)return t.map(e=>({displayText:lM(e,"displayText")??void 0,value:lM(e,"value")??void 0}))}function LS(e){const t=VS(e);return void 0===t?void 0:Math.round(t/ht)}function VS(e){if(null==e||""===e)return;const t=parseInt(e,10);return Number.isFinite(t)?t:void 0}function NS(e){const t=null==e?void 0:e.trim();if(!t)return null;const n=t.match(/^(-?\d+(?:\.\d+)?)(pt|px|in|cm|mm|pc)?$/i);if(!n)return null;const a=Number(n[1]);if(!Number.isFinite(a)||a<=0)return null;switch((n[2]??"px").toLowerCase()){case"pt":return Math.round(a*ct);case"in":return Math.round(a*dt);case"cm":return Math.round(a/2.54*dt);case"mm":return Math.round(a/25.4*dt);case"pc":return Math.round(12*a*ct);default:return Math.round(a)}}function zS(e){const t=Vg(e);return t?`#${t}`:void 0}function PS(e){for(let t=0;t<e.childNodes.length;t+=1){const n=e.childNodes[t];if((null==n?void 0:n.nodeType)!==n.ELEMENT_NODE)continue;const a=n;if("inline"===a.localName||"anchor"===a.localName)return{element:a,kind:a.localName}}}function OS(e){return"1"===e||"true"===e||"0"!==e&&"false"!==e&&void 0}function qS(e,t){var n,a,r,o;const i=sM(e,t);if(!i)return;const l=null==(a=null==(n=sM(i,"align"))?void 0:n.textContent)?void 0:a.trim(),s=VS(null==(o=null==(r=sM(i,"posOffset"))?void 0:r.textContent)?void 0:o.trim()),d={relativeFrom:i.getAttribute("relativeFrom")??void 0,...l?{align:l}:{},...void 0!==s?{offset:s}:{}};return void 0!==d.relativeFrom||void 0!==d.align||void 0!==d.offset?d:void 0}function BS(e){const t=qS(e,"positionH"),n=qS(e,"positionV"),a=function(e){return sM(e,"wrapSquare")?"square":sM(e,"wrapTight")?"tight":sM(e,"wrapThrough")?"through":sM(e,"wrapTopAndBottom")?"topAndBottom":sM(e,"wrapNone")?"none":void 0}(e),r=VS(e.getAttribute("distT")),o=VS(e.getAttribute("distB")),i=VS(e.getAttribute("distL")),l=VS(e.getAttribute("distR")),s=OS(e.getAttribute("simplePos")),d=VS(e.getAttribute("relativeHeight")),c=OS(e.getAttribute("behindDoc")),u=OS(e.getAttribute("locked")),p=OS(e.getAttribute("layoutInCell")),h=OS(e.getAttribute("allowOverlap"));return{type:"floating",...void 0!==r?{distT:r}:{},...void 0!==o?{distB:o}:{},...void 0!==i?{distL:i}:{},...void 0!==l?{distR:l}:{},...void 0!==s?{simplePos:s}:{},...void 0!==d?{relativeHeight:d}:{},...void 0!==c?{behindDoc:c}:{},...void 0!==u?{locked:u}:{},...void 0!==p?{layoutInCell:p}:{},...void 0!==h?{allowOverlap:h}:{},...t?{positionH:t}:{},...n?{positionV:n}:{},...a?{wrap:a}:{}}}async function WS(e,t,n,a){const r=sM(e,"blip");if(!r)return{text:"",image:void 0};const{embed:o,link:i}=function(e){const t={};for(let n=0;n<e.attributes.length;n+=1){const a=e.attributes[n];a&&("embed"===a.localName||"r:embed"===a.name?t.embed=a.value:"link"!==a.localName&&"r:link"!==a.name||(t.link=a.value))}return t}(r),l=PS(e),s=(null==l?void 0:l.element)??e,d=sM(s,"extent"),c=sM(s,"docPr");let u=300,p=300;if(d){const e=d.getAttribute("cx"),t=d.getAttribute("cy");e&&(u=Math.round(parseInt(e,10)/ht)),t&&(p=Math.round(parseInt(t,10)/ht))}const h=c?lM(c,"descr")??lM(c,"title"):null,f=function(e){const t=sM(e,"srcRect");if(!t)return;const n=e=>{const n=t.getAttribute(e);if(null===n||""===n)return;const a=parseInt(n,10);return Number.isFinite(a)&&0!==a?a/mt:void 0},a={left:n("l"),top:n("t"),right:n("r"),bottom:n("b")};return void 0!==a.left||void 0!==a.top||void 0!==a.right||void 0!==a.bottom?a:void 0}(e),g=function(e){const t=sM(e,"pic"),n=t&&sM(t,"spPr");if(!n)return;let a=null;for(let s=0;s<n.childNodes.length;s+=1){const e=n.childNodes[s];if(1!==(null==e?void 0:e.nodeType))continue;const t=e;if("prstGeom"===t.localName){a=t;break}}const r=null==a?void 0:a.getAttribute("prst");if(!a||!r||"rect"===r)return;const o={},i=Array.from(a.childNodes).find(e=>1===(null==e?void 0:e.nodeType)&&"avLst"===e.localName);if(i)for(let s=0;s<i.childNodes.length;s+=1){const e=i.childNodes[s];if(1!==(null==e?void 0:e.nodeType)||"gd"!==e.localName)continue;const t=e,n=t.getAttribute("name"),a=(t.getAttribute("fmla")??"").match(/(-?\d+(?:\.\d+)?)\s*$/);n&&a&&(o[n]=Number(a[1]))}const l={preset:r,rawXml:(new Px).serializeToString(a)};return Object.keys(o).length>0&&(l.adjustments=o),l}(e),m=function(e){if(sM(e,"tile"))return"tile"}(e),b=function(e){var t,n;const a=sM(e,"pic"),r=a&&sM(a,"spPr");if(r)for(let o=0;o<r.childNodes.length;o+=1){const e=r.childNodes[o];if(1!==(null==e?void 0:e.nodeType))continue;const a=e;if("ln"!==a.localName)continue;const i=zS(null==(t=sM(a,"srgbClr"))?void 0:t.getAttribute("val"));if(!i)return;const l={color:i},s=VS(a.getAttribute("w"));void 0!==s&&(l.widthPt=Ac(s/ft,2));const d=$o(null==(n=sM(a,"prstDash"))?void 0:n.getAttribute("val"));return d&&(l.dash=d),l}}(e),v=function(e){const t=sM(e,"xfrm");if(!t)return{};const n={},a=t.getAttribute("rot");if(a){const e=parseInt(a,10);Number.isFinite(e)&&0!==e&&(n.rotation=e/bt)}const r=t.getAttribute("flipH");"1"!==r&&"true"!==r||(n.flipH=!0);const o=t.getAttribute("flipV");return"1"!==o&&"true"!==o||(n.flipV=!0),n}(e),y="anchor"===(null==l?void 0:l.kind)?BS(l.element):void 0,w="anchor"===(null==l?void 0:l.kind)?function(e){const t=sM(e,"wrapPolygon");if(!t)return;const n=[];for(let a=0;a<t.childNodes.length;a+=1){const e=t.childNodes[a];if(1!==(null==e?void 0:e.nodeType))continue;const r=e;if("start"!==r.localName&&"lineTo"!==r.localName)continue;const o=VS(r.getAttribute("x")),i=VS(r.getAttribute("y"));void 0!==o&&void 0!==i&&n.push({x:o/21600,y:i/21600})}if(n.length>=2){const e=n[0],t=n[n.length-1];Math.abs(e.x-t.x)<1e-6&&Math.abs(e.y-t.y)<1e-6&&n.pop()}return n.length>=3?n:void 0}(l.element):void 0,x={width:u,height:p,...null!==h?{alt:h}:{},...f?{crop:f}:{},...g?{cropShape:g,cropFit:"fill"}:{},...m?{fillMode:m}:{},...b?{border:b}:{},...void 0!==v.rotation?{rotation:v.rotation}:{},...v.flipH?{flipH:!0}:{},...v.flipV?{flipV:!0}:{},...y?{floating:y}:{},...w?{wrapPolygon:w}:{}},M=o?n.get(o):void 0,S=i?n.get(i):void 0;if(S&&function(e){return/^[a-z][a-z0-9+.-]*:\/\//i.test(e)||e.startsWith("//")}(S))return{text:"",image:{src:"",linkedSrc:S,...x}};const A=M??S;if(A){const e=await bM(t,a,A);if(e)return{text:"",image:{src:e,...x}}}return{text:"",image:void 0}}function FS(e){const t=null==e?void 0:e.trim();if(!t)return;if(t.endsWith("%")){const e=Number(t.slice(0,-1));return Number.isFinite(e)&&0!==e?e/100:void 0}if(/f$/i.test(t)){const e=Number(t.slice(0,-1));return Number.isFinite(e)&&0!==e?e/65536:void 0}const n=Number(t);return Number.isFinite(n)&&0!==n?n/65536:void 0}async function DS(e,t,n,a){const r=sM(e,"imagedata");if(!r)return;const o=function(e){for(let t=0;t<e.attributes.length;t+=1){const n=e.attributes[t];if(n&&("id"===n.localName||"r:id"===n.name))return n.value}}(r),i=o?n.get(o):void 0;if(!i)return;const l=sM(e,"shape"),s=function(e){const t={};if(!e)return t;for(const n of e.split(";")){const e=n.indexOf(":");if(e<0)continue;const a=n.slice(0,e).trim().toLowerCase(),r=n.slice(e+1).trim();if("width"===a){const e=NS(r);null!==e&&(t.width=e)}else if("height"===a){const e=NS(r);null!==e&&(t.height=e)}}return t}(null==l?void 0:l.getAttribute("style")),d=function(e){const t={left:FS(lM(e,"cropleft")),top:FS(lM(e,"croptop")),right:FS(lM(e,"cropright")),bottom:FS(lM(e,"cropbottom"))};if(void 0!==t.left||void 0!==t.top||void 0!==t.right||void 0!==t.bottom)return t}(r),c=lM(r,"title")??r.getAttribute("o:title"),u=await bM(t,a,i);return u?{src:u,width:s.width??300,height:s.height??300,...c?{alt:c}:{},...d?{crop:d}:{}}:void 0}async function HS(e,t){const n=sM(e,"wsp");if(!n)return;const a=PS(e),r=(null==a?void 0:a.element)??e,o=sM(r,"extent"),i=LS(null==o?void 0:o.getAttribute("cx"))??300,l=LS(null==o?void 0:o.getAttribute("cy"))??300,s=sM(r,"docPr"),d=s?lM(s,"name"):null,c=s?lM(s,"descr")??lM(s,"title"):null,u="anchor"===(null==a?void 0:a.kind)?BS(a.element):void 0,p=sM(n,"txbxContent"),h=p&&t?await t(p):[],f=function(e){var t,n;const a=sM(e,"spPr");if(!a)return;const r={},o=sM(a,"prstGeom"),i=null==o?void 0:o.getAttribute("prst");i&&(r.preset=i);for(let l=0;l<a.childNodes.length;l+=1){const e=a.childNodes[l];if((null==e?void 0:e.nodeType)!==e.ELEMENT_NODE)continue;const o=e;if("solidFill"===o.localName){const e=zS(null==(t=sM(o,"srgbClr"))?void 0:t.getAttribute("val"));e&&(r.fill=e)}else if("ln"===o.localName){const e=VS(o.getAttribute("w"));void 0!==e&&(r.borderWidthPt=Ac(e/ft,2));const t=zS(null==(n=sM(o,"srgbClr"))?void 0:n.getAttribute("val"));t&&(r.borderColor=t)}}return Object.keys(r).length>0?r:void 0}(n),g=function(e){const t=sM(e,"bodyPr");if(!t)return;const n={},a=LS(t.getAttribute("lIns")),r=LS(t.getAttribute("tIns")),o=LS(t.getAttribute("rIns")),i=LS(t.getAttribute("bIns"));void 0!==a&&(n.paddingLeft=a),void 0!==r&&(n.paddingTop=r),void 0!==o&&(n.paddingRight=o),void 0!==i&&(n.paddingBottom=i);const l=t.getAttribute("anchor");l&&(n.anchor=l);const s=t.getAttribute("wrap");s&&(n.wrap=s);const d=t.getAttribute("vert");return"vert"!==d&&"vert270"!==d&&"wordArtVert"!==d||(n.vert=d),sM(t,"spAutoFit")&&(n.autoFit=!0),Object.keys(n).length>0?n:void 0}(n),m=function(e){const t=sM(e,"spPr");if(!t)return;const n=sM(t,"xfrm"),a=VS(null==n?void 0:n.getAttribute("rot"));return void 0!==a&&0!==a&&(Math.round(a/bt)%360+360)%360||void 0}(n);return{width:i,height:l,blocks:h,...u?{floating:u}:{},...void 0!==m?{rotation:m}:{},...d?{name:d}:{},...c?{alt:c}:{},...f?{shape:f}:{},...g?{body:g}:{}}}function US(e){let t;for(let n=0;n<e.childNodes.length;n+=1){const a=e.childNodes[n];if((null==a?void 0:a.nodeType)!==a.ELEMENT_NODE)continue;const r=a;if("Choice"!==r.localName)continue;const o=sM(r,"drawing");if(!o)continue;void 0===t&&(t=o);const i=r.getAttribute("Requires")??"";if(/\bwps\b/.test(i))return o}return t}function GS(e){const t=lM(e,"id");if(!t)return;if("bookmarkEnd"===e.localName)return{kind:"end",docxId:t};const n=lM(e,"name")??void 0,a=lM(e,"colFirst"),r=lM(e,"colLast"),o=null!==a?Number.parseInt(a,10):void 0,i=null!==r?Number.parseInt(r,10):void 0;return{kind:"start",docxId:t,...void 0!==n?{name:n}:{},...void 0===o||Number.isNaN(o)?{}:{colFirst:o},...void 0===i||Number.isNaN(i)?{}:{colLast:i}}}function jS(e){const t=lM(e,"id");if(t)return{kind:"commentRangeEnd"===e.localName?"end":"start",docxId:t}}async function ZS(e,t,n,a,r){const o=[];let i,l,s,d=0;const c=[],u=[],p=e=>{o.push(e),d+=e.length},h=e.childNodes;for(let f=0;f<h.length;f+=1){const e=h[f];if((null==e?void 0:e.nodeType)!==e.ELEMENT_NODE)continue;const o=e;if(o.namespaceURI===Yx)if("t"===o.localName)p(o.textContent??"");else if("tab"===o.localName)p("\t");else if("noBreakHyphen"===o.localName)p("‑");else if("softHyphen"===o.localName)p("­");else if("br"===o.localName)p("page"===lM(o,"type")?"\f":"\n");else{if("lastRenderedPageBreak"===o.localName)continue;if("bookmarkStart"===o.localName||"bookmarkEnd"===o.localName){const e=GS(o);e&&c.push({offset:d,marker:e});continue}if("commentRangeStart"===o.localName||"commentRangeEnd"===o.localName){const e=jS(o);e&&u.push({offset:d,marker:e});continue}if("proofErr"===o.localName||"commentReference"===o.localName||"permStart"===o.localName||"permEnd"===o.localName)continue;if("cr"===o.localName)p("\n");else if("drawing"===o.localName){const e=await WS(o,t,n,a);if(e.image)p(e.text),i=e.image;else{const e=await HS(o,r);e&&(p(""),l=e)}}else if("pict"===o.localName){const e=await DS(o,t,n,a);e&&(p(""),i=e)}else if("sym"===o.localName){const e=lM(o,"font")??"",t=lM(o,"char")??"",n=parseInt(t,16);p(Number.isFinite(n)&&n>0?String.fromCodePoint(n):"?"),s={font:e,char:t}}}else if("AlternateContent"===o.localName){const e=US(o);if(e){const t=await HS(e,r);t&&(p(""),l=t)}}}return{text:o.join(""),image:i,...l?{textBox:l}:{},...c.length>0?{innerBookmarks:c}:{},...u.length>0?{innerComments:u}:{},...s?{sym:s}:{}}}async function KS(e,t,n,a,r,o,i,l){var s,d,c;const u=[],p=[],h=(e,t)=>{const n=lM(e,"fldCharType"),a=lM(e,"fldLock"),r=lM(e,"dirty"),o="true"===a||"1"===a,i="true"===r||"1"===r;if("begin"===n)u.push({text:"",fieldChar:{kind:"begin",...o?{fieldLock:!0}:{},...i?{dirty:!0}:{}},...t?{styles:t}:{}}),p.push({beginIndex:u.length-1,instruction:"",...t?{beginStyles:t}:{}});else if("separate"===n)u.push({text:"",fieldChar:{kind:"separate"},...t?{styles:t}:{}});else if("end"===n){u.push({text:"",fieldChar:{kind:"end"},...t?{styles:t}:{}});const e=p.pop();e&&(e=>{var t;const n=/\bNUMPAGES\b/i.test(e.instruction)?"NUMPAGES":/\bPAGE\b/i.test(e.instruction)?"PAGE":null;if(!n)return;const a=u.slice(e.beginIndex);if(a.some(e=>e.bookmark))return;const r=a.filter(e=>!e.fieldChar&&void 0===e.fieldInstruction),o=r.map(e=>e.text).join("")||"1",i=(null==(t=r.find(e=>e.styles))?void 0:t.styles)??e.beginStyles;u.length=e.beginIndex,u.push({text:o,...i?{styles:i}:{},field:{type:n}})})(e)}},f=(e,t)=>{const n=e.textContent??"";u.push({text:"",fieldInstruction:n,...t?{styles:t}:{}});const a=p[p.length-1];a&&(a.instruction+=n)};for(let g=0;g<e.childNodes.length;g+=1){const p=e.childNodes[g];if((null==p?void 0:p.nodeType)!==p.ELEMENT_NODE)continue;const m=p;if(m.namespaceURI!==yS||"oMath"!==m.localName&&"oMathPara"!==m.localName){if(m.namespaceURI===Yx){if("bookmarkStart"===m.localName||"bookmarkEnd"===m.localName){const e=GS(m);if(!e)continue;u.push({text:"",bookmark:e});continue}if("commentRangeStart"===m.localName||"commentRangeEnd"===m.localName){const e=jS(m);if(!e)continue;u.push({text:"",comment:e});continue}if("sdt"===m.localName){const e=rM(m,Yx,"sdtContent");if(!e)continue;const s=rM(m,Yx,"sdtPr"),d=rM(m,Yx,"sdtEndPr"),c={groupId:Qe("sdt"),sdtPr:RS(s),...d?{sdtEndPrXml:(new Px).serializeToString(d)}:{}},p=await KS(e,t,n,a,r,o,i,l);for(const t of p)u.push({...t,sdtWrappers:[c,...t.sdtWrappers??[]]});continue}if("r"===m.localName){const e=QM(rM(m,Yx,"rPr"),o);if(tM(m,Yx,"fldChar").length>0||tM(m,Yx,"instrText").length>0){for(let t=0;t<m.childNodes.length;t+=1){const n=m.childNodes[t];if((null==n?void 0:n.nodeType)!==n.ELEMENT_NODE)continue;const a=n;a.namespaceURI===Yx&&("fldChar"===a.localName?h(a,e):"instrText"===a.localName&&f(a,e))}continue}const t=rM(m,Yx,"footnoteReference");if(t){const n=lM(t,"id");if(!n)continue;const a=lM(t,"customMarkFollows");let r=e;(s=r??(r={})).styleId??(s.styleId="footnoteReference"),void 0===r.superscript&&(r.superscript=!0),u.push({text:"?",styles:r,footnoteReference:{docxId:n,...a?{customMark:a}:{}}});continue}const c=rM(m,Yx,"endnoteReference");if(c){const t=lM(c,"id");if(!t)continue;const n=lM(c,"customMarkFollows");let a=e;(d=a??(a={})).styleId??(d.styleId="endnoteReference"),void 0===a.superscript&&(a.superscript=!0),u.push({text:"?",styles:a,endnoteReference:{docxId:t,...n?{customMark:n}:{}}});continue}const{text:p,image:g,textBox:b,innerBookmarks:v,innerComments:y,sym:w}=await ZS(m,n,a,r,l);let x=e;w&&!(null==x?void 0:x.fontFamily)&&((x??(x={})).fontFamily=w.font),i&&((x??(x={})).link=i);const M=[...(v??[]).map(e=>({offset:e.offset,run:{text:"",bookmark:e.marker}})),...(y??[]).map(e=>({offset:e.offset,run:{text:"",comment:e.marker}}))];if(M.length>0&&!g&&!b){M.sort((e,t)=>e.offset-t.offset);let e=0;for(const n of M){const t=p.slice(e,n.offset);t.length>0&&u.push({text:t,...x?{styles:x}:{}}),u.push(n.run),e=n.offset}const t=p.slice(e);t.length>0&&u.push({text:t,...x?{styles:x}:{}});continue}if(0===p.length&&!g&&!b)continue;if(u.push({text:p,...g?{image:g}:{},...b?{textBox:b}:{},...w?{sym:w}:{},...x?{styles:x}:{}}),v)for(const n of v)u.push({text:"",bookmark:n.marker});continue}if("fldSimple"===m.localName){const e=m.getAttribute("w:instr")??m.getAttributeNS(Yx,"instr")??m.getAttribute("instr")??"",s=/\bNUMPAGES\b/i.test(e)?"NUMPAGES":/\bPAGE\b/i.test(e)?"PAGE":null,d=await KS(m,t,n,a,r,o,i,l);if(s){const e=d.map(e=>e.text).join("")||"1",t=null==(c=d.find(e=>e.styles))?void 0:c.styles;u.push({text:e,styles:t,field:{type:s}})}else u.push({text:"",fieldChar:{kind:"begin"}}),u.push({text:"",fieldInstruction:e}),u.push({text:"",fieldChar:{kind:"separate"}}),u.push(...d),u.push({text:"",fieldChar:{kind:"end"}});continue}if("hyperlink"===m.localName){let e=a.get(m.getAttribute("r:id")??m.getAttributeNS("http://schemas.openxmlformats.org/officeDocument/2006/relationships","id")??"")??null;if(!e){const t=lM(m,"anchor");t&&(e=`#${t}`)}u.push(...await KS(m,t,n,a,r,o,e,l))}}}else u.push({text:"",math:CS(m)})}return u}const XS="http://schemas.openxmlformats.org/wordprocessingml/2006/main",YS=/<w:rPr(?:\s|\/|>)/,JS=/<w:pPr(?:\s|\/|>)/;function QS(e){if(Array.isArray(e))return e.map(QS);if(!e||"object"!=typeof e)return e;const t=e,n=function(e){return"string"==typeof e.kind||"string"==typeof e.type||Array.isArray(e.runs)||Array.isArray(e.rows)||Array.isArray(e.cells)||Array.isArray(e.blocks)}(t),a={};for(const[r,o]of Object.entries(t).sort(([e],[t])=>e.localeCompare(t)))void 0===o||"id"===r&&n||"ooxmlSource"===r||r.startsWith("__")||(a[r]=QS(o));return a}function $S(e){return JSON.stringify(QS(e))??"undefined"}function _S(e){return/\br:(?:id|embed|link)\s*=/.test(e)}function eA(e,t){const n=[];for(let a=0;a<e.childNodes.length;a+=1){const r=e.childNodes[a];(null==r?void 0:r.nodeType)===r.ELEMENT_NODE&&r.namespaceURI===XS&&r.localName===t&&n.push(r)}return n}function tA(e,t){return eA(e,t)[0]}function nA(e){return e?(new Px).serializeToString(e):void 0}function aA(e){return $S(e)}function rA(e){return $S({...e,text:void 0})}function oA(e,t){e.ooxmlSource={xml:t,semanticSignature:aA(e),structureSignature:rA(e)}}function iA(e){return e.ooxmlSource}function lA(e){return $S(e)}function sA(e){return $S({style:e.style,list:e.list})}function dA(e){return e.ooxmlSource}function cA(e){return $S(e)}function uA(e){return $S({style:e.style})}function pA(e){return $S({gridCols:e.gridCols,gridRevision:e.gridRevision})}function hA(e){return $S({isHeader:e.isHeader,style:e.style,conditionalStyle:e.conditionalStyle})}function fA(e){return $S({propertyExceptions:e.propertyExceptions,tblPrExChangeXml:e.tblPrExChangeXml})}function gA(e){return $S({colSpan:e.colSpan,rowSpan:e.rowSpan,vMerge:e.vMerge,style:e.style,conditionalStyle:e.conditionalStyle,mergeRevisionState:e.mergeRevisionState})}function mA(e){return e.ooxmlSource}function bA(e,t){const n=nA(tA(t,"tblPr")),a=nA(tA(t,"tblGrid")),r=eA(t,"tr");return r.length===e.rows.length&&r.forEach((t,n)=>{const a=e.rows[n];!function(e,t){const n={};t.rowPropertiesXml&&(n.rowProperties={xml:t.rowPropertiesXml,semanticSignature:hA(e)}),t.propertyExceptionsXml&&(n.propertyExceptions={xml:t.propertyExceptionsXml,semanticSignature:fA(e)}),(n.rowProperties||n.propertyExceptions)&&(e.ooxmlSource=n)}(a,{rowPropertiesXml:nA(tA(t,"trPr")),propertyExceptionsXml:nA(tA(t,"tblPrEx"))});const r=eA(t,"tc");r.length===a.cells.length&&r.forEach((e,t)=>{const n=nA(tA(e,"tcPr"));n&&function(e,t){e.ooxmlSource={cellProperties:{xml:t,semanticSignature:gA(e)}}}(a.cells[t],n)})}),{tablePropertiesXml:n,tableGridXml:a}}function vA(e){return e.ooxmlSource}function yA(e,t,n){const a=new Px,r=function(e,t){const n=t.serializeToString(e.cloneNode(!1)),a=n.indexOf(">");if(a<0)return;const r=n.slice(0,a+1),o=e.tagName;return r.slice(`<${o}`.length,r.endsWith("/>")?-2:-1).trim()||void 0}(e,a),o=t?rM(t,Yx,"sectPr"):null,i=o?void 0:a.serializeToString(e),l=t&&!o?a.serializeToString(t):void 0,s=function(e,t){const n=[],a=e=>{for(let r=0;r<e.childNodes.length;r+=1){const o=e.childNodes[r];if((null==o?void 0:o.nodeType)!==o.ELEMENT_NODE)continue;const i=o;i.namespaceURI!==Yx||"r"!==i.localName?(i.namespaceURI!==Yx||"pPr"!==i.localName&&"p"!==i.localName&&"tbl"!==i.localName&&"txbxContent"!==i.localName)&&a(i):n.push(t.serializeToString(i))}};return a(e),n}(e,a),d=s.length===n.length?s:void 0;if(i||r||l||d)return{...i?{xml:i}:{},...r?{attributes:r}:{},...l?{paragraphPropertiesXml:l}:{},...d?{runXml:d}:{}}}function wA(e){var t;const n={id:Qe("run"),text:e.text};let a;e.styles&&(n.styles={...e.styles}),(null==(t=e.sdtWrappers)?void 0:t.length)&&(n.sdtWrappers=[...e.sdtWrappers]),a=e.fieldChar?{...n,kind:"fieldChar",fieldChar:{...e.fieldChar}}:void 0!==e.fieldInstruction?{...n,kind:"fieldInstruction",fieldInstruction:e.fieldInstruction}:e.field?{...n,kind:"field",field:{...e.field}}:e.textBox?{...n,kind:"textBox",textBox:e.textBox}:e.image?{...n,kind:"image",image:e.image}:e.sym?{...n,kind:"sym",sym:{...e.sym}}:e.math?{...n,text:At,kind:"math",math:e.math}:{...n,kind:"text"};const r=a;return e.footnoteReference&&(r.__importedFootnoteRef={...e.footnoteReference}),e.endnoteReference&&(r.__importedEndnoteRef={...e.endnoteReference}),e.bookmark&&(r.__importedBookmark={...e.bookmark}),e.comment&&(r.__importedComment={...e.comment}),r}function xA(e,t,n,a,r){var o,i;const l=e.length>0?e.map(wA):[{id:Qe("run"),text:"",kind:"text",...a?{styles:{...a}}:{}}],s={id:Qe("paragraph"),type:"paragraph",runs:l};s.style=t?{...t}:void 0;for(const d of s.runs)d.styles=JM(d.styles,null==(o=s.style)?void 0:o.styleId);if(s.list=n?{...n}:void 0,(null==(i=null==r?void 0:r.runXml)?void 0:i.length)===s.runs.length)for(let d=0;d<s.runs.length;d+=1)oA(s.runs[d],r.runXml[d]);return r&&function(e,t){const n={};t.xml&&(n.xml=t.xml,n.semanticSignature=lA(e)),t.attributes&&(n.attributes=t.attributes),t.paragraphPropertiesXml&&(n.paragraphProperties={xml:t.paragraphPropertiesXml,semanticSignature:sA(e)}),(n.xml||n.attributes||n.paragraphProperties)&&(e.ooxmlSource=n)}(s,r),s}function MA(e){return e.some(e=>e.image||e.textBox||e.field||e.fieldChar||void 0!==e.fieldInstruction||e.bookmark||e.comment||e.text.replace(/\s/g,"").length>0)}async function SA(e,t,n,a,r,o,i,l){const s=rM(e,Yx,"pPr"),d=await KS(e,t,n,a,r,o,void 0,i),c=pS(hS(s,o.colors)),u=QM(rM(s,Yx,"rPr"),o),p=function(e,t){if(!e)return;const n=rM(e,Yx,"numPr");if(!n)return;const a=lM(rM(n,Yx,"numId"),"val");if(!a)return;const r=lM(rM(n,Yx,"ilvl"),"val")??"0",o=Number.parseInt(r,10),i=Number.isFinite(o)?o:0,l=DM(t,a,i),s=[];for(let g=0;g<=i;g+=1)s[g]=DM(t,a,g).format??"decimal";const d=`${a}:${i}`,c=!t.seenInstances.has(d);t.seenInstances.add(d);const u=c?t.numStartOverrides.get(d)??l.startAt:void 0,p={kind:l.kind??"ordered",level:i,instanceId:a,suffix:l.suffix??"tab",...l.format?{format:l.format}:{},...s.length?{levelFormats:s}:{},...l.levelText?{levelText:l.levelText}:{},...l.alignment?{alignment:l.alignment}:{},...void 0!==l.legal?{legal:l.legal}:{},...void 0!==u&&1!==u?{startAt:u}:{},...l.bulletGlyph?{bulletGlyph:l.bulletGlyph}:{},...l.bulletFont?{bulletFont:l.bulletFont}:{}},h=WM(a,1),f=WM(t.numToAbstractId.get(a),0);return(void 0!==h||void 0!==f||l.rawFormat||void 0!==l.restartAfterLevel||l.paragraphStyleId)&&function(e,t){e.ooxmlNumbering={...t,importedFormat:e.format,importedKind:e.kind}}(p,{...void 0!==h?{sourceNumId:h}:{},...void 0!==f?{sourceAbstractNumId:f}:{},...l.rawFormat?{format:l.rawFormat}:{},...void 0!==l.restartAfterLevel?{restartAfterLevel:l.restartAfterLevel}:{},...l.paragraphStyleId?{paragraphStyleId:l.paragraphStyleId}:{}}),{list:p,indent:l.indent}}(s,t),h=null==p?void 0:p.list;let f=c;if(null==p?void 0:p.indent){const{left:e,hanging:t}=p.indent,n=c??{};f={...n,...void 0===n.indentLeft&&void 0!==e?{indentLeft:e}:{},...void 0===n.indentHanging&&void 0!==t?{indentHanging:t}:{}}}const g=function(e){if(!e)return;const t=sn(e,Mt),n=sn(void 0,Mt);return GM({styleId:e.styleId,align:t.align!==n.align?t.align:void 0,spacingBefore:t.spacingBefore!==n.spacingBefore?t.spacingBefore:void 0,spacingAfter:t.spacingAfter!==n.spacingAfter?t.spacingAfter:void 0,contextualSpacing:void 0!==e.contextualSpacing||t.contextualSpacing!==n.contextualSpacing?t.contextualSpacing:void 0,lineHeight:t.lineHeight!==n.lineHeight?t.lineHeight:void 0,lineRule:t.lineRule??void 0,lineGridPitch:e.lineGridPitch??void 0,snapToGrid:void 0!==e.snapToGrid||t.snapToGrid!==n.snapToGrid?t.snapToGrid:void 0,indentLeft:void 0!==e.indentLeft||t.indentLeft!==n.indentLeft?t.indentLeft:void 0,indentRight:void 0!==e.indentRight||t.indentRight!==n.indentRight?t.indentRight:void 0,indentFirstLine:void 0!==e.indentFirstLine||t.indentFirstLine!==n.indentFirstLine?t.indentFirstLine:void 0,indentHanging:void 0!==e.indentHanging||t.indentHanging!==n.indentHanging?t.indentHanging:void 0,mirrorIndents:void 0!==e.mirrorIndents||t.mirrorIndents!==n.mirrorIndents?t.mirrorIndents:void 0,pageBreakBefore:void 0!==e.pageBreakBefore||t.pageBreakBefore!==n.pageBreakBefore?t.pageBreakBefore:void 0,keepWithNext:void 0!==e.keepWithNext||t.keepWithNext!==n.keepWithNext?t.keepWithNext:void 0,keepLinesTogether:void 0!==e.keepLinesTogether||t.keepLinesTogether!==n.keepLinesTogether?t.keepLinesTogether:void 0,widowControl:void 0!==e.widowControl||t.widowControl!==n.widowControl?t.widowControl:void 0,shading:e.shading??void 0,borderTop:e.borderTop??void 0,borderRight:e.borderRight??void 0,borderBottom:e.borderBottom??void 0,borderLeft:e.borderLeft??void 0,tabs:e.tabs??void 0,textDirection:e.textDirection??void 0,outlineLevel:e.outlineLevel??void 0,suppressLineNumbers:void 0!==e.suppressLineNumbers||t.suppressLineNumbers!==n.suppressLineNumbers?t.suppressLineNumbers:void 0,suppressAutoHyphens:void 0!==e.suppressAutoHyphens||t.suppressAutoHyphens!==n.suppressAutoHyphens?t.suppressAutoHyphens:void 0,bidi:void 0!==e.bidi||t.bidi!==n.bidi?t.bidi:void 0,kinsoku:void 0!==e.kinsoku||t.kinsoku!==n.kinsoku?t.kinsoku:void 0,wordWrap:void 0!==e.wordWrap||t.wordWrap!==n.wordWrap?t.wordWrap:void 0,overflowPunct:void 0!==e.overflowPunct||t.overflowPunct!==n.overflowPunct?t.overflowPunct:void 0,topLinePunct:void 0!==e.topLinePunct||t.topLinePunct!==n.topLinePunct?t.topLinePunct:void 0,autoSpaceDE:void 0!==e.autoSpaceDE||t.autoSpaceDE!==n.autoSpaceDE?t.autoSpaceDE:void 0,autoSpaceDN:void 0!==e.autoSpaceDN||t.autoSpaceDN!==n.autoSpaceDN?t.autoSpaceDN:void 0,adjustRightInd:void 0!==e.adjustRightInd||t.adjustRightInd!==n.adjustRightInd?t.adjustRightInd:void 0,textAlignment:e.textAlignment??void 0,textboxTightWrap:e.textboxTightWrap??void 0,divId:e.divId??void 0,conditionalStyle:e.conditionalStyle??void 0,borderBetween:e.borderBetween??void 0,borderBar:e.borderBar??void 0,framePrXml:e.framePrXml??void 0})}(f),m=function(e,t){var n;const a=rM(e,Yx,"framePr");if(!a)return null;const r=lM(a,"dropCap");if(!r||"none"===r)return null;const o=t.map(e=>e.text).join("");if(0===o.length)return null;const i=Number(lM(a,"lines"));return{text:o,lines:Number.isFinite(i)&&i>0?i:3,type:"margin"===r?"margin":"drop",style:null==(n=t[0])?void 0:n.styles}}(s,d);if(m)return{paragraphs:[],pageBreakAfter:!1,dropCapFrame:m};const{segments:b,hasPageBreak:v}=function(e){const t=[[]];let n=!1;const a=(e,n)=>{(0!==n.length||e.image||e.textBox||e.field||e.fieldChar||void 0!==e.fieldInstruction||e.bookmark||e.comment)&&t[t.length-1].push({...e,text:n})};for(const r of e){if(!r.text.includes("\f")){a(r,r.text);continue}const e=r.text.split("\f");e.forEach((o,i)=>{a(r,o),i<e.length-1&&(n=!0,t.push([]))})}return{segments:t,hasPageBreak:n}}(d);if(!v){return{paragraphs:[xA(d,g,h,u,yA(e,s,d))],pageBreakAfter:!1}}const y=[];let w=!1;for(let x=0;x<b.length;x+=1){const e=b[x];if(x>0&&(w=!0),!MA(e))continue;const t=w?{...g??{},pageBreakBefore:!0}:g;y.push(xA(e,t,h,u)),w=!1}return{paragraphs:y,pageBreakAfter:w}}async function AA(e,t,n,a,r,o,i,l){return(await SA(e,t,n,a,r,o,i)).paragraphs[0]??at([{text:""}])}function IA(e,t,n,a){for(const r of Xx(e)){if(r.namespaceURI!==Yx)continue;if(r.localName===t){a.push({element:r,...n.length>0?{sdtWrappers:n}:{}});continue}if("sdt"!==r.localName)continue;const e=rM(r,Yx,"sdtContent");if(!e)continue;const o=rM(r,Yx,"sdtPr"),i=rM(r,Yx,"sdtEndPr"),l={groupId:Qe("sdt"),sdtPr:RS(o),...i?{sdtEndPrXml:(new Px).serializeToString(i)}:{}};IA(e,t,[...n,l],a)}}function CA(e,t){const n=[];return IA(e,t,[],n),n}function TA(e,t){if(!t.every(e=>"paragraph"===e.type))return;const n=tM(e,Yx,"p");n.length===t.length&&function(e,t){var n,a;const r=e=>e.style??(e.style={}),o=e.length-1;for(let i=0;i<e.length;i+=1){const n=t[i];n&&(0===i&&n.before&&(r(e[i]).spacingBefore=0),i===o&&n.after&&(r(e[i]).spacingAfter=0))}for(let i=0;i<o;i+=1){if(!(null==(n=t[i])?void 0:n.after)||!(null==(a=t[i+1])?void 0:a.before))continue;const o=r(e[i]),l=r(e[i+1]);(o.spacingAfter??0)>=(l.spacingBefore??0)?l.spacingBefore=0:o.spacingAfter=0}}(t,n.map(e=>function(e){const t=rM(e,Yx,"spacing");return{before:cM(lM(t,"beforeAutospacing")),after:cM(lM(t,"afterAutospacing"))}}(rM(e,Yx,"pPr"))))}async function kA(e,t,n,a,r,o,i,l){var s,d;const c=[],u=rM(e,Yx,"tblGrid");if(u)for(const w of tM(u,Yx,"gridCol")){const e=AM(lM(w,"w"));void 0!==e&&c.push(e)}const p=rM(u,Yx,"tblGridChange"),h=rM(e,Yx,"tblPr"),f=lM(rM(h,Yx,"tblStyle"),"val"),g=oS(h,f??void 0),m=function(e){const t=rM(e,Yx,"tblLook"),n=e=>{const n=lM(t,e);return null===n||""===n?void 0:cM(n)},a=lM(t,"val"),r=a?Number.parseInt(a,16):Number.NaN,o=e=>Number.isFinite(r)?0!==(r&e):void 0;return{firstRow:n("firstRow")??o(32)??!0,lastRow:n("lastRow")??o(64)??!1,firstCol:n("firstColumn")??o(128)??!0,lastCol:n("lastColumn")??o(256)??!1,noHBand:n("noHBand")??o(512)??!1,noVBand:n("noVBand")??o(1024)??!1}}(h),b=CA(e,"tr"),v=[];for(let w=0;w<b.length;w+=1){const e=b[w],t=e.element,n=rM(t,Yx,"trPr"),a=nS(n),r=CA(t,"tc"),l=[];for(let d=0;d<r.length;d+=1){const e=r[d],t=e.element,n=rM(t,Yx,"tcPr"),a=await i(t);TA(t,a);const c=lS(n);if("continue"===dS(n)&&l.length>0){const e=l[l.length-1];e.colSpan=(e.colSpan??1)+c;continue}const u=sS(n),p=cS(n,0,o.colors),h=rt(a.length>0?a:[at([{text:""}])],c,"restart"===u?{rowSpan:1,vMerge:u}:u?{vMerge:u}:void 0);p&&(h.style=p),h.conditionalStyle=nS(n),(null==(s=e.sdtWrappers)?void 0:s.length)&&(h.sdtWrappers=[...e.sdtWrappers]);const f=dM(t);f&&(h.extAttributes=f),"continue"===u&&(h.blocks=[]),l.push(h)}const c=ot(l,uS(t)?{isHeader:!0}:void 0),u=iS(n);u&&(c.style=u),c.conditionalStyle=a,(null==(d=e.sdtWrappers)?void 0:d.length)&&(c.sdtWrappers=[...e.sdtWrappers]);const p=dM(t);p&&(c.extAttributes=p);const h=rM(t,Yx,"tblPrEx");if(h){const e=oS(h);e&&(c.propertyExceptions=e);const t=rM(h,Yx,"tblPrExChange");t&&(c.tblPrExChangeXml=(new Px).serializeToString(t))}v.push(c)}for(let w=0;w<v.length;w+=1){const e=v[w];for(let t=0;t<e.cells.length;t+=1){const n=e.cells[t];if("restart"!==n.vMerge)continue;let a=1;for(let e=w+1;e<v.length;e+=1){const n=v[e].cells[t];if(!n||"continue"!==n.vMerge)break;a+=1}a>1&&(n.rowSpan=a)}}const y=it(v,c.length>0?c:void 0);if(g&&(y.style=g),y.style?y.style.tblLook=m:f&&(y.style={tblLook:m}),p){const e=rM(p,Yx,"tblGrid"),t=e?tM(e,Yx,"gridCol").map(e=>AM(lM(e,"w"))).filter(e=>void 0!==e):[],n=lM(p,"date"),a=n?Date.parse(n):Number.NaN;y.gridRevision={id:lM(p,"id")??"revision:grid",author:lM(p,"author")??"Unknown",date:Number.isFinite(a)?a:0,type:"grid",previous:t}}return function(e,t){let n="string"==typeof t?{xml:t}:t;if("string"==typeof t){const a=(new Ox).parseFromString(t,"application/xml").documentElement;(null==a?void 0:a.namespaceURI)===XS&&"tbl"===a.localName&&(n={...n,...bA(e,a)})}const a={xml:n.xml,semanticSignature:cA(e)};n.tablePropertiesXml&&(a.tableProperties={xml:n.tablePropertiesXml,semanticSignature:uA(e)}),n.tableGridXml&&(a.tableGrid={xml:n.tableGridXml,semanticSignature:pA(e)}),e.ooxmlSource=a}(y,(new Px).serializeToString(e)),y}async function RA(e,t,n,a,r,o,i){if(e.namespaceURI!==Yx)return[];if("p"===e.localName){return(await SA(e,t,n,a,r,o,i)).paragraphs}return"tbl"===e.localName?[await kA(e,0,0,0,0,o,i)]:"sdt"===e.localName?EA(e,t,n,a,r,o,i):[]}async function EA(e,t,n,a,r,o,i){const l=rM(e,Yx,"sdtPr"),s=rM(e,Yx,"sdtEndPr"),d={groupId:Qe("sdt"),sdtPr:RS(l),...s?{sdtEndPrXml:(new Px).serializeToString(s)}:{}},c=rM(e,Yx,"sdtContent"),u=[];if(c)for(let p=0;p<c.childNodes.length;p+=1){const e=c.childNodes[p];(null==e?void 0:e.nodeType)===e.ELEMENT_NODE&&u.push(...await RA(e,t,n,a,r,o,i))}for(const p of u)p.sdtWrappers=[d,...p.sdtWrappers??[]];return u}function LA(e,t,n,a,r){return o=>async function(e,t,n,a,r,o){const i=LA(t,n,a,r,o),l=[];for(let s=0;s<e.childNodes.length;s+=1){const d=e.childNodes[s];(null==d?void 0:d.nodeType)===d.ELEMENT_NODE&&l.push(...await RA(d,t,n,a,r,o,i))}return l}(o,e,t,n,a,r)}async function VA(e,t,n,a,r,o,i){if(!e)return[];const l=(new Ox).parseFromString(e,"application/xml").documentElement;if(!l)return[];const s=LA(t,n,a,r,o),d=[];for(let c=0;c<l.childNodes.length;c+=1){const e=l.childNodes[c];if((null==e?void 0:e.nodeType)!==e.ELEMENT_NODE)continue;const i=e;"p"===i.localName&&i.namespaceURI===Yx?d.push(await AA(i,t,n,a,r,o,s)):"tbl"===i.localName&&i.namespaceURI===Yx&&d.push(await kA(i,0,0,0,0,o,s))}return d}const NA=new Set(["separator","continuationSeparator","continuationNotice"]);async function zA(e,t,n,a,r,o,i,l){const s={byDocxId:new Map,notes:{items:{}}};if(!t)return s;const d=(new Ox).parseFromString(t,"application/xml").documentElement;if(!d)return s;const c={},u=new Map;let p,h;const f=tM(d,Yx,e);let g=0;const m=LA(n,a,r,o,i);for(const b of f){const t=lM(b,"id")??"",l=lM(b,"type")??"",s=[];for(let e=0;e<b.childNodes.length;e+=1){const t=b.childNodes[e];if((null==t?void 0:t.nodeType)!==t.ELEMENT_NODE)continue;const l=t;l.namespaceURI===Yx&&("p"===l.localName?s.push(await AA(l,n,a,r,o,i,m)):"tbl"===l.localName&&s.push(await kA(l,0,0,0,0,i,m)))}if(NA.has(l)){"separator"===l?p=s:"continuationSeparator"===l&&(h=s);continue}if(("-1"===t||"0"===t)&&0===s.length)continue;g+=1;const d=`${e}:imported:${g}`,f=Number.parseInt(t,10),v={id:d,blocks:s.length>0?s:[],docxId:Number.isFinite(f)?f:void 0};c[d]=v,t&&u.set(t,v)}return{byDocxId:u,notes:{items:c,separator:p,continuationSeparator:h},separator:p,continuationSeparator:h}}const PA=new Set(["_GoBack"]);function OA(e,t,n){if("paragraph"===e.type){let a=0;const r=[];for(const o of e.runs){const i=o.__importedBookmark;i?(t.push({marker:i,anchor:{paragraphId:e.id,offset:a,seq:n.value}}),n.value+=1):(a+=o.text.length,r.push(o))}return void(r.length!==e.runs.length&&(e.runs=r.length>0?r:[et("")]))}for(const a of e.rows)for(const e of a.cells)for(const a of e.blocks)OA(a,t,n)}function qA(e){var t;const n=[],a={value:0},r=e=>{null==e||e.forEach(e=>OA(e,n,a))};for(const c of e)r(c.blocks),r(c.header),r(c.firstPageHeader),r(c.evenPageHeader),r(c.footer),r(c.firstPageFooter),r(c.evenPageFooter);if(0===n.length)return;const o=new Map,i=new Map;for(const c of n){const e="start"===c.marker.kind?o:i,t=e.get(c.marker.docxId);t?t.push(c):e.set(c.marker.docxId,[c])}const l={},s=[],d=n.filter(e=>"start"===e.marker.kind);for(const c of d){const{marker:e,anchor:n}=c,a=e.name;if(!a||PA.has(a))continue;const r=Number.parseInt(e.docxId,10),o=null==(t=i.get(e.docxId))?void 0:t.shift(),d=$e(),u={id:d,name:a,start:n};a.startsWith("_")&&(u.hidden=!0),Number.isNaN(r)||(u.docxIdHint=r),void 0!==e.colFirst&&(u.colFirst=e.colFirst),void 0!==e.colLast&&(u.colLast=e.colLast),o&&(u.end=o.anchor),l[d]=u,s.push(d)}return 0!==s.length?{items:l,order:s}:void 0}function BA(e,t,n){if("paragraph"===e.type){let a=0;const r=[];for(const o of e.runs){const i=o.__importedComment;i?(t.push({marker:i,anchor:{paragraphId:e.id,offset:a,seq:n.value}}),n.value+=1):(a+=o.text.length,r.push(o))}return void(r.length!==e.runs.length&&(e.runs=r.length>0?r:[et("")]))}for(const a of e.rows)for(const e of a.cells)for(const a of e.blocks)BA(a,t,n)}function WA(e){const t=[],n={value:0},a=e=>{null==e||e.forEach(e=>BA(e,t,n))};for(const o of e)a(o.blocks),a(o.header),a(o.firstPageHeader),a(o.evenPageHeader),a(o.footer),a(o.firstPageFooter),a(o.evenPageFooter);const r=new Map;for(const{marker:o,anchor:i}of t){const e=r.get(o.docxId)??{};"start"===o.kind?e.start=i:e.end=i,r.set(o.docxId,e)}return r}const FA="http://schemas.microsoft.com/office/word/2012/wordml";function DA(e){let t="";for(let n=0;n<e.childNodes.length;n+=1){const a=e.childNodes[n];if((null==a?void 0:a.nodeType)!==a.ELEMENT_NODE)continue;const r=a;if(r.namespaceURI===Yx){if("t"===r.localName){t+=r.textContent??"";continue}if("tab"===r.localName){t+="\t";continue}if("br"===r.localName||"cr"===r.localName){t+="\n";continue}}t+=DA(r)}return t}function HA(e){if(!e)return;const t=Date.parse(e);return Number.isNaN(t)?void 0:t}function UA(e,t){const n=new Map;if(!e)return n;const a=(new Ox).parseFromString(e,"application/xml").documentElement;if(!a)return n;const r=function(e){const t=new Map;if(!e)return t;const n=(new Ox).parseFromString(e,"application/xml").documentElement;if(!n)return t;for(const a of tM(n,FA,"commentEx")){const e=a.getAttributeNS(FA,"paraId");if(!e)continue;const n=a.getAttributeNS(FA,"done");t.set(e,"1"===n||"true"===n)}return t}(t);for(const o of tM(a,Yx,"comment")){const e=lM(o,"id");if(null===e)continue;const t=lM(o,"author")??"",a=lM(o,"initials")??void 0,i=HA(lM(o,"date")),l=HA(o.getAttributeNS("http://schemas.microsoft.com/office/word/2023/wordml/word16du","dateUtc")),s=tM(o,Yx,"p"),d=s.map(e=>DA(e)).join("\n").trim(),c=s.length>0?lM(s[0],"paraId")??void 0:void 0,u=void 0!==c?r.get(c):void 0;n.set(e,{author:t,...a?{initials:a}:{},...void 0!==i?{date:i}:{},...void 0!==l?{dateUtc:l}:{},text:d,...u?{resolved:u}:{},...c?{paraId:c}:{}})}return n}async function GA(e,t={}){var n,a,r,o,i,l,s,d,c,u,p,h,f,g,m;null==(n=t.onProgress)||n.call(t,"opening-docx");const b=await Ob.loadAsync(e),v=await(null==(a=b.file("word/document.xml"))?void 0:a.async("string"));if(!v)throw new Error("Missing word/document.xml");const y=vM(await(null==(r=b.file("word/_rels/document.xml.rels"))?void 0:r.async("string"))),w=function(e){const t={abstractLevels:new Map,numOverrideLevels:new Map,numStartOverrides:new Map,numToAbstractId:new Map,seenInstances:new Set};if(!e)return t;const n=(new Ox).parseFromString(e,"application/xml").documentElement;if(!n)return t;for(const a of Array.from(n.getElementsByTagNameNS(Yx,"abstractNum"))){const e=lM(a,"abstractNumId");if(e)for(const n of tM(a,Yx,"lvl")){const a=lM(n,"ilvl")??"0";t.abstractLevels.set(`${e}:${a}`,FM(n))}}for(const a of Array.from(n.getElementsByTagNameNS(Yx,"num"))){const e=lM(a,"numId"),n=lM(rM(a,Yx,"abstractNumId"),"val");if(e&&n){t.numToAbstractId.set(e,n);for(const n of tM(a,Yx,"lvlOverride")){const a=lM(n,"ilvl")??"0",r=rM(n,Yx,"lvl");r&&t.numOverrideLevels.set(`${e}:${a}`,FM(r));const o=BM(rM(n,Yx,"startOverride"));void 0!==o&&t.numStartOverrides.set(`${e}:${a}`,o)}}}return t}(await(null==(o=b.file("word/numbering.xml"))?void 0:o.async("string"))??null),x=function(e){const t={adjustLineHeightInTable:!0};if(!e)return t;const n=(new Ox).parseFromString(e,"application/xml"),a=AM(lM(rM(n.documentElement,Yx,"defaultTabStop"),"val"));void 0!==a&&(t.defaultTabStop=a);const r=rM(n.documentElement,Yx,"autoHyphenation");if(r){const e=lM(r,"val");t.autoHyphenation="0"!==e&&"false"!==e}const o=rM(n.documentElement,Yx,"doNotHyphenateCaps");if(o){const e=lM(o,"val");t.doNotHyphenateCaps="0"!==e&&"false"!==e}const i=Number.parseInt(lM(rM(n.documentElement,Yx,"consecutiveHyphenLimit"),"val")??"",10);Number.isFinite(i)&&i>=0&&(t.consecutiveHyphenLimit=i);const l=AM(lM(rM(n.documentElement,Yx,"hyphenationZone"),"val"));void 0!==l&&(t.hyphenationZone=l),t.footnoteSettings=zM(rM(n.documentElement,Yx,"footnotePr")),t.endnoteSettings=zM(rM(n.documentElement,Yx,"endnotePr"));const s=rM(n.documentElement,Yx,"compat");if(s){const e=rM(s,Yx,"adjustLineHeightInTable");if(e){const n=lM(e,"val");t.adjustLineHeightInTable="0"!==n&&"false"!==n}const n=rM(s,Yx,"allowSpaceOfSameStyleInTable");if(n){const e=lM(n,"val");t.allowSpaceOfSameStyleInTable="0"!==e&&"false"!==e}}return t}(await(null==(i=b.file("word/settings.xml"))?void 0:i.async("string"))??null),M=await(null==(l=b.file("word/styles.xml"))?void 0:l.async("string"))??null,S=function(e){if(!e)return;const t=(new Ox).parseFromString(e,"application/xml").getElementsByTagNameNS(Yx,"fonts")[0];if(!t)return;const n=[];for(const a of tM(t,Yx,"font")){const e=lM(a,"name");if(!e)continue;const t={name:e},r=lM(rM(a,Yx,"altName"),"val");r&&(t.altName=r);const o=lM(rM(a,Yx,"family"),"val");o&&(t.family=o);const i=lM(rM(a,Yx,"pitch"),"val");i&&(t.pitch=i);const l=lM(rM(a,Yx,"charset"),"val");l&&(t.charset=l);const s=lM(rM(a,Yx,"panose1"),"val");s&&(t.panose1=s);const d=rM(a,Yx,"sig");if(d){const e={};for(let t=0;t<d.attributes.length;t+=1){const n=d.attributes[t];e[n.localName??n.name]=n.value}Object.keys(e).length>0&&(t.sig=e)}n.push(t)}return n.length>0?n:void 0}(await(null==(s=b.file("word/fontTable.xml"))?void 0:s.async("string"))??null),A=await(null==(d=b.file("word/theme/theme1.xml"))?void 0:d.async("string"))??null,I=null!==A,C=LM(A),T=function(e,t){if(!e)return;const n=(new Ox).parseFromString(e,"application/xml").documentElement;if(!n)return;const a=rM(n,Yx,"docDefaults"),r=rM(rM(a,Yx,"pPrDefault"),Yx,"pPr"),o=rM(rM(a,Yx,"rPrDefault"),Yx,"rPr"),i=r?{spacingBefore:0,spacingAfter:0,...pS(hS(r,t.colors))}:pS(hS(r,t.colors)),l=QM(o,t),s={};let d;for(const c of tM(n,Yx,"style")){const e=lM(c,"styleId"),n=lM(c,"type");if(!e||"paragraph"!==n&&"character"!==n&&"table"!==n)continue;const a=lM(rM(c,Yx,"name"),"val")??e,r=lM(rM(c,Yx,"basedOn"),"val")??void 0,o=lM(rM(c,Yx,"next"),"val")??void 0,u=uM(c,"qFormat"),p=uM(c,"semiHidden"),h=uM(c,"unhideWhenUsed"),f=lM(rM(c,Yx,"uiPriority"),"val"),g=null===f?NaN:Number(f),m=Number.isInteger(g)&&g>=0?g:void 0,b=pS(hS(rM(c,Yx,"pPr"),t.colors)),v=QM(rM(c,Yx,"rPr"),t);let y;if("table"===n){const n=rM(c,Yx,"tblPr"),a=e=>{const t=lM(rM(n,Yx,e),"val"),a=t?Number(t):Number.NaN;return Number.isFinite(a)&&a>0?Math.floor(a):void 0},r=a("tblStyleRowBandSize"),o=a("tblStyleColBandSize"),i={};for(const e of tM(c,Yx,"tblStylePr")){const n=lM(e,"type");if(!n)continue;const a=rM(e,Yx,"tcPr"),r=cS(a,0,t.colors),o=oS(rM(e,Yx,"tblPr")),l=KM(rM(a,Yx,"shd"),t.colors),s=QM(rM(e,Yx,"rPr"),t),d=jM(UM(rM(a,Yx,"tcBorders"))),c=hS(rM(e,Yx,"pPr"),t.colors),u=iS(rM(e,Yx,"trPr"));(l||s||d||c||u||r||o)&&(i[n]={...l?{shading:l}:{},...s?{textStyle:s}:{},...d?{borders:d}:{},...c?{paragraphStyle:c}:{},...u?{rowStyle:u}:{},...r?{cellStyle:r}:{},...o?{tableStyle:o}:{}})}y={...oS(n,e)??{styleId:e},...void 0!==r?{rowBandSize:r}:{},...void 0!==o?{colBandSize:o}:{},...Object.keys(i).length>0?{conditionalFormats:i}:{}}}const w="paragraph"===n&&cM(lM(c,"default"));w&&(d=e),s[e]={id:e,name:a,type:n,isDefault:cM(lM(c,"default")),basedOn:r,nextStyle:o,qFormat:u,uiPriority:m,semiHidden:p,unhideWhenUsed:h,paragraphStyle:"paragraph"===n&&w?ZM(i,b):b,textStyle:"paragraph"===n&&w?ZM(l,v):v,tableStyle:y}}return d&&s[d]?s:((i||l)&&(s.Normal={id:"Normal",name:"Normal",type:"paragraph",paragraphStyle:i,textStyle:l}),jM(s))}(M,C);null==(c=t.onProgress)||c.call(t,"parsing-document");const k=(new Ox).parseFromString(v,"application/xml"),R=k.documentElement?rM(k.documentElement,Yx,"background"):null,E=(null==R?void 0:R.getAttribute("w:color"))??(null==R?void 0:R.getAttributeNS(Yx,"color"))??null,L=k.getElementsByTagNameNS(Yx,"body")[0];if(!L)return Dn([at([{text:""}])]);const V={assets:{},byPath:new Map,nextId:1};let N=null;const z=[],P=[[]];let O=!1,q=null;const B=e=>{O&&(e.style={...e.style??{},pageBreakBefore:!0},O=!1),q&&"paragraph"===e.type&&(e.dropCap=q,q=null),P[P.length-1].push(e)};let W=0;for(let de=0;de<L.childNodes.length;de+=1){const e=L.childNodes[de];if((null==e?void 0:e.nodeType)===e.ELEMENT_NODE){const t=e;t.namespaceURI===Yx&&"sectPr"!==t.localName&&(W+=1)}}let F=0;const D=()=>{var e;F+=1,W>0&&(null==(e=t.onProgress)||e.call(t,"parsing-document",F/W))},H=LA(w,b,y,V,C);for(let de=0;de<L.childNodes.length;de+=1){const e=L.childNodes[de];if((null==e?void 0:e.nodeType)!==e.ELEMENT_NODE)continue;const t=e;if(t.namespaceURI===Yx){if("sectPr"===t.localName)z.push(mS(t)),P.push([]),O=!1;else if("p"===t.localName){const e=await SA(t,w,b,y,V,C,H);for(const t of e.paragraphs)B(t);e.dropCapFrame&&(q=e.dropCapFrame),e.pageBreakAfter&&(O=!0);const n=rM(t,Yx,"pPr"),a=n?rM(n,Yx,"sectPr"):null;a&&(z.push(mS(a)),P.push([]),O=!1),D()}else if("tbl"===t.localName)B(await kA(t,0,0,0,0,C,H)),D();else if("sdt"===t.localName){for(const e of await EA(t,w,b,y,V,C,H))B(e);D()}await hM(50,F)}}if(0===z.length){const e=rM(L,Yx,"sectPr");z.push(e?mS(e):{pageSettings:bS(L),headerRIds:{},footerRIds:{}})}null==(u=t.onProgress)||u.call(t,"parsing-headers-footers");const U=[],G=e=>Object.keys(e.headerRIds).length>0||Object.keys(e.footerRIds).length>0,j=z.filter(G).length;let Z=0;const K=()=>{var e;Z+=1,j>0&&(null==(e=t.onProgress)||e.call(t,"parsing-headers-footers",Z/j))};for(let de=0;de<z.length;de+=1){const e=z[de],t=P[de]??[];vS(t,e.docGridLinePitchPx,e.docGridMode,e.docGridType,x);const n=async t=>{var n,a;if(!t)return[];const r=y.get(t);if(!r)return[];let o=r.startsWith("/")?r.slice(1):r;o.startsWith("word/")||(o=`word/${r}`);const i=await(null==(n=b.file(o))?void 0:n.async("string")),l=await yM(b,o);if(!N&&i){const e=i.match(/<v:textpath[^>]*string="([^"]+)"/i),t=i.match(/<v:shape\b([^>]*)>/i),n=(null==t?void 0:t[1])??"",r=e=>{var t;return null==(t=n.match(new RegExp(`${e}="([^"]+)"`,"i")))?void 0:t[1]},o=e=>e.replace(/&quot;/g,'"').replace(/&apos;/g,"'").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&");if(null==e?void 0:e[1])N={kind:"text",text:o(e[1]),color:r("fillcolor"),opacity:Number(r("fillopacity"))||void 0,rotation:Number(r("rotation"))||void 0};else{const e=null==(a=i.match(/<v:imagedata[^>]*(?:r:id|id)="([^"]+)"/i))?void 0:a[1],t=e?l.get(e):void 0;if(t){const e=t.startsWith("../")?`word/${t.slice(3)}`:t,n=await bM(b,V,e);n&&(N={kind:"image",src:n,color:r("fillcolor"),opacity:Number(r("fillopacity"))||void 0,rotation:Number(r("rotation"))||void 0})}}}const s=await VA(i??null,w,b,l,V,C);return vS(s,e.docGridLinePitchPx,e.docGridMode,e.docGridType,x),s},a=await n(e.headerRIds.default),r=await n(e.headerRIds.first),o=await n(e.headerRIds.even),i=await n(e.footerRIds.default),l=await n(e.footerRIds.first),s=await n(e.footerRIds.even);G(e)&&K(),await hM(2,Z);const d=Dt(e.pageSettings??{width:816,height:1056,orientation:"portrait",margins:{top:96,right:96,bottom:96,left:96,header:48,footer:48,gutter:0}}),c=de>0?null==(p=z[de-1])?void 0:p.breakType:void 0,u=e.pageNumbering,h=e.verticalAlignment,f=e.bidi;U.push({id:`section:${de+1}`,blocks:t.length>0?t:[at([{text:""}])],pageSettings:d,...e.pageBorder?{pageBorder:e.pageBorder}:{},header:a.length>0?a:void 0,firstPageHeader:r.length>0?r:void 0,evenPageHeader:o.length>0?o:void 0,footer:i.length>0?i:void 0,firstPageFooter:l.length>0?l:void 0,evenPageFooter:s.length>0?s:void 0,...c?{breakType:c}:{},...u?{pageNumbering:u}:{},...h?{verticalAlignment:h}:{},...f?{bidi:f}:{}})}const X=await(null==(h=b.file("word/footnotes.xml"))?void 0:h.async("string"))??null,Y=X?await yM(b,"word/footnotes.xml"):new Map,J=await async function(e,t,n,a,r,o){const i=await zA("footnote",e,t,n,a,r,o);return{byDocxId:i.byDocxId,footnotes:i.notes,separator:i.separator,continuationSeparator:i.continuationSeparator}}(X,w,b,Y,V,C);x.footnoteSettings&&(J.footnotes.settings=x.footnoteSettings);const Q=Object.keys(J.footnotes.items).length>0||J.footnotes.separator||J.footnotes.continuationSeparator||J.footnotes.settings?J.footnotes:void 0;!function(e,t){const n=e=>{if("paragraph"!==e.type)for(const t of e.rows)for(const e of t.cells)for(const t of e.blocks)n(t);else e.runs.forEach((n,a)=>{const r=n,o=r.__importedFootnoteRef;if(!o)return;delete r.__importedFootnoteRef;const i=t.get(o.docxId);i&&(e.runs[a]={id:n.id,text:n.text,styles:n.styles,revision:n.revision,kind:"footnoteReference",footnoteReference:{footnoteId:i.id,...o.customMark?{customMark:o.customMark}:{}}})})};jA(e,n)}(U,J.byDocxId);const $=await(null==(f=b.file("word/endnotes.xml"))?void 0:f.async("string"))??null,_=$?await yM(b,"word/endnotes.xml"):new Map,ee=await async function(e,t,n,a,r,o){const i=await zA("endnote",e,t,n,a,r,o);return{byDocxId:i.byDocxId,endnotes:i.notes,separator:i.separator,continuationSeparator:i.continuationSeparator}}($,w,b,_,V,C);x.endnoteSettings&&(ee.endnotes.settings=x.endnoteSettings);const te=Object.keys(ee.endnotes.items).length>0||ee.endnotes.separator||ee.endnotes.continuationSeparator||ee.endnotes.settings?ee.endnotes:void 0;!function(e,t){const n=e=>{if("paragraph"!==e.type)for(const t of e.rows)for(const e of t.cells)for(const t of e.blocks)n(t);else e.runs.forEach((n,a)=>{const r=n,o=r.__importedEndnoteRef;if(!o)return;delete r.__importedEndnoteRef;const i=t.get(o.docxId);i&&(e.runs[a]={id:n.id,text:n.text,styles:n.styles,revision:n.revision,kind:"endnoteReference",endnoteReference:{endnoteId:i.id,...o.customMark?{customMark:o.customMark}:{}}})})};jA(e,n)}(U,ee.byDocxId);const ne=qA(U),ae=function(e,t){const n=new Set([...e.keys(),...t.keys()]);if(0===n.size)return;const a=[...n].sort((e,t)=>{const n=Number.parseInt(e,10),a=Number.parseInt(t,10);return Number.isNaN(n)||Number.isNaN(a)?e.localeCompare(t):n-a}),r={},o=[];for(const i of a){const n=e.get(i),a=t.get(i);if(!n&&!a)continue;const l=_e(),s=Number.parseInt(i,10);r[l]={id:l,author:(null==a?void 0:a.author)??"",...(null==a?void 0:a.initials)?{initials:a.initials}:{},...void 0!==(null==a?void 0:a.date)?{date:a.date}:{},...void 0!==(null==a?void 0:a.dateUtc)?{dateUtc:a.dateUtc}:{},...(null==a?void 0:a.resolved)?{resolved:a.resolved}:{},text:(null==a?void 0:a.text)??"",...(null==n?void 0:n.start)?{start:n.start}:{},...(null==n?void 0:n.end)?{end:n.end}:{},...Number.isNaN(s)?{}:{docxIdHint:s}},o.push(l)}return o.length>0?{items:r,order:o}:void 0}(WA(U),UA(await(null==(g=b.file("word/comments.xml"))?void 0:g.async("string"))??null,await(null==(m=b.file("word/commentsExtended.xml"))?void 0:m.async("string"))??null)),re=U.length>1||U.some(e=>{var t,n,a,r,o,i;return((null==(t=e.header)?void 0:t.length)??0)>0||((null==(n=e.firstPageHeader)?void 0:n.length)??0)>0||((null==(a=e.evenPageHeader)?void 0:a.length)??0)>0||((null==(r=e.footer)?void 0:r.length)??0)>0||((null==(o=e.firstPageFooter)?void 0:o.length)??0)>0||((null==(i=e.evenPageFooter)?void 0:i.length)??0)>0||void 0!==e.breakType||void 0!==e.pageNumbering||void 0!==e.verticalAlignment||void 0!==e.bidi||void 0!==e.pageBorder}),oe=Object.keys(V.assets).length>0,ie=e=>{var t,n;if(I){const a=(null==(n=null==(t=C.data)?void 0:t.name)?void 0:n.toLowerCase())??"",r=["oasis","office","facet","integral","ion","retrospect"].find(e=>a.includes(e));e.design={...e.design??{},...r?{themeId:r}:{},...C.data?{themeData:C.data}:{}}}E&&(e.design={...e.design??{},pageColor:`#${E.replace(/^#/,"")}`}),N&&(e.design={...e.design??{},watermark:N});const a={};void 0!==x.defaultTabStop&&(a.defaultTabStop=x.defaultTabStop),x.allowSpaceOfSameStyleInTable&&(a.allowSpaceOfSameStyleInTable=!0),x.autoHyphenation&&(a.autoHyphenation=!0),x.doNotHyphenateCaps&&(a.doNotHyphenateCaps=!0),void 0!==x.consecutiveHyphenLimit&&(a.consecutiveHyphenLimit=x.consecutiveHyphenLimit),void 0!==x.hyphenationZone&&(a.hyphenationZone=x.hyphenationZone),Object.keys(a).length>0&&(e.settings={...e.settings??{},...a}),S&&(e.fontTable=S);let r=e;return Q&&(r.footnotes=Q,r=Xh(r)),te&&(r.endnotes=te,r=function(e){const t=e.endnotes;if(!t||0===Object.keys(t.items).length)return e;const{sections:n,sectionsChanged:a,nextItems:r,itemsChanged:o}=Wh(e,t,Yh);return a||o?{...e,sections:a?n:e.sections,endnotes:{...t,items:o?r:t.items}}:e}(r)),ne&&(r.bookmarks=ne),ae&&(r.comments=ae),r};if(re){const e=Dn([]);return e.sections=U,1===U.length&&(e.pageSettings=U[0].pageSettings),T&&(e.styles=T),oe&&(e.assets=V.assets),ie(e)}const le=U[0],se=Dn((null==le?void 0:le.blocks.length)>0?le.blocks:[at([{text:""}])],null==le?void 0:le.pageSettings);return oe&&(se.assets=V.assets),T&&(se.styles=T),ie(se)}function jA(e,t){var n,a,r,o,i,l;for(const s of e)s.blocks.forEach(t),null==(n=s.header)||n.forEach(t),null==(a=s.firstPageHeader)||a.forEach(t),null==(r=s.evenPageHeader)||r.forEach(t),null==(o=s.footer)||o.forEach(t),null==(i=s.firstPageFooter)||i.forEach(t),null==(l=s.evenPageFooter)||l.forEach(t)}const ZA="[Content_Types].xml",KA="_rels/.rels";function XA(e){return e.replaceAll("&","&amp;").replaceAll('"',"&quot;").replaceAll("<","&lt;").replaceAll(">","&gt;")}function YA(e){return e.replaceAll("\\","/").replace(/^\/+/,"")}function JA(e){if(e===KA)return null;const t="/_rels/",n=e.lastIndexOf(t);if(n>=0&&e.endsWith(".rels")){return`${e.slice(0,n)}/${e.slice(n+7).slice(0,-5)}`}return e.startsWith("_rels/")&&e.endsWith(".rels")?e.slice(6,-5):void 0}function QA(e){var t;const n={defaults:{},overrides:{}};if(!e)return n;const a=(new Ox).parseFromString(e,"application/xml").documentElement;if(!a)return n;for(let r=0;r<a.childNodes.length;r+=1){const e=a.childNodes[r];if((null==e?void 0:e.nodeType)!==e.ELEMENT_NODE)continue;const o=e;if("Default"===o.localName){const e=null==(t=o.getAttribute("Extension"))?void 0:t.toLowerCase(),a=o.getAttribute("ContentType");e&&a&&(n.defaults[e]=a)}else if("Override"===o.localName){const e=o.getAttribute("PartName"),t=o.getAttribute("ContentType");e&&t&&(n.overrides[YA(e)]=t)}}return n}function $A(e){return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">${Object.entries(e.defaults).sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>`<Default Extension="${XA(e)}" ContentType="${XA(t)}"/>`).join("")}${Object.entries(e.overrides).sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>`<Override PartName="/${XA(YA(e))}" ContentType="${XA(t)}"/>`).join("")}</Types>`}function _A(e){if(!e)return[];const t=(new Ox).parseFromString(e,"application/xml").documentElement;if(!t)return[];const n=[];for(let a=0;a<t.childNodes.length;a+=1){const e=t.childNodes[a];if((null==e?void 0:e.nodeType)!==e.ELEMENT_NODE)continue;const r=e;if("Relationship"!==r.localName)continue;const o=r.getAttribute("Id"),i=r.getAttribute("Type"),l=r.getAttribute("Target");if(!o||!i||!l)continue;const s=r.getAttribute("TargetMode");n.push({id:o,type:i,target:l,targetMode:"External"===s?"External":"Internal"})}return n}function eI(e){return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">${e.map(e=>{const t="External"===e.targetMode?' TargetMode="External"':"";return`<Relationship Id="${XA(e.id)}" Type="${XA(e.type)}" Target="${XA(e.target)}"${t}/>`}).join("")}</Relationships>`}function tI(e,t,n){return t.map(t=>{if("External"===t.targetMode)return{...t,resolvedTarget:void 0};const a=function(e,t){const n=t.replaceAll("\\","/"),a=(null==e?void 0:e.includes("/"))?e.slice(0,e.lastIndexOf("/")+1):"",r=n.startsWith("/")?n.slice(1):`${a}${n}`,o=[];for(const i of r.split("/"))if(i&&"."!==i)if(".."!==i)o.push(i);else{if(0===o.length)return null;o.pop()}return o.join("/")}(e,t.target);return a?{...t,resolvedTarget:a}:(null==n||n(t),t)})}const nI="http://schemas.openxmlformats.org/wordprocessingml/2006/main",aI="http://schemas.openxmlformats.org/package/2006/relationships",rI="http://schemas.openxmlformats.org/officeDocument/2006/relationships",oI="http://schemas.microsoft.com/office/word/2010/wordml";function iI(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}function lI(e,t){return Number.isFinite(e)?Math.max(0,Math.round(e/dt*gt)):t}function sI(e){return null!=e&&Number.isFinite(e)?Math.round(e/dt*gt):null}function dI(e){return null!=e&&Number.isFinite(e)?Math.max(0,Math.round(20*e)):null}function cI(e,t="000000"){return Vg(e)??t}function uI(e){return`<w:shd w:val="clear" w:color="auto" w:fill="${cI(e,"FFFFFF")}"/>`}function pI(e){if("end"===e.kind)return`<w:bookmarkEnd w:id="${e.wId}"/>`;const t=(void 0!==e.colFirst?` w:colFirst="${e.colFirst}"`:"")+(void 0!==e.colLast?` w:colLast="${e.colLast}"`:"");return`<w:bookmarkStart w:id="${e.wId}" w:name="${iI(e.name??"")}"${t}/>`}function hI(e){switch(e.kind){case"start":return`<w:commentRangeStart w:id="${e.wId}"/>`;case"end":return`<w:commentRangeEnd w:id="${e.wId}"/>`;case"reference":return`<w:r><w:commentReference w:id="${e.wId}"/></w:r>`}}const fI=`xmlns:w="${nI}" xmlns:w14="${oI}" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" xmlns:w16du="http://schemas.microsoft.com/office/word/2023/wordml/word16du"`;function gI(e){const t=e.comments.map(({comment:e,wId:t,paraId:n})=>{const a=void 0!==e.date?` w:date="${new Date(e.date).toISOString().replace(/\.\d{3}Z$/,"Z")}"`:"",r=void 0!==e.dateUtc?` w16du:dateUtc="${new Date(e.dateUtc).toISOString().replace(/\.\d{3}Z$/,"Z")}"`:"",o=e.initials?` w:initials="${iI(e.initials)}"`:"";return`<w:comment w:id="${t}" w:author="${iI(e.author)}"${a}${r}${o}><w:p w14:paraId="${n}">${i=e.text,`<w:r>${i.split("\n").map((e,t)=>`${t>0?"<w:br/>":""}<w:t xml:space="preserve">${iI(e)}</w:t>`).join("")}</w:r>`}</w:p></w:comment>`;var i}).join("");return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:comments ${fI}>${t}</w:comments>`}function mI(e){return void 0!==e&&Number.isSafeInteger(e)&&e>=1}function bI(e){let t=1;for(const a of Object.values(e))mI(a.docxId)&&(t=Math.max(t,a.docxId+1));const n=new Set;return e=>{if(mI(e.docxId)&&!n.has(e.docxId))return n.add(e.docxId),e.docxId;for(;n.has(t);)t+=1;const a=t;return n.add(a),t+=1,a}}function vI(e,t="000000"){if("none"===e.type||e.width<=0)return'w:val="nil"/>';return`w:val="${"dotted"===e.type?"dotted":"dashed"===e.type?"dashed":"single"}" w:sz="${Math.max(1,Math.round(8*e.width))}" w:space="0" w:color="${cI(e.color,t)}"/>`}function yI(e){const t=[["top",e.borderTop],["left",e.borderLeft],["bottom",e.borderBottom],["right",e.borderRight],["between",e.borderBetween],["bar",e.borderBar]].filter(e=>null!=e[1]).map(([e,t])=>`<w:${e} ${vI(t)}`);return t.length>0?`<w:pBdr>${t.join("")}</w:pBdr>`:""}const wI="6F6F6F";function xI(e){return e?Object.entries(e).map(([e,t])=>` ${e}="${iI(t)}"`).join(""):""}function MI(e){const t=/^\d+$/.test(e.id)?e.id:String(Array.from(e.id).reduce((e,t)=>31*e+t.charCodeAt(0)>>>0,0)),n=Number.isFinite(e.date)?new Date(e.date).toISOString():new Date(0).toISOString();return`w:id="${t}" w:author="${iI(e.author)}" w:date="${n}"`}function SI(e){if(!e||0===Object.keys(e).length)return"";const t=$M.filter(([,t])=>void 0!==e[t]).map(([t,n])=>`w:${t}="${e[n]?"1":"0"}"`).join(" ");return t?`<w:cnfStyle ${t}/>`:""}function AI(e,t){return void 0===t?"":t?`<w:${e}/>`:`<w:${e} w:val="0"/>`}function II(e,t,n={}){if("number"==typeof t&&Number.isFinite(t))return`<w:${e} w:w="${dI(t)??0}" w:type="dxa"/>`;if("string"==typeof t){const n=t.trim();if("auto"===n)return`<w:${e} w:w="0" w:type="auto"/>`;if(n.endsWith("%")){const t=Number.parseFloat(n.slice(0,-1));if(Number.isFinite(t))return`<w:${e} w:w="${Math.round(50*t)}" w:type="pct"/>`}const a=Number.parseFloat(n);if(Number.isFinite(a))return`<w:${e} w:w="${Math.round(a)}" w:type="dxa"/>`}return n.fallbackAuto?`<w:${e} w:w="0" w:type="auto"/>`:""}function CI(e,t=!0){return II("tblW",e,{fallbackAuto:t})}function TI(e){return vI(e??{width:.75,type:"solid",color:`#${wI}`},wI)}function kI(e){if(!e)return"";const t=[],n=(e,n)=>{void 0!==n&&Number.isFinite(n)&&t.push(`<w:${e} w:w="${dI(n)??0}" w:type="dxa"/>`)};return n("top",e.top),n("left",e.left),n("bottom",e.bottom),n("right",e.right),n("start",e.start),n("end",e.end),t.length>0?`<w:tblCellMar>${t.join("")}</w:tblCellMar>`:""}function RI(e,t){var n,a,r,o,i,l,s,d,c,u,p;const h=Math.max(1,Math.floor(e.colSpan??1)),f=[],g=SI(e.conditionalStyle);g&&f.push(g);const m=II("tcW",(null==(n=e.style)?void 0:n.width)??t);m&&f.push(m),h>1&&f.push(`<w:gridSpan w:val="${h}"/>`),"restart"===e.vMerge?f.push('<w:vMerge w:val="restart"/>'):"continue"===e.vMerge&&f.push("<w:vMerge/>"),(null==(a=e.style)?void 0:a.shading)&&f.push(uI(e.style.shading));const b=AI("noWrap",null==(r=e.style)?void 0:r.noWrap);b&&f.push(b);const v=AI("tcFitText",null==(o=e.style)?void 0:o.fitText);if(v&&f.push(v),(null==(i=e.style)?void 0:i.headers)&&f.push(`<w:headers w:val="${iI(e.style.headers)}"/>`),null==(l=e.style)?void 0:l.verticalAlign){const t="middle"===e.style.verticalAlign?"center":e.style.verticalAlign;f.push(`<w:vAlign w:val="${t}"/>`)}(null==(s=e.style)?void 0:s.textDirection)&&f.push(`<w:textDirection w:val="${e.style.textDirection}"/>`),f.push(function(e){const t=e.style,n=null==t?void 0:t.padding,a=dI(n??(null==t?void 0:t.paddingTop)??0),r=dI(n??(null==t?void 0:t.paddingBottom)??0);return`<w:tcMar><w:top w:w="${a??0}" w:type="dxa"/><w:left w:w="${dI(n??(null==t?void 0:t.paddingLeft)??5.4)??0}" w:type="dxa"/><w:bottom w:w="${r??0}" w:type="dxa"/><w:right w:w="${dI(n??(null==t?void 0:t.paddingRight)??5.4)??0}" w:type="dxa"/>${void 0!==(null==t?void 0:t.paddingStart)?`<w:start w:w="${dI(t.paddingStart)??0}" w:type="dxa"/>`:""}${void 0!==(null==t?void 0:t.paddingEnd)?`<w:end w:w="${dI(t.paddingEnd)??0}" w:type="dxa"/>`:""}</w:tcMar>`}(e)),f.push(function(e){var t,n,a,r,o,i,l,s;const d=[`<w:top ${TI(null==(t=e.style)?void 0:t.borderTop)}`,`<w:left ${TI(null==(n=e.style)?void 0:n.borderLeft)}`,`<w:bottom ${TI(null==(a=e.style)?void 0:a.borderBottom)}`,`<w:right ${TI(null==(r=e.style)?void 0:r.borderRight)}`];return(null==(o=e.style)?void 0:o.borderStart)&&d.push(`<w:start ${TI(e.style.borderStart)}`),(null==(i=e.style)?void 0:i.borderEnd)&&d.push(`<w:end ${TI(e.style.borderEnd)}`),(null==(l=e.style)?void 0:l.borderTopLeftToBottomRight)&&d.push(`<w:tl2br ${TI(e.style.borderTopLeftToBottomRight)}`),(null==(s=e.style)?void 0:s.borderTopRightToBottomLeft)&&d.push(`<w:tr2bl ${TI(e.style.borderTopRightToBottomLeft)}`),`<w:tcBorders>${d.join("")}</w:tcBorders>`}(e));const y=AI("hideMark",null==(d=e.style)?void 0:d.hideMark);if(y&&f.push(y),null==(c=e.style)?void 0:c.propertyRevision){const t=e.style.propertyRevision,n=RI({...e,style:t.previous});f.push(`<w:tcPrChange ${MI(t)}>${n}</w:tcPrChange>`)}if(null==(u=e.style)?void 0:u.revision){const t=e.style.revision,n="insert"===t.type?"cellIns":"delete"===t.type?"cellDel":"cellMerge",a="merge"===t.type?`${(null==(p=t.previous)?void 0:p.vMerge)?` w:vMergeOrig="${"restart"===t.previous.vMerge?"rest":"cont"}"`:""}${e.vMerge?` w:vMerge="${"restart"===e.vMerge?"rest":"cont"}"`:""}`:"";f.push(`<w:${n} ${MI(t)}${a}/>`)}return f.length>0?`<w:tcPr>${f.join("")}</w:tcPr>`:""}function EI(e,t){if(void 0===t||!Number.isFinite(t))return"";const n=Math.floor(t);return n>0?`<w:${e} w:val="${n}"/>`:""}function LI(e,t){const n="number"==typeof e?dI(e):"string"==typeof e?Number.parseFloat(e):null,a=null!==n&&Number.isFinite(n);if(!a&&!t)return"";const r=[];return a&&r.push(`w:val="${Math.round(n)}"`),r.push(`w:hRule="${t??"atLeast"}"`),`<w:trHeight ${r.join(" ")}/>`}function VI(e){if(!e)return"";const t=[],n=EI("gridBefore",e.gridBefore);n&&t.push(n);const a=EI("gridAfter",e.gridAfter);a&&t.push(a);const r=II("wBefore",e.widthBefore);r&&t.push(r);const o=II("wAfter",e.widthAfter);o&&t.push(o);const i=II("tblCellSpacing",e.cellSpacing);i&&t.push(i);const l=LI(e.height,e.heightRule);l&&t.push(l);const s=AI("cantSplit",e.cantSplit);s&&t.push(s);const d=AI("hidden",e.hidden);d&&t.push(d);const c=AI("tblHeader",e.isHeader);return c&&t.push(c),e.align&&t.push(`<w:jc w:val="${e.align}"/>`),t.length>0?`<w:trPr>${t.join("")}</w:trPr>`:""}function NI(e){var t,n,a,r,o,i,l,s,d,c,u;const p=[],h=SI(e.conditionalStyle);h&&p.push(h);const f=EI("gridBefore",null==(t=e.style)?void 0:t.gridBefore);f&&p.push(f);const g=EI("gridAfter",null==(n=e.style)?void 0:n.gridAfter);g&&p.push(g);const m=II("wBefore",null==(a=e.style)?void 0:a.widthBefore);m&&p.push(m);const b=II("wAfter",null==(r=e.style)?void 0:r.widthAfter);b&&p.push(b);const v=II("tblCellSpacing",null==(o=e.style)?void 0:o.cellSpacing);v&&p.push(v);const y=function(e){var t,n;return LI(null==(t=e.style)?void 0:t.height,null==(n=e.style)?void 0:n.heightRule)}(e);y&&p.push(y);const w=AI("cantSplit",null==(i=e.style)?void 0:i.cantSplit);w&&p.push(w),((null==(l=e.style)?void 0:l.isHeader)??e.isHeader)&&p.push("<w:tblHeader/>");const x=AI("hidden",null==(s=e.style)?void 0:s.hidden);if(x&&p.push(x),(null==(d=e.style)?void 0:d.align)&&p.push(`<w:jc w:val="${e.style.align}"/>`),null==(c=e.style)?void 0:c.propertyRevision){const t=e.style.propertyRevision;p.push(`<w:trPrChange ${MI(t)}>${VI(t.previous)}</w:trPrChange>`)}if((null==(u=e.style)?void 0:u.revision)&&"merge"!==e.style.revision.type){const t=e.style.revision,n="insert"===t.type?"ins":"del";p.push(`<w:${n} ${MI(t)}/>`)}return p.length>0?`<w:trPr>${p.join("")}</w:trPr>`:""}function zI(e){const t=null==e?void 0:e.borders;if(!t)return"";const n=_M.map(([e,n])=>[e,t[n]]).filter(e=>!!e[1]).map(([e,t])=>`<w:${e} ${vI(t)}`).join("");return n?`<w:tblBorders>${n}</w:tblBorders>`:""}function PI(e){var t,n,a,r,o,i,l,s,d,c,u,p,h,f;const g=[];if((null==(t=e.style)?void 0:t.styleId)&&g.push(`<w:tblStyle w:val="${iI(e.style.styleId)}"/>`),null==(n=e.style)?void 0:n.tblLook){const t=e.style.tblLook;g.push(`<w:tblLook w:firstRow="${t.firstRow?"1":"0"}" w:lastRow="${t.lastRow?"1":"0"}" w:firstColumn="${t.firstCol?"1":"0"}" w:lastColumn="${t.lastCol?"1":"0"}" w:noHBand="${t.noHBand?"1":"0"}" w:noVBand="${t.noVBand?"1":"0"}"/>`)}(null==(a=e.style)?void 0:a.altTitle)&&g.push(`<w:tblCaption w:val="${iI(e.style.altTitle)}"/>`),(null==(r=e.style)?void 0:r.altDescription)&&g.push(`<w:tblDescription w:val="${iI(e.style.altDescription)}"/>`);const m=function(e){if(!e||0===Object.keys(e).length)return"";const t=e=>{const t=dI(e);return null===t?void 0:String(t)},n={horzAnchor:e.horizontalAnchor,vertAnchor:e.verticalAnchor,tblpX:t(e.x),tblpY:t(e.y),tblpXSpec:e.xAlign,tblpYSpec:e.yAlign,topFromText:t(e.distanceTop),rightFromText:t(e.distanceRight),bottomFromText:t(e.distanceBottom),leftFromText:t(e.distanceLeft)};return`<w:tblpPr ${Object.entries(n).filter(e=>void 0!==e[1]).map(([e,t])=>`w:${e}="${iI(t)}"`).join(" ")}/>`}(null==(o=e.style)?void 0:o.floating);m&&g.push(m);const b=e.gridCols&&e.gridCols.length>0?e.gridCols.reduce((e,t)=>e+t,0):void 0;g.push(CI((null==(i=e.style)?void 0:i.width)??b)),(null==(l=e.style)?void 0:l.align)&&g.push(`<w:jc w:val="${e.style.align}"/>`);const v=II("tblCellSpacing",null==(s=e.style)?void 0:s.cellSpacing);v&&g.push(v);const y=kI(null==(d=e.style)?void 0:d.defaultCellMargins);y&&g.push(y);const w=zI(e.style);w&&g.push(w);const x=II("tblInd",null==(c=e.style)?void 0:c.indentLeft);x&&g.push(x),g.push(`<w:tblLayout w:type="${(null==(u=e.style)?void 0:u.layout)??"fixed"}"/>`);const M=AI("bidiVisual",null==(p=e.style)?void 0:p.bidiVisual);if(M&&g.push(M),(null==(h=e.style)?void 0:h.tblOverlap)&&g.push(`<w:tblOverlap w:val="${iI(e.style.tblOverlap)}"/>`),null==(f=e.style)?void 0:f.revision){const t=e.style.revision,n=PI({...e,style:t.previous});g.push(`<w:tblPrChange ${MI(t)}>${n}</w:tblPrChange>`)}return`<w:tblPr>${g.join("")}</w:tblPr>`}function OI(e,t){const n=el(e),a=new Map(n.map(e=>[`${e.rowIndex}:${e.cellIndex}`,e])),r=e.rows.map((n,r)=>{const o=n.cells.map((n,o)=>{const i=a.get(`${r}:${o}`),l=i&&e.gridCols?e.gridCols.slice(i.visualColumnIndex,i.visualColumnIndex+Math.max(1,i.colSpan)).reduce((e,t)=>e+t,0):void 0,s=(n.blocks.length>0?n.blocks:[{id:"",type:"paragraph",runs:[{id:"",text:"",kind:"text"}]}]).map(e=>t(e,n)).join(""),d="continue"===n.vMerge?"<w:p/>":s;return`<w:tc${xI(n.extAttributes)}>${RI(n,l)}${d}</w:tc>`}).join("");return`<w:tr${xI(n.extAttributes)}>${function(e,t){if(!e&&!t)return"";const n=[];void 0!==(null==e?void 0:e.width)&&n.push(CI(e.width)),(null==e?void 0:e.align)&&n.push(`<w:jc w:val="${e.align}"/>`);const a=II("tblCellSpacing",null==e?void 0:e.cellSpacing);a&&n.push(a);const r=II("tblInd",null==e?void 0:e.indentLeft);r&&n.push(r);const o=e?zI(e):"";o&&n.push(o),(null==e?void 0:e.layout)&&n.push(`<w:tblLayout w:type="${e.layout}"/>`);const i=kI(null==e?void 0:e.defaultCellMargins);return i&&n.push(i),t&&n.push(t),n.length>0?`<w:tblPrEx>${n.join("")}</w:tblPrEx>`:""}(n.propertyExceptions,n.tblPrExChangeXml)}${NI(n)}${o}</w:tr>`}).join(""),o=e.gridCols?`<w:tblGrid>${e.gridCols.map(e=>`<w:gridCol w:w="${dI(e)??0}"/>`).join("")}${e.gridRevision?`<w:tblGridChange ${MI(e.gridRevision)}><w:tblGrid>${e.gridRevision.previous.map(e=>`<w:gridCol w:w="${dI(e)??0}"/>`).join("")}</w:tblGrid></w:tblGridChange>`:""}</w:tblGrid>`:"";return`<w:tbl>${PI(e)}${o}${r}</w:tbl>`}const qI='xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml"';function BI(e){if(!(void 0!==e.alias||void 0!==e.tag||void 0!==e.id||void 0!==e.lock||void 0!==e.appearance||void 0!==e.showingPlcHdr||void 0!==e.temporary||void 0!==e.color||void 0!==e.placeholderDocPart||void 0!==e.dataBinding||void 0!==e.subtype||void 0!==e.repeatingSectionProperties||(e.unknownXml??"").length>0))return"<w:sdtPr/>";let t="";return void 0!==e.alias&&(t+=`<w:alias w:val="${iI(e.alias)}"/>`),void 0!==e.tag&&(t+=`<w:tag w:val="${iI(e.tag)}"/>`),void 0!==e.id&&(t+=`<w:id w:val="${iI(e.id)}"/>`),void 0!==e.lock&&(t+=`<w:lock w:val="${iI(e.lock)}"/>`),void 0!==e.placeholderDocPart&&(t+=`<w:placeholder><w:docPart w:val="${iI(e.placeholderDocPart)}"/></w:placeholder>`),void 0!==e.dataBinding&&(t+=function(e){const t=[];void 0!==e.prefixMappings&&t.push(`w:prefixMappings="${iI(e.prefixMappings)}"`);void 0!==e.xpath&&t.push(`w:xpath="${iI(e.xpath)}"`);void 0!==e.storeItemID&&t.push(`w:storeItemID="${iI(e.storeItemID)}"`);return t.length>0?`<w:dataBinding ${t.join(" ")}/>`:""}(e.dataBinding)),void 0!==e.temporary&&(t+=`<w:temporary w:val="${e.temporary?"true":"false"}"/>`),void 0!==e.subtype&&(t+=function(e,t){switch(e.kind){case"text":return"<w:text/>";case"richText":return"<w:richText/>";case"picture":return"<w:picture/>";case"group":return"<w:group/>";case"equation":return"<w:equation/>";case"citation":return"<w:citation/>";case"bibliography":return"<w:bibliography/>";case"repeatingSection":return function(e){let t="";void 0!==(null==e?void 0:e.sectionTitle)&&(t+=`<w15:sectionTitle w15:val="${iI(e.sectionTitle)}"/>`);void 0!==(null==e?void 0:e.doNotAllowInsertDeleteSection)&&(t+=`<w15:doNotAllowInsertDeleteSection w15:val="${e.doNotAllowInsertDeleteSection?"1":"0"}"/>`);return t?`<w15:repeatingSection ${qI}>${t}</w15:repeatingSection>`:`<w15:repeatingSection ${qI}/>`}(t);case"repeatingSectionItem":return`<w15:repeatingSectionItem ${qI}/>`;case"comboBox":case"dropDownList":{const t=(e.listItems??[]).map(WI).join(""),n=void 0!==e.lastSelectedValue?`<w:lastSelectedValue w:val="${iI(e.lastSelectedValue)}"/>`:"";return`<w:${e.kind}>${t}${n}</w:${e.kind}>`}case"date":{const t=void 0!==e.fullDate?` w:fullDate="${iI(e.fullDate)}"`:"";let n="";return void 0!==e.dateFormat&&(n+=`<w:dateFormat w:val="${iI(e.dateFormat)}"/>`),void 0!==e.lid&&(n+=`<w:lid w:val="${iI(e.lid)}"/>`),void 0!==e.calendar&&(n+=`<w:calendar w:val="${iI(e.calendar)}"/>`),void 0!==e.storeMappedDataAs&&(n+=`<w:storeMappedDataAs w:val="${iI(e.storeMappedDataAs)}"/>`),`<w:date${t}>${n}</w:date>`}case"checkbox":{let t="";if(void 0!==e.checked&&(t+=`<w14:checked w14:val="${e.checked?"1":"0"}"/>`),void 0!==e.checkedStateFont||void 0!==e.checkedStateChar){t+=`<w14:checkedState${void 0!==e.checkedStateFont?` w14:font="${iI(e.checkedStateFont)}"`:""}${void 0!==e.checkedStateChar?` w14:char="${iI(e.checkedStateChar)}"`:""}/>`}if(void 0!==e.uncheckedStateFont||void 0!==e.uncheckedStateChar){t+=`<w14:uncheckedState${void 0!==e.uncheckedStateFont?` w14:font="${iI(e.uncheckedStateFont)}"`:""}${void 0!==e.uncheckedStateChar?` w14:char="${iI(e.uncheckedStateChar)}"`:""}/>`}return`<w14:checkbox>${t}</w14:checkbox>`}default:return e}}(e.subtype,e.repeatingSectionProperties)),void 0!==e.appearance&&(t+=`<w:appearance w:val="${iI(e.appearance)}"/>`),void 0!==e.showingPlcHdr&&(t+=`<w:showingPlcHdr w:val="${e.showingPlcHdr?"true":"false"}"/>`),void 0!==e.color&&(t+=`<w:color w:val="${iI(e.color)}"/>`),e.unknownXml&&(t+=e.unknownXml),`<w:sdtPr>${t}</w:sdtPr>`}function WI(e){return`<w:listItem${void 0!==e.displayText?` w:displayText="${iI(e.displayText)}"`:""}${void 0!==e.value?` w:value="${iI(e.value)}"`:""}/>`}function FI(e,t){const n=[];for(let a=0;a<e.childNodes.length;a+=1){const r=e.childNodes[a];(null==r?void 0:r.nodeType)===r.ELEMENT_NODE&&r.namespaceURI===nI&&r.localName===t&&n.push(r)}return n}function DI(e,t){const n=(new Ox).parseFromString(`<oasis:root xmlns:oasis="urn:oasis:docx" xmlns:w="${nI}" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml">${e}</oasis:root>`,"application/xml").documentElement;if(n)for(let a=0;a<n.childNodes.length;a+=1){const e=n.childNodes[a];if((null==e?void 0:e.nodeType)===e.ELEMENT_NODE&&e.namespaceURI===nI&&e.localName===t)return e}}function HI(e,t){const n=e.ownerDocument;if(!n)return null;const a=n.createElementNS(nI,"w:sdt"),r=DI(BI(t.sdtPr),"sdtPr");if(r&&a.appendChild(r.cloneNode(!0)),t.sdtEndPrXml){const e=DI(t.sdtEndPrXml,"sdtEndPr");e&&a.appendChild(e.cloneNode(!0))}const o=n.createElementNS(nI,"w:sdtContent");return a.appendChild(o),{sdt:a,content:o}}function UI(e,t){var n;let a=0;for(;a<t.length;){const r=t[a].wrappers[0];if(!r){a+=1;continue}let o=a+1;for(;o<t.length&&(null==(n=t[o].wrappers[0])?void 0:n.groupId)===r.groupId;)o+=1;const i=HI(e,r);if(!i){a=o;continue}e.insertBefore(i.sdt,t[a].element);const l=[];for(let e=a;e<o;e+=1){const n=t[e];i.content.appendChild(n.element),l.push({element:n.element,wrappers:n.wrappers.slice(1)})}UI(i.content,l),a=o}}function GI(e){const t=[];for(let n=0;n<e.childNodes.length;n+=1){const a=e.childNodes[n];(null==a?void 0:a.nodeType)===a.ELEMENT_NODE&&t.push(a)}return t}function jI(e){return`${e.namespaceURI??""}\0${function(e){return e.localName??e.tagName}(e)}`}function ZI(e,t,n){const a=jI(e[t]);let r=0;for(let o=0;o<t;o+=1)jI(e[o])===a&&(r+=1);return n.filter(e=>jI(e)===a)[r]}function KI(e,t){!function(e,t){for(let n=0;n<e.attributes.length;n+=1){const a=e.attributes[n];if(!a||a.namespaceURI===nI||a.namespaceURI===rI)continue;const r=a.localName??a.name;(a.namespaceURI?t.hasAttributeNS(a.namespaceURI,r):t.hasAttribute(a.name))||(a.namespaceURI?t.setAttributeNS(a.namespaceURI,a.name,a.value):t.setAttribute(a.name,a.value))}}(e,t);const n=GI(e),a=GI(t);n.forEach((e,r)=>{const o=ZI(n,r,a);if(e.namespaceURI===nI)return void(o&&KI(e,o));if(o)return void KI(e,o);const i=n.slice(r+1).map((e,t)=>ZI(n,r+t+1,a)).find(e=>Boolean(e));t.insertBefore(e.cloneNode(!0),i??null)})}const XI=new Set(["tblStyle","tblpPr","tblOverlap","bidiVisual","tblStyleRowBandSize","tblStyleColBandSize","tblW","jc","tblCellSpacing","tblInd","tblBorders","tblLayout","tblCellMar","tblLook","tblCaption","tblDescription","tblPrChange"]),YI=new Set(["gridCol","tblGridChange"]),JI=new Set(["tblW","jc","tblCellSpacing","tblInd","tblBorders","tblLayout","tblCellMar","tblPrExChange"]),QI=new Set(["cnfStyle","gridBefore","gridAfter","wBefore","wAfter","cantSplit","trHeight","tblHeader","tblCellSpacing","jc","hidden","ins","del","trPrChange"]),$I=new Set(["cnfStyle","tcW","gridSpan","hMerge","vMerge","tcBorders","shd","noWrap","tcMar","textDirection","tcFitText","vAlign","hideMark","headers","cellIns","cellDel","cellMerge","tcPrChange"]);function _I(e){const t=[];for(let n=0;n<e.childNodes.length;n+=1){const a=e.childNodes[n];(null==a?void 0:a.nodeType)===a.ELEMENT_NODE&&t.push(a)}return t}function eC(e){return e.localName??e.tagName}function tC(e){return`${e.namespaceURI??""}\0${eC(e)}`}function nC(e,t){const n=(new Ox).parseFromString(e,"application/xml").documentElement;return(null==n?void 0:n.namespaceURI)===nI&&eC(n)===t?n:void 0}function aC(e,t,n,a,r){var o;if(!e||function(e){return Boolean(e&&_S(e.xml))}(e))return t;if(e.semanticSignature===r)return e.xml;const i=nC(e.xml,n),l=function(e,t){if(e){const n=nC(e,t);if(n)return n}return(new Ox).parseFromString(`<w:${t} xmlns:w="${nI}"/>`,"application/xml").documentElement}(t,n);if(!i||!l)return t;!function(e,t){for(let n=0;n<e.attributes.length;n+=1){const a=e.attributes.item(n);if(!a||a.namespaceURI===rI)continue;const r=a.localName??a.name;(a.namespaceURI?t.hasAttributeNS(a.namespaceURI,r):t.hasAttribute(a.name))||(a.namespaceURI?t.setAttributeNS(a.namespaceURI,a.name,a.value):t.setAttribute(a.name,a.value))}}(i,l);const s=_I(i),d=_I(l),c=new Map;for(const f of d){const e=tC(f),t=c.get(e)??[];t.push(f),c.set(e,t)}const u=new Map;for(const f of s){const e=tC(f),t=u.get(e)??0;u.set(e,t+1);const n=null==(o=c.get(e))?void 0:o[t];n&&KI(f,n)}const p=new Set(d.map(tC)),h=s.filter(e=>!(e.namespaceURI===nI&&a.has(eC(e))||p.has(tC(e))));for(const f of h){const e=s.indexOf(f),t=s.slice(e+1).find(e=>p.has(tC(e))),n=t?_I(l).find(e=>tC(e)===tC(t))??null:null;l.insertBefore(f.cloneNode(!0),n)}return t||function(e){for(let t=0;t<e.attributes.length;t+=1){const n=e.attributes.item(t);if(n&&"http://www.w3.org/2000/xmlns/"!==n.namespaceURI)return!0}return!1}(l)||0!==_I(l).length?(new Px).serializeToString(l):""}function rC(e,t,n,a){return aC({xml:e,semanticSignature:"source"},t,n,a,"generated")}function oC(e){const t=[];for(let n=0;n<e.childNodes.length;n+=1){const a=e.childNodes[n];(null==a?void 0:a.nodeType)===a.ELEMENT_NODE&&t.push(a)}return t}function iC(e,t){return oC(e).filter(e=>e.namespaceURI===nI&&e.localName===t)}function lC(e,t){return iC(e,t)[0]}function sC(e,t){const n=(new Ox).parseFromString(`<oasis:root xmlns:oasis="urn:oasis:docx" xmlns:w="${nI}">${e}</oasis:root>`,"application/xml").documentElement;if(!n)return;return n?oC(n).find(e=>e.namespaceURI===nI&&e.localName===t):void 0}function dC(e){return e?(new Px).serializeToString(e):""}function cC(e){return/\br:(?:id|embed|link)\s*=/.test(e)}function uC(e){const t=new Map;let n=0;for(const a of e)a.namespaceURI===nI&&("tblPr"===a.localName||"tblGrid"===a.localName?t.set(a,a.localName):"tr"===a.localName&&(t.set(a,`tr:${n}`),n+=1));return t}function pC(e,t){var n;const a=null==(n=vA(e))?void 0:n.xml;if(!a)return;const r=sC(a,"tbl");if(!r)return;!function(e,t){for(let n=0;n<e.attributes.length;n+=1){const a=e.attributes.item(n);if(!a||a.namespaceURI===rI)continue;const r=a.localName??a.name;(a.namespaceURI?t.hasAttributeNS(a.namespaceURI,r):t.hasAttribute(a.name))||(a.namespaceURI?t.setAttributeNS(a.namespaceURI,a.name,a.value):t.setAttribute(a.name,a.value))}}(r,t);const o=oC(r),i=oC(t),l=o.filter(e=>e.namespaceURI===nI&&"tr"===e.localName),s=i.filter(e=>e.namespaceURI===nI&&"tr"===e.localName);if(l.length!==s.length)return;const d=uC(o),c=new Map([...uC(i)].map(([e,t])=>[t,e]));for(let u=0;u<o.length;u+=1){const e=o[u];if(d.has(e))continue;if(cC(dC(e)))continue;const n=o.slice(u+1).map(e=>d.get(e)).find(e=>Boolean(e)),a=n?c.get(n)??null:null;t.insertBefore(e.cloneNode(!0),a)}}function hC(e,t,n,a,r){if(!n)return void(t&&e.removeChild(t));const o=sC(n,a);o&&(t?e.replaceChild(o.cloneNode(!0),t):e.insertBefore(o.cloneNode(!0),r))}function fC(e,t){const n=lC(t,"tblPr"),a=lC(t,"tblGrid"),r=lC(t,"tr")??null;hC(t,n,function(e,t){var n;return aC(null==(n=vA(e))?void 0:n.tableProperties,t,"tblPr",XI,uA(e))}(e,dC(n)),"tblPr",a??r);const o=lC(t,"tblGrid");hC(t,o,function(e,t){var n;return aC(null==(n=vA(e))?void 0:n.tableGrid,t,"tblGrid",YI,pA(e))}(e,dC(o)),"tblGrid",lC(t,"tr")??null)}function gC(e,t){const n=iC(t,"tr");n.length===e.rows.length&&n.forEach((t,n)=>{const a=e.rows[n],r=lC(t,"tblPrEx"),o=lC(t,"trPr"),i=lC(t,"tc")??null;hC(t,r,function(e,t){var n;return aC(null==(n=mA(e))?void 0:n.propertyExceptions,t,"tblPrEx",JI,fA(e))}(a,dC(r)),"tblPrEx",o??i);const l=lC(t,"trPr"),s=function(e,t){var n;return aC(null==(n=mA(e))?void 0:n.rowProperties,t,"trPr",QI,hA(e))}(a,dC(l));hC(t,l,s.replace(/(<w:jc\b[^>]*\bw:val=")(?<value>start|end)("[^>]*\/?>)/g,(e,t,n,a)=>`${t}${"start"===n?"left":"right"}${a}`),"trPr",lC(t,"tc")??null);const d=iC(t,"tc");d.length===a.cells.length&&d.forEach((e,t)=>{const n=a.cells[t],r=lC(e,"tcPr");hC(e,r,function(e,t){var n;return aC(null==(n=function(e){return e.ooxmlSource}(e))?void 0:n.cellProperties,t,"tcPr",$I,gA(e))}(n,dC(r)),"tcPr",lC(e,"p")??lC(e,"tbl")??null)})})}function mC(e){for(const t of iC(e,"tr"))for(const e of iC(t,"tc")){for(const a of iC(e,"tbl"))mC(a);const t=oC(e),n=t[t.length-1];if((null==n?void 0:n.namespaceURI)===nI&&"tbl"===n.localName){const t=e.ownerDocument;t&&e.appendChild(t.createElementNS(nI,"w:p"))}}}function bC(e,t){const n=OI(e,t),a=sC(n,"tbl");if(!a)return n;pC(e,a),fC(e,a),gC(e,a),mC(a),function(e,t){const n=FI(t,"tr");if(n.length===e.rows.length){for(let t=0;t<n.length;t+=1){const a=n[t],r=e.rows[t],o=FI(a,"tc");o.length===r.cells.length&&UI(a,o.map((e,t)=>({element:e,wrappers:r.cells[t].sdtWrappers??[]})))}UI(t,n.map((t,n)=>({element:t,wrappers:e.rows[n].sdtWrappers??[]})))}}(e,a);return(new Px).serializeToString(a).replace(`<w:tbl xmlns:w="${nI}"`,"<w:tbl")}function vC(e){if(!e||0===e.length)return"";const t=e.map(e=>{const t=dI(e.position);if(null===t)return"";const n=[`w:val="${e.type}"`,`w:pos="${t}"`];return e.leader&&"none"!==e.leader?n.push(`w:leader="${e.leader}"`):"none"===e.leader&&n.push('w:leader="none"'),`<w:tab ${n.join(" ")}/>`}).filter(Boolean);return t.length>0?`<w:tabs>${t.join("")}</w:tabs>`:""}function yC(e){const t=[];e.framePrXml&&t.push(e.framePrXml),e.suppressLineNumbers&&t.push("<w:suppressLineNumbers/>"),e.suppressAutoHyphens&&t.push("<w:suppressAutoHyphens/>"),e.bidi&&t.push("<w:bidi/>"),!1===e.kinsoku&&t.push('<w:kinsoku w:val="0"/>'),!1===e.wordWrap&&t.push('<w:wordWrap w:val="0"/>'),!1===e.overflowPunct&&t.push('<w:overflowPunct w:val="0"/>'),e.topLinePunct&&t.push("<w:topLinePunct/>"),!1===e.autoSpaceDE&&t.push('<w:autoSpaceDE w:val="0"/>'),!1===e.autoSpaceDN&&t.push('<w:autoSpaceDN w:val="0"/>'),!1===e.adjustRightInd&&t.push('<w:adjustRightInd w:val="0"/>'),e.textAlignment&&t.push(`<w:textAlignment w:val="${e.textAlignment}"/>`),e.textboxTightWrap&&t.push(`<w:textboxTightWrap w:val="${e.textboxTightWrap}"/>`),null!=e.divId&&t.push(`<w:divId w:val="${e.divId}"/>`);const n=(a=e.conditionalStyle)?`<w:cnfStyle w:val="${$M.map(([,e])=>a[e]?"1":"0").join("")}"/>`:"";var a;return n&&t.push(n),t}function wC(e){const t=[];if(e.align&&t.push(`<w:jc w:val="${e.align}"/>`),void 0!==e.spacingBefore||void 0!==e.spacingAfter||void 0!==e.lineHeight){const n=[],a=sI(e.spacingBefore),r=sI(e.spacingAfter),o=void 0!==e.lineHeight&&null!==e.lineHeight&&Number.isFinite(e.lineHeight),i="exact"===e.lineRule||"atLeast"===e.lineRule,l=o?i?lI(e.lineHeight,0):Math.round(240*e.lineHeight):null;null!==a&&n.push(`w:before="${a}"`),null!==r&&n.push(`w:after="${r}"`),null!==l&&n.push(`w:line="${l}"`),null!==l&&i&&n.push(`w:lineRule="${e.lineRule}"`),n.length>0&&t.push(`<w:spacing ${n.join(" ")}/>`)}if(void 0!==e.indentLeft||void 0!==e.indentRight||void 0!==e.indentFirstLine||void 0!==e.indentHanging){const n=[],a=sI(e.indentLeft),r=sI(e.indentRight),o=sI(e.indentFirstLine),i=sI(e.indentHanging);null!==a&&n.push(`w:left="${a}"`),null!==r&&n.push(`w:right="${r}"`),null!==o&&n.push(`w:firstLine="${o}"`),null!==i&&n.push(`w:hanging="${i}"`),n.length>0&&t.push(`<w:ind ${n.join(" ")}/>`)}const n=vC(e.tabs);n&&t.push(n),e.pageBreakBefore&&t.push("<w:pageBreakBefore/>"),e.keepWithNext&&t.push("<w:keepNext/>"),e.keepLinesTogether&&t.push("<w:keepLines/>"),!1===e.widowControl&&t.push('<w:widowControl w:val="0"/>'),e.contextualSpacing&&t.push("<w:contextualSpacing/>"),e.mirrorIndents&&t.push("<w:mirrorIndents/>");const a=yI(e);return a&&t.push(a),e.shading&&t.push(uI(e.shading)),e.textDirection&&t.push(`<w:textDirection w:val="${e.textDirection}"/>`),null!=e.outlineLevel&&t.push(`<w:outlineLvl w:val="${e.outlineLevel}"/>`),t.push(...yC(e)),t.length>0?`<w:pPr>${t.join("")}</w:pPr>`:""}function xC(e,t,n,a){var r,o;const i=[],l=function(e,t){const n=sn(e.style,t);return{align:n.align,spacingBefore:n.spacingBefore,spacingAfter:n.spacingAfter,contextualSpacing:n.contextualSpacing,lineHeight:n.lineHeight,lineRule:n.lineRule,indentLeft:n.indentLeft,indentRight:n.indentRight,indentFirstLine:n.indentFirstLine,indentHanging:n.indentHanging,mirrorIndents:n.mirrorIndents,pageBreakBefore:n.pageBreakBefore,keepWithNext:n.keepWithNext,keepLinesTogether:n.keepLinesTogether,widowControl:n.widowControl,shading:n.shading,borderTop:n.borderTop,borderRight:n.borderRight,borderBottom:n.borderBottom,borderLeft:n.borderLeft,tabs:n.tabs,textDirection:n.textDirection,outlineLevel:n.outlineLevel,suppressLineNumbers:n.suppressLineNumbers,suppressAutoHyphens:n.suppressAutoHyphens,bidi:n.bidi,kinsoku:n.kinsoku,wordWrap:n.wordWrap,overflowPunct:n.overflowPunct,topLinePunct:n.topLinePunct,autoSpaceDE:n.autoSpaceDE,autoSpaceDN:n.autoSpaceDN,adjustRightInd:n.adjustRightInd,textAlignment:n.textAlignment,textboxTightWrap:n.textboxTightWrap,divId:n.divId,conditionalStyle:n.conditionalStyle,borderBetween:n.borderBetween,borderBar:n.borderBar,framePrXml:n.framePrXml}}(e,n),s=(null==(r=e.style)?void 0:r.align)??(null==a?void 0:a.align)??l.align;if((null==(o=e.style)?void 0:o.styleId)&&i.push(`<w:pStyle w:val="${iI(e.style.styleId)}"/>`),s&&i.push(`<w:jc w:val="${s}"/>`),void 0!==l.spacingBefore||void 0!==l.spacingAfter||void 0!==l.lineHeight){const e=[],t=sI(l.spacingBefore),n=sI(l.spacingAfter),a=void 0!==l.lineHeight&&null!==l.lineHeight&&Number.isFinite(l.lineHeight),r="exact"===l.lineRule||"atLeast"===l.lineRule,o=a?r?lI(l.lineHeight,0):Math.round(240*l.lineHeight):null;null!==t&&e.push(`w:before="${t}"`),null!==n&&e.push(`w:after="${n}"`),null!==o&&e.push(`w:line="${o}"`),null!==o&&r&&e.push(`w:lineRule="${l.lineRule}"`),e.length>0&&i.push(`<w:spacing ${e.join(" ")}/>`)}if(void 0!==l.indentLeft||void 0!==l.indentRight||void 0!==l.indentFirstLine||void 0!==l.indentHanging){const e=[],t=sI(l.indentLeft),n=sI(l.indentRight),a=sI(l.indentFirstLine),r=sI(l.indentHanging);null!==t&&e.push(`w:left="${t}"`),null!==n&&e.push(`w:right="${n}"`),null!==a&&e.push(`w:firstLine="${a}"`),null!==r&&e.push(`w:hanging="${r}"`),e.length>0&&i.push(`<w:ind ${e.join(" ")}/>`)}const d=vC(l.tabs);d&&i.push(d),l.pageBreakBefore&&i.push("<w:pageBreakBefore/>"),l.keepWithNext&&i.push("<w:keepNext/>"),l.keepLinesTogether&&i.push("<w:keepLines/>"),!1===l.widowControl&&i.push('<w:widowControl w:val="0"/>'),l.contextualSpacing&&i.push("<w:contextualSpacing/>"),l.mirrorIndents&&i.push("<w:mirrorIndents/>");const c=yI(l);c&&i.push(c),l.shading&&i.push(uI(l.shading)),l.textDirection&&i.push(`<w:textDirection w:val="${l.textDirection}"/>`),null!=l.outlineLevel&&i.push(`<w:outlineLvl w:val="${l.outlineLevel}"/>`),i.push(...yC(l));const u=t.get(e.id);return u&&i.push(`<w:numPr><w:ilvl w:val="${u.level}"/><w:numId w:val="${u.numId}"/></w:numPr>`),i.length>0?`<w:pPr>${i.join("")}</w:pPr>`:""}const MC={black:[0,0,0],blue:[0,0,255],cyan:[0,255,255],green:[0,128,0],magenta:[255,0,255],red:[255,0,0],yellow:[255,255,0],white:[255,255,255],darkBlue:[0,0,139],darkCyan:[0,139,139],darkGreen:[0,100,0],darkMagenta:[139,0,139],darkRed:[139,0,0],darkYellow:[184,134,11],darkGray:[169,169,169],lightGray:[211,211,211]},SC={ffff00:"yellow",fef08a:"yellow",ff0000:"red","00ff00":"green","0000ff":"blue","00ffff":"cyan",ff00ff:"magenta","000000":"black",ffffff:"white"},AC="http://schemas.openxmlformats.org/markup-compatibility/2006";function IC(e){return`<w14:solidFill><w14:srgbClr w14:val="${cI(e)}"/></w14:solidFill>`}function CC(e){if("solid"===e.type)return IC(e.color);return`<w14:gradFill><w14:gsLst>${e.stops.map(e=>{const t=cI(e.color);return`<w14:gs w14:pos="${Math.round(e.position*mt)}"><w14:srgbClr w14:val="${t}">${void 0!==e.alpha?`<w14:alpha w14:val="${Math.round(e.alpha*mt)}"/>`:""}</w14:srgbClr></w14:gs>`}).join("")}</w14:gsLst><w14:lin w14:ang="${Math.round((e.angle??0)*bt)}" w14:scaled="0"/></w14:gradFill>`}function TC(e,t){return`<w14:srgbClr w14:val="${cI(e)}">${void 0!==t?`<w14:alpha w14:val="${Math.round(t*mt)}"/>`:""}</w14:srgbClr>`}function kC(e){return`<mc:AlternateContent xmlns:mc="${AC}"><mc:Choice Requires="w14">${e}</mc:Choice><mc:Fallback/></mc:AlternateContent>`}function RC(e){return null!=e&&Number.isFinite(e)?Math.round(20*e):null}const EC=Ng;function LC(e){if(!e)return"";const t=[];if(e.bold&&t.push("<w:b/>","<w:bCs/>"),e.italic&&t.push("<w:i/>","<w:iCs/>"),e.underline){const n=e.underlineStyle??"single",a=e.underlineColor?` w:color="${iI(e.underlineColor.replace(/^#/,""))}"`:"";t.push(`<w:u w:val="${iI(n)}"${a}/>`)}if(e.strike&&t.push("<w:strike/>"),e.doubleStrike&&t.push("<w:dstrike/>"),e.outline&&t.push("<w:outline/>"),e.shadow&&t.push("<w:shadow/>"),e.emboss&&t.push("<w:emboss/>"),e.imprint&&t.push("<w:imprint/>"),e.smallCaps&&t.push("<w:smallCaps/>"),e.allCaps&&t.push("<w:caps/>"),e.hidden&&t.push("<w:vanish/>"),e.noProof&&t.push("<w:noProof/>"),e.webHidden&&t.push("<w:webHidden/>"),e.specVanish&&t.push("<w:specVanish/>"),!1===e.snapToGrid&&t.push('<w:snapToGrid w:val="0"/>'),e.textEffect&&t.push(`<w:effect w:val="${iI(e.textEffect)}"/>`),e.textBorder&&t.push(`<w:bdr ${vI(e.textBorder)}`),void 0!==e.characterScale&&null!==e.characterScale&&Number.isFinite(e.characterScale)&&t.push(`<w:w w:val="${Math.max(1,Math.round(e.characterScale))}"/>`),void 0!==e.characterSpacing&&null!==e.characterSpacing){const n=RC(e.characterSpacing);null!==n&&t.push(`<w:spacing w:val="${n}"/>`)}void 0!==e.baselineShift&&null!==e.baselineShift&&Number.isFinite(e.baselineShift)&&t.push(`<w:position w:val="${Math.round(2*e.baselineShift)}"/>`),void 0!==e.kerningThreshold&&null!==e.kerningThreshold&&Number.isFinite(e.kerningThreshold)&&t.push(`<w:kern w:val="${Math.max(0,Math.round(2*e.kerningThreshold))}"/>`);const n=function(e){switch(e){case"none":return"none";case"standard":return"standard";case"contextual":return"contextual";case"historical":return"historical";case"standardContextual":return"standardContextual";default:return null}}(e.ligatures);n&&t.push(`<w14:ligatures w14:val="${n}"/>`);const a=function(e){switch(e){case"proportional":return"proportional";case"tabular":return"tabular";default:return null}}(e.numberSpacing);a&&t.push(`<w14:numSpacing w14:val="${a}"/>`);const r=function(e){switch(e){case"lining":return"lining";case"oldStyle":return"oldStyle";default:return null}}(e.numberForm);r&&t.push(`<w14:numForm w14:val="${r}"/>`);const o="number"!=typeof(i=e.stylisticSet)||i<1||i>20?null:(1<<i-1).toString(16).toUpperCase().padStart(8,"0");var i;if(o&&t.push(`<w14:stylisticSets w14:val="${o}"/>`),e.contextualAlternates&&t.push('<w14:cntxtAlts w14:val="1"/>'),e.superscript?t.push('<w:vertAlign w:val="superscript"/>'):e.subscript&&t.push('<w:vertAlign w:val="subscript"/>'),e.fontFamily&&t.push(`<w:rFonts w:ascii="${iI(e.fontFamily)}" w:hAnsi="${iI(e.fontFamily)}" w:cs="${iI(e.fontFamily)}"/>`),void 0!==e.fontSize&&null!==e.fontSize){const n=function(e){return null!=e&&Number.isFinite(e)?Math.round(e/dt*72*2):null}(e.fontSize);null!==n&&t.push(`<w:sz w:val="${n}"/>`,`<w:szCs w:val="${n}"/>`)}if(e.textFill){const n="solid"===e.textFill.type?e.textFill.color:e.color;t.push(function(e,t){const n=CC(e),a=cI(t??"000000");return`<mc:AlternateContent xmlns:mc="${AC}"><mc:Choice Requires="w14"><w14:textFill>${n}</w14:textFill></mc:Choice><mc:Fallback><w:color w:val="${a}"/></mc:Fallback></mc:AlternateContent>`}(e.textFill,n??null))}else e.color&&t.push(`<w:color w:val="${iI(e.color.replace(/^#/,""))}"/>`);if(e.textOutline&&t.push(function(e){const t=Math.round(Math.max(0,e.widthPt)*ft),n=e.fill?CC(e.fill):e.color?IC(e.color):"";return`<mc:AlternateContent xmlns:mc="${AC}"><mc:Choice Requires="w14"><w14:textOutline w14:w="${t}" w14:cap="flat" w14:cmpd="sng" w14:algn="ctr">`+n+"</w14:textOutline></mc:Choice><mc:Fallback><w:outline/></mc:Fallback></mc:AlternateContent>"}(e.textOutline)),e.textShadow&&t.push(function(e){const t=Math.round(Math.max(0,e.blurPt)*ft),n=Math.round(Math.max(0,e.distPt)*ft),a=Math.round(e.dirDeg*bt),r=TC(e.color,e.alpha);return`<mc:AlternateContent xmlns:mc="${AC}"><mc:Choice Requires="w14"><w14:shadow w14:blurRad="${t}" w14:dist="${n}" w14:dir="${a}" w14:sx="100000" w14:sy="100000" w14:kx="0" w14:ky="0" w14:algn="ctr">`+r+"</w14:shadow></mc:Choice><mc:Fallback><w:shadow/></mc:Fallback></mc:AlternateContent>"}(e.textShadow)),e.glow&&t.push(function(e){const t=Math.round(Math.max(0,e.radiusPt)*ft),n=TC(e.color,e.alpha);return`<mc:AlternateContent xmlns:mc="${AC}"><mc:Choice Requires="w14"><w14:glow w14:rad="${t}">${n}</w14:glow></mc:Choice><mc:Fallback/></mc:AlternateContent>`}(e.glow)),e.reflection&&t.push(function(e){const t=Math.round(Math.max(0,e.blurPt)*ft),n=Math.round(e.startAlpha*mt),a=Math.round(e.startPos*mt),r=Math.round(e.endAlpha*mt),o=Math.round(e.endPos*mt),i=Math.round(Math.max(0,e.distPt)*ft);return`<mc:AlternateContent xmlns:mc="${AC}"><mc:Choice Requires="w14"><w14:reflection w14:blurRad="${t}" w14:stA="${n}" w14:stPos="${a}" w14:endA="${r}" w14:endPos="${o}" w14:dist="${i}" w14:dir="5400000" w14:fadeDir="5400000" w14:sx="100000" w14:sy="-100000" w14:kx="0" w14:ky="0" w14:algn="bl"/></mc:Choice><mc:Fallback/></mc:AlternateContent>`}(e.reflection)),e.scene3dXml&&t.push(kC(e.scene3dXml)),e.props3dXml&&t.push(kC(e.props3dXml)),e.highlight&&t.push(`<w:highlight w:val="${iI(function(e){if(e in MC)return e;const t=e.trim().replace(/^#/,"").toLowerCase(),n=SC[t];if(n)return n;const a=EC(e);if(!a)return"yellow";let r="yellow",o=Number.POSITIVE_INFINITY;for(const[i,l]of Object.entries(MC)){const e=(l[0]-a[0])**2+(l[1]-a[1])**2+(l[2]-a[2])**2;e<o&&(o=e,r=i)}return r}(e.highlight))}"/>`),e.shading&&t.push(uI(e.shading)),void 0!==e.fitText&&null!==e.fitText&&Number.isFinite(e.fitText)){const n=RC(e.fitText);null!==n&&n>0&&t.push(`<w:fitText w:val="${n}"/>`)}if(e.rtl&&t.push("<w:rtl/>"),e.complexScript&&t.push("<w:cs/>"),e.emphasisMark&&t.push(`<w:em w:val="${iI(e.emphasisMark)}"/>`),e.language){const n=[];e.language.value&&n.push(`w:val="${iI(e.language.value)}"`),e.language.eastAsia&&n.push(`w:eastAsia="${iI(e.language.eastAsia)}"`),e.language.bidi&&n.push(`w:bidi="${iI(e.language.bidi)}"`),n.length>0&&t.push(`<w:lang ${n.join(" ")}/>`)}return t.length>0?`<w:rPr>${t.join("")}</w:rPr>`:""}function VC(e){if(0===e.length)return"";var t;return`<w:t${/^\s|\s$/.test(t=e)||t.includes(" ")?' xml:space="preserve"':""}>${iI(e)}</w:t>`}function NC(e){if(0===e.length)return"<w:t></w:t>";let t="",n="";for(const a of e)"\n"!==a?"\t"!==a?"‑"!==a?"­"!==a?n+=a:(t+=VC(n),n="",t+="<w:softHyphen/>"):(t+=VC(n),n="",t+="<w:noBreakHyphen/>"):(t+=VC(n),n="",t+="<w:tab/>"):(t+=VC(n),n="",t+="<w:br/>");return t+=VC(n),t||"<w:t></w:t>"}function zC(e,t){return e??t?"1":"0"}function PC(e,t,n){const a=iI((null==t?void 0:t.relativeFrom)??n);if(null==t?void 0:t.align)return`<wp:${e} relativeFrom="${a}"><wp:align>${iI(t.align)}</wp:align></wp:${e}>`;return`<wp:${e} relativeFrom="${a}"><wp:posOffset>${(null==t?void 0:t.offset)??0}</wp:posOffset></wp:${e}>`}function OC(e){if(!e||e.length<3)return"";const t=e=>Math.round(21600*Math.min(1,Math.max(0,e))),n=(e,n)=>`<wp:${n} x="${t(e.x)}" y="${t(e.y)}"/>`,a=e[0];return`<wp:wrapPolygon edited="0">${[n(a,"start"),...e.slice(1).map(e=>n(e,"lineTo")),n(a,"lineTo")].join("")}</wp:wrapPolygon>`}function qC(e){const{cx:t,cy:n,floating:a,docPrId:r,docPrName:o,altAttr:i,graphicXml:l}=e,s=iI(o);if(!a)return`<w:drawing><wp:inline distT="0" distB="0" distL="0" distR="0"><wp:extent cx="${t}" cy="${n}"/><wp:effectExtent l="0" t="0" r="0" b="0"/><wp:docPr id="${r}" name="${s}"${i}/>${l}</wp:inline></w:drawing>`;const d=a.distT??0,c=a.distB??0,u=a.distL??0,p=a.distR??0,h=PC("positionH",a.positionH,"column"),f=PC("positionV",a.positionV,"paragraph"),g=function(e,t){switch(e){case"square":return'<wp:wrapSquare wrapText="bothSides"/>';case"tight":{const e=OC(t);return e?`<wp:wrapTight wrapText="bothSides">${e}</wp:wrapTight>`:'<wp:wrapTight wrapText="bothSides"/>'}case"through":{const e=OC(t);return e?`<wp:wrapThrough wrapText="bothSides">${e}</wp:wrapThrough>`:'<wp:wrapThrough wrapText="bothSides"/>'}case"topAndBottom":return"<wp:wrapTopAndBottom/>";default:return"<wp:wrapNone/>"}}(a.wrap,e.wrapPolygon);return`<w:drawing><wp:anchor distT="${d}" distB="${c}" distL="${u}" distR="${p}" simplePos="${zC(a.simplePos,!1)}" relativeHeight="${a.relativeHeight??0}" behindDoc="${zC(a.behindDoc,!1)}" locked="${zC(a.locked,!1)}" layoutInCell="${zC(a.layoutInCell,!0)}" allowOverlap="${zC(a.allowOverlap,!0)}"><wp:simplePos x="0" y="0"/>${h}${f}<wp:extent cx="${t}" cy="${n}"/><wp:effectExtent l="0" t="0" r="0" b="0"/>${g}<wp:docPr id="${r}" name="${s}"${i}/>${l}</wp:anchor></w:drawing>`}function BC(e,t,n,a){const r=n.images.find(e=>e.rId===t);if(!r)return null;const o=(parseInt(t.replace(/\D+/g,""),10)||0)+1,i=void 0!==r.alt?` descr="${iI(r.alt)}" title="${iI(r.alt)}"`:"",l=function(e){let t="";if(e.rotation){const n=Math.round(e.rotation*bt);0!==n&&(t+=` rot="${n}"`)}return e.flipH&&(t+=' flipH="1"'),e.flipV&&(t+=' flipV="1"'),t}(r),s=function(e){if(!e)return"";const t=e=>e?Math.round(e*mt):0,n=t(e.left),a=t(e.top),r=t(e.right),o=t(e.bottom);return 0===n&&0===a&&0===r&&0===o?"":`<a:srcRect l="${n}" t="${a}" r="${r}" b="${o}"/>`}(r.crop),d=(c=r.border)?`<a:ln${void 0!==c.widthPt?` w="${Math.round(c.widthPt*ft)}"`:""}><a:solidFill><a:srgbClr val="${iI(c.color.replace(/^#/,""))}"/></a:solidFill>${c.dash?`<a:prstDash val="${c.dash}"/>`:""}</a:ln>`:"";var c;const u="tile"===r.fillMode?"<a:tile/>":"<a:stretch><a:fillRect/></a:stretch>",p="linked"===r.kind?`r:link="${t}"`:`r:embed="${t}"`,h=function(e){if(!e)return'<a:prstGeom prst="rect"><a:avLst/></a:prstGeom>';if(e.rawXml&&!e.adjustments)return e.rawXml;const t=Object.entries(e.adjustments??{}).map(([e,t])=>`<a:gd name="${iI(e)}" fmla="val ${Number.isFinite(t)?t:0}"/>`).join(""),n=t?`<a:avLst>${t}</a:avLst>`:"<a:avLst/>";return`<a:prstGeom prst="${iI(e.preset)}">${n}</a:prstGeom>`}(r.cropShape),f=function(e,t,n,a){return qC({cx:e.cx,cy:e.cy,floating:e.floating,docPrId:t,docPrName:"Picture",altAttr:n,graphicXml:a,wrapPolygon:e.wrapPolygon})}(r,o,i,`<a:graphic xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"><a:graphicData uri="http://schemas.openxmlformats.org/drawingml/2006/picture"><pic:pic xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture"><pic:nvPicPr><pic:cNvPr id="0" name="Picture"${i}/><pic:cNvPicPr/></pic:nvPicPr><pic:blipFill><a:blip ${p} xmlns:r="${rI}"/>${s}${u}</pic:blipFill><pic:spPr><a:xfrm${l}><a:off x="0" y="0"/><a:ext cx="${r.cx}" cy="${r.cy}"/></a:xfrm>${h}${d}</pic:spPr></pic:pic></a:graphicData></a:graphic>`);return`<w:r>${a}${f}</w:r>`}function WC(e,t,n,a,r,o){const i=Math.round(t.width*ht),l=Math.round(t.height*ht),s=n.textBoxDocPrIds.get(e.id)??1,d=t.name??"Text Box",c=void 0!==t.alt?` descr="${iI(t.alt)}" title="${iI(t.alt)}"`:"",u=function(e,t,n,a,r,o){const i=e.shape,l=iI((null==i?void 0:i.preset)??"rect"),s=e.rotation?Math.round(e.rotation*bt):0,d=0!==s?` rot="${s}"`:"",c=(null==i?void 0:i.fill)?`<a:solidFill><a:srgbClr val="${iI(i.fill.replace(/^#/,""))}"/></a:solidFill>`:"";let u="";((null==i?void 0:i.borderColor)||void 0!==(null==i?void 0:i.borderWidthPt))&&(u=`<a:ln${void 0!==(null==i?void 0:i.borderWidthPt)?` w="${Math.round(i.borderWidthPt*ft)}"`:""}>${(null==i?void 0:i.borderColor)?`<a:solidFill><a:srgbClr val="${iI(i.borderColor.replace(/^#/,""))}"/></a:solidFill>`:""}<a:miter lim="800000"/></a:ln>`);const p=e.body,h=['rot="0"',`vert="${iI((null==p?void 0:p.vert)??"horz")}"`];h.push(`wrap="${iI((null==p?void 0:p.wrap)??"square")}"`),void 0!==(null==p?void 0:p.paddingLeft)&&h.push(`lIns="${Math.round(p.paddingLeft*ht)}"`),void 0!==(null==p?void 0:p.paddingTop)&&h.push(`tIns="${Math.round(p.paddingTop*ht)}"`),void 0!==(null==p?void 0:p.paddingRight)&&h.push(`rIns="${Math.round(p.paddingRight*ht)}"`),void 0!==(null==p?void 0:p.paddingBottom)&&h.push(`bIns="${Math.round(p.paddingBottom*ht)}"`),h.push(`anchor="${iI((null==p?void 0:p.anchor)??"t")}"`),h.push('anchorCtr="0"');const f=(null==p?void 0:p.autoFit)?"<a:spAutoFit/>":"",g=e.blocks.length>0,m=g?o(e.blocks,a,r):"";return'<a:graphic xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"><a:graphicData uri="http://schemas.microsoft.com/office/word/2010/wordprocessingShape"><wps:wsp>'+(g?'<wps:cNvSpPr txBox="1"><a:spLocks noChangeArrowheads="1"/></wps:cNvSpPr>':"<wps:cNvSpPr/>")+`<wps:spPr bwMode="auto"><a:xfrm${d}><a:off x="0" y="0"/><a:ext cx="${t}" cy="${n}"/></a:xfrm><a:prstGeom prst="${l}"><a:avLst/></a:prstGeom>`+c+u+"</wps:spPr>"+(g?`<wps:txbx><w:txbxContent>${m}</w:txbxContent></wps:txbx>`:"")+`<wps:bodyPr ${h.join(" ")}>${f}</wps:bodyPr></wps:wsp></a:graphicData></a:graphic>`}(t,i,l,n,a,o);return`<w:r>${r}${qC({cx:i,cy:l,floating:t.floating,docPrId:s,docPrName:d,altAttr:c,graphicXml:u})}</w:r>`}const FC={footnote:"FootnoteReference",endnote:"EndnoteReference"};function DC(e){return`<w:r><w:rPr><w:rStyle w:val="${FC[e]}"/><w:vertAlign w:val="superscript"/></w:rPr><w:${e}Ref/></w:r>`}function HC(e,t,n,a){if(!t)return null;const r="footnote"===e?a.footnoteIdMap:a.endnoteIdMap,o=null==r?void 0:r.get(t.noteId);if(void 0===o)return null;const i={...n??{},superscript:!0},l=t.customMark?' w:customMarkFollows="1"':"",s=t.customMark?`<w:t xml:space="preserve">${iI(t.customMark)}</w:t>`:"";return`<w:r>${LC(i)}<w:${e}Reference${l} w:id="${o}"/>${s}</w:r>`}function UC(e,t){return void 0===t?"":` m:${e}="${iI(String(t))}"`}function GC(e){return e.map(jC).join("")}function jC(e){switch(e.kind){case"text":return function(e){const t=e.style;return`<m:r>${t?`<m:rPr>${t.bold?"<m:b/>":""}${t.italic?"<m:i/>":""}${t.normalText?"<m:nor/>":""}${t.script?`<m:sty m:val="${iI(t.script)}"/>`:""}</m:rPr>`:""}<m:t xml:space="preserve">${iI(e.value)}</m:t></m:r>`}(e);case"fraction":return`<m:f>${!1===e.bar?'<m:fPr><m:type m:val="noBar"/></m:fPr>':""}<m:num>${GC(e.numerator)}</m:num><m:den>${GC(e.denominator)}</m:den></m:f>`;case"radical":return e.degree?`<m:rad><m:deg>${GC(e.degree)}</m:deg><m:e>${GC(e.radicand)}</m:e></m:rad>`:`<m:rad><m:e>${GC(e.radicand)}</m:e></m:rad>`;case"script":{const t=e.subscript&&e.superscript?"sSubSup":e.subscript?"sSub":"sSup";return`<m:${t}><m:e>${GC(e.base)}</m:e>${e.subscript?`<m:sub>${GC(e.subscript)}</m:sub>`:""}${e.superscript?`<m:sup>${GC(e.superscript)}</m:sup>`:""}</m:${t}>`}case"delimiter":return`<m:d><m:dPr>${UC("begChr",e.begin)}${UC("endChr",e.end)}${UC("sepChr",e.separator)}${!1===e.grow?'<m:grow m:val="0"/>':""}</m:dPr>${e.children.map(e=>`<m:e>${GC(e)}</m:e>`).join("")}</m:d>`;case"accent":return`<m:acc><m:accPr><m:chr${UC("val",e.accent)}/></m:accPr><m:e>${GC(e.children)}</m:e></m:acc>`;case"nary":return`<m:nary><m:naryPr><m:chr${UC("val",e.operator)}/>${!1===e.grow?'<m:grow m:val="0"/>':""}</m:naryPr>${e.subscript?`<m:sub>${GC(e.subscript)}</m:sub>`:""}${e.superscript?`<m:sup>${GC(e.superscript)}</m:sup>`:""}<m:e>${GC(e.children)}</m:e></m:nary>`;case"limit":return"low"===e.operator?`<m:limLow><m:e>${GC(e.base)}</m:e><m:lim>${GC(e.limit)}</m:lim></m:limLow>`:`<m:limUpp><m:e>${GC(e.base)}</m:e><m:lim>${GC(e.limit)}</m:lim></m:limUpp>`;case"matrix":return`<m:m>${e.rows.map(e=>`<m:mr>${e.map(e=>`<m:e>${GC(e)}</m:e>`).join("")}</m:mr>`).join("")}</m:m>`;case"box":return`<m:${e.hidden?"phant":e.border?"borderBox":"box"}><m:e>${GC(e.children)}</m:e></m:${e.hidden?"phant":e.border?"borderBox":"box"}>`;case"group":return GC(e.children);case"raw":return e.xml}}const ZC="http://schemas.openxmlformats.org/markup-compatibility/2006",KC=new Set(["t","tab","br","cr","noBreakHyphen","softHyphen"]),XC=new Set([...KC,"drawing","pict","sym","fldChar","instrText","footnoteReference","endnoteReference","separator","continuationSeparator"]),YC=new Set(["rStyle","rFonts","b","bCs","i","iCs","caps","smallCaps","strike","dstrike","outline","shadow","emboss","imprint","noProof","snapToGrid","vanish","webHidden","color","spacing","w","kern","position","sz","szCs","highlight","u","effect","bdr","shd","fitText","vertAlign","rtl","cs","em","lang","eastAsianLayout","specVanish","oMath"]),JC=new Set(["ligatures","numSpacing","numForm","stylisticSets","cntxtAlts","textFill","textOutline","shadow","glow","reflection","scene3d","props3d"]);function QC(e){return/\br:(?:id|embed|link)\s*=/.test(e)}function $C(e){const t=[];for(let n=0;n<e.childNodes.length;n+=1){const a=e.childNodes[n];(null==a?void 0:a.nodeType)===a.ELEMENT_NODE&&t.push(a)}return t}function _C(e){return e.localName??e.tagName}function eT(e,t,n){return $C(e).find(e=>e.namespaceURI===t&&_C(e)===n)}function tT(e){return`${e.namespaceURI??""}\0${_C(e)}`}function nT(e){const t=(new Ox).parseFromString(e,"application/xml").documentElement;return t&&"r"===_C(t)?t:void 0}function aT(e){const t=(new Ox).parseFromString(`<oasis:root xmlns:oasis="urn:oasis:docx" xmlns:w="${nI}" xmlns:w14="${oI}" xmlns:r="${rI}" xmlns:mc="${ZC}" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape">${e}</oasis:root>`,"application/xml").documentElement;if(!t)return;const n=$C(t);return 1===n.length&&"r"===_C(n[0])?n[0]:void 0}function rT(e){return"http://www.w3.org/2000/xmlns/"===e.namespaceURI||"xmlns"===e.prefix||"xmlns"===e.name}function oT(e){for(let t=0;t<e.attributes.length;t+=1){const n=e.attributes[t];if(n&&!rT(n)&&n.namespaceURI!==rI)return!0}return!1}function iT(e){const t=_C(e);return e.namespaceURI===nI?YC.has(t):e.namespaceURI===oI?JC.has(t):e.namespaceURI===ZC&&"AlternateContent"===t}function lT(e,t){const n=eT(e,nI,"rPr");if(!n)return;const a=$C(n),r=eT(t,nI,"rPr"),o=r?$C(r):[],i=new Set(o.map(tT)),l=a.filter(e=>!iT(e)&&!i.has(tT(e)));if(0===l.length)return;const s=function(e){const t=eT(e,nI,"rPr");if(t)return t;const n=e.ownerDocument.createElementNS(nI,"w:rPr");return e.insertBefore(n,e.firstChild),n}(t);for(const d of l){const e=a.indexOf(d),t=a.slice(e+1).find(e=>i.has(tT(e))),n=t?$C(s).find(e=>tT(e)===tT(t))??null:null;s.insertBefore(d.cloneNode(!0),n)}}function sT(e){const t=_C(e);return e.namespaceURI===ZC&&"AlternateContent"===t?function(e){const t=e=>$C(e).some(e=>{const n=_C(e);return!(e.namespaceURI!==nI||!XC.has(n))||t(e)});return t(e)}(e):e.namespaceURI===nI&&("rPr"===t||XC.has(t))}function dT(e){const t=iA(e);if(t&&!QC(t.xml)&&(n=t.xml,!YS.test(n))){var n;if(t.semanticSignature===aA(e))return t.xml;if(t.structureSignature===rA(e))return function(e,t){if("text"!==e.kind)return;const n=nT(t);if(!n)return;const a=$C(n),r=a.filter(e=>e.namespaceURI===nI&&KC.has(_C(e))),o=r[0]??a.find(e=>!(e.namespaceURI===nI&&"rPr"===_C(e)))??null,i=aT(`<w:r>${NC(e.text)}</w:r>`);if(!i)return;const l=$C(i);for(const s of l)n.insertBefore(s.cloneNode(!0),o);for(const s of r)n.removeChild(s);return(new Px).serializeToString(n)}(e,t.xml)}}function cT(e,t){const n=iA(e);if(!n||QC(n.xml))return t;const a=nT(n.xml);if(!a||!function(e){if(oT(e))return!0;const t=eT(e,nI,"rPr");return!(!t||!oT(t)&&!$C(t).some(e=>!iT(e)))||$C(e).some(e=>!sT(e))}(a))return t;const r=aT(t);return r?(function(e,t){for(let n=0;n<e.attributes.length;n+=1){const a=e.attributes[n];if(!a||a.namespaceURI===rI)continue;const r=a.localName??a.name;(a.namespaceURI?t.hasAttributeNS(a.namespaceURI,r):t.hasAttribute(a.name))||(a.namespaceURI?t.setAttributeNS(a.namespaceURI,a.name,a.value):t.setAttribute(a.name,a.value))}}(a,r),lT(a,r),function(e,t){const n=$C(e),a=$C(t),r=new Set(a.map(tT)),o=n.filter(e=>!sT(e)&&!r.has(tT(e)));for(const i of o){const e=n.indexOf(i),a=n.slice(e+1).find(e=>sT(e)),r=a?$C(t).find(e=>tT(e)===tT(a))??null:null;t.insertBefore(i.cloneNode(!0),r)}}(a,r),(new Px).serializeToString(r)):t}function uT(e,t,n,a,r){if(e.__isFootnoteRefMarker)return DC("footnote");if(e.__isEndnoteRefMarker)return DC("endnote");const o=dT(e);if(o)return o;const i=function(e,t,n){var a;const r=ln(e.styles,t,n),o={bold:r.bold,italic:r.italic,underline:r.underline,underlineStyle:r.underlineStyle,underlineColor:r.underlineColor,strike:r.strike,doubleStrike:r.doubleStrike,superscript:r.superscript,subscript:r.subscript,smallCaps:r.smallCaps,allCaps:r.allCaps,hidden:r.hidden,noProof:r.noProof,webHidden:r.webHidden,specVanish:r.specVanish,rtl:r.rtl,complexScript:r.complexScript,snapToGrid:r.snapToGrid,fitText:r.fitText,emphasisMark:r.emphasisMark,textBorder:r.textBorder,outline:r.outline,shadow:r.shadow,emboss:r.emboss,imprint:r.imprint,textEffect:r.textEffect,characterScale:r.characterScale,characterSpacing:r.characterSpacing,baselineShift:r.baselineShift,kerningThreshold:r.kerningThreshold,ligatures:r.ligatures,numberSpacing:r.numberSpacing,numberForm:r.numberForm,stylisticSet:r.stylisticSet,contextualAlternates:r.contextualAlternates,fontFamily:r.fontFamily,fontSize:r.fontSize,color:r.color,textFill:r.textFill,textOutline:r.textOutline,textShadow:r.textShadow,glow:r.glow,reflection:r.reflection,scene3dXml:r.scene3dXml,props3dXml:r.props3dXml,highlight:r.highlight,shading:r.shading,language:r.language};return(null==(a=e.styles)?void 0:a.link)&&(o.link=e.styles.link),o}(e,n,a),l=()=>LC(i),s=()=>`<w:r>${l()}${NC(e.text)}</w:r>`,d=Pt(e,{footnoteReference:e=>function(e,t,n){const a=Vt(e);return HC("footnote",a?{noteId:a.footnoteId,customMark:a.customMark}:void 0,t,n)}(e,i,t)??s(),endnoteReference:e=>function(e,t,n){const a=Nt(e);return HC("endnote",a?{noteId:a.endnoteId,customMark:a.customMark}:void 0,t,n)}(e,i,t)??s(),fieldChar:e=>function(e,t){const n=(e.fieldLock?' w:fldLock="true"':"")+(e.dirty?' w:dirty="true"':"");return`<w:r>${t}<w:fldChar w:fldCharType="${e.kind}"${n}/></w:r>`}(e.fieldChar,l()),fieldInstruction:e=>{return t=e.fieldInstruction,`<w:r>${l()}<w:instrText xml:space="preserve">${iI(t)}</w:instrText></w:r>`;var t},field:e=>{return t=e.field.type,n=l(),`<w:fldSimple w:instr="${"PAGE"===t?" PAGE ":" NUMPAGES "}"><w:r>${n}<w:t>1</w:t></w:r></w:fldSimple>`;var t,n},textBox:e=>WC(e,e.textBox,t,a,l(),r),image:e=>{const n=t.imageMap.get(e.id);if(n){const a=BC(e.id,n,t,l());if(null!==a)return a}return s()},sym:e=>`<w:r>${l()}<w:sym w:font="${iI(e.sym.font)}" w:char="${e.sym.char}"/></w:r>`,math:e=>function(e){const t=`<m:oMath>${GC(e.children)}</m:oMath>`;return e.display?`<m:oMathPara>${t}</m:oMathPara>`:t}(e.math),text:()=>s()});return cT(e,d)}function pT(e,t,n,a,r){var o;const i=uT(e,t,n,a,r),l=null==(o=e.styles)?void 0:o.link;return l?function(e,t,n){if(t.startsWith("#"))return`<w:hyperlink w:anchor="${iI(t.slice(1))}">${e}</w:hyperlink>`;const a=n.hyperlinkMap.get(t);return a?`<w:hyperlink r:id="${a}">${e}</w:hyperlink>`:e}(i,l,t):i}function hT(e,t){var n,a,r;let o="",i=0;for(;i<e.length;){const l=e[i],s=null==(n=l.sdtWrappers)?void 0:n[0];if(!s){o+=t(l),i+=1;continue}const d=[];let c=i;for(;c<e.length&&(null==(r=null==(a=e[c].sdtWrappers)?void 0:a[0])?void 0:r.groupId)===s.groupId;){const t=e[c],n=t.sdtWrappers.slice(1);d.push({...t,sdtWrappers:n.length>0?n:void 0}),c+=1}const u=hT(d,t);o+=`<w:sdt>${BI(s.sdtPr)}${s.sdtEndPrXml??""}<w:sdtContent>${u}</w:sdtContent></w:sdt>`,i=c}return o}const fT=new Set(["pStyle","keepNext","keepLines","pageBreakBefore","framePr","widowControl","numPr","suppressLineNumbers","pBdr","shd","tabs","suppressAutoHyphens","kinsoku","wordWrap","overflowPunct","topLinePunct","autoSpaceDE","autoSpaceDN","bidi","adjustRightInd","snapToGrid","spacing","ind","contextualSpacing","mirrorIndents","suppressOverlap","jc","textDirection","textAlignment","textboxTightWrap","outlineLvl","divId","cnfStyle","rPr","sectPr","pPrChange"]);function gT(e){return/\br:(?:id|embed|link)\s*=/.test(e)}function mT(e){const t=[];for(let n=0;n<e.childNodes.length;n+=1){const a=e.childNodes[n];(null==a?void 0:a.nodeType)===a.ELEMENT_NODE&&t.push(a)}return t}function bT(e){return e.localName??e.tagName}function vT(e){return`${e.namespaceURI??""}\0${bT(e)}`}function yT(e,t){var n;if(!e||gT(e))return t;const a=function(e){const t=(new Ox).parseFromString(e,"application/xml").documentElement;return(null==t?void 0:t.namespaceURI)===nI&&"pPr"===bT(t)?t:void 0}(e),r=function(e){if(e){const t=(new Ox).parseFromString(`<oasis:root xmlns:oasis="urn:oasis:docx" xmlns:w="${nI}">${e}</oasis:root>`,"application/xml").documentElement,n=t?mT(t):[];if(1===n.length&&n[0].namespaceURI===nI&&"pPr"===bT(n[0]))return n[0]}return(new Ox).parseFromString(`<w:pPr xmlns:w="${nI}"/>`,"application/xml").documentElement}(t);if(!a||!r)return t;!function(e,t){for(let n=0;n<e.attributes.length;n+=1){const a=e.attributes[n];if(!a||a.namespaceURI===rI)continue;const r=a.localName??a.name;(a.namespaceURI?t.hasAttributeNS(a.namespaceURI,r):t.hasAttribute(a.name))||(a.namespaceURI?t.setAttributeNS(a.namespaceURI,a.name,a.value):t.setAttribute(a.name,a.value))}}(a,r);const o=mT(a),i=mT(r),l=new Map;for(const u of i){const e=vT(u),t=l.get(e)??[];t.push(u),l.set(e,t)}const s=new Map;for(const u of o){const e=vT(u),t=s.get(e)??0;s.set(e,t+1);const a=null==(n=l.get(e))?void 0:n[t];a&&KI(u,a)}const d=new Set(i.map(vT)),c=o.filter(e=>{return!(t=e,t.namespaceURI===nI&&fT.has(bT(t))||d.has(vT(e)));var t});for(const u of c){const e=o.indexOf(u),t=o.slice(e+1).find(e=>d.has(vT(e))),n=t?mT(r).find(e=>vT(e)===vT(t))??null:null;r.insertBefore(u.cloneNode(!0),n)}return t||1!==r.attributes.length||0!==mT(r).length?(new Px).serializeToString(r):""}const wT=new Set(["pPr","r","hyperlink","fldSimple","bookmarkStart","bookmarkEnd","commentRangeStart","commentRangeEnd"]);function xT(e){const t=[];for(let n=0;n<e.childNodes.length;n+=1){const a=e.childNodes[n];(null==a?void 0:a.nodeType)===a.ELEMENT_NODE&&t.push(a)}return t}function MT(e){return e.localName??e.tagName}function ST(e,t){const n=(new Ox).parseFromString(`<oasis:root xmlns:oasis="urn:oasis:docx" xmlns:w="${nI}" xmlns:w14="${oI}" xmlns:r="${rI}" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape">${e}</oasis:root>`,"application/xml").documentElement;if(!n)return;const a=xT(n);return 1===a.length&&a[0].namespaceURI===nI&&MT(a[0])===t?a[0]:void 0}function AT(e){return"http://www.w3.org/2000/xmlns/"===e.namespaceURI||"xmlns"===e.prefix||"xmlns"===e.name}function IT(e,t){const n=(a="pPr",xT(e).find(e=>e.namespaceURI===nI&&MT(e)===a));var a;if(!t)return n&&e.removeChild(n),!0;const r=ST(t,"pPr");if(!r)return!1;const o=r.cloneNode(!0);return n?e.replaceChild(o,n):e.insertBefore(o,e.firstChild),!0}function CT(e,t,n,a){var r,o;const i=null==(r=dA(e))?void 0:r.xml;if(!i||a.hasOverrides||a.hasBoundaryTokens||e.dropCap||/\br:(?:id|embed|link)\s*=/.test(i))return;const l=function(e){const t=(new Ox).parseFromString(e,"application/xml").documentElement;return(null==t?void 0:t.namespaceURI)===nI&&"p"===MT(t)?t:void 0}(i);if(!l||!function(e){for(let t=0;t<e.attributes.length;t+=1){const n=e.attributes[t];if(n&&!AT(n)&&n.namespaceURI!==rI)return!0}return xT(e).some(e=>{const t=MT(e);return e.namespaceURI!==nI||!wT.has(t)})}(l))return;const s=function(e){const t=[],n=e=>{for(const a of xT(e)){const e=MT(a);a.namespaceURI!==nI||"r"!==e?(a.namespaceURI!==nI||"pPr"!==e&&"p"!==e&&"tbl"!==e&&"txbxContent"!==e)&&n(a):t.push(a)}};return n(e),t}(l);if(s.length!==n.length)return;const d=n.map(e=>ST(e,"r"));if(!d.some(e=>!e)&&IT(l,t)){for(let e=0;e<s.length;e+=1)null==(o=s[e].parentNode)||o.replaceChild(d[e].cloneNode(!0),s[e]);return(new Px).serializeToString(l)}}function TT(e,t){return e.rows.some(e=>e.cells.some(e=>e.blocks.some(e=>function(e,t){var n,a;switch(e.type){case"paragraph":return Boolean((null==(n=t.bookmarkEventsByParagraph)?void 0:n.has(e.id))||(null==(a=t.commentEventsByParagraph)?void 0:a.has(e.id)));case"table":return TT(e,t);default:return It(e,"block")}}(e,t))))}function kT(e,t,n){var a;switch(e.type){case"paragraph":return ET(e,t,n);case"table":{const r=(null==(a=e.style)?void 0:a.pageBreakBefore)?'<w:p><w:r><w:br w:type="page"/></w:r></w:p>':"",o=function(e){var t;const n=null==(t=vA(e))?void 0:t.xml;return Boolean(n&&/<w:trPr(?:\s|>)[\s\S]*?<w:jc\b[^>]*\bw:val="(?:start|end)"/.test(n))}(e)?void 0:function(e,t){const n=vA(e);if(n&&!t.hasBoundaryTokens&&!_S(n.xml))return n.semanticSignature===cA(e)?n.xml:void 0}(e,{hasBoundaryTokens:TT(e,t)});return r+(o??bC(e,(e,a)=>function(e,t,n,a){var r;return"paragraph"===e.type?ET(e,n,a,{align:null==(r=t.style)?void 0:r.horizontalAlign}):kT(e,n,a)}(e,a,t,n)))}default:return It(e,"block")}}function RT(e,t,n){var a,r,o;let i="",l=0;for(;l<e.length;){const s=e[l],d=null==(a=s.sdtWrappers)?void 0:a[0];if(!d){i+=kT(s,t,n),l+=1;continue}const c=[];let u=l;for(;u<e.length&&(null==(o=null==(r=e[u].sdtWrappers)?void 0:r[0])?void 0:o.groupId)===d.groupId;){const t=e[u].sdtWrappers.slice(1);c.push({...e[u],sdtWrappers:t.length>0?t:void 0}),u+=1}const p=RT(c,t,n);i+=`<w:sdt>${BI(d.sdtPr)}${d.sdtEndPrXml??""}<w:sdtContent>${p}</w:sdtContent></w:sdt>`,l=u}return i}function ET(e,t,n,a){var r,o,i;const l=e.runs.length>0?e.runs:[{id:"",text:"",kind:"text"}],s=e.dropCap?function(e){const t=LC(e.style);var n;return`<w:p><w:pPr><w:keepNext/><w:framePr w:dropCap="${e.type}" w:lines="${e.lines}" w:wrap="around" w:vAnchor="text" w:hAnchor="text"/><w:spacing w:after="0"/>${t?`<w:rPr>${n=t,n.replace(/^<w:rPr>/,"").replace(/<\/w:rPr>$/,"")}</w:rPr>`:""}</w:pPr><w:r>${t}${NC(e.text)}</w:r></w:p>`}(e.dropCap):"",d=null==(r=t.bookmarkEventsByParagraph)?void 0:r.get(e.id),c=null==(o=t.commentEventsByParagraph)?void 0:o.get(e.id),u=[...(d??[]).map(e=>({offset:e.offset,seq:e.seq,xml:pI(e)})),...(c??[]).map(e=>({offset:e.offset,seq:e.seq,xml:hI(e)}))],p=function(e,t){const n=dA(e);if(!(!(null==n?void 0:n.xml)||!n.semanticSignature||t.hasOverrides||t.hasBoundaryTokens||_S(n.xml)||YS.test(n.xml)||JS.test(n.xml)))return n.semanticSignature===lA(e)?n.xml:void 0}(e,{hasOverrides:Boolean(a),hasBoundaryTokens:u.length>0});if(p)return p;const h=a=>{var r;return pT(a,t,null==(r=e.style)?void 0:r.styleId,n,RT)},f=0===u.length?l.map(h):void 0,g=0===u.length?hT(l,h):function(e,t,n,a,r){const o=[...t].sort((e,t)=>e.offset-t.offset||e.seq-t.seq);let i=0,l=0,s=hT(e,e=>{let t="";const s=l,d=s+e.text.length;for(;i<o.length&&o[i].offset<=s;)t+=o[i].xml,i+=1;if(function(e){return"text"===e.kind||"sym"===e.kind}(e)&&e.text.length>0){let l=s;for(;i<o.length&&o[i].offset<d;){const d=o[i];d.offset>l&&(t+=pT({...e,text:e.text.slice(l-s,d.offset-s)},n,a,r,RT)),t+=d.xml,i+=1,l=d.offset}l<d&&(t+=pT({...e,text:e.text.slice(l-s)},n,a,r,RT))}else t+=pT(e,n,a,r,RT);return l=d,t});for(;i<o.length;)s+=o[i].xml,i+=1;return s}(l,u,t,null==(i=e.style)?void 0:i.styleId,n),m=function(e){var t;return null==(t=dA(e))?void 0:t.attributes}(e),b=m?` ${m}`:"",v=xC(e,t.numberingInfo,n,a),y=function(e,t,n){var a;const r=null==(a=dA(e))?void 0:a.paragraphProperties;return!r||gT(r.xml)?t:n||e.list||r.semanticSignature!==sA(e)?yT(r.xml,t):r.xml}(e,v,Boolean(a));if(f){const t=CT(e,y,f,{hasOverrides:Boolean(a),hasBoundaryTokens:!1});if(t)return t}return`${s}<w:p${b}>${y}${g}</w:p>`}function LT(e){if(0===e.length)return[VT()];const[t,...n]=e;return"paragraph"!==t.type?[VT(!0),t,...n]:[(a=t,{...a,runs:[{id:"synthetic:footnoteRef",text:"",kind:"text",styles:{styleId:"FootnoteReference",superscript:!0},__isFootnoteRefMarker:!0},...a.runs],style:(null==(r=a.style)?void 0:r.styleId)?a.style:{...a.style??{},styleId:"FootnoteText"}}),...n];var a,r}function VT(e=!0){return{id:"synthetic:footnote-body-empty",type:"paragraph",runs:[...e?[{id:"synthetic:footnoteRef",text:"",kind:"text",styles:{styleId:"FootnoteReference",superscript:!0},__isFootnoteRefMarker:!0}]:[],{id:"synthetic:footnote-body-empty-text",text:"",kind:"text"}],style:{styleId:"FootnoteText"}}}function NT(e){var t;const n=null==(t=e.endnotes)?void 0:t.items;if(!n)return[];const a=new Map,r=bI(n);for(const{run:o}of function(e){return qh(e,"endnoteReference")}(e)){const e=Nt(o);if(!e||a.has(e.endnoteId))continue;const t=n[e.endnoteId];t&&a.set(e.endnoteId,{endnoteId:e.endnoteId,docxId:r(t),endnote:t})}return Array.from(a.values())}function zT(e){if(0===e.length)return[PT()];const[t,...n]=e;return"paragraph"!==t.type?[PT(!0),t,...n]:[(a=t,{...a,runs:[{id:"synthetic:endnoteRef",text:"",kind:"text",styles:{styleId:"EndnoteReference",superscript:!0},__isEndnoteRefMarker:!0},...a.runs],style:(null==(r=a.style)?void 0:r.styleId)?a.style:{...a.style??{},styleId:"EndnoteText"}}),...n];var a,r}function PT(e=!0){return{id:"synthetic:endnote-body-empty",type:"paragraph",runs:[...e?[{id:"synthetic:endnoteRef",text:"",kind:"text",styles:{styleId:"EndnoteReference",superscript:!0},__isEndnoteRefMarker:!0}]:[],{id:"synthetic:endnote-body-empty-text",text:"",kind:"text"}],style:{styleId:"EndnoteText"}}}const OT=["wholeTable","band1Horz","band2Horz","band1Vert","band2Vert","firstCol","lastCol","firstRow","lastRow","nwCell","neCell","swCell","seCell"];function qT(e){const t={...e.borders?{...e.borders.borderTop?{borderTop:e.borders.borderTop}:{},...e.borders.borderLeft?{borderLeft:e.borders.borderLeft}:{},...e.borders.borderBottom?{borderBottom:e.borders.borderBottom}:{},...e.borders.borderRight?{borderRight:e.borders.borderRight}:{}}:{},...e.shading?{shading:e.shading}:{},...e.cellStyle};return Object.keys(t).length>0?RI({id:"table-style-cell",blocks:[],style:t}):""}function BT(e,t){if("number"==typeof t)return`<w:${e} w:w="${dI(t)??0}" w:type="dxa"/>`;if("string"==typeof t&&t.endsWith("%")){const n=Number.parseFloat(t);return Number.isFinite(n)?`<w:${e} w:w="${Math.round(50*n)}" w:type="pct"/>`:""}return"auto"===t?`<w:${e} w:w="0" w:type="auto"/>`:""}function WT(e){if(!e)return"";const t=[];void 0!==e.rowBandSize&&t.push(`<w:tblStyleRowBandSize w:val="${e.rowBandSize}"/>`),void 0!==e.colBandSize&&t.push(`<w:tblStyleColBandSize w:val="${e.colBandSize}"/>`);const n=BT("tblW",e.width);n&&t.push(n);const a=BT("tblInd",e.indentLeft);a&&t.push(a);const r=BT("tblCellSpacing",e.cellSpacing);if(r&&t.push(r),e.align&&t.push(`<w:jc w:val="${e.align}"/>`),e.layout&&t.push(`<w:tblLayout w:type="${e.layout}"/>`),void 0!==e.bidiVisual&&t.push(`<w:bidiVisual w:val="${e.bidiVisual?"1":"0"}"/>`),e.defaultCellMargins){const n=Object.entries(e.defaultCellMargins).map(([e,t])=>`<w:${e} w:w="${dI(t)??0}" w:type="dxa"/>`).join("");n&&t.push(`<w:tblCellMar>${n}</w:tblCellMar>`)}if(e.borders){const{borders:n}=e,a=_M.filter(([,e])=>!!n[e]).map(([e,t])=>`<w:${e} ${vI(n[t])}`).join("");a&&t.push(`<w:tblBorders>${a}</w:tblBorders>`)}return t.length>0?`<w:tblPr>${t.join("")}</w:tblPr>`:""}function FT(e,t){const n=[],a=t.paragraphStyle?wC(t.paragraphStyle):"";a&&n.push(a);const r=t.textStyle?LC(t.textStyle):"";r&&n.push(r);const o=WT(t.tableStyle);o&&n.push(o);const i=t.rowStyle?VI(t.rowStyle):"";i&&n.push(i);const l=qT(t);return l&&n.push(l),0===n.length?"":`<w:tblStylePr w:type="${iI(e)}">${n.join("")}</w:tblStylePr>`}function DT(e){const t=[];if(t.push(`<w:name w:val="${iI(e.name)}"/>`),e.basedOn&&t.push(`<w:basedOn w:val="${iI(e.basedOn)}"/>`),e.nextStyle&&t.push(`<w:next w:val="${iI(e.nextStyle)}"/>`),void 0!==e.uiPriority&&t.push(`<w:uiPriority w:val="${Math.max(0,Math.floor(e.uiPriority))}"/>`),void 0!==e.qFormat&&t.push(`<w:qFormat w:val="${e.qFormat?"1":"0"}"/>`),void 0!==e.semiHidden&&t.push(`<w:semiHidden w:val="${e.semiHidden?"1":"0"}"/>`),void 0!==e.unhideWhenUsed&&t.push(`<w:unhideWhenUsed w:val="${e.unhideWhenUsed?"1":"0"}"/>`),("paragraph"===e.type||"table"===e.type)&&e.paragraphStyle){const n=wC(e.paragraphStyle);n&&t.push(n)}if(e.textStyle){const n=LC(e.textStyle);n&&t.push(n)}if("table"===e.type&&e.tableStyle){const n=e.tableStyle,a=WT(n);if(a&&t.push(a),n.conditionalFormats){const e=[...OT.filter(e=>e in n.conditionalFormats),...Object.keys(n.conditionalFormats).filter(e=>!OT.includes(e))];for(const a of e){const e=n.conditionalFormats[a];if(e){const n=FT(a,e);n&&t.push(n)}}}}return`<w:style w:type="${"character"===e.type?"character":"table"===e.type?"table":"paragraph"}" w:styleId="${iI(e.id)}"${e.isDefault?' w:default="1"':""}>${t.join("")}</w:style>`}function HT(e,t,n,a,r,o,i,l,s,d=!1){const c=a.map(e=>{const t="header"===e.kind?"application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml":"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml";return`<Override PartName="/word/${e.path}" ContentType="${t}"/>`}).join("");return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/>${function(e){const t=new Set;let n="";for(const a of e){const e=a.toLowerCase();if(t.has(e))continue;const r=fM[e];r&&(t.add(e),n+=`<Default Extension="${e}" ContentType="${r}"/>`)}return n}(t)}<Override PartName="/word/document.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml"/>${i?'<Override PartName="/word/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml"/>':""}${e?'<Override PartName="/word/numbering.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml"/>':""}${n?'<Override PartName="/word/settings.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml"/>':""}${r?'<Override PartName="/word/footnotes.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml"/>':""}${o?'<Override PartName="/word/endnotes.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml"/>':""}${l?'<Override PartName="/word/comments.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml"/><Override PartName="/word/commentsExtended.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtended+xml"/>':""}${s?'<Override PartName="/word/fontTable.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml"/>':""}${d?'<Override PartName="/word/theme/theme1.xml" ContentType="application/vnd.openxmlformats-officedocument.theme+xml"/>':""}${c}</Types>`}const UT={decimal:"decimal",lowerRoman:"lowerRoman",upperRoman:"upperRoman",lowerLetter:"lowerLetter",upperLetter:"upperLetter",symbol:"symbol"},GT={continuous:"continuous",eachSection:"eachSect"};function jT(e,t){if(!t)return null;const n=[];return t.numberFormat&&n.push(`<w:numFmt w:val="${UT[t.numberFormat]}"/>`),void 0!==t.startAt&&n.push(`<w:numStart w:val="${Math.max(1,t.startAt)}"/>`),t.restart&&n.push(`<w:numRestart w:val="${GT[t.restart]}"/>`),n.length>0?`<w:${e}>${n.join("")}</w:${e}>`:null}function ZT(e,t){let n="";for(const a of t)n+=`<Relationship Id="${a.rId}" Type="${rI}/hyperlink" Target="${iI(a.href)}" TargetMode="External"/>`;for(const a of e){const e="linked"===a.kind?' TargetMode="External"':"";n+=`<Relationship Id="${a.rId}" Type="${rI}/image" Target="${iI(a.target)}"${e}/>`}return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="${aI}">${n}</Relationships>`}function KT(e,t){t(e);for(const n of e.runs)"textBox"===n.kind&&XT(n.textBox.blocks,t)}function XT(e,t){for(const n of e)switch(n.type){case"paragraph":KT(n,t);break;case"table":for(const e of n.rows)for(const n of e.cells)XT(n.blocks,t);break;default:It(n,"block")}}function YT(e,t){for(let n=0;n<e.attributes.length;n+=1){const a=e.attributes.item(n);if((null==a?void 0:a.localName)===t)return a.value}}function JT(e,t,n){if(!e)return 0;const a=(new Ox).parseFromString(e,"application/xml");let r=0;for(const o of Array.from(a.getElementsByTagNameNS(nI,t))){const e=YT(o,n);if(!e||!/^\d+$/.test(e))continue;const t=Number.parseInt(e,10);Number.isSafeInteger(t)&&(r=Math.max(r,t))}return r}function QT(e,t){return void 0!==e&&Number.isSafeInteger(e)&&e>=t}function $T(e){const t=new Map,n=new Map,a=[],r=new Set,o=new Set,i=function(e){var t;const n=e.sourcePackage;if(!n)return;const a=n.parts[n.mainDocumentPart],r=null==(t=null==a?void 0:a.relationships)?void 0:t.find(e=>"External"!==e.targetMode&&e.type.endsWith("/numbering")&&Boolean(e.resolvedTarget)),o=(null==r?void 0:r.resolvedTarget)?n.parts[r.resolvedTarget]:void 0;return"xml"===(null==o?void 0:o.kind)?o.data:void 0}(e);let l=Math.max(1,JT(i,"abstractNum","abstractNumId")+1),s=Math.max(1,JT(i,"num","numId")+1);const d=e=>{if(QT(e,0)&&!r.has(e))return r.add(e),e;for(;r.has(l);)l+=1;const t=l;return l+=1,r.add(t),t},c=e=>{if(QT(e,1)&&!o.has(e))return o.add(e),e;for(;o.has(s);)s+=1;const t=s;return s+=1,o.add(t),t},u=[],p=e=>{e.list&&u.push(e)};for(const h of un(e))XT(h.blocks,p),h.header&&XT(h.header,p),h.firstPageHeader&&XT(h.firstPageHeader,p),h.evenPageHeader&&XT(h.evenPageHeader,p),h.footer&&XT(h.footer,p),h.firstPageFooter&&XT(h.firstPageFooter,p),h.evenPageFooter&&XT(h.evenPageFooter,p);for(const h of u){const e=h.list,r=Math.max(0,e.level??0),o=e.bulletGlyph??"",i=e.instanceId?`instance:${e.instanceId}`:`legacy:${e.kind}:${r}:${o}`;let l=n.get(i);if(!l){const t=PM(e),r=void 0!==(null==t?void 0:t.sourceNumId)&&e.instanceId===String(t.sourceNumId);l={abstractNumId:d(r?t.sourceAbstractNumId:void 0),numId:c(r?t.sourceNumId:void 0),levels:[]},n.set(i,l),a.push(l)}if(!l.levels.some(e=>e.level===r)){const t=PM(e),n=OM(e);l.levels.push({kind:e.kind,level:r,format:e.format,startAt:e.startAt,levelText:e.levelText,suffix:e.suffix,alignment:e.alignment,legal:e.legal,bulletGlyph:e.bulletGlyph,bulletFont:e.bulletFont,...t?{ooxml:{...t,...n?{format:n}:{format:void 0}}}:{}})}t.set(h.id,{numId:l.numId,level:r})}return{numberingInfo:t,definitions:a}}const _T=`xmlns:w="${nI}" xmlns:w14="${oI}" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" xmlns:r="${rI}"`;function ek(e,t,n){var a,r;const o=un(e),i=o.map((a,r)=>{var i;const l=RT(a.blocks,t,e.styles),s=function(e,t,n,a){var r,o,i,l,s,d,c,u,p;const h=lI(e.width,12240),f=lI(e.height,15840),g=e.margins,m="landscape"===e.orientation?' w:orient="landscape"':"",b=[(null==(r=null==t?void 0:t.header)?void 0:r.first)?`<w:headerReference w:type="first" r:id="${t.header.first.relId}"/>`:"",(null==(o=null==t?void 0:t.header)?void 0:o.even)?`<w:headerReference w:type="even" r:id="${t.header.even.relId}"/>`:"",(null==(i=null==t?void 0:t.header)?void 0:i.default)?`<w:headerReference w:type="default" r:id="${t.header.default.relId}"/>`:"",(null==(l=null==t?void 0:t.footer)?void 0:l.first)?`<w:footerReference w:type="first" r:id="${t.footer.first.relId}"/>`:"",(null==(s=null==t?void 0:t.footer)?void 0:s.even)?`<w:footerReference w:type="even" r:id="${t.footer.even.relId}"/>`:"",(null==(d=null==t?void 0:t.footer)?void 0:d.default)?`<w:footerReference w:type="default" r:id="${t.footer.default.relId}"/>`:""].join(""),v=(null==(c=null==t?void 0:t.header)?void 0:c.first)||(null==(u=null==t?void 0:t.footer)?void 0:u.first)?"<w:titlePg/>":"",y=a&&"nextPage"!==a?`<w:type w:val="${a}"/>`:"",w=e.columns;let x="";if(w&&w.count>1){const e=lI(w.space,0),t=w.separator?' w:sep="1"':"";if(!1===w.equalWidth&&(null==(p=w.columns)?void 0:p.length)){const n=w.columns.map(e=>`<w:col w:w="${lI(e.width,0)}" w:space="${lI(e.space,0)}"/>`).join("");x=`<w:cols w:num="${w.count}" w:space="${e}" w:equalWidth="0"${t}>${n}</w:cols>`}else x=`<w:cols w:num="${w.count}" w:space="${e}"${t}/>`}const M=n.pageNumbering;let S="";if(M){const e=[];void 0!==M.start&&e.push(`w:start="${M.start}"`),M.format&&e.push(`w:fmt="${iI(M.format)}"`),M.chapterStyle&&e.push(`w:chapStyle="${iI(M.chapterStyle)}"`),M.chapterSeparator&&e.push(`w:chapSep="${iI(M.chapterSeparator)}"`),e.length>0&&(S=`<w:pgNumType ${e.join(" ")}/>`)}const A=n.verticalAlignment&&"top"!==n.verticalAlignment?`<w:vAlign w:val="${n.verticalAlignment}"/>`:"",I=n.bidi?"<w:bidi/>":"",C=n.pageBorder,T=null==C?void 0:C.color.replace("#","").toUpperCase(),k=C?`<w:pgBorders w:offsetFrom="page"><w:top w:val="${C.style}" w:sz="${Math.max(1,Math.round(8*C.width))}" w:space="${Math.max(0,Math.round(C.distance??0))}" w:color="${T}"/><w:left w:val="${C.style}" w:sz="${Math.max(1,Math.round(8*C.width))}" w:space="${Math.max(0,Math.round(C.distance??0))}" w:color="${T}"/><w:bottom w:val="${C.style}" w:sz="${Math.max(1,Math.round(8*C.width))}" w:space="${Math.max(0,Math.round(C.distance??0))}" w:color="${T}"/><w:right w:val="${C.style}" w:sz="${Math.max(1,Math.round(8*C.width))}" w:space="${Math.max(0,Math.round(C.distance??0))}" w:color="${T}"/></w:pgBorders>`:"";return`<w:sectPr>${b}${v}${y}<w:pgSz w:w="${h}" w:h="${f}"${m}/><w:pgMar w:top="${lI(g.top,1440)}" w:right="${lI(g.right,1440)}" w:bottom="${lI(g.bottom,1440)}" w:left="${lI(g.left,1440)}" w:header="${lI(g.header,720)}" w:footer="${lI(g.footer,720)}" w:gutter="${lI(g.gutter,0)}"/>${S}${x}${A}${I}${k}</w:sectPr>`}(a.pageSettings,n[r],a,null==(i=o[r+1])?void 0:i.breakType);return l+s}).join(""),l=null==(r=null==(a=e.design)?void 0:a.pageColor)?void 0:r.replace("#","").toUpperCase();return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:document ${_T}>${l?`<w:background w:color="${l}"/>`:""}<w:body>${i}</w:body></w:document>`}function tk(e,t,n,a,r){const o="header"===e?"hdr":"ftr",i="header"===e&&"text"===(null==r?void 0:r.kind)&&r.text?`<w:pict xmlns:v="urn:schemas-microsoft-com:vml"><v:shape type="#_x0000_t136" style="position:absolute;margin-left:0;margin-top:0;width:468pt;height:216pt;z-index:-251654144;rotation:${r.rotation??-45}" fillcolor="${r.color??"#94a3b8"}" fillopacity="${r.opacity??.25}"><v:textpath on="true" string="${iI(r.text)}" style="font-family:${iI(r.fontFamily??"Arial")};font-size:${r.fontSize??48}pt"/></v:shape></w:pict>`:"header"===e&&"image"===(null==r?void 0:r.kind)&&n.images.some(e=>"__watermark"===e.runId)?`<w:pict xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"><v:shape type="#_x0000_t75" style="position:absolute;margin-left:0;margin-top:0;width:468pt;height:216pt;z-index:-251654144;rotation:${r.rotation??-45}" fillcolor="${r.color??"#ffffff"}" fillopacity="${r.opacity??.25}" stroked="f"><v:imagedata r:id="rIdWatermark" o:title="Watermark"/></v:shape></w:pict>`:"";return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:${o} ${_T}>${i}${RT(t,n,a)}</w:${o}>`}function nk(e){return e?{...e}:void 0}function ak(e,t){return JSON.stringify(e??null)===JSON.stringify(t??null)}function rk(e,t,n){const a={...e??{}};return n?a[t]=!0:delete a[t],Object.keys(a).length>0?a:void 0}function ok(e,t,n){const a={...e??{}};return null==n||""===n?delete a[t]:a[t]=n,Object.keys(a).length>0?a:void 0}function ik(e,t,n){const a={...e??{}};return null==n?delete a[t]:a[t]=n,Object.keys(a).length>0?a:void 0}function lk(e){return Array.isArray(e)?e.map(lk):e&&"object"==typeof e?Object.fromEntries(Object.entries(e).map(([e,t])=>[e,lk(t)])):e}function sk(e){const t={id:e.id,text:e.text,styles:nk(e.styles),revision:e.revision?{...e.revision}:void 0,sdtWrappers:e.sdtWrappers?[...e.sdtWrappers]:void 0};return function(e,t){const n=iA(e);return n&&(t.ooxmlSource={...n}),t}(e,Pt(e,{text:()=>({...t,kind:"text"}),image:e=>({...t,kind:"image",image:{...e.image}}),textBox:e=>{return{...t,kind:"textBox",textBox:(n=e.textBox,{...n,floating:n.floating?{...n.floating,positionH:n.floating.positionH?{...n.floating.positionH}:void 0,positionV:n.floating.positionV?{...n.floating.positionV}:void 0}:void 0,shape:n.shape?{...n.shape}:void 0,body:n.body?{...n.body}:void 0,blocks:pk(n.blocks)})};var n},field:e=>({...t,kind:"field",field:{...e.field}}),fieldChar:e=>({...t,kind:"fieldChar",fieldChar:{...e.fieldChar}}),fieldInstruction:e=>({...t,kind:"fieldInstruction",fieldInstruction:e.fieldInstruction}),footnoteReference:e=>({...t,kind:"footnoteReference",footnoteReference:{...e.footnoteReference}}),endnoteReference:e=>({...t,kind:"endnoteReference",endnoteReference:{...e.endnoteReference}}),sym:e=>({...t,kind:"sym",sym:{...e.sym}}),math:e=>{return{...t,kind:"math",math:(n=e.math,lk(n))};var n}}))}function dk(e){return{...e,runs:e.runs.map(sk),style:e.style?{...e.style}:void 0,list:e.list?{...e.list}:void 0}}function ck(e){return e?{...e}:void 0}function uk(e){return e.map(dk)}function pk(e){return e.map(e=>{switch(e.type){case"paragraph":return dk(e);case"table":return{...e,style:e.style?{...e.style,defaultCellMargins:e.style.defaultCellMargins?{...e.style.defaultCellMargins}:void 0,floating:e.style.floating?{...e.style.floating}:void 0,revision:e.style.revision?{...e.style.revision,previous:{...e.style.revision.previous}}:void 0}:void 0,gridRevision:e.gridRevision?{...e.gridRevision,previous:[...e.gridRevision.previous]}:void 0,rows:e.rows.map(e=>({...e,conditionalStyle:e.conditionalStyle?{...e.conditionalStyle}:void 0,style:e.style?{...e.style,revision:e.style.revision?{...e.style.revision}:void 0,propertyRevision:e.style.propertyRevision?{...e.style.propertyRevision,previous:{...e.style.propertyRevision.previous}}:void 0}:void 0,cells:e.cells.map(e=>({...e,conditionalStyle:e.conditionalStyle?{...e.conditionalStyle}:void 0,mergeRevisionState:e.mergeRevisionState?{...e.mergeRevisionState,previousCells:e.mergeRevisionState.previousCells.map(e=>({...e,mergeRevisionState:void 0,style:e.style?{...e.style}:void 0,blocks:pk(e.blocks)}))}:void 0,style:e.style?{...e.style,revision:e.style.revision?{...e.style.revision}:void 0,propertyRevision:e.style.propertyRevision?{...e.style.propertyRevision,previous:{...e.style.propertyRevision.previous}}:void 0}:void 0,blocks:pk(e.blocks)}))}))};default:return It(e,"block")}})}function hk(e){return{id:et("").id,text:"",kind:"fieldChar",fieldChar:{kind:e}}}function fk(e,t,n){const a=at([{text:`${t} `},{text:String(n)},{text:e?`: ${e}`:""}]);var r;return a.style={styleId:"Caption",align:"center"},a.runs=[a.runs[0],hk("begin"),(r=" SEQ Figure \\* ARABIC ",{id:et("").id,text:"",kind:"fieldInstruction",fieldInstruction:r}),hk("separate"),a.runs[1],hk("end"),a.runs[2]],a}function gk(e){var t,n;if(!e)return!1;return"caption"===(null==(n=null==(t=e.style)?void 0:t.styleId)?void 0:n.toLowerCase())&&e.runs.some(e=>{const t=Lt(e);return void 0!==t&&new RegExp("\\bSEQ\\s+Figure\\b","i").test(t)})}function mk(e,t){if(!gk(e))return dk(e);let n=!1,a=!1;const r=e.runs.map(e=>"fieldChar"===e.kind&&"separate"===e.fieldChar.kind?(n=!0,{...e,fieldChar:{...e.fieldChar}}):"fieldChar"===e.kind&&"end"===e.fieldChar.kind?(n=!1,{...e,fieldChar:{...e.fieldChar}}):n&&""!==e.text?e.text===String(t)?{...e}:(a=!0,{...e,text:String(t)}):{...e});return a?{...dk(e),runs:r}:dk(e)}function bk(e,t){return e.map(e=>{switch(e.type){case"paragraph":return gk(e)?mk(e,t.next++):dk(e);case"table":return{...e,rows:e.rows.map(e=>({...e,cells:e.cells.map(e=>({...e,blocks:bk(e.blocks,t)}))}))};default:return It(e,"block")}})}function vk(e){const t={next:1},n=un(e).map(e=>({...e,blocks:bk(e.blocks,t),header:e.header?pk(e.header):void 0,footer:e.footer?pk(e.footer):void 0}));return{...e,sections:n}}const yk={oasis:{accent:"0F766E",heading:"115E59",body:"1F2937"},office:{accent:"4472C4",heading:"2F5597",body:"1F2937"},facet:{accent:"8064A2",heading:"604A7B",body:"262626"},integral:{accent:"70AD47",heading:"548235",body:"1F2937"},ion:{accent:"ED7D31",heading:"C55A11",body:"262626"},retrospect:{accent:"5B9BD5",heading:"2F75B5",body:"1F2937"}};function wk(e,t,n,a){const r=[],o=new Map,i=new Map,l=[],s=new Map;return XT(e,e=>{var t;for(const d of e.runs){const e=null==(t=d.styles)?void 0:t.link;if(e&&!e.startsWith("#")&&!s.has(e)){const t=`rIdLink${l.length+1}`;s.set(e,t),l.push({rId:t,href:e})}if("textBox"!==d.kind||i.has(d.id)||(i.set(d.id,n.nextTextBoxDocPrId),n.nextTextBoxDocPrId+=1),"image"!==d.kind)continue;const c=n.nextImageId,u=`rIdImg${c}`,p={rId:u,runId:d.id,cx:Math.round(d.image.width*ht),cy:Math.round(d.image.height*ht),alt:d.image.alt,crop:d.image.crop,cropShape:d.image.cropShape,cropFit:d.image.cropFit,fillMode:d.image.fillMode,border:d.image.border,rotation:d.image.rotation,flipH:d.image.flipH,flipV:d.image.flipV,floating:d.image.floating,wrapPolygon:d.image.wrapPolygon};if(d.image.linkedSrc){r.push({...p,kind:"linked",target:d.image.linkedSrc}),o.set(d.id,u),n.nextImageId+=1;continue}const h=dn(a,d.image.src).match(/^data:([^;,]+);base64,(.*)$/);if(!h)continue;const f=mM(h[1]);if(!f)continue;const g=h[2],m=`media/image${c}.${f}`;r.push({...p,kind:"embedded",target:m,base64:g}),o.set(d.id,u),n.nextImageId+=1}}),{numberingInfo:t.numberingInfo,definitions:t.definitions,images:r,imageMap:o,textBoxDocPrIds:i,hyperlinks:l,hyperlinkMap:s}}function xk(e,t,n){n&&(e.file(`word/${t}.xml`,n.xml),(n.partContext.images.length>0||n.partContext.hyperlinks.length>0)&&e.file(`word/_rels/${t}.xml.rels`,ZT(n.partContext.images,n.partContext.hyperlinks)))}async function Mk(e){var t,n,a,r,o,i,l,s,d,c,u,p,h,f,g,m,b,v;e=vk(e);const y=new Ob,w=$T(e),x={nextImageId:1,nextTextBoxDocPrId:1000001},M=un(e),S=function(e){var t;const n=null==(t=e.design)?void 0:t.watermark;if("image"!==(null==n?void 0:n.kind)||!n.src)return;const a=dn(e,n.src).match(/^data:([^;,]+);base64,(.*)$/);if(!a)return;const r=mM(a[1]);return r?{rId:"rIdWatermark",runId:"__watermark",kind:"embedded",target:`media/watermark.${r}`,base64:a[2],cx:1,cy:1}:void 0}(e),A=function(e){var t;const n=null==(t=e.footnotes)?void 0:t.items;if(!n)return[];const a=new Map,r=bI(n);for(const{run:o}of Fh(e)){const e=Vt(o);if(!e||a.has(e.footnoteId))continue;const t=n[e.footnoteId];t&&a.set(e.footnoteId,{footnoteId:e.footnoteId,docxId:r(t),footnote:t})}return Array.from(a.values())}(e),I=function(e){const t=new Map;for(const n of e)t.set(n.footnoteId,n.docxId);return t}(A),C=A.length>0,T=NT(e),k=function(e){const t=new Map;for(const n of e)t.set(n.endnoteId,n.docxId);return t}(T),R=T.length>0,E=function(e){const t=e.bookmarks;if(!t||0===t.order.length)return;const n=new Map,a=new Set;for(const l of t.order){const e=t.items[l];if(!e)continue;const r=e.docxIdHint;void 0!==r&&r>=0&&!a.has(r)&&(n.set(l,r),a.add(r))}let r=0;for(const l of t.order)if(!n.has(l)){for(;a.has(r);)r+=1;n.set(l,r),a.add(r),r+=1}const o=new Map,i=(e,t)=>{const n=o.get(e);n?n.push(t):o.set(e,[t])};for(const l of t.order){const e=t.items[l];if(!e)continue;const a=n.get(l);e.start&&i(e.start.paragraphId,{kind:"start",offset:e.start.offset,seq:e.start.seq??0,wId:a,name:e.name,...void 0!==e.colFirst?{colFirst:e.colFirst}:{},...void 0!==e.colLast?{colLast:e.colLast}:{}}),e.end&&i(e.end.paragraphId,{kind:"end",offset:e.end.offset,seq:e.end.seq??0,wId:a})}return o}(e),L=function(e){const t=e.comments;if(!t||0===t.order.length)return;const n=new Map,a=new Set;for(const s of t.order){const e=t.items[s];if(!e)continue;const r=e.docxIdHint;void 0!==r&&r>=0&&!a.has(r)&&(n.set(s,r),a.add(r))}let r=0;for(const s of t.order)if(!n.has(s)){for(;a.has(r);)r+=1;n.set(s,r),a.add(r),r+=1}const o=new Map,i=(e,t)=>{const n=o.get(e);n?n.push(t):o.set(e,[t])},l=[];return t.order.forEach((e,a)=>{const r=t.items[e];if(!r)return;const o=n.get(e),s=(1073741824+a).toString(16).toUpperCase();l.push({comment:r,wId:o,paraId:s}),r.start&&i(r.start.paragraphId,{kind:"start",offset:r.start.offset,seq:r.start.seq??0,wId:o}),r.end&&(i(r.end.paragraphId,{kind:"end",offset:r.end.offset,seq:r.end.seq??0,wId:o}),i(r.end.paragraphId,{kind:"reference",offset:r.end.offset,seq:(r.end.seq??0)+.5,wId:o}))}),{eventsByParagraph:o,comments:l}}(e),V=e=>(e.footnoteIdMap=I,e.endnoteIdMap=k,e.bookmarkEventsByParagraph=E,e.commentEventsByParagraph=null==L?void 0:L.eventsByParagraph,e),N=V(wk(M.flatMap(e=>e.blocks),w,x,e)),z=void 0!==L,P=[],O=M.map(()=>({}));let q=1,B=1;M.forEach((t,n)=>{const a=(t,a,r)=>{var o,i,l;if(!(r&&0!==r.length||"header"===t&&"text"===(null==(i=null==(o=e.design)?void 0:o.watermark)?void 0:i.kind)||"header"===t&&void 0!==S))return;const s=r??[],d="header"===t?q:B,c=`${t}${d}.xml`,u=`rId${"header"===t?"Header":"Footer"}${d}`,p=V(wk(s,w,x,e));"header"===t&&S&&p.images.push({...S}),P.push({kind:t,type:a,path:c,relId:u,blocks:s,context:p});const h="header"===t?"header":"footer";((l=O[n])[h]??(l[h]={}))[a]={relId:u},"header"===t?q+=1:B+=1};a("header","first",t.firstPageHeader),a("header","even",t.evenPageHeader),a("header","default",t.header),a("footer","first",t.firstPageFooter),a("footer","even",t.evenPageFooter),a("footer","default",t.footer)});const W=w.definitions.length>0,F=M.some(e=>{var t,n;return((null==(t=e.evenPageHeader)?void 0:t.length)??0)>0||((null==(n=e.evenPageFooter)?void 0:n.length)??0)>0}),D=F||void 0!==(null==(t=e.settings)?void 0:t.defaultTabStop)||void 0!==(null==(n=e.settings)?void 0:n.allowSpaceOfSameStyleInTable)||void 0!==(null==(a=e.settings)?void 0:a.autoHyphenation)||void 0!==(null==(r=e.settings)?void 0:r.consecutiveHyphenLimit)||void 0!==(null==(o=e.settings)?void 0:o.hyphenationZone)||void 0!==(null==(i=e.settings)?void 0:i.doNotHyphenateCaps)||void 0!==(null==(l=e.footnotes)?void 0:l.settings)||void 0!==(null==(s=e.endnotes)?void 0:s.settings),H=[...N.images,...P.flatMap(e=>e.context.images)],U=C?function(e,t,n,a,r,o,i){const l=r(t.flatMap(e=>LT(e.footnote.blocks)));l.footnoteIdMap=i;const s=t.map(e=>{const t=RT(LT(e.footnote.blocks),l,o);return`<w:footnote w:id="${e.docxId}">${t}</w:footnote>`}).join("");return{xml:`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:footnotes xmlns:w="${nI}" xmlns:w14="${oI}" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture" xmlns:r="${rI}"><w:footnote w:type="separator" w:id="-1"><w:p><w:r><w:separator/></w:r></w:p></w:footnote><w:footnote w:type="continuationSeparator" w:id="0"><w:p><w:r><w:continuationSeparator/></w:r></w:p></w:footnote>${s}</w:footnotes>`,partContext:l}}(0,A,0,0,t=>wk(t,w,x,e),e.styles,I):null;U&&H.push(...U.partContext.images);const G=R?function(e,t,n,a,r,o,i){const l=r(t.flatMap(e=>zT(e.endnote.blocks)));l.endnoteIdMap=i;const s=t.map(e=>{const t=RT(zT(e.endnote.blocks),l,o);return`<w:endnote w:id="${e.docxId}">${t}</w:endnote>`}).join("");return{xml:`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:endnotes xmlns:w="${nI}" xmlns:w14="${oI}" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture" xmlns:r="${rI}"><w:endnote w:type="separator" w:id="-1"><w:p><w:r><w:separator/></w:r></w:p></w:endnote><w:endnote w:type="continuationSeparator" w:id="0"><w:p><w:r><w:continuationSeparator/></w:r></w:p></w:endnote>${s}</w:endnotes>`,partContext:l}}(0,T,0,0,t=>wk(t,w,x,e),e.styles,k):null;G&&H.push(...G.partContext.images);const j=H.filter(e=>"embedded"===e.kind).map(e=>{var t;return null==(t=e.target.split(".").pop())?void 0:t.toLowerCase()}).filter(e=>Boolean(e)),Z=null!=e.styles&&Object.keys(e.styles).length>0,K=((null==(d=e.fontTable)?void 0:d.length)??0)>0,X=void 0!==e.design;y.file("[Content_Types].xml",HT(W,j,D,P,C,R,Z,z,K,X)),y.file("_rels/.rels",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="${aI}"><Relationship Id="rId1" Type="${rI}/officeDocument" Target="word/document.xml"/></Relationships>`),y.file("word/document.xml",ek(e,N,O)),Z&&y.file("word/styles.xml",function(e){const t=Object.values(e).map(DT).join("");return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:styles xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="${oI}">${t}</w:styles>`}(e.styles)),W&&y.file("word/numbering.xml",function(e){const t=e.map(({abstractNumId:e,levels:t})=>`<w:abstractNum w:abstractNumId="${e}">${t.sort((e,t)=>e.level-t.level).map(({kind:e,level:t,format:n,startAt:a,levelText:r,suffix:o,alignment:i,legal:l,bulletGlyph:s,bulletFont:d,ooxml:c})=>{const u="bullet"===e?"bullet":(null==c?void 0:c.format)??n??"decimal",p=r??("bullet"===e?s??"":`%${t+1}.`),h=a??1,f="bullet"===e?d??"Symbol":void 0,g=f?`<w:rPr><w:rFonts w:ascii="${iI(f)}" w:hAnsi="${iI(f)}" w:hint="default"/></w:rPr>`:"",m=o&&"tab"!==o?`<w:suff w:val="${o}"/>`:"",b=l?"<w:isLgl/>":"",v=void 0!==(null==c?void 0:c.restartAfterLevel)?`<w:lvlRestart w:val="${c.restartAfterLevel}"/>`:"",y=(null==c?void 0:c.paragraphStyleId)?`<w:pStyle w:val="${iI(c.paragraphStyleId)}"/>`:"";return`<w:lvl w:ilvl="${t}"><w:start w:val="${h}"/><w:numFmt w:val="${iI(u)}"/>${v}${y}<w:lvlText w:val="${iI(p)}"/><w:lvlJc w:val="${i??"left"}"/>${m}${b}${g}</w:lvl>`}).join("")}</w:abstractNum>`).join(""),n=e.map(({abstractNumId:e,numId:t})=>`<w:num w:numId="${t}"><w:abstractNumId w:val="${e}"/></w:num>`).join("");return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:numbering xmlns:w="${nI}">${t}${n}</w:numbering>`}(w.definitions)),(Z||W||D||N.images.length>0||N.hyperlinks.length>0||P.length>0||C||R||z||K||X)&&y.file("word/_rels/document.xml.rels",function(e,t,n,a,r,o,i,l,s,d,c=!1){let u="";l&&(u+=`<Relationship Id="rIdStyles" Type="${rI}/styles" Target="styles.xml"/>`),e&&(u+=`<Relationship Id="rIdNum" Type="${rI}/numbering" Target="numbering.xml"/>`),t&&(u+=`<Relationship Id="rIdSettings" Type="${rI}/settings" Target="settings.xml"/>`);for(const p of a)u+=`<Relationship Id="${p.rId}" Type="${rI}/hyperlink" Target="${iI(p.href)}" TargetMode="External"/>`;for(const p of n){const e="linked"===p.kind?' TargetMode="External"':"";u+=`<Relationship Id="${p.rId}" Type="${rI}/image" Target="${iI(p.target)}"${e}/>`}for(const p of r){const e="header"===p.kind?"header":"footer";u+=`<Relationship Id="${p.relId}" Type="${rI}/${e}" Target="${p.path}"/>`}return o&&(u+=`<Relationship Id="rIdFootnotes" Type="${rI}/footnotes" Target="footnotes.xml"/>`),i&&(u+=`<Relationship Id="rIdEndnotes" Type="${rI}/endnotes" Target="endnotes.xml"/>`),s&&(u+=`<Relationship Id="rIdComments" Type="${rI}/comments" Target="comments.xml"/>`,u+='<Relationship Id="rIdCommentsExtended" Type="http://schemas.microsoft.com/office/2011/relationships/commentsExtended" Target="commentsExtended.xml"/>'),d&&(u+=`<Relationship Id="rIdFontTable" Type="${rI}/fontTable" Target="fontTable.xml"/>`),c&&(u+=`<Relationship Id="rIdTheme" Type="${rI}/theme" Target="theme/theme1.xml"/>`),`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="${aI}">${u}</Relationships>`}(W,D,N.images,N.hyperlinks,P,C,R,Z,z,K,X)),K&&y.file("word/fontTable.xml",function(e){const t=e.map(e=>{const t=[];if(e.altName&&t.push(`<w:altName w:val="${iI(e.altName)}"/>`),e.panose1&&t.push(`<w:panose1 w:val="${iI(e.panose1)}"/>`),e.charset&&t.push(`<w:charset w:val="${iI(e.charset)}"/>`),e.family&&t.push(`<w:family w:val="${iI(e.family)}"/>`),e.pitch&&t.push(`<w:pitch w:val="${iI(e.pitch)}"/>`),e.sig){const n=Object.entries(e.sig).map(([e,t])=>`w:${e}="${iI(t)}"`).join(" ");n&&t.push(`<w:sig ${n}/>`)}return`<w:font w:name="${iI(e.name)}">${t.join("")}</w:font>`}).join("");return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:fonts xmlns:w="${nI}">${t}</w:fonts>`}(e.fontTable)),X&&y.file("word/theme/theme1.xml",function(e){var t;const n=null==(t=null==e?void 0:e.themeData)?void 0:t.sourceXml;if(n)return n;const a=yk[(null==e?void 0:e.themeId)??"oasis"]??yk.oasis,r=null==e?void 0:e.themeData,o=(e,t)=>{var n;return((null==(n=null==r?void 0:r.colors)?void 0:n[e])??t).replace(/^#/,"").toUpperCase()},i={dk1:o("dk1","000000"),lt1:o("lt1","FFFFFF"),dk2:o("dk2",a.body),lt2:o("lt2","FFFFFF"),accent1:o("accent1",a.accent),accent2:o("accent2",a.heading),accent3:o("accent3","5B9BD5"),accent4:o("accent4","70AD47"),accent5:o("accent5","ED7D31"),accent6:o("accent6","A5A5A5"),hlink:o("hlink","0563C1"),folHlink:o("folHlink","954F72")},l=Object.entries(i).map(([e,t])=>`<a:${e}><a:srgbClr val="${t}"/></a:${e}>`).join(""),s=(e,t,n)=>{var a,o;return iI((null==(o=null==(a=null==r?void 0:r.fonts)?void 0:a[e])?void 0:o[t])??n)},d=iI((null==r?void 0:r.name)??`${((null==e?void 0:e.themeId)??"oasis")[0].toUpperCase()}${((null==e?void 0:e.themeId)??"oasis").slice(1)}`),c=(null==r?void 0:r.effectsXml)??"<a:fillStyleLst/><a:lnStyleLst/><a:effectStyleLst/><a:bgFillStyleLst/>";return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="${d}"><a:themeElements><a:clrScheme name="${d}">${l}</a:clrScheme><a:fontScheme name="${d}"><a:majorFont><a:latin typeface="${s("major","majorHAnsi","Aptos Display")}"/><a:ea typeface="${s("major","majorEastAsia","Aptos Display")}"/><a:cs typeface="${s("major","majorBidi","Aptos Display")}"/></a:majorFont><a:minorFont><a:latin typeface="${s("minor","minorHAnsi","Aptos")}"/><a:ea typeface="${s("minor","minorEastAsia","Aptos")}"/><a:cs typeface="${s("minor","minorBidi","Aptos")}"/></a:minorFont></a:fontScheme><a:fmtScheme name="${d}">${c}</a:fmtScheme></a:themeElements></a:theme>`}(e.design)),D&&y.file("word/settings.xml",function(e,t,n,a,r,o){const i=[],l=dI(t);null!==l&&i.push(`<w:defaultTabStop w:val="${l}"/>`),(null==o?void 0:o.autoHyphenation)&&i.push("<w:autoHyphenation/>"),void 0!==(null==o?void 0:o.consecutiveHyphenLimit)&&o.consecutiveHyphenLimit>=0&&i.push(`<w:consecutiveHyphenLimit w:val="${o.consecutiveHyphenLimit}"/>`);const s=dI(null==o?void 0:o.hyphenationZone);null!==s&&i.push(`<w:hyphenationZone w:val="${s}"/>`),(null==o?void 0:o.doNotHyphenateCaps)&&i.push("<w:doNotHyphenateCaps/>");const d=jT("footnotePr",n);d&&i.push(d);const c=jT("endnotePr",a);return c&&i.push(c),e&&i.push("<w:evenAndOddHeaders/>"),r&&i.push("<w:compat><w:allowSpaceOfSameStyleInTable/></w:compat>"),`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:settings xmlns:w="${nI}">${i.join("")}</w:settings>`}(F,null==(c=e.settings)?void 0:c.defaultTabStop,null==(u=e.footnotes)?void 0:u.settings,null==(p=e.endnotes)?void 0:p.settings,null==(h=e.settings)?void 0:h.allowSpaceOfSameStyleInTable,{autoHyphenation:null==(f=e.settings)?void 0:f.autoHyphenation,consecutiveHyphenLimit:null==(g=e.settings)?void 0:g.consecutiveHyphenLimit,hyphenationZone:null==(m=e.settings)?void 0:m.hyphenationZone,doNotHyphenateCaps:null==(b=e.settings)?void 0:b.doNotHyphenateCaps}));for(const Y of P)y.file(`word/${Y.path}`,tk(Y.kind,Y.blocks,Y.context,e.styles,null==(v=e.design)?void 0:v.watermark)),(Y.context.images.length>0||Y.context.hyperlinks.length>0)&&y.file(`word/_rels/${Y.path}.rels`,ZT(Y.context.images,Y.context.hyperlinks));xk(y,"footnotes",U),xk(y,"endnotes",G),L&&(y.file("word/comments.xml",gI(L)),y.file("word/commentsExtended.xml",function(e){const t=e.comments.map(({comment:e,paraId:t})=>`<w15:commentEx w15:paraId="${t}" w15:done="${e.resolved?"1":"0"}"/>`).join("");return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w15:commentsEx ${fI}>${t}</w15:commentsEx>`}(L)));for(const Y of H)"embedded"===Y.kind&&Y.base64&&y.file(`word/${Y.target}`,Y.base64,{base64:!0});return y.generateAsync({type:"arraybuffer"})}function Sk(e){let t=2166136261;for(const n of e)t^=n,t=Math.imul(t,16777619);return(t>>>0).toString(16).padStart(8,"0")}async function Ak(e){return async function(e){const t=await Ob.loadAsync(e),n={};for(const[a,r]of Object.entries(t.files))r.dir||(n[YA(a)]=Sk(await r.async("uint8array")));return n}(await Mk(e))}const Ik="word/document.xml";function Ck(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(16).padStart(8,"0")}function Tk(e,t){const n=t.overrides[e];if(n)return n;const a=e.includes(".")?e.slice(e.lastIndexOf(".")+1).toLowerCase():"";return t.defaults[a]}function kk(e,t){return!(!e.endsWith(".xml")&&!e.endsWith(".rels"))||("application/xml"===t||Boolean(null==t?void 0:t.endsWith("+xml")))}const Rk="word/document.xml",Ek={"/styles":"word/styles.xml","/numbering":"word/numbering.xml","/settings":"word/settings.xml","/fontTable":"word/fontTable.xml","/theme":"word/theme/theme1.xml","/footnotes":"word/footnotes.xml","/endnotes":"word/endnotes.xml","/comments":"word/comments.xml","/commentsExtended":"word/commentsExtended.xml"};function Lk(e){const t=e.lastIndexOf("/"),n=t>=0?e.slice(0,t):"",a=t>=0?e.slice(t+1):e;return n?`${n}/_rels/${a}.rels`:`_rels/${a}.rels`}function Vk(e,t,n){"base64"===n.encoding?e.file(t,n.data,{base64:!0}):e.file(t,n.data)}function Nk(e){return`word/__oasis_source__/${e}`}function zk(e){return e?e.map(e=>"External"!==e.targetMode&&e.resolvedTarget?{...e,target:`/${Nk(e.resolvedTarget)}`,resolvedTarget:void 0}:e):[]}function Pk(e){for(const[t,n]of Object.entries(Ek))if(e.type.endsWith(t))return n}async function Ok(e,t){if(!function(e){var t;if(e.mainDocumentPart!==Rk)return!0;const n=e.parts[e.mainDocumentPart];return Boolean(null==(t=null==n?void 0:n.relationships)?void 0:t.some(e=>{const t=Pk(e);return Boolean(t&&e.resolvedTarget&&e.resolvedTarget!==t)}))}(t))return e;const n=new Ob;for(const o of Object.values(t.parts))Vk(n,o.path,o);for(const o of Object.values(t.parts)){if(o.path.endsWith(".rels")||"[Content_Types].xml"===o.path)continue;const e=Nk(o.path);Vk(n,e,o);const t=zk(o.relationships);t.length>0&&n.file(Lk(e),eI(t))}const a=t.parts[t.mainDocumentPart];if(!a)throw new Error(`DOCX source package is missing its main part: ${t.mainDocumentPart}`);Vk(n,Rk,a);const r=zk(a.relationships);r.length>0&&n.file(Lk(Rk),eI(r));for(const o of a.relationships??[]){if("External"===o.targetMode||!o.resolvedTarget)continue;const e=Pk(o),a=t.parts[o.resolvedTarget];if(!e||!a)continue;Vk(n,e,a);const r=zk(a.relationships);r.length>0&&n.file(Lk(e),eI(r))}return n.generateAsync({type:"arraybuffer"})}let qk=1;async function Bk(e,t={}){if("undefined"==typeof Worker||"undefined"==typeof URL){const n=await async function(e){var t;const n=await Ob.loadAsync(e),a=[],r=await(null==(t=n.file(ZA))?void 0:t.async("string")),o=QA(r);r||a.push({level:"warning",code:"missing-content-types",message:"The DOCX package does not contain [Content_Types].xml."});const i={};for(const[c,u]of Object.entries(n.files)){if(u.dir)continue;const e=YA(c),t=Tk(e,o),n=kk(e,t)?"xml":"binary",a="xml"===n?await u.async("string"):await u.async("base64");i[e]={path:e,...t?{contentType:t}:{},kind:n,data:a,encoding:"xml"===n?"utf8":"base64",originalHash:Ck(a)}}let l=[];for(const[c,u]of Object.entries(i)){const e=JA(c);if(void 0===e||"xml"!==u.kind)continue;const t=tI(e,_A(u.data),t=>{a.push({level:"warning",code:"unsafe-relationship-target",message:`Relationship ${t.id} points outside the OPC package.`,...e?{partPath:e}:{},relationshipId:t.id})});if(null===e){l=t;continue}const n=i[e];n?n.relationships=t:a.push({level:"warning",code:"orphan-relationships-part",message:`Relationship part ${c} has no owning package part.`,partPath:c})}const s=l.find(e=>"External"!==e.targetMode&&e.type.endsWith("/officeDocument"));let d=null==s?void 0:s.resolvedTarget;if(!d||!i[d]){if(!i[Ik])throw new Error("DOCX package has no resolvable officeDocument relationship or word/document.xml fallback.");d=Ik,a.push({level:"warning",code:"main-document-fallback",message:"The officeDocument relationship was absent or invalid; word/document.xml was used as a compatibility fallback."})}return{format:"docx",mainDocumentPart:d,contentTypes:o,rootRelationships:l,parts:i,...a.length>0?{diagnostics:a}:{}}}(e),a=await Ok(e,n),r=await GA(a,t);return await async function(e,t){try{t.rebuiltPartHashes=await Ak(e)}catch(n){(t.diagnostics??(t.diagnostics=[])).push({level:"warning",code:"rebuilt-baseline-unavailable",message:`The imported document could not be fingerprinted for granular source-part preservation: ${n instanceof Error?n.message:String(n)}`})}}(r,n),r.sourcePackage=n,r}const n=qk;return qk+=1,new Promise((r,o)=>{const i=new Worker(new URL(""+("undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__dirname+"/assets/importDocxWorker-CyAWuOO6.js").href:new URL("assets/importDocxWorker-CyAWuOO6.js","undefined"==typeof document?location.href:document.currentScript&&"SCRIPT"===document.currentScript.tagName.toUpperCase()&&document.currentScript.src||document.baseURI).href),"undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__filename).href:"undefined"==typeof document?location.href:a&&"SCRIPT"===a.tagName.toUpperCase()&&a.src||new URL("oasis-editor.umd.cjs",document.baseURI).href),{type:"module"}),l=()=>{i.removeEventListener("message",d),i.removeEventListener("error",s),i.terminate()},s=e=>{l(),o(e.error instanceof Error?e.error:new Error(e.message))},d=e=>{var a;const i=e.data;i&&i.id===n&&("progress"!==i.type?(l(),"done"===i.type?r(i.document):o(new Error(i.error))):null==(a=t.onProgress)||a.call(t,i.stage,i.progress))};i.addEventListener("message",d),i.addEventListener("error",s),i.postMessage({type:"import-docx",id:n,buffer:e},[e])})}const Wk={"opening-docx":"opening","parsing-document":"parsing","parsing-headers-footers":"finishing"};function Fk(e){const t={},n=e.style;return function(e,t){switch(e.tagName){case"B":case"STRONG":t.bold=!0;break;case"I":case"EM":case"CITE":case"VAR":t.italic=!0;break;case"U":case"INS":t.underline=!0;break;case"S":case"STRIKE":case"DEL":t.strike=!0}}(e,t),function(e,t){const n=e.fontFamily.trim();n&&(t.fontFamily=n);const a=e.fontSize.trim();if(a.endsWith("px")){const e=Number.parseFloat(a);Number.isFinite(e)&&(t.fontSize=e)}const r=e.color.trim();r&&(t.color=r);const o=e.backgroundColor.trim();o&&(t.highlight=o)}(n,t),function(e,t){const n=e.getAttribute("data-oasis-lang-value")??e.getAttribute("lang"),a=e.getAttribute("data-oasis-lang-east-asia"),r=e.getAttribute("data-oasis-lang-bidi");(n||a||r)&&(t.language={},n&&(t.language.value=n),a&&(t.language.eastAsia=a),r&&(t.language.bidi=r))}(e,t),function(e,t){var n,a;const r=e.textDecoration.toLowerCase();if(r.includes("underline")){t.underline=!0;switch(null==(n=e.textDecorationStyle)?void 0:n.toLowerCase()){case"double":t.underlineStyle="double";break;case"dotted":t.underlineStyle="dotted";break;case"dashed":t.underlineStyle="dash";break;case"wavy":t.underlineStyle="wave"}}r.includes("line-through")&&(t.strike=!0);const o=null==(a=e.textDecorationColor)?void 0:a.trim();o&&(t.underlineColor=o)}(n,t),function(e,t){const n=e.fontWeight.trim();("bold"===n||Number.parseInt(n,10)>=600)&&(t.bold=!0);const a=e.fontStyle.trim();"italic"===a&&(t.italic=!0);"none"===e.display.trim().toLowerCase()&&(t.hidden=!0);"uppercase"===e.textTransform.trim().toLowerCase()&&(t.allCaps=!0);e.fontVariant.trim().toLowerCase().includes("small-caps")&&(t.smallCaps=!0);const r=e.letterSpacing.trim();if(r.endsWith("pt")){const e=Number.parseFloat(r);Number.isFinite(e)&&(t.characterSpacing=e)}const o=e.fontStretch.trim();if(o.endsWith("%")){const e=Number.parseFloat(o);Number.isFinite(e)&&e>0&&(t.characterScale=e)}}(n,t),function(e,t){const n=e.fontVariantLigatures.trim().toLowerCase();"none"===n?t.ligatures="none":n.includes("historical")?t.ligatures="historical":n.includes("common-ligatures")&&n.includes("contextual")?t.ligatures="standardContextual":n.includes("common-ligatures")?t.ligatures="standard":n.includes("contextual")&&(t.ligatures="contextual");const a=e.fontVariantNumeric.trim().toLowerCase();a.includes("proportional-nums")?t.numberSpacing="proportional":a.includes("tabular-nums")&&(t.numberSpacing="tabular");a.includes("lining-nums")?t.numberForm="lining":a.includes("oldstyle-nums")&&(t.numberForm="oldStyle");const r=e.fontFeatureSettings.trim().toLowerCase(),o=r.match(/["']ss(0[1-9]|1[0-9]|20)["']\s+1/);(null==o?void 0:o[1])&&(t.stylisticSet=Number(o[1]));/["']calt["']\s+1/.test(r)&&(t.contextualAlternates=!0)}(n,t),function(e,t,n){"SUP"===e.tagName&&(n.superscript=!0);"SUB"===e.tagName&&(n.subscript=!0);const a=t.verticalAlign.trim();if(a.endsWith("pt")){const e=Number.parseFloat(a);Number.isFinite(e)&&(n.baselineShift=e)}}(e,n,t),function(e,t){var n;const a="A"===e.tagName?(null==(n=e.getAttribute("href"))?void 0:n.trim())??"":"";a&&(t.link=a,t.underline=!0)}(e,t),Object.keys(t).length>0?t:void 0}function Dk(e,t){if(e.nodeType===Node.TEXT_NODE){const n=e.textContent??"";return n.length>0?[tt(n,t)]:[]}if(e.nodeType!==Node.ELEMENT_NODE)return[];const n=e;if("BR"===n.tagName)return[tt("\n",t)];const a=function(e){var t,n,a;if("IMG"!==e.tagName)return;const r=e,o=(null==(t=r.getAttribute("src"))?void 0:t.trim())??"";if(!o||!function(e){const t=e.trim().toLowerCase();return t.startsWith("data:image/")||t.startsWith("blob:")}(o))return;const i=(null==(n=r.getAttribute("width"))?void 0:n.trim())??"",l=(null==(a=r.getAttribute("height"))?void 0:a.trim())??"",s=r.style.width.trim(),d=r.style.height.trim(),c=s.endsWith("px")?Number.parseFloat(s):Number.NaN,u=d.endsWith("px")?Number.parseFloat(d):Number.NaN,p=Number.parseFloat(i),h=Number.parseFloat(l),f=Number.isFinite(c)?c:Number.isFinite(p)?p:100,g=Number.isFinite(u)?u:Number.isFinite(h)?h:100,m=r.getAttribute("alt"),b={src:o,width:Math.max(1,Math.round(f)),height:Math.max(1,Math.round(g))};return null!==m&&(b.alt=m),b}(n);if(a)return[tt("",t,a)];const r={...t??{},...Fk(n)??{}},o=[];for(const i of Array.from(n.childNodes))o.push(...Dk(i,r));return o}function Hk(e){return"P"===e||"DIV"===e||"LI"===e||/^H[1-6]$/.test(e)}function Uk(e){return"UL"===e?"bullet":"OL"===e?"ordered":null}function Gk(e){const t=e.style,n={},a=t.textAlign.trim();"left"!==a&&"center"!==a&&"right"!==a&&"justify"!==a||(n.align=a);const r=t.lineHeight.trim();if(r){const e=Number.parseFloat(r);Number.isFinite(e)&&(n.lineHeight=e,r.endsWith("px")&&(n.lineRule="exact"))}const o=t.paddingTop.trim();if(o.endsWith("px")){const e=Number.parseFloat(o);Number.isFinite(e)&&(n.spacingBefore=e)}const i=t.paddingBottom.trim();if(i.endsWith("px")){const e=Number.parseFloat(i);Number.isFinite(e)&&(n.spacingAfter=e)}const l=t.paddingLeft.trim();if(l.endsWith("px")){const e=Number.parseFloat(l);Number.isFinite(e)&&(n.indentLeft=e)}const s=t.paddingRight.trim();if(s.endsWith("px")){const e=Number.parseFloat(s);Number.isFinite(e)&&(n.indentRight=e)}const d=t.textIndent.trim();if(d.endsWith("px")){const e=Number.parseFloat(d);Number.isFinite(e)&&(n.indentFirstLine=e)}return"page"!==t.breakBefore&&"true"!==e.dataset.oasisPageBreakBefore||(n.pageBreakBefore=!0),"true"===e.dataset.oasisKeepWithNext&&(n.keepWithNext=!0),Object.keys(n).length>0?n:void 0}const jk={H1:"heading1",H2:"heading2",H3:"heading3",H4:"heading3",H5:"heading3",H6:"heading3"};function Zk(e){return e.map(e=>({text:e.text,styles:e.styles,image:Tt(e)}))}function Kk(e,t){const n=at(Zk(Dk(e,void 0))),a=Gk(e),r=jk[e.tagName];return(a||r)&&(n.style={...r?{styleId:r}:{},...a??{}}),t&&(n.list=t),n}function Xk(e,t,n){const a=[];for(const r of Array.from(e.children))if("LI"===r.tagName){a.push(Kk(r,{kind:t,level:n}));for(const e of Array.from(r.children)){const t=Uk(e.tagName);t&&a.push(...Xk(e,t,n+1))}}return a}function Yk(e){const t=$k(e).filter(e=>"paragraph"===e.type),n=Number.parseInt(e.getAttribute("colspan")??"",10),a=Number.parseInt(e.getAttribute("rowspan")??"",10);return rt(t.length>0?t:[nt("")],Number.isFinite(n)&&n>1?n:1,Number.isFinite(a)&&a>1?{rowSpan:a}:void 0)}function Jk(e){const t=[];let n=!0;for(const a of Array.from(e.children))"TD"!==a.tagName&&"TH"!==a.tagName||(t.push(Yk(a)),"TH"!==a.tagName&&(n=!1));return 0===t.length?null:ot(t,n?{isHeader:!0}:void 0)}function Qk(e){const t=[],n=Array.from(e.querySelectorAll("tr")).filter(t=>t.closest("table")===e);for(const a of n){const e=Jk(a);e&&t.push(e)}return 0===t.length?null:it(t)}function $k(e){const t=[];for(const n of Array.from(e.childNodes)){if(n.nodeType===Node.TEXT_NODE){(n.textContent??"").trim().length>0&&t.push(_k(Dk(n,void 0)));continue}if(n.nodeType!==Node.ELEMENT_NODE)continue;const e=n;if("TABLE"===e.tagName){const n=Qk(e);n&&t.push(n);continue}const a=Uk(e.tagName);if(a){t.push(...Xk(e,a,0));continue}if(Hk(e.tagName)){t.push(Kk(e));continue}if(e.children.length>0){t.push(...$k(e));continue}const r=Dk(e,void 0);r.length>0&&t.push(_k(r))}return t}function _k(e){return at(Zk(e))}const eR=[{id:"docx",accept:[".docx"],matches(e){return this.accept.includes(Nb(e.name))},import:(e,t)=>Bk(e,{onProgress:t?(e,n)=>t(Wk[e],n):void 0})},{id:"html",accept:[".html",".htm"],matches(e){return this.accept.includes(Nb(e.name))},async import(e,t){null==t||t("opening");const n=function(e){var t;const n=new Uint8Array(e),a=new TextDecoder("utf-8").decode(n.subarray(0,2048)).match(/charset\s*=\s*["']?([\w-]+)/i),r=null==(t=null==a?void 0:a[1])?void 0:t.toLowerCase();if(r&&"utf-8"!==r&&"utf8"!==r)try{return new TextDecoder(r).decode(n)}catch{}return new TextDecoder("utf-8").decode(n)}(e);null==t||t("parsing");const a=function(e){if("undefined"==typeof document)throw new Error("importHtmlToEditorDocument requires a DOM environment");const t=(new DOMParser).parseFromString(e,"text/html"),n=t.body,a=n?$k(n):[];0===a.length&&a.push(nt(""));const r=t.title.trim();return Dn(a,void 0,void 0,void 0,r?{title:r}:void 0)}(n);return null==t||t("finishing"),a}}];const tR=["nw","n","ne","e","se","s","sw","w"],nR=24;function aR(e,t,n){const a=Math.max(t,e);return void 0===n?a:Math.min(n,a)}function rR(e,t){return"x"===t?e.includes("e")?1:e.includes("w")?-1:0:e.includes("s")?1:e.includes("n")?-1:0}var oR=ge("<button aria-hidden=true class=oasis-editor-rotate-handle tabindex=-1 type=button>"),iR=ge("<div aria-hidden=true style=transform-origin:center>"),lR=ge("<button aria-hidden=true class=oasis-editor-resize-handle tabindex=-1 type=button>");function sR(e){return(t=iR()).$$mousedown=t=>{!e.readOnly&&e.box()&&e.onBodyMouseDown&&(t.preventDefault(),e.onBodyMouseDown(t))},Ie(t,K(re,{get when(){return!e.readOnly},get children(){return[K(ne,{each:tR,children:t=>{return(n=lR()).$$mousedown=n=>{e.box()&&e.onResizeStart(t,n)},be(n,"data-direction",t),n;var n}}),K(re,{get when(){return e.onRotateStart},get children(){var t=oR();return t.$$mousedown=t=>{var n;e.box()&&(t.preventDefault(),t.stopPropagation(),null==(n=e.onRotateStart)||n.call(e,t))},t}})]}})),w(n=>{var a,r,o,i,l,s=`oasis-editor-selection-overlay ${e.variantClass}`,d=e.box()?void 0:"none",c=`${(null==(a=e.box())?void 0:a.left)??0}px`,u=`${(null==(r=e.box())?void 0:r.top)??0}px`,p=`${(null==(o=e.box())?void 0:o.width)??0}px`,h=`${(null==(i=e.box())?void 0:i.height)??0}px`,f=(null==(l=e.rotation)?void 0:l.call(e))?`rotate(${e.rotation()}deg)`:void 0,g=!e.readOnly&&e.box()?"auto":"none";return s!==n.e&&ve(t,n.e=s),d!==n.t&&Me(t,"display",n.t=d),c!==n.a&&Me(t,"left",n.a=c),u!==n.o&&Me(t,"top",n.o=u),p!==n.i&&Me(t,"width",n.i=p),h!==n.n&&Me(t,"height",n.n=h),f!==n.s&&Me(t,"transform",n.s=f),g!==n.h&&Me(t,"pointer-events",n.h=g),n},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0}),t;var t}me(["mousedown"]);var dR=ge("<div aria-hidden=true class=oasis-editor-image-crop-preview><img alt>");function cR(e){return Number.isFinite(e)?Math.max(0,Math.min(.99,e??0)):0}function uR(e){const t=()=>{const t=e.box(),n=e.image();if(!t||!n)return null;const a=n.intrinsicWidth??n.width,r=n.intrinsicHeight??n.height,o=a/Math.max(1,r);if("fit"===n.cropFit&&o>0){const e=o>t.width/Math.max(1,t.height)?t.width:t.height*o,n=e/o;return{crop:{},left:t.left+(t.width-e)/2,top:t.top+(t.height-n)/2,width:e,height:n}}const i=n.crop??{},l=cR(i.left),s=cR(i.top),d=cR(i.right),c=cR(i.bottom),u=t.width/Math.max(.01,1-l-d),p=t.height/Math.max(.01,1-s-c);return{crop:i,left:t.left-l*u,top:t.top-s*p,width:u,height:p}};return n=dR(),be(a=n.firstChild,"draggable",!1),w(r=>{var o,i,l,s,d,c,u,p,h,f,g=t()?void 0:"none",m=`${(null==(o=e.box())?void 0:o.left)??0}px`,b=`${(null==(i=e.box())?void 0:i.top)??0}px`,v=`${(null==(l=e.box())?void 0:l.width)??0}px`,y=`${(null==(s=e.box())?void 0:s.height)??0}px`,w=`rotate(${e.rotation()}deg)`,x=e.src(),M=((null==(d=t())?void 0:d.left)??0)-((null==(c=e.box())?void 0:c.left)??0)+"px",S=((null==(u=t())?void 0:u.top)??0)-((null==(p=e.box())?void 0:p.top)??0)+"px",A=`${(null==(h=t())?void 0:h.width)??0}px`,I=`${(null==(f=t())?void 0:f.height)??0}px`;return g!==r.e&&Me(n,"display",r.e=g),m!==r.t&&Me(n,"left",r.t=m),b!==r.a&&Me(n,"top",r.a=b),v!==r.o&&Me(n,"width",r.o=v),y!==r.i&&Me(n,"height",r.i=y),w!==r.n&&Me(n,"transform",r.n=w),x!==r.s&&be(a,"src",r.s=x),M!==r.h&&Me(a,"left",r.h=M),S!==r.r&&Me(a,"top",r.r=S),A!==r.d&&Me(a,"width",r.d=A),I!==r.l&&Me(a,"height",r.l=I),r},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0}),n;var n,a}var pR=ge("<div aria-hidden=true class=oasis-editor-table-handles-overlay><button aria-hidden=true class=oasis-editor-table-move-handle tabindex=-1 type=button></button><button aria-hidden=true class=oasis-editor-table-resize-corner tabindex=-1 type=button>");function hR(e){return K(re,{get when(){return pe(()=>!e.readOnly)()&&e.box()},children:t=>{return n=pR(),a=n.firstChild,r=a.nextSibling,a.$$mousedown=t=>{e.onMoveStart(t)},r.$$mousedown=t=>{e.onResizeStart(t)},w(e=>{var a=`${t().left}px`,r=`${t().top}px`,o=`${t().width}px`,i=`${t().height}px`;return a!==e.e&&Me(n,"left",e.e=a),r!==e.t&&Me(n,"top",e.t=r),o!==e.a&&Me(n,"width",e.a=o),i!==e.o&&Me(n,"height",e.o=i),e},{e:void 0,t:void 0,a:void 0,o:void 0}),n;var n,a,r}})}me(["mousedown"]);function fR(e){return Number.isFinite(e)?Math.min(200,Math.max(50,Math.round(e))):100}var gR=ge("<div class=oasis-editor-import-overlay data-testid=editor-import-overlay role=status aria-live=polite><div class=oasis-editor-import-card><div class=oasis-editor-import-title></div><div class=oasis-editor-import-phase data-testid=editor-import-phase></div><div class=oasis-editor-import-progress-track><div class=oasis-editor-import-progress-bar data-testid=editor-import-progress-bar></div></div><div class=oasis-editor-import-progress-label>"),mR=ge("<span class=oasis-editor-import-done-icon>"),bR=ge("<span class=oasis-editor-import-error-icon>");function vR(e){const t=Fe();return K(re,{get when(){var t;return null==(t=e.progress)?void 0:t.call(e)},children:e=>{const n="done"===e().phase,a="error"===e().phase;return i=gR(),l=i.firstChild,s=l.firstChild,d=s.nextSibling,c=d.nextSibling,u=c.firstChild,p=c.nextSibling,i.classList.toggle("oasis-editor-import-overlay-done",!!n),i.classList.toggle("oasis-editor-import-overlay-error",!!a),be(i,"aria-busy",!n&&!a),Ie(l,K(Ue,{height:40,class:"oasis-editor-loading-mark"}),s),Ie(s,()=>t("import.overlay.title")),Ie(d,()=>t(`import.phase.${e().phase}`)),u.classList.toggle("oasis-editor-import-progress-bar-done",!!n),u.classList.toggle("oasis-editor-import-progress-bar-error",!!a),Ie(p,n?(Ie(o=mR(),()=>t("import.phase.done")),o):a?(Ie(r=bR(),()=>t("import.phase.error")),r):[pe(()=>Math.round(e().progress)),"%"]),w(t=>{var n=!("preparing-fonts"!==e().phase&&"applying-editor-state"!==e().phase&&"stabilizing-layout"!==e().phase),a=`${e().progress}%`;return n!==t.e&&u.classList.toggle("oasis-editor-import-progress-bar-indeterminate",t.e=n),a!==t.t&&Me(u,"width",t.t=a),t},{e:void 0,t:void 0}),i;var r,o,i,l,s,d,c,u,p}})}var yR=ge('<div class=oasis-editor-statusbar data-testid=editor-statusbar><div class="oasis-editor-statusbar-group oasis-editor-statusbar-start"><span class=oasis-editor-statusbar-item data-testid=editor-statusbar-word-count></span><span class=oasis-editor-statusbar-item data-testid=editor-statusbar-character-count></span><span class=oasis-editor-statusbar-item></span></div><div class="oasis-editor-statusbar-group oasis-editor-statusbar-end"><div class=oasis-editor-statusbar-zoom data-testid=editor-statusbar-zoom-control><button type=button class=oasis-editor-zoom-button>−</button><input class=oasis-editor-zoom-slider type=range><button type=button class=oasis-editor-zoom-button>+</button><span class="oasis-editor-statusbar-item oasis-editor-zoom-value"data-testid=editor-statusbar-zoom>%'),wR=ge("<span>");function xR(e){const t=Fe();return n=yR(),a=n.firstChild,r=a.firstChild,o=r.nextSibling,i=o.nextSibling,l=a.nextSibling,s=l.firstChild,d=s.firstChild,c=d.nextSibling,u=c.nextSibling,p=u.nextSibling,h=p.firstChild,Ie(r,()=>t("status.words",[e.wordCount()])),Ie(o,()=>t("status.characters",[e.characterCount()])),Ie(i,()=>t("status.page",[e.currentPage(),e.totalPages()])),d.$$click=()=>e.adjustZoom(-10),c.$$input=t=>e.setZoomPercent(fR(t.currentTarget.valueAsNumber)),be(c,"min",50),be(c,"max",200),be(c,"step",10),u.$$click=()=>e.adjustZoom(10),Ie(p,()=>e.zoomPercent(),h),Ie(l,K(re,{get when(){return e.persistenceStatus},get children(){return(()=>{const n=e.persistenceStatus().toLowerCase(),a=n.includes("saved")?"status.saved":n.includes("saving")?"status.saving":n.includes("error")?"status.error":null;return K(re,{when:a,get children(){var e=wR();return Ie(e,()=>t(a)),w(()=>ve(e,`oasis-editor-statusbar-item oasis-editor-persistence-status oasis-editor-status-${n.replace("...","ing").replace(".","")}`)),e}})})()}}),null),w(n=>{var a=t("status.zoom"),r=`${t("status.zoom")} -`,o=e.zoomPercent()<=50,i=t("status.zoom"),l=`${e.zoomPercent()}%`,p=`${t("status.zoom")} +`,h=e.zoomPercent()>=200;return a!==n.e&&be(s,"aria-label",n.e=a),r!==n.t&&be(d,"aria-label",n.t=r),o!==n.a&&(d.disabled=n.a=o),i!==n.o&&be(c,"aria-label",n.o=i),l!==n.i&&be(c,"aria-valuetext",n.i=l),p!==n.n&&be(u,"aria-label",n.n=p),h!==n.s&&(u.disabled=n.s=h),n},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),w(()=>c.value=e.zoomPercent()),n;var n,a,r,o,i,l,s,d,c,u,p,h}me(["click","input"]);var MR=ge('<div data-testid=editor-editor-shell><div class=oasis-editor-editor data-testid=editor-editor><div class=oasis-editor-editor-zoom-sizer><div class=oasis-editor-editor-scroll-content data-testid=editor-editor-scroll-content style="position:absolute;top:0px;transform-origin:top left"><textarea aria-label="Editor input"autocomplete=off autocapitalize=off class=oasis-editor-input data-testid=editor-input value style=pointer-events:none></textarea><input data-testid=editor-import-docx-input type=file style=display:none><input accept="image/png, image/jpeg, image/gif"data-testid=editor-insert-image-input type=file style=display:none>');function SR(e){const t=()=>e.layout,n=()=>e.overlays,a=()=>e.refs??{},r=()=>e.surfaceHandlers,o=()=>e.inputHandlers,i=()=>e.fileHandlers;let l,s;const[d,c]=y(),u=()=>un(e.state().document).reduce((e,t)=>Math.max(e,t.pageSettings.width),0)||Ht(e.state().document).width,p=()=>{const e=t().viewportHeight;return"number"==typeof e?`${e}px`:e??"min(72vh, 920px)"},h=M(()=>({width:"100%",height:"100%","max-height":p(),...t().style??{}})),f=M(()=>e.state().document),g=M(()=>bn(f()).reduce((e,t)=>e+Jt(t),0)),m=M(()=>function(e){const t=bn(e);let n=0;for(const a of t){const e=a.runs.reduce((e,t)=>e+t.text,"");e.trim()&&(n+=e.split(/[\s\p{P}]+/u).filter(e=>e.length>0).length)}return n}(f())),[b,v]=y(100),S=()=>{var e,n;return(null==(n=(e=t()).zoomPercent)?void 0:n.call(e))??b()},A=e=>{const n=fR(e),a=t().setZoomPercent;a?a(n):v(n)},I=e=>A(S()+e),T=M(()=>fR(S())/100),k=()=>{var e,n;return(null==(n=(e=t()).zoomFactor)?void 0:n.call(e))??T()},[R,E]=y(0),[L,V]=y({width:0,height:0}),N=()=>u()+68,z=M(()=>Math.max(N()*k(),L().width)),P=M(()=>Math.max(R()*k(),L().height)),O=M(()=>Math.max(0,(z()-N()*k())/2));let q=k();x(()=>{const e=k(),t=q;if(q=e,e===t||t<=0)return;const n=s;if(!n)return;const a=e/t,r=n.clientWidth/2,o=n.clientHeight/2,i=(n.scrollLeft+r)*a-r,l=(n.scrollTop+o)*a-o;requestAnimationFrame(()=>{n.scrollLeft=i,n.scrollTop=l})});const B=()=>t().documentLayout(),W=()=>Math.max(1,B().pages.length),[F,D]=y(null),H=()=>{const e=s;if(!e)return void D(null);const t=Array.from(e.querySelectorAll(".oasis-editor-paper[data-page-index]"));if(0===t.length)return void D(null);const n=e.getBoundingClientRect(),a=n.top+.5*n.height;let r=0,o=Number.POSITIVE_INFINITY;for(const i of t){const e=i.getBoundingClientRect(),t=e.top+.5*e.height,n=Math.abs(t-a);n<o&&(o=n,r=Number(i.dataset.pageIndex??"0"))}D(Number.isFinite(r)?r:null)},U=()=>{const t=F();if(null!==t)return Math.max(1,t+1);const n=B(),a=e.state().selection.focus.paragraphId,r=n.pages.findIndex(e=>e.blocks.some(e=>e.sourceBlockId===a));return-1===r?1:r+1},G=M(()=>n().selectedImageBox()),j=M(()=>{const t=G();if(!t)return null;const n=vn(e.state().document).find(e=>e.id===t.paragraphId);if(!n)return null;let a=0;for(const r of n.runs){if("image"===r.kind&&a===t.startOffset)return{image:Tt(r),src:dn(e.state().document,r.image.src)};a+=r.text.length}return null}),Z=M(()=>n().selectedTextBoxBox()),X=M(()=>n().selectedTableBox()),Y=M(()=>{var t;return(null==(t=e.state().document.comments)?void 0:t.items)??{}});return x(()=>{B(),queueMicrotask(H)}),(()=>{var u=MR(),p=u.firstChild,f=p.firstChild,b=f.firstChild,v=b.firstChild,y=v.nextSibling,x=y.nextSibling;Ie(u,K(re,{get when(){return pe(()=>!!t().showHorizontalRuler)()&&n().toolbarHost},get children(){return K(sb,{get state(){return e.state},get toolbarHost(){return n().toolbarHost},viewportRef:d,readOnly:()=>Boolean(t().readOnly),zoomFactor:k})}}),p),ye(p,"contextmenu",r().onEditorContextMenu,!0),ye(p,"mousedown",r().onEditorMouseDown,!0),ye(p,"drop",r().onDrop),ye(p,"dragover",r().onDragOver),Ae(e=>{var t,n;s=e,c(e),null==(n=(t=a()).onViewportRef)||n.call(t,e);const r=()=>{H()};e.addEventListener("scroll",r,{passive:!0}),queueMicrotask(H);const o=()=>{V({width:e.clientWidth,height:e.clientHeight})};let i;o(),"undefined"!=typeof ResizeObserver&&(i=new ResizeObserver(o),i.observe(e)),C(()=>{e.removeEventListener("scroll",r),null==i||i.disconnect()})},p),Ae(e=>{var t,n;l=e,null==(n=(t=a()).onSurfaceRef)||n.call(t,e);const r=()=>{E(e.offsetHeight)};let o;r(),queueMicrotask(r),"undefined"!=typeof ResizeObserver&&(o=new ResizeObserver(r),o.observe(e)),C(()=>null==o?void 0:o.disconnect())},b),Ie(b,K(Gm,{get state(){return e.state},get documentLayout(){return t().documentLayout},get remoteWebFonts(){return t().remoteWebFonts},get measuredBlockHeights(){return t().measuredBlockHeights},get measuredParagraphLayouts(){return t().measuredParagraphLayouts},viewportRef:()=>s??void 0,get onSurfaceMouseDown(){return r().onSurfaceMouseDown},get onSurfaceClick(){return r().onSurfaceClick},get onSurfaceMouseMove(){return r().onSurfaceMouseMove},get onSurfaceDblClick(){return r().onSurfaceDblClick},get onParagraphMouseDown(){return r().onParagraphMouseDown},get onImageMouseDown(){return r().onImageMouseDown},get onImageResizeHandleMouseDown(){return r().onImageResizeHandleMouseDown},get onTextBoxResizeHandleMouseDown(){return r().onTextBoxResizeHandleMouseDown},get onTableDragHandleMouseDown(){return r().onTableDragHandleMouseDown},get onTableCornerResizeHandleMouseDown(){return r().onTableCornerResizeHandleMouseDown},get onRevisionMouseEnter(){return r().onRevisionMouseEnter},get onRevisionMouseLeave(){return r().onRevisionMouseLeave}}),v),Ie(b,K(re,{get when(){return n().hoveredRevision()},children:e=>K(gb,{get box(){return e()}})}),v),Ie(b,K(re,{get when(){return n().selectionBoxes().length>0},get children(){return K(hb,{get boxes(){return n().selectionBoxes()}})}}),v),Ie(b,K(re,{get when(){return n().commentHighlights().length>0},get children(){return K(xb,{get boxes(){return n().commentHighlights},commentsById:Y})}}),v),Ie(b,K(re,{get when(){return(null==(t=(e=n()).imageCropMode)?void 0:t.call(e))??!1;var e,t},get fallback(){return K(sR,{box:G,get readOnly(){return Boolean(t().readOnly)},variantClass:"oasis-editor-image-selection-overlay",rotation:()=>{var e;return(null==(e=G())?void 0:e.rotation)??0},onResizeStart:(e,t)=>{const n=G();n&&(t.preventDefault(),t.stopPropagation(),r().onImageResizeHandleMouseDown(n.paragraphId,n.startOffset,e,t))},onRotateStart:e=>{const t=G();t&&r().onImageRotateHandleMouseDown(t.paragraphId,t.startOffset,e)},onBodyMouseDown:e=>{const t=G();t&&r().onImageMouseDown(t.paragraphId,t.startOffset,e)}})},get children(){return[K(uR,{box:G,image:()=>{var e;return(null==(e=j())?void 0:e.image)??null},src:()=>{var e;return(null==(e=j())?void 0:e.src)??""},rotation:()=>{var e;return(null==(e=G())?void 0:e.rotation)??0}}),K(sR,{box:G,get readOnly(){return Boolean(t().readOnly)},variantClass:"oasis-editor-image-crop-overlay",rotation:()=>{var e;return(null==(e=G())?void 0:e.rotation)??0},onResizeStart:(e,t)=>{var n,a;const o=G();o&&(t.preventDefault(),t.stopPropagation(),null==(a=(n=r()).onImageCropHandleMouseDown)||a.call(n,o.paragraphId,o.startOffset,e,t))},onBodyMouseDown:e=>{var t,n;const a=G();a&&(null==(n=(t=r()).onImageCropBodyMouseDown)||n.call(t,a.paragraphId,a.startOffset,e))}})]}}),v),Ie(b,K(sR,{box:Z,get readOnly(){return Boolean(t().readOnly)},variantClass:"oasis-editor-textbox-selection-overlay",rotation:()=>{var e;return(null==(e=Z())?void 0:e.rotation)??0},onResizeStart:(e,t)=>{const n=Z();n&&(t.preventDefault(),t.stopPropagation(),r().onTextBoxResizeHandleMouseDown(n.paragraphId,n.startOffset,e,t))},onRotateStart:e=>{const t=Z();t&&r().onTextBoxRotateHandleMouseDown(t.paragraphId,t.startOffset,e)}}),v),Ie(b,K(hR,{box:X,get readOnly(){return Boolean(t().readOnly)},onMoveStart:e=>{const t=X();t&&r().onTableDragHandleMouseDown(t.tableId,e)},onResizeStart:e=>{const t=X();t&&r().onTableCornerResizeHandleMouseDown(t.tableId,e)}}),v),Ie(b,K(re,{get when(){return n().layoutOptions},children:e=>K(Vb,{box:()=>G()??Z(),get layoutOptions(){return e()},surfaceRef:()=>l,get readOnly(){return Boolean(t().readOnly)}})}),v),Ie(b,K(re,{get when(){return n().showCaret()},get children(){return K(cb,{get active(){return n().focused()},get left(){return n().caretBox().left},get top(){return n().caretBox().top},get height(){return n().caretBox().height}})}}),v),ye(v,"paste",o().onPaste),ye(v,"keydown",o().onKeyDown,!0),ye(v,"input",o().onInput,!0),ye(v,"focus",o().onInputFocus),ye(v,"cut",o().onCut),ye(v,"copy",o().onCopy),ye(v,"compositionstart",o().onCompositionStart),ye(v,"compositionend",o().onCompositionEnd),ye(v,"blur",o().onInputBlur);var M=a().onTextareaRef;"function"==typeof M?Ae(M,v):a().onTextareaRef=v,be(v,"spellcheck",!1),ye(y,"change",i().onImportInputChange);var T=a().onImportInputRef;"function"==typeof T?Ae(T,y):a().onImportInputRef=y,ye(x,"change",i().onImageInputChange);var R=a().onImageInputRef;return"function"==typeof R?Ae(R,x):a().onImageInputRef=x,Ie(u,K(vR,{get progress(){return n().importProgress}}),null),Ie(u,K(xR,{wordCount:m,characterCount:g,currentPage:U,totalPages:W,zoomPercent:S,adjustZoom:I,setZoomPercent:A,get persistenceStatus(){return n().persistenceStatus}}),null),w(e=>{var a="oasis-editor-editor-shell"+(t().class?` ${t().class}`:""),r=h(),o=`${z()}px`,i=`${P()}px`,l=`${O()}px`,s=`${N()}px`,d=L().height/k()+"px",c=`scale(${k()})`,p=t().readOnly,g=`${n().inputBox().left}px`,m=`${n().inputBox().top}px`,w=`${n().inputBox().height}px`,x=eR.flatMap(e=>e.accept).join(",");return a!==e.e&&ve(u,e.e=a),e.t=xe(u,r,e.t),o!==e.a&&Me(f,"width",e.a=o),i!==e.o&&Me(f,"height",e.o=i),l!==e.i&&Me(b,"left",e.i=l),s!==e.n&&Me(b,"width",e.n=s),d!==e.s&&Me(b,"min-height",e.s=d),c!==e.h&&Me(b,"transform",e.h=c),p!==e.r&&(v.readOnly=e.r=p),g!==e.d&&Me(v,"left",e.d=g),m!==e.l&&Me(v,"top",e.l=m),w!==e.u&&Me(v,"height",e.u=w),x!==e.c&&be(y,"accept",e.c=x),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0,u:void 0,c:void 0}),u})()}function AR(e,t){const n=e=>void 0===e?0:e/ht,a=e.positionH,r=e.positionV,o="page"===(null==a?void 0:a.relativeFrom)?t.pageLeft:"character"===(null==a?void 0:a.relativeFrom)?t.lineLeftOffset+t.slotLeft:t.contentLeft,i="page"===(null==r?void 0:r.relativeFrom)?t.pageTop:"line"===(null==r?void 0:r.relativeFrom)?t.lineTopOffset+t.lineTop:"margin"===(null==r?void 0:r.relativeFrom)?t.contentTop:t.paragraphTop;return{left:o+n(null==a?void 0:a.offset),top:i+n(null==r?void 0:r.offset)}}function IR(e){const t=[];for(const n of e.lines)for(const a of n.fragments){const r=a.image;if(!(null==r?void 0:r.floating))continue;const o=vg(n.slots,a.startOffset);if(!o)continue;const{left:i,top:l}=AR(r.floating,{pageLeft:e.pageLeft,pageTop:e.pageTop,contentLeft:e.contentLeft,contentTop:e.contentTop,paragraphTop:e.paragraphTop,lineTopOffset:e.lineTopOffset,lineLeftOffset:e.lineLeftOffset,lineTop:n.top,slotLeft:o.left});t.push({paragraphId:e.paragraphId,paragraphIndex:e.paragraphIndex,zone:e.zone,footnoteId:e.footnoteId,pageIndex:e.pageIndex,startOffset:a.startOffset,endOffset:yg(a.startOffset,a.endOffset),left:i,top:l,width:r.width,height:r.height,rotation:r.rotation,behindDoc:r.floating.behindDoc})}return t}function CR(e){const t=[];for(const n of e.lines)for(const a of n.fragments){const r=a.textBox;if(!(null==r?void 0:r.floating))continue;const o=vg(n.slots,a.startOffset);if(!o)continue;const{left:i,top:l}=AR(r.floating,{pageLeft:e.pageLeft,pageTop:e.pageTop,contentLeft:e.contentLeft,contentTop:e.contentTop,paragraphTop:e.paragraphTop,lineTopOffset:e.lineTopOffset,lineLeftOffset:e.lineLeftOffset,lineTop:n.top,slotLeft:o.left});t.push({paragraphId:e.paragraphId,paragraphIndex:e.paragraphIndex,zone:e.zone,footnoteId:e.footnoteId,pageIndex:e.pageIndex,startOffset:a.startOffset,endOffset:yg(a.startOffset,a.endOffset),left:i,top:l,width:r.width,height:e.resolveHeight(r),rotation:r.rotation,behindDoc:r.floating.behindDoc})}return t}function TR(e,t,n){return e.map(e=>({startOffset:e.startOffset,endOffset:e.endOffset,top:n+e.top,height:e.height,slots:e.slots.map(e=>({offset:e.offset,left:t+e.left,top:n+e.top,height:e.height}))}))}function kR(e){const t={x:e.cell.contentLeft,y:e.cell.contentTop,width:e.cell.contentWidth,height:e.cell.contentHeight},n=[];if("stack"===e.verticalMode){const{glyphs:a,endColumnRight:r}=gf(e.paragraph,e.state,t,e.carry.stackColumnRight);for(const e of a)n.push({offset:e.offset,left:e.centerX,top:e.top,height:e.height});const o=a[a.length-1];n.push({offset:e.textLength,left:o?o.centerX:t.x+t.width,top:o?o.top+o.height:t.y,height:o?o.height:16}),e.carry.stackColumnRight=r}else{const a=e.verticalMode;for(const r of e.paragraphLines){let o=8;for(let i=0;i<r.slots.length;i+=1){const l=r.slots[i],s=r.slots[i+1],d=s?Math.max(1,s.left-l.left):o;o=d;const c=cf(t,a,l.left,e.carry.rotatedCursorY+l.top,d,l.height);n.push({offset:l.offset,left:c.left,top:c.top,height:c.height})}}e.carry.rotatedCursorY+=e.paragraphHeight}0===n.length&&n.push({offset:0,left:t.x+t.width,top:t.y,height:16});let a=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;for(const o of n)a=Math.min(a,o.top),r=Math.max(r,o.top+o.height);return[{startOffset:0,endOffset:e.textLength,top:a,height:Math.max(1,r-a),slots:n}]}function RR(e,t){const{state:n,page:a,pageRect:r,paragraphIndexById:o,snapshotParagraphs:i,inlineImages:l,floatingImages:s,inlineTextBoxes:d,floatingTextBoxes:c}=e,{zone:u,block:p,blockContentLeft:h,blockContentWidth:f,cursorY:g,startTop:m,blockFootnoteId:b}=t;if("paragraph"!==p.sourceBlock.type||!p.layout)return;const v=p.sourceBlock,y=v.id,w=o.get(y)??0,x=sn(v.style,n.document.styles),M=g+(0===p.layout.startOffset?x.spacingBefore??0:0);i.push({paragraph:v,paragraphId:y,paragraphIndex:w,zone:u,footnoteId:b,pageIndex:a.index,startOffset:p.layout.startOffset??0,endOffset:p.layout.endOffset??Yt(v).length,textLength:Yt(v).length,left:h,top:g,width:f,height:Math.max(0,p.estimatedHeight),lines:TR(p.layout.lines,h,M)}),l.push(...xg({lines:p.layout.lines,paragraphId:y,paragraphIndex:w,zone:u,footnoteId:b,pageIndex:a.index,lineTopOffset:M,lineLeftOffset:h})),s.push(...IR({lines:p.layout.lines,paragraphId:y,paragraphIndex:w,zone:u,footnoteId:b,pageIndex:a.index,pageLeft:r.left,pageTop:r.top,contentLeft:h,contentTop:m,paragraphTop:M,lineTopOffset:M,lineLeftOffset:h})),d.push(...Mg({lines:p.layout.lines,paragraphId:y,paragraphIndex:w,zone:u,footnoteId:b,pageIndex:a.index,lineTopOffset:M,lineLeftOffset:h,resolveHeight:e=>gg(e,n,a.index)})),c.push(...CR({lines:p.layout.lines,paragraphId:y,paragraphIndex:w,zone:u,footnoteId:b,pageIndex:a.index,pageLeft:r.left,pageTop:r.top,contentLeft:h,contentTop:m,contentWidth:f,paragraphTop:M,lineTopOffset:M,lineLeftOffset:h,resolveHeight:e=>gg(e,n,a.index)}))}function ER(e,t){var n,a;const{state:r,page:o,pageRect:i,paragraphIndexById:l,snapshotParagraphs:s,inlineImages:d,floatingImages:c,inlineTextBoxes:u,floatingTextBoxes:p,floatingTables:h,unsupportedRegions:f}=e,{zone:g,block:m,blockContentLeft:b,blockContentWidth:v,cursorY:y,startTop:w,blockFootnoteId:x}=t;if("table"!==m.sourceBlock.type)return;const M=null==(n=m.sourceBlock.style)?void 0:n.floating,S=M?fp({floating:M,pageSettings:o.pageSettings,contentLeft:b-i.left,contentTop:w-i.top,contentWidth:v,anchorTop:y-i.top,width:Cf(m.sourceBlock,v),height:m.floatingTableHeight??1,pageIndex:o.index}):void 0;S&&(S.y+=m.floatingTableOffsetY??0),S&&h.push({tableId:m.sourceBlock.id,zone:g,footnoteId:x,pageIndex:o.index,left:i.left+S.x,top:i.top+S.y,width:S.width,height:S.height});const A=Vf({table:m.tableSegment?tl(m.sourceBlock,m.tableSegment):m.sourceBlock,state:r,pageIndex:o.index,originX:S?i.left+S.x:b,originY:S?i.top+S.y:y,contentWidth:v,estimatedHeight:m.floatingTableHeight??m.estimatedHeight});for(const k of A.unsupported)f.push({pageIndex:o.index,zone:g,footnoteId:x,left:A.left,top:A.top,width:A.width,height:A.height,reason:k});const I=m.tableSegment,C=I&&I.startRowIndex>0?I.repeatedHeaderRowCount:0,T=e=>I?e<C?e:I.startRowIndex+(e-C):e;for(const k of A.cells){const e="horizontal"!==k.verticalMode,t={stackColumnRight:k.contentLeft+k.contentWidth,rotatedCursorY:0};for(const n of k.paragraphs){const h=n.paragraph.id,f=l.get(h)??0,m=Yt(n.paragraph).length,b=e?kR({paragraph:n.paragraph,paragraphLines:n.lines,paragraphHeight:n.height,textLength:m,cell:k,verticalMode:k.verticalMode,state:r,carry:t}):TR(n.lines,n.originX,n.originY);s.push({paragraph:n.paragraph,paragraphId:h,paragraphIndex:f,zone:g,footnoteId:x,pageIndex:o.index,startOffset:0,endOffset:m,textLength:m,left:n.originX,top:n.originY,width:n.width,height:n.height,lines:b,verticalMode:e?k.verticalMode:void 0,tableCell:{tableId:k.tableId,rowIndex:T(k.rowIndex),cellIndex:k.cellIndex,left:k.left,top:k.top,width:k.width,height:k.height,anchorPosition:k.anchorPosition,revisionId:null==(a=k.revision)?void 0:a.id}}),d.push(...xg({lines:n.lines,paragraphId:h,paragraphIndex:f,zone:g,footnoteId:x,pageIndex:o.index,lineTopOffset:n.originY,lineLeftOffset:n.originX})),c.push(...IR({lines:n.lines,paragraphId:h,paragraphIndex:f,zone:g,footnoteId:x,pageIndex:o.index,pageLeft:i.left,pageTop:i.top,contentLeft:n.originX,contentTop:n.originY,paragraphTop:n.originY,lineTopOffset:n.originY,lineLeftOffset:n.originX})),u.push(...Mg({lines:n.lines,paragraphId:h,paragraphIndex:f,zone:g,footnoteId:x,pageIndex:o.index,lineTopOffset:n.originY,lineLeftOffset:n.originX,resolveHeight:e=>gg(e,r,o.index)})),p.push(...CR({lines:n.lines,paragraphId:h,paragraphIndex:f,zone:g,footnoteId:x,pageIndex:o.index,pageLeft:i.left,pageTop:i.top,contentLeft:n.originX,contentTop:n.originY,contentWidth:n.width,paragraphTop:n.originY,lineTopOffset:n.originY,lineLeftOffset:n.originX,resolveHeight:e=>gg(e,r,o.index)}))}}}function LR(e){const{surface:t,state:n,documentLayout:a}=e,r=e.zoomFactor&&e.zoomFactor>0?e.zoomFactor:1,o=function(e){return Array.from(e.querySelectorAll('[data-renderer="canvas"][data-page-index]')).sort((e,t)=>Number(e.dataset.pageIndex??"0")-Number(t.dataset.pageIndex??"0"))}(t);if(0===a.pages.length||0===o.length)return null;const i=new Map(o.map(e=>[Number(e.dataset.pageIndex??"-1"),e])),l=vn(n.document),s=new Map(l.map((e,t)=>[e.id,t])),d=t.getBoundingClientRect(),c=[],u=[],p=[],h=[],f=[],g=[],m=[],b=[];for(const y of a.pages){const e=i.get(y.index)??null;if(!e)continue;const t=e.getBoundingClientRect(),a={left:d.left+(t.left-d.left)/r,top:d.top+(t.top-d.top)/r,width:t.width/r,height:t.height/r},o=y.bodyTop??Kt(y.pageSettings),l=y.bodyBottom??Xt(y.pageSettings),v=y.headerTop??Zt(y.pageSettings),w=y.footerTop??y.bodyBottom??Xt(y.pageSettings),x={index:y.index,left:a.left,top:a.top,width:a.width,height:a.height,bodyTop:o,bodyBottom:l,footerTop:w,footnoteTop:y.footnoteTop,footnoteSeparatorTop:y.footnoteSeparatorTop};c.push(x);const M=a.left+y.pageSettings.margins.left+y.pageSettings.margins.gutter,S=Ut(y.pageSettings),A={state:n,page:y,pageRect:a,paragraphIndexById:s,snapshotParagraphs:u,inlineImages:p,floatingImages:h,inlineTextBoxes:f,floatingTextBoxes:g,floatingTables:m,unsupportedRegions:b},I=(e,t,n,r={})=>{var o;let i=n,l=r.contentLeft??M,s=r.contentWidth??S;const d=Gt(y.pageSettings);let c;for(const u of t){if(void 0!==u.columnIndex&&u.columnIndex!==c){c=u.columnIndex;const e=d[u.columnIndex]??d[0];l=a.left+e.left,s=e.width,i=n}const t={zone:e,block:u,blockContentLeft:l,blockContentWidth:s,cursorY:i,startTop:n,blockFootnoteId:(null==(o=r.footnoteIdForBlock)?void 0:o.call(r,u))??r.footnoteId};"paragraph"===u.sourceBlock.type&&u.layout?RR(A,t):"table"===u.sourceBlock.type&&ER(A,t),i+=Math.max(0,u.estimatedHeight)+(r.blockGap??0)}};if(I("header",y.headerBlocks??[],a.top+v),I("main",y.blocks,a.top+o),y.footnoteBlocks&&void 0!==y.footnoteTop){const e=y.footnoteReferenceIds??[];I("footnote",y.footnoteBlocks,a.top+y.footnoteTop,{footnoteIdForBlock:t=>e.find(e=>t.blockId.startsWith(`${e}:`)),contentLeft:M+Zd,contentWidth:Math.max(24,S-Zd),blockGap:2})}I("footer",y.footerBlocks??[],a.top+w)}const v=new Map;for(const y of u){const e=v.get(y.paragraphId)??[];e.push(y),v.set(y.paragraphId,e)}for(const[y,w]of v.entries())w.sort((e,t)=>e.pageIndex!==t.pageIndex?e.pageIndex-t.pageIndex:e.startOffset!==t.startOffset?e.startOffset-t.startOffset:e.top-t.top),v.set(y,w);return{surfaceRect:d,pages:c,paragraphs:u,paragraphsById:v,inlineImages:p,floatingImages:h,inlineTextBoxes:f,floatingTextBoxes:g,floatingTables:m,unsupportedRegions:b}}function VR(e){return Ac(e,2)}function NR(){let e=null;return{getCanvasLayoutSnapshot:t=>{const n=t.zoomFactor&&t.zoomFactor>0?t.zoomFactor:1,a=function(e){const t=e.getBoundingClientRect(),n=Array.from(e.querySelectorAll('[data-renderer="canvas"][data-page-index]')).sort((e,t)=>Number(e.dataset.pageIndex??"0")-Number(t.dataset.pageIndex??"0")),a=["surface",VR(t.left),VR(t.top),VR(t.width),VR(t.height)];for(const r of n){const e=r.getBoundingClientRect();a.push(Number(r.dataset.pageIndex??"0"),VR(e.left),VR(e.top),VR(e.width),VR(e.height))}return a.join(":")}(t.surface);if(e&&e.surface===t.surface&&e.documentLayout===t.documentLayout&&e.zoomFactor===n&&e.domRectSignature===a)return e.snapshot;const r=LR({surface:t.surface,state:t.state,documentLayout:t.documentLayout,zoomFactor:n});return e={surface:t.surface,documentLayout:t.documentLayout,zoomFactor:n,domRectSignature:a,snapshot:r},r},clear:()=>{e=null}}}me(["mousedown","contextmenu","input","keydown"]);var zR=ge("<button>");function PR(e){const[t,n]=_(e,["type","icon","label","active","class","classList"]);return Se(a=zR(),$({get type(){return t.type??"button"},get class(){return`oasis-editor-plugin-floating-action ${t.class??""}`},get classList(){return{"is-active":t.active,...t.classList}},get"aria-label"(){return t.label},get title(){return t.label}},n),!1,!0),Ie(a,K(vr,{get name(){return t.icon}})),a;var a}var OR=ge("<aside>"),qR=ge("<div>");function BR(e){const[t,n]=_(e,["mode","width","class","classList","children","style"]);return Se(a=OR(),$({get class(){return`oasis-editor-plugin-side-panel ${t.class??""}`},get classList(){return{[`oasis-editor-plugin-side-panel-${t.mode??"dock"}`]:!0,...t.classList}},get style(){return{"--oasis-plugin-side-panel-width":"number"==typeof t.width?`${t.width}px`:t.width??"360px",...t.style}}},n),!1,!0),Ie(a,()=>t.children),a;var a}function WR(e){const[t,n]=_(e,["class","children"]);return Se(a=qR(),$({get class(){return`oasis-editor-plugin-side-panel-header ${t.class??""}`}},n),!1,!0),Ie(a,()=>t.children),a;var a}function FR(e){const[t,n]=_(e,["class","children"]);return Se(a=qR(),$({get class(){return`oasis-editor-plugin-side-panel-body ${t.class??""}`}},n),!1,!0),Ie(a,()=>t.children),a;var a}var DR=ge("<button>");function HR(e){const[t,n]=_(e,["type","icon","label","active","variant","size","class","classList"]);return Se(a=DR(),$({get type(){return t.type??"button"},get class(){return`oasis-editor-ui-icon-button ${t.class??""}`},get classList(){return{[`oasis-editor-ui-icon-button-${t.variant??"ghost"}`]:!0,[`oasis-editor-ui-icon-button-${t.size??"md"}`]:!0,"is-active":t.active,...t.classList}},get"aria-label"(){return t.label},get title(){return t.label}},n),!1,!0),Ie(a,K(vr,{get name(){return t.icon}})),a;var a}var UR=ge("<div class=oasis-editor-plugin-floating-actions>"),GR=ge("<div class=oasis-editor-plugin-ui-host><div class=oasis-editor-plugin-ui-main>"),jR=ge("<div class=oasis-editor-plugin-side-panel-overlay>"),ZR=ge("<div class=oasis-editor-plugin-side-panel-title>");const KR={floatingActions:[],sidePanels:[],activeSidePanelId:null};function XR(e){const t=Fe(),n=E(()=>e.children),[a,r]=y(KR);x(()=>{const t=e.editor();r(t.ui.getSnapshot());C(t.ui.onChange(()=>{r(t.ui.getSnapshot())}))});const o=M(()=>a().sidePanels.find(e=>e.id===a().activeSidePanelId)),i=()=>{var e;return(null==(e=o())?void 0:e.mode)??"dock"},l=()=>"dock"===i()?o():void 0,s=()=>a().floatingActions.filter(e=>"container"===(e.scope??"container")),d=()=>a().floatingActions.filter(e=>"viewport"===e.scope),c=(n,a=!1)=>K(ne,{get each(){return function(e){const t=new Map;for(const n of e){const e=n.placement??"bottom-right";t.set(e,[...t.get(e)??[],n])}return Array.from(t.entries()).map(([e,t])=>({placement:e,actions:t}))}(n())},children:n=>{return Ie(r=UR(),K(ne,{get each(){return n.actions},children:n=>K(PR,{get icon(){return n.icon??"sparkles"},get label(){return function(e,t){return e.tooltip?e.tooltip:e.labelKey?t(e.labelKey):e.label??e.id}(n,t)},get disabled(){return!function(e,t){const n=Je(t.command);return e.commands.canExecute(n.name,n.payload)}(e.editor(),n)},get"data-testid"(){return`plugin-floating-action-${n.id}`},onClick:()=>function(e,t){const n=Je(t.command);e.commands.execute(n.name,n.payload)}(e.editor(),n)})})),w(e=>we(r,{[`oasis-editor-plugin-floating-actions-${n.placement}`]:!0,"oasis-editor-plugin-floating-actions-viewport":a},e)),r;var r}});return Ie((u=GR()).firstChild,n),Ie(u,K(re,{get when(){return l()},children:n=>YR(e.editor,n(),t)}),null),Ie(u,K(re,{get when(){return"overlay"===i()?o():void 0},children:n=>{return Ie(a=jR(),()=>YR(e.editor,n(),t)),a;var a}}),null),Ie(u,()=>c(s),null),Ie(u,K(re,{get when(){return d().length>0},get children(){return K(ze,{get children(){return c(d,!0)}})}}),null),w(()=>u.classList.toggle("has-docked-side-panel",!!Boolean(l()))),u;var u}function YR(e,t,n){const a=()=>e().ui.closeSidePanel(t.id);return K(BR,{get mode(){return t.mode??"dock"},get width(){return t.width},get"data-testid"(){return`plugin-side-panel-${t.id}`},get children(){return[K(WR,{get children(){return[(e=ZR(),Ie(e,K(re,{get when(){return t.icon},get children(){return K(xr,{class:"oasis-editor-plugin-side-panel-icon",get children(){return K(vr,{get name(){return t.icon}})}})}}),null),Ie(e,K(xr,{get children(){return pe(()=>!!t.titleKey)()?n(t.titleKey):t.title}}),null),e),K(HR,{icon:"x",label:"Close panel",size:"sm",onClick:a})];var e}}),K(FR,{get children(){return t.render({editor:e(),commands:e().commands,ui:e().ui,panelId:t.id,closePanel:a,getState:()=>e().state,getDocument:()=>e().state.document,getSelection:()=>e().state.selection})}})]}})}var JR=ge("<div class=oasis-editor-main-container><section class=oasis-editor-stage>");function QR(e){let t,n;const a=NR(),r=n=>{var a,r;t=n,null==(r=(a=e.refs).onSurfaceRef)||r.call(a,n)},o=t=>{var a,r;n=t,null==(r=(a=e.refs).onViewportRef)||r.call(a,t)},i=r=>{var o,i;if(!t)return;const l=a.getCanvasLayoutSnapshot({surface:t,state:e.state,documentLayout:e.documentLayout(),zoomFactor:null==(i=(o=e.layout).zoomFactor)?void 0:i.call(o)});if(!l)return;const s=Or(l,r)[0];if(!s)return;const d=n,c=s.top;if(d){const e=d.getBoundingClientRect();return void d.scrollTo({top:d.scrollTop+(c-e.top)-24,behavior:"smooth"})}window.scrollTo({top:window.scrollY+c-24,behavior:"smooth"})};return[K(re,{get when(){return e.showChrome},get children(){return[K(re,{get when(){return"compact"===e.toolbarView},get children(){return K(re,{get when(){return e.showTitleBar},get fallback(){return K(re,{get when(){return e.showMenubar},get children(){return K(kr,{get host(){return e.toolbarHost},get registry(){return e.menuRegistry}})}})},get children(){return K(Lr,{get children(){return K(re,{get when(){return e.showMenubar},get children(){return K(kr,{get host(){return e.toolbarHost},get registry(){return e.menuRegistry}})}})}})}})}}),K(re,{get when(){return e.showToolbar},get children(){return K(_i,{get host(){return e.toolbarHost},get registry(){return e.toolbarRegistry},get showFileGroup(){return!!pe(()=>"ribbon"===e.toolbarView)()||!e.showMenubar},get view(){return e.toolbarView},get layout(){return e.toolbarLayout}})}})]}}),K(XR,{get editor(){return e.runtimeEditor},get children(){var l=JR(),s=l.firstChild;return Ie(l,K(re,{get when(){return pe(()=>!!e.showChrome)()&&e.showOutline},get children(){return K(Hr,{get state(){return e.state},onNavigate:i,surfaceRef:()=>t,viewportRef:()=>n,get documentLayout(){return e.documentLayout},get zoomFactor(){return e.layout.zoomFactor},snapshotProvider:a})}}),s),Ie(s,K(SR,{state:()=>e.state,get layout(){return{...e.layout,documentLayout:e.documentLayout,showHorizontalRuler:e.showChrome,measuredBlockHeights:()=>e.measuredBlockHeights(),measuredParagraphLayouts:()=>e.measuredParagraphLayouts(),viewportHeight:e.viewportHeight(),readOnly:e.isReadOnly}},get overlays(){return{...e.overlays,toolbarHost:e.toolbarHost,persistenceStatus:()=>e.persistenceStatus()}},get refs(){return{...e.refs,onViewportRef:o,onSurfaceRef:r}},get surfaceHandlers(){return e.surfaceHandlers},get inputHandlers(){return e.inputHandlers},get fileHandlers(){return e.fileHandlers}})),l}})]}var $R=ge("<div class=oasis-editor-main-container><section class=oasis-editor-stage style=padding:0>"),_R=ge('<div class=oasis-inline-shell style="border:1px solid var(--oasis-toolbar-border);border-radius:var(--oasis-radius);overflow:hidden;display:flex;flex-direction:column">');function eE(e){return Ie(t=_R(),K(re,{get when(){return pe(()=>!!e.showChrome)()&&e.showToolbar},get children(){return K(_i,{get host(){return e.toolbarHost},get registry(){return e.toolbarRegistry},get view(){return e.toolbarView},get layout(){return e.toolbarLayout}})}}),null),Ie(t,K(XR,{get editor(){return e.runtimeEditor},get children(){var t=$R();return Ie(t.firstChild,K(SR,{state:()=>e.state,get layout(){return{...e.layout,documentLayout:e.documentLayout,measuredBlockHeights:()=>e.measuredBlockHeights(),measuredParagraphLayouts:()=>e.measuredParagraphLayouts(),viewportHeight:e.viewportHeight(),readOnly:e.isReadOnly}},get overlays(){return{...e.overlays,toolbarHost:e.toolbarHost,persistenceStatus:()=>e.persistenceStatus()}},get refs(){return e.refs},get surfaceHandlers(){return e.surfaceHandlers},get inputHandlers(){return e.inputHandlers},get fileHandlers(){return e.fileHandlers}})),t}}),null),t;var t}var tE=ge("<div class=oasis-editor-main-container><section class=oasis-editor-stage style=padding:0>"),nE=ge("<div class=oasis-balloon-shell>");function aE(e){return Ie(t=nE(),K(XR,{get editor(){return e.runtimeEditor},get children(){var t=tE();return Ie(t.firstChild,K(SR,{state:()=>e.state,get layout(){return{...e.layout,documentLayout:e.documentLayout,measuredBlockHeights:()=>e.measuredBlockHeights(),measuredParagraphLayouts:()=>e.measuredParagraphLayouts(),viewportHeight:e.viewportHeight(),readOnly:e.isReadOnly}},get overlays(){return{...e.overlays,toolbarHost:e.toolbarHost,persistenceStatus:()=>e.persistenceStatus()}},get refs(){return e.refs},get surfaceHandlers(){return e.surfaceHandlers},get inputHandlers(){return e.inputHandlers},get fileHandlers(){return e.fileHandlers}})),t}})),t;var t}var rE=ge("<div class=oasis-editor-dialog-footer data-testid=editor-dialog-footer>"),oE=ge("<div class=oasis-editor-dialog-overlay><div role=dialog aria-modal=true data-testid=editor-dialog><div class=oasis-editor-dialog-header><h3 class=oasis-editor-dialog-title></h3><button class=oasis-editor-dialog-close data-testid=editor-dialog-close><i data-lucide=x></i></button></div><div data-testid=editor-dialog-body>");function iE(e){const t=Fe();let n;const a=te(),r=M(()=>e.titleId??a),o=M(()=>e.size??"md"),i=M(()=>["oasis-editor-dialog",`oasis-editor-dialog-${o()}`,e.class].filter(Boolean).join(" ")),l=M(()=>["oasis-editor-dialog-body",e.bodyClass].filter(Boolean).join(" ")),s=t=>{"Escape"===t.key&&e.isOpen&&e.onClose()};return I(()=>{window.addEventListener("keydown",s)}),C(()=>{window.removeEventListener("keydown",s)}),K(re,{get when(){return e.isOpen},get children(){var a=oE(),o=a.firstChild,s=o.firstChild,d=s.firstChild,c=d.nextSibling,u=s.nextSibling;a.$$click=()=>{(e.closeOnOverlayClick??1)&&e.onClose()},o.$$click=e=>e.stopPropagation();return"function"==typeof n?Ae(n,o):n=o,Ie(d,()=>e.title),ye(c,"click",e.onClose,!0),Ie(u,()=>e.children),Ie(o,K(re,{get when(){return e.footer},get children(){var t=rE();return Ie(t,()=>e.footer),t}}),null),w(n=>{var a=i(),s=e.ariaLabel,p=e.ariaLabel?void 0:r(),h=e.ariaDescribedBy,f=r(),g=t("generic.close"),m=l();return a!==n.e&&ve(o,n.e=a),s!==n.t&&be(o,"aria-label",n.t=s),p!==n.a&&be(o,"aria-labelledby",n.a=p),h!==n.o&&be(o,"aria-describedby",n.o=h),f!==n.i&&be(d,"id",n.i=f),g!==n.n&&be(c,"title",n.n=g),m!==n.s&&ve(u,n.s=m),n},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),a}})}me(["click"]);var lE=ge("<div><div class=oasis-editor-tabs-list role=tablist>"),sE=ge("<button type=button role=tab class=oasis-editor-tabs-tab>"),dE=ge("<div role=tabpanel class=oasis-editor-tabs-panel>");function cE(e,t,n){if(e.length)for(let a=0;a<e.length;a+=1){const r=e[(t+a*n+e.length)%e.length];if(r&&!r.disabled)return r}}function uE(e){const t=te(),n=M(()=>e.items),a=M(()=>{var e,t;return(null==(e=n().find(e=>!e.disabled))?void 0:e.id)??(null==(t=n()[0])?void 0:t.id)??""}),[r,o]=y(e.defaultValue??a()),i=M(()=>e.value??r()??a()),l=M(()=>n().find(e=>e.id===i()&&!e.disabled)??n().find(e=>!e.disabled)),s=M(()=>["oasis-editor-tabs",e.class].filter(Boolean).join(" ")),d=[],c=(t,a=!1)=>{var r;t&&!t.disabled&&(void 0===e.value&&o(t.id),null==(r=e.onChange)||r.call(e,t.id),a&&queueMicrotask(()=>{var e;return null==(e=d[n().findIndex(e=>e.id===t.id)])?void 0:e.focus()}))},u=e=>{if("ArrowRight"!==e.key&&"ArrowLeft"!==e.key&&"Home"!==e.key&&"End"!==e.key)return;e.preventDefault();const t=Math.max(0,n().findIndex(e=>{var t;return e.id===(null==(t=l())?void 0:t.id)}));if("Home"===e.key)return c(cE(n(),0,1),!0);if("End"===e.key)return c(cE(n(),n().length-1,-1),!0);const a="ArrowRight"===e.key?1:-1;c(cE(n(),t+a,a),!0)};return p=lE(),(h=p.firstChild).$$keydown=u,Ie(h,K(ne,{get each(){return n()},children:(e,n)=>{const a=`${t}-${e.id}-tab`,r=`${t}-${e.id}-panel`;return(o=sE()).$$click=()=>c(e),Ae(e=>{d[n()]=e},o),be(o,"id",a),be(o,"aria-controls",r),Ie(o,()=>e.label),w(t=>{var n,a,r,i=(null==(n=l())?void 0:n.id)===e.id,s=e.disabled?"true":void 0,d=e.disabled,c=(null==(a=l())?void 0:a.id)===e.id?0:-1,u=!((null==(r=l())?void 0:r.id)!==e.id),p=e.testId;return i!==t.e&&be(o,"aria-selected",t.e=i),s!==t.t&&be(o,"aria-disabled",t.t=s),d!==t.a&&(o.disabled=t.a=d),c!==t.o&&be(o,"tabindex",t.o=c),u!==t.i&&o.classList.toggle("is-active",t.i=u),p!==t.n&&be(o,"data-testid",t.n=p),t},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),o;var o}})),Ie(p,K(ne,{get each(){return n()},children:e=>{return Ie(n=dE(),()=>e.panel),w(a=>{var r,o,i=`${t}-${e.id}-panel`,s=`${t}-${e.id}-tab`,d=(null==(r=l())?void 0:r.id)!==e.id,c=!((null==(o=l())?void 0:o.id)!==e.id);return i!==a.e&&be(n,"id",a.e=i),s!==a.t&&be(n,"aria-labelledby",a.t=s),d!==a.a&&(n.hidden=a.a=d),c!==a.o&&n.classList.toggle("is-active",a.o=c),a},{e:void 0,t:void 0,a:void 0,o:void 0}),n;var n}}),null),w(t=>{var n=s(),a=e.ariaLabel;return n!==t.e&&ve(p,t.e=n),a!==t.t&&be(h,"aria-label",t.t=a),t},{e:void 0,t:void 0}),p;var p,h}me(["keydown","click"]);var pE=ge("<button><span class=oasis-editor-ui-button-label>");function hE(e){const[t,n]=_(e,["type","variant","size","icon","iconPosition","fullWidth","class","classList","children"]),a=()=>t.iconPosition??"start";return r=pE(),o=r.firstChild,Se(r,$({get type(){return t.type??"button"},get class(){return`oasis-editor-ui-button ${t.class??""}`},get classList(){return{[`oasis-editor-ui-button-${t.variant??"secondary"}`]:!0,[`oasis-editor-ui-button-${t.size??"md"}`]:!0,"oasis-editor-ui-button-full":t.fullWidth,...t.classList}}},n),!1,!0),Ie(r,K(re,{get when(){return pe(()=>!!t.icon)()&&"start"===a()},get children(){return K(vr,{get name(){return t.icon}})}}),o),Ie(o,()=>t.children),Ie(r,K(re,{get when(){return pe(()=>!!t.icon)()&&"end"===a()},get children(){return K(vr,{get name(){return t.icon}})}}),null),r;var r,o}function fE(e){const[t,n]=_(e,["tone","as","class"]);return K(xr,$({get as(){return t.as??"span"},get tone(){return pe(()=>"success"===t.tone)()?"default":t.tone??"muted"},size:"sm",get class(){return`oasis-editor-ui-status-text ${t.class??""}`}},n))}var gE=ge("<div>");const mE=["xs","sm","md","lg","xl"];function bE(e){return void 0===e?{}:function(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)&&mE.some(t=>t in e)}(e)?e:{xs:e}}function vE(e){return"number"==typeof e?8*e+"px":e}function yE(e,t,n){const a={},r=bE(t);for(const o of mE){const t=r[o];void 0!==t&&(a[`--${e}-${o}`]=n(t))}return a}function wE(...e){const t=e.filter(e=>"object"==typeof e&&null!==e),n=e.find(e=>"string"==typeof e);if(n&&0===t.length)return n;if(n){const e=Object.assign({},...t),r=(a=e,Object.entries(a).map(([e,t])=>`${e}: ${String(t)}`).join("; "));return r?`${n}; ${r}`:n}var a;return Object.assign({},...t)}var xE=ge("<span class=oasis-editor-ui-stack-divider-item aria-hidden=true>");function ME(e){const[t,n]=_(e,["direction","spacing","divider","useFlexGap","alignItems","justifyContent","component","class","classList","style","children"]),a=E(()=>t.children),r=()=>{return e=a(),Array.isArray(e)?e:null==e||!1===e?[]:[e];var e};return K(Pe,$({get component(){return t.component??"div"},get class(){return`oasis-editor-ui-stack ${t.class??""}`},get classList(){return{"oasis-editor-ui-stack-flex-gap":!1!==t.useFlexGap,"oasis-editor-ui-stack-divider":Boolean(t.divider),...t.classList}},get style(){return wE(yE("oasis-stack-direction",t.direction??"column",String),yE("oasis-stack-spacing",t.spacing??0,vE),yE("oasis-stack-align",t.alignItems,String),yE("oasis-stack-justify",t.justifyContent,String),t.style)}},n,{get children(){return K(ne,{get each(){return r()},children:(e,n)=>[K(re,{get when(){return pe(()=>n()>0)()&&t.divider},get children(){var e=xE();return Ie(e,()=>(e=>"function"==typeof t.divider?t.divider(e):t.divider)(n())),e}}),e]})}}))}function SE(e){const t=mE.indexOf(e);let n="0px";for(let a=0;a<=t;a++)n=`var(--oasis-grid-column-spacing-${mE[a]}, ${n})`;return n}function AE(e){const[t,n]=_(e,["container","size","columns","spacing","rowSpacing","columnSpacing","direction","offset","wrap","alignItems","justifyContent","component","class","classList","style","children"]),a=()=>wE(function(e){const t={},n=bE(e);for(const a of mE){const e=n[a];if(void 0!==e){if("number"==typeof e){const n=`calc(${e} / var(--oasis-grid-columns-current) * 100% - ${SE(a)} * (var(--oasis-grid-columns-current) - ${e}) / var(--oasis-grid-columns-current))`;t[`--oasis-grid-size-basis-${a}`]=n,t[`--oasis-grid-size-grow-${a}`]="0",t[`--oasis-grid-size-max-${a}`]=n;continue}"grow"!==e?(t[`--oasis-grid-size-basis-${a}`]="auto",t[`--oasis-grid-size-grow-${a}`]="0",t[`--oasis-grid-size-max-${a}`]="none"):(t[`--oasis-grid-size-basis-${a}`]="0",t[`--oasis-grid-size-grow-${a}`]="1",t[`--oasis-grid-size-max-${a}`]="100%")}}return t}(t.size),function(e){const t={},n=bE(e);for(const a of mE){const e=n[a];void 0!==e&&(t[`--oasis-grid-offset-${a}`]="auto"===e?"auto":`calc(${e} / var(--oasis-grid-columns-current) * 100%)`)}return t}(t.offset),yE("oasis-grid-columns",t.columns,String),yE("oasis-grid-row-spacing",t.rowSpacing??t.spacing,vE),yE("oasis-grid-column-spacing",t.columnSpacing??t.spacing,vE),yE("oasis-grid-direction",t.direction??"row",String),yE("oasis-grid-wrap",t.wrap??"wrap",String),yE("oasis-grid-align",t.alignItems,String),yE("oasis-grid-justify",t.justifyContent,String),t.style);return K(Pe,$({get component(){return t.component??"div"},get class(){return`oasis-editor-ui-grid ${t.class??""}`},get classList(){return{"oasis-editor-ui-grid-container":t.container,"oasis-editor-ui-grid-item":!0,...t.classList}},get style(){return a()}},n,{get children(){return t.children}}))}var IE=ge("<label>"),CE=ge("<div>");function TE(e){const t=te(),[n,a]=_(e,["label","for","description","error","labelClass","class","classList","children"]);return Se(r=CE(),$({get class(){return`oasis-editor-ui-field ${n.class??""}`},get classList(){return n.classList}},a),!1,!0),Ie(r,K(re,{get when(){return n.label},get children(){var e=IE();return Ie(e,()=>n.label),w(t=>{var a=`oasis-editor-ui-field-label ${n.labelClass??""}`,r=n.for;return a!==t.e&&ve(e,t.e=a),r!==t.t&&be(e,"for",t.t=r),t},{e:void 0,t:void 0}),e}}),null),Ie(r,()=>n.children,null),Ie(r,K(re,{get when(){return n.description},get children(){return K(fE,{get id(){return n.for??`${t}-description`},class:"oasis-editor-ui-field-description",get children(){return n.description}})}}),null),Ie(r,K(re,{get when(){return n.error},get children(){return K(fE,{get id(){return n.for??`${t}-error`},tone:"danger",class:"oasis-editor-ui-field-error",get children(){return n.error}})}}),null),r;var r}var kE=ge("<span>"),RE=ge("<span class=oasis-editor-ui-field-description>"),EE=ge("<span class=oasis-editor-ui-field-error>"),LE=ge("<label><input>");function VE(e){const t=te(),[n,a]=_(e,["label","description","error","labelClass","controlClass","onChange","class","classList","id"]),r=()=>n.id??t,o=()=>`${r()}-description`,i=()=>`${r()}-error`;return l=LE(),s=l.firstChild,Ie(l,K(re,{get when(){return n.label},get children(){var e=kE();return Ie(e,()=>n.label),w(()=>ve(e,`oasis-editor-ui-field-label ${n.labelClass??""}`)),e}}),s),s.$$input=e=>{var t;return null==(t=n.onChange)?void 0:t.call(n,e.currentTarget.value)},Se(s,$({get id(){return r()},get class(){return`oasis-editor-ui-input ${n.controlClass??""}`},get"aria-invalid"(){return n.error?"true":void 0},get"aria-describedby"(){return[n.description?o():null,n.error?i():null].filter(Boolean).join(" ")}},a),!1,!1),Ie(l,K(re,{get when(){return n.description},get children(){var e=RE();return Ie(e,()=>n.description),w(()=>be(e,"id",o())),e}}),null),Ie(l,K(re,{get when(){return n.error},get children(){var e=EE();return Ie(e,()=>n.error),w(()=>be(e,"id",i())),e}}),null),w(e=>{var t=`oasis-editor-ui-field ${n.class??""}`,a=n.classList,o=r();return t!==e.e&&ve(l,e.e=t),e.t=we(l,a,e.t),o!==e.a&&be(l,"for",e.a=o),e},{e:void 0,t:void 0,a:void 0}),l;var l,s}me(["input"]);var NE=ge("<textarea>");function zE(e){const t=te(),[n,a]=_(e,["label","description","error","labelClass","controlClass","onChange","class","id"]),r=()=>n.id??t;return K(TE,{get class(){return n.class},get label(){return n.label},get for(){return r()},get labelClass(){return n.labelClass},get description(){return n.description},get error(){return n.error},get children(){var e=NE();return e.$$input=e=>{var t;return null==(t=n.onChange)?void 0:t.call(n,e.currentTarget.value)},Se(e,$({get id(){return r()},get class(){return`oasis-editor-ui-input oasis-editor-ui-textarea ${n.controlClass??""}`},get"aria-invalid"(){return n.error?"true":void 0},get"aria-describedby"(){return[n.description?`${r()}-description`:null,n.error?`${r()}-error`:null].filter(Boolean).join(" ")||void 0}},a),!1,!1),e}})}function PE(e){const[t,n]=_(e,["controlClass","onChange"]);return K(VE,$({type:"color",get controlClass(){return`oasis-editor-ui-color-input ${t.controlClass??""}`},get onChange(){return t.onChange}},n))}me(["input"]);var OE=ge("<span class=oasis-editor-ui-field-description>"),qE=ge("<span class=oasis-editor-ui-field-error>"),BE=ge("<label><input type=checkbox class=oasis-editor-ui-checkbox-input><span class=oasis-editor-ui-checkbox-copy><span class=oasis-editor-ui-field-label>");function WE(e){const t=te(),[n,a]=_(e,["label","description","error","onChange","class","id"]),r=()=>n.id??t,o=()=>`${r()}-description`,i=()=>`${r()}-error`;return l=BE(),s=l.firstChild,d=s.nextSibling,c=d.firstChild,s.addEventListener("change",e=>{var t;return null==(t=n.onChange)?void 0:t.call(n,e.currentTarget.checked)}),Se(s,$({get id(){return r()},get"aria-invalid"(){return n.error?"true":void 0},get"aria-describedby"(){return[n.description?o():null,n.error?i():null].filter(Boolean).join(" ")}},a),!1,!1),Ie(c,()=>n.label),Ie(d,K(re,{get when(){return n.description},get children(){var e=OE();return Ie(e,()=>n.description),w(()=>be(e,"id",o())),e}}),null),Ie(d,K(re,{get when(){return n.error},get children(){var e=qE();return Ie(e,()=>n.error),w(()=>be(e,"id",i())),e}}),null),w(e=>{var t=`oasis-editor-ui-checkbox ${n.class??""}`,a=r();return t!==e.e&&ve(l,e.e=t),a!==e.t&&be(l,"for",e.t=a),e},{e:void 0,t:void 0}),l;var l,s,d,c}var FE=ge("<span>"),DE=ge("<span class=oasis-editor-ui-field-description>"),HE=ge("<span class=oasis-editor-ui-field-error>"),UE=ge("<label><select>"),GE=ge("<option>");function jE(e){const t=te(),[n,a]=_(e,["label","description","error","labelClass","controlClass","options","onChange","class","classList","id","value"]),r=()=>void 0===n.value||null===n.value?"":String(n.value),o=()=>n.id??t,i=()=>`${o()}-description`,l=()=>`${o()}-error`;return s=UE(),d=s.firstChild,Ie(s,K(re,{get when(){return n.label},get children(){var e=FE();return Ie(e,()=>n.label),w(()=>ve(e,`oasis-editor-ui-field-label ${n.labelClass??""}`)),e}}),d),d.addEventListener("change",e=>{var t;return null==(t=n.onChange)?void 0:t.call(n,e.currentTarget.value)}),Se(d,$({get id(){return o()},get class(){return`oasis-editor-ui-select ${n.controlClass??""}`},get"aria-invalid"(){return n.error?"true":void 0},get"aria-describedby"(){return[n.description?i():null,n.error?l():null].filter(Boolean).join(" ")}},a,{get value(){return r()}}),!1,!0),Ie(d,K(ne,{get each(){return n.options},children:e=>{return Ie(t=GE(),()=>e.label),w(n=>{var a=e.disabled,o=e.value===r();return a!==n.e&&(t.disabled=n.e=a),o!==n.t&&(t.selected=n.t=o),n},{e:void 0,t:void 0}),w(()=>t.value=e.value),t;var t}})),Ie(s,K(re,{get when(){return n.description},get children(){var e=DE();return Ie(e,()=>n.description),w(()=>be(e,"id",i())),e}}),null),Ie(s,K(re,{get when(){return n.error},get children(){var e=HE();return Ie(e,()=>n.error),w(()=>be(e,"id",l())),e}}),null),w(e=>{var t=`oasis-editor-ui-field ${n.class??""}`,a=n.classList,r=o();return t!==e.e&&ve(s,e.e=t),e.t=we(s,a,e.t),r!==e.a&&be(s,"for",e.a=r),e},{e:void 0,t:void 0,a:void 0}),s;var s,d}function ZE(e){const[t,n]=_(e,["onChange"]);return K(VE,$({type:"number",onChange:e=>{var n,a;if(""===e.trim())return void(null==(n=t.onChange)||n.call(t,null));const r=Number(e);null==(a=t.onChange)||a.call(t,Number.isNaN(r)?null:r)}},n))}var KE=ge("<span class=oasis-editor-ui-field-description>"),XE=ge("<label><input type=radio class=oasis-editor-ui-radio-input><span class=oasis-editor-ui-checkbox-copy><span class=oasis-editor-ui-field-label>"),YE=ge("<span class=oasis-editor-ui-field-label>"),JE=ge("<div role=radiogroup>");const QE=k();function $E(e){const t=te(),n=R(QE),[a,r]=_(e,["label","description","value","onChange","class","id","checked","name","disabled"]),o=()=>a.id??t,i=()=>`${o()}-description`;return l=XE(),s=l.firstChild,d=s.nextSibling,c=d.firstChild,s.addEventListener("change",e=>{var t;n&&n.onSelect(a.value),null==(t=a.onChange)||t.call(a,e.currentTarget.checked)}),Se(s,$({get id(){return o()},get name(){return a.name??(null==n?void 0:n.name)},get value(){return a.value},get checked(){return n?n.value()===a.value:Boolean(a.checked)},get disabled(){return Boolean(a.disabled)||!!n&&n.disabled()},get"aria-describedby"(){return pe(()=>!!a.description)()?i():void 0}},r),!1,!1),Ie(c,()=>a.label),Ie(d,K(re,{get when(){return a.description},get children(){var e=KE();return Ie(e,()=>a.description),w(()=>be(e,"id",i())),e}}),null),w(e=>{var t=`oasis-editor-ui-radio ${a.class??""}`,n=o();return t!==e.e&&ve(l,e.e=t),n!==e.t&&be(l,"for",e.t=n),e},{e:void 0,t:void 0}),l;var l,s,d,c}function _E(e){const t=te(),n={name:e.name??t,value:()=>e.value,onSelect:t=>{var n;return null==(n=e.onChange)?void 0:n.call(e,t)},disabled:()=>Boolean(e.disabled)};return K(QE.Provider,{value:n,get children(){var t=JE();return Ie(t,K(re,{get when(){return e.label},get children(){var t=YE();return Ie(t,()=>e.label),t}}),null),Ie(t,K(re,{get when(){return e.options},get fallback(){return e.children},get children(){return K(ne,{get each(){return e.options},children:e=>K($E,{get value(){return e.value},get label(){return e.label},get description(){return e.description},get disabled(){return e.disabled}})})}}),null),w(n=>{var a=`oasis-editor-ui-radio-group ${e.class??""}`,r=e.label;return a!==n.e&&ve(t,n.e=a),r!==n.t&&be(t,"aria-label",n.t=r),n},{e:void 0,t:void 0}),t}})}var eL=ge("<div>");const tL={start:"flex-start",center:"center",end:"flex-end",stretch:"stretch"};var nL=ge("<legend>"),aL=ge("<fieldset>");function rL(e){const[t,n]=_(e,["legend","legendClass","class","children"]);return Se(a=aL(),$({get class(){return`oasis-editor-ui-field-group ${t.class??""}`}},n),!1,!0),Ie(a,K(re,{get when(){return t.legend},get children(){var e=nL();return Ie(e,()=>t.legend),w(()=>ve(e,`oasis-editor-ui-field-group-legend ${t.legendClass??""}`)),e}}),null),Ie(a,()=>t.children,null),a;var a}var oL=ge("<label><input type=checkbox class=oasis-editor-ui-toggle-chip-input><span class=oasis-editor-ui-toggle-chip-label>");function iL(e){const[t,n]=_(e,["label","labelStyle","onChange","class","checked"]);return a=oL(),r=a.firstChild,o=r.nextSibling,r.addEventListener("change",e=>{var n;return null==(n=t.onChange)?void 0:n.call(t,e.currentTarget.checked)}),Se(r,$({get checked(){return t.checked}},n),!1,!1),Ie(o,()=>t.label),w(e=>{var n=`oasis-editor-ui-toggle-chip ${t.class??""}`,r=!!Boolean(t.checked),i=t.labelStyle;return n!==e.e&&ve(a,e.e=n),r!==e.t&&a.classList.toggle("is-active",e.t=r),e.a=xe(o,i,e.a),e},{e:void 0,t:void 0,a:void 0}),a;var a,r,o}var lL=ge("<div>");const sL=Number.MAX_SAFE_INTEGER;class dL{constructor(){n(this,"entries",[]),n(this,"listeners",new Set)}register(e){const t=this.entries.findIndex(t=>t.id===e.id);t>=0?this.entries[t]=e:this.entries.push(e),this.sortByOrder(),this.emit()}insertBefore(e,t){this.spliceRelative(e,t,0)}insertAfter(e,t){this.spliceRelative(e,t,1)}replace(e,t){const n=this.entries.findIndex(t=>t.id===e);n<0?this.register(t):(this.entries[n]=t,this.emit())}remove(e){const t=this.entries.filter(t=>t.id!==e);t.length!==this.entries.length&&(this.entries=t,this.emit())}move(e,t){const n=this.entries.findIndex(t=>t.id===e);if(n<0)return;const[a]=this.entries.splice(n,1),r=this.resolveMoveIndex(t);if(null===r)return void this.entries.splice(n,0,a);const o=Math.max(0,Math.min(r,this.entries.length));this.entries.splice(o,0,a),this.emit()}get(e){return this.entries.find(t=>t.id===e)}getOrdered(){return[...this.entries]}getItems(){return this.getOrdered()}clear(){0!==this.entries.length&&(this.entries=[],this.emit())}onChange(e){return this.listeners.add(e),()=>this.listeners.delete(e)}spliceRelative(e,t,n){this.entries=this.entries.filter(e=>e.id!==t.id);const a=this.entries.findIndex(t=>t.id===e);a<0?this.entries.push(t):this.entries.splice(a+n,0,t),this.emit()}resolveMoveIndex(e){if("number"==typeof e)return e;if("before"in e){const t=this.entries.findIndex(t=>t.id===e.before);return t>=0?t:null}const t=this.entries.findIndex(t=>t.id===e.after);return t>=0?t+1:null}sortByOrder(){this.entries=this.entries.map((e,t)=>({item:e,index:t})).sort((e,t)=>(e.item.order??sL)-(t.item.order??sL)||e.index-t.index).map(e=>e.item)}emit(){for(const e of this.listeners)e()}}function cL(){return new dL}class uL{constructor(){n(this,"items",[])}register(e){const t=this.items.findIndex(t=>t.id===e.id);t>=0?this.items[t]=e:this.items.push(e),this.items.sort((e,t)=>(e.order??Number.MAX_SAFE_INTEGER)-(t.order??Number.MAX_SAFE_INTEGER))}unregister(e){this.items=this.items.filter(t=>t.id!==e)}getItems(){return[...this.items]}}const pL=[{value:"single",labelKey:"underline.style.single",preview:{borderStyle:"solid"}},{value:"double",labelKey:"underline.style.double",preview:{borderStyle:"double",borderBottomWidth:"3px"}},{value:"thick",labelKey:"underline.style.thick",preview:{borderStyle:"solid",borderBottomWidth:"3px"}},{value:"dotted",labelKey:"underline.style.dotted",preview:{borderStyle:"dotted"}},{value:"dottedHeavy",labelKey:"underline.style.dottedHeavy",preview:{borderStyle:"dotted",borderBottomWidth:"3px"}},{value:"dash",labelKey:"underline.style.dashed",preview:{borderStyle:"dashed"}},{value:"dashedHeavy",labelKey:"underline.style.dashedHeavy",preview:{borderStyle:"dashed",borderBottomWidth:"3px"}},{value:"dashLong",labelKey:"underline.style.longDashes",preview:{borderStyle:"dashed"}},{value:"dashLongHeavy",labelKey:"underline.style.longDashesHeavy",preview:{borderStyle:"dashed",borderBottomWidth:"3px"}},{value:"dotDash",labelKey:"underline.style.dotDash",preview:{borderStyle:"dashed"}},{value:"dashDotHeavy",labelKey:"underline.style.dotDashHeavy",preview:{borderStyle:"dashed",borderBottomWidth:"3px"}},{value:"dotDotDash",labelKey:"underline.style.dotDotDash",preview:{borderStyle:"dashed"}},{value:"dashDotDotHeavy",labelKey:"underline.style.dotDotDashHeavy",preview:{borderStyle:"dashed",borderBottomWidth:"3px"}},{value:"wave",labelKey:"underline.style.wave",preview:{borderStyle:"wavy",svg:'<svg width="100%" height="6" viewBox="0 0 60 6" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 3 Q 5 0 10 3 T 20 3 T 30 3 T 40 3 T 50 3 T 60 3" fill="none" stroke="currentColor" stroke-width="1"/></svg>'}},{value:"wavyHeavy",labelKey:"underline.style.waveHeavy",preview:{borderStyle:"wavy",svg:'<svg width="100%" height="6" viewBox="0 0 60 6" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 3 Q 5 0 10 3 T 20 3 T 30 3 T 40 3 T 50 3 T 60 3" fill="none" stroke="currentColor" stroke-width="2"/></svg>'}},{value:"wavyDouble",labelKey:"underline.style.waveDouble",preview:{borderStyle:"wavy",svg:'<svg width="100%" height="9" viewBox="0 0 60 9" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 2 Q 5 -1 10 2 T 20 2 T 30 2 T 40 2 T 50 2 T 60 2" fill="none" stroke="currentColor" stroke-width="1"/><path d="M0 7 Q 5 4 10 7 T 20 7 T 30 7 T 40 7 T 50 7 T 60 7" fill="none" stroke="currentColor" stroke-width="1"/></svg>'}}];var hL=ge("<button type=button class=oasis-editor-color-menu-action data-testid=editor-toolbar-underline-remove role=menuitem><span class=oasis-editor-color-menu-action-swatch><i data-lucide=slash></i></span><span>"),fL=ge("<div class=oasis-editor-underline-menu-list>"),gL=ge('<span class="oasis-editor-color-split-icon oasis-editor-underline-split-icon"><span class=oasis-editor-underline-split-glyph aria-hidden=true>U</span><span class=oasis-editor-underline-split-indicator>'),mL=ge('<span class="oasis-editor-underline-menu-stroke oasis-editor-underline-menu-stroke-svg">'),bL=ge("<button type=button class=oasis-editor-underline-menu-item role=menuitemradio><span class=oasis-editor-underline-menu-preview></span><span class=oasis-editor-underline-menu-label>"),vL=ge("<span class=oasis-editor-underline-menu-stroke>");const yL=/Mac/i.test(navigator.userAgent)?"⌘":"Ctrl",wL="editor-toolbar-underline";function xL(e){const t=Fe(),n=`${t("toolbar.underline")} (${yL}+U)`,a=e.api,[r,o]=y("single"),[i,l]=y(!1),s=()=>a.commands.state("underline").isActive,d=()=>String(a.commands.state("setUnderlineStyle").value??"");return K(vo,{get open(){return i()},onOpenChange:l,tooltip:n,get rootActive(){return i()||s()},mainTestId:wL,get mainPressed(){return s()},onMain:()=>{if(!s()){const e=r();"single"===e||d()||a.commands.execute("setUnderlineStyle",e)}a.commands.execute("underline")},menuTestId:`${wL}-dropdown`,panelClass:"oasis-editor-color-menu oasis-editor-underline-menu",panelRole:"menu",get mainContent(){return e=gL(),t=e.firstChild.nextSibling,w(()=>be(t,"data-style",(d()||r()||"single").toLowerCase())),e;var e,t},get children(){return[(n=hL(),r=n.firstChild.nextSibling,n.$$click=()=>{s()&&a.commands.execute("underline"),a.commands.execute("setUnderlineStyle",null),l(!1)},Ie(r,()=>t("toolbar.underlineRemove")),n),(e=fL(),Ie(e,K(ne,{each:pL,children:e=>{const n=()=>s()&&(d()||(s()?"single":"")).toLowerCase()===e.value.toLowerCase();return r=bL(),i=r.firstChild,c=i.nextSibling,r.$$click=()=>{(e=>{o(e);const t=s();a.commands.execute("setUnderlineStyle","single"===e?null:e),t||a.commands.execute("underline")})(e.value),l(!1)},Ie(i,K(re,{get when(){return e.preview.svg},get fallback(){return t=vL(),w(n=>xe(t,"wavy"===e.preview.borderStyle?void 0:{"border-bottom-style":e.preview.borderStyle,"border-bottom-width":e.preview.borderBottomWidth??"1px"},n)),t;var t},get children(){var t=mL();return w(()=>t.innerHTML=e.preview.svg),t}})),Ie(c,()=>t(e.labelKey)),w(a=>{var o=!!n(),i=n(),l=`${wL}-style-${e.value}`,s=t(e.labelKey);return o!==a.e&&r.classList.toggle("oasis-editor-underline-menu-item-active",a.e=o),i!==a.t&&be(r,"aria-checked",a.t=i),l!==a.a&&be(r,"data-testid",a.a=l),s!==a.o&&be(r,"title",a.o=s),a},{e:void 0,t:void 0,a:void 0,o:void 0}),r;var r,i,c}})),e)];var e,n,r}})}me(["click"]);var ML=ge("<option value=decimal>"),SL=ge("<option value=lowerLetter>"),AL=ge("<option value=upperLetter>"),IL=ge("<option value=lowerRoman>"),CL=ge("<option value=upperRoman>"),TL=ge("<option value=bullet>"),kL=ge("<div class=oasis-editor-toolbar-list-options><label class=oasis-editor-toolbar-field><span></span></label><label class=oasis-editor-toolbar-field><span></span><input type=number class=oasis-editor-tool-number data-testid=editor-toolbar-list-start-at min=1 step=1 placeholder=1>");function RL(e){if(""===e.trim())return null;const t=Number(e);return Number.isFinite(t)?t:null}var EL=ge("<div class=oasis-editor-dialog-preview data-testid=editor-line-spacing-dialog-preview><br>");function LL(e){const t=Fe(),[n,a]=y(null),[r,o]=y(null),[i,l]=y(null);x(()=>{e.isOpen&&(a(RL(e.initial.lineHeight??"")),o(RL(e.initial.spacingBefore??"")),l(RL(e.initial.spacingAfter??"")))});const s=M(()=>{const e=n();return{"line-height":null!==e&&e>0?String(e):void 0}}),d=()=>{e.onApply({lineHeight:n(),spacingBefore:r(),spacingAfter:i()},e.initial),e.onClose()};return K(iE,{get isOpen(){return e.isOpen},get title(){return t("lineSpacing.title")},get onClose(){return e.onClose},get footer(){return[K(hE,{variant:"secondary",get onClick(){return e.onClose},"data-testid":"editor-line-spacing-dialog-cancel",get children(){return t("generic.cancel")}}),K(hE,{variant:"primary",onClick:d,"data-testid":"editor-line-spacing-dialog-apply",get children(){return t("generic.apply")}})]},get children(){return[K(AE,{container:!0,spacing:1.5,get children(){return K(AE,{size:{xs:12,md:6},get children(){return K(ZE,{get label(){return t("lineSpacing.lineSpacingLabel")},min:"0.5",step:"0.05",get value(){return n()??""},onChange:a,"data-testid":"editor-line-spacing-dialog-line-height"})}})}}),K(AE,{container:!0,spacing:1.5,get children(){return[K(AE,{size:{xs:12,md:6},get children(){return K(ZE,{get label(){return t("lineSpacing.spacingBeforeLabel")},min:"0",step:"1",get value(){return r()??""},onChange:o,"data-testid":"editor-line-spacing-dialog-spacing-before"})}}),K(AE,{size:{xs:12,md:6},get children(){return K(ZE,{get label(){return t("lineSpacing.spacingAfterLabel")},min:"0",step:"1",get value(){return i()??""},onChange:l,"data-testid":"editor-line-spacing-dialog-spacing-after"})}})]}}),K(TE,{get label(){return t("lineSpacing.preview")},get children(){var e=EL(),n=e.firstChild;return Ie(e,()=>t("lineSpacing.previewText"),n),Ie(e,()=>t("lineSpacing.previewText"),null),w(t=>xe(e,s(),t)),e}})]}})}var VL=ge("<div class=oasis-editor-line-spacing-menu-separator role=separator>"),NL=ge('<button type=button class="oasis-editor-line-spacing-item oasis-editor-line-spacing-item-more"role=menuitem data-testid=editor-toolbar-line-spacing-options><span class=oasis-editor-line-spacing-item-check aria-hidden=true></span><span class=oasis-editor-line-spacing-item-label>'),zL=ge("<button type=button class=oasis-editor-line-spacing-item role=menuitemradio><span class=oasis-editor-line-spacing-item-check aria-hidden=true></span><span class=oasis-editor-line-spacing-item-label>");const PL=[1,1.15,1.5,2,2.5,3];function OL(e){return null==e?"":String(e)}function qL(e){const t=Fe(),n=e.api,[a,r]=y(!1),[o,i]=y({lineHeight:"",spacingBefore:"",spacingAfter:""}),l=M(()=>{const e=OL(n.commands.state("setLineHeight").value);if(""===e)return null;const t=Number(e);return Number.isFinite(t)?t:null}),s=()=>{i({lineHeight:OL(n.commands.state("setLineHeight").value),spacingBefore:OL(n.commands.state("setSpacingBefore").value),spacingAfter:OL(n.commands.state("setSpacingAfter").value)}),r(!0)},d=(e,t)=>{const a=t.lineHeight?Number(t.lineHeight):null,r=t.spacingBefore?Number(t.spacingBefore):null,o=t.spacingAfter?Number(t.spacingAfter):null;e.lineHeight!==a&&n.commands.execute("setLineHeight",e.lineHeight),e.spacingBefore!==r&&n.commands.execute("setSpacingBefore",e.spacingBefore),e.spacingAfter!==o&&n.commands.execute("setSpacingAfter",e.spacingAfter),n.focusEditor()};return[K(co,{icon:"lineSpacing",testId:"editor-toolbar-line-spacing",get tooltip(){return t("metric.lineSpacing")},panelClass:"oasis-editor-line-spacing-menu",get children(){return[K(ne,{each:PL,children:e=>{const a=function(e){return e.toFixed(e===Math.floor(e)?1:2)}(e),r=()=>{const t=l();return null!==t&&(n=t,a=e,Math.abs(n-a)<.001);var n,a};return o=zL(),i=o.firstChild,s=i.nextSibling,o.$$click=()=>(e=>{n.commands.execute("setLineHeight",e),n.focusEditor()})(e),Ie(i,K(re,{get when(){return r()},get children(){return K(mr,{size:14})}})),Ie(s,a),w(e=>{var n=!!r(),i=r(),l=`editor-toolbar-line-spacing-${a.replace(".","_")}`,s=t("metric.lineSpacingOption",[a]);return n!==e.e&&o.classList.toggle("oasis-editor-line-spacing-item-active",e.e=n),i!==e.t&&be(o,"aria-checked",e.t=i),l!==e.a&&be(o,"data-testid",e.a=l),s!==e.o&&be(o,"title",e.o=s),e},{e:void 0,t:void 0,a:void 0,o:void 0}),o;var o,i,s}}),VL(),(e=NL(),a=e.firstChild.nextSibling,e.$$click=s,Ie(a,()=>t("metric.lineSpacingOptions")),e)];var e,a}}),K(re,{get when(){return a()},get children(){return K(ze,{get children(){return K(LL,{get isOpen(){return a()},get initial(){return o()},onClose:()=>r(!1),onApply:d})}})}})]}me(["click"]);var BL=ge('<div class="oasis-editor-toolbar-panel-section oasis-editor-toolbar-panel-actions">'),WL=ge("<div class=oasis-editor-toolbar-panel-grid>");const FL=(e,t)=>{const n=e.commands.state(t).value;return null==n?"":String(n)};var DL=ge('<div class="oasis-editor-toolbar-panel-section oasis-editor-section-panel-section">');function HL(e){return Math.round(e*pt)}function UL(e){return Ac(e/pt,2)}const GL=[{id:"normal",labelKey:"section.marginPreset.normal",top:2.5,bottom:2.5,left:3,right:3},{id:"narrow",labelKey:"section.marginPreset.narrow",top:1.27,bottom:1.27,left:1.27,right:1.27},{id:"moderate",labelKey:"section.marginPreset.moderate",top:2.54,bottom:2.54,left:1.91,right:1.91},{id:"wide",labelKey:"section.marginPreset.wide",top:2.54,bottom:2.54,left:5.08,right:5.08},{id:"mirrored",labelKey:"section.marginPreset.mirrored",top:2.54,bottom:2.54,left:3.18,right:2.54}];function jL(e){return{top:HL(e.top),bottom:HL(e.bottom),left:HL(e.left),right:HL(e.right)}}var ZL=ge("<div class=oasis-editor-margins-list>"),KL=ge("<div class=oasis-editor-margins-custom-form>"),XL=ge("<div class=oasis-editor-toolbar-list-options><button type=button class=oasis-editor-margins-custom-toggle data-testid=editor-toolbar-margins-custom><i data-lucide=sliders-horizontal></i><span>"),YL=ge("<div class=oasis-editor-margins-custom-actions><button type=button class=oasis-editor-margins-custom-apply data-testid=editor-toolbar-margins-custom-apply>"),JL=ge("<button type=button class=oasis-editor-margins-item><span class=oasis-editor-margins-item-name></span><span class=oasis-editor-margins-item-values><br>"),QL=ge("<label class=oasis-editor-margins-custom-field><span></span><input type=number min=0 step=0.1>");const $L=[{key:"top",labelKey:"section.marginField.top"},{key:"bottom",labelKey:"section.marginField.bottom"},{key:"left",labelKey:"section.marginField.left"},{key:"right",labelKey:"section.marginField.right"}];function _L(e){const t=Fe(),n=e=>t("section.marginValue",[String(e).replace(".",t("number.decimalSeparator"))]),a=e.api,[r,o]=y(!1),[i,l]=y({}),s=M(()=>a.commands.state("setPageMargins").value),d=M(()=>{var e;const t=s();if(t)return null==(e=GL.find(e=>function(e,t){const n=jL(t);return Math.abs(e.top-n.top)<=1&&Math.abs(e.bottom-n.bottom)<=1&&Math.abs(e.left-n.left)<=1&&Math.abs(e.right-n.right)<=1}(t,e)))?void 0:e.id}),c=()=>{const e=s();l({top:e?String(UL(e.top)):"",bottom:e?String(UL(e.bottom)):"",left:e?String(UL(e.left)):"",right:e?String(UL(e.right)):""}),o(e=>!e)},u=()=>{const e=i(),t={};for(const{key:n}of $L){const a=e[n];if(null==a||""===a)continue;const r=Number(a.replace(",","."));Number.isFinite(r)&&r>=0&&(t[n]=HL(r))}Object.keys(t).length>0&&a.commands.execute("setPageMargins",t),a.focusEditor()};return K(co,{icon:"square-dashed",get label(){return t("section.margins")},testId:"editor-toolbar-margins-dropdown",get tooltip(){return t("section.margins")},panelClass:"oasis-editor-toolbar-panel oasis-editor-margins-panel",keepMounted:!0,get children(){return[(p=ZL(),Ie(p,K(ne,{each:GL,children:e=>{return r=JL(),o=r.firstChild,i=o.nextSibling,l=i.firstChild,r.$$click=()=>(e=>{a.commands.execute("setPageMargins",jL(e)),a.focusEditor()})(e),Ie(o,()=>t(e.labelKey)),Ie(i,()=>`${t("section.marginField.top")} ${n(e.top)} ${t("section.marginField.bottom")} ${n(e.bottom)}`,l),Ie(i,()=>`${t("section.marginField.left")} ${n(e.left)} ${t("section.marginField.right")} ${n(e.right)}`,null),w(t=>{var n=!(d()!==e.id),a=e.id,o=`editor-toolbar-margins-${e.id}`;return n!==t.e&&r.classList.toggle("oasis-editor-margins-item-active",t.e=n),a!==t.t&&be(r,"data-margin-preset",t.t=a),o!==t.a&&be(r,"data-testid",t.a=o),t},{e:void 0,t:void 0,a:void 0}),r;var r,o,i,l}})),p),(e=XL(),o=e.firstChild,s=o.firstChild.nextSibling,o.$$click=c,Ie(s,()=>t("section.marginPreset.custom")),Ie(e,K(re,{get when(){return r()},get children(){var e=KL();return Ie(e,K(ne,{each:$L,children:e=>{return n=QL(),a=n.firstChild,r=a.nextSibling,Ie(a,()=>t(e.labelKey)),r.$$input=t=>l(n=>({...n,[e.key]:t.currentTarget.value})),w(()=>r.value=i()[e.key]??""),n;var n,a,r}})),e}}),null),e),K(re,{get when(){return r()},get children(){var e=YL(),n=e.firstChild;return n.$$click=u,Ie(n,()=>t("section.marginApply")),e}})];var e,o,s,p}})}me(["click","input"]);const eV=[{headerKey:"toolbar.shapes.lines",presets:["line","lineInv","straightConnector1","bentConnector3","curvedConnector3"]},{headerKey:"toolbar.shapes.rectangles",presets:["rect","roundRect","snip1Rect","snip2SameRect","snip2DiagRect","snipRoundRect","round1Rect","round2SameRect","round2DiagRect","plaque"]},{headerKey:"toolbar.shapes.basicShapes",presets:["ellipse","triangle","rtTriangle","parallelogram","trapezoid","diamond","pentagon","hexagon","heptagon","octagon","decagon","dodecagon","pie","chord","teardrop","frame","halfFrame","corner","diagStripe","plus","bevel","arc","leftBracket","rightBracket","leftBrace","rightBrace","cube","can","lightningBolt","heart","sun","moon","cloud","smileyFace","noSmoking","blockArc","foldedCorner","donut"]},{headerKey:"toolbar.shapes.blockArrows",presets:["rightArrow","leftArrow","upArrow","downArrow","leftRightArrow","upDownArrow","quadArrow","leftRightUpArrow","bentArrow","uturnArrow","leftUpArrow","bentUpArrow","curvedRightArrow","curvedLeftArrow","curvedUpArrow","curvedDownArrow","stripedRightArrow","notchedRightArrow","homePlate","chevron","rightArrowCallout","downArrowCallout","upArrowCallout","leftArrowCallout","leftRightArrowCallout","quadArrowCallout","circularArrow"]},{headerKey:"toolbar.shapes.equation",presets:["mathPlus","mathMinus","mathMultiply","mathDivide","mathEqual","mathNotEqual"]},{headerKey:"toolbar.shapes.flowchart",presets:["flowChartProcess","flowChartAlternateProcess","flowChartDecision","flowChartInputOutput","flowChartPredefinedProcess","flowChartInternalStorage","flowChartDocument","flowChartMultidocument","flowChartTerminator","flowChartPreparation","flowChartManualInput","flowChartManualOperation","flowChartConnector","flowChartOffpageConnector","flowChartPunchedCard","flowChartPunchedTape","flowChartSummingJunction","flowChartOr","flowChartCollate","flowChartSort","flowChartExtract","flowChartMerge","flowChartOnlineStorage","flowChartMagneticDisk","flowChartMagneticDrum","flowChartMagneticTape","flowChartDisplay","flowChartDelay"]},{headerKey:"toolbar.shapes.starsAndBanners",presets:["star4","star5","star6","star7","star8","star10","star12","star16","star24","star32","irregularSeal1","irregularSeal2","ribbon","ribbon2","ellipseRibbon","ellipseRibbon2","verticalScroll","horizontalScroll","wave","doubleWave"]},{headerKey:"toolbar.shapes.callouts",presets:["wedgeRectCallout","wedgeRoundRectCallout","wedgeEllipseCallout","cloudCallout","borderCallout1","borderCallout2","borderCallout3","accentCallout1","accentCallout2","accentCallout3","callout1","callout2","callout3","accentBorderCallout1","accentBorderCallout2","accentBorderCallout3"]}],tV=new Set(["line","lineInv","straightConnector1","bentConnector2","bentConnector3","bentConnector4","bentConnector5","curvedConnector2","curvedConnector3","curvedConnector4","curvedConnector5","arc"]),nV={line:{"pt-BR":"Linha",en:"Line"},lineInv:{"pt-BR":"Linha (invertida)",en:"Line (inverse)"},straightConnector1:{"pt-BR":"Conector reto",en:"Straight connector"},bentConnector3:{"pt-BR":"Conector em cotovelo",en:"Elbow connector"},curvedConnector3:{"pt-BR":"Conector curvo",en:"Curved connector"},rect:{"pt-BR":"Retângulo",en:"Rectangle"},roundRect:{"pt-BR":"Retângulo arredondado",en:"Rounded rectangle"},snip1Rect:{"pt-BR":"Retângulo de canto recortado",en:"Snip single corner rectangle"},snip2SameRect:{"pt-BR":"Retângulo de cantos recortados (mesmo lado)",en:"Snip same side corner rectangle"},snip2DiagRect:{"pt-BR":"Retângulo de cantos recortados (diagonal)",en:"Snip diagonal corner rectangle"},snipRoundRect:{"pt-BR":"Retângulo recortado e arredondado",en:"Snip and round single corner rectangle"},round1Rect:{"pt-BR":"Retângulo de canto arredondado",en:"Round single corner rectangle"},round2SameRect:{"pt-BR":"Retângulo de cantos arredondados (mesmo lado)",en:"Round same side corner rectangle"},round2DiagRect:{"pt-BR":"Retângulo de cantos arredondados (diagonal)",en:"Round diagonal corner rectangle"},plaque:{"pt-BR":"Placa",en:"Plaque"},ellipse:{"pt-BR":"Elipse",en:"Oval"},triangle:{"pt-BR":"Triângulo isósceles",en:"Isosceles triangle"},rtTriangle:{"pt-BR":"Triângulo retângulo",en:"Right triangle"},parallelogram:{"pt-BR":"Paralelogramo",en:"Parallelogram"},trapezoid:{"pt-BR":"Trapézio",en:"Trapezoid"},diamond:{"pt-BR":"Losango",en:"Diamond"},pentagon:{"pt-BR":"Pentágono",en:"Pentagon"},hexagon:{"pt-BR":"Hexágono",en:"Hexagon"},heptagon:{"pt-BR":"Heptágono",en:"Heptagon"},octagon:{"pt-BR":"Octógono",en:"Octagon"},decagon:{"pt-BR":"Decágono",en:"Decagon"},dodecagon:{"pt-BR":"Dodecágono",en:"Dodecagon"},pie:{"pt-BR":"Gráfico de pizza",en:"Pie"},chord:{"pt-BR":"Corda",en:"Chord"},teardrop:{"pt-BR":"Lágrima",en:"Teardrop"},frame:{"pt-BR":"Moldura",en:"Frame"},halfFrame:{"pt-BR":"Meia moldura",en:"Half frame"},corner:{"pt-BR":"Canto",en:"Corner"},diagStripe:{"pt-BR":"Faixa diagonal",en:"Diagonal stripe"},plus:{"pt-BR":"Mais",en:"Plus"},bevel:{"pt-BR":"Bisel",en:"Bevel"},arc:{"pt-BR":"Arco",en:"Arc"},leftBracket:{"pt-BR":"Colchete esquerdo",en:"Left bracket"},rightBracket:{"pt-BR":"Colchete direito",en:"Right bracket"},leftBrace:{"pt-BR":"Chave esquerda",en:"Left brace"},rightBrace:{"pt-BR":"Chave direita",en:"Right brace"},cube:{"pt-BR":"Cubo",en:"Cube"},can:{"pt-BR":"Cilindro",en:"Can"},lightningBolt:{"pt-BR":"Raio",en:"Lightning bolt"},heart:{"pt-BR":"Coração",en:"Heart"},sun:{"pt-BR":"Sol",en:"Sun"},moon:{"pt-BR":"Lua",en:"Moon"},cloud:{"pt-BR":"Nuvem",en:"Cloud"},smileyFace:{"pt-BR":"Rosto sorridente",en:"Smiley face"},noSmoking:{"pt-BR":"Proibido",en:'"No" symbol'},blockArc:{"pt-BR":"Arco em bloco",en:"Block arc"},foldedCorner:{"pt-BR":"Canto dobrado",en:"Folded corner"},donut:{"pt-BR":"Anel",en:"Donut"},rightArrow:{"pt-BR":"Seta para a direita",en:"Right arrow"},leftArrow:{"pt-BR":"Seta para a esquerda",en:"Left arrow"},upArrow:{"pt-BR":"Seta para cima",en:"Up arrow"},downArrow:{"pt-BR":"Seta para baixo",en:"Down arrow"},leftRightArrow:{"pt-BR":"Seta dupla horizontal",en:"Left-right arrow"},upDownArrow:{"pt-BR":"Seta dupla vertical",en:"Up-down arrow"},quadArrow:{"pt-BR":"Seta quádrupla",en:"Quad arrow"},leftRightUpArrow:{"pt-BR":"Seta esquerda-direita-cima",en:"Left-right-up arrow"},bentArrow:{"pt-BR":"Seta dobrada",en:"Bent arrow"},uturnArrow:{"pt-BR":"Seta em U",en:"U-turn arrow"},leftUpArrow:{"pt-BR":"Seta esquerda-cima",en:"Left-up arrow"},bentUpArrow:{"pt-BR":"Seta dobrada para cima",en:"Bent-up arrow"},curvedRightArrow:{"pt-BR":"Seta curva para a direita",en:"Curved right arrow"},curvedLeftArrow:{"pt-BR":"Seta curva para a esquerda",en:"Curved left arrow"},curvedUpArrow:{"pt-BR":"Seta curva para cima",en:"Curved up arrow"},curvedDownArrow:{"pt-BR":"Seta curva para baixo",en:"Curved down arrow"},stripedRightArrow:{"pt-BR":"Seta listrada para a direita",en:"Striped right arrow"},notchedRightArrow:{"pt-BR":"Seta entalhada para a direita",en:"Notched right arrow"},homePlate:{"pt-BR":"Pentágono (seta)",en:"Pentagon"},chevron:{"pt-BR":"Divisa",en:"Chevron"},rightArrowCallout:{"pt-BR":"Texto explicativo de seta à direita",en:"Right arrow callout"},downArrowCallout:{"pt-BR":"Texto explicativo de seta abaixo",en:"Down arrow callout"},upArrowCallout:{"pt-BR":"Texto explicativo de seta acima",en:"Up arrow callout"},leftArrowCallout:{"pt-BR":"Texto explicativo de seta à esquerda",en:"Left arrow callout"},leftRightArrowCallout:{"pt-BR":"Texto explicativo de seta horizontal",en:"Left-right arrow callout"},quadArrowCallout:{"pt-BR":"Texto explicativo de seta quádrupla",en:"Quad arrow callout"},circularArrow:{"pt-BR":"Seta circular",en:"Circular arrow"},mathPlus:{"pt-BR":"Mais",en:"Plus"},mathMinus:{"pt-BR":"Menos",en:"Minus"},mathMultiply:{"pt-BR":"Multiplicação",en:"Multiply"},mathDivide:{"pt-BR":"Divisão",en:"Divide"},mathEqual:{"pt-BR":"Igual",en:"Equal"},mathNotEqual:{"pt-BR":"Diferente",en:"Not equal"},flowChartProcess:{"pt-BR":"Processo",en:"Process"},flowChartAlternateProcess:{"pt-BR":"Processo alternativo",en:"Alternate process"},flowChartDecision:{"pt-BR":"Decisão",en:"Decision"},flowChartInputOutput:{"pt-BR":"Dados",en:"Data"},flowChartPredefinedProcess:{"pt-BR":"Processo predefinido",en:"Predefined process"},flowChartInternalStorage:{"pt-BR":"Armazenamento interno",en:"Internal storage"},flowChartDocument:{"pt-BR":"Documento",en:"Document"},flowChartMultidocument:{"pt-BR":"Multidocumento",en:"Multidocument"},flowChartTerminator:{"pt-BR":"Terminador",en:"Terminator"},flowChartPreparation:{"pt-BR":"Preparação",en:"Preparation"},flowChartManualInput:{"pt-BR":"Entrada manual",en:"Manual input"},flowChartManualOperation:{"pt-BR":"Operação manual",en:"Manual operation"},flowChartConnector:{"pt-BR":"Conector",en:"Connector"},flowChartOffpageConnector:{"pt-BR":"Conector de outra página",en:"Off-page connector"},flowChartPunchedCard:{"pt-BR":"Cartão",en:"Card"},flowChartPunchedTape:{"pt-BR":"Fita perfurada",en:"Punched tape"},flowChartSummingJunction:{"pt-BR":"Junção de soma",en:"Summing junction"},flowChartOr:{"pt-BR":"Ou",en:"Or"},flowChartCollate:{"pt-BR":"Agrupar",en:"Collate"},flowChartSort:{"pt-BR":"Classificar",en:"Sort"},flowChartExtract:{"pt-BR":"Extrair",en:"Extract"},flowChartMerge:{"pt-BR":"Mesclar",en:"Merge"},flowChartOnlineStorage:{"pt-BR":"Armazenamento on-line",en:"Stored data"},flowChartMagneticDisk:{"pt-BR":"Disco magnético",en:"Magnetic disk"},flowChartMagneticDrum:{"pt-BR":"Cilindro magnético",en:"Direct access storage"},flowChartMagneticTape:{"pt-BR":"Fita magnética",en:"Sequential access storage"},flowChartDisplay:{"pt-BR":"Exibir",en:"Display"},flowChartDelay:{"pt-BR":"Atraso",en:"Delay"},star4:{"pt-BR":"Estrela de 4 pontas",en:"4-point star"},star5:{"pt-BR":"Estrela de 5 pontas",en:"5-point star"},star6:{"pt-BR":"Estrela de 6 pontas",en:"6-point star"},star7:{"pt-BR":"Estrela de 7 pontas",en:"7-point star"},star8:{"pt-BR":"Estrela de 8 pontas",en:"8-point star"},star10:{"pt-BR":"Estrela de 10 pontas",en:"10-point star"},star12:{"pt-BR":"Estrela de 12 pontas",en:"12-point star"},star16:{"pt-BR":"Estrela de 16 pontas",en:"16-point star"},star24:{"pt-BR":"Estrela de 24 pontas",en:"24-point star"},star32:{"pt-BR":"Estrela de 32 pontas",en:"32-point star"},irregularSeal1:{"pt-BR":"Explosão 1",en:"Explosion 1"},irregularSeal2:{"pt-BR":"Explosão 2",en:"Explosion 2"},ribbon:{"pt-BR":"Faixa para baixo",en:"Down ribbon"},ribbon2:{"pt-BR":"Faixa para cima",en:"Up ribbon"},ellipseRibbon:{"pt-BR":"Faixa curva para baixo",en:"Curved down ribbon"},ellipseRibbon2:{"pt-BR":"Faixa curva para cima",en:"Curved up ribbon"},verticalScroll:{"pt-BR":"Pergaminho vertical",en:"Vertical scroll"},horizontalScroll:{"pt-BR":"Pergaminho horizontal",en:"Horizontal scroll"},wave:{"pt-BR":"Onda",en:"Wave"},doubleWave:{"pt-BR":"Onda dupla",en:"Double wave"},wedgeRectCallout:{"pt-BR":"Texto explicativo retangular",en:"Rectangular callout"},wedgeRoundRectCallout:{"pt-BR":"Texto explicativo retangular arredondado",en:"Rounded rectangular callout"},wedgeEllipseCallout:{"pt-BR":"Texto explicativo oval",en:"Oval callout"},cloudCallout:{"pt-BR":"Texto explicativo de nuvem",en:"Cloud callout"},borderCallout1:{"pt-BR":"Chamada de linha 1",en:"Line callout 1"},borderCallout2:{"pt-BR":"Chamada de linha 2",en:"Line callout 2"},borderCallout3:{"pt-BR":"Chamada de linha 3",en:"Line callout 3"},accentCallout1:{"pt-BR":"Chamada de linha 1 (acento)",en:"Line callout 1 (accent bar)"},accentCallout2:{"pt-BR":"Chamada de linha 2 (acento)",en:"Line callout 2 (accent bar)"},accentCallout3:{"pt-BR":"Chamada de linha 3 (acento)",en:"Line callout 3 (accent bar)"},callout1:{"pt-BR":"Chamada de linha 1 (sem borda)",en:"Line callout 1 (no border)"},callout2:{"pt-BR":"Chamada de linha 2 (sem borda)",en:"Line callout 2 (no border)"},callout3:{"pt-BR":"Chamada de linha 3 (sem borda)",en:"Line callout 3 (no border)"},accentBorderCallout1:{"pt-BR":"Chamada de linha 1 (borda e acento)",en:"Line callout 1 (border and accent bar)"},accentBorderCallout2:{"pt-BR":"Chamada de linha 2 (borda e acento)",en:"Line callout 2 (border and accent bar)"},accentBorderCallout3:{"pt-BR":"Chamada de linha 3 (borda e acento)",en:"Line callout 3 (border and accent bar)"}};function aV(e,t){var n;return(null==(n=nV[e])?void 0:n[t])??e}var rV=ge('<svg class=oasis-editor-shape-thumb viewBox="0 0 22 22"width=22 height=22 aria-hidden=true><path stroke=currentColor stroke-width=1 stroke-linejoin=round stroke-linecap=round vector-effect=non-scaling-stroke>');function oV(e){return Number(e.toFixed(2)).toString()}function iV(e){const t=()=>function(e,t,n,a,r){const o=[];for(const i of ig(e,t,n,a,r))switch(i.type){case"move":o.push(`M${oV(i.x)} ${oV(i.y)}`);break;case"line":o.push(`L${oV(i.x)} ${oV(i.y)}`);break;case"cubic":o.push(`C${oV(i.x1)} ${oV(i.y1)} ${oV(i.x2)} ${oV(i.y2)} ${oV(i.x)} ${oV(i.y)}`);break;case"close":o.push("Z")}return o.join(" ")}(e.preset,2,2,18,18),n=()=>tV.has(e.preset);return a=rV(),r=a.firstChild,w(e=>{var a=t(),o=n()?"none":"currentColor",i=n()?void 0:"0.18";return a!==e.e&&be(r,"d",e.e=a),o!==e.t&&be(r,"fill",e.t=o),i!==e.a&&be(r,"fill-opacity",e.a=i),e},{e:void 0,t:void 0,a:void 0}),a;var a,r}const lV="oasis-editor.recentShapes";function sV(){var e;try{const t=null==(e=globalThis.localStorage)?void 0:e.getItem(lV);if(!t)return[];const n=JSON.parse(t);return Array.isArray(n)?n.filter(e=>"string"==typeof e):[]}catch{return[]}}var dV=ge("<button type=button class=oasis-editor-shape-gallery-tile>"),cV=ge("<div class=oasis-editor-shape-gallery-section-header>"),uV=ge("<div class=oasis-editor-shape-gallery-grid>"),pV=ge("<div class=oasis-editor-shape-gallery>");function hV(e){const t=Fe(),n=()=>"en"===t("locale.id")?"en":"pt-BR",[a,r]=y(sV()),o=t=>{r(function(e){var t;const n=[e,...sV().filter(t=>t!==e)].slice(0,12);try{null==(t=globalThis.localStorage)||t.setItem(lV,JSON.stringify(n))}catch{}return n}(t)),e.api.commands.execute("insertShape",t),e.api.focusEditor()},i=e=>{return(t=dV()).$$click=()=>o(e.preset),Ie(t,K(iV,{get preset(){return e.preset}})),w(a=>{var r=aV(e.preset,n()),o=aV(e.preset,n()),i=`editor-toolbar-shape-${e.preset}`;return r!==a.e&&be(t,"title",a.e=r),o!==a.t&&be(t,"aria-label",a.t=o),i!==a.a&&be(t,"data-testid",a.a=i),a},{e:void 0,t:void 0,a:void 0}),t;var t};return Ie(l=pV(),K(re,{get when(){return a().length>0},get children(){return[(n=cV(),Ie(n,()=>t("toolbar.shapes.recentlyUsed")),n),(e=uV(),Ie(e,K(ne,{get each(){return a()},children:e=>K(i,{preset:e})})),e)];var e,n}}),null),Ie(l,K(ne,{each:eV,children:e=>{return[(a=cV(),Ie(a,()=>t(e.headerKey)),a),(n=uV(),Ie(n,K(ne,{get each(){return e.presets},children:e=>K(i,{preset:e})})),n)];var n,a}}),null),l;var l}me(["click"]);const fV=e=>Array.from(e).map(e=>({character:e,codePoint:`U+${e.codePointAt(0).toString(16).toUpperCase().padStart(4,"0")}`})),gV=[{id:"common",labelKey:"symbols.category.common",entries:fV("©®™§¶†‡•…—–°µ¿¡")},{id:"math",labelKey:"symbols.category.math",entries:fV("±×÷≠≤≥≈∞√∑∏∂∆∫πΩ")},{id:"arrows",labelKey:"symbols.category.arrows",entries:fV("←→↑↓↔↕⇒⇐⇔↗↘↙↖")},{id:"currency",labelKey:"symbols.category.currency",entries:fV("¢€£¥₽₹₿")},{id:"greek",labelKey:"symbols.category.greek",entries:fV("αβγδεθλμσφωΑΒΓΔΘΛΜΣΦΩ")},{id:"numbers",labelKey:"symbols.category.numbers",entries:fV("①②③④⑤⑥⑦⑧⑨⑩½⅓¼¾²³ⁿ№")}],mV=gV.slice(0,3).flatMap(e=>e.entries),bV=gV.find(e=>"numbers"===e.id).entries,vV=[{character:"a² + b² = c²",codePoint:"Pythagorean theorem"},{character:"E = mc²",codePoint:"Mass–energy equivalence"},{character:"A = πr²",codePoint:"Circle area"},{character:"x = (−b ± √(b² − 4ac)) / 2a",codePoint:"Quadratic formula"}];let yV=[];function wV(e){const t=gV.flatMap(e=>e.entries).find(t=>t.character===e)??{character:e,codePoint:`U+${e.codePointAt(0).toString(16).toUpperCase().padStart(4,"0")}`};yV=[t,...yV.filter(t=>t.character!==e)].slice(0,12)}var xV=ge("<div class=oasis-editor-symbol-menu-actions><button type=button class=oasis-editor-symbol-menu-action data-testid=editor-toolbar-equation><span></span></button><button type=button class=oasis-editor-symbol-menu-action data-testid=editor-toolbar-symbol><span></span></button><button type=button class=oasis-editor-symbol-menu-action data-testid=editor-toolbar-number><span>"),MV=ge("<div class=oasis-editor-symbol-picker><div class=oasis-editor-symbol-picker-header><button type=button class=oasis-editor-symbol-back></button><span></span></div><div class=oasis-editor-symbol-grid></div><button type=button class=oasis-editor-symbol-more data-testid=editor-toolbar-more-symbols><span>"),SV=ge("<button type=button class=oasis-editor-symbol-tile>");function AV(e){const t=Fe(),[n,a]=y("root"),r=()=>{switch(n()){case"symbols":return t("symbols.menu.symbol");case"numbers":return t("symbols.menu.number");case"equations":return t("symbols.menu.equation");default:return t("toolbar.symbols")}};return K(co,{icon:"omega",get label(){return t("toolbar.symbols")},testId:"editor-toolbar-symbols",get tooltip(){return t("toolbar.symbols")},ribbonSize:"large",panelClass:"oasis-editor-symbol-menu-panel",onOpenChange:e=>{e&&a("root")},get children(){return K(re,{get when(){return"root"===n()},get fallback(){return o=MV(),i=o.firstChild,l=i.firstChild,s=l.nextSibling,d=i.nextSibling,c=d.nextSibling,u=c.firstChild,l.$$click=e=>{e.stopPropagation(),a("root")},Ie(l,K(vr,{name:"arrow-left"})),Ie(s,r),Ie(d,K(ne,{get each(){return(()=>{switch(n()){case"symbols":return mV;case"numbers":return bV;case"equations":return vV;default:return[]}})()},children:t=>{return(a=SV()).$$click=()=>(t=>{if("equations"===n()){if(!e.api.commands.canExecute("insertEquation",uu(t.character)))return;return e.api.commands.execute("insertEquation",uu(t.character)),void e.api.focusEditor()}e.api.commands.canExecute("insertText",t.character)&&(wV(t.character),e.api.commands.execute("insertText",t.character),e.api.focusEditor())})(t),Ie(a,()=>t.character),w(e=>{var n=`${t.character} (${t.codePoint})`,r=`${t.character} (${t.codePoint})`,o=`editor-symbol-${t.codePoint.replace(/[^A-Z0-9]/g,"-")}`;return n!==e.e&&be(a,"title",e.e=n),r!==e.t&&be(a,"aria-label",e.t=r),o!==e.a&&be(a,"data-testid",e.a=o),e},{e:void 0,t:void 0,a:void 0}),a;var a}})),c.$$click=()=>{e.api.commands.canExecute("openSymbolDialog")&&e.api.commands.execute("openSymbolDialog")},Ie(c,K(vr,{name:"omega"}),u),Ie(u,()=>t("symbols.more")),w(e=>{var a=t("generic.back"),r=!("equations"!==n());return a!==e.e&&be(l,"aria-label",e.e=a),r!==e.t&&d.classList.toggle("oasis-editor-symbol-equation-grid",e.t=r),e},{e:void 0,t:void 0}),o;var o,i,l,s,d,c,u},get children(){var n=xV(),r=n.firstChild,o=r.firstChild,i=r.nextSibling,l=i.firstChild,s=i.nextSibling,d=s.firstChild;return r.$$click=t=>{t.stopPropagation(),e.api.commands.canExecute("openEquationDialog")&&e.api.commands.execute("openEquationDialog")},Ie(r,K(vr,{name:"square-function"}),o),Ie(o,()=>t("symbols.menu.equation")),Ie(r,K(vr,{name:"chevron-down"}),null),i.$$click=e=>{e.stopPropagation(),a("symbols")},Ie(i,K(vr,{name:"omega"}),l),Ie(l,()=>t("symbols.menu.symbol")),Ie(i,K(vr,{name:"chevron-down"}),null),s.$$click=e=>{e.stopPropagation(),a("numbers")},Ie(s,K(vr,{name:"hash"}),d),Ie(d,()=>t("symbols.menu.number")),Ie(s,K(vr,{name:"chevron-down"}),null),n}})}})}me(["click"]);var IV=ge("<i>"),CV=ge("<div class=oasis-editor-table-style-grid>"),TV=ge("<div class=oasis-editor-table-style-gallery><div class=oasis-editor-table-style-strip role=listbox>");function kV(e){const[t,n]=y(!1),a=()=>e.testId??"editor-toolbar-tbl-style",r=()=>`${a()}-panel`,o=M(()=>(e=>e.filter(e=>"table"===e.type).map((e,t)=>({style:e,index:t})).sort((e,t)=>(e.style.uiPriority??Number.MAX_SAFE_INTEGER)-(t.style.uiPriority??Number.MAX_SAFE_INTEGER)||e.index-t.index).map(({style:e})=>e))(e.styles)),i=t=>t.id===String(e.api.commands.state("setTableStyle").value??"");x(()=>{t()&&queueMicrotask(()=>{var e;null==(e=document.querySelector(`[data-testid="${r()}"] .oasis-editor-table-style-card-active, [data-testid="${r()}"] .oasis-editor-table-style-card`))||e.focus()})});const l=e=>{var t;if("Escape"===e.key)return e.preventDefault(),void n(!1);const a=Array.from(e.currentTarget.querySelectorAll(".oasis-editor-table-style-card")),r=a.indexOf(document.activeElement);if(r<0)return;const o={ArrowLeft:r-1,ArrowRight:r+1,ArrowUp:r-4,ArrowDown:r+4,Home:0,End:a.length-1}[e.key];void 0!==o&&(e.preventDefault(),null==(t=a[Math.max(0,Math.min(a.length-1,o))])||t.focus())},s=()=>K(ne,{get each(){return o()},children:t=>{const a=()=>t.tablePreview??{};return K(wr,{class:"oasis-editor-table-style-card",get active(){return i(t)},get classList(){return{"oasis-editor-table-style-card-active":i(t)}},role:"option",get"aria-selected"(){return i(t)},get title(){return t.name},get label(){return t.name},get"data-style-id"(){return t.id},onClick:()=>(t=>{e.api.commands.canExecute("setTableStyle")&&(e.api.commands.execute("setTableStyle",t.id),n(!1),e.api.focusEditor())})(t),get children(){return K(xr,{class:"oasis-editor-table-style-preview",get style(){return{"--table-fill":a().wholeFill??"#ffffff","--table-header-fill":a().headerFill??a().wholeFill??"#ffffff","--table-band-fill":a().bandFill??a().wholeFill??"#ffffff","--table-border":a().borderColor??"#d1d5db","--table-header-color":a().headerColor??"#17212b"}},get children(){return[IV(),IV(),IV(),IV(),IV(),IV(),IV(),IV(),IV()]}})}})}});return K(re,{get when(){return o().length>0},get fallback(){return K(xr,{class:"oasis-editor-table-style-gallery-empty",get children(){return e.api.t("table.tableStyle")}})},get children(){return K(no,{get open(){return t()},onOpenChange:n,placement:"bottom-end",panelClass:"oasis-editor-table-style-gallery-panel",panelRole:"listbox",get panelTestId(){return r()},trigger:t=>{return n=TV(),r=n.firstChild,"function"==typeof(o=t.ref)?Ae(o,n):t.ref=n,Ie(r,s),Ie(n,K(wr,{class:"oasis-editor-table-style-expand",get label(){return e.api.t("table.tableStyle")},"aria-haspopup":"listbox",get"aria-expanded"(){return t.open},get"data-testid"(){return`${a()}-expand`},onClick:()=>t.toggle(),get children(){return K(ro,{})}}),null),n;var n,r,o},get children(){var e=CV();return e.$$keydown=l,Ie(e,s),e}})}})}me(["keydown"]);var RV=ge("<div class=oasis-editor-table-style-options role=group>");const EV=[{command:"tableToggleHeaderRow",label:"table.headerRow"},{command:"tableToggleTotalRow",label:"table.totalRow"},{command:"tableToggleBandedRows",label:"table.bandedRows"},{command:"tableToggleFirstColumn",label:"table.firstColumn"},{command:"tableToggleLastColumn",label:"table.lastColumn"},{command:"tableToggleBandedColumns",label:"table.bandedColumns"}];function LV(e){return Ie(t=RV(),K(ne,{each:EV,children:t=>K(WE,{class:"oasis-editor-table-style-option",get label(){return e.api.t(t.label)},get checked(){return e.api.commands.state(t.command).isActive},get disabled(){return!e.api.commands.state(t.command).isEnabled},onChange:()=>{e.api.commands.execute(t.command)}})})),t;var t}var VV=ge('<svg class=oasis-editor-table-border-preset-icon viewBox="0 0 20 20"aria-hidden=true><rect x=2 y=2 width=16 height=16 fill=none stroke=currentColor stroke-opacity=.45 stroke-dasharray="1.5 1.5">'),NV=ge('<svg><path d="M2 2h16"></svg>',!1,!0,!1),zV=ge('<svg><path d="M2 18h16"></svg>',!1,!0,!1),PV=ge('<svg><path d="M2 2v16"></svg>',!1,!0,!1),OV=ge('<svg><path d="M18 2v16"></svg>',!1,!0,!1),qV=ge('<svg><path d="M2 10h16"></svg>',!1,!0,!1),BV=ge('<svg><path d="M10 2v16"></svg>',!1,!0,!1),WV=ge('<svg><path d="M2 2l16 16"></svg>',!1,!0,!1),FV=ge('<svg><path d="M2 18 18 2"></svg>',!1,!0,!1),DV=ge("<div class=oasis-editor-table-borders-divider>"),HV=ge("<div class=oasis-editor-table-borders-section>");const UV=[[{preset:"bottom",label:"Borda Inferior"},{preset:"top",label:"Borda Superior"},{preset:"left",label:"Borda Esquerda"},{preset:"right",label:"Borda Direita"},{preset:"none",label:"Sem Borda"}],[{preset:"all",label:"Todas as Bordas"},{preset:"outside",label:"Bordas Externas"},{preset:"inside",label:"Bordas Internas"}],[{preset:"insideHorizontal",label:"Borda Horizontal Interna"},{preset:"insideVertical",label:"Borda Vertical Interna"},{preset:"diagonalDown",label:"Borda Diagonal Inferior"},{preset:"diagonalUp",label:"Borda Diagonal Superior"}]];function GV(e){const t=e.preset;return(n=VV()).firstChild,Ie(n,"none"!==t&&[pe(()=>pe(()=>!!["all","outside","top"].includes(t))()&&NV()),pe(()=>pe(()=>!!["all","outside","bottom"].includes(t))()&&zV()),pe(()=>pe(()=>!!["all","outside","left"].includes(t))()&&PV()),pe(()=>pe(()=>!!["all","outside","right"].includes(t))()&&OV()),pe(()=>pe(()=>!!["all","inside","insideHorizontal"].includes(t))()&&qV()),pe(()=>pe(()=>!!["all","inside","insideVertical"].includes(t))()&&BV()),"diagonalDown"===t&&WV(),"diagonalUp"===t&&FV()],null),n;var n}var jV=ge("<div class=oasis-editor-design-gallery role=dialog><section class=oasis-editor-design-gallery-section><h3></h3><div class=oasis-editor-design-theme-grid role=listbox></div></section><section class=oasis-editor-design-gallery-section><h3></h3><div class=oasis-editor-design-option-grid role=listbox></div></section><section class=oasis-editor-design-gallery-section><h3></h3><div class=oasis-editor-design-option-grid role=listbox></div></section><div class=oasis-editor-design-gallery-columns><section class=oasis-editor-design-gallery-section><h3></h3><div class=oasis-editor-design-compact-grid role=listbox></div></section><section class=oasis-editor-design-gallery-section><h3></h3><div class=oasis-editor-design-compact-grid role=listbox>"),ZV=ge("<button type=button class=oasis-editor-design-theme-card role=option><span class=oasis-editor-design-theme-preview><strong>Aa</strong><span>Lorem ipsum</span><i></i><i></i></span><span>"),KV=ge("<p class=oasis-editor-design-preview-note> · "),XV=ge("<button type=button class=oasis-editor-design-option-card role=option><span class=oasis-editor-design-swatch-row></span><span>"),YV=ge("<i>"),JV=ge('<button type=button class="oasis-editor-design-option-card oasis-editor-design-font-card"role=option><strong>Título</strong><span>Texto normal'),QV=ge("<button type=button class=oasis-editor-design-list-card><strong></strong><small>"),$V=ge("<div class=oasis-editor-design-background-panel><h3></h3><div class=oasis-editor-design-presets></div><label><input></label><div class=oasis-editor-design-fields><label><input type=color></label><label><input type=number min=0 max=1 step=0.05></label><label><input type=number min=0.1 max=5 step=0.1></label><label><input type=number min=-180 max=180></label><label><input></label><label><input type=number min=8 max=240></label></div><div class=oasis-editor-design-actions><button type=button></button><label class=oasis-editor-design-file><input type=file accept=image/png,image/jpeg,image/gif,image/svg+xml></label><button type=button>"),_V=ge("<button type=button>"),eN=ge("<div class=oasis-editor-design-background-panel><h3></h3><div class=oasis-editor-design-border-preview>Página</div><div class=oasis-editor-design-fields><label><select><option value=single>Simples</option><option value=double>Dupla</option><option value=dashed>Tracejada</option><option value=dotted>Pontilhada</option></select></label><label><input type=color></label><label><input type=number min=1 max=12></label><label><input type=number min=0 max=144></label></div><div class=oasis-editor-design-actions><button type=button></button><button type=button>");const tN=[{id:"oasis",label:"Oasis",colors:["#0f766e","#14b8a6","#f0fdfa","#1f2937"],heading:"Aptos Display",body:"Aptos"},{id:"office",label:"Office",colors:["#4472c4","#5b9bd5","#deebf7","#1f2937"],heading:"Calibri Light",body:"Calibri"},{id:"facet",label:"Facet",colors:["#8064a2","#c4a7e7","#eee8f5","#262626"],heading:"Georgia",body:"Georgia"},{id:"integral",label:"Integral",colors:["#70ad47","#a9d18e","#e2f0d9","#1f2937"],heading:"Calibri Light",body:"Calibri"},{id:"ion",label:"Ion",colors:["#ed7d31","#f4b183","#fce4d6","#262626"],heading:"Garamond",body:"Garamond"},{id:"retrospect",label:"Retrospect",colors:["#5b9bd5","#9dc3e6","#deebf7","#1f2937"],heading:"Georgia",body:"Aptos"}],nN=[{id:"oasis",label:"Oasis",colors:["#0f766e","#14b8a6","#f0fdfa","#1f2937"]},{id:"office",label:"Office",colors:["#4472c4","#ed7d31","#a5a5a5","#ffc000"]},{id:"monochrome",label:"Monocromático",colors:["#111827","#4b5563","#9ca3af","#e5e7eb"]},{id:"warm",label:"Quente",colors:["#9a3412","#ea580c","#f59e0b","#fef3c7"]}],aN=[{id:"aptos",heading:"Aptos Display",body:"Aptos"},{id:"calibri",heading:"Calibri Light",body:"Calibri"},{id:"georgia",heading:"Georgia",body:"Georgia"},{id:"garamond",heading:"Garamond",body:"Garamond"}],rN=[{id:"compact",label:"Compacto",sample:"Antes 0 · Depois 4"},{id:"tight",label:"Estreito",sample:"Antes 0 · Depois 6"},{id:"open",label:"Aberto",sample:"Antes 0 · Depois 10"},{id:"relaxed",label:"Relaxado",sample:"Antes 4 · Depois 12"}],oN=[{id:"subtle",label:"Sutil",description:"Sombras leves"},{id:"moderate",label:"Moderado",description:"Contraste equilibrado"},{id:"intense",label:"Intenso",description:"Sombras marcantes"},{id:"flat",label:"Plano",description:"Sem efeitos"}];function iN(e,t,n){var a;const r=e.currentTarget,o=Array.from(r.querySelectorAll(t)),i=o.indexOf(document.activeElement);if(i<0)return;const l={ArrowLeft:i-1,ArrowRight:i+1,ArrowUp:i-n,ArrowDown:i+n,Home:0,End:o.length-1}[e.key];void 0!==l&&(e.preventDefault(),null==(a=o[Math.max(0,Math.min(o.length-1,l))])||a.focus())}me(["keydown","click","input"]);var lN=ge("<div class=oasis-editor-image-size-field><div class=oasis-editor-image-size-icon aria-hidden=true>"),sN=ge("<div class=oasis-editor-image-crop-flyout role=menu>"),dN=ge('<div class="oasis-editor-image-crop-flyout oasis-editor-image-crop-ratio-flyout"role=menu>'),cN=ge('<div class="oasis-editor-toolbar-panel oasis-editor-image-crop-menu"role=menu><div class=oasis-editor-toolbar-panel-separator role=separator></div><div class=oasis-editor-image-crop-menu-submenu-row></div><div class=oasis-editor-image-crop-menu-submenu-row>'),uN=ge("<div class=oasis-editor-image-crop-ratio-group><div class=oasis-editor-image-crop-ratio-heading>");function pN(e){const t=Fe(),n="height"===e.dimension?"imageHeightCm":"imageWidthCm",a="height"===e.dimension?"image.height":"image.width",r="height"===e.dimension?"move-vertical":"move-horizontal";return Ie((o=lN()).firstChild,K(vr,{name:r})),Ie(o,K(ZE,{class:"oasis-editor-tool-metric oasis-editor-image-size-metric",labelClass:"oasis-editor-tool-metric-label",get title(){return t(a)},get label(){return t(a)},controlClass:"oasis-editor-tool-number",get"data-testid"(){return`editor-toolbar-image-${e.dimension}`},min:"0.1",step:"0.1",get value(){return function(e,t){const n=e.commands.state(t).value;return"number"==typeof n?n.toFixed(2):""}(e.api,n)},onChange:t=>{e.api.commands.execute(n,null==t?"":String(t))}}),null),o;var o}const hN=[{id:"square",labelKey:"image.cropRatio.squareGroup",presets:["1:1"]},{id:"portrait",labelKey:"image.cropRatio.portrait",presets:["2:3","3:4","3:5","4:5"]},{id:"landscape",labelKey:"image.cropRatio.landscape",presets:["3:2","4:3","5:3","5:4","16:9","16:10"]}],fN=new Set(["line","lineInv","straightConnector1","bentConnector3","curvedConnector3","arc","leftBracket","rightBracket","leftBrace","rightBrace"]);function gN(e){return K(_r,{class:"oasis-editor-image-crop-menu-row",get"data-testid"(){return e.testId},role:"menuitem",get"aria-haspopup"(){return e.submenu?"menu":void 0},get"aria-expanded"(){return pe(()=>!!e.submenu)()?e.open:void 0},get"aria-controls"(){return pe(()=>!!e.submenu)()?e.submenuId:void 0},get onClick(){return e.onClick},get onMouseEnter(){return e.onHover},get onFocus(){return e.onHover},get icon(){return e.icon},get label(){return e.label},get trailingIcon(){return e.submenu?"chevron-right":void 0}})}function mN(e){const t=Fe(),n=()=>"en"===t("locale.id")?"en":"pt-BR",a=te(),r=`${a}-crop-shapes`,o=`${a}-crop-ratios`,[i,l]=y(null),s=e=>{l(t=>t===e?null:e)},d=(t,n)=>{e.api.commands.execute(t,n),l(null)};return c=cN(),u=c.firstChild,p=u.nextSibling,h=p.nextSibling,Ie(c,K(gN,{testId:"editor-toolbar-image-crop-toggle",icon:"crop",get label(){return t("image.crop")},onClick:()=>d("imageCrop")}),u),p.addEventListener("mouseleave",()=>{l(null)}),Ie(p,K(gN,{testId:"editor-toolbar-image-crop-shape",icon:"shapes",get label(){return t("image.cropToShape")},submenu:!0,get open(){return"shape"===i()},submenuId:r,onHover:()=>{l("shape")},onClick:()=>s("shape")}),null),Ie(p,K(re,{get when(){return"shape"===i()},get children(){var e=sN();return be(e,"id",r),Ie(e,K(ne,{get each(){return eV.flatMap(e=>e.presets).filter((e,t,n)=>!fN.has(e)&&n.indexOf(e)===t)},children:e=>K(_r,{class:"oasis-editor-image-crop-shape-tile",get title(){return aV(e,n())},get"aria-label"(){return aV(e,n())},"data-testid":`editor-toolbar-image-crop-shape-${e}`,onClick:()=>d("imageCropShape",e),get children(){return K(iV,{preset:e})}})})),e}}),null),h.addEventListener("mouseleave",()=>{l(null)}),Ie(h,K(gN,{testId:"editor-toolbar-image-crop-ratio",icon:"ratio",get label(){return t("image.cropAspectRatio")},submenu:!0,get open(){return"ratio"===i()},submenuId:o,onHover:()=>{l("ratio")},onClick:()=>s("ratio")}),null),Ie(h,K(re,{get when(){return"ratio"===i()},get children(){var e=dN();return be(e,"id",o),Ie(e,K(ne,{each:hN,children:e=>{return Ie((n=uN()).firstChild,()=>t(e.labelKey)),Ie(n,K(ne,{get each(){return e.presets},children:e=>K(_r,{class:"oasis-editor-image-crop-option",label:e,"data-testid":`editor-toolbar-image-crop-${e}`,onClick:()=>d("imageCropAspect",e)})}),null),n;var n}})),e}}),null),Ie(c,K(gN,{testId:"editor-toolbar-image-crop-fill",icon:"maximize",get label(){return t("image.cropFill")},onClick:()=>d("imageCropFill")}),null),Ie(c,K(gN,{testId:"editor-toolbar-image-crop-fit",icon:"minimize",get label(){return t("image.cropFit")},onClick:()=>d("imageCropFit")}),null),Ie(c,K(gN,{testId:"editor-toolbar-image-crop-reset",icon:"rotate-ccw",get label(){return t("image.cropReset")},onClick:()=>d("imageCropReset")}),null),c;var c,u,p,h}const bN={"editor-toolbar-new-document":{tab:"file",group:"document",row:1},"editor-toolbar-export-docx":{tab:"file",group:"document",row:1},"editor-toolbar-export-pdf":{tab:"file",group:"document",row:1},"editor-toolbar-import-document":{tab:"file",group:"document",row:1},"editor-toolbar-undo":{tab:"home",group:"clipboard",row:1},"editor-toolbar-redo":{tab:"home",group:"clipboard",row:2},"sep-history":{tab:"home",group:"clipboard",row:2},"editor-toolbar-style":{tab:"home",group:"styles",row:1},"editor-toolbar-font-family":{tab:"home",group:"font",row:1},"editor-toolbar-font-size":{tab:"home",group:"font",row:1},"editor-toolbar-font-increase":{tab:"home",group:"font",row:1},"editor-toolbar-font-decrease":{tab:"home",group:"font",row:1},"editor-toolbar-change-case":{tab:"home",group:"font",row:1},"editor-toolbar-clear-formatting":{tab:"home",group:"font",row:1},"editor-toolbar-color":{tab:"home",group:"font",row:2},"editor-toolbar-highlight":{tab:"home",group:"font",row:2},"editor-toolbar-text-shading":{tab:"home",group:"font",row:2},"sep-style":{tab:"home",group:"font",row:2},"editor-toolbar-bold":{tab:"home",group:"font",row:2},"editor-toolbar-italic":{tab:"home",group:"font",row:2},"editor-toolbar-underline-control":{tab:"home",group:"font",row:2},"editor-toolbar-strike":{tab:"home",group:"font",row:2},"editor-toolbar-superscript":{tab:"home",group:"font",row:2},"editor-toolbar-subscript":{tab:"home",group:"font",row:2},"sep-format":{tab:"home",group:"font",row:2},"editor-toolbar-insert-image":{tab:"insert",group:"illustrations",row:1},"editor-toolbar-insert-shape":{tab:"insert",group:"illustrations",row:2},"editor-toolbar-symbols":{tab:"insert",group:"symbols",row:1},"editor-toolbar-insert-table":{tab:"insert",group:"tables",row:1},"editor-toolbar-link":{tab:"insert",group:"links",row:1},"editor-toolbar-unlink":{tab:"insert",group:"links",row:2},"editor-toolbar-footnote":{tab:"references",group:"footnotes",row:1},"editor-toolbar-image-alt":{tab:"insert",group:"accessibility",row:2},"editor-toolbar-image-caption":{tab:"insert",group:"accessibility",row:1},"sep-insert":{tab:"insert",group:"accessibility",row:2},"editor-toolbar-image-crop":{tab:"imageFormat",group:"size",row:1},"editor-toolbar-image-height":{tab:"imageFormat",group:"size",row:1},"editor-toolbar-image-width":{tab:"imageFormat",group:"size",row:2},"editor-toolbar-image-border":{tab:"imageFormat",group:"imageStyles",row:1},"editor-toolbar-align-left":{tab:"home",group:"paragraph",row:2},"editor-toolbar-align-center":{tab:"home",group:"paragraph",row:2},"editor-toolbar-align-right":{tab:"home",group:"paragraph",row:2},"editor-toolbar-align-justify":{tab:"home",group:"paragraph",row:2},"editor-toolbar-list-bullet":{tab:"home",group:"paragraph",row:1},"editor-toolbar-list-ordered":{tab:"home",group:"paragraph",row:1},"editor-toolbar-list-outdent":{tab:"home",group:"paragraph",row:1},"editor-toolbar-list-indent":{tab:"home",group:"paragraph",row:1},"editor-toolbar-list-options":{tab:"home",group:"paragraph",row:1},"editor-toolbar-special-indent":{tab:"home",group:"paragraph",row:1},"editor-toolbar-line-spacing-control":{tab:"home",group:"paragraph",row:2},"sep-paragraph":{tab:"home",group:"paragraph",row:2},"editor-toolbar-metrics":{tab:"layout",group:"paragraph",row:1},"sep-metrics":{tab:"layout",group:"paragraph",row:2},"editor-toolbar-tbl-insert-row-above":{tab:"tableLayout",group:"rowsColumns",row:1},"editor-toolbar-tbl-insert-row-below":{tab:"tableLayout",group:"rowsColumns",row:1},"editor-toolbar-tbl-delete-row":{tab:"tableLayout",group:"rowsColumns",row:1},"editor-toolbar-tbl-insert-col-left":{tab:"tableLayout",group:"rowsColumns",row:2},"editor-toolbar-tbl-insert-col-right":{tab:"tableLayout",group:"rowsColumns",row:2},"editor-toolbar-tbl-delete-col":{tab:"tableLayout",group:"rowsColumns",row:2},"editor-toolbar-tbl-merge":{tab:"tableLayout",group:"merge",row:1},"editor-toolbar-tbl-split":{tab:"tableLayout",group:"merge",row:2},"editor-toolbar-tbl-width-100":{tab:"tableLayout",group:"cellSize",row:1},"editor-toolbar-tbl-align-left":{tab:"tableLayout",group:"alignment",row:1},"editor-toolbar-tbl-align-center":{tab:"tableLayout",group:"alignment",row:1},"editor-toolbar-tbl-align-right":{tab:"tableLayout",group:"alignment",row:1},"editor-toolbar-tbl-header-row":{tab:"tableDesign",group:"tableStyleOptions",row:1},"editor-toolbar-tbl-total-row":{tab:"tableDesign",group:"tableStyleOptions",row:1},"editor-toolbar-tbl-banded-rows":{tab:"tableDesign",group:"tableStyleOptions",row:1},"editor-toolbar-tbl-first-col":{tab:"tableDesign",group:"tableStyleOptions",row:2},"editor-toolbar-tbl-last-col":{tab:"tableDesign",group:"tableStyleOptions",row:2},"editor-toolbar-tbl-banded-cols":{tab:"tableDesign",group:"tableStyleOptions",row:2},"editor-toolbar-tbl-shading":{tab:"tableDesign",group:"borders",row:1},"editor-toolbar-tbl-borders":{tab:"tableDesign",group:"borders",row:2},"editor-toolbar-tbl-no-borders":{tab:"tableDesign",group:"borders",row:2},"editor-toolbar-tbl-style":{tab:"tableDesign",group:"tableStyles",row:1},"editor-toolbar-tbl-distribute-rows":{tab:"tableLayout",group:"cellSize",row:1},"editor-toolbar-tbl-distribute-cols":{tab:"tableLayout",group:"cellSize",row:1},"editor-toolbar-tbl-autofit":{tab:"tableLayout",group:"cellSize",row:2},"editor-toolbar-margins":{tab:"layout",group:"section",row:1},"editor-toolbar-section":{tab:"layout",group:"section",row:1}};const vN=[{command:"alignLeft",icon:"align-left",testId:"editor-toolbar-align-left",tooltipKey:"toolbar.alignLeft"},{command:"alignCenter",icon:"align-center",testId:"editor-toolbar-align-center",tooltipKey:"toolbar.alignCenter"},{command:"alignRight",icon:"align-right",testId:"editor-toolbar-align-right",tooltipKey:"toolbar.alignRight"},{command:"alignJustify",icon:"align-justify",testId:"editor-toolbar-align-justify",tooltipKey:"toolbar.justify"}],yN=[{command:"bulletList",icon:"list",testId:"editor-toolbar-list-bullet",tooltipKey:"toolbar.bulletList"},{command:"orderedList",icon:"list-ordered",testId:"editor-toolbar-list-ordered",tooltipKey:"toolbar.numberedList"}],wN=[{id:"editor-toolbar-tbl-insert-row-above",command:"tableInsertRowBefore",icon:"tableInsertRowAbove",labelKey:"table.insertAbove",tooltipKey:"table.insertRowAbove",ribbonSize:"large"},{id:"editor-toolbar-tbl-insert-row-below",command:"tableInsertRowAfter",icon:"tableInsertRowBelow",labelKey:"table.insertBelow",tooltipKey:"table.insertRowBelow",ribbonSize:"large"},{id:"editor-toolbar-tbl-delete-row",command:"tableDeleteRow",icon:"tableDeleteRow",labelKey:"table.deleteRow",tooltipKey:"table.deleteRow"},{id:"editor-toolbar-tbl-insert-col-left",command:"tableInsertColumnBefore",icon:"tableInsertColumnLeft",labelKey:"table.insertLeft",tooltipKey:"table.insertColumnLeft",ribbonSize:"large"},{id:"editor-toolbar-tbl-insert-col-right",command:"tableInsertColumnAfter",icon:"tableInsertColumnRight",labelKey:"table.insertRight",tooltipKey:"table.insertColumnRight",ribbonSize:"large"},{id:"editor-toolbar-tbl-delete-col",command:"tableDeleteColumn",icon:"tableDeleteColumn",labelKey:"table.deleteColumn",tooltipKey:"table.deleteColumn"},{id:"editor-toolbar-tbl-merge",command:"tableMerge",icon:"tableMerge",labelKey:"table.merge",tooltipKey:"table.mergeTooltip"},{id:"editor-toolbar-tbl-split",command:"tableSplit",icon:"tableSplit",labelKey:"table.split",tooltipKey:"table.splitTooltip"},{id:"editor-toolbar-tbl-width-100",command:"tableWidth100",icon:"tableWidth",labelKey:"table.width100",tooltipKey:"table.width100Tooltip"},{id:"editor-toolbar-tbl-align-left",command:"tableAlignLeft",icon:"tableAlignLeft",labelKey:"table.alignLeft",tooltipKey:"table.alignLeft"},{id:"editor-toolbar-tbl-align-center",command:"tableAlignCenter",icon:"tableAlignCenter",labelKey:"table.alignCenter",tooltipKey:"table.alignCenter"},{id:"editor-toolbar-tbl-align-right",command:"tableAlignRight",icon:"tableAlignRight",labelKey:"table.alignRight",tooltipKey:"table.alignRight"}],xN=ut;function MN(e){return Number.isFinite(e)?e*xN:0}function SN(e){return MN(e.fontSize??vt)}const AN=[8,9,10,11,12,14,16,18,20,24,28,32,36,48,72];function IN(e){return Ac(MN(e),2)}function CN(e){return Ac((t=e,Number.isFinite(t)?t/xN:0),4);var t}function TN(e){const t=Number(e);return!Number.isFinite(t)||t<=0?"":String(IN(t))}function kN(e){const t=Number(e);return!Number.isFinite(t)||t<=0?null:CN(t)}const RN=/Mac/i.test(navigator.userAgent)?"⌘":"Ctrl",EN=e=>e.commands.state("documentStyles").value??[],LN=e=>{const t=new Set(["Arial","Calibri, sans-serif","Calibri Light, sans-serif","Georgia","Inter","Open Sans, sans-serif","Times New Roman","Courier New"]);for(const a of EN(e))a.fontFamily&&t.add(a.fontFamily);const n=String(e.commands.state("setFontFamily").value??"").trim();return n&&t.add(n),Array.from(t).sort((e,t)=>e.localeCompare(t)).map(e=>({value:e,label:e}))},VN=e=>{const t=new Set(AN);for(const a of EN(e))"number"==typeof a.fontSize&&Number.isFinite(a.fontSize)&&t.add(IN(a.fontSize));const n=Number(e.commands.state("setFontSize").value);return Number.isFinite(n)&&n>0&&t.add(n),Array.from(t).sort((e,t)=>e-t).map(e=>({value:String(e),label:String(e)}))};function NN(e){const t=[];t.push({type:"menu",id:"editor-toolbar-design-themes",testId:"editor-toolbar-design-themes",tab:"design",group:"documentFormatting",row:1,ribbonSize:"large",iconName:"palette",label:e("design.themes"),tooltip:e("design.themes"),panelClass:"oasis-editor-design-gallery-panel",content:{kind:"custom",render:e=>function(e){const[t,n]=y(null),a=(t,n)=>{e.api.commands.execute(t,n),e.api.focusEditor()},r=M(()=>String(e.api.commands.state("applyDocumentTheme").value??"")),o=M(()=>String(e.api.commands.state("setDocumentColorScheme").value??"")),i=M(()=>String(e.api.commands.state("setDocumentFontScheme").value??"")),l=M(()=>String(e.api.commands.state("setDocumentParagraphSpacing").value??"")),s=M(()=>String(e.api.commands.state("setDocumentEffects").value??""));return d=jV(),c=d.firstChild,u=c.firstChild,p=u.nextSibling,h=c.nextSibling,f=h.firstChild,g=f.nextSibling,m=h.nextSibling,b=m.firstChild,v=b.nextSibling,x=m.nextSibling.firstChild,S=x.firstChild,A=S.nextSibling,I=x.nextSibling.firstChild,C=I.nextSibling,Ie(u,()=>e.api.t("design.themes")),p.$$keydown=e=>iN(e,".oasis-editor-design-theme-card",3),Ie(p,K(ne,{each:tN,children:e=>{return t=ZV(),o=t.firstChild,i=o.firstChild,l=i.nextSibling,s=l.nextSibling,d=s.nextSibling,c=o.nextSibling,t.$$click=()=>a("applyDocumentTheme",e.id),t.addEventListener("blur",()=>n(null)),t.addEventListener("focus",()=>n(e.id)),t.addEventListener("mouseleave",()=>n(null)),t.addEventListener("mouseenter",()=>n(e.id)),Ie(c,()=>e.label),w(n=>{var a=!(r()!==e.id),c=r()===e.id,u=`editor-toolbar-design-theme-${e.id}`,p=e.colors[2],h=e.colors[1],f=e.heading,g=e.colors[3],m=e.body,b=e.colors[0],v=e.colors[1];return a!==n.e&&t.classList.toggle("oasis-editor-design-card-active",n.e=a),c!==n.t&&be(t,"aria-selected",n.t=c),u!==n.a&&be(t,"data-testid",n.a=u),p!==n.o&&Me(o,"background-color",n.o=p),h!==n.i&&Me(i,"color",n.i=h),f!==n.n&&Me(i,"font-family",n.n=f),g!==n.s&&Me(l,"color",n.s=g),m!==n.h&&Me(l,"font-family",n.h=m),b!==n.r&&Me(s,"background-color",n.r=b),v!==n.d&&Me(d,"background-color",n.d=v),n},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0}),t;var t,o,i,l,s,d,c}})),Ie(c,K(re,{get when(){return t()},children:e=>{const t=tN.find(t=>t.id===e());return Ie(n=KV(),()=>null==t?void 0:t.heading,n.firstChild),Ie(n,()=>null==t?void 0:t.body,null),n;var n}}),null),Ie(f,()=>e.api.t("design.colors")),g.$$keydown=e=>iN(e,".oasis-editor-design-option-card",4),Ie(g,K(ne,{each:nN,children:e=>{return r=(n=(t=XV()).firstChild).nextSibling,t.$$click=()=>a("setDocumentColorScheme",e.id),Ie(n,K(ne,{get each(){return e.colors},children:e=>{return Me(t=YV(),"background-color",e),t;var t}})),Ie(r,()=>e.label),w(n=>{var a=!(o()!==e.id),r=o()===e.id,i=`editor-toolbar-design-color-${e.id}`;return a!==n.e&&t.classList.toggle("oasis-editor-design-card-active",n.e=a),r!==n.t&&be(t,"aria-selected",n.t=r),i!==n.a&&be(t,"data-testid",n.a=i),n},{e:void 0,t:void 0,a:void 0}),t;var t,n,r}})),Ie(b,()=>e.api.t("design.fonts")),v.$$keydown=e=>iN(e,".oasis-editor-design-font-card",2),Ie(v,K(ne,{each:aN,children:e=>{return t=JV(),n=t.firstChild,r=n.nextSibling,t.$$click=()=>a("setDocumentFontScheme",e.id),w(a=>{var o=!(i()!==e.id),l=i()===e.id,s=`editor-toolbar-design-font-${e.id}`,d=e.heading,c=e.body;return o!==a.e&&t.classList.toggle("oasis-editor-design-card-active",a.e=o),l!==a.t&&be(t,"aria-selected",a.t=l),s!==a.a&&be(t,"data-testid",a.a=s),d!==a.o&&Me(n,"font-family",a.o=d),c!==a.i&&Me(r,"font-family",a.i=c),a},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),t;var t,n,r}})),Ie(S,()=>e.api.t("design.spacing")),Ie(A,K(ne,{each:rN,children:e=>{return r=(n=(t=QV()).firstChild).nextSibling,t.$$click=()=>a("setDocumentParagraphSpacing",e.id),Ie(n,()=>e.label),Ie(r,()=>e.sample),w(()=>t.classList.toggle("oasis-editor-design-card-active",!(l()!==e.id))),t;var t,n,r}})),Ie(I,()=>e.api.t("design.effects")),Ie(C,K(ne,{each:oN,children:e=>{return r=(n=(t=QV()).firstChild).nextSibling,t.$$click=()=>a("setDocumentEffects",e.id),Ie(n,()=>e.label),Ie(r,()=>e.description),w(()=>t.classList.toggle("oasis-editor-design-card-active",!(s()!==e.id))),t;var t,n,r}})),w(()=>be(d,"aria-label",e.api.t("design.themes"))),d;var d,c,u,p,h,f,g,m,b,v,x,S,A,I,C}({api:e})}}),t.push({type:"button",id:"editor-toolbar-design-default",testId:"editor-toolbar-design-default",tab:"design",group:"documentFormatting",row:2,iconName:"check",label:e("design.setDefault"),tooltip:e("design.setDefault"),command:"setDocumentDesignDefault"}),t.push({type:"menu",id:"editor-toolbar-design-watermark",testId:"editor-toolbar-design-watermark",tab:"design",group:"pageBackground",row:1,iconName:"droplets",label:e("design.watermark"),tooltip:e("design.watermark"),panelClass:"oasis-editor-design-background-panel-wrap",content:{kind:"custom",render:e=>function(e){var t,n,a,r,o,i,l;const s=()=>e.api.commands.state("setDocumentWatermark").value??null,[d,c]=y((null==(t=s())?void 0:t.text)??"CONFIDENCIAL"),[u,p]=y((null==(n=s())?void 0:n.color)??"#94a3b8"),[h,f]=y((null==(a=s())?void 0:a.opacity)??.25),[g,m]=y((null==(r=s())?void 0:r.scale)??1),[b,v]=y((null==(o=s())?void 0:o.rotation)??-45),[x,M]=y((null==(i=s())?void 0:i.fontFamily)??"Arial"),[S,A]=y((null==(l=s())?void 0:l.fontSize)??48),I=()=>{e.api.commands.execute("setDocumentWatermark",{kind:"text",text:d(),color:u(),opacity:h(),scale:g(),rotation:b(),fontFamily:x(),fontSize:S()})},C=t=>{var n;const a=null==(n=t.currentTarget.files)?void 0:n[0];if(!a||!a.type.startsWith("image/"))return;const r=new FileReader;r.onload=()=>{e.api.commands.execute("setDocumentWatermark",{kind:"image",src:String(r.result),color:u(),opacity:h(),scale:g(),rotation:b()})},r.readAsDataURL(a)};return T=$V(),k=T.firstChild,R=k.nextSibling,E=R.nextSibling,L=E.firstChild,V=E.nextSibling,N=V.firstChild,z=N.firstChild,P=N.nextSibling,O=P.firstChild,q=P.nextSibling,B=q.firstChild,W=q.nextSibling,F=W.firstChild,D=W.nextSibling,H=D.firstChild,U=D.nextSibling,G=U.firstChild,j=V.nextSibling.firstChild,Z=j.nextSibling,X=Z.firstChild,Y=Z.nextSibling,Ie(k,()=>e.api.t("design.watermark")),Ie(R,K(ne,{each:["CONFIDENCIAL","RASCUNHO","NÃO COPIAR"],children:e=>{return(t=_V()).$$click=()=>{c(e),I()},Ie(t,e),t;var t}})),Ie(E,()=>e.api.t("design.text"),L),L.$$input=e=>c(e.currentTarget.value),Ie(N,()=>e.api.t("design.color"),z),z.$$input=e=>p(e.currentTarget.value),Ie(P,()=>e.api.t("design.opacity"),O),O.$$input=e=>f(Number(e.currentTarget.value)),Ie(q,()=>e.api.t("design.scale"),B),B.$$input=e=>m(Number(e.currentTarget.value)),Ie(W,()=>e.api.t("design.rotation"),F),F.$$input=e=>v(Number(e.currentTarget.value)),Ie(D,()=>e.api.t("design.fontFamily"),H),H.$$input=e=>M(e.currentTarget.value),Ie(U,()=>e.api.t("design.fontSize"),G),G.$$input=e=>A(Number(e.currentTarget.value)),j.$$click=I,Ie(j,()=>e.api.t("design.applyText")),Ie(Z,()=>e.api.t("design.useImage"),X),X.addEventListener("change",C),Y.$$click=()=>e.api.commands.execute("setDocumentWatermark",null),Ie(Y,()=>e.api.t("design.remove")),w(()=>L.value=d()),w(()=>z.value=u()),w(()=>O.value=h()),w(()=>B.value=g()),w(()=>F.value=b()),w(()=>H.value=x()),w(()=>G.value=S()),T;var T,k,R,E,L,V,N,z,P,O,q,B,W,F,D,H,U,G,j,Z,X,Y}({api:e})}}),t.push({type:"colorPicker",id:"editor-toolbar-design-page-color",testId:"editor-toolbar-design-page-color",tab:"design",group:"pageBackground",row:1,kind:"shading",command:"setDocumentPageColor",defaultValue:"#ffffff",label:e("design.pageColor"),tooltip:e("design.pageColor"),ribbonSize:"large"}),t.push({type:"menu",id:"editor-toolbar-design-page-borders",testId:"editor-toolbar-design-page-borders",tab:"design",group:"pageBackground",row:2,iconName:"frame",label:e("design.pageBorders"),tooltip:e("design.pageBorders"),panelClass:"oasis-editor-design-background-panel-wrap",content:{kind:"custom",render:e=>function(e){var t,n,a,r;const o=()=>e.api.commands.state("setDocumentPageBorder").value??null,[i,l]=y((null==(t=o())?void 0:t.style)??"single"),[s,d]=y((null==(n=o())?void 0:n.color)??"#64748b"),[c,u]=y((null==(a=o())?void 0:a.width)??1),[p,h]=y((null==(r=o())?void 0:r.distance)??24),f=()=>{e.api.commands.execute("setDocumentPageBorder",{style:i(),color:s(),width:c(),distance:p()})};return g=eN(),m=g.firstChild,b=m.nextSibling,v=b.nextSibling,x=v.firstChild,M=x.firstChild,S=x.nextSibling,A=S.firstChild,I=S.nextSibling,C=I.firstChild,T=I.nextSibling,k=T.firstChild,R=v.nextSibling.firstChild,E=R.nextSibling,Ie(m,()=>e.api.t("design.pageBorders")),Ie(x,()=>e.api.t("design.borderStyle"),M),M.addEventListener("change",e=>l(e.currentTarget.value)),Ie(S,()=>e.api.t("design.color"),A),A.$$input=e=>d(e.currentTarget.value),Ie(I,()=>e.api.t("design.borderWidth"),C),C.$$input=e=>u(Number(e.currentTarget.value)),Ie(T,()=>e.api.t("design.distance"),k),k.$$input=e=>h(Number(e.currentTarget.value)),R.$$click=f,Ie(R,()=>e.api.t("design.apply")),E.$$click=()=>e.api.commands.execute("setDocumentPageBorder",null),Ie(E,()=>e.api.t("design.remove")),w(e=>Me(b,"border",`${c()}px ${i()} ${s()}`)),w(()=>M.value=i()),w(()=>A.value=s()),w(()=>C.value=c()),w(()=>k.value=p()),g;var g,m,b,v,x,M,S,A,I,C,T,k,R,E}({api:e})}}),t.push({type:"button",id:"editor-toolbar-new-document",testId:"editor-toolbar-new-document",iconName:"file-plus",labelKey:"toolbar.newDocument",tooltipKey:"toolbar.newDocument",command:"newDocument",ribbonSize:"large"}),t.push({type:"button",id:"editor-toolbar-import-document",testId:"editor-toolbar-import-document",iconName:"upload",labelKey:"toolbar.importDocx",tooltipKey:"toolbar.importDocx",command:"importDocument",ribbonSize:"large"}),t.push({type:"button",id:"editor-toolbar-export-docx",testId:"editor-toolbar-export-docx",iconName:"file-text",labelKey:"toolbar.exportDocx",tooltipKey:"toolbar.exportDocx",command:"exportDocx",ribbonSize:"large"}),t.push({type:"button",id:"editor-toolbar-export-pdf",testId:"editor-toolbar-export-pdf",iconName:"file-down",labelKey:"toolbar.exportPdf",tooltipKey:"toolbar.exportPdf",command:"exportPdf",ribbonSize:"large"}),t.push({type:"button",id:"editor-toolbar-undo",testId:"editor-toolbar-undo",iconName:"undo",command:"undo",tooltip:`${e("toolbar.undo")} (${RN}+Z)`}),t.push({type:"button",id:"editor-toolbar-redo",testId:"editor-toolbar-redo",iconName:"redo",command:"redo",tooltip:`${e("toolbar.redo")} (${RN}+Shift+Z)`}),t.push({type:"separator",id:"sep-history"}),t.push({type:"styleGallery",id:"editor-toolbar-style",testId:"editor-toolbar-style",tooltipKey:"toolbar.style",ribbonSize:"large",styles:EN,paragraphCommand:"setStyleId",characterCommand:"setCharacterStyleId"}),t.push({type:"select",id:"editor-toolbar-font-family",testId:"editor-toolbar-font-family",tooltipKey:"toolbar.fontFamily",placeholder:e("toolbar.font"),command:"setFontFamily",options:LN}),t.push({type:"select",id:"editor-toolbar-font-size",testId:"editor-toolbar-font-size",width:"small",tooltipKey:"toolbar.fontSize",command:"setFontSize",options:VN}),t.push({type:"button",id:"editor-toolbar-font-increase",testId:"editor-toolbar-font-increase",iconName:"a-arrow-up",command:"increaseFontSize",tooltipKey:"toolbar.increaseFontSize"}),t.push({type:"button",id:"editor-toolbar-font-decrease",testId:"editor-toolbar-font-decrease",iconName:"a-arrow-down",command:"decreaseFontSize",tooltipKey:"toolbar.decreaseFontSize"}),t.push({type:"menu",id:"editor-toolbar-change-case",testId:"editor-toolbar-change-case",iconName:"case-sensitive",tooltipKey:"toolbar.changeCase",isDisabled:e=>!e.commands.state({name:"changeTextCase"}).isEnabled,content:{kind:"items",items:[{type:"button",id:"editor-toolbar-case-sentence",testId:"editor-toolbar-case-sentence",labelKey:"toolbar.caseSentence",wide:!0,tooltipKey:"toolbar.caseSentence",command:{name:"changeTextCase",payload:"sentence"}},{type:"button",id:"editor-toolbar-case-lower",testId:"editor-toolbar-case-lower",labelKey:"toolbar.caseLower",wide:!0,tooltipKey:"toolbar.caseLower",command:{name:"changeTextCase",payload:"lower"}},{type:"button",id:"editor-toolbar-case-upper",testId:"editor-toolbar-case-upper",labelKey:"toolbar.caseUpper",wide:!0,tooltipKey:"toolbar.caseUpper",command:{name:"changeTextCase",payload:"upper"}},{type:"button",id:"editor-toolbar-case-capitalize",testId:"editor-toolbar-case-capitalize",labelKey:"toolbar.caseCapitalize",wide:!0,tooltipKey:"toolbar.caseCapitalize",command:{name:"changeTextCase",payload:"capitalize"}},{type:"button",id:"editor-toolbar-case-toggle",testId:"editor-toolbar-case-toggle",labelKey:"toolbar.caseToggle",wide:!0,tooltipKey:"toolbar.caseToggle",command:{name:"changeTextCase",payload:"toggle"}}]}}),t.push({type:"button",id:"editor-toolbar-clear-formatting",testId:"editor-toolbar-clear-formatting",iconName:"remove-formatting",command:"clearFormatting",tooltipKey:"toolbar.clearFormatting"}),t.push({type:"toggle",id:"editor-toolbar-bold",testId:"editor-toolbar-bold",iconName:"bold",command:"bold",tooltipKey:"toolbar.bold"}),t.push({type:"toggle",id:"editor-toolbar-italic",testId:"editor-toolbar-italic",iconName:"italic",command:"italic",tooltipKey:"toolbar.italic"}),t.push({type:"custom",id:"editor-toolbar-underline-control",render:e=>xL({api:e})}),t.push({type:"toggle",id:"editor-toolbar-strike",testId:"editor-toolbar-strike",iconName:"strikethrough",command:"strike",tooltipKey:"toolbar.strike"}),t.push({type:"toggle",id:"editor-toolbar-subscript",testId:"editor-toolbar-subscript",iconName:"subscript",command:"subscript",tooltipKey:"toolbar.subscript"}),t.push({type:"toggle",id:"editor-toolbar-superscript",testId:"editor-toolbar-superscript",iconName:"superscript",command:"superscript",tooltipKey:"toolbar.superscript"}),t.push({type:"separator",id:"sep-format"}),t.push({type:"colorPicker",id:"editor-toolbar-color",testId:"editor-toolbar-color",kind:"color",iconName:"type",defaultValue:"#111827",tooltipKey:"toolbar.color",command:"setColor"}),t.push({type:"colorPicker",id:"editor-toolbar-highlight",testId:"editor-toolbar-highlight",kind:"highlight",iconName:"highlighter",defaultValue:"#fef08a",tooltipKey:"toolbar.highlight",command:"setHighlight"}),t.push({type:"colorPicker",id:"editor-toolbar-text-shading",testId:"editor-toolbar-text-shading",kind:"shading",iconName:"paint-bucket",defaultValue:"#fef3c7",tooltipKey:"toolbar.textShading",command:"setTextShading"}),t.push({type:"separator",id:"sep-style"}),t.push({type:"button",id:"editor-toolbar-insert-image",testId:"editor-toolbar-insert-image",iconName:"image",tooltipKey:"toolbar.image",labelKey:"toolbar.image",ribbonSize:"large",command:"insertImage"}),t.push({type:"menu",id:"editor-toolbar-insert-shape",testId:"editor-toolbar-insert-shape",iconName:"shapes",tooltipKey:"toolbar.shapes",labelKey:"toolbar.shapes",ribbonSize:"large",panelClass:"oasis-editor-shape-gallery-panel",content:{kind:"custom",render:e=>hV({api:e})}}),t.push({type:"custom",id:"editor-toolbar-symbols",testId:"editor-toolbar-symbols",ribbonSize:"large",render:e=>AV({api:e})}),t.push({type:"gridPicker",id:"editor-toolbar-insert-table",testId:"editor-toolbar-insert-table",tooltipKey:"toolbar.table",labelKey:"toolbar.table",ribbonSize:"large",command:"insertTable"}),t.push({type:"button",id:"editor-toolbar-link",testId:"editor-toolbar-link",iconName:"link",command:"link",tooltip:`${e("toolbar.link")} (${RN}+K)`,labelKey:"toolbar.link",ribbonSize:"large"}),t.push({type:"button",id:"editor-toolbar-unlink",testId:"editor-toolbar-unlink",iconName:"unlink",command:"unlink",tooltipKey:"toolbar.unlink",labelKey:"toolbar.unlink",ribbonSize:"large"}),t.push({type:"button",id:"editor-toolbar-footnote",testId:"editor-toolbar-footnote",iconName:"footnote",command:"insertFootnote",tooltip:`${e("toolbar.footnote")} (${RN}+Alt+F)`,labelKey:"toolbar.footnote",ribbonSize:"large"}),t.push({type:"button",id:"editor-toolbar-image-alt",testId:"editor-toolbar-image-alt",iconName:"file-text",tooltipKey:"toolbar.alt",labelKey:"toolbar.alt",ribbonSize:"large",command:"editImageAlt",isVisible:e=>e.commands.state("editImageAlt").isEnabled}),t.push({type:"button",id:"editor-toolbar-image-caption",testId:"editor-toolbar-image-caption",iconName:"subtitles",tooltipKey:"toolbar.imageCaption",labelKey:"toolbar.imageCaption",ribbonSize:"large",command:"insertImageCaption",isVisible:e=>e.commands.state("insertImageCaption").isEnabled}),t.push({type:"separator",id:"sep-insert"}),t.push({type:"menu",id:"editor-toolbar-image-crop",testId:"editor-toolbar-image-crop",iconName:"crop",tooltipKey:"image.crop",labelKey:"image.crop",ribbonSize:"large",isActive:e=>e.commands.state("imageCrop").isActive,panelClass:"oasis-editor-image-crop-panel",content:{kind:"custom",render:e=>mN({api:e})}}),t.push({type:"custom",id:"editor-toolbar-image-height",testId:"editor-toolbar-image-height",render:e=>pN({api:e,dimension:"height"})}),t.push({type:"custom",id:"editor-toolbar-image-width",testId:"editor-toolbar-image-width",render:e=>pN({api:e,dimension:"width"})}),t.push({type:"pictureBorder",id:"editor-toolbar-image-border",testId:"editor-toolbar-image-border",command:"imageBorder",labelKey:"image.border",tooltipKey:"image.border",ribbonSize:"large"});for(const n of vN)t.push({type:"toggle",id:n.testId,testId:n.testId,iconName:n.icon,command:n.command,tooltipKey:n.tooltipKey});for(const n of yN)t.push({type:"toggle",id:n.testId,testId:n.testId,iconName:n.icon,command:n.command,tooltipKey:n.tooltipKey});t.push({type:"button",id:"editor-toolbar-list-outdent",testId:"editor-toolbar-list-outdent",iconName:"indent-decrease",tooltipKey:"toolbar.decreaseIndent",command:"outdent"}),t.push({type:"button",id:"editor-toolbar-list-indent",testId:"editor-toolbar-list-indent",iconName:"indent-increase",tooltipKey:"toolbar.increaseIndent",command:"indent"}),t.push({type:"custom",id:"editor-toolbar-list-options",render:e=>function(e){const t=Fe(),n=e.api;return K(co,{icon:"list-filter",get tooltip(){return t("toolbar.listFormat")},testId:"editor-toolbar-list-options-dropdown",hideChevron:!0,get children(){var e=kL(),a=e.firstChild,r=a.firstChild,o=a.nextSibling.firstChild,i=o.nextSibling;return Ie(r,()=>t("toolbar.listFormat")),Ie(a,K(fo,{"data-testid":"editor-toolbar-list-format",onChange:e=>n.commands.execute("setListFormat",e.currentTarget.value),get tooltip(){return t("toolbar.listFormat")},get children(){return[(i=ML(),Ie(i,()=>t("toolbar.formatDecimal")),i),(o=SL(),Ie(o,()=>t("toolbar.formatLowerLetter")),o),(r=AL(),Ie(r,()=>t("toolbar.formatUpperLetter")),r),(a=IL(),Ie(a,()=>t("toolbar.formatLowerRoman")),a),(n=CL(),Ie(n,()=>t("toolbar.formatUpperRoman")),n),(e=TL(),Ie(e,()=>t("toolbar.formatBullet")),e)];var e,n,a,r,o,i}}),null),Ie(o,()=>t("toolbar.listStartAt")),i.addEventListener("change",e=>n.commands.execute("setListStartAt",e.currentTarget.value)),w(()=>be(i,"title",t("toolbar.listStartAt"))),e}})}({api:e})}),t.push({type:"split",id:"editor-toolbar-special-indent",testId:"editor-toolbar-special-indent",iconName:"specialIndentFirstLine",tooltipKey:"toolbar.specialIndent",command:{name:"setSpecialIndent",payload:{kind:"firstLine"}},isActive:()=>!1,panelClass:"oasis-editor-toolbar-dropdown-menu oasis-editor-special-indent-menu",menu:{kind:"items",items:[{type:"button",id:"editor-toolbar-special-indent-none",testId:"editor-toolbar-special-indent-none",iconName:"minus",labelKey:"toolbar.specialIndentNone",tooltipKey:"toolbar.specialIndentNone",command:{name:"setSpecialIndent",payload:{kind:"none"}},wide:!0},{type:"button",id:"editor-toolbar-special-indent-first-line",testId:"editor-toolbar-special-indent-first-line",iconName:"list-collapse",labelKey:"toolbar.specialIndentFirstLine",tooltipKey:"toolbar.specialIndentFirstLine",command:{name:"setSpecialIndent",payload:{kind:"firstLine"}},wide:!0},{type:"button",id:"editor-toolbar-special-indent-hanging",testId:"editor-toolbar-special-indent-hanging",iconName:"list-indent-increase",labelKey:"toolbar.specialIndentHanging",tooltipKey:"toolbar.specialIndentHanging",command:{name:"setSpecialIndent",payload:{kind:"hanging"}},wide:!0}]}}),t.push({type:"custom",id:"editor-toolbar-line-spacing-control",render:e=>qL({api:e})}),t.push({type:"separator",id:"sep-paragraph"}),t.push({type:"custom",id:"editor-toolbar-metrics",ribbonSize:"large",render:e=>function(e){const t=Fe(),n=e.api;return K(co,{icon:"sliders-horizontal",testId:"editor-toolbar-metrics-dropdown",get tooltip(){return t("metric.leftIndent")},hideChevron:!0,panelClass:"oasis-editor-toolbar-panel",keepMounted:!0,get children(){return[(a=BL(),Ie(a,K(_r,{icon:"file-up",get active(){return n.commands.state("togglePageBreakBefore").isActive},"data-testid":"editor-toolbar-page-break-before",onClick:()=>n.commands.execute("togglePageBreakBefore"),get tooltip(){return t("metric.pageBreakBefore")}}),null),Ie(a,K(_r,{icon:"link-2",get active(){return n.commands.state("toggleKeepWithNext").isActive},"data-testid":"editor-toolbar-keep-with-next",onClick:()=>n.commands.execute("toggleKeepWithNext"),get tooltip(){return t("metric.keepWithNext")}}),null),a),(e=WL(),Ie(e,K(ZE,{class:"oasis-editor-tool-metric",labelClass:"oasis-editor-tool-metric-label",get title(){return t("metric.spacingAfter")},get label(){return t("metric.after")},controlClass:"oasis-editor-tool-number","data-testid":"editor-toolbar-spacing-after",min:"0",step:"1",get value(){return FL(n,"setSpacingAfter")},onChange:e=>n.commands.execute("setSpacingAfter",null==e?"":String(e))}),null),Ie(e,K(ZE,{class:"oasis-editor-tool-metric",labelClass:"oasis-editor-tool-metric-label",get title(){return t("metric.leftIndent")},get label(){return t("metric.indent")},controlClass:"oasis-editor-tool-number","data-testid":"editor-toolbar-indent-left",min:"0",step:"1",get value(){return FL(n,"setIndentLeft")},onChange:e=>n.commands.execute("setIndentLeft",null==e?"":String(e))}),null),Ie(e,K(ZE,{class:"oasis-editor-tool-metric",labelClass:"oasis-editor-tool-metric-label",get title(){return t("metric.firstLineIndent")},get label(){return t("metric.first")},controlClass:"oasis-editor-tool-number","data-testid":"editor-toolbar-indent-first-line",step:"1",get value(){return FL(n,"setIndentFirstLine")},onChange:e=>n.commands.execute("setIndentFirstLine",null==e?"":String(e))}),null),Ie(e,K(ZE,{class:"oasis-editor-tool-metric",labelClass:"oasis-editor-tool-metric-label",get title(){return t("metric.hangingIndent")},get label(){return t("metric.hang")},controlClass:"oasis-editor-tool-number","data-testid":"editor-toolbar-indent-hanging",min:"0",step:"1",get value(){return FL(n,"setIndentHanging")},onChange:e=>n.commands.execute("setIndentHanging",null==e?"":String(e))}),null),Ie(e,K(VE,{class:"oasis-editor-tool-color",labelClass:"oasis-editor-tool-metric-label",get title(){return t("metric.paragraphBgColor")},get label(){return t("metric.paraBg")},type:"color",controlClass:"oasis-editor-tool-color-input","data-testid":"editor-toolbar-paragraph-shading",get value(){return FL(n,"setParagraphShading")||"#ffffff"},onChange:e=>n.commands.execute("setParagraphShading",e)}),null),Ie(e,K(_r,{icon:"frame","data-testid":"editor-toolbar-paragraph-borders",onClick:()=>n.commands.execute("applyParagraphBorders"),get tooltip(){return t("metric.applyBorders")}}),null),e)];var e,a}})}({api:e})}),t.push({type:"separator",id:"sep-metrics"});for(const n of wN)t.push({type:"button",id:n.id,testId:n.id,iconName:n.icon,command:n.command,tooltipKey:n.tooltipKey,labelKey:n.labelKey,ribbonSize:n.ribbonSize});return t.push({type:"custom",id:"editor-toolbar-tbl-style-options",tab:"tableDesign",group:"tableStyleOptions",row:1,ribbonSize:"large",render:e=>LV({api:e})}),t.push({type:"colorPicker",id:"editor-toolbar-tbl-shading",testId:"editor-toolbar-tbl-shading",kind:"shading",command:"tableCellShading",defaultValue:"#f1f5f9",tooltipKey:"table.cellColor",labelKey:"table.cellColor",ribbonSize:"large"}),t.push({type:"custom",id:"editor-toolbar-tbl-borders",testId:"editor-toolbar-tbl-borders",ribbonSize:"large",render:e=>function(e){const[t,n]=y(!1),a=t=>{e.api.commands.execute("tableApplyBorderPreset",t),n(!1),e.api.focusEditor()};return K(no,{get open(){return t()},onOpenChange:n,panelRole:"menu",panelClass:"oasis-editor-table-borders-menu",trigger:e=>K(_r,{ref(t){var n=e.ref;"function"==typeof n?n(t):e.ref=t},class:"oasis-editor-table-borders-trigger",get active(){return e.open},"aria-haspopup":"menu",get"aria-expanded"(){return e.open},tooltip:"Bordas",onClick:()=>e.toggle(),get children(){return[K(vr,{name:"tableBorders"}),K(xr,{children:"Bordas"}),K(ro,{})]}}),get children(){return[K(ne,{each:UV,children:(e,t)=>{return Ie(r=HV(),K(ne,{each:e,children:e=>K(wr,{class:"oasis-editor-table-borders-action",role:"menuitem",get label(){return e.label},onClick:()=>a(e.preset),get children(){return[K(GV,{get preset(){return e.preset}}),K(xr,{get children(){return e.label}})]}})}),null),Ie(r,(n=pe(()=>t()<UV.length-1),()=>n()&&DV()),null),r;var n,r}}),DV(),K(wr,{class:"oasis-editor-table-borders-action",role:"menuitem",label:"Linha Horizontal",onClick:()=>a("bottom"),get children(){return[K(xr,{class:"oasis-editor-table-borders-text-icon",children:"A"}),K(xr,{children:"Linha Horizontal"})]}}),K(wr,{class:"oasis-editor-table-borders-action",role:"menuitem",label:"Desenhar Tabela",onClick:()=>{e.api.commands.execute("toggleTableDrawBorders"),n(!1)},get children(){return[K(vr,{name:"tableBorders"}),K(xr,{children:"Desenhar Tabela"})]}}),K(wr,{class:"oasis-editor-table-borders-action",role:"menuitem",label:"Exibir Linhas de Grade",onClick:()=>{e.api.commands.execute("toggleTableGridlines"),n(!1)},get children(){return[K(vr,{name:"tableBorders"}),K(xr,{children:"Exibir Linhas de Grade"})]}}),K(wr,{class:"oasis-editor-table-borders-action",role:"menuitem",label:"Bordas e Sombreamento…",onClick:()=>{e.api.commands.execute("tableCellBorders")},get children(){return[K(vr,{name:"tableBorders"}),K(xr,{children:"Bordas e Sombreamento…"})]}})]}})}({api:e})}),t.push({type:"toggle",id:"editor-toolbar-tbl-border-painter",testId:"editor-toolbar-tbl-border-painter",iconName:"paintbrush",command:"toggleTableDrawBorders",label:"Pincel de Borda",tooltip:"Pincel de Borda",ribbonSize:"large"}),t.push({type:"custom",id:"editor-toolbar-tbl-style",testId:"editor-toolbar-tbl-style",tab:"tableDesign",group:"tableStyles",row:1,ribbonSize:"large",render:e=>kV({api:e,styles:EN(e),testId:"editor-toolbar-tbl-style"})}),t.push({type:"button",id:"editor-toolbar-tbl-distribute-rows",testId:"editor-toolbar-tbl-distribute-rows",iconName:"tableDistributeRows",command:"tableDistributeRows",tooltipKey:"table.distributeRows",labelKey:"table.distributeRows"}),t.push({type:"button",id:"editor-toolbar-tbl-distribute-cols",testId:"editor-toolbar-tbl-distribute-cols",iconName:"tableDistributeColumns",command:"tableDistributeColumns",tooltipKey:"table.distributeColumns",labelKey:"table.distributeColumns"}),t.push({type:"toggle",id:"editor-toolbar-tbl-autofit",testId:"editor-toolbar-tbl-autofit",iconName:"tableAutoFit",command:"tableToggleAutoFit",labelKey:"table.autoFit",tooltipKey:"table.autoFit"}),t.push({type:"custom",id:"editor-toolbar-margins",ribbonSize:"large",render:e=>_L({api:e})}),t.push({type:"custom",id:"editor-toolbar-section",ribbonSize:"large",render:e=>function(e){const t=Fe(),n=e.api;return K(co,{icon:"layout-template",get label(){return t("section.orientation")},testId:"editor-toolbar-section-dropdown",get tooltip(){return t("section.pageSetup")},panelClass:"oasis-editor-toolbar-panel oasis-editor-section-panel",keepMounted:!0,get children(){return[(a=DL(),Ie(a,K(_r,{icon:"rectangle-vertical",get label(){return t("section.portrait")},class:"oasis-editor-section-option",get active(){return!n.commands.state("toggleOrientation").isActive},"data-testid":"editor-toolbar-orientation-portrait",onClick:()=>n.commands.execute({name:"setOrientation",payload:"portrait"}),get tooltip(){return t("section.portrait")}}),null),Ie(a,K(_r,{icon:"rectangle-horizontal",get label(){return t("section.landscape")},class:"oasis-editor-section-option",get active(){return n.commands.state("toggleOrientation").isActive},"data-testid":"editor-toolbar-orientation-landscape",onClick:()=>n.commands.execute({name:"setOrientation",payload:"landscape"}),get tooltip(){return t("section.landscape")}}),null),a),(e=DL(),Ie(e,K(_r,{icon:"scissors",get label(){return t("section.secNext")},class:"oasis-editor-section-option","data-testid":"editor-toolbar-section-break-next",onClick:()=>n.commands.execute("sectionBreakNextPage"),get tooltip(){return t("section.secNextTooltip")}}),null),Ie(e,K(_r,{icon:"scissors-line-dashed",get label(){return t("section.secCont")},class:"oasis-editor-section-option","data-testid":"editor-toolbar-section-break-continuous",onClick:()=>n.commands.execute("sectionBreakContinuous"),get tooltip(){return t("section.secContTooltip")}}),null),e)];var e,a}})}({api:e})}),function(e){return e.map((e,t)=>{const n=bN[e.id]??{tab:"plugins",group:e.group??"general",row:1};return{...e,tab:e.tab??n.tab,group:n.group,row:e.row??n.row,order:e.order??t}})}(t)}function zN(e){switch(e.type){case"paragraph":return{...e,runs:e.runs.map(sk),style:e.style?{...e.style}:void 0,list:e.list?{...e.list}:void 0};case"table":return{...e,style:e.style?{...e.style,defaultCellMargins:e.style.defaultCellMargins?{...e.style.defaultCellMargins}:void 0,floating:e.style.floating?{...e.style.floating}:void 0,revision:e.style.revision?{...e.style.revision,previous:{...e.style.revision.previous}}:void 0}:void 0,gridRevision:e.gridRevision?{...e.gridRevision,previous:[...e.gridRevision.previous]}:void 0,rows:e.rows.map(e=>({...e,conditionalStyle:e.conditionalStyle?{...e.conditionalStyle}:void 0,style:e.style?{...e.style,revision:e.style.revision?{...e.style.revision}:void 0,propertyRevision:e.style.propertyRevision?{...e.style.propertyRevision,previous:{...e.style.propertyRevision.previous}}:void 0}:void 0,cells:e.cells.map(e=>({...e,conditionalStyle:e.conditionalStyle?{...e.conditionalStyle}:void 0,mergeRevisionState:e.mergeRevisionState?{...e.mergeRevisionState,previousCells:e.mergeRevisionState.previousCells.map(e=>({...e,mergeRevisionState:void 0,style:e.style?{...e.style}:void 0,blocks:e.blocks.map(zN)}))}:void 0,colSpan:e.colSpan??void 0,rowSpan:e.rowSpan??void 0,vMerge:e.vMerge??void 0,style:e.style?{...e.style,revision:e.style.revision?{...e.style.revision}:void 0,propertyRevision:e.style.propertyRevision?{...e.style.propertyRevision,previous:{...e.style.propertyRevision.previous}}:void 0}:void 0,blocks:e.blocks.map(zN)}))}))};default:return It(e,"block")}}function PN(e){var t,n,a,r,o,i;return{...e,blocks:e.blocks.map(zN),header:null==(t=e.header)?void 0:t.map(zN),firstPageHeader:null==(n=e.firstPageHeader)?void 0:n.map(zN),evenPageHeader:null==(a=e.evenPageHeader)?void 0:a.map(zN),footer:null==(r=e.footer)?void 0:r.map(zN),firstPageFooter:null==(o=e.firstPageFooter)?void 0:o.map(zN),evenPageFooter:null==(i=e.evenPageFooter)?void 0:i.map(zN)}}function ON(e){return{...e,blocks:e.blocks.map(zN)}}function qN(e){var t,n;if(!e)return;const a={};for(const[r,o]of Object.entries(e.items))a[r]=ON(o);return{items:a,settings:e.settings?{...e.settings}:void 0,separator:null==(t=e.separator)?void 0:t.map(zN),continuationSeparator:null==(n=e.continuationSeparator)?void 0:n.map(zN)}}function BN(e){return{...e,blocks:e.blocks.map(zN)}}function WN(e){var t,n;if(!e)return;const a={};for(const[r,o]of Object.entries(e.items))a[r]=BN(o);return{items:a,settings:e.settings?{...e.settings}:void 0,separator:null==(t=e.separator)?void 0:t.map(zN),continuationSeparator:null==(n=e.continuationSeparator)?void 0:n.map(zN)}}function FN(e){var t;return{...e,document:{...e.document,sections:null==(t=e.document.sections)?void 0:t.map(PN),footnotes:qN(e.document.footnotes),endnotes:WN(e.document.endnotes)},selection:{anchor:{...e.selection.anchor},focus:{...e.selection.focus}},activeSectionIndex:e.activeSectionIndex??0,activeZone:e.activeZone??"main",activeFootnoteId:e.activeFootnoteId}}
12
+ */Pb.exports=function e(t,n,a){function r(i,l){if(!n[i]){if(!t[i]){if(!l&&zb)return zb(i);if(o)return o(i,!0);var s=new Error("Cannot find module '"+i+"'");throw s.code="MODULE_NOT_FOUND",s}var d=n[i]={exports:{}};t[i][0].call(d.exports,function(e){return r(t[i][1][e]||e)},d,d.exports,e,t,n,a)}return n[i].exports}for(var o=zb,i=0;i<a.length;i++)r(a[i]);return r}({1:[function(e,t,n){var a=e("./utils"),r=e("./support"),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.encode=function(e){for(var t,n,r,i,l,s,d,c=[],u=0,p=e.length,h=p,f="string"!==a.getTypeOf(e);u<e.length;)h=p-u,r=f?(t=e[u++],n=u<p?e[u++]:0,u<p?e[u++]:0):(t=e.charCodeAt(u++),n=u<p?e.charCodeAt(u++):0,u<p?e.charCodeAt(u++):0),i=t>>2,l=(3&t)<<4|n>>4,s=1<h?(15&n)<<2|r>>6:64,d=2<h?63&r:64,c.push(o.charAt(i)+o.charAt(l)+o.charAt(s)+o.charAt(d));return c.join("")},n.decode=function(e){var t,n,a,i,l,s,d=0,c=0,u="data:";if(e.substr(0,u.length)===u)throw new Error("Invalid base64 input, it looks like a data url.");var p,h=3*(e=e.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(e.charAt(e.length-1)===o.charAt(64)&&h--,e.charAt(e.length-2)===o.charAt(64)&&h--,h%1!=0)throw new Error("Invalid base64 input, bad content length.");for(p=r.uint8array?new Uint8Array(0|h):new Array(0|h);d<e.length;)t=o.indexOf(e.charAt(d++))<<2|(i=o.indexOf(e.charAt(d++)))>>4,n=(15&i)<<4|(l=o.indexOf(e.charAt(d++)))>>2,a=(3&l)<<6|(s=o.indexOf(e.charAt(d++))),p[c++]=t,64!==l&&(p[c++]=n),64!==s&&(p[c++]=a);return p}},{"./support":30,"./utils":32}],2:[function(e,t,n){var a=e("./external"),r=e("./stream/DataWorker"),o=e("./stream/Crc32Probe"),i=e("./stream/DataLengthProbe");function l(e,t,n,a,r){this.compressedSize=e,this.uncompressedSize=t,this.crc32=n,this.compression=a,this.compressedContent=r}l.prototype={getContentWorker:function(){var e=new r(a.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new i("data_length")),t=this;return e.on("end",function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),e},getCompressedWorker:function(){return new r(a.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},l.createWorkerFrom=function(e,t,n){return e.pipe(new o).pipe(new i("uncompressedSize")).pipe(t.compressWorker(n)).pipe(new i("compressedSize")).withStreamInfo("compression",t)},t.exports=l},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,n){var a=e("./stream/GenericWorker");n.STORE={magic:"\0\0",compressWorker:function(){return new a("STORE compression")},uncompressWorker:function(){return new a("STORE decompression")}},n.DEFLATE=e("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,n){var a=e("./utils"),r=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var a=0;a<8;a++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t){return void 0!==e&&e.length?"string"!==a.getTypeOf(e)?function(e,t,n,a){var o=r,i=a+n;e^=-1;for(var l=a;l<i;l++)e=e>>>8^o[255&(e^t[l])];return-1^e}(0|t,e,e.length,0):function(e,t,n,a){var o=r,i=a+n;e^=-1;for(var l=a;l<i;l++)e=e>>>8^o[255&(e^t.charCodeAt(l))];return-1^e}(0|t,e,e.length,0):0}},{"./utils":32}],5:[function(e,t,n){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){var a=null;a="undefined"!=typeof Promise?Promise:e("lie"),t.exports={Promise:a}},{lie:37}],7:[function(e,t,n){var a="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,r=e("pako"),o=e("./utils"),i=e("./stream/GenericWorker"),l=a?"uint8array":"array";function s(e,t){i.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}n.magic="\b\0",o.inherits(s,i),s.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(o.transformTo(l,e.data),!1)},s.prototype.flush=function(){i.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},s.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this._pako=null},s.prototype._createPako=function(){this._pako=new r[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 s("Deflate",e)},n.uncompressWorker=function(){return new s("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,n){function a(e,t){var n,a="";for(n=0;n<t;n++)a+=String.fromCharCode(255&e),e>>>=8;return a}function r(e,t,n,r,i,c){var u,p,h=e.file,f=e.compression,g=c!==l.utf8encode,m=o.transformTo("string",c(h.name)),b=o.transformTo("string",l.utf8encode(h.name)),v=h.comment,y=o.transformTo("string",c(v)),w=o.transformTo("string",l.utf8encode(v)),x=b.length!==h.name.length,M=w.length!==v.length,S="",A="",I="",C=h.dir,T=h.date,k={crc32:0,compressedSize:0,uncompressedSize:0};t&&!n||(k.crc32=e.crc32,k.compressedSize=e.compressedSize,k.uncompressedSize=e.uncompressedSize);var R=0;t&&(R|=8),g||!x&&!M||(R|=2048);var E,L,V,N=0,z=0;C&&(N|=16),"UNIX"===i?(z=798,N|=(E=h.unixPermissions,L=C,V=E,E||(V=L?16893:33204),(65535&V)<<16)):(z=20,N|=function(e){return 63&(e||0)}(h.dosPermissions)),u=T.getUTCHours(),u<<=6,u|=T.getUTCMinutes(),u<<=5,u|=T.getUTCSeconds()/2,p=T.getUTCFullYear()-1980,p<<=4,p|=T.getUTCMonth()+1,p<<=5,p|=T.getUTCDate(),x&&(A=a(1,1)+a(s(m),4)+b,S+="up"+a(A.length,2)+A),M&&(I=a(1,1)+a(s(y),4)+w,S+="uc"+a(I.length,2)+I);var P="";return P+="\n\0",P+=a(R,2),P+=f.magic,P+=a(u,2),P+=a(p,2),P+=a(k.crc32,4),P+=a(k.compressedSize,4),P+=a(k.uncompressedSize,4),P+=a(m.length,2),P+=a(S.length,2),{fileRecord:d.LOCAL_FILE_HEADER+P+m+S,dirRecord:d.CENTRAL_FILE_HEADER+a(z,2)+P+a(y.length,2)+"\0\0\0\0"+a(N,4)+a(r,4)+m+S+y}}var o=e("../utils"),i=e("../stream/GenericWorker"),l=e("../utf8"),s=e("../crc32"),d=e("../signature");function c(e,t,n,a){i.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=a,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(c,i),c.prototype.push=function(e){var t=e.meta.percent||0,n=this.entriesCount,a=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,i.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-a-1))/n:100}}))},c.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=r(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},c.prototype.closedSource=function(e){this.accumulate=!1;var t,n=this.streamFiles&&!e.file.dir,o=r(e,n,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(o.dirRecord),n)this.push({data:(t=e,d.DATA_DESCRIPTOR+a(t.crc32,4)+a(t.compressedSize,4)+a(t.uncompressedSize,4)),meta:{percent:100}});else for(this.push({data:o.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},c.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t<this.dirRecords.length;t++)this.push({data:this.dirRecords[t],meta:{percent:100}});var n,r,i,l,s,c,u=this.bytesWritten-e,p=(n=this.dirRecords.length,r=u,i=e,l=this.zipComment,s=this.encodeFileName,c=o.transformTo("string",s(l)),d.CENTRAL_DIRECTORY_END+"\0\0\0\0"+a(n,2)+a(n,2)+a(r,4)+a(i,4)+a(c.length,2)+c);this.push({data:p,meta:{percent:100}})},c.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},c.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;return e.on("data",function(e){t.processChunk(e)}),e.on("end",function(){t.closedSource(t.previous.streamInfo),t._sources.length?t.prepareNextSource():t.end()}),e.on("error",function(e){t.error(e)}),this},c.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},c.prototype.error=function(e){var t=this._sources;if(!i.prototype.error.call(this,e))return!1;for(var n=0;n<t.length;n++)try{t[n].error(e)}catch(a){}return!0},c.prototype.lock=function(){i.prototype.lock.call(this);for(var e=this._sources,t=0;t<e.length;t++)e[t].lock()},t.exports=c},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(e,t,n){var a=e("../compressions"),r=e("./ZipFileWorker");n.generateWorker=function(e,t,n){var o=new r(t.streamFiles,n,t.platform,t.encodeFileName),i=0;try{e.forEach(function(e,n){i++;var r=function(e,t){var n=e||t,r=a[n];if(!r)throw new Error(n+" is not a valid compression method !");return r}(n.options.compression,t.compression),l=n.options.compressionOptions||t.compressionOptions||{},s=n.dir,d=n.date;n._compressWorker(r,l).withStreamInfo("file",{name:e,dir:s,date:d,comment:n.comment||"",unixPermissions:n.unixPermissions,dosPermissions:n.dosPermissions}).pipe(o)}),o.entriesCount=i}catch(l){o.error(l)}return o}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(e,t,n){function a(){if(!(this instanceof a))return new a;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var e=new a;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e}}(a.prototype=e("./object")).loadAsync=e("./load"),a.support=e("./support"),a.defaults=e("./defaults"),a.version="3.10.1",a.loadAsync=function(e,t){return(new a).loadAsync(e,t)},a.external=e("./external"),t.exports=a},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(e,t,n){var a=e("./utils"),r=e("./external"),o=e("./utf8"),i=e("./zipEntries"),l=e("./stream/Crc32Probe"),s=e("./nodejsUtils");function d(e){return new r.Promise(function(t,n){var a=e.decompressed.getContentWorker().pipe(new l);a.on("error",function(e){n(e)}).on("end",function(){a.streamInfo.crc32!==e.decompressed.crc32?n(new Error("Corrupted zip : CRC32 mismatch")):t()}).resume()})}t.exports=function(e,t){var n=this;return t=a.extend(t||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:o.utf8decode}),s.isNode&&s.isStream(e)?r.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):a.prepareContent("the loaded zip file",e,!0,t.optimizedBinaryString,t.base64).then(function(e){var n=new i(t);return n.load(e),n}).then(function(e){var n=[r.Promise.resolve(e)],a=e.files;if(t.checkCRC32)for(var o=0;o<a.length;o++)n.push(d(a[o]));return r.Promise.all(n)}).then(function(e){for(var r=e.shift(),o=r.files,i=0;i<o.length;i++){var l=o[i],s=l.fileNameStr,d=a.resolve(l.fileNameStr);n.file(d,l.decompressed,{binary:!0,optimizedBinaryString:!0,date:l.date,dir:l.dir,comment:l.fileCommentStr.length?l.fileCommentStr:null,unixPermissions:l.unixPermissions,dosPermissions:l.dosPermissions,createFolders:t.createFolders}),l.dir||(n.file(d).unsafeOriginalName=s)}return r.zipComment.length&&(n.comment=r.zipComment),n})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(e,t,n){var a=e("../utils"),r=e("../stream/GenericWorker");function o(e,t){r.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=!1,this._bindStream(t)}a.inherits(o,r),o.prototype._bindStream=function(e){var t=this;(this._stream=e).pause(),e.on("data",function(e){t.push({data:e,meta:{percent:0}})}).on("error",function(e){t.isPaused?this.generatedError=e:t.error(e)}).on("end",function(){t.isPaused?t._upstreamEnded=!0:t.end()})},o.prototype.pause=function(){return!!r.prototype.pause.call(this)&&(this._stream.pause(),!0)},o.prototype.resume=function(){return!!r.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},t.exports=o},{"../stream/GenericWorker":28,"../utils":32}],13:[function(e,t,n){var a=e("readable-stream").Readable;function r(e,t,n){a.call(this,t),this._helper=e;var r=this;e.on("data",function(e,t){r.push(e)||r._helper.pause(),n&&n(t)}).on("error",function(e){r.emit("error",e)}).on("end",function(){r.push(null)})}e("../utils").inherits(r,a),r.prototype._read=function(){this._helper.resume()},t.exports=r},{"../utils":32,"readable-stream":16}],14:[function(e,t,n){t.exports={isNode:"undefined"!=typeof Buffer,newBufferFrom:function(e,t){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(e,t);if("number"==typeof e)throw new Error('The "data" argument must not be a number');return new Buffer(e,t)},allocBuffer:function(e){if(Buffer.alloc)return Buffer.alloc(e);var t=new Buffer(e);return t.fill(0),t},isBuffer:function(e){return Buffer.isBuffer(e)},isStream:function(e){return e&&"function"==typeof e.on&&"function"==typeof e.pause&&"function"==typeof e.resume}}},{}],15:[function(e,t,n){function a(e,t,n){var a,r=o.getTypeOf(t),l=o.extend(n||{},s);l.date=l.date||new Date,null!==l.compression&&(l.compression=l.compression.toUpperCase()),"string"==typeof l.unixPermissions&&(l.unixPermissions=parseInt(l.unixPermissions,8)),l.unixPermissions&&16384&l.unixPermissions&&(l.dir=!0),l.dosPermissions&&16&l.dosPermissions&&(l.dir=!0),l.dir&&(e=g(e)),l.createFolders&&(a=f(e))&&m.call(this,a,!0);var u="string"===r&&!1===l.binary&&!1===l.base64;n&&void 0!==n.binary||(l.binary=!u),(t instanceof d&&0===t.uncompressedSize||l.dir||!t||0===t.length)&&(l.base64=!1,l.binary=!0,t="",l.compression="STORE",r="string");var b=null;b=t instanceof d||t instanceof i?t:p.isNode&&p.isStream(t)?new h(e,t):o.prepareContent(e,t,l.binary,l.optimizedBinaryString,l.base64);var v=new c(e,b,l);this.files[e]=v}var r=e("./utf8"),o=e("./utils"),i=e("./stream/GenericWorker"),l=e("./stream/StreamHelper"),s=e("./defaults"),d=e("./compressedObject"),c=e("./zipObject"),u=e("./generate"),p=e("./nodejsUtils"),h=e("./nodejs/NodejsStreamInputAdapter"),f=function(e){"/"===e.slice(-1)&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return 0<t?e.substring(0,t):""},g=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},m=function(e,t){return t=void 0!==t?t:s.createFolders,e=g(e),this.files[e]||a.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function b(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var v={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,n,a;for(t in this.files)a=this.files[t],(n=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(n,a)},filter:function(e){var t=[];return this.forEach(function(n,a){e(n,a)&&t.push(a)}),t},file:function(e,t,n){if(1!==arguments.length)return e=this.root+e,a.call(this,e,t,n),this;if(b(e)){var r=e;return this.filter(function(e,t){return!t.dir&&r.test(e)})}var o=this.files[this.root+e];return o&&!o.dir?o:null},folder:function(e){if(!e)return this;if(b(e))return this.filter(function(t,n){return n.dir&&e.test(t)});var t=this.root+e,n=m.call(this,t),a=this.clone();return a.root=n.name,a},remove:function(e){e=this.root+e;var t=this.files[e];if(t||("/"!==e.slice(-1)&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var n=this.filter(function(t,n){return n.name.slice(0,e.length)===e}),a=0;a<n.length;a++)delete this.files[n[a].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(e){var t,n={};try{if((n=o.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:r.utf8encode})).type=n.type.toLowerCase(),n.compression=n.compression.toUpperCase(),"binarystring"===n.type&&(n.type="string"),!n.type)throw new Error("No output type specified.");o.checkSupport(n.type),"darwin"!==n.platform&&"freebsd"!==n.platform&&"linux"!==n.platform&&"sunos"!==n.platform||(n.platform="UNIX"),"win32"===n.platform&&(n.platform="DOS");var a=n.comment||this.comment||"";t=u.generateWorker(this,n,a)}catch(s){(t=new i("error")).error(s)}return new l(t,n.type||"string",n.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){return(e=e||{}).type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(t)}};t.exports=v},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(e,t,n){t.exports=e("stream")},{stream:void 0}],17:[function(e,t,n){var a=e("./DataReader");function r(e){a.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=255&e[t]}e("../utils").inherits(r,a),r.prototype.byteAt=function(e){return this.data[this.zero+e]},r.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),n=e.charCodeAt(1),a=e.charCodeAt(2),r=e.charCodeAt(3),o=this.length-4;0<=o;--o)if(this.data[o]===t&&this.data[o+1]===n&&this.data[o+2]===a&&this.data[o+3]===r)return o-this.zero;return-1},r.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1),a=e.charCodeAt(2),r=e.charCodeAt(3),o=this.readData(4);return t===o[0]&&n===o[1]&&a===o[2]&&r===o[3]},r.prototype.readData=function(e){if(this.checkOffset(e),0===e)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=r},{"../utils":32,"./DataReader":18}],18:[function(e,t,n){var a=e("../utils");function r(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}r.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length<this.zero+e||e<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e},skip:function(e){this.setIndex(this.index+e)},byteAt:function(){},readInt:function(e){var t,n=0;for(this.checkOffset(e),t=this.index+e-1;t>=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return a.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=r},{"../utils":32}],19:[function(e,t,n){var a=e("./Uint8ArrayReader");function r(e){a.call(this,e)}e("../utils").inherits(r,a),r.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=r},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,n){var a=e("./DataReader");function r(e){a.call(this,e)}e("../utils").inherits(r,a),r.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},r.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},r.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},r.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=r},{"../utils":32,"./DataReader":18}],21:[function(e,t,n){var a=e("./ArrayReader");function r(e){a.call(this,e)}e("../utils").inherits(r,a),r.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=r},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,n){var a=e("../utils"),r=e("../support"),o=e("./ArrayReader"),i=e("./StringReader"),l=e("./NodeBufferReader"),s=e("./Uint8ArrayReader");t.exports=function(e){var t=a.getTypeOf(e);return a.checkSupport(t),"string"!==t||r.uint8array?"nodebuffer"===t?new l(e):r.uint8array?new s(a.transformTo("uint8array",e)):new o(a.transformTo("array",e)):new i(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,n){n.LOCAL_FILE_HEADER="PK",n.CENTRAL_FILE_HEADER="PK",n.CENTRAL_DIRECTORY_END="PK",n.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",n.ZIP64_CENTRAL_DIRECTORY_END="PK",n.DATA_DESCRIPTOR="PK\b"},{}],24:[function(e,t,n){var a=e("./GenericWorker"),r=e("../utils");function o(e){a.call(this,"ConvertWorker to "+e),this.destType=e}r.inherits(o,a),o.prototype.processChunk=function(e){this.push({data:r.transformTo(this.destType,e.data),meta:e.meta})},t.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,n){var a=e("./GenericWorker"),r=e("../crc32");function o(){a.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}e("../utils").inherits(o,a),o.prototype.processChunk=function(e){this.streamInfo.crc32=r(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,n){var a=e("../utils"),r=e("./GenericWorker");function o(e){r.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}a.inherits(o,r),o.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}r.prototype.processChunk.call(this,e)},t.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,n){var a=e("../utils"),r=e("./GenericWorker");function o(e){r.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=a.getTypeOf(e),t.isPaused||t._tickAndRepeat()},function(e){t.error(e)})}a.inherits(o,r),o.prototype.cleanUp=function(){r.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!r.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,a.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(a.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.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=o},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,n){function a(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}a.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<this._listeners[e].length;n++)this._listeners[e][n].call(this,t)},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=e.streamInfo,this.mergeStreamInfo(),this.previous=e;var t=this;return e.on("data",function(e){t.processChunk(e)}),e.on("end",function(){t.end()}),e.on("error",function(e){t.error(e)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var e=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),e=!0),this.previous&&this.previous.resume(),!e},flush:function(){},processChunk:function(e){this.push(e)},withStreamInfo:function(e,t){return this.extraStreamInfo[e]=t,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,e)&&(this.streamInfo[e]=this.extraStreamInfo[e])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var e="Worker "+this.name;return this.previous?this.previous+" -> "+e:e}},t.exports=a},{}],29:[function(e,t,n){var a=e("../utils"),r=e("./ConvertWorker"),o=e("./GenericWorker"),i=e("../base64"),l=e("../support"),s=e("../external"),d=null;if(l.nodestream)try{d=e("../nodejs/NodejsStreamOutputAdapter")}catch(p){}function c(e,t){return new s.Promise(function(n,r){var o=[],l=e._internalType,s=e._outputType,d=e._mimeType;e.on("data",function(e,n){o.push(e),t&&t(n)}).on("error",function(e){o=[],r(e)}).on("end",function(){try{var e=function(e,t,n){switch(e){case"blob":return a.newBlob(a.transformTo("arraybuffer",t),n);case"base64":return i.encode(t);default:return a.transformTo(e,t)}}(s,function(e,t){var n,a=0,r=null,o=0;for(n=0;n<t.length;n++)o+=t[n].length;switch(e){case"string":return t.join("");case"array":return Array.prototype.concat.apply([],t);case"uint8array":for(r=new Uint8Array(o),n=0;n<t.length;n++)r.set(t[n],a),a+=t[n].length;return r;case"nodebuffer":return Buffer.concat(t);default:throw new Error("concat : unsupported type '"+e+"'")}}(l,o),d);n(e)}catch(t){r(t)}o=[]}).resume()})}function u(e,t,n){var i=t;switch(t){case"blob":case"arraybuffer":i="uint8array";break;case"base64":i="string"}try{this._internalType=i,this._outputType=t,this._mimeType=n,a.checkSupport(i),this._worker=e.pipe(new r(i)),e.lock()}catch(l){this._worker=new o("error"),this._worker.error(l)}}u.prototype={accumulate:function(e){return c(this,e)},on:function(e,t){var n=this;return"data"===e?this._worker.on(e,function(e){t.call(n,e.data,e.meta)}):this._worker.on(e,function(){a.delay(t,arguments,n)}),this},resume:function(){return a.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(a.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new d(this,{objectMode:"nodebuffer"!==this._outputType},e)}},t.exports=u},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(e,t,n){if(n.base64=!0,n.array=!0,n.string=!0,n.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,n.nodebuffer="undefined"!=typeof Buffer,n.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)n.blob=!1;else{var a=new ArrayBuffer(0);try{n.blob=0===new Blob([a],{type:"application/zip"}).size}catch(o){try{var r=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);r.append(a),n.blob=0===r.getBlob("application/zip").size}catch(i){n.blob=!1}}}try{n.nodestream=!!e("readable-stream").Readable}catch(o){n.nodestream=!1}},{"readable-stream":16}],31:[function(e,t,n){for(var a=e("./utils"),r=e("./support"),o=e("./nodejsUtils"),i=e("./stream/GenericWorker"),l=new Array(256),s=0;s<256;s++)l[s]=252<=s?6:248<=s?5:240<=s?4:224<=s?3:192<=s?2:1;function d(){i.call(this,"utf-8 decode"),this.leftOver=null}function c(){i.call(this,"utf-8 encode")}l[254]=l[254]=1,n.utf8encode=function(e){return r.nodebuffer?o.newBufferFrom(e,"utf-8"):function(e){var t,n,a,o,i,l=e.length,s=0;for(o=0;o<l;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1<l&&56320==(64512&(a=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(a-56320),o++),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=r.uint8array?new Uint8Array(s):new Array(s),o=i=0;i<s;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1<l&&56320==(64512&(a=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(a-56320),o++),n<128?t[i++]=n:(n<2048?t[i++]=192|n>>>6:(n<65536?t[i++]=224|n>>>12:(t[i++]=240|n>>>18,t[i++]=128|n>>>12&63),t[i++]=128|n>>>6&63),t[i++]=128|63&n);return t}(e)},n.utf8decode=function(e){return r.nodebuffer?a.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,n,r,o,i=e.length,s=new Array(2*i);for(t=n=0;t<i;)if((r=e[t++])<128)s[n++]=r;else if(4<(o=l[r]))s[n++]=65533,t+=o-1;else{for(r&=2===o?31:3===o?15:7;1<o&&t<i;)r=r<<6|63&e[t++],o--;1<o?s[n++]=65533:r<65536?s[n++]=r:(r-=65536,s[n++]=55296|r>>10&1023,s[n++]=56320|1023&r)}return s.length!==n&&(s.subarray?s=s.subarray(0,n):s.length=n),a.applyFromCharCode(s)}(e=a.transformTo(r.uint8array?"uint8array":"array",e))},a.inherits(d,i),d.prototype.processChunk=function(e){var t=a.transformTo(r.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(r.uint8array){var o=t;(t=new Uint8Array(o.length+this.leftOver.length)).set(this.leftOver,0),t.set(o,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var i=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;0<=n&&128==(192&e[n]);)n--;return n<0||0===n?t:n+l[e[n]]>t?n:t}(t),s=t;i!==t.length&&(r.uint8array?(s=t.subarray(0,i),this.leftOver=t.subarray(i,t.length)):(s=t.slice(0,i),this.leftOver=t.slice(i,t.length))),this.push({data:n.utf8decode(s),meta:e.meta})},d.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=d,a.inherits(c,i),c.prototype.processChunk=function(e){this.push({data:n.utf8encode(e.data),meta:e.meta})},n.Utf8EncodeWorker=c},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,n){var a=e("./support"),r=e("./base64"),o=e("./nodejsUtils"),i=e("./external");function l(e){return e}function s(e,t){for(var n=0;n<e.length;++n)t[n]=255&e.charCodeAt(n);return t}e("setimmediate"),n.newBlob=function(e,t){n.checkSupport("blob");try{return new Blob([e],{type:t})}catch(r){try{var a=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return a.append(e),a.getBlob(t)}catch(o){throw new Error("Bug : can't construct the Blob.")}}};var d={stringifyByChunk:function(e,t,n){var a=[],r=0,o=e.length;if(o<=n)return String.fromCharCode.apply(null,e);for(;r<o;)"array"===t||"nodebuffer"===t?a.push(String.fromCharCode.apply(null,e.slice(r,Math.min(r+n,o)))):a.push(String.fromCharCode.apply(null,e.subarray(r,Math.min(r+n,o)))),r+=n;return a.join("")},stringifyByChar:function(e){for(var t="",n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t},applyCanBeUsed:{uint8array:function(){try{return a.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(e){return!1}}(),nodebuffer:function(){try{return a.nodebuffer&&1===String.fromCharCode.apply(null,o.allocBuffer(1)).length}catch(e){return!1}}()}};function c(e){var t=65536,a=n.getTypeOf(e),r=!0;if("uint8array"===a?r=d.applyCanBeUsed.uint8array:"nodebuffer"===a&&(r=d.applyCanBeUsed.nodebuffer),r)for(;1<t;)try{return d.stringifyByChunk(e,a,t)}catch(o){t=Math.floor(t/2)}return d.stringifyByChar(e)}function u(e,t){for(var n=0;n<e.length;n++)t[n]=e[n];return t}n.applyFromCharCode=c;var p={};p.string={string:l,array:function(e){return s(e,new Array(e.length))},arraybuffer:function(e){return p.string.uint8array(e).buffer},uint8array:function(e){return s(e,new Uint8Array(e.length))},nodebuffer:function(e){return s(e,o.allocBuffer(e.length))}},p.array={string:c,array:l,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return o.newBufferFrom(e)}},p.arraybuffer={string:function(e){return c(new Uint8Array(e))},array:function(e){return u(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:l,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return o.newBufferFrom(new Uint8Array(e))}},p.uint8array={string:c,array:function(e){return u(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:l,nodebuffer:function(e){return o.newBufferFrom(e)}},p.nodebuffer={string:c,array:function(e){return u(e,new Array(e.length))},arraybuffer:function(e){return p.nodebuffer.uint8array(e).buffer},uint8array:function(e){return u(e,new Uint8Array(e.length))},nodebuffer:l},n.transformTo=function(e,t){if(t=t||"",!e)return t;n.checkSupport(e);var a=n.getTypeOf(t);return p[a][e](t)},n.resolve=function(e){for(var t=e.split("/"),n=[],a=0;a<t.length;a++){var r=t[a];"."===r||""===r&&0!==a&&a!==t.length-1||(".."===r?n.pop():n.push(r))}return n.join("/")},n.getTypeOf=function(e){return"string"==typeof e?"string":"[object Array]"===Object.prototype.toString.call(e)?"array":a.nodebuffer&&o.isBuffer(e)?"nodebuffer":a.uint8array&&e instanceof Uint8Array?"uint8array":a.arraybuffer&&e instanceof ArrayBuffer?"arraybuffer":void 0},n.checkSupport=function(e){if(!a[e.toLowerCase()])throw new Error(e+" is not supported by this platform")},n.MAX_VALUE_16BITS=65535,n.MAX_VALUE_32BITS=-1,n.pretty=function(e){var t,n,a="";for(n=0;n<(e||"").length;n++)a+="\\x"+((t=e.charCodeAt(n))<16?"0":"")+t.toString(16).toUpperCase();return a},n.delay=function(e,t,n){setImmediate(function(){e.apply(n||null,t||[])})},n.inherits=function(e,t){function n(){}n.prototype=t.prototype,e.prototype=new n},n.extend=function(){var e,t,n={};for(e=0;e<arguments.length;e++)for(t in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],t)&&void 0===n[t]&&(n[t]=arguments[e][t]);return n},n.prepareContent=function(e,t,o,l,d){return i.Promise.resolve(t).then(function(e){return a.blob&&(e instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(e)))&&"undefined"!=typeof FileReader?new i.Promise(function(t,n){var a=new FileReader;a.onload=function(e){t(e.target.result)},a.onerror=function(e){n(e.target.error)},a.readAsArrayBuffer(e)}):e}).then(function(t){var c,u=n.getTypeOf(t);return u?("arraybuffer"===u?t=n.transformTo("uint8array",t):"string"===u&&(d?t=r.decode(t):o&&!0!==l&&(t=s(c=t,a.uint8array?new Uint8Array(c.length):new Array(c.length)))),t):i.Promise.reject(new Error("Can't read the data of '"+e+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(e,t,n){var a=e("./reader/readerFor"),r=e("./utils"),o=e("./signature"),i=e("./zipEntry"),l=e("./support");function s(e){this.files=[],this.loadOptions=e}s.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var t=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+r.pretty(t)+", expected "+r.pretty(e)+")")}},isSignature:function(e,t){var n=this.reader.index;this.reader.setIndex(e);var a=this.reader.readString(4)===t;return this.reader.setIndex(n),a},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var e=this.reader.readData(this.zipCommentLength),t=l.uint8array?"uint8array":"array",n=r.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(n)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var e,t,n,a=this.zip64EndOfCentralSize-44;0<a;)e=this.reader.readInt(2),t=this.reader.readInt(4),n=this.reader.readData(t),this.zip64ExtensibleData[e]={id:e,length:t,value:n}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e<this.files.length;e++)t=this.files[e],this.reader.setIndex(t.localHeaderOffset),this.checkSignature(o.LOCAL_FILE_HEADER),t.readLocalPart(this.reader),t.handleUTF8(),t.processAttributes()},readCentralDir:function(){var e;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(o.CENTRAL_FILE_HEADER);)(e=new i({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(e);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature(o.CENTRAL_DIRECTORY_END);if(e<0)throw this.isSignature(0,o.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(e);var t=e;if(this.checkSignature(o.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===r.MAX_VALUE_16BITS||this.diskWithCentralDirStart===r.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===r.MAX_VALUE_16BITS||this.centralDirRecords===r.MAX_VALUE_16BITS||this.centralDirSize===r.MAX_VALUE_32BITS||this.centralDirOffset===r.MAX_VALUE_32BITS){if(this.zip64=!0,(e=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(e),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,o.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var n=this.centralDirOffset+this.centralDirSize;this.zip64&&(n+=20,n+=12+this.zip64EndOfCentralSize);var a=t-n;if(0<a)this.isSignature(t,o.CENTRAL_FILE_HEADER)||(this.reader.zero=a);else if(a<0)throw new Error("Corrupted zip: missing "+Math.abs(a)+" bytes.")},prepareReader:function(e){this.reader=a(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},t.exports=s},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(e,t,n){var a=e("./reader/readerFor"),r=e("./utils"),o=e("./compressedObject"),i=e("./crc32"),l=e("./utf8"),s=e("./compressions"),d=e("./support");function c(e,t){this.options=e,this.loadOptions=t}c.prototype={isEncrypted:function(){return!(1&~this.bitFlag)},useUTF8:function(){return!(2048&~this.bitFlag)},readLocalPart:function(e){var t,n;if(e.skip(22),this.fileNameLength=e.readInt(2),n=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(n),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(t=function(e){for(var t in s)if(Object.prototype.hasOwnProperty.call(s,t)&&s[t].magic===e)return s[t];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+r.pretty(this.compressionMethod)+" unknown (inner file : "+r.transformTo("string",this.fileName)+")");this.decompressed=new o(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0==e&&(this.dosPermissions=63&this.externalFileAttributes),3==e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=a(this.extraFields[1].value);this.uncompressedSize===r.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===r.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===r.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===r.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,n,a,r=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+4<r;)t=e.readInt(2),n=e.readInt(2),a=e.readData(n),this.extraFields[t]={id:t,length:n,value:a};e.setIndex(r)},handleUTF8:function(){var e=d.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=l.utf8decode(this.fileName),this.fileCommentStr=l.utf8decode(this.fileComment);else{var t=this.findExtraFieldUnicodePath();if(null!==t)this.fileNameStr=t;else{var n=r.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(n)}var a=this.findExtraFieldUnicodeComment();if(null!==a)this.fileCommentStr=a;else{var o=r.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(o)}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var t=a(e.value);return 1!==t.readInt(1)||i(this.fileName)!==t.readInt(4)?null:l.utf8decode(t.readData(e.length-5))}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var t=a(e.value);return 1!==t.readInt(1)||i(this.fileComment)!==t.readInt(4)?null:l.utf8decode(t.readData(e.length-5))}return null}},t.exports=c},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(e,t,n){function a(e,t,n){this.name=e,this.dir=n.dir,this.date=n.date,this.comment=n.comment,this.unixPermissions=n.unixPermissions,this.dosPermissions=n.dosPermissions,this._data=t,this._dataBinary=n.binary,this.options={compression:n.compression,compressionOptions:n.compressionOptions}}var r=e("./stream/StreamHelper"),o=e("./stream/DataWorker"),i=e("./utf8"),l=e("./compressedObject"),s=e("./stream/GenericWorker");a.prototype={internalStream:function(e){var t=null,n="string";try{if(!e)throw new Error("No output type specified.");var a="string"===(n=e.toLowerCase())||"text"===n;"binarystring"!==n&&"text"!==n||(n="string"),t=this._decompressWorker();var o=!this._dataBinary;o&&!a&&(t=t.pipe(new i.Utf8EncodeWorker)),!o&&a&&(t=t.pipe(new i.Utf8DecodeWorker))}catch(l){(t=new s("error")).error(l)}return new r(t,n,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof l&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var n=this._decompressWorker();return this._dataBinary||(n=n.pipe(new i.Utf8EncodeWorker)),l.createWorkerFrom(n,e,t)},_decompressWorker:function(){return this._data instanceof l?this._data.getContentWorker():this._data instanceof s?this._data:new o(this._data)}};for(var d=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],c=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},u=0;u<d.length;u++)a.prototype[d[u]]=c;t.exports=a},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(e,t,n){(function(e){var n,a,r=e.MutationObserver||e.WebKitMutationObserver;if(r){var o=0,i=new r(c),l=e.document.createTextNode("");i.observe(l,{characterData:!0}),n=function(){l.data=o=++o%2}}else if(e.setImmediate||void 0===e.MessageChannel)n="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){c(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(c,0)};else{var s=new e.MessageChannel;s.port1.onmessage=c,n=function(){s.port2.postMessage(0)}}var d=[];function c(){var e,t;a=!0;for(var n=d.length;n;){for(t=d,d=[],e=-1;++e<n;)t[e]();n=d.length}a=!1}t.exports=function(e){1!==d.push(e)||a||n()}}).call(this,void 0!==ps?ps:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],37:[function(e,t,n){var a=e("immediate");function r(){}var o={},i=["REJECTED"],l=["FULFILLED"],s=["PENDING"];function d(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=s,this.queue=[],this.outcome=void 0,e!==r&&h(this,e)}function c(e,t,n){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof n&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function u(e,t,n){a(function(){var a;try{a=t(n)}catch(r){return o.reject(e,r)}a===e?o.reject(e,new TypeError("Cannot resolve promise with itself")):o.resolve(e,a)})}function p(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function h(e,t){var n=!1;function a(t){n||(n=!0,o.reject(e,t))}function r(t){n||(n=!0,o.resolve(e,t))}var i=f(function(){t(r,a)});"error"===i.status&&a(i.value)}function f(e,t){var n={};try{n.value=e(t),n.status="success"}catch(a){n.status="error",n.value=a}return n}(t.exports=d).prototype.finally=function(e){if("function"!=typeof e)return this;var t=this.constructor;return this.then(function(n){return t.resolve(e()).then(function(){return n})},function(n){return t.resolve(e()).then(function(){throw n})})},d.prototype.catch=function(e){return this.then(null,e)},d.prototype.then=function(e,t){if("function"!=typeof e&&this.state===l||"function"!=typeof t&&this.state===i)return this;var n=new this.constructor(r);return this.state!==s?u(n,this.state===l?e:t,this.outcome):this.queue.push(new c(n,e,t)),n},c.prototype.callFulfilled=function(e){o.resolve(this.promise,e)},c.prototype.otherCallFulfilled=function(e){u(this.promise,this.onFulfilled,e)},c.prototype.callRejected=function(e){o.reject(this.promise,e)},c.prototype.otherCallRejected=function(e){u(this.promise,this.onRejected,e)},o.resolve=function(e,t){var n=f(p,t);if("error"===n.status)return o.reject(e,n.value);var a=n.value;if(a)h(e,a);else{e.state=l,e.outcome=t;for(var r=-1,i=e.queue.length;++r<i;)e.queue[r].callFulfilled(t)}return e},o.reject=function(e,t){e.state=i,e.outcome=t;for(var n=-1,a=e.queue.length;++n<a;)e.queue[n].callRejected(t);return e},d.resolve=function(e){return e instanceof this?e:o.resolve(new this(r),e)},d.reject=function(e){var t=new this(r);return o.reject(t,e)},d.all=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,a=!1;if(!n)return this.resolve([]);for(var i=new Array(n),l=0,s=-1,d=new this(r);++s<n;)c(e[s],s);return d;function c(e,r){t.resolve(e).then(function(e){i[r]=e,++l!==n||a||(a=!0,o.resolve(d,i))},function(e){a||(a=!0,o.reject(d,e))})}},d.race=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,a=!1;if(!n)return this.resolve([]);for(var i,l=-1,s=new this(r);++l<n;)i=e[l],t.resolve(i).then(function(e){a||(a=!0,o.resolve(s,e))},function(e){a||(a=!0,o.reject(s,e))});return s}},{immediate:36}],38:[function(e,t,n){var a={};(0,e("./lib/utils/common").assign)(a,e("./lib/deflate"),e("./lib/inflate"),e("./lib/zlib/constants")),t.exports=a},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(e,t,n){var a=e("./zlib/deflate"),r=e("./utils/common"),o=e("./utils/strings"),i=e("./zlib/messages"),l=e("./zlib/zstream"),s=Object.prototype.toString,d=0,c=-1,u=0,p=8;function h(e){if(!(this instanceof h))return new h(e);this.options=r.assign({level:c,method:p,chunkSize:16384,windowBits:15,memLevel:8,strategy:u,to:""},e||{});var t=this.options;t.raw&&0<t.windowBits?t.windowBits=-t.windowBits:t.gzip&&0<t.windowBits&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var n=a.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==d)throw new Error(i[n]);if(t.header&&a.deflateSetHeader(this.strm,t.header),t.dictionary){var f;if(f="string"==typeof t.dictionary?o.string2buf(t.dictionary):"[object ArrayBuffer]"===s.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(n=a.deflateSetDictionary(this.strm,f))!==d)throw new Error(i[n]);this._dict_set=!0}}function f(e,t){var n=new h(t);if(n.push(e,!0),n.err)throw n.msg||i[n.err];return n.result}h.prototype.push=function(e,t){var n,i,l=this.strm,c=this.options.chunkSize;if(this.ended)return!1;i=t===~~t?t:!0===t?4:0,"string"==typeof e?l.input=o.string2buf(e):"[object ArrayBuffer]"===s.call(e)?l.input=new Uint8Array(e):l.input=e,l.next_in=0,l.avail_in=l.input.length;do{if(0===l.avail_out&&(l.output=new r.Buf8(c),l.next_out=0,l.avail_out=c),1!==(n=a.deflate(l,i))&&n!==d)return this.onEnd(n),!(this.ended=!0);0!==l.avail_out&&(0!==l.avail_in||4!==i&&2!==i)||("string"===this.options.to?this.onData(o.buf2binstring(r.shrinkBuf(l.output,l.next_out))):this.onData(r.shrinkBuf(l.output,l.next_out)))}while((0<l.avail_in||0===l.avail_out)&&1!==n);return 4===i?(n=a.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===d):2!==i||(this.onEnd(d),!(l.avail_out=0))},h.prototype.onData=function(e){this.chunks.push(e)},h.prototype.onEnd=function(e){e===d&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},n.Deflate=h,n.deflate=f,n.deflateRaw=function(e,t){return(t=t||{}).raw=!0,f(e,t)},n.gzip=function(e,t){return(t=t||{}).gzip=!0,f(e,t)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(e,t,n){var a=e("./zlib/inflate"),r=e("./utils/common"),o=e("./utils/strings"),i=e("./zlib/constants"),l=e("./zlib/messages"),s=e("./zlib/zstream"),d=e("./zlib/gzheader"),c=Object.prototype.toString;function u(e){if(!(this instanceof u))return new u(e);this.options=r.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&0<=t.windowBits&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(0<=t.windowBits&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),15<t.windowBits&&t.windowBits<48&&!(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;var n=a.inflateInit2(this.strm,t.windowBits);if(n!==i.Z_OK)throw new Error(l[n]);this.header=new d,a.inflateGetHeader(this.strm,this.header)}function p(e,t){var n=new u(t);if(n.push(e,!0),n.err)throw n.msg||l[n.err];return n.result}u.prototype.push=function(e,t){var n,l,s,d,u,p,h=this.strm,f=this.options.chunkSize,g=this.options.dictionary,m=!1;if(this.ended)return!1;l=t===~~t?t:!0===t?i.Z_FINISH:i.Z_NO_FLUSH,"string"==typeof e?h.input=o.binstring2buf(e):"[object ArrayBuffer]"===c.call(e)?h.input=new Uint8Array(e):h.input=e,h.next_in=0,h.avail_in=h.input.length;do{if(0===h.avail_out&&(h.output=new r.Buf8(f),h.next_out=0,h.avail_out=f),(n=a.inflate(h,i.Z_NO_FLUSH))===i.Z_NEED_DICT&&g&&(p="string"==typeof g?o.string2buf(g):"[object ArrayBuffer]"===c.call(g)?new Uint8Array(g):g,n=a.inflateSetDictionary(this.strm,p)),n===i.Z_BUF_ERROR&&!0===m&&(n=i.Z_OK,m=!1),n!==i.Z_STREAM_END&&n!==i.Z_OK)return this.onEnd(n),!(this.ended=!0);h.next_out&&(0!==h.avail_out&&n!==i.Z_STREAM_END&&(0!==h.avail_in||l!==i.Z_FINISH&&l!==i.Z_SYNC_FLUSH)||("string"===this.options.to?(s=o.utf8border(h.output,h.next_out),d=h.next_out-s,u=o.buf2string(h.output,s),h.next_out=d,h.avail_out=f-d,d&&r.arraySet(h.output,h.output,s,d,0),this.onData(u)):this.onData(r.shrinkBuf(h.output,h.next_out)))),0===h.avail_in&&0===h.avail_out&&(m=!0)}while((0<h.avail_in||0===h.avail_out)&&n!==i.Z_STREAM_END);return n===i.Z_STREAM_END&&(l=i.Z_FINISH),l===i.Z_FINISH?(n=a.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===i.Z_OK):l!==i.Z_SYNC_FLUSH||(this.onEnd(i.Z_OK),!(h.avail_out=0))},u.prototype.onData=function(e){this.chunks.push(e)},u.prototype.onEnd=function(e){e===i.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},n.Inflate=u,n.inflate=p,n.inflateRaw=function(e,t){return(t=t||{}).raw=!0,p(e,t)},n.ungzip=p},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(e,t,n){var a="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;n.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var a in n)n.hasOwnProperty(a)&&(e[a]=n[a])}}return e},n.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var r={arraySet:function(e,t,n,a,r){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+a),r);else for(var o=0;o<a;o++)e[r+o]=t[n+o]},flattenChunks:function(e){var t,n,a,r,o,i;for(t=a=0,n=e.length;t<n;t++)a+=e[t].length;for(i=new Uint8Array(a),t=r=0,n=e.length;t<n;t++)o=e[t],i.set(o,r),r+=o.length;return i}},o={arraySet:function(e,t,n,a,r){for(var o=0;o<a;o++)e[r+o]=t[n+o]},flattenChunks:function(e){return[].concat.apply([],e)}};n.setTyped=function(e){e?(n.Buf8=Uint8Array,n.Buf16=Uint16Array,n.Buf32=Int32Array,n.assign(n,r)):(n.Buf8=Array,n.Buf16=Array,n.Buf32=Array,n.assign(n,o))},n.setTyped(a)},{}],42:[function(e,t,n){var a=e("./common"),r=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(d){r=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(d){o=!1}for(var i=new a.Buf8(256),l=0;l<256;l++)i[l]=252<=l?6:248<=l?5:240<=l?4:224<=l?3:192<=l?2:1;function s(e,t){if(t<65537&&(e.subarray&&o||!e.subarray&&r))return String.fromCharCode.apply(null,a.shrinkBuf(e,t));for(var n="",i=0;i<t;i++)n+=String.fromCharCode(e[i]);return n}i[254]=i[254]=1,n.string2buf=function(e){var t,n,r,o,i,l=e.length,s=0;for(o=0;o<l;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1<l&&56320==(64512&(r=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(r-56320),o++),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new a.Buf8(s),o=i=0;i<s;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1<l&&56320==(64512&(r=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(r-56320),o++),n<128?t[i++]=n:(n<2048?t[i++]=192|n>>>6:(n<65536?t[i++]=224|n>>>12:(t[i++]=240|n>>>18,t[i++]=128|n>>>12&63),t[i++]=128|n>>>6&63),t[i++]=128|63&n);return t},n.buf2binstring=function(e){return s(e,e.length)},n.binstring2buf=function(e){for(var t=new a.Buf8(e.length),n=0,r=t.length;n<r;n++)t[n]=e.charCodeAt(n);return t},n.buf2string=function(e,t){var n,a,r,o,l=t||e.length,d=new Array(2*l);for(n=a=0;n<l;)if((r=e[n++])<128)d[a++]=r;else if(4<(o=i[r]))d[a++]=65533,n+=o-1;else{for(r&=2===o?31:3===o?15:7;1<o&&n<l;)r=r<<6|63&e[n++],o--;1<o?d[a++]=65533:r<65536?d[a++]=r:(r-=65536,d[a++]=55296|r>>10&1023,d[a++]=56320|1023&r)}return s(d,a)},n.utf8border=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;0<=n&&128==(192&e[n]);)n--;return n<0||0===n?t:n+i[e[n]]>t?n:t}},{"./common":41}],43:[function(e,t,n){t.exports=function(e,t,n,a){for(var r=65535&e,o=e>>>16&65535,i=0;0!==n;){for(n-=i=2e3<n?2e3:n;o=o+(r=r+t[a++]|0)|0,--i;);r%=65521,o%=65521}return r|o<<16}},{}],44:[function(e,t,n){t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(e,t,n){var a=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var a=0;a<8;a++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t,n,r){var o=a,i=r+n;e^=-1;for(var l=r;l<i;l++)e=e>>>8^o[255&(e^t[l])];return-1^e}},{}],46:[function(e,t,n){var a,r=e("../utils/common"),o=e("./trees"),i=e("./adler32"),l=e("./crc32"),s=e("./messages"),d=0,c=4,u=0,p=-2,h=-1,f=4,g=2,m=8,b=9,v=286,y=30,w=19,x=2*v+1,M=15,S=3,A=258,I=A+S+1,C=42,T=113,k=1,R=2,E=3,L=4;function V(e,t){return e.msg=s[t],t}function N(e){return(e<<1)-(4<e?9:0)}function z(e){for(var t=e.length;0<=--t;)e[t]=0}function P(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(r.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,0===t.pending&&(t.pending_out=0))}function O(e,t){o._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,P(e.strm)}function q(e,t){e.pending_buf[e.pending++]=t}function B(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function W(e,t){var n,a,r=e.max_chain_length,o=e.strstart,i=e.prev_length,l=e.nice_match,s=e.strstart>e.w_size-I?e.strstart-(e.w_size-I):0,d=e.window,c=e.w_mask,u=e.prev,p=e.strstart+A,h=d[o+i-1],f=d[o+i];e.prev_length>=e.good_match&&(r>>=2),l>e.lookahead&&(l=e.lookahead);do{if(d[(n=t)+i]===f&&d[n+i-1]===h&&d[n]===d[o]&&d[++n]===d[o+1]){o+=2,n++;do{}while(d[++o]===d[++n]&&d[++o]===d[++n]&&d[++o]===d[++n]&&d[++o]===d[++n]&&d[++o]===d[++n]&&d[++o]===d[++n]&&d[++o]===d[++n]&&d[++o]===d[++n]&&o<p);if(a=A-(p-o),o=p-A,i<a){if(e.match_start=t,l<=(i=a))break;h=d[o+i-1],f=d[o+i]}}}while((t=u[t&c])>s&&0!=--r);return i<=e.lookahead?i:e.lookahead}function F(e){var t,n,a,o,s,d,c,u,p,h,f=e.w_size;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=f+(f-I)){for(r.arraySet(e.window,e.window,f,f,0),e.match_start-=f,e.strstart-=f,e.block_start-=f,t=n=e.hash_size;a=e.head[--t],e.head[t]=f<=a?a-f:0,--n;);for(t=n=f;a=e.prev[--t],e.prev[t]=f<=a?a-f:0,--n;);o+=f}if(0===e.strm.avail_in)break;if(d=e.strm,c=e.window,u=e.strstart+e.lookahead,h=void 0,(p=o)<(h=d.avail_in)&&(h=p),n=0===h?0:(d.avail_in-=h,r.arraySet(c,d.input,d.next_in,h,u),1===d.state.wrap?d.adler=i(d.adler,c,h,u):2===d.state.wrap&&(d.adler=l(d.adler,c,h,u)),d.next_in+=h,d.total_in+=h,h),e.lookahead+=n,e.lookahead+e.insert>=S)for(s=e.strstart-e.insert,e.ins_h=e.window[s],e.ins_h=(e.ins_h<<e.hash_shift^e.window[s+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[s+S-1])&e.hash_mask,e.prev[s&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=s,s++,e.insert--,!(e.lookahead+e.insert<S)););}while(e.lookahead<I&&0!==e.strm.avail_in)}function D(e,t){for(var n,a;;){if(e.lookahead<I){if(F(e),e.lookahead<I&&t===d)return k;if(0===e.lookahead)break}if(n=0,e.lookahead>=S&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+S-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-I&&(e.match_length=W(e,n)),e.match_length>=S)if(a=o._tr_tally(e,e.strstart-e.match_start,e.match_length-S),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=S){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+S-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart,0!=--e.match_length;);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else a=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(a&&(O(e,!1),0===e.strm.avail_out))return k}return e.insert=e.strstart<S-1?e.strstart:S-1,t===c?(O(e,!0),0===e.strm.avail_out?E:L):e.last_lit&&(O(e,!1),0===e.strm.avail_out)?k:R}function H(e,t){for(var n,a,r;;){if(e.lookahead<I){if(F(e),e.lookahead<I&&t===d)return k;if(0===e.lookahead)break}if(n=0,e.lookahead>=S&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+S-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=S-1,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-I&&(e.match_length=W(e,n),e.match_length<=5&&(1===e.strategy||e.match_length===S&&4096<e.strstart-e.match_start)&&(e.match_length=S-1)),e.prev_length>=S&&e.match_length<=e.prev_length){for(r=e.strstart+e.lookahead-S,a=o._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-S),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=r&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+S-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!=--e.prev_length;);if(e.match_available=0,e.match_length=S-1,e.strstart++,a&&(O(e,!1),0===e.strm.avail_out))return k}else if(e.match_available){if((a=o._tr_tally(e,0,e.window[e.strstart-1]))&&O(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return k}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(a=o._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<S-1?e.strstart:S-1,t===c?(O(e,!0),0===e.strm.avail_out?E:L):e.last_lit&&(O(e,!1),0===e.strm.avail_out)?k:R}function U(e,t,n,a,r){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=a,this.func=r}function G(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=m,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new r.Buf16(2*x),this.dyn_dtree=new r.Buf16(2*(2*y+1)),this.bl_tree=new r.Buf16(2*(2*w+1)),z(this.dyn_ltree),z(this.dyn_dtree),z(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new r.Buf16(M+1),this.heap=new r.Buf16(2*v+1),z(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new r.Buf16(2*v+1),z(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function j(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=g,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?C:T,e.adler=2===t.wrap?0:1,t.last_flush=d,o._tr_init(t),u):V(e,p)}function Z(e){var t,n=j(e);return n===u&&((t=e.state).window_size=2*t.w_size,z(t.head),t.max_lazy_match=a[t.level].max_lazy,t.good_match=a[t.level].good_length,t.nice_match=a[t.level].nice_length,t.max_chain_length=a[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=S-1,t.match_available=0,t.ins_h=0),n}function K(e,t,n,a,o,i){if(!e)return p;var l=1;if(t===h&&(t=6),a<0?(l=0,a=-a):15<a&&(l=2,a-=16),o<1||b<o||n!==m||a<8||15<a||t<0||9<t||i<0||f<i)return V(e,p);8===a&&(a=9);var s=new G;return(e.state=s).strm=e,s.wrap=l,s.gzhead=null,s.w_bits=a,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=o+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+S-1)/S),s.window=new r.Buf8(2*s.w_size),s.head=new r.Buf16(s.hash_size),s.prev=new r.Buf16(s.w_size),s.lit_bufsize=1<<o+6,s.pending_buf_size=4*s.lit_bufsize,s.pending_buf=new r.Buf8(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=3*s.lit_bufsize,s.level=t,s.strategy=i,s.method=n,Z(e)}a=[new U(0,0,0,0,function(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(F(e),0===e.lookahead&&t===d)return k;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var a=e.block_start+n;if((0===e.strstart||e.strstart>=a)&&(e.lookahead=e.strstart-a,e.strstart=a,O(e,!1),0===e.strm.avail_out))return k;if(e.strstart-e.block_start>=e.w_size-I&&(O(e,!1),0===e.strm.avail_out))return k}return e.insert=0,t===c?(O(e,!0),0===e.strm.avail_out?E:L):(e.strstart>e.block_start&&(O(e,!1),e.strm.avail_out),k)}),new U(4,4,8,4,D),new U(4,5,16,8,D),new U(4,6,32,32,D),new U(4,4,16,16,H),new U(8,16,32,32,H),new U(8,16,128,128,H),new U(8,32,128,256,H),new U(32,128,258,1024,H),new U(32,258,258,4096,H)],n.deflateInit=function(e,t){return K(e,t,m,15,8,0)},n.deflateInit2=K,n.deflateReset=Z,n.deflateResetKeep=j,n.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?p:(e.state.gzhead=t,u):p},n.deflate=function(e,t){var n,r,i,s;if(!e||!e.state||5<t||t<0)return e?V(e,p):p;if(r=e.state,!e.output||!e.input&&0!==e.avail_in||666===r.status&&t!==c)return V(e,0===e.avail_out?-5:p);if(r.strm=e,n=r.last_flush,r.last_flush=t,r.status===C)if(2===r.wrap)e.adler=0,q(r,31),q(r,139),q(r,8),r.gzhead?(q(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),q(r,255&r.gzhead.time),q(r,r.gzhead.time>>8&255),q(r,r.gzhead.time>>16&255),q(r,r.gzhead.time>>24&255),q(r,9===r.level?2:2<=r.strategy||r.level<2?4:0),q(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(q(r,255&r.gzhead.extra.length),q(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=l(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(q(r,0),q(r,0),q(r,0),q(r,0),q(r,0),q(r,9===r.level?2:2<=r.strategy||r.level<2?4:0),q(r,3),r.status=T);else{var h=m+(r.w_bits-8<<4)<<8;h|=(2<=r.strategy||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(h|=32),h+=31-h%31,r.status=T,B(r,h),0!==r.strstart&&(B(r,e.adler>>>16),B(r,65535&e.adler)),e.adler=1}if(69===r.status)if(r.gzhead.extra){for(i=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>i&&(e.adler=l(e.adler,r.pending_buf,r.pending-i,i)),P(e),i=r.pending,r.pending!==r.pending_buf_size));)q(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>i&&(e.adler=l(e.adler,r.pending_buf,r.pending-i,i)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=l(e.adler,r.pending_buf,r.pending-i,i)),P(e),i=r.pending,r.pending===r.pending_buf_size)){s=1;break}s=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,q(r,s)}while(0!==s);r.gzhead.hcrc&&r.pending>i&&(e.adler=l(e.adler,r.pending_buf,r.pending-i,i)),0===s&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=l(e.adler,r.pending_buf,r.pending-i,i)),P(e),i=r.pending,r.pending===r.pending_buf_size)){s=1;break}s=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,q(r,s)}while(0!==s);r.gzhead.hcrc&&r.pending>i&&(e.adler=l(e.adler,r.pending_buf,r.pending-i,i)),0===s&&(r.status=103)}else r.status=103;if(103===r.status&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&P(e),r.pending+2<=r.pending_buf_size&&(q(r,255&e.adler),q(r,e.adler>>8&255),e.adler=0,r.status=T)):r.status=T),0!==r.pending){if(P(e),0===e.avail_out)return r.last_flush=-1,u}else if(0===e.avail_in&&N(t)<=N(n)&&t!==c)return V(e,-5);if(666===r.status&&0!==e.avail_in)return V(e,-5);if(0!==e.avail_in||0!==r.lookahead||t!==d&&666!==r.status){var f=2===r.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(F(e),0===e.lookahead)){if(t===d)return k;break}if(e.match_length=0,n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(O(e,!1),0===e.strm.avail_out))return k}return e.insert=0,t===c?(O(e,!0),0===e.strm.avail_out?E:L):e.last_lit&&(O(e,!1),0===e.strm.avail_out)?k:R}(r,t):3===r.strategy?function(e,t){for(var n,a,r,i,l=e.window;;){if(e.lookahead<=A){if(F(e),e.lookahead<=A&&t===d)return k;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=S&&0<e.strstart&&(a=l[r=e.strstart-1])===l[++r]&&a===l[++r]&&a===l[++r]){i=e.strstart+A;do{}while(a===l[++r]&&a===l[++r]&&a===l[++r]&&a===l[++r]&&a===l[++r]&&a===l[++r]&&a===l[++r]&&a===l[++r]&&r<i);e.match_length=A-(i-r),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=S?(n=o._tr_tally(e,1,e.match_length-S),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(O(e,!1),0===e.strm.avail_out))return k}return e.insert=0,t===c?(O(e,!0),0===e.strm.avail_out?E:L):e.last_lit&&(O(e,!1),0===e.strm.avail_out)?k:R}(r,t):a[r.level].func(r,t);if(f!==E&&f!==L||(r.status=666),f===k||f===E)return 0===e.avail_out&&(r.last_flush=-1),u;if(f===R&&(1===t?o._tr_align(r):5!==t&&(o._tr_stored_block(r,0,0,!1),3===t&&(z(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),P(e),0===e.avail_out))return r.last_flush=-1,u}return t!==c?u:r.wrap<=0?1:(2===r.wrap?(q(r,255&e.adler),q(r,e.adler>>8&255),q(r,e.adler>>16&255),q(r,e.adler>>24&255),q(r,255&e.total_in),q(r,e.total_in>>8&255),q(r,e.total_in>>16&255),q(r,e.total_in>>24&255)):(B(r,e.adler>>>16),B(r,65535&e.adler)),P(e),0<r.wrap&&(r.wrap=-r.wrap),0!==r.pending?u:1)},n.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status)!==C&&69!==t&&73!==t&&91!==t&&103!==t&&t!==T&&666!==t?V(e,p):(e.state=null,t===T?V(e,-3):u):p},n.deflateSetDictionary=function(e,t){var n,a,o,l,s,d,c,h,f=t.length;if(!e||!e.state)return p;if(2===(l=(n=e.state).wrap)||1===l&&n.status!==C||n.lookahead)return p;for(1===l&&(e.adler=i(e.adler,t,f,0)),n.wrap=0,f>=n.w_size&&(0===l&&(z(n.head),n.strstart=0,n.block_start=0,n.insert=0),h=new r.Buf8(n.w_size),r.arraySet(h,t,f-n.w_size,n.w_size,0),t=h,f=n.w_size),s=e.avail_in,d=e.next_in,c=e.input,e.avail_in=f,e.next_in=0,e.input=t,F(n);n.lookahead>=S;){for(a=n.strstart,o=n.lookahead-(S-1);n.ins_h=(n.ins_h<<n.hash_shift^n.window[a+S-1])&n.hash_mask,n.prev[a&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=a,a++,--o;);n.strstart=a,n.lookahead=S-1,F(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=S-1,n.match_available=0,e.next_in=d,e.input=c,e.avail_in=s,n.wrap=l,u},n.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(e,t,n){t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(e,t,n){t.exports=function(e,t){var n,a,r,o,i,l,s,d,c,u,p,h,f,g,m,b,v,y,w,x,M,S,A,I,C;n=e.state,a=e.next_in,I=e.input,r=a+(e.avail_in-5),o=e.next_out,C=e.output,i=o-(t-e.avail_out),l=o+(e.avail_out-257),s=n.dmax,d=n.wsize,c=n.whave,u=n.wnext,p=n.window,h=n.hold,f=n.bits,g=n.lencode,m=n.distcode,b=(1<<n.lenbits)-1,v=(1<<n.distbits)-1;e:do{f<15&&(h+=I[a++]<<f,f+=8,h+=I[a++]<<f,f+=8),y=g[h&b];t:for(;;){if(h>>>=w=y>>>24,f-=w,0==(w=y>>>16&255))C[o++]=65535&y;else{if(!(16&w)){if(!(64&w)){y=g[(65535&y)+(h&(1<<w)-1)];continue t}if(32&w){n.mode=12;break e}e.msg="invalid literal/length code",n.mode=30;break e}x=65535&y,(w&=15)&&(f<w&&(h+=I[a++]<<f,f+=8),x+=h&(1<<w)-1,h>>>=w,f-=w),f<15&&(h+=I[a++]<<f,f+=8,h+=I[a++]<<f,f+=8),y=m[h&v];n:for(;;){if(h>>>=w=y>>>24,f-=w,!(16&(w=y>>>16&255))){if(!(64&w)){y=m[(65535&y)+(h&(1<<w)-1)];continue n}e.msg="invalid distance code",n.mode=30;break e}if(M=65535&y,f<(w&=15)&&(h+=I[a++]<<f,(f+=8)<w&&(h+=I[a++]<<f,f+=8)),s<(M+=h&(1<<w)-1)){e.msg="invalid distance too far back",n.mode=30;break e}if(h>>>=w,f-=w,(w=o-i)<M){if(c<(w=M-w)&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(A=p,(S=0)===u){if(S+=d-w,w<x){for(x-=w;C[o++]=p[S++],--w;);S=o-M,A=C}}else if(u<w){if(S+=d+u-w,(w-=u)<x){for(x-=w;C[o++]=p[S++],--w;);if(S=0,u<x){for(x-=w=u;C[o++]=p[S++],--w;);S=o-M,A=C}}}else if(S+=u-w,w<x){for(x-=w;C[o++]=p[S++],--w;);S=o-M,A=C}for(;2<x;)C[o++]=A[S++],C[o++]=A[S++],C[o++]=A[S++],x-=3;x&&(C[o++]=A[S++],1<x&&(C[o++]=A[S++]))}else{for(S=o-M;C[o++]=C[S++],C[o++]=C[S++],C[o++]=C[S++],2<(x-=3););x&&(C[o++]=C[S++],1<x&&(C[o++]=C[S++]))}break}}break}}while(a<r&&o<l);a-=x=f>>3,h&=(1<<(f-=x<<3))-1,e.next_in=a,e.next_out=o,e.avail_in=a<r?r-a+5:5-(a-r),e.avail_out=o<l?l-o+257:257-(o-l),n.hold=h,n.bits=f}},{}],49:[function(e,t,n){var a=e("../utils/common"),r=e("./adler32"),o=e("./crc32"),i=e("./inffast"),l=e("./inftrees"),s=1,d=2,c=0,u=-2,p=1,h=852,f=592;function g(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function m(){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 a.Buf16(320),this.work=new a.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function b(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=p,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new a.Buf32(h),t.distcode=t.distdyn=new a.Buf32(f),t.sane=1,t.back=-1,c):u}function v(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,b(e)):u}function y(e,t){var n,a;return e&&e.state?(a=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15<t)?u:(null!==a.window&&a.wbits!==t&&(a.window=null),a.wrap=n,a.wbits=t,v(e))):u}function w(e,t){var n,a;return e?(a=new m,(e.state=a).window=null,(n=y(e,t))!==c&&(e.state=null),n):u}var x,M,S=!0;function A(e){if(S){var t;for(x=new a.Buf32(512),M=new a.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(l(s,e.lens,0,288,x,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;l(d,e.lens,0,32,M,0,e.work,{bits:5}),S=!1}e.lencode=x,e.lenbits=9,e.distcode=M,e.distbits=5}function I(e,t,n,r){var o,i=e.state;return null===i.window&&(i.wsize=1<<i.wbits,i.wnext=0,i.whave=0,i.window=new a.Buf8(i.wsize)),r>=i.wsize?(a.arraySet(i.window,t,n-i.wsize,i.wsize,0),i.wnext=0,i.whave=i.wsize):(r<(o=i.wsize-i.wnext)&&(o=r),a.arraySet(i.window,t,n-r,o,i.wnext),(r-=o)?(a.arraySet(i.window,t,n-r,r,0),i.wnext=r,i.whave=i.wsize):(i.wnext+=o,i.wnext===i.wsize&&(i.wnext=0),i.whave<i.wsize&&(i.whave+=o))),0}n.inflateReset=v,n.inflateReset2=y,n.inflateResetKeep=b,n.inflateInit=function(e){return w(e,15)},n.inflateInit2=w,n.inflate=function(e,t){var n,h,f,m,b,v,y,w,x,M,S,C,T,k,R,E,L,V,N,z,P,O,q,B,W=0,F=new a.Buf8(4),D=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return u;12===(n=e.state).mode&&(n.mode=13),b=e.next_out,f=e.output,y=e.avail_out,m=e.next_in,h=e.input,v=e.avail_in,w=n.hold,x=n.bits,M=v,S=y,O=c;e:for(;;)switch(n.mode){case p:if(0===n.wrap){n.mode=13;break}for(;x<16;){if(0===v)break e;v--,w+=h[m++]<<x,x+=8}if(2&n.wrap&&35615===w){F[n.check=0]=255&w,F[1]=w>>>8&255,n.check=o(n.check,F,2,0),x=w=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&w)<<8)+(w>>8))%31){e.msg="incorrect header check",n.mode=30;break}if(8!=(15&w)){e.msg="unknown compression method",n.mode=30;break}if(x-=4,P=8+(15&(w>>>=4)),0===n.wbits)n.wbits=P;else if(P>n.wbits){e.msg="invalid window size",n.mode=30;break}n.dmax=1<<P,e.adler=n.check=1,n.mode=512&w?10:12,x=w=0;break;case 2:for(;x<16;){if(0===v)break e;v--,w+=h[m++]<<x,x+=8}if(n.flags=w,8!=(255&n.flags)){e.msg="unknown compression method",n.mode=30;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=30;break}n.head&&(n.head.text=w>>8&1),512&n.flags&&(F[0]=255&w,F[1]=w>>>8&255,n.check=o(n.check,F,2,0)),x=w=0,n.mode=3;case 3:for(;x<32;){if(0===v)break e;v--,w+=h[m++]<<x,x+=8}n.head&&(n.head.time=w),512&n.flags&&(F[0]=255&w,F[1]=w>>>8&255,F[2]=w>>>16&255,F[3]=w>>>24&255,n.check=o(n.check,F,4,0)),x=w=0,n.mode=4;case 4:for(;x<16;){if(0===v)break e;v--,w+=h[m++]<<x,x+=8}n.head&&(n.head.xflags=255&w,n.head.os=w>>8),512&n.flags&&(F[0]=255&w,F[1]=w>>>8&255,n.check=o(n.check,F,2,0)),x=w=0,n.mode=5;case 5:if(1024&n.flags){for(;x<16;){if(0===v)break e;v--,w+=h[m++]<<x,x+=8}n.length=w,n.head&&(n.head.extra_len=w),512&n.flags&&(F[0]=255&w,F[1]=w>>>8&255,n.check=o(n.check,F,2,0)),x=w=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(v<(C=n.length)&&(C=v),C&&(n.head&&(P=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),a.arraySet(n.head.extra,h,m,C,P)),512&n.flags&&(n.check=o(n.check,h,C,m)),v-=C,m+=C,n.length-=C),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===v)break e;for(C=0;P=h[m+C++],n.head&&P&&n.length<65536&&(n.head.name+=String.fromCharCode(P)),P&&C<v;);if(512&n.flags&&(n.check=o(n.check,h,C,m)),v-=C,m+=C,P)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===v)break e;for(C=0;P=h[m+C++],n.head&&P&&n.length<65536&&(n.head.comment+=String.fromCharCode(P)),P&&C<v;);if(512&n.flags&&(n.check=o(n.check,h,C,m)),v-=C,m+=C,P)break e}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;x<16;){if(0===v)break e;v--,w+=h[m++]<<x,x+=8}if(w!==(65535&n.check)){e.msg="header crc mismatch",n.mode=30;break}x=w=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;x<32;){if(0===v)break e;v--,w+=h[m++]<<x,x+=8}e.adler=n.check=g(w),x=w=0,n.mode=11;case 11:if(0===n.havedict)return e.next_out=b,e.avail_out=y,e.next_in=m,e.avail_in=v,n.hold=w,n.bits=x,2;e.adler=n.check=1,n.mode=12;case 12:if(5===t||6===t)break e;case 13:if(n.last){w>>>=7&x,x-=7&x,n.mode=27;break}for(;x<3;){if(0===v)break e;v--,w+=h[m++]<<x,x+=8}switch(n.last=1&w,x-=1,3&(w>>>=1)){case 0:n.mode=14;break;case 1:if(A(n),n.mode=20,6!==t)break;w>>>=2,x-=2;break e;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=30}w>>>=2,x-=2;break;case 14:for(w>>>=7&x,x-=7&x;x<32;){if(0===v)break e;v--,w+=h[m++]<<x,x+=8}if((65535&w)!=(w>>>16^65535)){e.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&w,x=w=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(C=n.length){if(v<C&&(C=v),y<C&&(C=y),0===C)break e;a.arraySet(f,h,m,C,b),v-=C,m+=C,y-=C,b+=C,n.length-=C;break}n.mode=12;break;case 17:for(;x<14;){if(0===v)break e;v--,w+=h[m++]<<x,x+=8}if(n.nlen=257+(31&w),w>>>=5,x-=5,n.ndist=1+(31&w),w>>>=5,x-=5,n.ncode=4+(15&w),w>>>=4,x-=4,286<n.nlen||30<n.ndist){e.msg="too many length or distance symbols",n.mode=30;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;x<3;){if(0===v)break e;v--,w+=h[m++]<<x,x+=8}n.lens[D[n.have++]]=7&w,w>>>=3,x-=3}for(;n.have<19;)n.lens[D[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,q={bits:n.lenbits},O=l(0,n.lens,0,19,n.lencode,0,n.work,q),n.lenbits=q.bits,O){e.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;E=(W=n.lencode[w&(1<<n.lenbits)-1])>>>16&255,L=65535&W,!((R=W>>>24)<=x);){if(0===v)break e;v--,w+=h[m++]<<x,x+=8}if(L<16)w>>>=R,x-=R,n.lens[n.have++]=L;else{if(16===L){for(B=R+2;x<B;){if(0===v)break e;v--,w+=h[m++]<<x,x+=8}if(w>>>=R,x-=R,0===n.have){e.msg="invalid bit length repeat",n.mode=30;break}P=n.lens[n.have-1],C=3+(3&w),w>>>=2,x-=2}else if(17===L){for(B=R+3;x<B;){if(0===v)break e;v--,w+=h[m++]<<x,x+=8}x-=R,P=0,C=3+(7&(w>>>=R)),w>>>=3,x-=3}else{for(B=R+7;x<B;){if(0===v)break e;v--,w+=h[m++]<<x,x+=8}x-=R,P=0,C=11+(127&(w>>>=R)),w>>>=7,x-=7}if(n.have+C>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=30;break}for(;C--;)n.lens[n.have++]=P}}if(30===n.mode)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,q={bits:n.lenbits},O=l(s,n.lens,0,n.nlen,n.lencode,0,n.work,q),n.lenbits=q.bits,O){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,q={bits:n.distbits},O=l(d,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,q),n.distbits=q.bits,O){e.msg="invalid distances set",n.mode=30;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(6<=v&&258<=y){e.next_out=b,e.avail_out=y,e.next_in=m,e.avail_in=v,n.hold=w,n.bits=x,i(e,S),b=e.next_out,f=e.output,y=e.avail_out,m=e.next_in,h=e.input,v=e.avail_in,w=n.hold,x=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;E=(W=n.lencode[w&(1<<n.lenbits)-1])>>>16&255,L=65535&W,!((R=W>>>24)<=x);){if(0===v)break e;v--,w+=h[m++]<<x,x+=8}if(E&&!(240&E)){for(V=R,N=E,z=L;E=(W=n.lencode[z+((w&(1<<V+N)-1)>>V)])>>>16&255,L=65535&W,!(V+(R=W>>>24)<=x);){if(0===v)break e;v--,w+=h[m++]<<x,x+=8}w>>>=V,x-=V,n.back+=V}if(w>>>=R,x-=R,n.back+=R,n.length=L,0===E){n.mode=26;break}if(32&E){n.back=-1,n.mode=12;break}if(64&E){e.msg="invalid literal/length code",n.mode=30;break}n.extra=15&E,n.mode=22;case 22:if(n.extra){for(B=n.extra;x<B;){if(0===v)break e;v--,w+=h[m++]<<x,x+=8}n.length+=w&(1<<n.extra)-1,w>>>=n.extra,x-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;E=(W=n.distcode[w&(1<<n.distbits)-1])>>>16&255,L=65535&W,!((R=W>>>24)<=x);){if(0===v)break e;v--,w+=h[m++]<<x,x+=8}if(!(240&E)){for(V=R,N=E,z=L;E=(W=n.distcode[z+((w&(1<<V+N)-1)>>V)])>>>16&255,L=65535&W,!(V+(R=W>>>24)<=x);){if(0===v)break e;v--,w+=h[m++]<<x,x+=8}w>>>=V,x-=V,n.back+=V}if(w>>>=R,x-=R,n.back+=R,64&E){e.msg="invalid distance code",n.mode=30;break}n.offset=L,n.extra=15&E,n.mode=24;case 24:if(n.extra){for(B=n.extra;x<B;){if(0===v)break e;v--,w+=h[m++]<<x,x+=8}n.offset+=w&(1<<n.extra)-1,w>>>=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(0===y)break e;if(C=S-y,n.offset>C){if((C=n.offset-C)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=30;break}T=C>n.wnext?(C-=n.wnext,n.wsize-C):n.wnext-C,C>n.length&&(C=n.length),k=n.window}else k=f,T=b-n.offset,C=n.length;for(y<C&&(C=y),y-=C,n.length-=C;f[b++]=k[T++],--C;);0===n.length&&(n.mode=21);break;case 26:if(0===y)break e;f[b++]=n.length,y--,n.mode=21;break;case 27:if(n.wrap){for(;x<32;){if(0===v)break e;v--,w|=h[m++]<<x,x+=8}if(S-=y,e.total_out+=S,n.total+=S,S&&(e.adler=n.check=n.flags?o(n.check,f,S,b-S):r(n.check,f,S,b-S)),S=y,(n.flags?w:g(w))!==n.check){e.msg="incorrect data check",n.mode=30;break}x=w=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;x<32;){if(0===v)break e;v--,w+=h[m++]<<x,x+=8}if(w!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=30;break}x=w=0}n.mode=29;case 29:O=1;break e;case 30:O=-3;break e;case 31:return-4;default:return u}return e.next_out=b,e.avail_out=y,e.next_in=m,e.avail_in=v,n.hold=w,n.bits=x,(n.wsize||S!==e.avail_out&&n.mode<30&&(n.mode<27||4!==t))&&I(e,e.output,e.next_out,S-e.avail_out)?(n.mode=31,-4):(M-=e.avail_in,S-=e.avail_out,e.total_in+=M,e.total_out+=S,n.total+=S,n.wrap&&S&&(e.adler=n.check=n.flags?o(n.check,f,S,e.next_out-S):r(n.check,f,S,e.next_out-S)),e.data_type=n.bits+(n.last?64:0)+(12===n.mode?128:0)+(20===n.mode||15===n.mode?256:0),(0==M&&0===S||4===t)&&O===c&&(O=-5),O)},n.inflateEnd=function(e){if(!e||!e.state)return u;var t=e.state;return t.window&&(t.window=null),e.state=null,c},n.inflateGetHeader=function(e,t){var n;return e&&e.state&&2&(n=e.state).wrap?((n.head=t).done=!1,c):u},n.inflateSetDictionary=function(e,t){var n,a=t.length;return e&&e.state?0!==(n=e.state).wrap&&11!==n.mode?u:11===n.mode&&r(1,t,a,0)!==n.check?-3:I(e,t,a,a)?(n.mode=31,-4):(n.havedict=1,c):u},n.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(e,t,n){var a=e("../utils/common"),r=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],i=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],l=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,n,s,d,c,u,p){var h,f,g,m,b,v,y,w,x,M=p.bits,S=0,A=0,I=0,C=0,T=0,k=0,R=0,E=0,L=0,V=0,N=null,z=0,P=new a.Buf16(16),O=new a.Buf16(16),q=null,B=0;for(S=0;S<=15;S++)P[S]=0;for(A=0;A<s;A++)P[t[n+A]]++;for(T=M,C=15;1<=C&&0===P[C];C--);if(C<T&&(T=C),0===C)return d[c++]=20971520,d[c++]=20971520,p.bits=1,0;for(I=1;I<C&&0===P[I];I++);for(T<I&&(T=I),S=E=1;S<=15;S++)if(E<<=1,(E-=P[S])<0)return-1;if(0<E&&(0===e||1!==C))return-1;for(O[1]=0,S=1;S<15;S++)O[S+1]=O[S]+P[S];for(A=0;A<s;A++)0!==t[n+A]&&(u[O[t[n+A]]++]=A);if(v=0===e?(N=q=u,19):1===e?(N=r,z-=257,q=o,B-=257,256):(N=i,q=l,-1),S=I,b=c,R=A=V=0,g=-1,m=(L=1<<(k=T))-1,1===e&&852<L||2===e&&592<L)return 1;for(;;){for(y=S-R,x=u[A]<v?(w=0,u[A]):u[A]>v?(w=q[B+u[A]],N[z+u[A]]):(w=96,0),h=1<<S-R,I=f=1<<k;d[b+(V>>R)+(f-=h)]=y<<24|w<<16|x,0!==f;);for(h=1<<S-1;V&h;)h>>=1;if(0!==h?(V&=h-1,V+=h):V=0,A++,0==--P[S]){if(S===C)break;S=t[n+u[A]]}if(T<S&&(V&m)!==g){for(0===R&&(R=T),b+=I,E=1<<(k=S-R);k+R<C&&!((E-=P[k+R])<=0);)k++,E<<=1;if(L+=1<<k,1===e&&852<L||2===e&&592<L)return 1;d[g=V&m]=T<<24|k<<16|b-c}}return 0!==V&&(d[b+V]=S-R<<24|64<<16),p.bits=T,0}},{"../utils/common":41}],51:[function(e,t,n){t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(e,t,n){var a=e("../utils/common"),r=0,o=1;function i(e){for(var t=e.length;0<=--t;)e[t]=0}var l=0,s=29,d=256,c=d+1+s,u=30,p=19,h=2*c+1,f=15,g=16,m=7,b=256,v=16,y=17,w=18,x=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],M=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],S=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],A=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],I=new Array(2*(c+2));i(I);var C=new Array(2*u);i(C);var T=new Array(512);i(T);var k=new Array(256);i(k);var R=new Array(s);i(R);var E,L,V,N=new Array(u);function z(e,t,n,a,r){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=a,this.max_length=r,this.has_stree=e&&e.length}function P(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function O(e){return e<256?T[e]:T[256+(e>>>7)]}function q(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function B(e,t,n){e.bi_valid>g-n?(e.bi_buf|=t<<e.bi_valid&65535,q(e,e.bi_buf),e.bi_buf=t>>g-e.bi_valid,e.bi_valid+=n-g):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function W(e,t,n){B(e,n[2*t],n[2*t+1])}function F(e,t){for(var n=0;n|=1&e,e>>>=1,n<<=1,0<--t;);return n>>>1}function D(e,t,n){var a,r,o=new Array(f+1),i=0;for(a=1;a<=f;a++)o[a]=i=i+n[a-1]<<1;for(r=0;r<=t;r++){var l=e[2*r+1];0!==l&&(e[2*r]=F(o[l]++,l))}}function H(e){var t;for(t=0;t<c;t++)e.dyn_ltree[2*t]=0;for(t=0;t<u;t++)e.dyn_dtree[2*t]=0;for(t=0;t<p;t++)e.bl_tree[2*t]=0;e.dyn_ltree[2*b]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function U(e){8<e.bi_valid?q(e,e.bi_buf):0<e.bi_valid&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function G(e,t,n,a){var r=2*t,o=2*n;return e[r]<e[o]||e[r]===e[o]&&a[t]<=a[n]}function j(e,t,n){for(var a=e.heap[n],r=n<<1;r<=e.heap_len&&(r<e.heap_len&&G(t,e.heap[r+1],e.heap[r],e.depth)&&r++,!G(t,a,e.heap[r],e.depth));)e.heap[n]=e.heap[r],n=r,r<<=1;e.heap[n]=a}function Z(e,t,n){var a,r,o,i,l=0;if(0!==e.last_lit)for(;a=e.pending_buf[e.d_buf+2*l]<<8|e.pending_buf[e.d_buf+2*l+1],r=e.pending_buf[e.l_buf+l],l++,0===a?W(e,r,t):(W(e,(o=k[r])+d+1,t),0!==(i=x[o])&&B(e,r-=R[o],i),W(e,o=O(--a),n),0!==(i=M[o])&&B(e,a-=N[o],i)),l<e.last_lit;);W(e,b,t)}function K(e,t){var n,a,r,o=t.dyn_tree,i=t.stat_desc.static_tree,l=t.stat_desc.has_stree,s=t.stat_desc.elems,d=-1;for(e.heap_len=0,e.heap_max=h,n=0;n<s;n++)0!==o[2*n]?(e.heap[++e.heap_len]=d=n,e.depth[n]=0):o[2*n+1]=0;for(;e.heap_len<2;)o[2*(r=e.heap[++e.heap_len]=d<2?++d:0)]=1,e.depth[r]=0,e.opt_len--,l&&(e.static_len-=i[2*r+1]);for(t.max_code=d,n=e.heap_len>>1;1<=n;n--)j(e,o,n);for(r=s;n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],j(e,o,1),a=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=a,o[2*r]=o[2*n]+o[2*a],e.depth[r]=(e.depth[n]>=e.depth[a]?e.depth[n]:e.depth[a])+1,o[2*n+1]=o[2*a+1]=r,e.heap[1]=r++,j(e,o,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,a,r,o,i,l,s=t.dyn_tree,d=t.max_code,c=t.stat_desc.static_tree,u=t.stat_desc.has_stree,p=t.stat_desc.extra_bits,g=t.stat_desc.extra_base,m=t.stat_desc.max_length,b=0;for(o=0;o<=f;o++)e.bl_count[o]=0;for(s[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<h;n++)m<(o=s[2*s[2*(a=e.heap[n])+1]+1]+1)&&(o=m,b++),s[2*a+1]=o,d<a||(e.bl_count[o]++,i=0,g<=a&&(i=p[a-g]),l=s[2*a],e.opt_len+=l*(o+i),u&&(e.static_len+=l*(c[2*a+1]+i)));if(0!==b){do{for(o=m-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[m]--,b-=2}while(0<b);for(o=m;0!==o;o--)for(a=e.bl_count[o];0!==a;)d<(r=e.heap[--n])||(s[2*r+1]!==o&&(e.opt_len+=(o-s[2*r+1])*s[2*r],s[2*r+1]=o),a--)}}(e,t),D(o,d,e.bl_count)}function X(e,t,n){var a,r,o=-1,i=t[1],l=0,s=7,d=4;for(0===i&&(s=138,d=3),t[2*(n+1)+1]=65535,a=0;a<=n;a++)r=i,i=t[2*(a+1)+1],++l<s&&r===i||(l<d?e.bl_tree[2*r]+=l:0!==r?(r!==o&&e.bl_tree[2*r]++,e.bl_tree[2*v]++):l<=10?e.bl_tree[2*y]++:e.bl_tree[2*w]++,o=r,d=(l=0)===i?(s=138,3):r===i?(s=6,3):(s=7,4))}function Y(e,t,n){var a,r,o=-1,i=t[1],l=0,s=7,d=4;for(0===i&&(s=138,d=3),a=0;a<=n;a++)if(r=i,i=t[2*(a+1)+1],!(++l<s&&r===i)){if(l<d)for(;W(e,r,e.bl_tree),0!=--l;);else 0!==r?(r!==o&&(W(e,r,e.bl_tree),l--),W(e,v,e.bl_tree),B(e,l-3,2)):l<=10?(W(e,y,e.bl_tree),B(e,l-3,3)):(W(e,w,e.bl_tree),B(e,l-11,7));o=r,d=(l=0)===i?(s=138,3):r===i?(s=6,3):(s=7,4)}}i(N);var J=!1;function Q(e,t,n,r){var o,i,s;B(e,(l<<1)+(r?1:0),3),i=t,s=n,U(o=e),q(o,s),q(o,~s),a.arraySet(o.pending_buf,o.window,i,s,o.pending),o.pending+=s}n._tr_init=function(e){J||(function(){var e,t,n,a,r,o=new Array(f+1);for(a=n=0;a<s-1;a++)for(R[a]=n,e=0;e<1<<x[a];e++)k[n++]=a;for(k[n-1]=a,a=r=0;a<16;a++)for(N[a]=r,e=0;e<1<<M[a];e++)T[r++]=a;for(r>>=7;a<u;a++)for(N[a]=r<<7,e=0;e<1<<M[a]-7;e++)T[256+r++]=a;for(t=0;t<=f;t++)o[t]=0;for(e=0;e<=143;)I[2*e+1]=8,e++,o[8]++;for(;e<=255;)I[2*e+1]=9,e++,o[9]++;for(;e<=279;)I[2*e+1]=7,e++,o[7]++;for(;e<=287;)I[2*e+1]=8,e++,o[8]++;for(D(I,c+1,o),e=0;e<u;e++)C[2*e+1]=5,C[2*e]=F(e,5);E=new z(I,x,d+1,c,f),L=new z(C,M,0,u,f),V=new z(new Array(0),S,0,p,m)}(),J=!0),e.l_desc=new P(e.dyn_ltree,E),e.d_desc=new P(e.dyn_dtree,L),e.bl_desc=new P(e.bl_tree,V),e.bi_buf=0,e.bi_valid=0,H(e)},n._tr_stored_block=Q,n._tr_flush_block=function(e,t,n,a){var i,l,s=0;0<e.level?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return r;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return o;for(t=32;t<d;t++)if(0!==e.dyn_ltree[2*t])return o;return r}(e)),K(e,e.l_desc),K(e,e.d_desc),s=function(e){var t;for(X(e,e.dyn_ltree,e.l_desc.max_code),X(e,e.dyn_dtree,e.d_desc.max_code),K(e,e.bl_desc),t=p-1;3<=t&&0===e.bl_tree[2*A[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(l=e.static_len+3+7>>>3)<=i&&(i=l)):i=l=n+5,n+4<=i&&-1!==t?Q(e,t,n,a):4===e.strategy||l===i?(B(e,2+(a?1:0),3),Z(e,I,C)):(B(e,4+(a?1:0),3),function(e,t,n,a){var r;for(B(e,t-257,5),B(e,n-1,5),B(e,a-4,4),r=0;r<a;r++)B(e,e.bl_tree[2*A[r]+1],3);Y(e,e.dyn_ltree,t-1),Y(e,e.dyn_dtree,n-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,s+1),Z(e,e.dyn_ltree,e.dyn_dtree)),H(e),a&&U(e)},n._tr_tally=function(e,t,n){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>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++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(k[n]+d+1)]++,e.dyn_dtree[2*O(t)]++),e.last_lit===e.lit_bufsize-1},n._tr_align=function(e){var t;B(e,2,3),W(e,b,I),16===(t=e).bi_valid?(q(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):8<=t.bi_valid&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}},{"../utils/common":41}],53:[function(e,t,n){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){if(!e.setImmediate){var n,a,r,o,i=1,l={},s=!1,d=e.document,c=Object.getPrototypeOf&&Object.getPrototypeOf(e);c=c&&c.setTimeout?c:e,n="[object process]"==={}.toString.call(e.process)?function(e){process.nextTick(function(){p(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}}()?(o="setImmediate$"+Math.random()+"$",e.addEventListener?e.addEventListener("message",h,!1):e.attachEvent("onmessage",h),function(t){e.postMessage(o+t,"*")}):e.MessageChannel?((r=new MessageChannel).port1.onmessage=function(e){p(e.data)},function(e){r.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(a=d.documentElement,function(e){var t=d.createElement("script");t.onreadystatechange=function(){p(e),t.onreadystatechange=null,a.removeChild(t),t=null},a.appendChild(t)}):function(e){setTimeout(p,0,e)},c.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),a=0;a<t.length;a++)t[a]=arguments[a+1];var r={callback:e,args:t};return l[i]=r,n(i),i++},c.clearImmediate=u}function u(e){delete l[e]}function p(e){if(s)setTimeout(p,0,e);else{var n=l[e];if(n){s=!0;try{!function(e){var n=e.callback,a=e.args;switch(a.length){case 0:n();break;case 1:n(a[0]);break;case 2:n(a[0],a[1]);break;case 3:n(a[0],a[1],a[2]);break;default:n.apply(t,a)}}(n)}finally{u(e),s=!1}}}}function h(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(o)&&p(+t.data.slice(o.length))}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,void 0!==ps?ps:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[10])(10);const Ob=hs(Pb.exports);var qb={};function Bb(e,t){return void 0===t&&(t=Object),t&&"function"==typeof t.getOwnPropertyDescriptors&&(e=t.create(null,t.getOwnPropertyDescriptors(e))),t&&"function"==typeof t.freeze?t.freeze(e):e}function Wb(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Fb=Bb({allowfullscreen:!0,async:!0,autofocus:!0,autoplay:!0,checked:!0,controls:!0,default:!0,defer:!0,disabled:!0,formnovalidate:!0,hidden:!0,ismap:!0,itemscope:!0,loop:!0,multiple:!0,muted:!0,nomodule:!0,novalidate:!0,open:!0,playsinline:!0,readonly:!0,required:!0,reversed:!0,selected:!0});var Db=Bb({area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});var Hb=Bb({script:!1,style:!1,textarea:!0,title:!0});function Ub(e){return e===Gb.HTML}var Gb=Bb({HTML:"text/html",XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),jb=Object.keys(Gb).map(function(e){return Gb[e]});var Zb=Bb({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/"});qb.assign=function(e,t){if(null===e||"object"!=typeof e)throw new TypeError("target is not an object");for(var n in t)Wb(t,n)&&(e[n]=t[n]);return e},qb.find=function(e,t,n){if(void 0===n&&(n=Array.prototype),e&&"function"==typeof n.find)return n.find.call(e,t);for(var a=0;a<e.length;a++)if(Wb(e,a)){var r=e[a];if(t.call(void 0,r,a,e))return r}},qb.freeze=Bb,qb.HTML_BOOLEAN_ATTRIBUTES=Fb,qb.HTML_RAW_TEXT_ELEMENTS=Hb,qb.HTML_VOID_ELEMENTS=Db,qb.hasDefaultHTMLNamespace=function(e){return Ub(e)||e===Gb.XML_XHTML_APPLICATION},qb.hasOwn=Wb,qb.isHTMLBooleanAttribute=function(e){return Wb(Fb,e.toLowerCase())},qb.isHTMLRawTextElement=function(e){var t=e.toLowerCase();return Wb(Hb,t)&&!Hb[t]},qb.isHTMLEscapableRawTextElement=function(e){var t=e.toLowerCase();return Wb(Hb,t)&&Hb[t]},qb.isHTMLMimeType=Ub,qb.isHTMLVoidElement=function(e){return Wb(Db,e.toLowerCase())},qb.isValidMimeType=function(e){return jb.indexOf(e)>-1},qb.MIME_TYPE=Gb,qb.NAMESPACE=Zb;var Kb={};function Xb(e,t){e.prototype=Object.create(Error.prototype,{constructor:{value:e},name:{value:e.name,enumerable:!0,writable:t}})}var Yb=qb.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"}),Jb=Object.keys(Yb);function Qb(e){return"number"==typeof e&&e>=1&&e<=25}function $b(e,t){var n;Qb(e)?(this.name=Jb[e],this.message=t||""):(this.message=e,this.name="string"==typeof(n=t)&&n.substring(n.length-Yb.Error.length)===Yb.Error?t:Yb.Error),Error.captureStackTrace&&Error.captureStackTrace(this,$b)}Xb($b,!0),Object.defineProperties($b.prototype,{code:{enumerable:!0,get:function(){var e=Jb.indexOf(this.name);return Qb(e)?e:0}}});for(var _b={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},ev=Object.entries(_b),tv=0;tv<ev.length;tv++){$b[ev[tv][0]]=ev[tv][1]}function nv(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,nv)}Xb(nv),Kb.DOMException=$b,Kb.DOMExceptionName=Yb,Kb.ExceptionCode=_b,Kb.ParseError=nv;var av={},rv={};function ov(e){try{"function"!=typeof e&&(e=RegExp);var t=new e("𝌆","u").exec("𝌆");return!!t&&2===t[0].length}catch(n){}return!1}var iv=ov();function lv(e){if("["!==e.source[0])throw new Error(e+" can not be used with chars");return e.source.slice(1,e.source.lastIndexOf("]"))}function sv(e,t){if("["!==e.source[0])throw new Error("/"+e.source+"/ can not be used with chars_without");if(!t||"string"!=typeof t)throw new Error(JSON.stringify(t)+" is not a valid search");if(-1===e.source.indexOf(t))throw new Error('"'+t+'" is not is /'+e.source+"/");if("-"===t&&1!==e.source.indexOf(t))throw new Error('"'+t+'" is not at the first postion of /'+e.source+"/");return new RegExp(e.source.replace(t,""),iv?"u":"")}function dv(e){var t=this;return new RegExp(Array.prototype.slice.call(arguments).map(function(e){var n="string"==typeof e;if(n&&void 0===t&&"|"===e)throw new Error("use regg instead of reg to wrap expressions with `|`!");return n?e:e.source}).join(""),iv?"mu":"m")}function cv(e){if(0===arguments.length)throw new Error("no parameters provided");return dv.apply(cv,["(?:"].concat(Array.prototype.slice.call(arguments),[")"]))}var uv=/[-\x09\x0A\x0D\x20-\x2C\x2E-\uD7FF\uE000-\uFFFD]/;iv&&(uv=dv("[",lv(uv),"\\u{10000}-\\u{10FFFF}","]"));var pv=new RegExp("[^"+lv(uv)+"]",iv?"u":""),hv=/[\x20\x09\x0D\x0A]/,fv=lv(hv),gv=dv(hv,"+"),mv=dv(hv,"*"),bv=/[:_a-zA-Z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;iv&&(bv=dv("[",lv(bv),"\\u{10000}-\\u{10FFFF}","]"));var vv=dv("[",lv(bv),lv(/[-.0-9\xB7]/),lv(/[\u0300-\u036F\u203F-\u2040]/),"]"),yv=dv(bv,vv,"*"),wv=dv(vv,"+"),xv=dv("&",yv,";"),Mv=cv(/&#[0-9]+;|&#x[0-9a-fA-F]+;/),Sv=cv(xv,"|",Mv),Av=dv("%",yv,";"),Iv=cv(dv('"',cv(/[^%&"]/,"|",Av,"|",Sv),"*",'"'),"|",dv("'",cv(/[^%&']/,"|",Av,"|",Sv),"*","'")),Cv=cv('"',cv(/[^<&"]/,"|",Sv),"*",'"',"|","'",cv(/[^<&']/,"|",Sv),"*","'"),Tv=dv(sv(bv,":"),sv(vv,":"),"*"),kv=dv(Tv,cv(":",Tv),"?"),Rv=dv("^",kv,"$"),Ev=dv("(",kv,")"),Lv=cv(/"[^"]*"|'[^']*'/),Vv=dv(/^<\?/,"(",yv,")",cv(gv,"(",uv,"*?)"),"?",/\?>/),Nv=/[\x20\x0D\x0Aa-zA-Z0-9-'()+,./:=?;!*#@$_%]/,zv=cv('"',Nv,'*"',"|","'",sv(Nv,"'"),"*'"),Pv="\x3c!--",Ov=dv(Pv,cv(sv(uv,"-"),"|",dv("-",sv(uv,"-"))),"*","--\x3e"),qv="#PCDATA",Bv=cv(dv(/\(/,mv,qv,cv(mv,/\|/,mv,kv),"*",mv,/\)\*/),"|",dv(/\(/,mv,qv,mv,/\)/)),Wv=cv("EMPTY","|","ANY","|",Bv,"|",dv(/\([^>]+\)/,/[?*+]?/)),Fv=dv("<!ELEMENT",gv,cv(kv,"|",Av),gv,cv(Wv,"|",Av),mv,">"),Dv=dv("NOTATION",gv,/\(/,mv,yv,cv(mv,/\|/,mv,yv),"*",mv,/\)/),Hv=dv(/\(/,mv,wv,cv(mv,/\|/,mv,wv),"*",mv,/\)/),Uv=cv(Dv,"|",Hv),Gv=cv(/CDATA|ID|IDREF|IDREFS|ENTITY|ENTITIES|NMTOKEN|NMTOKENS/,"|",Uv),jv=cv(/#REQUIRED|#IMPLIED/,"|",cv(cv("#FIXED",gv),"?",Cv)),Zv=dv("<!ATTLIST",gv,yv,cv(gv,yv,gv,Gv,gv,jv),"*",mv,">"),Kv="about:legacy-compat",Xv=cv('"'+Kv+'"',"|","'"+Kv+"'"),Yv="SYSTEM",Jv="PUBLIC",Qv=cv(cv(Yv,gv,Lv),"|",cv(Jv,gv,zv,gv,Lv)),$v=dv("^",cv(cv(Yv,gv,"(?<SystemLiteralOnly>",Lv,")"),"|",cv(Jv,gv,"(?<PubidLiteral>",zv,")",gv,"(?<SystemLiteral>",Lv,")"))),_v=dv("^",zv,"$"),ey=dv("^",Lv,"$"),ty=cv(gv,"NDATA",gv,yv),ny="<!ENTITY",ay=dv(ny,gv,yv,gv,cv(Iv,"|",cv(Qv,ty,"?")),mv,">"),ry=cv(Iv,"|",Qv),oy=cv(ay,"|",dv(ny,gv,"%",gv,yv,gv,ry,mv,">")),iy=dv(Jv,gv,zv),ly=dv("<!NOTATION",gv,yv,gv,cv(Qv,"|",iy),mv,">"),sy=dv(mv,"=",mv),dy=/1[.]\d+/,cy=dv(gv,"version",sy,cv("'",dy,"'","|",'"',dy,'"')),uy=/[A-Za-z][-A-Za-z0-9._]*/,py=dv(/^<\?xml/,cy,cv(gv,"encoding",sy,cv('"',uy,'"',"|","'",uy,"'")),"?",cv(gv,"standalone",sy,cv("'",cv("yes","|","no"),"'","|",'"',cv("yes","|","no"),'"')),"?",mv,/\?>/),hy=dv(uv,"*?",/\]\]>/),fy=dv(/<!\[CDATA\[/,hy);rv.chars=lv,rv.chars_without=sv,rv.detectUnicodeSupport=ov,rv.reg=dv,rv.regg=cv,rv.ABOUT_LEGACY_COMPAT=Kv,rv.ABOUT_LEGACY_COMPAT_SystemLiteral=Xv,rv.AttlistDecl=Zv,rv.CDATA_START="<![CDATA[",rv.CDATA_END="]]>",rv.CDSect=fy,rv.Char=uv,rv.Comment=Ov,rv.COMMENT_START=Pv,rv.COMMENT_END="--\x3e",rv.DOCTYPE_DECL_START="<!DOCTYPE",rv.elementdecl=Fv,rv.EntityDecl=oy,rv.EntityValue=Iv,rv.ExternalID=Qv,rv.ExternalID_match=$v,rv.Name=yv,rv.NotationDecl=ly,rv.Reference=Sv,rv.PEReference=Av,rv.PI=Vv,rv.PUBLIC=Jv,rv.PubidLiteral=zv,rv.PubidLiteral_match=_v,rv.QName=kv,rv.QName_exact=Rv,rv.QName_group=Ev,rv.S=gv,rv.SChar_s=fv,rv.S_OPT=mv,rv.SYSTEM=Yv,rv.SystemLiteral=Lv,rv.SystemLiteral_match=ey,rv.InvalidChar=pv,rv.UNICODE_REPLACEMENT_CHARACTER="�",rv.UNICODE_SUPPORT=iv,rv.XMLDecl=py;var gy=qb,my=gy.find,by=gy.hasDefaultHTMLNamespace,vy=gy.hasOwn,yy=gy.isHTMLMimeType,wy=gy.isHTMLRawTextElement,xy=gy.isHTMLVoidElement,My=gy.MIME_TYPE,Sy=gy.NAMESPACE,Ay=Symbol(),Iy=Kb,Cy=Iy.DOMException,Ty=Iy.DOMExceptionName,ky=rv;function Ry(e){if(e!==Ay)throw new TypeError("Illegal constructor")}function Ey(e){return""!==e}function Ly(e,t){return vy(e,t)||(e[t]=!0),e}function Vy(e){if(!e)return[];var t=function(e){return e?e.split(/[\t\n\f\r ]+/).filter(Ey):[]}(e);return Object.keys(t.reduce(Ly,{}))}function Ny(e){if(!ky.QName_exact.test(e))throw new Cy(Cy.INVALID_CHARACTER_ERR,'invalid character in qualified name "'+e+'"')}function zy(e,t){Ny(t),e=e||null;var n=null,a=t;if(t.indexOf(":")>=0){var r=t.split(":");n=r[0],a=r[1]}if(null!==n&&null===e)throw new Cy(Cy.NAMESPACE_ERR,"prefix is non-null and namespace is null");if("xml"===n&&e!==gy.NAMESPACE.XML)throw new Cy(Cy.NAMESPACE_ERR,'prefix is "xml" and namespace is not the XML namespace');if(("xmlns"===n||"xmlns"===t)&&e!==gy.NAMESPACE.XMLNS)throw new Cy(Cy.NAMESPACE_ERR,'either qualifiedName or prefix is "xmlns" and namespace is not the XMLNS namespace');if(e===gy.NAMESPACE.XMLNS&&"xmlns"!==n&&"xmlns"!==t)throw new Cy(Cy.NAMESPACE_ERR,'namespace is the XMLNS namespace and neither qualifiedName nor prefix is "xmlns"');return[e,n,a]}function Py(e,t){for(var n in e)vy(e,n)&&(t[n]=e[n])}function Oy(e,t){var n=e.prototype;if(!(n instanceof t)){let a=function(){};a.prototype=t.prototype,a=new a,Py(n,a),e.prototype=n=a}n.constructor!=e&&("function"!=typeof e&&console.error("unknown Class:"+e),n.constructor=e)}var qy={},By=qy.ELEMENT_NODE=1,Wy=qy.ATTRIBUTE_NODE=2,Fy=qy.TEXT_NODE=3,Dy=qy.CDATA_SECTION_NODE=4,Hy=qy.ENTITY_REFERENCE_NODE=5,Uy=qy.ENTITY_NODE=6,Gy=qy.PROCESSING_INSTRUCTION_NODE=7,jy=qy.COMMENT_NODE=8,Zy=qy.DOCUMENT_NODE=9,Ky=qy.DOCUMENT_TYPE_NODE=10,Xy=qy.DOCUMENT_FRAGMENT_NODE=11,Yy=qy.NOTATION_NODE=12,Jy=gy.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 Qy(e,t){if(t.length<e.length)return Qy(t,e);var n=null;for(var a in e){if(e[a]!==t[a])return n;n=e[a]}return n}function $y(e){return e.guid||(e.guid=Math.random()),e.guid}function _y(){}function ew(e,t){this._node=e,this._refresh=t,tw(this)}function tw(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==t){var n=e._refresh(e._node);if(Hw(e,"length",n.length),!e.$$length||n.length<e.$$length)for(var a=n.length;a in e;a++)vy(e,a)&&delete e[a];Py(n,e),e._inc=t}}function nw(){}function aw(e,t){for(var n=0;n<e.length;){if(e[n]===t)return n;n++}}function rw(e,t,n,a){if(a?t[aw(t,a)]=n:(t[t.length]=n,t.length++),e){n.ownerElement=e;var r=e.ownerDocument;r&&(a&&pw(r,e,a),function(e,t,n){e&&e._inc++;var a=n.namespaceURI;a===Sy.XMLNS&&(t._nsMap[n.prefix?n.localName:""]=n.value)}(r,e,n))}}function ow(e,t,n){var a=aw(t,n);if(a>=0){for(var r=t.length-1;a<=r;)t[a]=t[++a];if(t.length=r,e){var o=e.ownerDocument;o&&pw(o,e,n),n.ownerElement=null}}}function iw(){}function lw(e){Ry(e)}function sw(e){return("<"==e?"&lt;":">"==e&&"&gt;")||"&"==e&&"&amp;"||'"'==e&&"&quot;"||"&#"+e.charCodeAt()+";"}function dw(e,t){cw(e,null,{enter:function(e){return!t(e)||cw.STOP}})}function cw(e,t,n){for(var a=[{node:e,context:t,phase:cw.ENTER}];a.length>0;){var r=a.pop();if(r.phase===cw.ENTER){var o=n.enter(r.node,r.context);if(o===cw.STOP)return cw.STOP;if(a.push({node:r.node,context:o,phase:cw.EXIT}),null==o)continue;for(var i=r.node.lastChild;i;)a.push({node:i,context:o,phase:cw.ENTER}),i=i.previousSibling}else n.exit&&n.exit(r.node,r.context)}}function uw(e,t){Ry(e);var n=t||{};this.ownerDocument=this,this.contentType=n.contentType||My.XML_APPLICATION,this.type=yy(this.contentType)?"html":"xml"}function pw(e,t,n,a){e&&e._inc++,n.namespaceURI===Sy.XMLNS&&delete t._nsMap[n.prefix?n.localName:""]}function hw(e,t,n){if(e&&e._inc){e._inc++;var a=t.childNodes;if(n&&!n.nextSibling)a[a.length++]=n;else{for(var r=t.firstChild,o=0;r;)a[o++]=r,r=r.nextSibling;a.length=o,delete a[a.length]}}}function fw(e,t){if(e!==t.parentNode)throw new Cy(Cy.NOT_FOUND_ERR,"child's parent is not parent");var n=t.previousSibling,a=t.nextSibling;return n?n.nextSibling=a:e.firstChild=a,a?a.previousSibling=n:e.lastChild=n,hw(e.ownerDocument,e),t.parentNode=null,t.previousSibling=null,t.nextSibling=null,t}function gw(e){return e&&e.nodeType===lw.DOCUMENT_TYPE_NODE}function mw(e){return e&&e.nodeType===lw.ELEMENT_NODE}function bw(e){return e&&e.nodeType===lw.TEXT_NODE}function vw(e,t){var n=e.childNodes||[];if(my(n,mw)||gw(t))return!1;var a=my(n,gw);return!(t&&a&&n.indexOf(a)>n.indexOf(t))}function yw(e,t){var n=e.childNodes||[];if(my(n,function(e){return mw(e)&&e!==t}))return!1;var a=my(n,gw);return!(t&&a&&n.indexOf(a)>n.indexOf(t))}function ww(e,t,n){if(!function(e){return e&&(e.nodeType===lw.DOCUMENT_NODE||e.nodeType===lw.DOCUMENT_FRAGMENT_NODE||e.nodeType===lw.ELEMENT_NODE)}(e))throw new Cy(Cy.HIERARCHY_REQUEST_ERR,"Unexpected parent node type "+e.nodeType);if(n&&n.parentNode!==e)throw new Cy(Cy.NOT_FOUND_ERR,"child not in parent");if(!function(e){return e&&(e.nodeType===lw.CDATA_SECTION_NODE||e.nodeType===lw.COMMENT_NODE||e.nodeType===lw.DOCUMENT_FRAGMENT_NODE||e.nodeType===lw.DOCUMENT_TYPE_NODE||e.nodeType===lw.ELEMENT_NODE||e.nodeType===lw.PROCESSING_INSTRUCTION_NODE||e.nodeType===lw.TEXT_NODE)}(t)||gw(t)&&e.nodeType!==lw.DOCUMENT_NODE)throw new Cy(Cy.HIERARCHY_REQUEST_ERR,"Unexpected node type "+t.nodeType+" for parent node type "+e.nodeType)}function xw(e,t,n){var a=e.childNodes||[],r=t.childNodes||[];if(t.nodeType===lw.DOCUMENT_FRAGMENT_NODE){var o=r.filter(mw);if(o.length>1||my(r,bw))throw new Cy(Cy.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(1===o.length&&!vw(e,n))throw new Cy(Cy.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(mw(t)&&!vw(e,n))throw new Cy(Cy.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(gw(t)){if(my(a,gw))throw new Cy(Cy.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var i=my(a,mw);if(n&&a.indexOf(i)<a.indexOf(n))throw new Cy(Cy.HIERARCHY_REQUEST_ERR,"Doctype can only be inserted before an element");if(!n&&i)throw new Cy(Cy.HIERARCHY_REQUEST_ERR,"Doctype can not be appended since element is present")}}function Mw(e,t,n){var a=e.childNodes||[],r=t.childNodes||[];if(t.nodeType===lw.DOCUMENT_FRAGMENT_NODE){var o=r.filter(mw);if(o.length>1||my(r,bw))throw new Cy(Cy.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(1===o.length&&!yw(e,n))throw new Cy(Cy.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(mw(t)&&!yw(e,n))throw new Cy(Cy.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(gw(t)){if(my(a,function(e){return gw(e)&&e!==n}))throw new Cy(Cy.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var i=my(a,mw);if(n&&a.indexOf(i)<a.indexOf(n))throw new Cy(Cy.HIERARCHY_REQUEST_ERR,"Doctype can only be inserted before an element")}}function Sw(e,t,n,a){ww(e,t,n),e.nodeType===lw.DOCUMENT_NODE&&(a||xw)(e,t,n);var r=t.parentNode;if(r&&r.removeChild(t),t.nodeType===Xy){var o=t.firstChild;if(null==o)return t;var i=t.lastChild}else o=i=t;var l=n?n.previousSibling:e.lastChild;o.previousSibling=l,i.nextSibling=n,l?l.nextSibling=o:e.firstChild=o,null==n?e.lastChild=i:n.previousSibling=i;do{o.parentNode=e}while(o!==i&&(o=o.nextSibling));return hw(e.ownerDocument||e,e,t),t.nodeType==Xy&&(t.firstChild=t.lastChild=null),t}function Aw(e){Ry(e),this._nsMap=Object.create(null)}function Iw(e){Ry(e),this.namespaceURI=null,this.prefix=null,this.ownerElement=null}function Cw(e){Ry(e)}function Tw(e){Ry(e)}function kw(e){Ry(e)}function Rw(e){Ry(e)}function Ew(e){Ry(e)}function Lw(e){Ry(e)}function Vw(e){Ry(e)}function Nw(e){Ry(e)}function zw(e){Ry(e)}function Pw(e){Ry(e)}function Ow(){}function qw(e){var t;t="function"==typeof e?{requireWellFormed:!1,splitCDATASections:!0,nodeFilter:e}:null!=e?{requireWellFormed:!!e.requireWellFormed,splitCDATASections:!1!==e.splitCDATASections,nodeFilter:e.nodeFilter||null}:{requireWellFormed:!1,splitCDATASections:!0,nodeFilter:null};var n=[],a=this.nodeType===Zy&&this.documentElement||this,r=a.prefix,o=a.namespaceURI;if(o&&null==r&&null==(r=a.lookupPrefix(o)))var i=[{namespace:o,prefix:null}];return Fw(this,n,i,t),n.join("")}function Bw(e,t,n){var a=e.prefix||"",r=e.namespaceURI;if(!r)return!1;if("xml"===a&&r===Sy.XML||r===Sy.XMLNS)return!1;for(var o=n.length;o--;){var i=n[o];if(i.prefix===a)return i.namespace!==r}return!0}function Ww(e,t,n){e.push(" ",t,'="',n.replace(/[<>&"\t\n\r]/g,sw),'"')}function Fw(e,t,n,a){n||(n=[]);var r=a.nodeFilter,o=a.requireWellFormed,i=a.splitCDATASections,l="html"===(e.nodeType===Zy?e:e.ownerDocument).type;cw(e,{ns:n},{enter:function(e,n){var s=n.ns;if(r){if(!(e=r(e)))return null;if("string"==typeof e)return t.push(e),null}switch(e.nodeType){case By:var d=e.attributes,c=d.length,u=e.tagName,p=u;if(!l&&!e.prefix&&e.namespaceURI){for(var h,f=0;f<d.length;f++)if("xmlns"===d.item(f).name){h=d.item(f).value;break}if(!h)for(var g=s.length-1;g>=0;g--){if(""===(m=s[g]).prefix&&m.namespace===e.namespaceURI){h=m.namespace;break}}if(h!==e.namespaceURI)for(g=s.length-1;g>=0;g--){var m;if((m=s[g]).namespace===e.namespaceURI){m.prefix&&(p=m.prefix+":"+u);break}}}t.push("<",p);for(var b=s.slice(),v=0;v<c;v++){"xmlns"==(y=d.item(v)).prefix?b.push({prefix:y.localName,namespace:y.value}):"xmlns"==y.nodeName&&b.push({prefix:"",namespace:y.value})}for(v=0;v<c;v++){var y;if(Bw(y=d.item(v),0,b)){var w=y.prefix||"",x=y.namespaceURI;Ww(t,w?"xmlns:"+w:"xmlns",x),b.push({prefix:w,namespace:x})}var M=r?r(y):y;M&&("string"==typeof M?t.push(M):Ww(t,M.name,M.value))}if(u===p&&Bw(e,0,b)){var S=e.prefix||"";x=e.namespaceURI;Ww(t,S?"xmlns:"+S:"xmlns",x),b.push({prefix:S,namespace:x})}var A=!e.firstChild;if(A&&(l||e.namespaceURI===Sy.HTML)&&(A=xy(u)),A)return t.push("/>"),null;if(t.push(">"),l&&wy(u)){for(var I=e.firstChild;I;)I.data?t.push(I.data):Fw(I,t,b.slice(),a),I=I.nextSibling;return t.push("</",p,">"),null}return{ns:b,tag:p};case Zy:case Xy:if(o&&e.nodeType===Zy&&null==e.documentElement)throw new Cy("The Document has no documentElement",Ty.InvalidStateError);return{ns:s};case Wy:return Ww(t,e.name,e.value),null;case Fy:if(o&&ky.InvalidChar.test(e.data))throw new Cy("The Text node data contains characters outside the XML Char production",Ty.InvalidStateError);return t.push(e.data.replace(/[<&>]/g,sw)),null;case Dy:if(o&&-1!==e.data.indexOf("]]>"))throw new Cy('The CDATASection data contains "]]>"',Ty.InvalidStateError);return i?t.push(ky.CDATA_START,e.data.replace(/]]>/g,"]]]]><![CDATA[>"),ky.CDATA_END):t.push(ky.CDATA_START,e.data,ky.CDATA_END),null;case jy:if(o){if(ky.InvalidChar.test(e.data))throw new Cy("The comment node data contains characters outside the XML Char production",Ty.InvalidStateError);if(-1!==e.data.indexOf("--")||"-"===e.data[e.data.length-1])throw new Cy('The comment node data contains "--" or ends with "-"',Ty.InvalidStateError)}return t.push(ky.COMMENT_START,e.data,ky.COMMENT_END),null;case Ky:var C=e.publicId,T=e.systemId;if(o){if(C&&!ky.PubidLiteral_match.test(C))throw new Cy("DocumentType publicId is not a valid PubidLiteral",Ty.InvalidStateError);if(T&&"."!==T&&!ky.SystemLiteral_match.test(T))throw new Cy("DocumentType systemId is not a valid SystemLiteral",Ty.InvalidStateError);if(e.internalSubset&&-1!==e.internalSubset.indexOf("]>"))throw new Cy('DocumentType internalSubset contains "]>"',Ty.InvalidStateError)}return t.push(ky.DOCTYPE_DECL_START," ",e.name),C?(t.push(" ",ky.PUBLIC," ",C),T&&"."!==T&&t.push(" ",T)):T&&"."!==T&&t.push(" ",ky.SYSTEM," ",T),e.internalSubset&&t.push(" [",e.internalSubset,"]"),t.push(">"),null;case Gy:if(o){if(-1!==e.target.indexOf(":")||"xml"===e.target.toLowerCase())throw new Cy("The ProcessingInstruction target is not well-formed",Ty.InvalidStateError);if(ky.InvalidChar.test(e.data))throw new Cy("The ProcessingInstruction data contains characters outside the XML Char production",Ty.InvalidStateError);if(-1!==e.data.indexOf("?>"))throw new Cy('The ProcessingInstruction data contains "?>"',Ty.InvalidStateError)}return t.push("<?",e.target," ",e.data,"?>"),null;case Hy:return t.push("&",e.nodeName,";"),null;default:return t.push("??",e.nodeName),null}},exit:function(e,n){n&&n.tag&&t.push("</",n.tag,">")}})}function Dw(e,t,n){var a;return cw(t,null,{enter:function(t,r){var o=new t.constructor(Ay);for(var i in t)if(vy(t,i)){var l=t[i];"object"!=typeof l&&l!=o[i]&&(o[i]=l)}t.childNodes&&(o.childNodes=new _y),o.ownerDocument=e;var s=n;switch(o.nodeType){case By:var d=t.attributes,c=o.attributes=new nw,u=d.length;c._ownerElement=o;for(var p=0;p<u;p++)o.setAttributeNode(Dw(e,d.item(p),!0));break;case Wy:s=!0}return null!==r?r.appendChild(o):a=o,s?o:null}}),a}function Hw(e,t,n){e[t]=n}function Uw(e){for(var t=[],n=e.firstChild;n;)n.nodeType===By&&t.push(n),n=n.nextSibling;return t}_y.prototype={length:0,item:function(e){return e>=0&&e<this.length?this[e]:null},toString:function(e){var t;t="function"==typeof e?{requireWellFormed:!1,splitCDATASections:!0,nodeFilter:e}:e?{requireWellFormed:!!e.requireWellFormed,splitCDATASections:!1!==e.splitCDATASections,nodeFilter:e.nodeFilter||null}:{requireWellFormed:!1,splitCDATASections:!0,nodeFilter:null};for(var n=[],a=0;a<this.length;a++)Fw(this[a],n,null,t);return n.join("")},filter:function(e){return Array.prototype.filter.call(this,e)},indexOf:function(e){return Array.prototype.indexOf.call(this,e)}},_y.prototype[Symbol.iterator]=function(){var e=this,t=0;return{next:function(){return t<e.length?{value:e[t++],done:!1}:{done:!0}},return:function(){return{done:!0}}}},ew.prototype.item=function(e){return tw(this),this[e]||null},Oy(ew,_y),nw.prototype={length:0,item:_y.prototype.item,getNamedItem:function(e){this._ownerElement&&this._ownerElement._isInHTMLDocumentAndNamespace()&&(e=e.toLowerCase());for(var t=0;t<this.length;){var n=this[t];if(n.nodeName===e)return n;t++}return null},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!==this._ownerElement)throw new Cy(Cy.INUSE_ATTRIBUTE_ERR);var n=this.getNamedItemNS(e.namespaceURI,e.localName);return n===e?e:(rw(this._ownerElement,this,e,n),n)},setNamedItemNS:function(e){return this.setNamedItem(e)},removeNamedItem:function(e){var t=this.getNamedItem(e);if(!t)throw new Cy(Cy.NOT_FOUND_ERR,e);return ow(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var n=this.getNamedItemNS(e,t);if(!n)throw new Cy(Cy.NOT_FOUND_ERR,e?e+" : "+t:t);return ow(this._ownerElement,this,n),n},getNamedItemNS:function(e,t){e||(e=null);for(var n=0;n<this.length;){var a=this[n];if(a.localName===t&&a.namespaceURI===e)return a;n++}return null}},nw.prototype[Symbol.iterator]=function(){var e=this,t=0;return{next:function(){return t<e.length?{value:e[t++],done:!1}:{done:!0}},return:function(){return{done:!0}}}},iw.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,n){var a=My.XML_APPLICATION;e===Sy.HTML?a=My.XML_XHTML_APPLICATION:e===Sy.SVG&&(a=My.XML_SVG_IMAGE);var r=new uw(Ay,{contentType:a});if(r.implementation=this,r.childNodes=new _y,r.doctype=n||null,n&&r.appendChild(n),t){var o=r.createElementNS(e,t);r.appendChild(o)}return r},createDocumentType:function(e,t,n,a){Ny(e);var r=new Ew(Ay);return r.name=e,r.nodeName=e,r.publicId=t||"",r.systemId=n||"",r.internalSubset=a||"",r.childNodes=new _y,r},createHTMLDocument:function(e){var t=new uw(Ay,{contentType:My.HTML});if(t.implementation=this,t.childNodes=new _y,!1!==e){t.doctype=this.createDocumentType("html"),t.doctype.ownerDocument=t,t.appendChild(t.doctype);var n=t.createElement("html");t.appendChild(n);var a=t.createElement("head");if(n.appendChild(a),"string"==typeof e){var r=t.createElement("title");r.appendChild(t.createTextNode(e)),a.appendChild(r)}n.appendChild(t.createElement("body"))}return t}},lw.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,parentNode:null,get parentElement(){return this.parentNode&&this.parentNode.nodeType===this.ELEMENT_NODE?this.parentNode:null},childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,baseURI:"about:blank",get isConnected(){var e=this.getRootNode();return e&&e.nodeType===e.DOCUMENT_NODE},contains:function(e){if(!e)return!1;var t=e;do{if(this===t)return!0;t=t.parentNode}while(t);return!1},getRootNode:function(e){var t=this;do{if(!t.parentNode)return t;t=t.parentNode}while(t)},isEqualNode:function(e){if(!e)return!1;for(var t=[{node:this,other:e}];t.length>0;){var n=t.pop(),a=n.node,r=n.other;if(a.nodeType!==r.nodeType)return!1;switch(a.nodeType){case a.DOCUMENT_TYPE_NODE:if(a.name!==r.name)return!1;if(a.publicId!==r.publicId)return!1;if(a.systemId!==r.systemId)return!1;break;case a.ELEMENT_NODE:if(a.namespaceURI!==r.namespaceURI)return!1;if(a.prefix!==r.prefix)return!1;if(a.localName!==r.localName)return!1;if(a.attributes.length!==r.attributes.length)return!1;for(var o=0;o<a.attributes.length;o++){var i=a.attributes.item(o),l=r.getAttributeNodeNS(i.namespaceURI,i.localName);if(!l)return!1;t.push({node:i,other:l})}break;case a.ATTRIBUTE_NODE:if(a.namespaceURI!==r.namespaceURI)return!1;if(a.localName!==r.localName)return!1;if(a.value!==r.value)return!1;break;case a.PROCESSING_INSTRUCTION_NODE:if(a.target!==r.target||a.data!==r.data)return!1;break;case a.TEXT_NODE:case a.CDATA_SECTION_NODE:case a.COMMENT_NODE:if(a.data!==r.data)return!1}if(a.childNodes.length!==r.childNodes.length)return!1;for(o=a.childNodes.length-1;o>=0;o--)t.push({node:a.childNodes[o],other:r.childNodes[o]})}return!0},isSameNode:function(e){return this===e},insertBefore:function(e,t){return Sw(this,e,t)},replaceChild:function(e,t){Sw(this,e,t,Mw),t&&this.removeChild(t)},removeChild:function(e){return fw(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return Dw(this.ownerDocument||this,this,e)},normalize:function(){cw(this,null,{enter:function(e){for(var t=e.firstChild;t;){var n=t.nextSibling;null!==n&&n.nodeType===Fy&&t.nodeType===Fy?(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 a in n)if(vy(n,a)&&n[a]===e)return a;t=t.nodeType==Wy?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&vy(n,e))return n[e];t=t.nodeType==Wy?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)},compareDocumentPosition:function(e){if(this===e)return 0;var t=e,n=this,a=null,r=null;if(t instanceof Iw&&(t=(a=t).ownerElement),n instanceof Iw&&(n=(r=n).ownerElement,a&&t&&n===t))for(var o,i=0;o=n.attributes[i];i++){if(o===a)return Jy.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+Jy.DOCUMENT_POSITION_PRECEDING;if(o===r)return Jy.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+Jy.DOCUMENT_POSITION_FOLLOWING}if(!t||!n||n.ownerDocument!==t.ownerDocument)return Jy.DOCUMENT_POSITION_DISCONNECTED+Jy.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+($y(n.ownerDocument)>$y(t.ownerDocument)?Jy.DOCUMENT_POSITION_FOLLOWING:Jy.DOCUMENT_POSITION_PRECEDING);if(r&&t===n)return Jy.DOCUMENT_POSITION_CONTAINS+Jy.DOCUMENT_POSITION_PRECEDING;if(a&&t===n)return Jy.DOCUMENT_POSITION_CONTAINED_BY+Jy.DOCUMENT_POSITION_FOLLOWING;for(var l=[],s=t.parentNode;s;){if(!r&&s===n)return Jy.DOCUMENT_POSITION_CONTAINED_BY+Jy.DOCUMENT_POSITION_FOLLOWING;l.push(s),s=s.parentNode}l.reverse();for(var d=[],c=n.parentNode;c;){if(!a&&c===t)return Jy.DOCUMENT_POSITION_CONTAINS+Jy.DOCUMENT_POSITION_PRECEDING;d.push(c),c=c.parentNode}d.reverse();var u=Qy(l,d);for(var p in u.childNodes){var h=u.childNodes[p];if(h===n)return Jy.DOCUMENT_POSITION_FOLLOWING;if(h===t)return Jy.DOCUMENT_POSITION_PRECEDING;if(d.indexOf(h)>=0)return Jy.DOCUMENT_POSITION_FOLLOWING;if(l.indexOf(h)>=0)return Jy.DOCUMENT_POSITION_PRECEDING}return 0}},Py(qy,lw),Py(qy,lw.prototype),Py(Jy,lw),Py(Jy,lw.prototype),cw.STOP=Symbol("walkDOM.STOP"),cw.ENTER=0,cw.EXIT=1,uw.prototype={implementation:null,nodeName:"#document",nodeType:Zy,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType===Xy){for(var n=e.firstChild;n;){var a=n.nextSibling;this.insertBefore(n,t),n=a}return e}return Sw(this,e,t),e.ownerDocument=this,null===this.documentElement&&e.nodeType===By&&(this.documentElement=e),e},removeChild:function(e){var t=fw(this,e);return t===this.documentElement&&(this.documentElement=null),t},replaceChild:function(e,t){Sw(this,e,t,Mw),e.ownerDocument=this,t&&this.removeChild(t),mw(e)&&(this.documentElement=e)},importNode:function(e,t){return function(e,t,n){var a;return cw(t,null,{enter:function(t,r){var o=t.cloneNode(!1);return o.ownerDocument=e,o.parentNode=null,null===r?a=o:r.appendChild(o),t.nodeType===Wy||n?o:null}}),a}(this,e,t)},getElementById:function(e){var t=null;return dw(this.documentElement,function(n){if(n.nodeType==By&&n.getAttribute("id")==e)return t=n,!0}),t},createElement:function(e){var t=new Aw(Ay);return t.ownerDocument=this,"html"===this.type&&(e=e.toLowerCase()),by(this.contentType)&&(t.namespaceURI=Sy.HTML),t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new _y,(t.attributes=new nw)._ownerElement=t,t},createDocumentFragment:function(){var e=new zw(Ay);return e.ownerDocument=this,e.childNodes=new _y,e},createTextNode:function(e){var t=new Tw(Ay);return t.ownerDocument=this,t.childNodes=new _y,t.appendData(e),t},createComment:function(e){var t=new kw(Ay);return t.ownerDocument=this,t.childNodes=new _y,t.appendData(e),t},createCDATASection:function(e){if(-1!==e.indexOf("]]>"))throw new Cy(Cy.INVALID_CHARACTER_ERR,'data contains "]]>"');var t=new Rw(Ay);return t.ownerDocument=this,t.childNodes=new _y,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new Pw(Ay);return n.ownerDocument=this,n.childNodes=new _y,n.nodeName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){if(!ky.QName_exact.test(e))throw new Cy(Cy.INVALID_CHARACTER_ERR,'invalid character in name "'+e+'"');return"html"===this.type&&(e=e.toLowerCase()),this._createAttribute(e)},_createAttribute:function(e){var t=new Iw(Ay);return t.ownerDocument=this,t.childNodes=new _y,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){if(!ky.Name.test(e))throw new Cy(Cy.INVALID_CHARACTER_ERR,'not a valid xml name "'+e+'"');if("html"===this.type)throw new Cy("document is an html document",Ty.NotSupportedError);var t=new Nw(Ay);return t.ownerDocument=this,t.childNodes=new _y,t.nodeName=e,t},createElementNS:function(e,t){var n=zy(e,t),a=new Aw(Ay),r=a.attributes=new nw;return a.childNodes=new _y,a.ownerDocument=this,a.nodeName=t,a.tagName=t,a.namespaceURI=n[0],a.prefix=n[1],a.localName=n[2],r._ownerElement=a,a},createAttributeNS:function(e,t){var n=zy(e,t),a=new Iw(Ay);return a.ownerDocument=this,a.childNodes=new _y,a.nodeName=t,a.name=t,a.specified=!0,a.namespaceURI=n[0],a.prefix=n[1],a.localName=n[2],a}},Oy(uw,lw),Aw.prototype={nodeType:By,attributes:null,getQualifiedName:function(){return this.prefix?this.prefix+":"+this.localName:this.localName},_isInHTMLDocumentAndNamespace:function(){return"html"===this.ownerDocument.type&&this.namespaceURI===Sy.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)).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 null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n?n.value:null},setAttributeNS:function(e,t,n){var a=zy(e,t)[2],r=this.getAttributeNodeNS(e,a);r?r.value=r.nodeValue=""+n:((r=this.ownerDocument.createAttributeNS(e,t)).value=r.nodeValue=""+n,this.setAttributeNode(r))},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByClassName:function(e){var t=Vy(e);return new ew(this,function(n){var a=[];return t.length>0&&dw(n,function(r){if(r!==n&&r.nodeType===By){var o=r.getAttribute("class");if(o){var i=e===o;if(!i){var l=Vy(o);i=t.every((s=l,function(e){return s&&-1!==s.indexOf(e)}))}i&&a.push(r)}}var s}),a})},getElementsByTagName:function(e){var t="html"===(this.nodeType===Zy?this:this.ownerDocument).type,n=e.toLowerCase();return new ew(this,function(a){var r=[];return dw(a,function(o){o!==a&&o.nodeType===By&&(("*"===e||o.getQualifiedName()===(t&&o.namespaceURI===Sy.HTML?n:e))&&r.push(o))}),r})},getElementsByTagNameNS:function(e,t){return new ew(this,function(n){var a=[];return dw(n,function(r){r===n||r.nodeType!==By||"*"!==e&&r.namespaceURI!==e||"*"!==t&&r.localName!=t||a.push(r)}),a})}},uw.prototype.getElementsByClassName=Aw.prototype.getElementsByClassName,uw.prototype.getElementsByTagName=Aw.prototype.getElementsByTagName,uw.prototype.getElementsByTagNameNS=Aw.prototype.getElementsByTagNameNS,Oy(Aw,lw),Iw.prototype.nodeType=Wy,Oy(Iw,lw),Cw.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){n=this.data.substring(0,e)+n+this.data.substring(e+t),this.nodeValue=this.data=n,this.length=n.length}},Oy(Cw,lw),Tw.prototype={nodeName:"#text",nodeType:Fy,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 a=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling),a}},Oy(Tw,Cw),kw.prototype={nodeName:"#comment",nodeType:jy},Oy(kw,Cw),Rw.prototype={nodeName:"#cdata-section",nodeType:Dy},Oy(Rw,Tw),Ew.prototype.nodeType=Ky,Oy(Ew,lw),Lw.prototype.nodeType=Yy,Oy(Lw,lw),Vw.prototype.nodeType=Uy,Oy(Vw,lw),Nw.prototype.nodeType=Hy,Oy(Nw,lw),zw.prototype.nodeName="#document-fragment",zw.prototype.nodeType=Xy,Oy(zw,lw),Pw.prototype.nodeType=Gy,Oy(Pw,Cw),Ow.prototype.serializeToString=function(e,t){return qw.call(e,t)},lw.prototype.toString=qw;try{Object.defineProperty&&(Object.defineProperty(ew.prototype,"length",{get:function(){return tw(this),this.$$length}}),Object.defineProperty(lw.prototype,"textContent",{get:function(){if(this.nodeType===By||this.nodeType===Xy){var e=[];return cw(this,null,{enter:function(t){return t.nodeType===By||t.nodeType===Xy||(t.nodeType===Gy||t.nodeType===jy?null:void e.push(t.nodeValue))}}),e.join("")}return this.nodeValue},set:function(e){switch(this.nodeType){case By:case Xy:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),Object.defineProperty(Aw.prototype,"children",{get:function(){return new ew(this,Uw)}}),Object.defineProperty(uw.prototype,"children",{get:function(){return new ew(this,Uw)}}),Object.defineProperty(zw.prototype,"children",{get:function(){return new ew(this,Uw)}}),Hw=function(e,t,n){e["$$"+t]=n})}catch(r$){}av._updateLiveList=tw,av.Attr=Iw,av.CDATASection=Rw,av.CharacterData=Cw,av.Comment=kw,av.Document=uw,av.DocumentFragment=zw,av.DocumentType=Ew,av.DOMImplementation=iw,av.Element=Aw,av.Entity=Vw,av.EntityReference=Nw,av.LiveNodeList=ew,av.NamedNodeMap=nw,av.Node=lw,av.NodeList=_y,av.Notation=Lw,av.Text=Tw,av.ProcessingInstruction=Pw,av.walkDOM=cw,av.XMLSerializer=Ow;var Gw,jw,Zw={},Kw={};Gw=Kw,jw=qb.freeze,Gw.XML_ENTITIES=jw({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),Gw.HTML_ENTITIES=jw({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:" ",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:" ",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:"\t",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:"‌"}),Gw.entityMap=Gw.HTML_ENTITIES;var Xw={},Yw=qb,Jw=rv,Qw=Kb,$w=Yw.isHTMLEscapableRawTextElement,_w=Yw.isHTMLMimeType,ex=Yw.isHTMLRawTextElement,tx=Yw.hasOwn,nx=Yw.NAMESPACE,ax=Qw.ParseError,rx=Qw.DOMException;function ox(){}ox.prototype={parse:function(e,t,n){var a=this.domBuilder;a.startDocument(),ux(t,t=Object.create(null)),function(e,t,n,a,r){var o=_w(a.mimeType);e.indexOf(Jw.UNICODE_REPLACEMENT_CHARACTER)>=0&&r.warning("Unicode replacement character detected, source encoding issues?");function i(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}function l(e){var t=";"===e[e.length-1]?e:e+";";if(!o&&t!==e)return r.error("EntityRef: expecting ;"),e;var a=Jw.Reference.exec(t);if(!a||a[0].length!==t.length)return r.error("entity not matching Reference production: "+e),e;var l=t.slice(1,-1);return tx(n,l)?n[l]:"#"===l.charAt(0)?i(parseInt(l.substring(1).replace("x","0x"))):(r.error("entity not found:"+e),e)}function s(t){if(t>m){var n=e.substring(m,t).replace(ix,l);p&&h(m),a.characters(n,0,t-m),m=t}}var d=0,c=0,u=/\r\n?|\n|$/g,p=a.locator;function h(t,n){for(;t>=c&&(n=u.exec(e));)d=c,c=n.index+n[0].length,p.lineNumber++;p.columnNumber=t-d+1}var f=[{currentNSMap:t}],g=[],m=0;for(;;){try{var b=e.indexOf("<",m);if(b<0){if(!o&&g.length>0)return r.fatalError("unclosed xml tag(s): "+g.join(", "));if(!e.substring(m).match(/^\s*$/)){var v=a.doc,y=v.createTextNode(e.substring(m));if(v.documentElement)return r.error("Extra content at the end of the document");v.appendChild(y),a.currentElement=y}return}if(b>m){var w=e.substring(m,b);o||0!==g.length||(w=w.replace(new RegExp(Jw.S_OPT.source,"g"),""))&&r.error("Unexpected content outside root element: '"+w+"'"),s(b)}switch(e.charAt(b+1)){case"/":var x=e.indexOf(">",b+2),M=e.substring(b+2,x>0?x:void 0);if(!M)return r.fatalError("end tag name missing");var S=x>0&&Jw.reg("^",Jw.QName_group,Jw.S_OPT,"$").exec(M);if(!S)return r.fatalError('end tag name contains invalid characters: "'+M+'"');if(!a.currentElement&&!a.doc.documentElement)return;var A=g[g.length-1]||a.currentElement.tagName||a.doc.documentElement.tagName||"";if(A!==S[1]){var I=S[1].toLowerCase();if(!o||A.toLowerCase()!==I)return r.fatalError('Opening and ending tag mismatch: "'+A+'" != "'+M+'"')}var C=f.pop();g.pop();var T=C.localNSMap;if(a.endElement(C.uri,C.localName,A),T)for(var k in T)tx(T,k)&&a.endPrefixMapping(k);x++;break;case"?":p&&h(b),x=fx(e,b,a,r);break;case"!":p&&h(b),x=hx(e,b,a,r,o);break;default:p&&h(b);var R=new gx,E=f[f.length-1].currentNSMap,L=(x=sx(e,b,R,E,l,r,o),R.length);if(R.closed||(o&&Yw.isHTMLVoidElement(R.tagName)?R.closed=!0:g.push(R.tagName)),p&&L){for(var V=lx(p,{}),N=0;N<L;N++){var z=R[N];h(z.offset),z.locator=lx(p,{})}a.locator=V,dx(R,a,E)&&f.push(R),a.locator=p}else dx(R,a,E)&&f.push(R);o&&!R.closed?x=cx(e,x,R.tagName,l,a):x++}}catch(r$){if(r$ instanceof ax)throw r$;if(r$ instanceof rx)throw new ax(r$.name+": "+r$.message,a.locator,r$);r.error("element parse error: "+r$),x=-1}x>m?m=x:s(Math.max(b,m)+1)}}(e,t,n,a,this.errorHandler),a.endDocument()}};var ix=/&#?\w+;?/g;function lx(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function sx(e,t,n,a,r,o,i){function l(e,t,a){return tx(n.attributeNames,e)?o.fatalError("Attribute "+e+" redefined"):!i&&t.indexOf("<")>=0?o.fatalError("Unescaped '<' not allowed in attributes values"):void n.addValue(e,t.replace(/[\t\n\r]/g," ").replace(ix,r),a)}for(var s,d=++t,c=0;;){var u=e.charAt(d);switch(u){case"=":if(1===c)s=e.slice(t,d),c=3;else{if(2!==c)throw new Error("attribute equal must after attrName");c=3}break;case"'":case'"':if(3===c||1===c){if(1===c&&(o.warning('attribute value must after "="'),s=e.slice(t,d)),t=d+1,!((d=e.indexOf(u,t))>0))throw new Error("attribute value no end '"+u+"' match");l(s,p=e.slice(t,d),t-1),c=5}else{if(4!=c)throw new Error('attribute value must after "="');l(s,p=e.slice(t,d),t),o.warning('attribute "'+s+'" missed start quot('+u+")!!"),t=d+1,c=5}break;case"/":switch(c){case 0:n.setTagName(e.slice(t,d));case 5:case 6:case 7:c=7,n.closed=!0;case 4:case 1:break;case 2:n.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return o.error("unexpected end of input"),0==c&&n.setTagName(e.slice(t,d)),d;case">":switch(c){case 0:n.setTagName(e.slice(t,d));case 5:case 6:case 7:break;case 4:case 1:"/"===(p=e.slice(t,d)).slice(-1)&&(n.closed=!0,p=p.slice(0,-1));case 2:2===c&&(p=s),4==c?(o.warning('attribute "'+p+'" missed quot(")!'),l(s,p,t)):(i||o.warning('attribute "'+p+'" missed value!! "'+p+'" instead!!'),l(p,p,t));break;case 3:if(!i)return o.fatalError("AttValue: ' or \" expected")}return d;case"€":u=" ";default:if(u<=" ")switch(c){case 0:n.setTagName(e.slice(t,d)),c=6;break;case 1:s=e.slice(t,d),c=2;break;case 4:var p=e.slice(t,d);o.warning('attribute "'+p+'" missed quot(")!!'),l(s,p,t);case 5:c=6}else switch(c){case 2:i||o.warning('attribute "'+s+'" missed value!! "'+s+'" instead2!!'),l(s,s,t),t=d,c=1;break;case 5:o.warning('attribute space is required"'+s+'"!!');case 6:c=1,t=d;break;case 3:c=4,t=d;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}d++}}function dx(e,t,n){for(var a=e.tagName,r=null,o=e.length;o--;){var i=e[o],l=i.qName,s=i.value;if((p=l.indexOf(":"))>0)var d=i.prefix=l.slice(0,p),c=l.slice(p+1),u="xmlns"===d&&c;else c=l,d=null,u="xmlns"===l&&"";i.localName=c,!1!==u&&(null==r&&(r=Object.create(null),ux(n,n=Object.create(null))),n[u]=r[u]=s,i.uri=nx.XMLNS,t.startPrefixMapping(u,s))}for(o=e.length;o--;)(i=e[o]).prefix&&("xml"===i.prefix&&(i.uri=nx.XML),"xmlns"!==i.prefix&&(i.uri=n[i.prefix]));var p;(p=a.indexOf(":"))>0?(d=e.prefix=a.slice(0,p),c=e.localName=a.slice(p+1)):(d=null,c=e.localName=a);var h=e.uri=n[d||""];if(t.startElement(h,c,a,e),!e.closed)return e.currentNSMap=n,e.localNSMap=r,!0;if(t.endElement(h,c,a),r)for(d in r)tx(r,d)&&t.endPrefixMapping(d)}function cx(e,t,n,a,r){var o=$w(n);if(o||ex(n)){var i=e.indexOf("</"+n+">",t),l=e.substring(t+1,i);return o&&(l=l.replace(ix,a)),r.characters(l,0,l.length),i}return t+1}function ux(e,t){for(var n in e)tx(e,n)&&(t[n]=e[n])}function px(e,t){var n=t;function a(t){return t=t||0,e.charAt(n+t)}function r(e){n+=e=e||1}function o(){return e.substring(n)}return{char:a,getIndex:function(){return n},getMatch:function(e){var t=Jw.reg("^",e).exec(o());return t?(r(t[0].length),t[0]):null},getSource:function(){return e},skip:r,skipBlanks:function(){for(var t=0;n<e.length;){var o=a();if(" "!==o&&"\n"!==o&&"\t"!==o&&"\r"!==o)return t;t++,r()}return-1},substringFromIndex:o,substringStartsWith:function(t){return e.substring(n,n+t.length)===t},substringStartsWithCaseInsensitive:function(t){return e.substring(n,n+t.length).toUpperCase()===t.toUpperCase()}}}function hx(e,t,n,a,r){var o=px(e,t);switch(r?o.char(2).toUpperCase():o.char(2)){case"-":var i=o.getMatch(Jw.Comment);return i?(n.comment(i,Jw.COMMENT_START.length,i.length-Jw.COMMENT_START.length-Jw.COMMENT_END.length),o.getIndex()):a.fatalError("comment is not well-formed at position "+o.getIndex());case"[":var l=o.getMatch(Jw.CDSect);return l?r||n.currentElement?(n.startCDATA(),n.characters(l,Jw.CDATA_START.length,l.length-Jw.CDATA_START.length-Jw.CDATA_END.length),n.endCDATA(),o.getIndex()):a.fatalError("CDATA outside of element"):a.fatalError("Invalid CDATA starting at position "+t);case"D":if(n.doc&&n.doc.documentElement)return a.fatalError("Doctype not allowed inside or after documentElement at position "+o.getIndex());if(r?!o.substringStartsWithCaseInsensitive(Jw.DOCTYPE_DECL_START):!o.substringStartsWith(Jw.DOCTYPE_DECL_START))return a.fatalError("Expected "+Jw.DOCTYPE_DECL_START+" at position "+o.getIndex());if(o.skip(Jw.DOCTYPE_DECL_START.length),o.skipBlanks()<1)return a.fatalError("Expected whitespace after "+Jw.DOCTYPE_DECL_START+" at position "+o.getIndex());var s={name:void 0,publicId:void 0,systemId:void 0,internalSubset:void 0};if(s.name=o.getMatch(Jw.Name),!s.name)return a.fatalError("doctype name missing or contains unexpected characters at position "+o.getIndex());if(r&&"html"!==s.name.toLowerCase()&&a.warning("Unexpected DOCTYPE in HTML document at position "+o.getIndex()),o.skipBlanks(),o.substringStartsWith(Jw.PUBLIC)||o.substringStartsWith(Jw.SYSTEM)){var d=Jw.ExternalID_match.exec(o.substringFromIndex());if(!d)return a.fatalError("doctype external id is not well-formed at position "+o.getIndex());void 0!==d.groups.SystemLiteralOnly?s.systemId=d.groups.SystemLiteralOnly:(s.systemId=d.groups.SystemLiteral,s.publicId=d.groups.PubidLiteral),o.skip(d[0].length)}else if(r&&o.substringStartsWithCaseInsensitive(Jw.SYSTEM)){if(o.skip(Jw.SYSTEM.length),o.skipBlanks()<1)return a.fatalError("Expected whitespace after "+Jw.SYSTEM+" at position "+o.getIndex());if(s.systemId=o.getMatch(Jw.ABOUT_LEGACY_COMPAT_SystemLiteral),!s.systemId)return a.fatalError("Expected "+Jw.ABOUT_LEGACY_COMPAT+" in single or double quotes after "+Jw.SYSTEM+" at position "+o.getIndex())}return r&&s.systemId&&!Jw.ABOUT_LEGACY_COMPAT_SystemLiteral.test(s.systemId)&&a.warning("Unexpected doctype.systemId in HTML document at position "+o.getIndex()),r||(o.skipBlanks(),s.internalSubset=function(e,t){function n(e,t){var n=Jw.PI.exec(e.substringFromIndex());return n?"xml"===n[1].toLowerCase()?t.fatalError("xml declaration is only allowed at the start of the document, but found at position "+e.getIndex()):(e.skip(n[0].length),n[0]):t.fatalError("processing instruction is not well-formed at position "+e.getIndex())}var a=e.getSource();if("["===e.char()){e.skip(1);for(var r=e.getIndex();e.getIndex()<a.length;){if(e.skipBlanks(),"]"===e.char()){var o=a.substring(r,e.getIndex());return e.skip(1),o}var i=null;if("<"===e.char()&&"!"===e.char(1))switch(e.char(2)){case"E":"L"===e.char(3)?i=e.getMatch(Jw.elementdecl):"N"===e.char(3)&&(i=e.getMatch(Jw.EntityDecl));break;case"A":i=e.getMatch(Jw.AttlistDecl);break;case"N":i=e.getMatch(Jw.NotationDecl);break;case"-":i=e.getMatch(Jw.Comment)}else if("<"===e.char()&&"?"===e.char(1))i=n(e,t);else{if("%"!==e.char())return t.fatalError("Error detected in Markup declaration");i=e.getMatch(Jw.PEReference)}if(!i)return t.fatalError("Error in internal subset at position "+e.getIndex())}return t.fatalError("doctype internal subset is not well-formed, missing ]")}}(o,a)),o.skipBlanks(),">"!==o.char()?a.fatalError("doctype not terminated with > at position "+o.getIndex()):(o.skip(1),n.startDTD(s.name,s.publicId,s.systemId,s.internalSubset),n.endDTD(),o.getIndex());default:return a.fatalError('Not well-formed XML starting with "<!" at position '+t)}}function fx(e,t,n,a){var r=e.substring(t).match(Jw.PI);if(!r)return a.fatalError("Invalid processing instruction starting at position "+t);if("xml"===r[1].toLowerCase()){if(t>0)return a.fatalError("processing instruction at position "+t+" is an xml declaration which is only at the start of the document");if(!Jw.XMLDecl.test(e.substring(t)))return a.fatalError("xml declaration is not well-formed")}return n.processingInstruction(r[1],r[2]),t+r[0].length}function gx(){this.attributeNames=Object.create(null)}gx.prototype={setTagName:function(e){if(!Jw.QName_exact.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,n){if(!Jw.QName_exact.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:n}},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}},Xw.XMLReader=ox,Xw.parseUtils=px,Xw.parseDoctypeCommentOrCData=hx;var mx=qb,bx=Kb,vx=Kw,yx=Xw,wx=av.DOMImplementation,xx=mx.hasDefaultHTMLNamespace,Mx=mx.isHTMLMimeType,Sx=mx.isValidMimeType,Ax=mx.MIME_TYPE,Ix=mx.NAMESPACE,Cx=bx.ParseError,Tx=yx.XMLReader;function kx(e){return e.replace(/\r[\n\u0085]/g,"\n").replace(/[\r\u0085\u2028\u2029]/g,"\n")}function Rx(e){if(void 0===(e=e||{}).locator&&(e.locator=!0),this.assign=e.assign||mx.assign,this.domHandler=e.domHandler||Ex,this.onError=e.onError||e.errorHandler,e.errorHandler&&"function"!=typeof e.errorHandler)throw new 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||kx,this.locator=!!e.locator,this.xmlns=this.assign(Object.create(null),e.xmlns)}function Ex(e){var t=e||{};this.mimeType=t.mimeType||Ax.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 Lx(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function Vx(e,t,n){return"string"==typeof e?e.substr(t,n):e.length>=t+n||t?new java.lang.String(e,t,n)+"":e}function Nx(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}Rx.prototype.parseFromString=function(e,t){if(!Sx(t))throw new TypeError('DOMParser.parseFromString: the provided mimeType "'+t+'" is not valid.');var n=this.assign(Object.create(null),this.xmlns),a=vx.XML_ENTITIES,r=n[""]||null;xx(t)?(a=vx.HTML_ENTITIES,r=Ix.HTML):t===Ax.XML_SVG_IMAGE&&(r=Ix.SVG),n[""]=r,n.xml=n.xml||Ix.XML;var o=new this.domHandler({mimeType:t,defaultNamespace:r,onError:this.onError}),i=this.locator?{}:void 0;this.locator&&o.setDocumentLocator(i);var l=new Tx;return l.errorHandler=o,l.domBuilder=o,!mx.isHTMLMimeType(t)&&"string"!=typeof e&&l.errorHandler.fatalError("source is not a string"),l.parse(this.normalizeLineEndings(String(e)),n,a),o.doc.documentElement||l.errorHandler.fatalError("missing root element"),o.doc},Ex.prototype={startDocument:function(){var e=new wx;this.doc=Mx(this.mimeType)?e.createHTMLDocument(!1):e.createDocument(this.defaultNamespace,"")},startElement:function(e,t,n,a){var r=this.doc,o=r.createElementNS(e,n||t),i=a.length;Nx(this,o),this.currentElement=o,this.locator&&Lx(this.locator,o);for(var l=0;l<i;l++){e=a.getURI(l);var s=a.getValue(l),d=(n=a.getQName(l),r.createAttributeNS(e,n));this.locator&&Lx(a.getLocator(l),d),d.value=d.nodeValue=s,o.setAttributeNode(d)}},endElement:function(e,t,n){this.currentElement=this.currentElement.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var n=this.doc.createProcessingInstruction(e,t);this.locator&&Lx(this.locator,n),Nx(this,n)},ignorableWhitespace:function(e,t,n){},characters:function(e,t,n){if(e=Vx.apply(this,arguments)){if(this.cdata)var a=this.doc.createCDATASection(e);else a=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(a):/^\s*$/.test(e)&&this.doc.appendChild(a),this.locator&&Lx(this.locator,a)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){e&&(e.lineNumber=0),this.locator=e},comment:function(e,t,n){e=Vx.apply(this,arguments);var a=this.doc.createComment(e);this.locator&&Lx(this.locator,a),Nx(this,a)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,n,a){var r=this.doc.implementation;if(r&&r.createDocumentType){var o=r.createDocumentType(e,t,n,a);this.locator&&Lx(this.locator,o),Nx(this,o),this.doc.doctype=o}},reportError:function(e,t){if("function"==typeof this.onError)try{this.onError(e,t,this)}catch(r$){throw new Cx("Reporting "+e+' "'+t+'" caused '+r$,this.locator)}else console.error("[xmldom "+e+"]\t"+t,function(e){if(e)return"\n@#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}(this.locator))},warning:function(e){this.reportError("warning",e)},error:function(e){this.reportError("error",e)},fatalError:function(e){throw this.reportError("fatalError",e),new Cx(e,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(e){Ex.prototype[e]=function(){return null}}),Zw.__DOMHandler=Ex,Zw.DOMParser=Rx,Zw.normalizeLineEndings=kx,Zw.onErrorStopParsing=function(e){if("error"===e)throw"onErrorStopParsing"},Zw.onWarningStopParsing=function(){throw"onWarningStopParsing"};var zx=qb;zx.assign,zx.hasDefaultHTMLNamespace,zx.isHTMLMimeType,zx.isValidMimeType,zx.MIME_TYPE,zx.NAMESPACE;var Px=av.XMLSerializer,Ox=Zw.DOMParser;const qx="http://schemas.openxmlformats.org/markup-compatibility/2006",Bx={supportedNamespaces:new Set};function Wx(e,...t){return{supportedNamespaces:new Set([...e.supportedNamespaces,...t])}}function Fx(e){const t=[];for(let n=0;n<e.childNodes.length;n+=1){const a=e.childNodes[n];(null==a?void 0:a.nodeType)===a.ELEMENT_NODE&&t.push(a)}return t}function Dx(e){const t=e.parentNode;return 1===(null==t?void 0:t.nodeType)?t:null}function Hx(e,t){let n=e;const a=t?`xmlns:${t}`:"xmlns";for(;n;){const e=n.getAttribute(a);if(e)return e;n=Dx(n)}}function Ux(e,t){return e.getAttributeNS(qx,t)??e.getAttribute(`mc:${t}`)??void 0}function Gx(e,t){const n=[];let a=e;for(;a;)n.push(a),a=Dx(a);const r=[];for(const o of n.reverse()){const e=Ux(o,t);if(e)for(const t of e.split(/\s+/).filter(Boolean))r.push({element:o,token:t})}return r}function jx(e,t){const n=t.indexOf(":");if(n<1||n===t.length-1)return;const a=t.slice(0,n),r=t.slice(n+1),o=Hx(e,a);return o?`${o}\0${r}`:void 0}function Zx(e,t){var n;const a=null==(n=e.getAttribute("Requires"))?void 0:n.trim();return!!a&&a.split(/\s+/).every(n=>{const a=Hx(e,n);return Boolean(a&&t.supportedNamespaces.has(a))})}function Kx(e,t){let n;for(const a of Fx(e))if(a.namespaceURI===qx){if("Choice"===a.localName&&Zx(a,t))return a;"Fallback"===a.localName&&(n=a)}return n}function Xx(e,t=Bx){const n=[],a=function(e){const t=new Set;for(const n of Gx(e,"Ignorable")){const e=Hx(n.element,n.token);e&&t.add(e)}return t}(e),r=function(e){const t=new Set;for(const n of Gx(e,"ProcessContent")){const e=jx(n.element,n.token);e&&t.add(e)}return t}(e);for(const o of Fx(e)){if(o.namespaceURI===qx&&"AlternateContent"===o.localName){const e=Kx(o,t);e&&n.push(...Xx(e,t));continue}const e=o.namespaceURI??"";if(a.has(e)&&!t.supportedNamespaces.has(e)){const a=`${e}\0${o.localName??o.tagName}`;r.has(a)&&n.push(...Xx(o,t));continue}n.push(o)}return n}const Yx="http://schemas.openxmlformats.org/wordprocessingml/2006/main",Jx="http://schemas.openxmlformats.org/drawingml/2006/main",Qx="http://schemas.microsoft.com/office/word/2010/wordml",$x="http://schemas.microsoft.com/office/word/2012/wordml",_x=Wx(Bx,Qx),eM=Wx(Bx,$x);function tM(e,t,n){return e?Xx(e).filter(e=>e.namespaceURI===t&&e.localName===n):[]}const nM=["lrTb","tbRl","btLr","lrTbV","tbRlV"];function aM(e){return nM.includes(e)?e:void 0}function rM(e,t,n){return tM(e,t,n)[0]??null}function oM(e,t){return e?Xx(e,_x).find(e=>e.namespaceURI===Qx&&e.localName===t)??null:null}function iM(e,t){return e?Xx(e,eM).find(e=>e.namespaceURI===$x&&e.localName===t)??null:null}function lM(e,t){return e?e.getAttributeNS(Yx,t)??e.getAttributeNS(Qx,t)??e.getAttributeNS($x,t)??e.getAttribute(`w:${t}`)??e.getAttribute(`w14:${t}`)??e.getAttribute(`w15:${t}`)??e.getAttribute(t):null}function sM(e,t){for(let n=0;n<e.childNodes.length;n+=1){const a=e.childNodes[n];if(1===(null==a?void 0:a.nodeType)){const e=a;if(e.localName===t)return e;const n=sM(e,t);if(n)return n}}return null}function dM(e){const t={},n=e.attributes;for(let a=0;a<n.length;a+=1){const e=n[a];if(!e)continue;const r=e.namespaceURI;if(!r||r===Yx||r===qx)continue;if("xmlns"===e.prefix||"xmlns"===e.localName)continue;const o=e.localName??e.name;if(!o)continue;t[e.prefix?`${e.prefix}:${o}`:o]=e.value}return Object.keys(t).length>0?t:void 0}function cM(e){return"1"===e||"true"===e||"on"===e}function uM(e,t){const n=rM(e,Yx,t);if(!n)return;const a=lM(n,"val");return null==a||"0"!==a&&"false"!==a&&"off"!==a&&cM(a)}function pM(e,t){return lM(rM(e,Yx,t),"val")??void 0}async function hM(e,t){t>0&&t%e===0&&await new Promise(e=>setTimeout(e,0))}const fM={png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",bmp:"image/bmp",tif:"image/tiff",tiff:"image/tiff",svg:"image/svg+xml",emf:"image/x-emf",wmf:"image/x-wmf"},gM={"image/png":"png","image/jpeg":"jpg","image/gif":"gif","image/bmp":"bmp","image/tiff":"tif","image/svg+xml":"svg","image/x-emf":"emf","image/x-wmf":"wmf"};function mM(e){return gM[e.toLowerCase()]??null}async function bM(e,t,n){let a=n;a.startsWith("/")&&(a=a.slice(1)),a.startsWith("word/")||(a="word/"+n);const r=e.file(a),o=function(e){var t;const n=null==(t=e.split(".").pop())?void 0:t.toLowerCase();return n?fM[n]??null:null}(n)??"image/png",i=await(null==r?void 0:r.async("base64"));if(i)return function(e,t,n){const a=e.byPath.get(t);if(a)return`${Ot}${a}`;const r=`img-${e.nextId}`;return e.nextId+=1,e.assets[r]={id:r,url:n},e.byPath.set(t,r),`${Ot}${r}`}(t,a,`data:${o};base64,${i}`)}function vM(e){var t;const n=new Map;if(!e)return n;const a=null==(t=(new Ox).parseFromString(e,"application/xml").documentElement)?void 0:t.childNodes;if(!a)return n;for(let r=0;r<a.length;r+=1){const e=a[r];if(1===(null==e?void 0:e.nodeType)){const t=e;if("Relationship"===t.localName){const e=t.getAttribute("Id"),a=t.getAttribute("Target");e&&a&&n.set(e,a)}}}return n}async function yM(e,t){var n;const a=t.lastIndexOf("/"),r=a>=0?t.slice(0,a):"",o=a>=0?t.slice(a+1):t,i=r?`${r}/_rels/${o}.rels`:`_rels/${o}.rels`;return vM(await(null==(n=e.file(i))?void 0:n.async("string")))}const wM=e=>{var t;const n=rM(e,Jx,"latin");return(null==(t=null==n?void 0:n.getAttribute("typeface"))?void 0:t.trim())||void 0},xM=e=>{var t;const n=rM(e,Jx,"cs");return(null==(t=null==n?void 0:n.getAttribute("typeface"))?void 0:t.trim())||wM(e)},MM=e=>{var t;const n=rM(e,Jx,"ea");return(null==(t=null==n?void 0:n.getAttribute("typeface"))?void 0:t.trim())||wM(e)};function SM(e,t){const n=e?Number(e):Number.NaN;return Number.isFinite(n)?Math.round(n/gt*dt):t}function AM(e){const t=e?Number(e):Number.NaN;if(Number.isFinite(t))return Ac(t/20,4)}function IM(e){const t=null==e?void 0:e.trim();if(t&&"auto"!==t&&"none"!==t)return t.startsWith("#")?t:`#${t.toUpperCase()}`}const CM=["dk1","lt1","dk2","lt2","accent1","accent2","accent3","accent4","accent5","accent6","hlink","folHlink"];function TM(e){const t=rM(e,Jx,"srgbClr");if(t)return IM(lM(t,"val"));const n=rM(e,Jx,"sysClr");return n?IM(lM(n,"lastClr")):void 0}function kM(e){if(!e)return;const t=Number.parseInt(e,16);return Number.isFinite(t)?t/255:void 0}function RM(e,t,n){const a=e=>{return(t=e,Math.min(255,Math.max(0,Math.round(t)))).toString(16).padStart(2,"0").toUpperCase();var t};return`#${a(e)}${a(t)}${a(n)}`}function EM(e,t){const n=lM(e,"themeColor");if(!n)return;const a=function(e){switch(e){case"dark1":case"text1":return"dk1";case"light1":case"background1":return"lt1";case"dark2":case"text2":return"dk2";case"light2":case"background2":return"lt2";case"accent1":case"accent2":case"accent3":case"accent4":case"accent5":case"accent6":return e;case"hyperlink":return"hlink";case"followedHyperlink":return"folHlink";default:return}}(n),r=a?t[a]:void 0;if(!r)return;let o=Number.parseInt(r.slice(1,3),16),i=Number.parseInt(r.slice(3,5),16),l=Number.parseInt(r.slice(5,7),16);const s=kM(lM(e,"themeShade"));void 0!==s&&(o*=s,i*=s,l*=s);const d=kM(lM(e,"themeTint"));if(void 0!==d){const e=255*(1-d);o=o*d+e,i=i*d+e,l=l*d+e}return RM(o,i,l)}function LM(e){if(!e)return{fonts:{},colors:{}};const t=(new Ox).parseFromString(e,"application/xml").documentElement,n=t?tM(t,Jx,"themeElements")[0]??null:null,a=function(e){const t=rM(e,Jx,"fontScheme"),n=rM(t,Jx,"majorFont"),a=rM(t,Jx,"minorFont");return{majorHAnsi:wM(n),minorHAnsi:wM(a),majorEastAsia:MM(n),minorEastAsia:MM(a),majorBidi:xM(n),minorBidi:xM(a)}}(n),r=function(e){const t=rM(e,Jx,"clrScheme");if(!t)return{};const n={};for(const a of CM){const e=TM(rM(t,Jx,a));e&&(n[a]=e)}return n}(n),o=n?tM(n,Jx,"fmtScheme")[0]:void 0;return{fonts:a,colors:r,data:{name:(null==t?void 0:t.getAttribute("name"))||void 0,colors:{...r},fonts:{major:Object.fromEntries(Object.entries(a).filter(([e])=>e.startsWith("major"))),minor:Object.fromEntries(Object.entries(a).filter(([e])=>e.startsWith("minor")))},effectsXml:o?Array.from(o.childNodes).map(e=>(new Px).serializeToString(e)).join(""):void 0,sourceXml:e}}}const VM={decimal:"decimal",lowerRoman:"lowerRoman",upperRoman:"upperRoman",lowerLetter:"lowerLetter",upperLetter:"upperLetter",symbol:"symbol"},NM={continuous:"continuous",eachSect:"eachSection"};function zM(e){if(!e)return;const t={},n=lM(rM(e,Yx,"numFmt"),"val");n&&VM[n]&&(t.numberFormat=VM[n]);const a=Number.parseInt(lM(rM(e,Yx,"numStart"),"val")??"",10);Number.isFinite(a)&&a>0&&(t.startAt=a);const r=lM(rM(e,Yx,"numRestart"),"val");return r&&NM[r]&&(t.restart=NM[r]),Object.keys(t).length>0?t:void 0}function PM(e){return e.ooxmlNumbering}function OM(e){const t=PM(e);if((null==t?void 0:t.format)&&t.importedKind===e.kind&&t.importedFormat===e.format)return t.format}const qM={decimal:"decimal",lowerLetter:"lowerLetter",upperLetter:"upperLetter",lowerRoman:"lowerRoman",upperRoman:"upperRoman",bullet:"bullet"};function BM(e){const t=lM(e,"val");if(null==t)return;const n=Number.parseInt(t,10);return Number.isFinite(n)?n:void 0}function WM(e,t){if(!e||!/^\d+$/.test(e))return;const n=Number.parseInt(e,10);return Number.isSafeInteger(n)&&n>=t?n:void 0}function FM(e){const t={},n=lM(rM(e,Yx,"numFmt"),"val");n&&(t.kind="bullet"===n?"bullet":"ordered",t.format=qM[n],t.rawFormat=n);const a=lM(rM(e,Yx,"suff"),"val");"tab"!==a&&"space"!==a&&"nothing"!==a||(t.suffix=a);const r=BM(rM(e,Yx,"start"));void 0!==r&&(t.startAt=r),t.levelText=lM(rM(e,Yx,"lvlText"),"val")??void 0;const o=lM(rM(e,Yx,"lvlJc"),"val");"left"!==o&&"center"!==o&&"right"!==o||(t.alignment=o);const i=rM(e,Yx,"isLgl");var l;i&&(t.legal=null==(l=lM(i,"val"))||"1"===l||"true"===l||"on"===l);const s=BM(rM(e,Yx,"lvlRestart"));void 0!==s&&(t.restartAfterLevel=s),t.paragraphStyleId=lM(rM(e,Yx,"pStyle"),"val")??void 0,"bullet"===t.kind&&t.levelText&&(t.bulletGlyph=t.levelText);const d=rM(e,Yx,"rPr"),c=rM(d,Yx,"rFonts");t.bulletFont=lM(c,"ascii")??lM(c,"hAnsi")??void 0;const u=rM(e,Yx,"pPr"),p=rM(u,Yx,"ind");if(p){const e=lM(p,"left")??lM(p,"start"),n=lM(p,"hanging"),a=null!=e?SM(e,0):void 0,r=null!=n?SM(n,0):void 0;void 0===a&&void 0===r||(t.indent={left:a,hanging:r})}return t}function DM(e,t,n){const a=e.numToAbstractId.get(t),r=a?e.abstractLevels.get(`${a}:${n}`):void 0;return e.numOverrideLevels.get(`${t}:${n}`)??r??{}}function HM(e){if(!e)return;const t=lM(e,"val");if("nil"===t||"none"===t)return{width:0,type:"none",color:"transparent"};const n=Number(lM(e,"sz")),a=Number.isFinite(n)&&n>0?Ac(n/8,4):.75,r=IM(lM(e,"color"))??"#000000",o=(null==t?void 0:t.toLowerCase())??"single";return{width:a,type:o.includes("dotted")||o.includes("dot")?"dotted":o.includes("dash")?"dashed":"solid",color:r}}function UM(e){return e?{borderTop:HM(rM(e,Yx,"top")),borderRight:HM(rM(e,Yx,"right")),borderBottom:HM(rM(e,Yx,"bottom")),borderLeft:HM(rM(e,Yx,"left")),borderStart:HM(rM(e,Yx,"start")),borderEnd:HM(rM(e,Yx,"end")),borderTopLeftToBottomRight:HM(rM(e,Yx,"tl2br")),borderTopRightToBottomLeft:HM(rM(e,Yx,"tr2bl")),borderBetween:HM(rM(e,Yx,"between")),borderBar:HM(rM(e,Yx,"bar"))}:{}}function GM(e){const t=Object.entries(e).filter(([,e])=>void 0!==e);return t.length>0?Object.fromEntries(t):void 0}function jM(e){return Object.keys(e).length>0?e:void 0}function ZM(e,t){return jM({...e??{},...t??{}})}function KM(e,t){const n=IM(lM(e,"fill"));return n||(t?EM(e,t):void 0)}function XM(e){const t=rM(e,Qx,"solidFill");if(t){const e=function(e){const t=rM(e,Qx,"srgbClr");if(!t)return null;const n=lM(t,"val");return n?IM(n)??null:null}(t);if(e)return{type:"solid",color:e}}const n=rM(e,Qx,"gradFill");if(n){const e=rM(n,Qx,"gsLst");if(e){const t=[];for(let n=0;n<e.childNodes.length;n++){const a=e.childNodes[n];if((null==a?void 0:a.nodeType)!==a.ELEMENT_NODE)continue;const r=a;if(r.namespaceURI!==Qx||"gs"!==r.localName)continue;const o=lM(r,"pos"),i=null!==o?Number(o)/mt:NaN;if(!Number.isFinite(i))continue;const l=rM(r,Qx,"srgbClr");if(!l)continue;const s=lM(l,"val");if(!s)continue;const d=IM(s);if(!d)continue;const c=rM(l,Qx,"alpha"),u=c?lM(c,"val"):null,p=null!==u?Number(u)/mt:void 0,h={position:i,color:d};void 0!==p&&Number.isFinite(p)&&(h.alpha=p),t.push(h)}if(t.length>0){const e=rM(n,Qx,"lin"),a=e?lM(e,"ang"):null,r=null!==a?Number(a)/bt:void 0,o={type:"gradient",stops:t};return void 0!==r&&Number.isFinite(r)&&(o.angle=r),o}}}return null}function YM(e){const t=rM(e,Qx,"srgbClr");if(!t)return null;const n=lM(t,"val"),a=n?IM(n)??null:null;if(!a)return null;const r=rM(t,Qx,"alpha"),o=r?lM(r,"val"):null,i=null!==o&&Number.isFinite(Number(o))?Number(o)/mt:void 0;return{color:a,...void 0!==i?{alpha:i}:{}}}function JM(e,t){if(!e)return;const n=ln(e,t,Mt),a=ln(void 0,t,Mt),r=(e,t)=>e!==t?e:void 0,o=(e,t,n)=>void 0!==e?e:r(t,n);return GM({styleId:e.styleId,bold:o(e.bold,n.bold,a.bold),italic:o(e.italic,n.italic,a.italic),underline:r(n.underline,a.underline),underlineStyle:r(n.underlineStyle,a.underlineStyle),underlineColor:r(n.underlineColor,a.underlineColor),strike:o(e.strike,n.strike,a.strike),doubleStrike:o(e.doubleStrike,n.doubleStrike,a.doubleStrike),superscript:r(n.superscript,a.superscript),subscript:r(n.subscript,a.subscript),smallCaps:o(e.smallCaps,n.smallCaps,a.smallCaps),allCaps:o(e.allCaps,n.allCaps,a.allCaps),hidden:o(e.hidden,n.hidden,a.hidden),noProof:o(e.noProof,n.noProof,a.noProof),webHidden:o(e.webHidden,n.webHidden,a.webHidden),specVanish:o(e.specVanish,n.specVanish,a.specVanish),rtl:o(e.rtl,n.rtl,a.rtl),complexScript:o(e.complexScript,n.complexScript,a.complexScript),snapToGrid:o(e.snapToGrid,n.snapToGrid,a.snapToGrid),outline:o(e.outline,n.outline,a.outline),shadow:o(e.shadow,n.shadow,a.shadow),emboss:o(e.emboss,n.emboss,a.emboss),imprint:o(e.imprint,n.imprint,a.imprint),fitText:r(n.fitText,a.fitText),emphasisMark:r(n.emphasisMark,a.emphasisMark),textBorder:r(n.textBorder,a.textBorder),textEffect:r(n.textEffect,a.textEffect),characterScale:r(n.characterScale,a.characterScale),characterSpacing:r(n.characterSpacing,a.characterSpacing),baselineShift:r(n.baselineShift,a.baselineShift),kerningThreshold:r(n.kerningThreshold,a.kerningThreshold),ligatures:r(n.ligatures,a.ligatures),numberSpacing:r(n.numberSpacing,a.numberSpacing),numberForm:r(n.numberForm,a.numberForm),stylisticSet:r(n.stylisticSet,a.stylisticSet),contextualAlternates:r(n.contextualAlternates,a.contextualAlternates),fontFamily:o(e.fontFamily,n.fontFamily,a.fontFamily),fontSize:o(e.fontSize,n.fontSize,a.fontSize),color:r(n.color,a.color),textFill:r(n.textFill,a.textFill),textOutline:r(n.textOutline,a.textOutline),textShadow:r(n.textShadow,a.textShadow),glow:r(n.glow,a.glow),reflection:r(n.reflection,a.reflection),scene3dXml:r(n.scene3dXml,a.scene3dXml),props3dXml:r(n.props3dXml,a.props3dXml),highlight:r(n.highlight,a.highlight),shading:r(n.shading,a.shading),language:r(n.language,a.language),link:r(n.link,a.link)})}function QM(e,t){if(!e)return;const n={},a=pM(e,"rStyle");a&&(n.styleId=a);const r=uM(e,"b"),o=uM(e,"bCs");void 0===r&&void 0===o||(n.bold=!0===r||!0===o);const i=uM(e,"i"),l=uM(e,"iCs");void 0===i&&void 0===l||(n.italic=!0===i||!0===l);const s=uM(e,"strike");void 0!==s&&(n.strike=s);const d=uM(e,"dstrike");void 0!==d&&(n.doubleStrike=d);const c=uM(e,"smallCaps");void 0!==c&&(n.smallCaps=c);const u=uM(e,"caps");void 0!==u&&(n.allCaps=u);const p=uM(e,"vanish");void 0!==p&&(n.hidden=p);const h=uM(e,"noProof");void 0!==h&&(n.noProof=h);const f=uM(e,"webHidden");void 0!==f&&(n.webHidden=f);const g=uM(e,"specVanish");void 0!==g&&(n.specVanish=g);const m=uM(e,"rtl");void 0!==m&&(n.rtl=m);const b=uM(e,"cs");void 0!==b&&(n.complexScript=b);const v=uM(e,"snapToGrid");void 0!==v&&(n.snapToGrid=v);const y=uM(e,"outline");void 0!==y&&(n.outline=y);const w=uM(e,"shadow");void 0!==w&&(n.shadow=w);const x=uM(e,"emboss");void 0!==x&&(n.emboss=x);const M=uM(e,"imprint");void 0!==M&&(n.imprint=M);const S=lM(rM(e,Yx,"em"),"val");"dot"!==S&&"comma"!==S&&"circle"!==S&&"underDot"!==S&&"none"!==S||(n.emphasisMark=S);const A=lM(rM(e,Yx,"fitText"),"val");if(A){const e=AM(A);void 0!==e&&e>0&&(n.fitText=e)}const I=HM(rM(e,Yx,"bdr"));I&&(n.textBorder=I);const C=lM(rM(e,Yx,"effect"),"val");C&&(n.textEffect=C);const T=lM(rM(e,Yx,"w"),"val");if(T){const e=Number(T);Number.isFinite(e)&&e>0&&(n.characterScale=e)}const k=lM(rM(e,Yx,"spacing"),"val");if(k){const e=AM(k);void 0!==e&&(n.characterSpacing=e)}const R=lM(rM(e,Yx,"position"),"val");if(R){const e=Number(R);Number.isFinite(e)&&(n.baselineShift=e/2)}const E=lM(rM(e,Yx,"kern"),"val");if(E){const e=Number(E);Number.isFinite(e)&&e>=0&&(n.kerningThreshold=e/2)}const L=lM(rM(e,Qx,"ligatures"),"val");"none"!==L&&"standard"!==L&&"contextual"!==L&&"historical"!==L&&"standardContextual"!==L||(n.ligatures=L);const V=lM(rM(e,Qx,"numSpacing"),"val");"proportional"!==V&&"tabular"!==V||(n.numberSpacing=V);const N=lM(rM(e,Qx,"numForm"),"val");"lining"!==N&&"oldStyle"!==N||(n.numberForm=N);const z=lM(rM(e,Qx,"stylisticSets"),"val");if(z){const e=/^[0-9a-fA-F]+$/.test(z)&&z.length>2?Number.parseInt(z,16):Number(z);if(Number.isFinite(e)&&e>0)for(let t=1;t<=20;t+=1)if(e&1<<t-1){n.stylisticSet=t;break}}const P=lM(rM(e,Qx,"cntxtAlts"),"val");null===P?rM(e,Qx,"cntxtAlts")&&(n.contextualAlternates=!0):cM(P)&&(n.contextualAlternates=!0);const O=rM(e,Yx,"u"),q=lM(O,"val");if(O&&"none"!==q){n.underline=!0,q&&"single"!==q&&(n.underlineStyle=q);const e=lM(O,"color");e&&"auto"!==e&&(n.underlineColor=IM(e))}const B=lM(rM(e,Yx,"vertAlign"),"val");"superscript"===B&&(n.superscript=!0),"subscript"===B&&(n.subscript=!0);const W=rM(e,Yx,"rFonts"),F=lM(W,"ascii")??lM(W,"hAnsi")??lM(W,"cs")??lM(W,"eastAsia")??function(e,t){const n=lM(e,"asciiTheme")??lM(e,"hAnsiTheme")??lM(e,"eastAsiaTheme")??lM(e,"cstheme");if(!n)return;const a="majorAscii"===n||"majorHAnsi"===n?"majorHAnsi":"minorAscii"===n||"minorHAnsi"===n?"minorHAnsi":"majorEastAsia"===n?"majorEastAsia":"minorEastAsia"===n?"minorEastAsia":"majorBidi"===n?"majorBidi":"minorBidi"===n?"minorBidi":void 0;return a?t[a]:void 0}(W,t.fonts);F&&(n.fontFamily=function(e){const t=null==e?void 0:e.trim();if(!t)return;return`${/[\s,]/.test(t)?`"${t.replace(/"/g,'\\"')}"`:t}, ${/times/i.test(t)?"serif":"sans-serif"}`}(F));const D=lM(rM(e,Yx,"sz")??rM(e,Yx,"szCs"),"val");if(D){const e=function(e){const t=e?Number(e):Number.NaN;return Number.isFinite(t)?Ac(t/2/72*dt,4):null}(D);null!==e&&(n.fontSize=e)}const H=rM(e,Yx,"color"),U=lM(H,"val");if(U&&"auto"!==U)n.color=IM(U);else if("auto"!==U){const e=EM(H,t.colors);e&&(n.color=e)}const G=oM(e,"textFill");if(G){const e=XM(G);e&&(n.textFill=e)}const j=oM(e,"textOutline");if(j){const e=j.getAttributeNS(Qx,"w"),t=null!==e?Number(e):NaN,a={widthPt:Number.isFinite(t)&&t>0?t/ft:.5},r=XM(j);r&&(a.fill=r,"solid"===r.type?a.color=r.color:"gradient"===r.type&&r.stops[0]&&(a.color=r.stops[0].color)),n.textOutline=a}const Z=oM(e,"shadow");if(Z){const e=function(e){const t=YM(e);if(!t)return null;const n=e.getAttributeNS(Qx,"blurRad"),a=e.getAttributeNS(Qx,"dist"),r=e.getAttributeNS(Qx,"dir"),o=n?Number(n)/ft:0,i=a?Number(a)/ft:0,l=r?Number(r)/bt:0;return{color:t.color,...void 0!==t.alpha?{alpha:t.alpha}:{},blurPt:o,distPt:i,dirDeg:l}}(Z);e&&(n.textShadow=e)}const K=oM(e,"glow");if(K){const e=function(e){const t=YM(e);if(!t)return null;const n=e.getAttributeNS(Qx,"rad"),a=n?Number(n)/ft:0;return{color:t.color,...void 0!==t.alpha?{alpha:t.alpha}:{},radiusPt:a}}(K);e&&(n.glow=e)}const X=oM(e,"reflection");X&&(n.reflection=function(e){const t=e.getAttributeNS(Qx,"blurRad"),n=e.getAttributeNS(Qx,"stA"),a=e.getAttributeNS(Qx,"stPos"),r=e.getAttributeNS(Qx,"endA"),o=e.getAttributeNS(Qx,"endPos"),i=e.getAttributeNS(Qx,"dist");return{blurPt:t?Number(t)/ft:0,startAlpha:null!==n?Number(n)/mt:.55,startPos:null!==a?Number(a)/mt:0,endAlpha:null!==r?Number(r)/mt:0,endPos:null!==o?Number(o)/mt:1,distPt:i?Number(i)/ft:0}}(X));const Y=oM(e,"scene3d");Y&&(n.scene3dXml=(new Px).serializeToString(Y));const J=oM(e,"props3d");J&&(n.props3dXml=(new Px).serializeToString(J));const Q=lM(rM(e,Yx,"highlight"),"val");Q&&"none"!==Q&&(n.highlight=Q);const $=KM(rM(e,Yx,"shd"),t.colors);$&&(n.shading=$);const _=rM(e,Yx,"lang");if(_){const e=lM(_,"val"),t=lM(_,"eastAsia"),a=lM(_,"bidi"),r={};e&&(r.value=e),t&&(r.eastAsia=t),a&&(r.bidi=a),Object.keys(r).length>0&&(n.language=r)}return jM(n)}const $M=[["firstRow","firstRow"],["lastRow","lastRow"],["firstColumn","firstCol"],["lastColumn","lastCol"],["oddVBand","band1Vert"],["evenVBand","band2Vert"],["oddHBand","band1Horz"],["evenHBand","band2Horz"],["firstRowFirstColumn","nwCell"],["firstRowLastColumn","neCell"],["lastRowFirstColumn","swCell"],["lastRowLastColumn","seCell"]],_M=[["top","borderTop"],["left","borderLeft"],["bottom","borderBottom"],["right","borderRight"],["insideH","borderInsideH"],["insideV","borderInsideV"]];function eS(e){if(!e)return;const t=lM(e,"type"),n=lM(e,"w");if("auto"===t)return"auto";if("pct"===t){if(!n)return;const e=n.trim().endsWith("%")?Number.parseFloat(n):Number(n)/50;return Number.isFinite(e)?`${Ac(e,4)}%`:void 0}return AM(n)}function tS(e,t){const n=lM(rM(e,Yx,t),"val"),a=n?Number(n):Number.NaN;return Number.isFinite(a)&&a>0?Math.floor(a):void 0}function nS(e){const t=rM(e,Yx,"cnfStyle");if(!t)return;const n=lM(t,"val")??"",a={};return $M.forEach(([e,r],o)=>{const i=lM(t,e);"1"===i||"true"===i||"on"===i?a[r]=!0:"0"===i||"false"===i||"off"===i?a[r]=!1:12===n.length&&"1"===n[o]&&(a[r]=!0)}),Object.keys(a).length>0?a:void 0}function aS(e){const t=lM(e,"date"),n=t?Date.parse(t):Number.NaN;return{id:lM(e,"id")??`revision:${e.localName}`,author:lM(e,"author")??"Unknown",date:Number.isFinite(n)?n:0}}function rS(e){if(!e)return;const t=t=>AM(lM(rM(e,Yx,t),"w")),n={},a=t("top"),r=t("right"),o=t("bottom"),i=t("left"),l=t("start"),s=t("end");return void 0!==a&&(n.top=a),void 0!==r&&(n.right=r),void 0!==o&&(n.bottom=o),void 0!==i&&(n.left=i),void 0!==l&&(n.start=l),void 0!==s&&(n.end=s),Object.keys(n).length>0?n:void 0}function oS(e,t){const n={};t&&(n.styleId=t);const a=lM(rM(e,Yx,"tblCaption"),"val");a&&(n.altTitle=a);const r=lM(rM(e,Yx,"tblDescription"),"val");r&&(n.altDescription=r);const o=eS(rM(e,Yx,"tblW"));void 0!==o&&(n.width=o);const i=eS(rM(e,Yx,"tblInd"));void 0!==i&&(n.indentLeft=i);const l=lM(rM(e,Yx,"jc"),"val");"left"===l||"start"===l?n.align="left":"center"===l?n.align="center":"right"!==l&&"end"!==l||(n.align="right");const s=function(e){const t=lM(rM(e,Yx,"tblLayout"),"type");return"fixed"===t||"autofit"===t?t:void 0}(e);s&&(n.layout=s);const d=eS(rM(e,Yx,"tblCellSpacing"));void 0!==d&&(n.cellSpacing=d);const c=(u=rM(e,Yx,"tblBorders"))?{...UM(u),borderInsideH:HM(rM(u,Yx,"insideH")),borderInsideV:HM(rM(u,Yx,"insideV"))}:{};var u;Object.keys(c).length>0&&(n.borders=c);const p=rS(rM(e,Yx,"tblCellMar"));p&&(n.defaultCellMargins=p);const h=e?uM(e,"bidiVisual"):void 0;void 0!==h&&(n.bidiVisual=h);const f=lM(rM(e,Yx,"tblOverlap"),"val");"overlap"!==f&&"never"!==f||(n.tblOverlap=f);const g=function(e){const t=rM(e,Yx,"tblpPr");if(!t||!t.attributes||0===t.attributes.length)return;const n={};for(let s=0;s<t.attributes.length;s+=1){const e=t.attributes.item(s);(null==e?void 0:e.namespaceURI)!==Yx&&"w"!==(null==e?void 0:e.prefix)||(n[e.localName||e.name.replace(/^w:/,"")]=e.value)}const a=e=>AM(n[e]??null),r="margin"===n.horzAnchor||"page"===n.horzAnchor||"text"===n.horzAnchor?n.horzAnchor:void 0,o="margin"===n.vertAnchor||"page"===n.vertAnchor||"text"===n.vertAnchor?n.vertAnchor:void 0,i="left"===n.tblpXSpec||"center"===n.tblpXSpec||"right"===n.tblpXSpec||"inside"===n.tblpXSpec||"outside"===n.tblpXSpec?n.tblpXSpec:void 0,l="top"===n.tblpYSpec||"center"===n.tblpYSpec||"bottom"===n.tblpYSpec||"inside"===n.tblpYSpec||"outside"===n.tblpYSpec?n.tblpYSpec:void 0;return{...r?{horizontalAnchor:r}:{},...o?{verticalAnchor:o}:{},...void 0!==a("tblpX")?{x:a("tblpX")}:{},...void 0!==a("tblpY")?{y:a("tblpY")}:{},...i?{xAlign:i}:{},...l?{yAlign:l}:{},...void 0!==a("topFromText")?{distanceTop:a("topFromText")}:{},...void 0!==a("rightFromText")?{distanceRight:a("rightFromText")}:{},...void 0!==a("bottomFromText")?{distanceBottom:a("bottomFromText")}:{},...void 0!==a("leftFromText")?{distanceLeft:a("leftFromText")}:{}}}(e);g&&(n.floating=g);const m=tS(e,"tblStyleRowBandSize");void 0!==m&&(n.rowBandSize=m);const b=tS(e,"tblStyleColBandSize");void 0!==b&&(n.colBandSize=b);const v=rM(e,Yx,"tblLook");if(v){const e=lM(v,"val"),t=e?Number.parseInt(e,16):Number.NaN,a=(e,n,a)=>{const r=lM(v,e);return null!==r&&""!==r?"1"===r||"true"===r||"on"===r:Number.isFinite(t)?0!==(t&n):a};n.tblLook={firstRow:a("firstRow",32,!0),lastRow:a("lastRow",64,!1),firstCol:a("firstColumn",128,!0),lastCol:a("lastColumn",256,!1),noHBand:a("noHBand",512,!1),noVBand:a("noVBand",1024,!1)}}const y=rM(e,Yx,"tblPrChange"),w=rM(y,Yx,"tblPr");return y&&w&&(n.revision={...aS(y),type:"property",previous:oS(w)??{}}),jM(n)}function iS(e){if(!e)return;const t={},n=uM(e,"tblHeader");void 0!==n&&(t.isHeader=n);const a=tS(e,"gridBefore");void 0!==a&&(t.gridBefore=a);const r=tS(e,"gridAfter");void 0!==r&&(t.gridAfter=r);const o=eS(rM(e,Yx,"wBefore"));void 0!==o&&(t.widthBefore=o);const i=eS(rM(e,Yx,"wAfter"));void 0!==i&&(t.widthAfter=i);const l=rM(e,Yx,"trHeight"),s=AM(lM(l,"val"));void 0!==s&&(t.height=s);const d=lM(l,"hRule");"auto"!==d&&"exact"!==d&&"atLeast"!==d||(t.heightRule=d);const c=eS(rM(e,Yx,"tblCellSpacing"));void 0!==c&&(t.cellSpacing=c);const u=lM(rM(e,Yx,"jc"),"val");"left"===u||"start"===u?t.align="left":"center"===u?t.align="center":"right"!==u&&"end"!==u||(t.align="right");const p=uM(e,"cantSplit");void 0!==p&&(t.cantSplit=p);const h=uM(e,"hidden");void 0!==h&&(t.hidden=h);const f=rM(e,Yx,"trPrChange"),g=rM(f,Yx,"trPr");f&&g&&(t.propertyRevision={...aS(f),type:"property",previous:iS(g)??{}});const m=rM(e,Yx,"ins"),b=rM(e,Yx,"del"),v=m??b;return v&&(t.revision={...aS(v),type:m?"insert":"delete"}),jM(t)}function lS(e){if(!e)return 1;const t=lM(rM(e,Yx,"gridSpan"),"val"),n=t?Number(t):1;return Number.isFinite(n)&&n>1?Math.floor(n):1}function sS(e){if(!e)return;const t=rM(e,Yx,"vMerge");if(!t)return;return"restart"===lM(t,"val")?"restart":"continue"}function dS(e){if(!e)return;const t=rM(e,Yx,"hMerge");if(!t)return;return"restart"===lM(t,"val")?"restart":"continue"}function cS(e,t,n){if(!e)return;const a={},r=KM(rM(e,Yx,"shd"),n);r&&(a.shading=r);const o=rM(e,Yx,"tcW"),i=lM(o,"type"),l=lM(o,"w");if("dxa"===i){const e=AM(l);void 0!==e&&(a.width=e)}else if("pct"===i&&l){const e=Number(l);Number.isFinite(e)&&(a.width=`${Ac(e/50,4)}%`)}const s=rS(rM(e,Yx,"tcMar"));s&&(void 0!==s.top&&(a.paddingTop=s.top),void 0!==s.bottom&&(a.paddingBottom=s.bottom),void 0!==s.left&&(a.paddingLeft=s.left),void 0!==s.right&&(a.paddingRight=s.right),void 0!==s.start&&(a.paddingStart=s.start),void 0!==s.end&&(a.paddingEnd=s.end));const d=function(e){if(!e)return;const t=lM(rM(e,Yx,"vAlign"),"val");return"top"===t||"bottom"===t?t:"center"===t?"middle":void 0}(e);d&&(a.verticalAlign=d);const c=aM(lM(rM(e,Yx,"textDirection"),"val"));c&&(a.textDirection=c);const u=uM(e,"noWrap");void 0!==u&&(a.noWrap=u);const p=uM(e,"tcFitText");void 0!==p&&(a.fitText=p);const h=uM(e,"hideMark");void 0!==h&&(a.hideMark=h);const f=lM(rM(e,Yx,"headers"),"val");f&&(a.headers=f);const g=rM(e,Yx,"tcPrChange"),m=rM(g,Yx,"tcPr");g&&m&&(a.propertyRevision={...aS(g),type:"property",previous:cS(m,void 0,n)??{}});const b=rM(e,Yx,"cellIns"),v=rM(e,Yx,"cellDel"),y=rM(e,Yx,"cellMerge"),w=b??v??y;if(w){const e=lM(w,"vMergeOrig");a.revision={...aS(w),type:b?"insert":v?"delete":"merge",...y&&e?{previous:{vMerge:"restart"===e?"restart":"continue"}}:{}}}for(const[x,M]of Object.entries(function(e){return e?UM(rM(e,Yx,"tcBorders")):{}}(e)))M&&(a[x]=M);return jM(a)}function uS(e){const t=rM(e,Yx,"trPr");return!!t&&!0===uM(t,"tblHeader")}function pS(e){return void 0!==(null==e?void 0:e.lineHeight)?e:{...e??{},lineHeight:1.1}}function hS(e,t){if(!e)return;const n={},a=pM(e,"pStyle");a&&(n.styleId=a);const r=lM(rM(e,Yx,"jc"),"val");"left"===r||"start"===r||"center"===r||"right"===r||"end"===r||"justify"===r?n.align="start"===r?"left":"end"===r?"right":r:"both"!==r&&"distribute"!==r||(n.align="justify");const o=rM(e,Yx,"spacing"),i=lM(o,"before"),l=lM(o,"after"),s=lM(o,"line"),d=lM(o,"lineRule");i&&(n.spacingBefore=SM(i,0)),l&&(n.spacingAfter=SM(l,0)),s&&("exact"===d||"atLeast"===d?(n.lineHeight=Ac(Number(s)/1440*96,4),n.lineRule=d):n.lineHeight=Number(s)/240);const c=uM(e,"contextualSpacing");void 0!==c&&(n.contextualSpacing=c);const u=uM(e,"snapToGrid");void 0!==u&&(n.snapToGrid=u);const p=rM(e,Yx,"ind"),h=lM(p,"start")??lM(p,"left"),f=lM(p,"end")??lM(p,"right"),g=lM(p,"firstLine"),m=lM(p,"hanging");h&&(n.indentLeft=SM(h,0)),f&&(n.indentRight=SM(f,0)),m?(n.indentHanging=SM(m,0),n.indentFirstLine=void 0):g&&(n.indentFirstLine=SM(g,0));const b=function(e){const t=rM(e,Yx,"tabs");if(!t)return[];const n=[];for(const a of tM(t,Yx,"tab")){const e=AM(lM(a,"pos"));if(void 0===e)continue;const t=lM(a,"val"),r="center"===t||"right"===t||"decimal"===t||"bar"===t||"clear"===t?t:"left",o=lM(a,"leader"),i="dot"===o||"hyphen"===o||"underscore"===o||"heavy"===o||"middleDot"===o?o:"none"===o?"none":void 0;n.push({position:e,type:r,...void 0!==i?{leader:i}:{}})}return n}(e);b.length>0&&(n.tabs=b);const v=uM(e,"pageBreakBefore");void 0!==v&&(n.pageBreakBefore=v);const y=uM(e,"keepNext");void 0!==y&&(n.keepWithNext=y);const w=uM(e,"keepLines");void 0!==w&&(n.keepLinesTogether=w);const x=uM(e,"widowControl");void 0!==x&&(n.widowControl=x);const M=uM(e,"mirrorIndents");void 0!==M&&(n.mirrorIndents=M);const S=rM(e,Yx,"pBdr");if(S){const{borderTop:e,borderRight:t,borderBottom:a,borderLeft:r,borderBetween:o,borderBar:i}=UM(S);e&&(n.borderTop=e),t&&(n.borderRight=t),a&&(n.borderBottom=a),r&&(n.borderLeft=r),o&&(n.borderBetween=o),i&&(n.borderBar=i)}const A=KM(rM(e,Yx,"shd"),t);A&&(n.shading=A);const I=aM(lM(rM(e,Yx,"textDirection"),"val"));I&&(n.textDirection=I);const C=lM(rM(e,Yx,"outlineLvl"),"val");if(void 0!==C){const e=Number(C);Number.isFinite(e)&&e>=0&&e<=8&&(n.outlineLevel=e)}const T=uM(e,"suppressLineNumbers");void 0!==T&&(n.suppressLineNumbers=T);const k=uM(e,"suppressAutoHyphens");void 0!==k&&(n.suppressAutoHyphens=k);const R=uM(e,"bidi");void 0!==R&&(n.bidi=R);const E=uM(e,"kinsoku");void 0!==E&&(n.kinsoku=E);const L=uM(e,"wordWrap");void 0!==L&&(n.wordWrap=L);const V=uM(e,"overflowPunct");void 0!==V&&(n.overflowPunct=V);const N=uM(e,"topLinePunct");void 0!==N&&(n.topLinePunct=N);const z=uM(e,"autoSpaceDE");void 0!==z&&(n.autoSpaceDE=z);const P=uM(e,"autoSpaceDN");void 0!==P&&(n.autoSpaceDN=P);const O=uM(e,"adjustRightInd");void 0!==O&&(n.adjustRightInd=O);const q=lM(rM(e,Yx,"textAlignment"),"val");"auto"!==q&&"top"!==q&&"center"!==q&&"baseline"!==q&&"bottom"!==q||(n.textAlignment=q);const B=lM(rM(e,Yx,"textboxTightWrap"),"val");"none"!==B&&"allLines"!==B&&"firstLineOnly"!==B&&"firstLastLine"!==B||(n.textboxTightWrap=B);const W=lM(rM(e,Yx,"divId"),"val");if(null!==W){const e=Number(W);Number.isFinite(e)&&e>=0&&(n.divId=Math.floor(e))}const F=nS(e);F&&(n.conditionalStyle=F);const D=rM(e,Yx,"framePr");if(D){const e=lM(D,"dropCap");e&&"none"!==e||(n.framePrXml=(new Px).serializeToString(D))}return jM(n)}function fS(e){return"1"===e||"true"===e||"on"===e}function gS(e){const t=rM(e,Yx,"cols");if(!t)return;const n=Number.parseInt(lM(t,"num")??"1",10);if(!Number.isFinite(n)||n<=1)return;const a=SM(lM(t,"space"),0),r=lM(t,"sep"),o=lM(t,"equalWidth"),i=tM(t,Yx,"col").map(e=>({width:SM(lM(e,"w"),0),space:SM(lM(e,"space"),a)})),l=null==o||fS(o);return{count:n,space:a,...fS(r)?{separator:!0}:{},...l?{}:{equalWidth:!1},...!l&&i.length>0?{columns:i}:{}}}function mS(e){const t=rM(e,Yx,"pgSz"),n=rM(e,Yx,"pgMar"),a=gS(e),r=rM(e,Yx,"pgBorders"),o=rM(r,Yx,"top"),i=lM(o,"val"),l=lM(o,"color"),s=Number.parseInt(lM(o,"sz")??"0",10),d=i&&l&&"nil"!==i?{style:"double"===i||"dashed"===i||"dotted"===i?i:"single",color:`#${l.replace(/^#/,"")}`,width:Number.isFinite(s)&&s>0?s/8:1,distance:Number(lM(o,"space")??0)}:void 0;let c;if(t||n||a){const e=SM(lM(t,"w"),816),r=SM(lM(t,"h"),1056),o=lM(t,"orient");c={width:e,height:r,orientation:"landscape"===o?"landscape":"portrait"===o?"portrait":e>r?"landscape":"portrait",margins:{top:SM(lM(n,"top"),96),right:SM(lM(n,"right"),96),bottom:SM(lM(n,"bottom"),96),left:SM(lM(n,"left"),96),header:SM(lM(n,"header"),48),footer:SM(lM(n,"footer"),48),gutter:SM(lM(n,"gutter"),0)},...a?{columns:a}:{}}}const u=t=>{const n={};for(const a of tM(e,Yx,t)){const e=lM(a,"type")??"default";if("default"!==e&&"first"!==e&&"even"!==e)continue;const t=a.getAttribute("r:id")??a.getAttributeNS("http://schemas.openxmlformats.org/officeDocument/2006/relationships","id")??null;t&&(n[e]=t)}return n},p=u("headerReference"),h=u("footerReference"),f=rM(e,Yx,"docGrid"),g=lM(f,"type"),m=SM(lM(f,"linePitch"),Number.NaN),b=lM(rM(e,Yx,"type"),"val"),v="continuous"===b||"nextPage"===b||"evenPage"===b||"oddPage"===b||"nextColumn"===b?b:void 0,y=rM(e,Yx,"pgNumType");let w;if(y){const e=lM(y,"start"),t=null!==e?Number.parseInt(e,10):void 0,n=lM(y,"fmt")??void 0,a=lM(y,"chapStyle")??void 0,r=lM(y,"chapSep")??void 0;(void 0!==t&&Number.isFinite(t)||n||a||r)&&(w={...void 0!==t&&Number.isFinite(t)?{start:t}:{},...n?{format:n}:{},...a?{chapterStyle:a}:{},...r?{chapterSeparator:r}:{}})}const x=lM(rM(e,Yx,"vAlign"),"val"),M="center"===x||"both"===x||"bottom"===x?x:void 0,S=uM(e,"bidi");return{pageSettings:c,...d?{pageBorder:d}:{},headerRIds:p,footerRIds:h,docGridLinePitchPx:Number.isFinite(m)&&m>0?m:void 0,docGridMode:"lines"===g||"linesAndChars"===g?"explicit":void 0,docGridType:g,breakType:v,pageNumbering:w,verticalAlignment:M,bidi:S}}function bS(e){if(!e)return;const t=rM(e,Yx,"sectPr");if(!t)return;const n=rM(t,Yx,"pgSz"),a=rM(t,Yx,"pgMar"),r=gS(t);if(!n&&!a&&!r)return;const o=SM(lM(n,"w"),816),i=SM(lM(n,"h"),1056),l=lM(n,"orient");return{width:o,height:i,orientation:"landscape"===l?"landscape":"portrait"===l?"portrait":o>i?"landscape":"portrait",margins:{top:SM(lM(a,"top"),96),right:SM(lM(a,"right"),96),bottom:SM(lM(a,"bottom"),96),left:SM(lM(a,"left"),96),header:SM(lM(a,"header"),48),footer:SM(lM(a,"footer"),48),gutter:SM(lM(a,"gutter"),0)},...r?{columns:r}:{}}}function vS(e,t,n,a,r){var o,i,l;if(t&&n)for(const s of e){if("paragraph"===s.type){const e=(null==(o=s.style)?void 0:o.styleId)&&/heading/i.test(s.style.styleId);void 0!==(null==(i=s.style)?void 0:i.lineHeight)||!1===(null==(l=s.style)?void 0:l.snapToGrid)||e||(s.style={...s.style??{},lineGridPitch:t,lineGridType:a});continue}if(r.adjustLineHeightInTable)for(const e of s.rows)for(const o of e.cells)vS(o.blocks,t,n,a,r)}}const yS="http://schemas.openxmlformats.org/officeDocument/2006/math",wS=new Px;function xS(e,t){const n=[];for(let a=0;a<e.childNodes.length;a+=1){const r=e.childNodes[a];(null==r?void 0:r.nodeType)!==r.ELEMENT_NODE||r.namespaceURI!==yS||t&&r.localName!==t||n.push(r)}return n}function MS(e,t){return xS(e,t)[0]}function SS(e,t){return(null==e?void 0:e.getAttributeNS(yS,t))??(null==e?void 0:e.getAttribute(`m:${t}`))??(null==e?void 0:e.getAttribute(t))??void 0}function AS(e){return e?xS(e).map(IS):[]}function IS(e){switch(e.localName){case"r":return function(e){var t;const n=(null==(t=MS(e,"t"))?void 0:t.textContent)??"",a=MS(e,"rPr"),r=a?{...MS(a,"sty")?{script:SS(MS(a,"sty"),"val")}:{},...MS(a,"nor")?{normalText:!0}:{},...MS(a,"b")?{bold:"0"!==SS(MS(a,"b"),"val")}:{},...MS(a,"i")?{italic:"0"!==SS(MS(a,"i"),"val")}:{}}:void 0;return{kind:"text",value:n,...r&&Object.keys(r).length>0?{style:r}:{}}}(e);case"f":return{kind:"fraction",numerator:AS(MS(e,"num")),denominator:AS(MS(e,"den"))};case"rad":return{kind:"radical",radicand:AS(MS(e,"e")),...MS(e,"deg")?{degree:AS(MS(e,"deg"))}:{}};case"sSub":case"sSup":case"sSubSup":return function(e,t){const n=AS(MS(e,"e")),a=AS(MS(e,"sub")),r=AS(MS(e,"sup"));return{kind:t,base:n,...a.length>0?{subscript:a}:{},...r.length>0?{superscript:r}:{}}}(e,"script");case"d":{const t=MS(e,"dPr");return{kind:"delimiter",children:xS(e,"e").map(AS),...SS(MS(t,"begChr"),"val")?{begin:SS(MS(t,"begChr"),"val")}:{},...SS(MS(t,"endChr"),"val")?{end:SS(MS(t,"endChr"),"val")}:{},...SS(MS(t,"sepChr"),"val")?{separator:SS(MS(t,"sepChr"),"val")}:{},grow:"0"!==SS(MS(t,"grow"),"val")}}case"acc":{const t=MS(e,"accPr");return{kind:"accent",accent:SS(MS(t,"chr"),"val")??"¯",children:AS(MS(e,"e"))}}case"nary":{const t=MS(e,"naryPr");return{kind:"nary",operator:SS(MS(t,"chr"),"val")??"∑",children:AS(MS(e,"e")),...xS(e,"sub").length>0?{subscript:AS(MS(e,"sub"))}:{},...xS(e,"sup").length>0?{superscript:AS(MS(e,"sup"))}:{},grow:"0"!==SS(MS(t,"grow"),"val")}}case"limLow":return{kind:"limit",operator:"low",base:AS(MS(e,"e")),limit:AS(MS(e,"lim"))};case"limUpp":return{kind:"limit",operator:"upper",base:AS(MS(e,"e")),limit:AS(MS(e,"lim"))};case"m":return{kind:"matrix",rows:xS(e,"mr").map(e=>xS(e,"e").map(AS))};case"box":case"borderBox":return{kind:"box",children:AS(MS(e,"e")),border:!0};case"phant":return{kind:"box",children:AS(MS(e,"e")),hidden:!0};case"groupChr":{const t=MS(e,"groupChrPr");return{kind:"accent",accent:SS(MS(t,"chr"),"val")??"¯",children:AS(MS(e,"e"))}}case"func":return{kind:"group",children:[...AS(MS(e,"fName")),...AS(MS(e,"e"))]};default:return{kind:"raw",xml:wS.serializeToString(e),fallbackText:e.textContent??""}}}function CS(e){const t="oMathPara"===e.localName?MS(e,"oMath"):e;return{version:1,children:t?xS(t).map(IS):[],display:"oMathPara"===e.localName,sourceXml:wS.serializeToString(e)}}const TS=new Set(["alias","tag","id","lock","placeholder","dataBinding","temporary","appearance","showingPlcHdr","color","text","richText","picture","comboBox","dropDownList","date","repeatingSection","repeatingSectionItem","group","equation","citation","bibliography"]),kS=new Set(["repeatingSection","repeatingSectionItem"]);function RS(e){if(!e)return{};const t={},n=rM(e,Yx,"alias");if(n){const e=lM(n,"val");null!==e&&(t.alias=e)}const a=rM(e,Yx,"tag");if(a){const e=lM(a,"val");null!==e&&(t.tag=e)}const r=rM(e,Yx,"id");if(r){const e=lM(r,"val");null!==e&&(t.id=e)}const o=rM(e,Yx,"lock");if(o){const e=lM(o,"val");null!==e&&(t.lock=e)}const i=rM(e,Yx,"appearance");if(i){const e=lM(i,"val");null!==e&&(t.appearance=e)}const l=rM(e,Yx,"showingPlcHdr");l&&(t.showingPlcHdr=cM(lM(l,"val")));const s=rM(e,Yx,"temporary");s&&(t.temporary=cM(lM(s,"val")));const d=rM(e,Yx,"color");if(d){const e=lM(d,"val");null!==e&&(t.color=e)}const c=rM(e,Yx,"placeholder");if(c){const e=rM(c,Yx,"docPart");if(e){const n=lM(e,"val");null!==n&&(t.placeholderDocPart=n)}}const u=rM(e,Yx,"dataBinding");if(u){const e=function(e){const t={},n=lM(e,"prefixMappings"),a=lM(e,"xpath"),r=lM(e,"storeItemID");null!==n&&(t.prefixMappings=n);null!==a&&(t.xpath=a);null!==r&&(t.storeItemID=r);if(void 0===t.prefixMappings){const n=lM(rM(e,Yx,"prefixMappings"),"val");null!==n&&(t.prefixMappings=n)}if(void 0===t.xpath){const n=lM(rM(e,Yx,"xpath"),"val");null!==n&&(t.xpath=n)}if(void 0===t.storeItemID){const n=lM(rM(e,Yx,"storeItemID"),"val");null!==n&&(t.storeItemID=n)}return void 0===t.prefixMappings&&void 0===t.xpath&&void 0===t.storeItemID?null:t}(u);e&&(t.dataBinding=e)}const p=function(e){const t=rM(e,Yx,"comboBox");if(t){const e=rM(t,Yx,"lastSelectedValue");return{kind:"comboBox",listItems:ES(t),...e?{lastSelectedValue:lM(e,"val")??void 0}:{}}}const n=rM(e,Yx,"dropDownList");if(n){const e=rM(n,Yx,"lastSelectedValue");return{kind:"dropDownList",listItems:ES(n),...e?{lastSelectedValue:lM(e,"val")??void 0}:{}}}const a=rM(e,Yx,"date");if(a){const e=lM(a,"fullDate")??void 0,t=rM(a,Yx,"dateFormat"),n=rM(a,Yx,"lid"),r=rM(a,Yx,"calendar"),o=rM(a,Yx,"storeMappedDataAs");return{kind:"date",fullDate:e,dateFormat:t?lM(t,"val")??void 0:void 0,lid:n?lM(n,"val")??void 0:void 0,calendar:r?lM(r,"val")??void 0:void 0,storeMappedDataAs:o?lM(o,"val")??void 0:void 0}}if(rM(e,Yx,"text"))return{kind:"text"};for(const o of["richText","picture","group","equation","citation","bibliography"])if(rM(e,Yx,o))return{kind:o};if(iM(e,"repeatingSection")||rM(e,Yx,"repeatingSection"))return{kind:"repeatingSection"};if(iM(e,"repeatingSectionItem")||rM(e,Yx,"repeatingSectionItem"))return{kind:"repeatingSectionItem"};const r=oM(e,"checkbox");if(r){const e=rM(r,Qx,"checked"),t=rM(r,Qx,"checkedState"),n=rM(r,Qx,"uncheckedState"),a=e?cM(lM(e,"val")):void 0;return{kind:"checkbox",...void 0!==a?{checked:a}:{},...t?{checkedStateFont:lM(t,"font")??void 0,checkedStateChar:lM(t,"char")??void 0}:{},...n?{uncheckedStateFont:lM(n,"font")??void 0,uncheckedStateChar:lM(n,"char")??void 0}:{}}}return}(e);if(p&&(t.subtype=p,"repeatingSection"===p.kind)){const n=iM(e,"repeatingSection")??rM(e,Yx,"repeatingSection");if(n){const e=iM(n,"sectionTitle"),a=iM(n,"doNotAllowInsertDeleteSection"),r={},o=lM(e,"val");if(null!==o&&(r.sectionTitle=o),a){const e=lM(a,"val");r.doNotAllowInsertDeleteSection=null===e||cM(e)}Object.keys(r).length>0&&(t.repeatingSectionProperties=r)}}const h=function(e){let t="";for(let n=0;n<e.childNodes.length;n+=1){const a=e.childNodes[n];if((null==a?void 0:a.nodeType)!==a.ELEMENT_NODE)continue;const r=a,o=r.localName&&r.namespaceURI===Yx&&TS.has(r.localName),i=r.localName&&r.namespaceURI===$x&&kS.has(r.localName);o||i||(t+=(new Px).serializeToString(r))}return t}(e);return h.length>0&&(t.unknownXml=h),t}function ES(e){const t=tM(e,Yx,"listItem");if(0!==t.length)return t.map(e=>({displayText:lM(e,"displayText")??void 0,value:lM(e,"value")??void 0}))}function LS(e){const t=VS(e);return void 0===t?void 0:Math.round(t/ht)}function VS(e){if(null==e||""===e)return;const t=parseInt(e,10);return Number.isFinite(t)?t:void 0}function NS(e){const t=null==e?void 0:e.trim();if(!t)return null;const n=t.match(/^(-?\d+(?:\.\d+)?)(pt|px|in|cm|mm|pc)?$/i);if(!n)return null;const a=Number(n[1]);if(!Number.isFinite(a)||a<=0)return null;switch((n[2]??"px").toLowerCase()){case"pt":return Math.round(a*ct);case"in":return Math.round(a*dt);case"cm":return Math.round(a/2.54*dt);case"mm":return Math.round(a/25.4*dt);case"pc":return Math.round(12*a*ct);default:return Math.round(a)}}function zS(e){const t=Vg(e);return t?`#${t}`:void 0}function PS(e){for(let t=0;t<e.childNodes.length;t+=1){const n=e.childNodes[t];if((null==n?void 0:n.nodeType)!==n.ELEMENT_NODE)continue;const a=n;if("inline"===a.localName||"anchor"===a.localName)return{element:a,kind:a.localName}}}function OS(e){return"1"===e||"true"===e||"0"!==e&&"false"!==e&&void 0}function qS(e,t){var n,a,r,o;const i=sM(e,t);if(!i)return;const l=null==(a=null==(n=sM(i,"align"))?void 0:n.textContent)?void 0:a.trim(),s=VS(null==(o=null==(r=sM(i,"posOffset"))?void 0:r.textContent)?void 0:o.trim()),d={relativeFrom:i.getAttribute("relativeFrom")??void 0,...l?{align:l}:{},...void 0!==s?{offset:s}:{}};return void 0!==d.relativeFrom||void 0!==d.align||void 0!==d.offset?d:void 0}function BS(e){const t=qS(e,"positionH"),n=qS(e,"positionV"),a=function(e){return sM(e,"wrapSquare")?"square":sM(e,"wrapTight")?"tight":sM(e,"wrapThrough")?"through":sM(e,"wrapTopAndBottom")?"topAndBottom":sM(e,"wrapNone")?"none":void 0}(e),r=VS(e.getAttribute("distT")),o=VS(e.getAttribute("distB")),i=VS(e.getAttribute("distL")),l=VS(e.getAttribute("distR")),s=OS(e.getAttribute("simplePos")),d=VS(e.getAttribute("relativeHeight")),c=OS(e.getAttribute("behindDoc")),u=OS(e.getAttribute("locked")),p=OS(e.getAttribute("layoutInCell")),h=OS(e.getAttribute("allowOverlap"));return{type:"floating",...void 0!==r?{distT:r}:{},...void 0!==o?{distB:o}:{},...void 0!==i?{distL:i}:{},...void 0!==l?{distR:l}:{},...void 0!==s?{simplePos:s}:{},...void 0!==d?{relativeHeight:d}:{},...void 0!==c?{behindDoc:c}:{},...void 0!==u?{locked:u}:{},...void 0!==p?{layoutInCell:p}:{},...void 0!==h?{allowOverlap:h}:{},...t?{positionH:t}:{},...n?{positionV:n}:{},...a?{wrap:a}:{}}}async function WS(e,t,n,a){const r=sM(e,"blip");if(!r)return{text:"",image:void 0};const{embed:o,link:i}=function(e){const t={};for(let n=0;n<e.attributes.length;n+=1){const a=e.attributes[n];a&&("embed"===a.localName||"r:embed"===a.name?t.embed=a.value:"link"!==a.localName&&"r:link"!==a.name||(t.link=a.value))}return t}(r),l=PS(e),s=(null==l?void 0:l.element)??e,d=sM(s,"extent"),c=sM(s,"docPr");let u=300,p=300;if(d){const e=d.getAttribute("cx"),t=d.getAttribute("cy");e&&(u=Math.round(parseInt(e,10)/ht)),t&&(p=Math.round(parseInt(t,10)/ht))}const h=c?lM(c,"descr")??lM(c,"title"):null,f=function(e){const t=sM(e,"srcRect");if(!t)return;const n=e=>{const n=t.getAttribute(e);if(null===n||""===n)return;const a=parseInt(n,10);return Number.isFinite(a)&&0!==a?a/mt:void 0},a={left:n("l"),top:n("t"),right:n("r"),bottom:n("b")};return void 0!==a.left||void 0!==a.top||void 0!==a.right||void 0!==a.bottom?a:void 0}(e),g=function(e){const t=sM(e,"pic"),n=t&&sM(t,"spPr");if(!n)return;let a=null;for(let s=0;s<n.childNodes.length;s+=1){const e=n.childNodes[s];if(1!==(null==e?void 0:e.nodeType))continue;const t=e;if("prstGeom"===t.localName){a=t;break}}const r=null==a?void 0:a.getAttribute("prst");if(!a||!r||"rect"===r)return;const o={},i=Array.from(a.childNodes).find(e=>1===(null==e?void 0:e.nodeType)&&"avLst"===e.localName);if(i)for(let s=0;s<i.childNodes.length;s+=1){const e=i.childNodes[s];if(1!==(null==e?void 0:e.nodeType)||"gd"!==e.localName)continue;const t=e,n=t.getAttribute("name"),a=(t.getAttribute("fmla")??"").match(/(-?\d+(?:\.\d+)?)\s*$/);n&&a&&(o[n]=Number(a[1]))}const l={preset:r,rawXml:(new Px).serializeToString(a)};return Object.keys(o).length>0&&(l.adjustments=o),l}(e),m=function(e){if(sM(e,"tile"))return"tile"}(e),b=function(e){var t,n;const a=sM(e,"pic"),r=a&&sM(a,"spPr");if(r)for(let o=0;o<r.childNodes.length;o+=1){const e=r.childNodes[o];if(1!==(null==e?void 0:e.nodeType))continue;const a=e;if("ln"!==a.localName)continue;const i=zS(null==(t=sM(a,"srgbClr"))?void 0:t.getAttribute("val"));if(!i)return;const l={color:i},s=VS(a.getAttribute("w"));void 0!==s&&(l.widthPt=Ac(s/ft,2));const d=$o(null==(n=sM(a,"prstDash"))?void 0:n.getAttribute("val"));return d&&(l.dash=d),l}}(e),v=function(e){const t=sM(e,"xfrm");if(!t)return{};const n={},a=t.getAttribute("rot");if(a){const e=parseInt(a,10);Number.isFinite(e)&&0!==e&&(n.rotation=e/bt)}const r=t.getAttribute("flipH");"1"!==r&&"true"!==r||(n.flipH=!0);const o=t.getAttribute("flipV");return"1"!==o&&"true"!==o||(n.flipV=!0),n}(e),y="anchor"===(null==l?void 0:l.kind)?BS(l.element):void 0,w="anchor"===(null==l?void 0:l.kind)?function(e){const t=sM(e,"wrapPolygon");if(!t)return;const n=[];for(let a=0;a<t.childNodes.length;a+=1){const e=t.childNodes[a];if(1!==(null==e?void 0:e.nodeType))continue;const r=e;if("start"!==r.localName&&"lineTo"!==r.localName)continue;const o=VS(r.getAttribute("x")),i=VS(r.getAttribute("y"));void 0!==o&&void 0!==i&&n.push({x:o/21600,y:i/21600})}if(n.length>=2){const e=n[0],t=n[n.length-1];Math.abs(e.x-t.x)<1e-6&&Math.abs(e.y-t.y)<1e-6&&n.pop()}return n.length>=3?n:void 0}(l.element):void 0,x={width:u,height:p,...null!==h?{alt:h}:{},...f?{crop:f}:{},...g?{cropShape:g,cropFit:"fill"}:{},...m?{fillMode:m}:{},...b?{border:b}:{},...void 0!==v.rotation?{rotation:v.rotation}:{},...v.flipH?{flipH:!0}:{},...v.flipV?{flipV:!0}:{},...y?{floating:y}:{},...w?{wrapPolygon:w}:{}},M=o?n.get(o):void 0,S=i?n.get(i):void 0;if(S&&function(e){return/^[a-z][a-z0-9+.-]*:\/\//i.test(e)||e.startsWith("//")}(S))return{text:"",image:{src:"",linkedSrc:S,...x}};const A=M??S;if(A){const e=await bM(t,a,A);if(e)return{text:"",image:{src:e,...x}}}return{text:"",image:void 0}}function FS(e){const t=null==e?void 0:e.trim();if(!t)return;if(t.endsWith("%")){const e=Number(t.slice(0,-1));return Number.isFinite(e)&&0!==e?e/100:void 0}if(/f$/i.test(t)){const e=Number(t.slice(0,-1));return Number.isFinite(e)&&0!==e?e/65536:void 0}const n=Number(t);return Number.isFinite(n)&&0!==n?n/65536:void 0}async function DS(e,t,n,a){const r=sM(e,"imagedata");if(!r)return;const o=function(e){for(let t=0;t<e.attributes.length;t+=1){const n=e.attributes[t];if(n&&("id"===n.localName||"r:id"===n.name))return n.value}}(r),i=o?n.get(o):void 0;if(!i)return;const l=sM(e,"shape"),s=function(e){const t={};if(!e)return t;for(const n of e.split(";")){const e=n.indexOf(":");if(e<0)continue;const a=n.slice(0,e).trim().toLowerCase(),r=n.slice(e+1).trim();if("width"===a){const e=NS(r);null!==e&&(t.width=e)}else if("height"===a){const e=NS(r);null!==e&&(t.height=e)}}return t}(null==l?void 0:l.getAttribute("style")),d=function(e){const t={left:FS(lM(e,"cropleft")),top:FS(lM(e,"croptop")),right:FS(lM(e,"cropright")),bottom:FS(lM(e,"cropbottom"))};if(void 0!==t.left||void 0!==t.top||void 0!==t.right||void 0!==t.bottom)return t}(r),c=lM(r,"title")??r.getAttribute("o:title"),u=await bM(t,a,i);return u?{src:u,width:s.width??300,height:s.height??300,...c?{alt:c}:{},...d?{crop:d}:{}}:void 0}async function HS(e,t){const n=sM(e,"wsp");if(!n)return;const a=PS(e),r=(null==a?void 0:a.element)??e,o=sM(r,"extent"),i=LS(null==o?void 0:o.getAttribute("cx"))??300,l=LS(null==o?void 0:o.getAttribute("cy"))??300,s=sM(r,"docPr"),d=s?lM(s,"name"):null,c=s?lM(s,"descr")??lM(s,"title"):null,u="anchor"===(null==a?void 0:a.kind)?BS(a.element):void 0,p=sM(n,"txbxContent"),h=p&&t?await t(p):[],f=function(e){var t,n;const a=sM(e,"spPr");if(!a)return;const r={},o=sM(a,"prstGeom"),i=null==o?void 0:o.getAttribute("prst");i&&(r.preset=i);for(let l=0;l<a.childNodes.length;l+=1){const e=a.childNodes[l];if((null==e?void 0:e.nodeType)!==e.ELEMENT_NODE)continue;const o=e;if("solidFill"===o.localName){const e=zS(null==(t=sM(o,"srgbClr"))?void 0:t.getAttribute("val"));e&&(r.fill=e)}else if("ln"===o.localName){const e=VS(o.getAttribute("w"));void 0!==e&&(r.borderWidthPt=Ac(e/ft,2));const t=zS(null==(n=sM(o,"srgbClr"))?void 0:n.getAttribute("val"));t&&(r.borderColor=t)}}return Object.keys(r).length>0?r:void 0}(n),g=function(e){const t=sM(e,"bodyPr");if(!t)return;const n={},a=LS(t.getAttribute("lIns")),r=LS(t.getAttribute("tIns")),o=LS(t.getAttribute("rIns")),i=LS(t.getAttribute("bIns"));void 0!==a&&(n.paddingLeft=a),void 0!==r&&(n.paddingTop=r),void 0!==o&&(n.paddingRight=o),void 0!==i&&(n.paddingBottom=i);const l=t.getAttribute("anchor");l&&(n.anchor=l);const s=t.getAttribute("wrap");s&&(n.wrap=s);const d=t.getAttribute("vert");return"vert"!==d&&"vert270"!==d&&"wordArtVert"!==d||(n.vert=d),sM(t,"spAutoFit")&&(n.autoFit=!0),Object.keys(n).length>0?n:void 0}(n),m=function(e){const t=sM(e,"spPr");if(!t)return;const n=sM(t,"xfrm"),a=VS(null==n?void 0:n.getAttribute("rot"));return void 0!==a&&0!==a&&(Math.round(a/bt)%360+360)%360||void 0}(n);return{width:i,height:l,blocks:h,...u?{floating:u}:{},...void 0!==m?{rotation:m}:{},...d?{name:d}:{},...c?{alt:c}:{},...f?{shape:f}:{},...g?{body:g}:{}}}function US(e){let t;for(let n=0;n<e.childNodes.length;n+=1){const a=e.childNodes[n];if((null==a?void 0:a.nodeType)!==a.ELEMENT_NODE)continue;const r=a;if("Choice"!==r.localName)continue;const o=sM(r,"drawing");if(!o)continue;void 0===t&&(t=o);const i=r.getAttribute("Requires")??"";if(/\bwps\b/.test(i))return o}return t}function GS(e){const t=lM(e,"id");if(!t)return;if("bookmarkEnd"===e.localName)return{kind:"end",docxId:t};const n=lM(e,"name")??void 0,a=lM(e,"colFirst"),r=lM(e,"colLast"),o=null!==a?Number.parseInt(a,10):void 0,i=null!==r?Number.parseInt(r,10):void 0;return{kind:"start",docxId:t,...void 0!==n?{name:n}:{},...void 0===o||Number.isNaN(o)?{}:{colFirst:o},...void 0===i||Number.isNaN(i)?{}:{colLast:i}}}function jS(e){const t=lM(e,"id");if(t)return{kind:"commentRangeEnd"===e.localName?"end":"start",docxId:t}}async function ZS(e,t,n,a,r){const o=[];let i,l,s,d=0;const c=[],u=[],p=e=>{o.push(e),d+=e.length},h=e.childNodes;for(let f=0;f<h.length;f+=1){const e=h[f];if((null==e?void 0:e.nodeType)!==e.ELEMENT_NODE)continue;const o=e;if(o.namespaceURI===Yx)if("t"===o.localName)p(o.textContent??"");else if("tab"===o.localName)p("\t");else if("noBreakHyphen"===o.localName)p("‑");else if("softHyphen"===o.localName)p("­");else if("br"===o.localName)p("page"===lM(o,"type")?"\f":"\n");else{if("lastRenderedPageBreak"===o.localName)continue;if("bookmarkStart"===o.localName||"bookmarkEnd"===o.localName){const e=GS(o);e&&c.push({offset:d,marker:e});continue}if("commentRangeStart"===o.localName||"commentRangeEnd"===o.localName){const e=jS(o);e&&u.push({offset:d,marker:e});continue}if("proofErr"===o.localName||"commentReference"===o.localName||"permStart"===o.localName||"permEnd"===o.localName)continue;if("cr"===o.localName)p("\n");else if("drawing"===o.localName){const e=await WS(o,t,n,a);if(e.image)p(e.text),i=e.image;else{const e=await HS(o,r);e&&(p(""),l=e)}}else if("pict"===o.localName){const e=await DS(o,t,n,a);e&&(p(""),i=e)}else if("sym"===o.localName){const e=lM(o,"font")??"",t=lM(o,"char")??"",n=parseInt(t,16);p(Number.isFinite(n)&&n>0?String.fromCodePoint(n):"?"),s={font:e,char:t}}}else if("AlternateContent"===o.localName){const e=US(o);if(e){const t=await HS(e,r);t&&(p(""),l=t)}}}return{text:o.join(""),image:i,...l?{textBox:l}:{},...c.length>0?{innerBookmarks:c}:{},...u.length>0?{innerComments:u}:{},...s?{sym:s}:{}}}async function KS(e,t,n,a,r,o,i,l){var s,d,c;const u=[],p=[],h=(e,t)=>{const n=lM(e,"fldCharType"),a=lM(e,"fldLock"),r=lM(e,"dirty"),o="true"===a||"1"===a,i="true"===r||"1"===r;if("begin"===n)u.push({text:"",fieldChar:{kind:"begin",...o?{fieldLock:!0}:{},...i?{dirty:!0}:{}},...t?{styles:t}:{}}),p.push({beginIndex:u.length-1,instruction:"",...t?{beginStyles:t}:{}});else if("separate"===n)u.push({text:"",fieldChar:{kind:"separate"},...t?{styles:t}:{}});else if("end"===n){u.push({text:"",fieldChar:{kind:"end"},...t?{styles:t}:{}});const e=p.pop();e&&(e=>{var t;const n=/\bNUMPAGES\b/i.test(e.instruction)?"NUMPAGES":/\bPAGE\b/i.test(e.instruction)?"PAGE":null;if(!n)return;const a=u.slice(e.beginIndex);if(a.some(e=>e.bookmark))return;const r=a.filter(e=>!e.fieldChar&&void 0===e.fieldInstruction),o=r.map(e=>e.text).join("")||"1",i=(null==(t=r.find(e=>e.styles))?void 0:t.styles)??e.beginStyles;u.length=e.beginIndex,u.push({text:o,...i?{styles:i}:{},field:{type:n}})})(e)}},f=(e,t)=>{const n=e.textContent??"";u.push({text:"",fieldInstruction:n,...t?{styles:t}:{}});const a=p[p.length-1];a&&(a.instruction+=n)};for(let g=0;g<e.childNodes.length;g+=1){const p=e.childNodes[g];if((null==p?void 0:p.nodeType)!==p.ELEMENT_NODE)continue;const m=p;if(m.namespaceURI!==yS||"oMath"!==m.localName&&"oMathPara"!==m.localName){if(m.namespaceURI===Yx){if("bookmarkStart"===m.localName||"bookmarkEnd"===m.localName){const e=GS(m);if(!e)continue;u.push({text:"",bookmark:e});continue}if("commentRangeStart"===m.localName||"commentRangeEnd"===m.localName){const e=jS(m);if(!e)continue;u.push({text:"",comment:e});continue}if("sdt"===m.localName){const e=rM(m,Yx,"sdtContent");if(!e)continue;const s=rM(m,Yx,"sdtPr"),d=rM(m,Yx,"sdtEndPr"),c={groupId:Qe("sdt"),sdtPr:RS(s),...d?{sdtEndPrXml:(new Px).serializeToString(d)}:{}},p=await KS(e,t,n,a,r,o,i,l);for(const t of p)u.push({...t,sdtWrappers:[c,...t.sdtWrappers??[]]});continue}if("r"===m.localName){const e=QM(rM(m,Yx,"rPr"),o);if(tM(m,Yx,"fldChar").length>0||tM(m,Yx,"instrText").length>0){for(let t=0;t<m.childNodes.length;t+=1){const n=m.childNodes[t];if((null==n?void 0:n.nodeType)!==n.ELEMENT_NODE)continue;const a=n;a.namespaceURI===Yx&&("fldChar"===a.localName?h(a,e):"instrText"===a.localName&&f(a,e))}continue}const t=rM(m,Yx,"footnoteReference");if(t){const n=lM(t,"id");if(!n)continue;const a=lM(t,"customMarkFollows");let r=e;(s=r??(r={})).styleId??(s.styleId="footnoteReference"),void 0===r.superscript&&(r.superscript=!0),u.push({text:"?",styles:r,footnoteReference:{docxId:n,...a?{customMark:a}:{}}});continue}const c=rM(m,Yx,"endnoteReference");if(c){const t=lM(c,"id");if(!t)continue;const n=lM(c,"customMarkFollows");let a=e;(d=a??(a={})).styleId??(d.styleId="endnoteReference"),void 0===a.superscript&&(a.superscript=!0),u.push({text:"?",styles:a,endnoteReference:{docxId:t,...n?{customMark:n}:{}}});continue}const{text:p,image:g,textBox:b,innerBookmarks:v,innerComments:y,sym:w}=await ZS(m,n,a,r,l);let x=e;w&&!(null==x?void 0:x.fontFamily)&&((x??(x={})).fontFamily=w.font),i&&((x??(x={})).link=i);const M=[...(v??[]).map(e=>({offset:e.offset,run:{text:"",bookmark:e.marker}})),...(y??[]).map(e=>({offset:e.offset,run:{text:"",comment:e.marker}}))];if(M.length>0&&!g&&!b){M.sort((e,t)=>e.offset-t.offset);let e=0;for(const n of M){const t=p.slice(e,n.offset);t.length>0&&u.push({text:t,...x?{styles:x}:{}}),u.push(n.run),e=n.offset}const t=p.slice(e);t.length>0&&u.push({text:t,...x?{styles:x}:{}});continue}if(0===p.length&&!g&&!b)continue;if(u.push({text:p,...g?{image:g}:{},...b?{textBox:b}:{},...w?{sym:w}:{},...x?{styles:x}:{}}),v)for(const n of v)u.push({text:"",bookmark:n.marker});continue}if("fldSimple"===m.localName){const e=m.getAttribute("w:instr")??m.getAttributeNS(Yx,"instr")??m.getAttribute("instr")??"",s=/\bNUMPAGES\b/i.test(e)?"NUMPAGES":/\bPAGE\b/i.test(e)?"PAGE":null,d=await KS(m,t,n,a,r,o,i,l);if(s){const e=d.map(e=>e.text).join("")||"1",t=null==(c=d.find(e=>e.styles))?void 0:c.styles;u.push({text:e,styles:t,field:{type:s}})}else u.push({text:"",fieldChar:{kind:"begin"}}),u.push({text:"",fieldInstruction:e}),u.push({text:"",fieldChar:{kind:"separate"}}),u.push(...d),u.push({text:"",fieldChar:{kind:"end"}});continue}if("hyperlink"===m.localName){let e=a.get(m.getAttribute("r:id")??m.getAttributeNS("http://schemas.openxmlformats.org/officeDocument/2006/relationships","id")??"")??null;if(!e){const t=lM(m,"anchor");t&&(e=`#${t}`)}u.push(...await KS(m,t,n,a,r,o,e,l))}}}else u.push({text:"",math:CS(m)})}return u}const XS="http://schemas.openxmlformats.org/wordprocessingml/2006/main",YS=/<w:rPr(?:\s|\/|>)/,JS=/<w:pPr(?:\s|\/|>)/;function QS(e){if(Array.isArray(e))return e.map(QS);if(!e||"object"!=typeof e)return e;const t=e,n=function(e){return"string"==typeof e.kind||"string"==typeof e.type||Array.isArray(e.runs)||Array.isArray(e.rows)||Array.isArray(e.cells)||Array.isArray(e.blocks)}(t),a={};for(const[r,o]of Object.entries(t).sort(([e],[t])=>e.localeCompare(t)))void 0===o||"id"===r&&n||"ooxmlSource"===r||r.startsWith("__")||(a[r]=QS(o));return a}function $S(e){return JSON.stringify(QS(e))??"undefined"}function _S(e){return/\br:(?:id|embed|link)\s*=/.test(e)}function eA(e,t){const n=[];for(let a=0;a<e.childNodes.length;a+=1){const r=e.childNodes[a];(null==r?void 0:r.nodeType)===r.ELEMENT_NODE&&r.namespaceURI===XS&&r.localName===t&&n.push(r)}return n}function tA(e,t){return eA(e,t)[0]}function nA(e){return e?(new Px).serializeToString(e):void 0}function aA(e){return $S(e)}function rA(e){return $S({...e,text:void 0})}function oA(e,t){e.ooxmlSource={xml:t,semanticSignature:aA(e),structureSignature:rA(e)}}function iA(e){return e.ooxmlSource}function lA(e){return $S(e)}function sA(e){return $S({style:e.style,list:e.list})}function dA(e){return e.ooxmlSource}function cA(e){return $S(e)}function uA(e){return $S({style:e.style})}function pA(e){return $S({gridCols:e.gridCols,gridRevision:e.gridRevision})}function hA(e){return $S({isHeader:e.isHeader,style:e.style,conditionalStyle:e.conditionalStyle})}function fA(e){return $S({propertyExceptions:e.propertyExceptions,tblPrExChangeXml:e.tblPrExChangeXml})}function gA(e){return $S({colSpan:e.colSpan,rowSpan:e.rowSpan,vMerge:e.vMerge,style:e.style,conditionalStyle:e.conditionalStyle,mergeRevisionState:e.mergeRevisionState})}function mA(e){return e.ooxmlSource}function bA(e,t){const n=nA(tA(t,"tblPr")),a=nA(tA(t,"tblGrid")),r=eA(t,"tr");return r.length===e.rows.length&&r.forEach((t,n)=>{const a=e.rows[n];!function(e,t){const n={};t.rowPropertiesXml&&(n.rowProperties={xml:t.rowPropertiesXml,semanticSignature:hA(e)}),t.propertyExceptionsXml&&(n.propertyExceptions={xml:t.propertyExceptionsXml,semanticSignature:fA(e)}),(n.rowProperties||n.propertyExceptions)&&(e.ooxmlSource=n)}(a,{rowPropertiesXml:nA(tA(t,"trPr")),propertyExceptionsXml:nA(tA(t,"tblPrEx"))});const r=eA(t,"tc");r.length===a.cells.length&&r.forEach((e,t)=>{const n=nA(tA(e,"tcPr"));n&&function(e,t){e.ooxmlSource={cellProperties:{xml:t,semanticSignature:gA(e)}}}(a.cells[t],n)})}),{tablePropertiesXml:n,tableGridXml:a}}function vA(e){return e.ooxmlSource}function yA(e,t,n){const a=new Px,r=function(e,t){const n=t.serializeToString(e.cloneNode(!1)),a=n.indexOf(">");if(a<0)return;const r=n.slice(0,a+1),o=e.tagName;return r.slice(`<${o}`.length,r.endsWith("/>")?-2:-1).trim()||void 0}(e,a),o=t?rM(t,Yx,"sectPr"):null,i=o?void 0:a.serializeToString(e),l=t&&!o?a.serializeToString(t):void 0,s=function(e,t){const n=[],a=e=>{for(let r=0;r<e.childNodes.length;r+=1){const o=e.childNodes[r];if((null==o?void 0:o.nodeType)!==o.ELEMENT_NODE)continue;const i=o;i.namespaceURI!==Yx||"r"!==i.localName?(i.namespaceURI!==Yx||"pPr"!==i.localName&&"p"!==i.localName&&"tbl"!==i.localName&&"txbxContent"!==i.localName)&&a(i):n.push(t.serializeToString(i))}};return a(e),n}(e,a),d=s.length===n.length?s:void 0;if(i||r||l||d)return{...i?{xml:i}:{},...r?{attributes:r}:{},...l?{paragraphPropertiesXml:l}:{},...d?{runXml:d}:{}}}function wA(e){var t;const n={id:Qe("run"),text:e.text};let a;e.styles&&(n.styles={...e.styles}),e.revision&&(n.revision={...e.revision}),(null==(t=e.sdtWrappers)?void 0:t.length)&&(n.sdtWrappers=[...e.sdtWrappers]),a=e.fieldChar?{...n,kind:"fieldChar",fieldChar:{...e.fieldChar}}:void 0!==e.fieldInstruction?{...n,kind:"fieldInstruction",fieldInstruction:e.fieldInstruction}:e.field?{...n,kind:"field",field:{...e.field}}:e.textBox?{...n,kind:"textBox",textBox:e.textBox}:e.image?{...n,kind:"image",image:e.image}:e.sym?{...n,kind:"sym",sym:{...e.sym}}:e.math?{...n,text:At,kind:"math",math:e.math}:{...n,kind:"text"};const r=a;return e.footnoteReference&&(r.__importedFootnoteRef={...e.footnoteReference}),e.endnoteReference&&(r.__importedEndnoteRef={...e.endnoteReference}),e.bookmark&&(r.__importedBookmark={...e.bookmark}),e.comment&&(r.__importedComment={...e.comment}),r}function xA(e,t,n,a,r){var o,i;const l=e.length>0?e.map(wA):[{id:Qe("run"),text:"",kind:"text",...a?{styles:{...a}}:{}}],s={id:Qe("paragraph"),type:"paragraph",runs:l};s.style=t?{...t}:void 0;for(const d of s.runs)d.styles=JM(d.styles,null==(o=s.style)?void 0:o.styleId);if(s.list=n?{...n}:void 0,(null==(i=null==r?void 0:r.runXml)?void 0:i.length)===s.runs.length)for(let d=0;d<s.runs.length;d+=1)oA(s.runs[d],r.runXml[d]);return r&&function(e,t){const n={};t.xml&&(n.xml=t.xml,n.semanticSignature=lA(e)),t.attributes&&(n.attributes=t.attributes),t.paragraphPropertiesXml&&(n.paragraphProperties={xml:t.paragraphPropertiesXml,semanticSignature:sA(e)}),(n.xml||n.attributes||n.paragraphProperties)&&(e.ooxmlSource=n)}(s,r),s}function MA(e){return e.some(e=>e.image||e.textBox||e.field||e.fieldChar||void 0!==e.fieldInstruction||e.bookmark||e.comment||e.text.replace(/\s/g,"").length>0)}async function SA(e,t,n,a,r,o,i,l){const s=rM(e,Yx,"pPr"),d=await KS(e,t,n,a,r,o,void 0,i),c=pS(hS(s,o.colors)),u=QM(rM(s,Yx,"rPr"),o),p=function(e,t){if(!e)return;const n=rM(e,Yx,"numPr");if(!n)return;const a=lM(rM(n,Yx,"numId"),"val");if(!a)return;const r=lM(rM(n,Yx,"ilvl"),"val")??"0",o=Number.parseInt(r,10),i=Number.isFinite(o)?o:0,l=DM(t,a,i),s=[];for(let g=0;g<=i;g+=1)s[g]=DM(t,a,g).format??"decimal";const d=`${a}:${i}`,c=!t.seenInstances.has(d);t.seenInstances.add(d);const u=c?t.numStartOverrides.get(d)??l.startAt:void 0,p={kind:l.kind??"ordered",level:i,instanceId:a,suffix:l.suffix??"tab",...l.format?{format:l.format}:{},...s.length?{levelFormats:s}:{},...l.levelText?{levelText:l.levelText}:{},...l.alignment?{alignment:l.alignment}:{},...void 0!==l.legal?{legal:l.legal}:{},...void 0!==u&&1!==u?{startAt:u}:{},...l.bulletGlyph?{bulletGlyph:l.bulletGlyph}:{},...l.bulletFont?{bulletFont:l.bulletFont}:{}},h=WM(a,1),f=WM(t.numToAbstractId.get(a),0);return(void 0!==h||void 0!==f||l.rawFormat||void 0!==l.restartAfterLevel||l.paragraphStyleId)&&function(e,t){e.ooxmlNumbering={...t,importedFormat:e.format,importedKind:e.kind}}(p,{...void 0!==h?{sourceNumId:h}:{},...void 0!==f?{sourceAbstractNumId:f}:{},...l.rawFormat?{format:l.rawFormat}:{},...void 0!==l.restartAfterLevel?{restartAfterLevel:l.restartAfterLevel}:{},...l.paragraphStyleId?{paragraphStyleId:l.paragraphStyleId}:{}}),{list:p,indent:l.indent}}(s,t),h=null==p?void 0:p.list;let f=c;if(null==p?void 0:p.indent){const{left:e,hanging:t}=p.indent,n=c??{};f={...n,...void 0===n.indentLeft&&void 0!==e?{indentLeft:e}:{},...void 0===n.indentHanging&&void 0!==t?{indentHanging:t}:{}}}const g=function(e){if(!e)return;const t=sn(e,Mt),n=sn(void 0,Mt);return GM({styleId:e.styleId,align:t.align!==n.align?t.align:void 0,spacingBefore:t.spacingBefore!==n.spacingBefore?t.spacingBefore:void 0,spacingAfter:t.spacingAfter!==n.spacingAfter?t.spacingAfter:void 0,contextualSpacing:void 0!==e.contextualSpacing||t.contextualSpacing!==n.contextualSpacing?t.contextualSpacing:void 0,lineHeight:t.lineHeight!==n.lineHeight?t.lineHeight:void 0,lineRule:t.lineRule??void 0,lineGridPitch:e.lineGridPitch??void 0,snapToGrid:void 0!==e.snapToGrid||t.snapToGrid!==n.snapToGrid?t.snapToGrid:void 0,indentLeft:void 0!==e.indentLeft||t.indentLeft!==n.indentLeft?t.indentLeft:void 0,indentRight:void 0!==e.indentRight||t.indentRight!==n.indentRight?t.indentRight:void 0,indentFirstLine:void 0!==e.indentFirstLine||t.indentFirstLine!==n.indentFirstLine?t.indentFirstLine:void 0,indentHanging:void 0!==e.indentHanging||t.indentHanging!==n.indentHanging?t.indentHanging:void 0,mirrorIndents:void 0!==e.mirrorIndents||t.mirrorIndents!==n.mirrorIndents?t.mirrorIndents:void 0,pageBreakBefore:void 0!==e.pageBreakBefore||t.pageBreakBefore!==n.pageBreakBefore?t.pageBreakBefore:void 0,keepWithNext:void 0!==e.keepWithNext||t.keepWithNext!==n.keepWithNext?t.keepWithNext:void 0,keepLinesTogether:void 0!==e.keepLinesTogether||t.keepLinesTogether!==n.keepLinesTogether?t.keepLinesTogether:void 0,widowControl:void 0!==e.widowControl||t.widowControl!==n.widowControl?t.widowControl:void 0,shading:e.shading??void 0,borderTop:e.borderTop??void 0,borderRight:e.borderRight??void 0,borderBottom:e.borderBottom??void 0,borderLeft:e.borderLeft??void 0,tabs:e.tabs??void 0,textDirection:e.textDirection??void 0,outlineLevel:e.outlineLevel??void 0,suppressLineNumbers:void 0!==e.suppressLineNumbers||t.suppressLineNumbers!==n.suppressLineNumbers?t.suppressLineNumbers:void 0,suppressAutoHyphens:void 0!==e.suppressAutoHyphens||t.suppressAutoHyphens!==n.suppressAutoHyphens?t.suppressAutoHyphens:void 0,bidi:void 0!==e.bidi||t.bidi!==n.bidi?t.bidi:void 0,kinsoku:void 0!==e.kinsoku||t.kinsoku!==n.kinsoku?t.kinsoku:void 0,wordWrap:void 0!==e.wordWrap||t.wordWrap!==n.wordWrap?t.wordWrap:void 0,overflowPunct:void 0!==e.overflowPunct||t.overflowPunct!==n.overflowPunct?t.overflowPunct:void 0,topLinePunct:void 0!==e.topLinePunct||t.topLinePunct!==n.topLinePunct?t.topLinePunct:void 0,autoSpaceDE:void 0!==e.autoSpaceDE||t.autoSpaceDE!==n.autoSpaceDE?t.autoSpaceDE:void 0,autoSpaceDN:void 0!==e.autoSpaceDN||t.autoSpaceDN!==n.autoSpaceDN?t.autoSpaceDN:void 0,adjustRightInd:void 0!==e.adjustRightInd||t.adjustRightInd!==n.adjustRightInd?t.adjustRightInd:void 0,textAlignment:e.textAlignment??void 0,textboxTightWrap:e.textboxTightWrap??void 0,divId:e.divId??void 0,conditionalStyle:e.conditionalStyle??void 0,borderBetween:e.borderBetween??void 0,borderBar:e.borderBar??void 0,framePrXml:e.framePrXml??void 0})}(f),m=function(e,t){var n;const a=rM(e,Yx,"framePr");if(!a)return null;const r=lM(a,"dropCap");if(!r||"none"===r)return null;const o=t.map(e=>e.text).join("");if(0===o.length)return null;const i=Number(lM(a,"lines"));return{text:o,lines:Number.isFinite(i)&&i>0?i:3,type:"margin"===r?"margin":"drop",style:null==(n=t[0])?void 0:n.styles}}(s,d);if(m)return{paragraphs:[],pageBreakAfter:!1,dropCapFrame:m};const{segments:b,hasPageBreak:v}=function(e){const t=[[]];let n=!1;const a=(e,n)=>{(0!==n.length||e.image||e.textBox||e.field||e.fieldChar||void 0!==e.fieldInstruction||e.bookmark||e.comment)&&t[t.length-1].push({...e,text:n})};for(const r of e){if(!r.text.includes("\f")){a(r,r.text);continue}const e=r.text.split("\f");e.forEach((o,i)=>{a(r,o),i<e.length-1&&(n=!0,t.push([]))})}return{segments:t,hasPageBreak:n}}(d);if(!v){return{paragraphs:[xA(d,g,h,u,yA(e,s,d))],pageBreakAfter:!1}}const y=[];let w=!1;for(let x=0;x<b.length;x+=1){const e=b[x];if(x>0&&(w=!0),!MA(e))continue;const t=w?{...g??{},pageBreakBefore:!0}:g;y.push(xA(e,t,h,u)),w=!1}return{paragraphs:y,pageBreakAfter:w}}async function AA(e,t,n,a,r,o,i,l){return(await SA(e,t,n,a,r,o,i)).paragraphs[0]??at([{text:""}])}function IA(e,t,n,a){for(const r of Xx(e)){if(r.namespaceURI!==Yx)continue;if(r.localName===t){a.push({element:r,...n.length>0?{sdtWrappers:n}:{}});continue}if("sdt"!==r.localName)continue;const e=rM(r,Yx,"sdtContent");if(!e)continue;const o=rM(r,Yx,"sdtPr"),i=rM(r,Yx,"sdtEndPr"),l={groupId:Qe("sdt"),sdtPr:RS(o),...i?{sdtEndPrXml:(new Px).serializeToString(i)}:{}};IA(e,t,[...n,l],a)}}function CA(e,t){const n=[];return IA(e,t,[],n),n}function TA(e,t){if(!t.every(e=>"paragraph"===e.type))return;const n=tM(e,Yx,"p");n.length===t.length&&function(e,t){var n,a;const r=e=>e.style??(e.style={}),o=e.length-1;for(let i=0;i<e.length;i+=1){const n=t[i];n&&(0===i&&n.before&&(r(e[i]).spacingBefore=0),i===o&&n.after&&(r(e[i]).spacingAfter=0))}for(let i=0;i<o;i+=1){if(!(null==(n=t[i])?void 0:n.after)||!(null==(a=t[i+1])?void 0:a.before))continue;const o=r(e[i]),l=r(e[i+1]);(o.spacingAfter??0)>=(l.spacingBefore??0)?l.spacingBefore=0:o.spacingAfter=0}}(t,n.map(e=>function(e){const t=rM(e,Yx,"spacing");return{before:cM(lM(t,"beforeAutospacing")),after:cM(lM(t,"afterAutospacing"))}}(rM(e,Yx,"pPr"))))}async function kA(e,t,n,a,r,o,i,l){var s,d;const c=[],u=rM(e,Yx,"tblGrid");if(u)for(const w of tM(u,Yx,"gridCol")){const e=AM(lM(w,"w"));void 0!==e&&c.push(e)}const p=rM(u,Yx,"tblGridChange"),h=rM(e,Yx,"tblPr"),f=lM(rM(h,Yx,"tblStyle"),"val"),g=oS(h,f??void 0),m=function(e){const t=rM(e,Yx,"tblLook"),n=e=>{const n=lM(t,e);return null===n||""===n?void 0:cM(n)},a=lM(t,"val"),r=a?Number.parseInt(a,16):Number.NaN,o=e=>Number.isFinite(r)?0!==(r&e):void 0;return{firstRow:n("firstRow")??o(32)??!0,lastRow:n("lastRow")??o(64)??!1,firstCol:n("firstColumn")??o(128)??!0,lastCol:n("lastColumn")??o(256)??!1,noHBand:n("noHBand")??o(512)??!1,noVBand:n("noVBand")??o(1024)??!1}}(h),b=CA(e,"tr"),v=[];for(let w=0;w<b.length;w+=1){const e=b[w],t=e.element,n=rM(t,Yx,"trPr"),a=nS(n),r=CA(t,"tc"),l=[];for(let d=0;d<r.length;d+=1){const e=r[d],t=e.element,n=rM(t,Yx,"tcPr"),a=await i(t);TA(t,a);const c=lS(n);if("continue"===dS(n)&&l.length>0){const e=l[l.length-1];e.colSpan=(e.colSpan??1)+c;continue}const u=sS(n),p=cS(n,0,o.colors),h=rt(a.length>0?a:[at([{text:""}])],c,"restart"===u?{rowSpan:1,vMerge:u}:u?{vMerge:u}:void 0);p&&(h.style=p),h.conditionalStyle=nS(n),(null==(s=e.sdtWrappers)?void 0:s.length)&&(h.sdtWrappers=[...e.sdtWrappers]);const f=dM(t);f&&(h.extAttributes=f),"continue"===u&&(h.blocks=[]),l.push(h)}const c=ot(l,uS(t)?{isHeader:!0}:void 0),u=iS(n);u&&(c.style=u),c.conditionalStyle=a,(null==(d=e.sdtWrappers)?void 0:d.length)&&(c.sdtWrappers=[...e.sdtWrappers]);const p=dM(t);p&&(c.extAttributes=p);const h=rM(t,Yx,"tblPrEx");if(h){const e=oS(h);e&&(c.propertyExceptions=e);const t=rM(h,Yx,"tblPrExChange");t&&(c.tblPrExChangeXml=(new Px).serializeToString(t))}v.push(c)}for(let w=0;w<v.length;w+=1){const e=v[w];for(let t=0;t<e.cells.length;t+=1){const n=e.cells[t];if("restart"!==n.vMerge)continue;let a=1;for(let e=w+1;e<v.length;e+=1){const n=v[e].cells[t];if(!n||"continue"!==n.vMerge)break;a+=1}a>1&&(n.rowSpan=a)}}const y=it(v,c.length>0?c:void 0);if(g&&(y.style=g),y.style?y.style.tblLook=m:f&&(y.style={tblLook:m}),p){const e=rM(p,Yx,"tblGrid"),t=e?tM(e,Yx,"gridCol").map(e=>AM(lM(e,"w"))).filter(e=>void 0!==e):[],n=lM(p,"date"),a=n?Date.parse(n):Number.NaN;y.gridRevision={id:lM(p,"id")??"revision:grid",author:lM(p,"author")??"Unknown",date:Number.isFinite(a)?a:0,type:"grid",previous:t}}return function(e,t){let n="string"==typeof t?{xml:t}:t;if("string"==typeof t){const a=(new Ox).parseFromString(t,"application/xml").documentElement;(null==a?void 0:a.namespaceURI)===XS&&"tbl"===a.localName&&(n={...n,...bA(e,a)})}const a={xml:n.xml,semanticSignature:cA(e)};n.tablePropertiesXml&&(a.tableProperties={xml:n.tablePropertiesXml,semanticSignature:uA(e)}),n.tableGridXml&&(a.tableGrid={xml:n.tableGridXml,semanticSignature:pA(e)}),e.ooxmlSource=a}(y,(new Px).serializeToString(e)),y}async function RA(e,t,n,a,r,o,i){if(e.namespaceURI!==Yx)return[];if("p"===e.localName){return(await SA(e,t,n,a,r,o,i)).paragraphs}return"tbl"===e.localName?[await kA(e,0,0,0,0,o,i)]:"sdt"===e.localName?EA(e,t,n,a,r,o,i):[]}async function EA(e,t,n,a,r,o,i){const l=rM(e,Yx,"sdtPr"),s=rM(e,Yx,"sdtEndPr"),d={groupId:Qe("sdt"),sdtPr:RS(l),...s?{sdtEndPrXml:(new Px).serializeToString(s)}:{}},c=rM(e,Yx,"sdtContent"),u=[];if(c)for(let p=0;p<c.childNodes.length;p+=1){const e=c.childNodes[p];(null==e?void 0:e.nodeType)===e.ELEMENT_NODE&&u.push(...await RA(e,t,n,a,r,o,i))}for(const p of u)p.sdtWrappers=[d,...p.sdtWrappers??[]];return u}function LA(e,t,n,a,r){return o=>async function(e,t,n,a,r,o){const i=LA(t,n,a,r,o),l=[];for(let s=0;s<e.childNodes.length;s+=1){const d=e.childNodes[s];(null==d?void 0:d.nodeType)===d.ELEMENT_NODE&&l.push(...await RA(d,t,n,a,r,o,i))}return l}(o,e,t,n,a,r)}async function VA(e,t,n,a,r,o,i){if(!e)return[];const l=(new Ox).parseFromString(e,"application/xml").documentElement;if(!l)return[];const s=LA(t,n,a,r,o),d=[];for(let c=0;c<l.childNodes.length;c+=1){const e=l.childNodes[c];if((null==e?void 0:e.nodeType)!==e.ELEMENT_NODE)continue;const i=e;"p"===i.localName&&i.namespaceURI===Yx?d.push(await AA(i,t,n,a,r,o,s)):"tbl"===i.localName&&i.namespaceURI===Yx&&d.push(await kA(i,0,0,0,0,o,s))}return d}const NA=new Set(["separator","continuationSeparator","continuationNotice"]);async function zA(e,t,n,a,r,o,i,l){const s={byDocxId:new Map,notes:{items:{}}};if(!t)return s;const d=(new Ox).parseFromString(t,"application/xml").documentElement;if(!d)return s;const c={},u=new Map;let p,h;const f=tM(d,Yx,e);let g=0;const m=LA(n,a,r,o,i);for(const b of f){const t=lM(b,"id")??"",l=lM(b,"type")??"",s=[];for(let e=0;e<b.childNodes.length;e+=1){const t=b.childNodes[e];if((null==t?void 0:t.nodeType)!==t.ELEMENT_NODE)continue;const l=t;l.namespaceURI===Yx&&("p"===l.localName?s.push(await AA(l,n,a,r,o,i,m)):"tbl"===l.localName&&s.push(await kA(l,0,0,0,0,i,m)))}if(NA.has(l)){"separator"===l?p=s:"continuationSeparator"===l&&(h=s);continue}if(("-1"===t||"0"===t)&&0===s.length)continue;g+=1;const d=`${e}:imported:${g}`,f=Number.parseInt(t,10),v={id:d,blocks:s.length>0?s:[],docxId:Number.isFinite(f)?f:void 0};c[d]=v,t&&u.set(t,v)}return{byDocxId:u,notes:{items:c,separator:p,continuationSeparator:h},separator:p,continuationSeparator:h}}const PA=new Set(["_GoBack"]);function OA(e,t,n){if("paragraph"===e.type){let a=0;const r=[];for(const o of e.runs){const i=o.__importedBookmark;i?(t.push({marker:i,anchor:{paragraphId:e.id,offset:a,seq:n.value}}),n.value+=1):(a+=o.text.length,r.push(o))}return void(r.length!==e.runs.length&&(e.runs=r.length>0?r:[et("")]))}for(const a of e.rows)for(const e of a.cells)for(const a of e.blocks)OA(a,t,n)}function qA(e){var t;const n=[],a={value:0},r=e=>{null==e||e.forEach(e=>OA(e,n,a))};for(const c of e)r(c.blocks),r(c.header),r(c.firstPageHeader),r(c.evenPageHeader),r(c.footer),r(c.firstPageFooter),r(c.evenPageFooter);if(0===n.length)return;const o=new Map,i=new Map;for(const c of n){const e="start"===c.marker.kind?o:i,t=e.get(c.marker.docxId);t?t.push(c):e.set(c.marker.docxId,[c])}const l={},s=[],d=n.filter(e=>"start"===e.marker.kind);for(const c of d){const{marker:e,anchor:n}=c,a=e.name;if(!a||PA.has(a))continue;const r=Number.parseInt(e.docxId,10),o=null==(t=i.get(e.docxId))?void 0:t.shift(),d=$e(),u={id:d,name:a,start:n};a.startsWith("_")&&(u.hidden=!0),Number.isNaN(r)||(u.docxIdHint=r),void 0!==e.colFirst&&(u.colFirst=e.colFirst),void 0!==e.colLast&&(u.colLast=e.colLast),o&&(u.end=o.anchor),l[d]=u,s.push(d)}return 0!==s.length?{items:l,order:s}:void 0}function BA(e,t,n){if("paragraph"===e.type){let a=0;const r=[];for(const o of e.runs){const i=o.__importedComment;i?(t.push({marker:i,anchor:{paragraphId:e.id,offset:a,seq:n.value}}),n.value+=1):(a+=o.text.length,r.push(o))}return void(r.length!==e.runs.length&&(e.runs=r.length>0?r:[et("")]))}for(const a of e.rows)for(const e of a.cells)for(const a of e.blocks)BA(a,t,n)}function WA(e){const t=[],n={value:0},a=e=>{null==e||e.forEach(e=>BA(e,t,n))};for(const o of e)a(o.blocks),a(o.header),a(o.firstPageHeader),a(o.evenPageHeader),a(o.footer),a(o.firstPageFooter),a(o.evenPageFooter);const r=new Map;for(const{marker:o,anchor:i}of t){const e=r.get(o.docxId)??{};"start"===o.kind?e.start=i:e.end=i,r.set(o.docxId,e)}return r}const FA="http://schemas.microsoft.com/office/word/2012/wordml";function DA(e){let t="";for(let n=0;n<e.childNodes.length;n+=1){const a=e.childNodes[n];if((null==a?void 0:a.nodeType)!==a.ELEMENT_NODE)continue;const r=a;if(r.namespaceURI===Yx){if("t"===r.localName){t+=r.textContent??"";continue}if("tab"===r.localName){t+="\t";continue}if("br"===r.localName||"cr"===r.localName){t+="\n";continue}}t+=DA(r)}return t}function HA(e){if(!e)return;const t=Date.parse(e);return Number.isNaN(t)?void 0:t}function UA(e,t){const n=new Map;if(!e)return n;const a=(new Ox).parseFromString(e,"application/xml").documentElement;if(!a)return n;const r=function(e){const t=new Map;if(!e)return t;const n=(new Ox).parseFromString(e,"application/xml").documentElement;if(!n)return t;for(const a of tM(n,FA,"commentEx")){const e=a.getAttributeNS(FA,"paraId");if(!e)continue;const n=a.getAttributeNS(FA,"done");t.set(e,"1"===n||"true"===n)}return t}(t);for(const o of tM(a,Yx,"comment")){const e=lM(o,"id");if(null===e)continue;const t=lM(o,"author")??"",a=lM(o,"initials")??void 0,i=HA(lM(o,"date")),l=HA(o.getAttributeNS("http://schemas.microsoft.com/office/word/2023/wordml/word16du","dateUtc")),s=tM(o,Yx,"p"),d=s.map(e=>DA(e)).join("\n").trim(),c=s.length>0?lM(s[0],"paraId")??void 0:void 0,u=void 0!==c?r.get(c):void 0;n.set(e,{author:t,...a?{initials:a}:{},...void 0!==i?{date:i}:{},...void 0!==l?{dateUtc:l}:{},text:d,...u?{resolved:u}:{},...c?{paraId:c}:{}})}return n}async function GA(e,t={}){var n,a,r,o,i,l,s,d,c,u,p,h,f,g,m;null==(n=t.onProgress)||n.call(t,"opening-docx");const b=await Ob.loadAsync(e),v=await(null==(a=b.file("word/document.xml"))?void 0:a.async("string"));if(!v)throw new Error("Missing word/document.xml");const y=vM(await(null==(r=b.file("word/_rels/document.xml.rels"))?void 0:r.async("string"))),w=function(e){const t={abstractLevels:new Map,numOverrideLevels:new Map,numStartOverrides:new Map,numToAbstractId:new Map,seenInstances:new Set};if(!e)return t;const n=(new Ox).parseFromString(e,"application/xml").documentElement;if(!n)return t;for(const a of Array.from(n.getElementsByTagNameNS(Yx,"abstractNum"))){const e=lM(a,"abstractNumId");if(e)for(const n of tM(a,Yx,"lvl")){const a=lM(n,"ilvl")??"0";t.abstractLevels.set(`${e}:${a}`,FM(n))}}for(const a of Array.from(n.getElementsByTagNameNS(Yx,"num"))){const e=lM(a,"numId"),n=lM(rM(a,Yx,"abstractNumId"),"val");if(e&&n){t.numToAbstractId.set(e,n);for(const n of tM(a,Yx,"lvlOverride")){const a=lM(n,"ilvl")??"0",r=rM(n,Yx,"lvl");r&&t.numOverrideLevels.set(`${e}:${a}`,FM(r));const o=BM(rM(n,Yx,"startOverride"));void 0!==o&&t.numStartOverrides.set(`${e}:${a}`,o)}}}return t}(await(null==(o=b.file("word/numbering.xml"))?void 0:o.async("string"))??null),x=function(e){const t={adjustLineHeightInTable:!0};if(!e)return t;const n=(new Ox).parseFromString(e,"application/xml"),a=AM(lM(rM(n.documentElement,Yx,"defaultTabStop"),"val"));void 0!==a&&(t.defaultTabStop=a);const r=rM(n.documentElement,Yx,"autoHyphenation");if(r){const e=lM(r,"val");t.autoHyphenation="0"!==e&&"false"!==e}const o=rM(n.documentElement,Yx,"doNotHyphenateCaps");if(o){const e=lM(o,"val");t.doNotHyphenateCaps="0"!==e&&"false"!==e}const i=Number.parseInt(lM(rM(n.documentElement,Yx,"consecutiveHyphenLimit"),"val")??"",10);Number.isFinite(i)&&i>=0&&(t.consecutiveHyphenLimit=i);const l=AM(lM(rM(n.documentElement,Yx,"hyphenationZone"),"val"));void 0!==l&&(t.hyphenationZone=l),t.footnoteSettings=zM(rM(n.documentElement,Yx,"footnotePr")),t.endnoteSettings=zM(rM(n.documentElement,Yx,"endnotePr"));const s=rM(n.documentElement,Yx,"compat");if(s){const e=rM(s,Yx,"adjustLineHeightInTable");if(e){const n=lM(e,"val");t.adjustLineHeightInTable="0"!==n&&"false"!==n}const n=rM(s,Yx,"allowSpaceOfSameStyleInTable");if(n){const e=lM(n,"val");t.allowSpaceOfSameStyleInTable="0"!==e&&"false"!==e}}return t}(await(null==(i=b.file("word/settings.xml"))?void 0:i.async("string"))??null),M=await(null==(l=b.file("word/styles.xml"))?void 0:l.async("string"))??null,S=function(e){if(!e)return;const t=(new Ox).parseFromString(e,"application/xml").getElementsByTagNameNS(Yx,"fonts")[0];if(!t)return;const n=[];for(const a of tM(t,Yx,"font")){const e=lM(a,"name");if(!e)continue;const t={name:e},r=lM(rM(a,Yx,"altName"),"val");r&&(t.altName=r);const o=lM(rM(a,Yx,"family"),"val");o&&(t.family=o);const i=lM(rM(a,Yx,"pitch"),"val");i&&(t.pitch=i);const l=lM(rM(a,Yx,"charset"),"val");l&&(t.charset=l);const s=lM(rM(a,Yx,"panose1"),"val");s&&(t.panose1=s);const d=rM(a,Yx,"sig");if(d){const e={};for(let t=0;t<d.attributes.length;t+=1){const n=d.attributes[t];e[n.localName??n.name]=n.value}Object.keys(e).length>0&&(t.sig=e)}n.push(t)}return n.length>0?n:void 0}(await(null==(s=b.file("word/fontTable.xml"))?void 0:s.async("string"))??null),A=await(null==(d=b.file("word/theme/theme1.xml"))?void 0:d.async("string"))??null,I=null!==A,C=LM(A),T=function(e,t){if(!e)return;const n=(new Ox).parseFromString(e,"application/xml").documentElement;if(!n)return;const a=rM(n,Yx,"docDefaults"),r=rM(rM(a,Yx,"pPrDefault"),Yx,"pPr"),o=rM(rM(a,Yx,"rPrDefault"),Yx,"rPr"),i=r?{spacingBefore:0,spacingAfter:0,...pS(hS(r,t.colors))}:pS(hS(r,t.colors)),l=QM(o,t),s={};let d;for(const c of tM(n,Yx,"style")){const e=lM(c,"styleId"),n=lM(c,"type");if(!e||"paragraph"!==n&&"character"!==n&&"table"!==n)continue;const a=lM(rM(c,Yx,"name"),"val")??e,r=lM(rM(c,Yx,"basedOn"),"val")??void 0,o=lM(rM(c,Yx,"next"),"val")??void 0,u=uM(c,"qFormat"),p=uM(c,"semiHidden"),h=uM(c,"unhideWhenUsed"),f=lM(rM(c,Yx,"uiPriority"),"val"),g=null===f?NaN:Number(f),m=Number.isInteger(g)&&g>=0?g:void 0,b=pS(hS(rM(c,Yx,"pPr"),t.colors)),v=QM(rM(c,Yx,"rPr"),t);let y;if("table"===n){const n=rM(c,Yx,"tblPr"),a=e=>{const t=lM(rM(n,Yx,e),"val"),a=t?Number(t):Number.NaN;return Number.isFinite(a)&&a>0?Math.floor(a):void 0},r=a("tblStyleRowBandSize"),o=a("tblStyleColBandSize"),i={};for(const e of tM(c,Yx,"tblStylePr")){const n=lM(e,"type");if(!n)continue;const a=rM(e,Yx,"tcPr"),r=cS(a,0,t.colors),o=oS(rM(e,Yx,"tblPr")),l=KM(rM(a,Yx,"shd"),t.colors),s=QM(rM(e,Yx,"rPr"),t),d=jM(UM(rM(a,Yx,"tcBorders"))),c=hS(rM(e,Yx,"pPr"),t.colors),u=iS(rM(e,Yx,"trPr"));(l||s||d||c||u||r||o)&&(i[n]={...l?{shading:l}:{},...s?{textStyle:s}:{},...d?{borders:d}:{},...c?{paragraphStyle:c}:{},...u?{rowStyle:u}:{},...r?{cellStyle:r}:{},...o?{tableStyle:o}:{}})}y={...oS(n,e)??{styleId:e},...void 0!==r?{rowBandSize:r}:{},...void 0!==o?{colBandSize:o}:{},...Object.keys(i).length>0?{conditionalFormats:i}:{}}}const w="paragraph"===n&&cM(lM(c,"default"));w&&(d=e),s[e]={id:e,name:a,type:n,isDefault:cM(lM(c,"default")),basedOn:r,nextStyle:o,qFormat:u,uiPriority:m,semiHidden:p,unhideWhenUsed:h,paragraphStyle:"paragraph"===n&&w?ZM(i,b):b,textStyle:"paragraph"===n&&w?ZM(l,v):v,tableStyle:y}}return d&&s[d]?s:((i||l)&&(s.Normal={id:"Normal",name:"Normal",type:"paragraph",paragraphStyle:i,textStyle:l}),jM(s))}(M,C);null==(c=t.onProgress)||c.call(t,"parsing-document");const k=(new Ox).parseFromString(v,"application/xml"),R=k.documentElement?rM(k.documentElement,Yx,"background"):null,E=(null==R?void 0:R.getAttribute("w:color"))??(null==R?void 0:R.getAttributeNS(Yx,"color"))??null,L=k.getElementsByTagNameNS(Yx,"body")[0];if(!L)return Dn([at([{text:""}])]);const V={assets:{},byPath:new Map,nextId:1};let N=null;const z=[],P=[[]];let O=!1,q=null;const B=e=>{O&&(e.style={...e.style??{},pageBreakBefore:!0},O=!1),q&&"paragraph"===e.type&&(e.dropCap=q,q=null),P[P.length-1].push(e)};let W=0;for(let de=0;de<L.childNodes.length;de+=1){const e=L.childNodes[de];if((null==e?void 0:e.nodeType)===e.ELEMENT_NODE){const t=e;t.namespaceURI===Yx&&"sectPr"!==t.localName&&(W+=1)}}let F=0;const D=()=>{var e;F+=1,W>0&&(null==(e=t.onProgress)||e.call(t,"parsing-document",F/W))},H=LA(w,b,y,V,C);for(let de=0;de<L.childNodes.length;de+=1){const e=L.childNodes[de];if((null==e?void 0:e.nodeType)!==e.ELEMENT_NODE)continue;const t=e;if(t.namespaceURI===Yx){if("sectPr"===t.localName)z.push(mS(t)),P.push([]),O=!1;else if("p"===t.localName){const e=await SA(t,w,b,y,V,C,H);for(const t of e.paragraphs)B(t);e.dropCapFrame&&(q=e.dropCapFrame),e.pageBreakAfter&&(O=!0);const n=rM(t,Yx,"pPr"),a=n?rM(n,Yx,"sectPr"):null;a&&(z.push(mS(a)),P.push([]),O=!1),D()}else if("tbl"===t.localName)B(await kA(t,0,0,0,0,C,H)),D();else if("sdt"===t.localName){for(const e of await EA(t,w,b,y,V,C,H))B(e);D()}await hM(50,F)}}if(0===z.length){const e=rM(L,Yx,"sectPr");z.push(e?mS(e):{pageSettings:bS(L),headerRIds:{},footerRIds:{}})}null==(u=t.onProgress)||u.call(t,"parsing-headers-footers");const U=[],G=e=>Object.keys(e.headerRIds).length>0||Object.keys(e.footerRIds).length>0,j=z.filter(G).length;let Z=0;const K=()=>{var e;Z+=1,j>0&&(null==(e=t.onProgress)||e.call(t,"parsing-headers-footers",Z/j))};for(let de=0;de<z.length;de+=1){const e=z[de],t=P[de]??[];vS(t,e.docGridLinePitchPx,e.docGridMode,e.docGridType,x);const n=async t=>{var n,a;if(!t)return[];const r=y.get(t);if(!r)return[];let o=r.startsWith("/")?r.slice(1):r;o.startsWith("word/")||(o=`word/${r}`);const i=await(null==(n=b.file(o))?void 0:n.async("string")),l=await yM(b,o);if(!N&&i){const e=i.match(/<v:textpath[^>]*string="([^"]+)"/i),t=i.match(/<v:shape\b([^>]*)>/i),n=(null==t?void 0:t[1])??"",r=e=>{var t;return null==(t=n.match(new RegExp(`${e}="([^"]+)"`,"i")))?void 0:t[1]},o=e=>e.replace(/&quot;/g,'"').replace(/&apos;/g,"'").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&");if(null==e?void 0:e[1])N={kind:"text",text:o(e[1]),color:r("fillcolor"),opacity:Number(r("fillopacity"))||void 0,rotation:Number(r("rotation"))||void 0};else{const e=null==(a=i.match(/<v:imagedata[^>]*(?:r:id|id)="([^"]+)"/i))?void 0:a[1],t=e?l.get(e):void 0;if(t){const e=t.startsWith("../")?`word/${t.slice(3)}`:t,n=await bM(b,V,e);n&&(N={kind:"image",src:n,color:r("fillcolor"),opacity:Number(r("fillopacity"))||void 0,rotation:Number(r("rotation"))||void 0})}}}const s=await VA(i??null,w,b,l,V,C);return vS(s,e.docGridLinePitchPx,e.docGridMode,e.docGridType,x),s},a=await n(e.headerRIds.default),r=await n(e.headerRIds.first),o=await n(e.headerRIds.even),i=await n(e.footerRIds.default),l=await n(e.footerRIds.first),s=await n(e.footerRIds.even);G(e)&&K(),await hM(2,Z);const d=Dt(e.pageSettings??{width:816,height:1056,orientation:"portrait",margins:{top:96,right:96,bottom:96,left:96,header:48,footer:48,gutter:0}}),c=de>0?null==(p=z[de-1])?void 0:p.breakType:void 0,u=e.pageNumbering,h=e.verticalAlignment,f=e.bidi;U.push({id:`section:${de+1}`,blocks:t.length>0?t:[at([{text:""}])],pageSettings:d,...e.pageBorder?{pageBorder:e.pageBorder}:{},header:a.length>0?a:void 0,firstPageHeader:r.length>0?r:void 0,evenPageHeader:o.length>0?o:void 0,footer:i.length>0?i:void 0,firstPageFooter:l.length>0?l:void 0,evenPageFooter:s.length>0?s:void 0,...c?{breakType:c}:{},...u?{pageNumbering:u}:{},...h?{verticalAlignment:h}:{},...f?{bidi:f}:{}})}const X=await(null==(h=b.file("word/footnotes.xml"))?void 0:h.async("string"))??null,Y=X?await yM(b,"word/footnotes.xml"):new Map,J=await async function(e,t,n,a,r,o){const i=await zA("footnote",e,t,n,a,r,o);return{byDocxId:i.byDocxId,footnotes:i.notes,separator:i.separator,continuationSeparator:i.continuationSeparator}}(X,w,b,Y,V,C);x.footnoteSettings&&(J.footnotes.settings=x.footnoteSettings);const Q=Object.keys(J.footnotes.items).length>0||J.footnotes.separator||J.footnotes.continuationSeparator||J.footnotes.settings?J.footnotes:void 0;!function(e,t){const n=e=>{if("paragraph"!==e.type)for(const t of e.rows)for(const e of t.cells)for(const t of e.blocks)n(t);else e.runs.forEach((n,a)=>{const r=n,o=r.__importedFootnoteRef;if(!o)return;delete r.__importedFootnoteRef;const i=t.get(o.docxId);i&&(e.runs[a]={id:n.id,text:n.text,styles:n.styles,revision:n.revision,kind:"footnoteReference",footnoteReference:{footnoteId:i.id,...o.customMark?{customMark:o.customMark}:{}}})})};jA(e,n)}(U,J.byDocxId);const $=await(null==(f=b.file("word/endnotes.xml"))?void 0:f.async("string"))??null,_=$?await yM(b,"word/endnotes.xml"):new Map,ee=await async function(e,t,n,a,r,o){const i=await zA("endnote",e,t,n,a,r,o);return{byDocxId:i.byDocxId,endnotes:i.notes,separator:i.separator,continuationSeparator:i.continuationSeparator}}($,w,b,_,V,C);x.endnoteSettings&&(ee.endnotes.settings=x.endnoteSettings);const te=Object.keys(ee.endnotes.items).length>0||ee.endnotes.separator||ee.endnotes.continuationSeparator||ee.endnotes.settings?ee.endnotes:void 0;!function(e,t){const n=e=>{if("paragraph"!==e.type)for(const t of e.rows)for(const e of t.cells)for(const t of e.blocks)n(t);else e.runs.forEach((n,a)=>{const r=n,o=r.__importedEndnoteRef;if(!o)return;delete r.__importedEndnoteRef;const i=t.get(o.docxId);i&&(e.runs[a]={id:n.id,text:n.text,styles:n.styles,revision:n.revision,kind:"endnoteReference",endnoteReference:{endnoteId:i.id,...o.customMark?{customMark:o.customMark}:{}}})})};jA(e,n)}(U,ee.byDocxId);const ne=qA(U),ae=function(e,t){const n=new Set([...e.keys(),...t.keys()]);if(0===n.size)return;const a=[...n].sort((e,t)=>{const n=Number.parseInt(e,10),a=Number.parseInt(t,10);return Number.isNaN(n)||Number.isNaN(a)?e.localeCompare(t):n-a}),r={},o=[];for(const i of a){const n=e.get(i),a=t.get(i);if(!n&&!a)continue;const l=_e(),s=Number.parseInt(i,10);r[l]={id:l,author:(null==a?void 0:a.author)??"",...(null==a?void 0:a.initials)?{initials:a.initials}:{},...void 0!==(null==a?void 0:a.date)?{date:a.date}:{},...void 0!==(null==a?void 0:a.dateUtc)?{dateUtc:a.dateUtc}:{},...(null==a?void 0:a.resolved)?{resolved:a.resolved}:{},text:(null==a?void 0:a.text)??"",...(null==n?void 0:n.start)?{start:n.start}:{},...(null==n?void 0:n.end)?{end:n.end}:{},...Number.isNaN(s)?{}:{docxIdHint:s}},o.push(l)}return o.length>0?{items:r,order:o}:void 0}(WA(U),UA(await(null==(g=b.file("word/comments.xml"))?void 0:g.async("string"))??null,await(null==(m=b.file("word/commentsExtended.xml"))?void 0:m.async("string"))??null)),re=U.length>1||U.some(e=>{var t,n,a,r,o,i;return((null==(t=e.header)?void 0:t.length)??0)>0||((null==(n=e.firstPageHeader)?void 0:n.length)??0)>0||((null==(a=e.evenPageHeader)?void 0:a.length)??0)>0||((null==(r=e.footer)?void 0:r.length)??0)>0||((null==(o=e.firstPageFooter)?void 0:o.length)??0)>0||((null==(i=e.evenPageFooter)?void 0:i.length)??0)>0||void 0!==e.breakType||void 0!==e.pageNumbering||void 0!==e.verticalAlignment||void 0!==e.bidi||void 0!==e.pageBorder}),oe=Object.keys(V.assets).length>0,ie=e=>{var t,n;if(I){const a=(null==(n=null==(t=C.data)?void 0:t.name)?void 0:n.toLowerCase())??"",r=["oasis","office","facet","integral","ion","retrospect"].find(e=>a.includes(e));e.design={...e.design??{},...r?{themeId:r}:{},...C.data?{themeData:C.data}:{}}}E&&(e.design={...e.design??{},pageColor:`#${E.replace(/^#/,"")}`}),N&&(e.design={...e.design??{},watermark:N});const a={};void 0!==x.defaultTabStop&&(a.defaultTabStop=x.defaultTabStop),x.allowSpaceOfSameStyleInTable&&(a.allowSpaceOfSameStyleInTable=!0),x.autoHyphenation&&(a.autoHyphenation=!0),x.doNotHyphenateCaps&&(a.doNotHyphenateCaps=!0),void 0!==x.consecutiveHyphenLimit&&(a.consecutiveHyphenLimit=x.consecutiveHyphenLimit),void 0!==x.hyphenationZone&&(a.hyphenationZone=x.hyphenationZone),Object.keys(a).length>0&&(e.settings={...e.settings??{},...a}),S&&(e.fontTable=S);let r=e;return Q&&(r.footnotes=Q,r=Xh(r)),te&&(r.endnotes=te,r=function(e){const t=e.endnotes;if(!t||0===Object.keys(t.items).length)return e;const{sections:n,sectionsChanged:a,nextItems:r,itemsChanged:o}=Wh(e,t,Yh);return a||o?{...e,sections:a?n:e.sections,endnotes:{...t,items:o?r:t.items}}:e}(r)),ne&&(r.bookmarks=ne),ae&&(r.comments=ae),r};if(re){const e=Dn([]);return e.sections=U,1===U.length&&(e.pageSettings=U[0].pageSettings),T&&(e.styles=T),oe&&(e.assets=V.assets),ie(e)}const le=U[0],se=Dn((null==le?void 0:le.blocks.length)>0?le.blocks:[at([{text:""}])],null==le?void 0:le.pageSettings);return oe&&(se.assets=V.assets),T&&(se.styles=T),ie(se)}function jA(e,t){var n,a,r,o,i,l;for(const s of e)s.blocks.forEach(t),null==(n=s.header)||n.forEach(t),null==(a=s.firstPageHeader)||a.forEach(t),null==(r=s.evenPageHeader)||r.forEach(t),null==(o=s.footer)||o.forEach(t),null==(i=s.firstPageFooter)||i.forEach(t),null==(l=s.evenPageFooter)||l.forEach(t)}const ZA="[Content_Types].xml",KA="_rels/.rels";function XA(e){return e.replaceAll("&","&amp;").replaceAll('"',"&quot;").replaceAll("<","&lt;").replaceAll(">","&gt;")}function YA(e){return e.replaceAll("\\","/").replace(/^\/+/,"")}function JA(e){if(e===KA)return null;const t="/_rels/",n=e.lastIndexOf(t);if(n>=0&&e.endsWith(".rels")){return`${e.slice(0,n)}/${e.slice(n+7).slice(0,-5)}`}return e.startsWith("_rels/")&&e.endsWith(".rels")?e.slice(6,-5):void 0}function QA(e){var t;const n={defaults:{},overrides:{}};if(!e)return n;const a=(new Ox).parseFromString(e,"application/xml").documentElement;if(!a)return n;for(let r=0;r<a.childNodes.length;r+=1){const e=a.childNodes[r];if((null==e?void 0:e.nodeType)!==e.ELEMENT_NODE)continue;const o=e;if("Default"===o.localName){const e=null==(t=o.getAttribute("Extension"))?void 0:t.toLowerCase(),a=o.getAttribute("ContentType");e&&a&&(n.defaults[e]=a)}else if("Override"===o.localName){const e=o.getAttribute("PartName"),t=o.getAttribute("ContentType");e&&t&&(n.overrides[YA(e)]=t)}}return n}function $A(e){return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">${Object.entries(e.defaults).sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>`<Default Extension="${XA(e)}" ContentType="${XA(t)}"/>`).join("")}${Object.entries(e.overrides).sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>`<Override PartName="/${XA(YA(e))}" ContentType="${XA(t)}"/>`).join("")}</Types>`}function _A(e){if(!e)return[];const t=(new Ox).parseFromString(e,"application/xml").documentElement;if(!t)return[];const n=[];for(let a=0;a<t.childNodes.length;a+=1){const e=t.childNodes[a];if((null==e?void 0:e.nodeType)!==e.ELEMENT_NODE)continue;const r=e;if("Relationship"!==r.localName)continue;const o=r.getAttribute("Id"),i=r.getAttribute("Type"),l=r.getAttribute("Target");if(!o||!i||!l)continue;const s=r.getAttribute("TargetMode");n.push({id:o,type:i,target:l,targetMode:"External"===s?"External":"Internal"})}return n}function eI(e){return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">${e.map(e=>{const t="External"===e.targetMode?' TargetMode="External"':"";return`<Relationship Id="${XA(e.id)}" Type="${XA(e.type)}" Target="${XA(e.target)}"${t}/>`}).join("")}</Relationships>`}function tI(e,t,n){return t.map(t=>{if("External"===t.targetMode)return{...t,resolvedTarget:void 0};const a=function(e,t){const n=t.replaceAll("\\","/"),a=(null==e?void 0:e.includes("/"))?e.slice(0,e.lastIndexOf("/")+1):"",r=n.startsWith("/")?n.slice(1):`${a}${n}`,o=[];for(const i of r.split("/"))if(i&&"."!==i)if(".."!==i)o.push(i);else{if(0===o.length)return null;o.pop()}return o.join("/")}(e,t.target);return a?{...t,resolvedTarget:a}:(null==n||n(t),t)})}const nI="http://schemas.openxmlformats.org/wordprocessingml/2006/main",aI="http://schemas.openxmlformats.org/package/2006/relationships",rI="http://schemas.openxmlformats.org/officeDocument/2006/relationships",oI="http://schemas.microsoft.com/office/word/2010/wordml";function iI(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}function lI(e,t){return Number.isFinite(e)?Math.max(0,Math.round(e/dt*gt)):t}function sI(e){return null!=e&&Number.isFinite(e)?Math.round(e/dt*gt):null}function dI(e){return null!=e&&Number.isFinite(e)?Math.max(0,Math.round(20*e)):null}function cI(e,t="000000"){return Vg(e)??t}function uI(e){return`<w:shd w:val="clear" w:color="auto" w:fill="${cI(e,"FFFFFF")}"/>`}function pI(e){if("end"===e.kind)return`<w:bookmarkEnd w:id="${e.wId}"/>`;const t=(void 0!==e.colFirst?` w:colFirst="${e.colFirst}"`:"")+(void 0!==e.colLast?` w:colLast="${e.colLast}"`:"");return`<w:bookmarkStart w:id="${e.wId}" w:name="${iI(e.name??"")}"${t}/>`}function hI(e){switch(e.kind){case"start":return`<w:commentRangeStart w:id="${e.wId}"/>`;case"end":return`<w:commentRangeEnd w:id="${e.wId}"/>`;case"reference":return`<w:r><w:commentReference w:id="${e.wId}"/></w:r>`}}const fI=`xmlns:w="${nI}" xmlns:w14="${oI}" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" xmlns:w16du="http://schemas.microsoft.com/office/word/2023/wordml/word16du"`;function gI(e){const t=e.comments.map(({comment:e,wId:t,paraId:n})=>{const a=void 0!==e.date?` w:date="${new Date(e.date).toISOString().replace(/\.\d{3}Z$/,"Z")}"`:"",r=void 0!==e.dateUtc?` w16du:dateUtc="${new Date(e.dateUtc).toISOString().replace(/\.\d{3}Z$/,"Z")}"`:"",o=e.initials?` w:initials="${iI(e.initials)}"`:"";return`<w:comment w:id="${t}" w:author="${iI(e.author)}"${a}${r}${o}><w:p w14:paraId="${n}">${i=e.text,`<w:r>${i.split("\n").map((e,t)=>`${t>0?"<w:br/>":""}<w:t xml:space="preserve">${iI(e)}</w:t>`).join("")}</w:r>`}</w:p></w:comment>`;var i}).join("");return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:comments ${fI}>${t}</w:comments>`}function mI(e){return void 0!==e&&Number.isSafeInteger(e)&&e>=1}function bI(e){let t=1;for(const a of Object.values(e))mI(a.docxId)&&(t=Math.max(t,a.docxId+1));const n=new Set;return e=>{if(mI(e.docxId)&&!n.has(e.docxId))return n.add(e.docxId),e.docxId;for(;n.has(t);)t+=1;const a=t;return n.add(a),t+=1,a}}function vI(e,t="000000"){if("none"===e.type||e.width<=0)return'w:val="nil"/>';return`w:val="${"dotted"===e.type?"dotted":"dashed"===e.type?"dashed":"single"}" w:sz="${Math.max(1,Math.round(8*e.width))}" w:space="0" w:color="${cI(e.color,t)}"/>`}function yI(e){const t=[["top",e.borderTop],["left",e.borderLeft],["bottom",e.borderBottom],["right",e.borderRight],["between",e.borderBetween],["bar",e.borderBar]].filter(e=>null!=e[1]).map(([e,t])=>`<w:${e} ${vI(t)}`);return t.length>0?`<w:pBdr>${t.join("")}</w:pBdr>`:""}const wI="6F6F6F";function xI(e){return e?Object.entries(e).map(([e,t])=>` ${e}="${iI(t)}"`).join(""):""}function MI(e){const t=/^\d+$/.test(e.id)?e.id:String(Array.from(e.id).reduce((e,t)=>31*e+t.charCodeAt(0)>>>0,0)),n=Number.isFinite(e.date)?new Date(e.date).toISOString():new Date(0).toISOString();return`w:id="${t}" w:author="${iI(e.author)}" w:date="${n}"`}function SI(e){if(!e||0===Object.keys(e).length)return"";const t=$M.filter(([,t])=>void 0!==e[t]).map(([t,n])=>`w:${t}="${e[n]?"1":"0"}"`).join(" ");return t?`<w:cnfStyle ${t}/>`:""}function AI(e,t){return void 0===t?"":t?`<w:${e}/>`:`<w:${e} w:val="0"/>`}function II(e,t,n={}){if("number"==typeof t&&Number.isFinite(t))return`<w:${e} w:w="${dI(t)??0}" w:type="dxa"/>`;if("string"==typeof t){const n=t.trim();if("auto"===n)return`<w:${e} w:w="0" w:type="auto"/>`;if(n.endsWith("%")){const t=Number.parseFloat(n.slice(0,-1));if(Number.isFinite(t))return`<w:${e} w:w="${Math.round(50*t)}" w:type="pct"/>`}const a=Number.parseFloat(n);if(Number.isFinite(a))return`<w:${e} w:w="${Math.round(a)}" w:type="dxa"/>`}return n.fallbackAuto?`<w:${e} w:w="0" w:type="auto"/>`:""}function CI(e,t=!0){return II("tblW",e,{fallbackAuto:t})}function TI(e){return vI(e??{width:.75,type:"solid",color:`#${wI}`},wI)}function kI(e){if(!e)return"";const t=[],n=(e,n)=>{void 0!==n&&Number.isFinite(n)&&t.push(`<w:${e} w:w="${dI(n)??0}" w:type="dxa"/>`)};return n("top",e.top),n("left",e.left),n("bottom",e.bottom),n("right",e.right),n("start",e.start),n("end",e.end),t.length>0?`<w:tblCellMar>${t.join("")}</w:tblCellMar>`:""}function RI(e,t){var n,a,r,o,i,l,s,d,c,u,p;const h=Math.max(1,Math.floor(e.colSpan??1)),f=[],g=SI(e.conditionalStyle);g&&f.push(g);const m=II("tcW",(null==(n=e.style)?void 0:n.width)??t);m&&f.push(m),h>1&&f.push(`<w:gridSpan w:val="${h}"/>`),"restart"===e.vMerge?f.push('<w:vMerge w:val="restart"/>'):"continue"===e.vMerge&&f.push("<w:vMerge/>"),(null==(a=e.style)?void 0:a.shading)&&f.push(uI(e.style.shading));const b=AI("noWrap",null==(r=e.style)?void 0:r.noWrap);b&&f.push(b);const v=AI("tcFitText",null==(o=e.style)?void 0:o.fitText);if(v&&f.push(v),(null==(i=e.style)?void 0:i.headers)&&f.push(`<w:headers w:val="${iI(e.style.headers)}"/>`),null==(l=e.style)?void 0:l.verticalAlign){const t="middle"===e.style.verticalAlign?"center":e.style.verticalAlign;f.push(`<w:vAlign w:val="${t}"/>`)}(null==(s=e.style)?void 0:s.textDirection)&&f.push(`<w:textDirection w:val="${e.style.textDirection}"/>`),f.push(function(e){const t=e.style,n=null==t?void 0:t.padding,a=dI(n??(null==t?void 0:t.paddingTop)??0),r=dI(n??(null==t?void 0:t.paddingBottom)??0);return`<w:tcMar><w:top w:w="${a??0}" w:type="dxa"/><w:left w:w="${dI(n??(null==t?void 0:t.paddingLeft)??5.4)??0}" w:type="dxa"/><w:bottom w:w="${r??0}" w:type="dxa"/><w:right w:w="${dI(n??(null==t?void 0:t.paddingRight)??5.4)??0}" w:type="dxa"/>${void 0!==(null==t?void 0:t.paddingStart)?`<w:start w:w="${dI(t.paddingStart)??0}" w:type="dxa"/>`:""}${void 0!==(null==t?void 0:t.paddingEnd)?`<w:end w:w="${dI(t.paddingEnd)??0}" w:type="dxa"/>`:""}</w:tcMar>`}(e)),f.push(function(e){var t,n,a,r,o,i,l,s;const d=[`<w:top ${TI(null==(t=e.style)?void 0:t.borderTop)}`,`<w:left ${TI(null==(n=e.style)?void 0:n.borderLeft)}`,`<w:bottom ${TI(null==(a=e.style)?void 0:a.borderBottom)}`,`<w:right ${TI(null==(r=e.style)?void 0:r.borderRight)}`];return(null==(o=e.style)?void 0:o.borderStart)&&d.push(`<w:start ${TI(e.style.borderStart)}`),(null==(i=e.style)?void 0:i.borderEnd)&&d.push(`<w:end ${TI(e.style.borderEnd)}`),(null==(l=e.style)?void 0:l.borderTopLeftToBottomRight)&&d.push(`<w:tl2br ${TI(e.style.borderTopLeftToBottomRight)}`),(null==(s=e.style)?void 0:s.borderTopRightToBottomLeft)&&d.push(`<w:tr2bl ${TI(e.style.borderTopRightToBottomLeft)}`),`<w:tcBorders>${d.join("")}</w:tcBorders>`}(e));const y=AI("hideMark",null==(d=e.style)?void 0:d.hideMark);if(y&&f.push(y),null==(c=e.style)?void 0:c.propertyRevision){const t=e.style.propertyRevision,n=RI({...e,style:t.previous});f.push(`<w:tcPrChange ${MI(t)}>${n}</w:tcPrChange>`)}if(null==(u=e.style)?void 0:u.revision){const t=e.style.revision,n="insert"===t.type?"cellIns":"delete"===t.type?"cellDel":"cellMerge",a="merge"===t.type?`${(null==(p=t.previous)?void 0:p.vMerge)?` w:vMergeOrig="${"restart"===t.previous.vMerge?"rest":"cont"}"`:""}${e.vMerge?` w:vMerge="${"restart"===e.vMerge?"rest":"cont"}"`:""}`:"";f.push(`<w:${n} ${MI(t)}${a}/>`)}return f.length>0?`<w:tcPr>${f.join("")}</w:tcPr>`:""}function EI(e,t){if(void 0===t||!Number.isFinite(t))return"";const n=Math.floor(t);return n>0?`<w:${e} w:val="${n}"/>`:""}function LI(e,t){const n="number"==typeof e?dI(e):"string"==typeof e?Number.parseFloat(e):null,a=null!==n&&Number.isFinite(n);if(!a&&!t)return"";const r=[];return a&&r.push(`w:val="${Math.round(n)}"`),r.push(`w:hRule="${t??"atLeast"}"`),`<w:trHeight ${r.join(" ")}/>`}function VI(e){if(!e)return"";const t=[],n=EI("gridBefore",e.gridBefore);n&&t.push(n);const a=EI("gridAfter",e.gridAfter);a&&t.push(a);const r=II("wBefore",e.widthBefore);r&&t.push(r);const o=II("wAfter",e.widthAfter);o&&t.push(o);const i=II("tblCellSpacing",e.cellSpacing);i&&t.push(i);const l=LI(e.height,e.heightRule);l&&t.push(l);const s=AI("cantSplit",e.cantSplit);s&&t.push(s);const d=AI("hidden",e.hidden);d&&t.push(d);const c=AI("tblHeader",e.isHeader);return c&&t.push(c),e.align&&t.push(`<w:jc w:val="${e.align}"/>`),t.length>0?`<w:trPr>${t.join("")}</w:trPr>`:""}function NI(e){var t,n,a,r,o,i,l,s,d,c,u;const p=[],h=SI(e.conditionalStyle);h&&p.push(h);const f=EI("gridBefore",null==(t=e.style)?void 0:t.gridBefore);f&&p.push(f);const g=EI("gridAfter",null==(n=e.style)?void 0:n.gridAfter);g&&p.push(g);const m=II("wBefore",null==(a=e.style)?void 0:a.widthBefore);m&&p.push(m);const b=II("wAfter",null==(r=e.style)?void 0:r.widthAfter);b&&p.push(b);const v=II("tblCellSpacing",null==(o=e.style)?void 0:o.cellSpacing);v&&p.push(v);const y=function(e){var t,n;return LI(null==(t=e.style)?void 0:t.height,null==(n=e.style)?void 0:n.heightRule)}(e);y&&p.push(y);const w=AI("cantSplit",null==(i=e.style)?void 0:i.cantSplit);w&&p.push(w),((null==(l=e.style)?void 0:l.isHeader)??e.isHeader)&&p.push("<w:tblHeader/>");const x=AI("hidden",null==(s=e.style)?void 0:s.hidden);if(x&&p.push(x),(null==(d=e.style)?void 0:d.align)&&p.push(`<w:jc w:val="${e.style.align}"/>`),null==(c=e.style)?void 0:c.propertyRevision){const t=e.style.propertyRevision;p.push(`<w:trPrChange ${MI(t)}>${VI(t.previous)}</w:trPrChange>`)}if((null==(u=e.style)?void 0:u.revision)&&"merge"!==e.style.revision.type){const t=e.style.revision,n="insert"===t.type?"ins":"del";p.push(`<w:${n} ${MI(t)}/>`)}return p.length>0?`<w:trPr>${p.join("")}</w:trPr>`:""}function zI(e){const t=null==e?void 0:e.borders;if(!t)return"";const n=_M.map(([e,n])=>[e,t[n]]).filter(e=>!!e[1]).map(([e,t])=>`<w:${e} ${vI(t)}`).join("");return n?`<w:tblBorders>${n}</w:tblBorders>`:""}function PI(e){var t,n,a,r,o,i,l,s,d,c,u,p,h,f;const g=[];if((null==(t=e.style)?void 0:t.styleId)&&g.push(`<w:tblStyle w:val="${iI(e.style.styleId)}"/>`),null==(n=e.style)?void 0:n.tblLook){const t=e.style.tblLook;g.push(`<w:tblLook w:firstRow="${t.firstRow?"1":"0"}" w:lastRow="${t.lastRow?"1":"0"}" w:firstColumn="${t.firstCol?"1":"0"}" w:lastColumn="${t.lastCol?"1":"0"}" w:noHBand="${t.noHBand?"1":"0"}" w:noVBand="${t.noVBand?"1":"0"}"/>`)}(null==(a=e.style)?void 0:a.altTitle)&&g.push(`<w:tblCaption w:val="${iI(e.style.altTitle)}"/>`),(null==(r=e.style)?void 0:r.altDescription)&&g.push(`<w:tblDescription w:val="${iI(e.style.altDescription)}"/>`);const m=function(e){if(!e||0===Object.keys(e).length)return"";const t=e=>{const t=dI(e);return null===t?void 0:String(t)},n={horzAnchor:e.horizontalAnchor,vertAnchor:e.verticalAnchor,tblpX:t(e.x),tblpY:t(e.y),tblpXSpec:e.xAlign,tblpYSpec:e.yAlign,topFromText:t(e.distanceTop),rightFromText:t(e.distanceRight),bottomFromText:t(e.distanceBottom),leftFromText:t(e.distanceLeft)};return`<w:tblpPr ${Object.entries(n).filter(e=>void 0!==e[1]).map(([e,t])=>`w:${e}="${iI(t)}"`).join(" ")}/>`}(null==(o=e.style)?void 0:o.floating);m&&g.push(m);const b=e.gridCols&&e.gridCols.length>0?e.gridCols.reduce((e,t)=>e+t,0):void 0;g.push(CI((null==(i=e.style)?void 0:i.width)??b)),(null==(l=e.style)?void 0:l.align)&&g.push(`<w:jc w:val="${e.style.align}"/>`);const v=II("tblCellSpacing",null==(s=e.style)?void 0:s.cellSpacing);v&&g.push(v);const y=kI(null==(d=e.style)?void 0:d.defaultCellMargins);y&&g.push(y);const w=zI(e.style);w&&g.push(w);const x=II("tblInd",null==(c=e.style)?void 0:c.indentLeft);x&&g.push(x),g.push(`<w:tblLayout w:type="${(null==(u=e.style)?void 0:u.layout)??"fixed"}"/>`);const M=AI("bidiVisual",null==(p=e.style)?void 0:p.bidiVisual);if(M&&g.push(M),(null==(h=e.style)?void 0:h.tblOverlap)&&g.push(`<w:tblOverlap w:val="${iI(e.style.tblOverlap)}"/>`),null==(f=e.style)?void 0:f.revision){const t=e.style.revision,n=PI({...e,style:t.previous});g.push(`<w:tblPrChange ${MI(t)}>${n}</w:tblPrChange>`)}return`<w:tblPr>${g.join("")}</w:tblPr>`}function OI(e,t){const n=el(e),a=new Map(n.map(e=>[`${e.rowIndex}:${e.cellIndex}`,e])),r=e.rows.map((n,r)=>{const o=n.cells.map((n,o)=>{const i=a.get(`${r}:${o}`),l=i&&e.gridCols?e.gridCols.slice(i.visualColumnIndex,i.visualColumnIndex+Math.max(1,i.colSpan)).reduce((e,t)=>e+t,0):void 0,s=(n.blocks.length>0?n.blocks:[{id:"",type:"paragraph",runs:[{id:"",text:"",kind:"text"}]}]).map(e=>t(e,n)).join(""),d="continue"===n.vMerge?"<w:p/>":s;return`<w:tc${xI(n.extAttributes)}>${RI(n,l)}${d}</w:tc>`}).join("");return`<w:tr${xI(n.extAttributes)}>${function(e,t){if(!e&&!t)return"";const n=[];void 0!==(null==e?void 0:e.width)&&n.push(CI(e.width)),(null==e?void 0:e.align)&&n.push(`<w:jc w:val="${e.align}"/>`);const a=II("tblCellSpacing",null==e?void 0:e.cellSpacing);a&&n.push(a);const r=II("tblInd",null==e?void 0:e.indentLeft);r&&n.push(r);const o=e?zI(e):"";o&&n.push(o),(null==e?void 0:e.layout)&&n.push(`<w:tblLayout w:type="${e.layout}"/>`);const i=kI(null==e?void 0:e.defaultCellMargins);return i&&n.push(i),t&&n.push(t),n.length>0?`<w:tblPrEx>${n.join("")}</w:tblPrEx>`:""}(n.propertyExceptions,n.tblPrExChangeXml)}${NI(n)}${o}</w:tr>`}).join(""),o=e.gridCols?`<w:tblGrid>${e.gridCols.map(e=>`<w:gridCol w:w="${dI(e)??0}"/>`).join("")}${e.gridRevision?`<w:tblGridChange ${MI(e.gridRevision)}><w:tblGrid>${e.gridRevision.previous.map(e=>`<w:gridCol w:w="${dI(e)??0}"/>`).join("")}</w:tblGrid></w:tblGridChange>`:""}</w:tblGrid>`:"";return`<w:tbl>${PI(e)}${o}${r}</w:tbl>`}const qI='xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml"';function BI(e){if(!(void 0!==e.alias||void 0!==e.tag||void 0!==e.id||void 0!==e.lock||void 0!==e.appearance||void 0!==e.showingPlcHdr||void 0!==e.temporary||void 0!==e.color||void 0!==e.placeholderDocPart||void 0!==e.dataBinding||void 0!==e.subtype||void 0!==e.repeatingSectionProperties||(e.unknownXml??"").length>0))return"<w:sdtPr/>";let t="";return void 0!==e.alias&&(t+=`<w:alias w:val="${iI(e.alias)}"/>`),void 0!==e.tag&&(t+=`<w:tag w:val="${iI(e.tag)}"/>`),void 0!==e.id&&(t+=`<w:id w:val="${iI(e.id)}"/>`),void 0!==e.lock&&(t+=`<w:lock w:val="${iI(e.lock)}"/>`),void 0!==e.placeholderDocPart&&(t+=`<w:placeholder><w:docPart w:val="${iI(e.placeholderDocPart)}"/></w:placeholder>`),void 0!==e.dataBinding&&(t+=function(e){const t=[];void 0!==e.prefixMappings&&t.push(`w:prefixMappings="${iI(e.prefixMappings)}"`);void 0!==e.xpath&&t.push(`w:xpath="${iI(e.xpath)}"`);void 0!==e.storeItemID&&t.push(`w:storeItemID="${iI(e.storeItemID)}"`);return t.length>0?`<w:dataBinding ${t.join(" ")}/>`:""}(e.dataBinding)),void 0!==e.temporary&&(t+=`<w:temporary w:val="${e.temporary?"true":"false"}"/>`),void 0!==e.subtype&&(t+=function(e,t){switch(e.kind){case"text":return"<w:text/>";case"richText":return"<w:richText/>";case"picture":return"<w:picture/>";case"group":return"<w:group/>";case"equation":return"<w:equation/>";case"citation":return"<w:citation/>";case"bibliography":return"<w:bibliography/>";case"repeatingSection":return function(e){let t="";void 0!==(null==e?void 0:e.sectionTitle)&&(t+=`<w15:sectionTitle w15:val="${iI(e.sectionTitle)}"/>`);void 0!==(null==e?void 0:e.doNotAllowInsertDeleteSection)&&(t+=`<w15:doNotAllowInsertDeleteSection w15:val="${e.doNotAllowInsertDeleteSection?"1":"0"}"/>`);return t?`<w15:repeatingSection ${qI}>${t}</w15:repeatingSection>`:`<w15:repeatingSection ${qI}/>`}(t);case"repeatingSectionItem":return`<w15:repeatingSectionItem ${qI}/>`;case"comboBox":case"dropDownList":{const t=(e.listItems??[]).map(WI).join(""),n=void 0!==e.lastSelectedValue?`<w:lastSelectedValue w:val="${iI(e.lastSelectedValue)}"/>`:"";return`<w:${e.kind}>${t}${n}</w:${e.kind}>`}case"date":{const t=void 0!==e.fullDate?` w:fullDate="${iI(e.fullDate)}"`:"";let n="";return void 0!==e.dateFormat&&(n+=`<w:dateFormat w:val="${iI(e.dateFormat)}"/>`),void 0!==e.lid&&(n+=`<w:lid w:val="${iI(e.lid)}"/>`),void 0!==e.calendar&&(n+=`<w:calendar w:val="${iI(e.calendar)}"/>`),void 0!==e.storeMappedDataAs&&(n+=`<w:storeMappedDataAs w:val="${iI(e.storeMappedDataAs)}"/>`),`<w:date${t}>${n}</w:date>`}case"checkbox":{let t="";if(void 0!==e.checked&&(t+=`<w14:checked w14:val="${e.checked?"1":"0"}"/>`),void 0!==e.checkedStateFont||void 0!==e.checkedStateChar){t+=`<w14:checkedState${void 0!==e.checkedStateFont?` w14:font="${iI(e.checkedStateFont)}"`:""}${void 0!==e.checkedStateChar?` w14:char="${iI(e.checkedStateChar)}"`:""}/>`}if(void 0!==e.uncheckedStateFont||void 0!==e.uncheckedStateChar){t+=`<w14:uncheckedState${void 0!==e.uncheckedStateFont?` w14:font="${iI(e.uncheckedStateFont)}"`:""}${void 0!==e.uncheckedStateChar?` w14:char="${iI(e.uncheckedStateChar)}"`:""}/>`}return`<w14:checkbox>${t}</w14:checkbox>`}default:return e}}(e.subtype,e.repeatingSectionProperties)),void 0!==e.appearance&&(t+=`<w:appearance w:val="${iI(e.appearance)}"/>`),void 0!==e.showingPlcHdr&&(t+=`<w:showingPlcHdr w:val="${e.showingPlcHdr?"true":"false"}"/>`),void 0!==e.color&&(t+=`<w:color w:val="${iI(e.color)}"/>`),e.unknownXml&&(t+=e.unknownXml),`<w:sdtPr>${t}</w:sdtPr>`}function WI(e){return`<w:listItem${void 0!==e.displayText?` w:displayText="${iI(e.displayText)}"`:""}${void 0!==e.value?` w:value="${iI(e.value)}"`:""}/>`}function FI(e,t){const n=[];for(let a=0;a<e.childNodes.length;a+=1){const r=e.childNodes[a];(null==r?void 0:r.nodeType)===r.ELEMENT_NODE&&r.namespaceURI===nI&&r.localName===t&&n.push(r)}return n}function DI(e,t){const n=(new Ox).parseFromString(`<oasis:root xmlns:oasis="urn:oasis:docx" xmlns:w="${nI}" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml">${e}</oasis:root>`,"application/xml").documentElement;if(n)for(let a=0;a<n.childNodes.length;a+=1){const e=n.childNodes[a];if((null==e?void 0:e.nodeType)===e.ELEMENT_NODE&&e.namespaceURI===nI&&e.localName===t)return e}}function HI(e,t){const n=e.ownerDocument;if(!n)return null;const a=n.createElementNS(nI,"w:sdt"),r=DI(BI(t.sdtPr),"sdtPr");if(r&&a.appendChild(r.cloneNode(!0)),t.sdtEndPrXml){const e=DI(t.sdtEndPrXml,"sdtEndPr");e&&a.appendChild(e.cloneNode(!0))}const o=n.createElementNS(nI,"w:sdtContent");return a.appendChild(o),{sdt:a,content:o}}function UI(e,t){var n;let a=0;for(;a<t.length;){const r=t[a].wrappers[0];if(!r){a+=1;continue}let o=a+1;for(;o<t.length&&(null==(n=t[o].wrappers[0])?void 0:n.groupId)===r.groupId;)o+=1;const i=HI(e,r);if(!i){a=o;continue}e.insertBefore(i.sdt,t[a].element);const l=[];for(let e=a;e<o;e+=1){const n=t[e];i.content.appendChild(n.element),l.push({element:n.element,wrappers:n.wrappers.slice(1)})}UI(i.content,l),a=o}}function GI(e){const t=[];for(let n=0;n<e.childNodes.length;n+=1){const a=e.childNodes[n];(null==a?void 0:a.nodeType)===a.ELEMENT_NODE&&t.push(a)}return t}function jI(e){return`${e.namespaceURI??""}\0${function(e){return e.localName??e.tagName}(e)}`}function ZI(e,t,n){const a=jI(e[t]);let r=0;for(let o=0;o<t;o+=1)jI(e[o])===a&&(r+=1);return n.filter(e=>jI(e)===a)[r]}function KI(e,t){!function(e,t){for(let n=0;n<e.attributes.length;n+=1){const a=e.attributes[n];if(!a||a.namespaceURI===nI||a.namespaceURI===rI)continue;const r=a.localName??a.name;(a.namespaceURI?t.hasAttributeNS(a.namespaceURI,r):t.hasAttribute(a.name))||(a.namespaceURI?t.setAttributeNS(a.namespaceURI,a.name,a.value):t.setAttribute(a.name,a.value))}}(e,t);const n=GI(e),a=GI(t);n.forEach((e,r)=>{const o=ZI(n,r,a);if(e.namespaceURI===nI)return void(o&&KI(e,o));if(o)return void KI(e,o);const i=n.slice(r+1).map((e,t)=>ZI(n,r+t+1,a)).find(e=>Boolean(e));t.insertBefore(e.cloneNode(!0),i??null)})}const XI=new Set(["tblStyle","tblpPr","tblOverlap","bidiVisual","tblStyleRowBandSize","tblStyleColBandSize","tblW","jc","tblCellSpacing","tblInd","tblBorders","tblLayout","tblCellMar","tblLook","tblCaption","tblDescription","tblPrChange"]),YI=new Set(["gridCol","tblGridChange"]),JI=new Set(["tblW","jc","tblCellSpacing","tblInd","tblBorders","tblLayout","tblCellMar","tblPrExChange"]),QI=new Set(["cnfStyle","gridBefore","gridAfter","wBefore","wAfter","cantSplit","trHeight","tblHeader","tblCellSpacing","jc","hidden","ins","del","trPrChange"]),$I=new Set(["cnfStyle","tcW","gridSpan","hMerge","vMerge","tcBorders","shd","noWrap","tcMar","textDirection","tcFitText","vAlign","hideMark","headers","cellIns","cellDel","cellMerge","tcPrChange"]);function _I(e){const t=[];for(let n=0;n<e.childNodes.length;n+=1){const a=e.childNodes[n];(null==a?void 0:a.nodeType)===a.ELEMENT_NODE&&t.push(a)}return t}function eC(e){return e.localName??e.tagName}function tC(e){return`${e.namespaceURI??""}\0${eC(e)}`}function nC(e,t){const n=(new Ox).parseFromString(e,"application/xml").documentElement;return(null==n?void 0:n.namespaceURI)===nI&&eC(n)===t?n:void 0}function aC(e,t,n,a,r){var o;if(!e||function(e){return Boolean(e&&_S(e.xml))}(e))return t;if(e.semanticSignature===r)return e.xml;const i=nC(e.xml,n),l=function(e,t){if(e){const n=nC(e,t);if(n)return n}return(new Ox).parseFromString(`<w:${t} xmlns:w="${nI}"/>`,"application/xml").documentElement}(t,n);if(!i||!l)return t;!function(e,t){for(let n=0;n<e.attributes.length;n+=1){const a=e.attributes.item(n);if(!a||a.namespaceURI===rI)continue;const r=a.localName??a.name;(a.namespaceURI?t.hasAttributeNS(a.namespaceURI,r):t.hasAttribute(a.name))||(a.namespaceURI?t.setAttributeNS(a.namespaceURI,a.name,a.value):t.setAttribute(a.name,a.value))}}(i,l);const s=_I(i),d=_I(l),c=new Map;for(const f of d){const e=tC(f),t=c.get(e)??[];t.push(f),c.set(e,t)}const u=new Map;for(const f of s){const e=tC(f),t=u.get(e)??0;u.set(e,t+1);const n=null==(o=c.get(e))?void 0:o[t];n&&KI(f,n)}const p=new Set(d.map(tC)),h=s.filter(e=>!(e.namespaceURI===nI&&a.has(eC(e))||p.has(tC(e))));for(const f of h){const e=s.indexOf(f),t=s.slice(e+1).find(e=>p.has(tC(e))),n=t?_I(l).find(e=>tC(e)===tC(t))??null:null;l.insertBefore(f.cloneNode(!0),n)}return t||function(e){for(let t=0;t<e.attributes.length;t+=1){const n=e.attributes.item(t);if(n&&"http://www.w3.org/2000/xmlns/"!==n.namespaceURI)return!0}return!1}(l)||0!==_I(l).length?(new Px).serializeToString(l):""}function rC(e,t,n,a){return aC({xml:e,semanticSignature:"source"},t,n,a,"generated")}function oC(e){const t=[];for(let n=0;n<e.childNodes.length;n+=1){const a=e.childNodes[n];(null==a?void 0:a.nodeType)===a.ELEMENT_NODE&&t.push(a)}return t}function iC(e,t){return oC(e).filter(e=>e.namespaceURI===nI&&e.localName===t)}function lC(e,t){return iC(e,t)[0]}function sC(e,t){const n=(new Ox).parseFromString(`<oasis:root xmlns:oasis="urn:oasis:docx" xmlns:w="${nI}">${e}</oasis:root>`,"application/xml").documentElement;if(!n)return;return n?oC(n).find(e=>e.namespaceURI===nI&&e.localName===t):void 0}function dC(e){return e?(new Px).serializeToString(e):""}function cC(e){return/\br:(?:id|embed|link)\s*=/.test(e)}function uC(e){const t=new Map;let n=0;for(const a of e)a.namespaceURI===nI&&("tblPr"===a.localName||"tblGrid"===a.localName?t.set(a,a.localName):"tr"===a.localName&&(t.set(a,`tr:${n}`),n+=1));return t}function pC(e,t){var n;const a=null==(n=vA(e))?void 0:n.xml;if(!a)return;const r=sC(a,"tbl");if(!r)return;!function(e,t){for(let n=0;n<e.attributes.length;n+=1){const a=e.attributes.item(n);if(!a||a.namespaceURI===rI)continue;const r=a.localName??a.name;(a.namespaceURI?t.hasAttributeNS(a.namespaceURI,r):t.hasAttribute(a.name))||(a.namespaceURI?t.setAttributeNS(a.namespaceURI,a.name,a.value):t.setAttribute(a.name,a.value))}}(r,t);const o=oC(r),i=oC(t),l=o.filter(e=>e.namespaceURI===nI&&"tr"===e.localName),s=i.filter(e=>e.namespaceURI===nI&&"tr"===e.localName);if(l.length!==s.length)return;const d=uC(o),c=new Map([...uC(i)].map(([e,t])=>[t,e]));for(let u=0;u<o.length;u+=1){const e=o[u];if(d.has(e))continue;if(cC(dC(e)))continue;const n=o.slice(u+1).map(e=>d.get(e)).find(e=>Boolean(e)),a=n?c.get(n)??null:null;t.insertBefore(e.cloneNode(!0),a)}}function hC(e,t,n,a,r){if(!n)return void(t&&e.removeChild(t));const o=sC(n,a);o&&(t?e.replaceChild(o.cloneNode(!0),t):e.insertBefore(o.cloneNode(!0),r))}function fC(e,t){const n=lC(t,"tblPr"),a=lC(t,"tblGrid"),r=lC(t,"tr")??null;hC(t,n,function(e,t){var n;return aC(null==(n=vA(e))?void 0:n.tableProperties,t,"tblPr",XI,uA(e))}(e,dC(n)),"tblPr",a??r);const o=lC(t,"tblGrid");hC(t,o,function(e,t){var n;return aC(null==(n=vA(e))?void 0:n.tableGrid,t,"tblGrid",YI,pA(e))}(e,dC(o)),"tblGrid",lC(t,"tr")??null)}function gC(e,t){const n=iC(t,"tr");n.length===e.rows.length&&n.forEach((t,n)=>{const a=e.rows[n],r=lC(t,"tblPrEx"),o=lC(t,"trPr"),i=lC(t,"tc")??null;hC(t,r,function(e,t){var n;return aC(null==(n=mA(e))?void 0:n.propertyExceptions,t,"tblPrEx",JI,fA(e))}(a,dC(r)),"tblPrEx",o??i);const l=lC(t,"trPr"),s=function(e,t){var n;return aC(null==(n=mA(e))?void 0:n.rowProperties,t,"trPr",QI,hA(e))}(a,dC(l));hC(t,l,s.replace(/(<w:jc\b[^>]*\bw:val=")(?<value>start|end)("[^>]*\/?>)/g,(e,t,n,a)=>`${t}${"start"===n?"left":"right"}${a}`),"trPr",lC(t,"tc")??null);const d=iC(t,"tc");d.length===a.cells.length&&d.forEach((e,t)=>{const n=a.cells[t],r=lC(e,"tcPr");hC(e,r,function(e,t){var n;return aC(null==(n=function(e){return e.ooxmlSource}(e))?void 0:n.cellProperties,t,"tcPr",$I,gA(e))}(n,dC(r)),"tcPr",lC(e,"p")??lC(e,"tbl")??null)})})}function mC(e){for(const t of iC(e,"tr"))for(const e of iC(t,"tc")){for(const a of iC(e,"tbl"))mC(a);const t=oC(e),n=t[t.length-1];if((null==n?void 0:n.namespaceURI)===nI&&"tbl"===n.localName){const t=e.ownerDocument;t&&e.appendChild(t.createElementNS(nI,"w:p"))}}}function bC(e,t){const n=OI(e,t),a=sC(n,"tbl");if(!a)return n;pC(e,a),fC(e,a),gC(e,a),mC(a),function(e,t){const n=FI(t,"tr");if(n.length===e.rows.length){for(let t=0;t<n.length;t+=1){const a=n[t],r=e.rows[t],o=FI(a,"tc");o.length===r.cells.length&&UI(a,o.map((e,t)=>({element:e,wrappers:r.cells[t].sdtWrappers??[]})))}UI(t,n.map((t,n)=>({element:t,wrappers:e.rows[n].sdtWrappers??[]})))}}(e,a);return(new Px).serializeToString(a).replace(`<w:tbl xmlns:w="${nI}"`,"<w:tbl")}function vC(e){if(!e||0===e.length)return"";const t=e.map(e=>{const t=dI(e.position);if(null===t)return"";const n=[`w:val="${e.type}"`,`w:pos="${t}"`];return e.leader&&"none"!==e.leader?n.push(`w:leader="${e.leader}"`):"none"===e.leader&&n.push('w:leader="none"'),`<w:tab ${n.join(" ")}/>`}).filter(Boolean);return t.length>0?`<w:tabs>${t.join("")}</w:tabs>`:""}function yC(e){const t=[];e.framePrXml&&t.push(e.framePrXml),e.suppressLineNumbers&&t.push("<w:suppressLineNumbers/>"),e.suppressAutoHyphens&&t.push("<w:suppressAutoHyphens/>"),e.bidi&&t.push("<w:bidi/>"),!1===e.kinsoku&&t.push('<w:kinsoku w:val="0"/>'),!1===e.wordWrap&&t.push('<w:wordWrap w:val="0"/>'),!1===e.overflowPunct&&t.push('<w:overflowPunct w:val="0"/>'),e.topLinePunct&&t.push("<w:topLinePunct/>"),!1===e.autoSpaceDE&&t.push('<w:autoSpaceDE w:val="0"/>'),!1===e.autoSpaceDN&&t.push('<w:autoSpaceDN w:val="0"/>'),!1===e.adjustRightInd&&t.push('<w:adjustRightInd w:val="0"/>'),e.textAlignment&&t.push(`<w:textAlignment w:val="${e.textAlignment}"/>`),e.textboxTightWrap&&t.push(`<w:textboxTightWrap w:val="${e.textboxTightWrap}"/>`),null!=e.divId&&t.push(`<w:divId w:val="${e.divId}"/>`);const n=(a=e.conditionalStyle)?`<w:cnfStyle w:val="${$M.map(([,e])=>a[e]?"1":"0").join("")}"/>`:"";var a;return n&&t.push(n),t}function wC(e){const t=[];if(e.align&&t.push(`<w:jc w:val="${e.align}"/>`),void 0!==e.spacingBefore||void 0!==e.spacingAfter||void 0!==e.lineHeight){const n=[],a=sI(e.spacingBefore),r=sI(e.spacingAfter),o=void 0!==e.lineHeight&&null!==e.lineHeight&&Number.isFinite(e.lineHeight),i="exact"===e.lineRule||"atLeast"===e.lineRule,l=o?i?lI(e.lineHeight,0):Math.round(240*e.lineHeight):null;null!==a&&n.push(`w:before="${a}"`),null!==r&&n.push(`w:after="${r}"`),null!==l&&n.push(`w:line="${l}"`),null!==l&&i&&n.push(`w:lineRule="${e.lineRule}"`),n.length>0&&t.push(`<w:spacing ${n.join(" ")}/>`)}if(void 0!==e.indentLeft||void 0!==e.indentRight||void 0!==e.indentFirstLine||void 0!==e.indentHanging){const n=[],a=sI(e.indentLeft),r=sI(e.indentRight),o=sI(e.indentFirstLine),i=sI(e.indentHanging);null!==a&&n.push(`w:left="${a}"`),null!==r&&n.push(`w:right="${r}"`),null!==o&&n.push(`w:firstLine="${o}"`),null!==i&&n.push(`w:hanging="${i}"`),n.length>0&&t.push(`<w:ind ${n.join(" ")}/>`)}const n=vC(e.tabs);n&&t.push(n),e.pageBreakBefore&&t.push("<w:pageBreakBefore/>"),e.keepWithNext&&t.push("<w:keepNext/>"),e.keepLinesTogether&&t.push("<w:keepLines/>"),!1===e.widowControl&&t.push('<w:widowControl w:val="0"/>'),e.contextualSpacing&&t.push("<w:contextualSpacing/>"),e.mirrorIndents&&t.push("<w:mirrorIndents/>");const a=yI(e);return a&&t.push(a),e.shading&&t.push(uI(e.shading)),e.textDirection&&t.push(`<w:textDirection w:val="${e.textDirection}"/>`),null!=e.outlineLevel&&t.push(`<w:outlineLvl w:val="${e.outlineLevel}"/>`),t.push(...yC(e)),t.length>0?`<w:pPr>${t.join("")}</w:pPr>`:""}function xC(e,t,n,a){var r,o;const i=[],l=function(e,t){const n=sn(e.style,t);return{align:n.align,spacingBefore:n.spacingBefore,spacingAfter:n.spacingAfter,contextualSpacing:n.contextualSpacing,lineHeight:n.lineHeight,lineRule:n.lineRule,indentLeft:n.indentLeft,indentRight:n.indentRight,indentFirstLine:n.indentFirstLine,indentHanging:n.indentHanging,mirrorIndents:n.mirrorIndents,pageBreakBefore:n.pageBreakBefore,keepWithNext:n.keepWithNext,keepLinesTogether:n.keepLinesTogether,widowControl:n.widowControl,shading:n.shading,borderTop:n.borderTop,borderRight:n.borderRight,borderBottom:n.borderBottom,borderLeft:n.borderLeft,tabs:n.tabs,textDirection:n.textDirection,outlineLevel:n.outlineLevel,suppressLineNumbers:n.suppressLineNumbers,suppressAutoHyphens:n.suppressAutoHyphens,bidi:n.bidi,kinsoku:n.kinsoku,wordWrap:n.wordWrap,overflowPunct:n.overflowPunct,topLinePunct:n.topLinePunct,autoSpaceDE:n.autoSpaceDE,autoSpaceDN:n.autoSpaceDN,adjustRightInd:n.adjustRightInd,textAlignment:n.textAlignment,textboxTightWrap:n.textboxTightWrap,divId:n.divId,conditionalStyle:n.conditionalStyle,borderBetween:n.borderBetween,borderBar:n.borderBar,framePrXml:n.framePrXml}}(e,n),s=(null==(r=e.style)?void 0:r.align)??(null==a?void 0:a.align)??l.align;if((null==(o=e.style)?void 0:o.styleId)&&i.push(`<w:pStyle w:val="${iI(e.style.styleId)}"/>`),s&&i.push(`<w:jc w:val="${s}"/>`),void 0!==l.spacingBefore||void 0!==l.spacingAfter||void 0!==l.lineHeight){const e=[],t=sI(l.spacingBefore),n=sI(l.spacingAfter),a=void 0!==l.lineHeight&&null!==l.lineHeight&&Number.isFinite(l.lineHeight),r="exact"===l.lineRule||"atLeast"===l.lineRule,o=a?r?lI(l.lineHeight,0):Math.round(240*l.lineHeight):null;null!==t&&e.push(`w:before="${t}"`),null!==n&&e.push(`w:after="${n}"`),null!==o&&e.push(`w:line="${o}"`),null!==o&&r&&e.push(`w:lineRule="${l.lineRule}"`),e.length>0&&i.push(`<w:spacing ${e.join(" ")}/>`)}if(void 0!==l.indentLeft||void 0!==l.indentRight||void 0!==l.indentFirstLine||void 0!==l.indentHanging){const e=[],t=sI(l.indentLeft),n=sI(l.indentRight),a=sI(l.indentFirstLine),r=sI(l.indentHanging);null!==t&&e.push(`w:left="${t}"`),null!==n&&e.push(`w:right="${n}"`),null!==a&&e.push(`w:firstLine="${a}"`),null!==r&&e.push(`w:hanging="${r}"`),e.length>0&&i.push(`<w:ind ${e.join(" ")}/>`)}const d=vC(l.tabs);d&&i.push(d),l.pageBreakBefore&&i.push("<w:pageBreakBefore/>"),l.keepWithNext&&i.push("<w:keepNext/>"),l.keepLinesTogether&&i.push("<w:keepLines/>"),!1===l.widowControl&&i.push('<w:widowControl w:val="0"/>'),l.contextualSpacing&&i.push("<w:contextualSpacing/>"),l.mirrorIndents&&i.push("<w:mirrorIndents/>");const c=yI(l);c&&i.push(c),l.shading&&i.push(uI(l.shading)),l.textDirection&&i.push(`<w:textDirection w:val="${l.textDirection}"/>`),null!=l.outlineLevel&&i.push(`<w:outlineLvl w:val="${l.outlineLevel}"/>`),i.push(...yC(l));const u=t.get(e.id);return u&&i.push(`<w:numPr><w:ilvl w:val="${u.level}"/><w:numId w:val="${u.numId}"/></w:numPr>`),i.length>0?`<w:pPr>${i.join("")}</w:pPr>`:""}const MC={black:[0,0,0],blue:[0,0,255],cyan:[0,255,255],green:[0,128,0],magenta:[255,0,255],red:[255,0,0],yellow:[255,255,0],white:[255,255,255],darkBlue:[0,0,139],darkCyan:[0,139,139],darkGreen:[0,100,0],darkMagenta:[139,0,139],darkRed:[139,0,0],darkYellow:[184,134,11],darkGray:[169,169,169],lightGray:[211,211,211]},SC={ffff00:"yellow",fef08a:"yellow",ff0000:"red","00ff00":"green","0000ff":"blue","00ffff":"cyan",ff00ff:"magenta","000000":"black",ffffff:"white"},AC="http://schemas.openxmlformats.org/markup-compatibility/2006";function IC(e){return`<w14:solidFill><w14:srgbClr w14:val="${cI(e)}"/></w14:solidFill>`}function CC(e){if("solid"===e.type)return IC(e.color);return`<w14:gradFill><w14:gsLst>${e.stops.map(e=>{const t=cI(e.color);return`<w14:gs w14:pos="${Math.round(e.position*mt)}"><w14:srgbClr w14:val="${t}">${void 0!==e.alpha?`<w14:alpha w14:val="${Math.round(e.alpha*mt)}"/>`:""}</w14:srgbClr></w14:gs>`}).join("")}</w14:gsLst><w14:lin w14:ang="${Math.round((e.angle??0)*bt)}" w14:scaled="0"/></w14:gradFill>`}function TC(e,t){return`<w14:srgbClr w14:val="${cI(e)}">${void 0!==t?`<w14:alpha w14:val="${Math.round(t*mt)}"/>`:""}</w14:srgbClr>`}function kC(e){return`<mc:AlternateContent xmlns:mc="${AC}"><mc:Choice Requires="w14">${e}</mc:Choice><mc:Fallback/></mc:AlternateContent>`}function RC(e){return null!=e&&Number.isFinite(e)?Math.round(20*e):null}const EC=Ng;function LC(e){if(!e)return"";const t=[];if(e.bold&&t.push("<w:b/>","<w:bCs/>"),e.italic&&t.push("<w:i/>","<w:iCs/>"),e.underline){const n=e.underlineStyle??"single",a=e.underlineColor?` w:color="${iI(e.underlineColor.replace(/^#/,""))}"`:"";t.push(`<w:u w:val="${iI(n)}"${a}/>`)}if(e.strike&&t.push("<w:strike/>"),e.doubleStrike&&t.push("<w:dstrike/>"),e.outline&&t.push("<w:outline/>"),e.shadow&&t.push("<w:shadow/>"),e.emboss&&t.push("<w:emboss/>"),e.imprint&&t.push("<w:imprint/>"),e.smallCaps&&t.push("<w:smallCaps/>"),e.allCaps&&t.push("<w:caps/>"),e.hidden&&t.push("<w:vanish/>"),e.noProof&&t.push("<w:noProof/>"),e.webHidden&&t.push("<w:webHidden/>"),e.specVanish&&t.push("<w:specVanish/>"),!1===e.snapToGrid&&t.push('<w:snapToGrid w:val="0"/>'),e.textEffect&&t.push(`<w:effect w:val="${iI(e.textEffect)}"/>`),e.textBorder&&t.push(`<w:bdr ${vI(e.textBorder)}`),void 0!==e.characterScale&&null!==e.characterScale&&Number.isFinite(e.characterScale)&&t.push(`<w:w w:val="${Math.max(1,Math.round(e.characterScale))}"/>`),void 0!==e.characterSpacing&&null!==e.characterSpacing){const n=RC(e.characterSpacing);null!==n&&t.push(`<w:spacing w:val="${n}"/>`)}void 0!==e.baselineShift&&null!==e.baselineShift&&Number.isFinite(e.baselineShift)&&t.push(`<w:position w:val="${Math.round(2*e.baselineShift)}"/>`),void 0!==e.kerningThreshold&&null!==e.kerningThreshold&&Number.isFinite(e.kerningThreshold)&&t.push(`<w:kern w:val="${Math.max(0,Math.round(2*e.kerningThreshold))}"/>`);const n=function(e){switch(e){case"none":return"none";case"standard":return"standard";case"contextual":return"contextual";case"historical":return"historical";case"standardContextual":return"standardContextual";default:return null}}(e.ligatures);n&&t.push(`<w14:ligatures w14:val="${n}"/>`);const a=function(e){switch(e){case"proportional":return"proportional";case"tabular":return"tabular";default:return null}}(e.numberSpacing);a&&t.push(`<w14:numSpacing w14:val="${a}"/>`);const r=function(e){switch(e){case"lining":return"lining";case"oldStyle":return"oldStyle";default:return null}}(e.numberForm);r&&t.push(`<w14:numForm w14:val="${r}"/>`);const o="number"!=typeof(i=e.stylisticSet)||i<1||i>20?null:(1<<i-1).toString(16).toUpperCase().padStart(8,"0");var i;if(o&&t.push(`<w14:stylisticSets w14:val="${o}"/>`),e.contextualAlternates&&t.push('<w14:cntxtAlts w14:val="1"/>'),e.superscript?t.push('<w:vertAlign w:val="superscript"/>'):e.subscript&&t.push('<w:vertAlign w:val="subscript"/>'),e.fontFamily&&t.push(`<w:rFonts w:ascii="${iI(e.fontFamily)}" w:hAnsi="${iI(e.fontFamily)}" w:cs="${iI(e.fontFamily)}"/>`),void 0!==e.fontSize&&null!==e.fontSize){const n=function(e){return null!=e&&Number.isFinite(e)?Math.round(e/dt*72*2):null}(e.fontSize);null!==n&&t.push(`<w:sz w:val="${n}"/>`,`<w:szCs w:val="${n}"/>`)}if(e.textFill){const n="solid"===e.textFill.type?e.textFill.color:e.color;t.push(function(e,t){const n=CC(e),a=cI(t??"000000");return`<mc:AlternateContent xmlns:mc="${AC}"><mc:Choice Requires="w14"><w14:textFill>${n}</w14:textFill></mc:Choice><mc:Fallback><w:color w:val="${a}"/></mc:Fallback></mc:AlternateContent>`}(e.textFill,n??null))}else e.color&&t.push(`<w:color w:val="${iI(e.color.replace(/^#/,""))}"/>`);if(e.textOutline&&t.push(function(e){const t=Math.round(Math.max(0,e.widthPt)*ft),n=e.fill?CC(e.fill):e.color?IC(e.color):"";return`<mc:AlternateContent xmlns:mc="${AC}"><mc:Choice Requires="w14"><w14:textOutline w14:w="${t}" w14:cap="flat" w14:cmpd="sng" w14:algn="ctr">`+n+"</w14:textOutline></mc:Choice><mc:Fallback><w:outline/></mc:Fallback></mc:AlternateContent>"}(e.textOutline)),e.textShadow&&t.push(function(e){const t=Math.round(Math.max(0,e.blurPt)*ft),n=Math.round(Math.max(0,e.distPt)*ft),a=Math.round(e.dirDeg*bt),r=TC(e.color,e.alpha);return`<mc:AlternateContent xmlns:mc="${AC}"><mc:Choice Requires="w14"><w14:shadow w14:blurRad="${t}" w14:dist="${n}" w14:dir="${a}" w14:sx="100000" w14:sy="100000" w14:kx="0" w14:ky="0" w14:algn="ctr">`+r+"</w14:shadow></mc:Choice><mc:Fallback><w:shadow/></mc:Fallback></mc:AlternateContent>"}(e.textShadow)),e.glow&&t.push(function(e){const t=Math.round(Math.max(0,e.radiusPt)*ft),n=TC(e.color,e.alpha);return`<mc:AlternateContent xmlns:mc="${AC}"><mc:Choice Requires="w14"><w14:glow w14:rad="${t}">${n}</w14:glow></mc:Choice><mc:Fallback/></mc:AlternateContent>`}(e.glow)),e.reflection&&t.push(function(e){const t=Math.round(Math.max(0,e.blurPt)*ft),n=Math.round(e.startAlpha*mt),a=Math.round(e.startPos*mt),r=Math.round(e.endAlpha*mt),o=Math.round(e.endPos*mt),i=Math.round(Math.max(0,e.distPt)*ft);return`<mc:AlternateContent xmlns:mc="${AC}"><mc:Choice Requires="w14"><w14:reflection w14:blurRad="${t}" w14:stA="${n}" w14:stPos="${a}" w14:endA="${r}" w14:endPos="${o}" w14:dist="${i}" w14:dir="5400000" w14:fadeDir="5400000" w14:sx="100000" w14:sy="-100000" w14:kx="0" w14:ky="0" w14:algn="bl"/></mc:Choice><mc:Fallback/></mc:AlternateContent>`}(e.reflection)),e.scene3dXml&&t.push(kC(e.scene3dXml)),e.props3dXml&&t.push(kC(e.props3dXml)),e.highlight&&t.push(`<w:highlight w:val="${iI(function(e){if(e in MC)return e;const t=e.trim().replace(/^#/,"").toLowerCase(),n=SC[t];if(n)return n;const a=EC(e);if(!a)return"yellow";let r="yellow",o=Number.POSITIVE_INFINITY;for(const[i,l]of Object.entries(MC)){const e=(l[0]-a[0])**2+(l[1]-a[1])**2+(l[2]-a[2])**2;e<o&&(o=e,r=i)}return r}(e.highlight))}"/>`),e.shading&&t.push(uI(e.shading)),void 0!==e.fitText&&null!==e.fitText&&Number.isFinite(e.fitText)){const n=RC(e.fitText);null!==n&&n>0&&t.push(`<w:fitText w:val="${n}"/>`)}if(e.rtl&&t.push("<w:rtl/>"),e.complexScript&&t.push("<w:cs/>"),e.emphasisMark&&t.push(`<w:em w:val="${iI(e.emphasisMark)}"/>`),e.language){const n=[];e.language.value&&n.push(`w:val="${iI(e.language.value)}"`),e.language.eastAsia&&n.push(`w:eastAsia="${iI(e.language.eastAsia)}"`),e.language.bidi&&n.push(`w:bidi="${iI(e.language.bidi)}"`),n.length>0&&t.push(`<w:lang ${n.join(" ")}/>`)}return t.length>0?`<w:rPr>${t.join("")}</w:rPr>`:""}function VC(e){if(0===e.length)return"";var t;return`<w:t${/^\s|\s$/.test(t=e)||t.includes(" ")?' xml:space="preserve"':""}>${iI(e)}</w:t>`}function NC(e){if(0===e.length)return"<w:t></w:t>";let t="",n="";for(const a of e)"\n"!==a?"\t"!==a?"‑"!==a?"­"!==a?n+=a:(t+=VC(n),n="",t+="<w:softHyphen/>"):(t+=VC(n),n="",t+="<w:noBreakHyphen/>"):(t+=VC(n),n="",t+="<w:tab/>"):(t+=VC(n),n="",t+="<w:br/>");return t+=VC(n),t||"<w:t></w:t>"}function zC(e,t){return e??t?"1":"0"}function PC(e,t,n){const a=iI((null==t?void 0:t.relativeFrom)??n);if(null==t?void 0:t.align)return`<wp:${e} relativeFrom="${a}"><wp:align>${iI(t.align)}</wp:align></wp:${e}>`;return`<wp:${e} relativeFrom="${a}"><wp:posOffset>${(null==t?void 0:t.offset)??0}</wp:posOffset></wp:${e}>`}function OC(e){if(!e||e.length<3)return"";const t=e=>Math.round(21600*Math.min(1,Math.max(0,e))),n=(e,n)=>`<wp:${n} x="${t(e.x)}" y="${t(e.y)}"/>`,a=e[0];return`<wp:wrapPolygon edited="0">${[n(a,"start"),...e.slice(1).map(e=>n(e,"lineTo")),n(a,"lineTo")].join("")}</wp:wrapPolygon>`}function qC(e){const{cx:t,cy:n,floating:a,docPrId:r,docPrName:o,altAttr:i,graphicXml:l}=e,s=iI(o);if(!a)return`<w:drawing><wp:inline distT="0" distB="0" distL="0" distR="0"><wp:extent cx="${t}" cy="${n}"/><wp:effectExtent l="0" t="0" r="0" b="0"/><wp:docPr id="${r}" name="${s}"${i}/>${l}</wp:inline></w:drawing>`;const d=a.distT??0,c=a.distB??0,u=a.distL??0,p=a.distR??0,h=PC("positionH",a.positionH,"column"),f=PC("positionV",a.positionV,"paragraph"),g=function(e,t){switch(e){case"square":return'<wp:wrapSquare wrapText="bothSides"/>';case"tight":{const e=OC(t);return e?`<wp:wrapTight wrapText="bothSides">${e}</wp:wrapTight>`:'<wp:wrapTight wrapText="bothSides"/>'}case"through":{const e=OC(t);return e?`<wp:wrapThrough wrapText="bothSides">${e}</wp:wrapThrough>`:'<wp:wrapThrough wrapText="bothSides"/>'}case"topAndBottom":return"<wp:wrapTopAndBottom/>";default:return"<wp:wrapNone/>"}}(a.wrap,e.wrapPolygon);return`<w:drawing><wp:anchor distT="${d}" distB="${c}" distL="${u}" distR="${p}" simplePos="${zC(a.simplePos,!1)}" relativeHeight="${a.relativeHeight??0}" behindDoc="${zC(a.behindDoc,!1)}" locked="${zC(a.locked,!1)}" layoutInCell="${zC(a.layoutInCell,!0)}" allowOverlap="${zC(a.allowOverlap,!0)}"><wp:simplePos x="0" y="0"/>${h}${f}<wp:extent cx="${t}" cy="${n}"/><wp:effectExtent l="0" t="0" r="0" b="0"/>${g}<wp:docPr id="${r}" name="${s}"${i}/>${l}</wp:anchor></w:drawing>`}function BC(e,t,n,a){const r=n.images.find(e=>e.rId===t);if(!r)return null;const o=(parseInt(t.replace(/\D+/g,""),10)||0)+1,i=void 0!==r.alt?` descr="${iI(r.alt)}" title="${iI(r.alt)}"`:"",l=function(e){let t="";if(e.rotation){const n=Math.round(e.rotation*bt);0!==n&&(t+=` rot="${n}"`)}return e.flipH&&(t+=' flipH="1"'),e.flipV&&(t+=' flipV="1"'),t}(r),s=function(e){if(!e)return"";const t=e=>e?Math.round(e*mt):0,n=t(e.left),a=t(e.top),r=t(e.right),o=t(e.bottom);return 0===n&&0===a&&0===r&&0===o?"":`<a:srcRect l="${n}" t="${a}" r="${r}" b="${o}"/>`}(r.crop),d=(c=r.border)?`<a:ln${void 0!==c.widthPt?` w="${Math.round(c.widthPt*ft)}"`:""}><a:solidFill><a:srgbClr val="${iI(c.color.replace(/^#/,""))}"/></a:solidFill>${c.dash?`<a:prstDash val="${c.dash}"/>`:""}</a:ln>`:"";var c;const u="tile"===r.fillMode?"<a:tile/>":"<a:stretch><a:fillRect/></a:stretch>",p="linked"===r.kind?`r:link="${t}"`:`r:embed="${t}"`,h=function(e){if(!e)return'<a:prstGeom prst="rect"><a:avLst/></a:prstGeom>';if(e.rawXml&&!e.adjustments)return e.rawXml;const t=Object.entries(e.adjustments??{}).map(([e,t])=>`<a:gd name="${iI(e)}" fmla="val ${Number.isFinite(t)?t:0}"/>`).join(""),n=t?`<a:avLst>${t}</a:avLst>`:"<a:avLst/>";return`<a:prstGeom prst="${iI(e.preset)}">${n}</a:prstGeom>`}(r.cropShape),f=function(e,t,n,a){return qC({cx:e.cx,cy:e.cy,floating:e.floating,docPrId:t,docPrName:"Picture",altAttr:n,graphicXml:a,wrapPolygon:e.wrapPolygon})}(r,o,i,`<a:graphic xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"><a:graphicData uri="http://schemas.openxmlformats.org/drawingml/2006/picture"><pic:pic xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture"><pic:nvPicPr><pic:cNvPr id="0" name="Picture"${i}/><pic:cNvPicPr/></pic:nvPicPr><pic:blipFill><a:blip ${p} xmlns:r="${rI}"/>${s}${u}</pic:blipFill><pic:spPr><a:xfrm${l}><a:off x="0" y="0"/><a:ext cx="${r.cx}" cy="${r.cy}"/></a:xfrm>${h}${d}</pic:spPr></pic:pic></a:graphicData></a:graphic>`);return`<w:r>${a}${f}</w:r>`}function WC(e,t,n,a,r,o){const i=Math.round(t.width*ht),l=Math.round(t.height*ht),s=n.textBoxDocPrIds.get(e.id)??1,d=t.name??"Text Box",c=void 0!==t.alt?` descr="${iI(t.alt)}" title="${iI(t.alt)}"`:"",u=function(e,t,n,a,r,o){const i=e.shape,l=iI((null==i?void 0:i.preset)??"rect"),s=e.rotation?Math.round(e.rotation*bt):0,d=0!==s?` rot="${s}"`:"",c=(null==i?void 0:i.fill)?`<a:solidFill><a:srgbClr val="${iI(i.fill.replace(/^#/,""))}"/></a:solidFill>`:"";let u="";((null==i?void 0:i.borderColor)||void 0!==(null==i?void 0:i.borderWidthPt))&&(u=`<a:ln${void 0!==(null==i?void 0:i.borderWidthPt)?` w="${Math.round(i.borderWidthPt*ft)}"`:""}>${(null==i?void 0:i.borderColor)?`<a:solidFill><a:srgbClr val="${iI(i.borderColor.replace(/^#/,""))}"/></a:solidFill>`:""}<a:miter lim="800000"/></a:ln>`);const p=e.body,h=['rot="0"',`vert="${iI((null==p?void 0:p.vert)??"horz")}"`];h.push(`wrap="${iI((null==p?void 0:p.wrap)??"square")}"`),void 0!==(null==p?void 0:p.paddingLeft)&&h.push(`lIns="${Math.round(p.paddingLeft*ht)}"`),void 0!==(null==p?void 0:p.paddingTop)&&h.push(`tIns="${Math.round(p.paddingTop*ht)}"`),void 0!==(null==p?void 0:p.paddingRight)&&h.push(`rIns="${Math.round(p.paddingRight*ht)}"`),void 0!==(null==p?void 0:p.paddingBottom)&&h.push(`bIns="${Math.round(p.paddingBottom*ht)}"`),h.push(`anchor="${iI((null==p?void 0:p.anchor)??"t")}"`),h.push('anchorCtr="0"');const f=(null==p?void 0:p.autoFit)?"<a:spAutoFit/>":"",g=e.blocks.length>0,m=g?o(e.blocks,a,r):"";return'<a:graphic xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"><a:graphicData uri="http://schemas.microsoft.com/office/word/2010/wordprocessingShape"><wps:wsp>'+(g?'<wps:cNvSpPr txBox="1"><a:spLocks noChangeArrowheads="1"/></wps:cNvSpPr>':"<wps:cNvSpPr/>")+`<wps:spPr bwMode="auto"><a:xfrm${d}><a:off x="0" y="0"/><a:ext cx="${t}" cy="${n}"/></a:xfrm><a:prstGeom prst="${l}"><a:avLst/></a:prstGeom>`+c+u+"</wps:spPr>"+(g?`<wps:txbx><w:txbxContent>${m}</w:txbxContent></wps:txbx>`:"")+`<wps:bodyPr ${h.join(" ")}>${f}</wps:bodyPr></wps:wsp></a:graphicData></a:graphic>`}(t,i,l,n,a,o);return`<w:r>${r}${qC({cx:i,cy:l,floating:t.floating,docPrId:s,docPrName:d,altAttr:c,graphicXml:u})}</w:r>`}const FC={footnote:"FootnoteReference",endnote:"EndnoteReference"};function DC(e){return`<w:r><w:rPr><w:rStyle w:val="${FC[e]}"/><w:vertAlign w:val="superscript"/></w:rPr><w:${e}Ref/></w:r>`}function HC(e,t,n,a){if(!t)return null;const r="footnote"===e?a.footnoteIdMap:a.endnoteIdMap,o=null==r?void 0:r.get(t.noteId);if(void 0===o)return null;const i={...n??{},superscript:!0},l=t.customMark?' w:customMarkFollows="1"':"",s=t.customMark?`<w:t xml:space="preserve">${iI(t.customMark)}</w:t>`:"";return`<w:r>${LC(i)}<w:${e}Reference${l} w:id="${o}"/>${s}</w:r>`}function UC(e,t){return void 0===t?"":` m:${e}="${iI(String(t))}"`}function GC(e){return e.map(jC).join("")}function jC(e){switch(e.kind){case"text":return function(e){const t=e.style;return`<m:r>${t?`<m:rPr>${t.bold?"<m:b/>":""}${t.italic?"<m:i/>":""}${t.normalText?"<m:nor/>":""}${t.script?`<m:sty m:val="${iI(t.script)}"/>`:""}</m:rPr>`:""}<m:t xml:space="preserve">${iI(e.value)}</m:t></m:r>`}(e);case"fraction":return`<m:f>${!1===e.bar?'<m:fPr><m:type m:val="noBar"/></m:fPr>':""}<m:num>${GC(e.numerator)}</m:num><m:den>${GC(e.denominator)}</m:den></m:f>`;case"radical":return e.degree?`<m:rad><m:deg>${GC(e.degree)}</m:deg><m:e>${GC(e.radicand)}</m:e></m:rad>`:`<m:rad><m:e>${GC(e.radicand)}</m:e></m:rad>`;case"script":{const t=e.subscript&&e.superscript?"sSubSup":e.subscript?"sSub":"sSup";return`<m:${t}><m:e>${GC(e.base)}</m:e>${e.subscript?`<m:sub>${GC(e.subscript)}</m:sub>`:""}${e.superscript?`<m:sup>${GC(e.superscript)}</m:sup>`:""}</m:${t}>`}case"delimiter":return`<m:d><m:dPr>${UC("begChr",e.begin)}${UC("endChr",e.end)}${UC("sepChr",e.separator)}${!1===e.grow?'<m:grow m:val="0"/>':""}</m:dPr>${e.children.map(e=>`<m:e>${GC(e)}</m:e>`).join("")}</m:d>`;case"accent":return`<m:acc><m:accPr><m:chr${UC("val",e.accent)}/></m:accPr><m:e>${GC(e.children)}</m:e></m:acc>`;case"nary":return`<m:nary><m:naryPr><m:chr${UC("val",e.operator)}/>${!1===e.grow?'<m:grow m:val="0"/>':""}</m:naryPr>${e.subscript?`<m:sub>${GC(e.subscript)}</m:sub>`:""}${e.superscript?`<m:sup>${GC(e.superscript)}</m:sup>`:""}<m:e>${GC(e.children)}</m:e></m:nary>`;case"limit":return"low"===e.operator?`<m:limLow><m:e>${GC(e.base)}</m:e><m:lim>${GC(e.limit)}</m:lim></m:limLow>`:`<m:limUpp><m:e>${GC(e.base)}</m:e><m:lim>${GC(e.limit)}</m:lim></m:limUpp>`;case"matrix":return`<m:m>${e.rows.map(e=>`<m:mr>${e.map(e=>`<m:e>${GC(e)}</m:e>`).join("")}</m:mr>`).join("")}</m:m>`;case"box":return`<m:${e.hidden?"phant":e.border?"borderBox":"box"}><m:e>${GC(e.children)}</m:e></m:${e.hidden?"phant":e.border?"borderBox":"box"}>`;case"group":return GC(e.children);case"raw":return e.xml}}const ZC="http://schemas.openxmlformats.org/markup-compatibility/2006",KC=new Set(["t","tab","br","cr","noBreakHyphen","softHyphen"]),XC=new Set([...KC,"drawing","pict","sym","fldChar","instrText","footnoteReference","endnoteReference","separator","continuationSeparator"]),YC=new Set(["rStyle","rFonts","b","bCs","i","iCs","caps","smallCaps","strike","dstrike","outline","shadow","emboss","imprint","noProof","snapToGrid","vanish","webHidden","color","spacing","w","kern","position","sz","szCs","highlight","u","effect","bdr","shd","fitText","vertAlign","rtl","cs","em","lang","eastAsianLayout","specVanish","oMath"]),JC=new Set(["ligatures","numSpacing","numForm","stylisticSets","cntxtAlts","textFill","textOutline","shadow","glow","reflection","scene3d","props3d"]);function QC(e){return/\br:(?:id|embed|link)\s*=/.test(e)}function $C(e){const t=[];for(let n=0;n<e.childNodes.length;n+=1){const a=e.childNodes[n];(null==a?void 0:a.nodeType)===a.ELEMENT_NODE&&t.push(a)}return t}function _C(e){return e.localName??e.tagName}function eT(e,t,n){return $C(e).find(e=>e.namespaceURI===t&&_C(e)===n)}function tT(e){return`${e.namespaceURI??""}\0${_C(e)}`}function nT(e){const t=(new Ox).parseFromString(e,"application/xml").documentElement;return t&&"r"===_C(t)?t:void 0}function aT(e){const t=(new Ox).parseFromString(`<oasis:root xmlns:oasis="urn:oasis:docx" xmlns:w="${nI}" xmlns:w14="${oI}" xmlns:r="${rI}" xmlns:mc="${ZC}" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape">${e}</oasis:root>`,"application/xml").documentElement;if(!t)return;const n=$C(t);return 1===n.length&&"r"===_C(n[0])?n[0]:void 0}function rT(e){return"http://www.w3.org/2000/xmlns/"===e.namespaceURI||"xmlns"===e.prefix||"xmlns"===e.name}function oT(e){for(let t=0;t<e.attributes.length;t+=1){const n=e.attributes[t];if(n&&!rT(n)&&n.namespaceURI!==rI)return!0}return!1}function iT(e){const t=_C(e);return e.namespaceURI===nI?YC.has(t):e.namespaceURI===oI?JC.has(t):e.namespaceURI===ZC&&"AlternateContent"===t}function lT(e,t){const n=eT(e,nI,"rPr");if(!n)return;const a=$C(n),r=eT(t,nI,"rPr"),o=r?$C(r):[],i=new Set(o.map(tT)),l=a.filter(e=>!iT(e)&&!i.has(tT(e)));if(0===l.length)return;const s=function(e){const t=eT(e,nI,"rPr");if(t)return t;const n=e.ownerDocument.createElementNS(nI,"w:rPr");return e.insertBefore(n,e.firstChild),n}(t);for(const d of l){const e=a.indexOf(d),t=a.slice(e+1).find(e=>i.has(tT(e))),n=t?$C(s).find(e=>tT(e)===tT(t))??null:null;s.insertBefore(d.cloneNode(!0),n)}}function sT(e){const t=_C(e);return e.namespaceURI===ZC&&"AlternateContent"===t?function(e){const t=e=>$C(e).some(e=>{const n=_C(e);return!(e.namespaceURI!==nI||!XC.has(n))||t(e)});return t(e)}(e):e.namespaceURI===nI&&("rPr"===t||XC.has(t))}function dT(e){const t=iA(e);if(t&&!QC(t.xml)&&(n=t.xml,!YS.test(n))){var n;if(t.semanticSignature===aA(e))return t.xml;if(t.structureSignature===rA(e))return function(e,t){if("text"!==e.kind)return;const n=nT(t);if(!n)return;const a=$C(n),r=a.filter(e=>e.namespaceURI===nI&&KC.has(_C(e))),o=r[0]??a.find(e=>!(e.namespaceURI===nI&&"rPr"===_C(e)))??null,i=aT(`<w:r>${NC(e.text)}</w:r>`);if(!i)return;const l=$C(i);for(const s of l)n.insertBefore(s.cloneNode(!0),o);for(const s of r)n.removeChild(s);return(new Px).serializeToString(n)}(e,t.xml)}}function cT(e,t){const n=iA(e);if(!n||QC(n.xml))return t;const a=nT(n.xml);if(!a||!function(e){if(oT(e))return!0;const t=eT(e,nI,"rPr");return!(!t||!oT(t)&&!$C(t).some(e=>!iT(e)))||$C(e).some(e=>!sT(e))}(a))return t;const r=aT(t);return r?(function(e,t){for(let n=0;n<e.attributes.length;n+=1){const a=e.attributes[n];if(!a||a.namespaceURI===rI)continue;const r=a.localName??a.name;(a.namespaceURI?t.hasAttributeNS(a.namespaceURI,r):t.hasAttribute(a.name))||(a.namespaceURI?t.setAttributeNS(a.namespaceURI,a.name,a.value):t.setAttribute(a.name,a.value))}}(a,r),lT(a,r),function(e,t){const n=$C(e),a=$C(t),r=new Set(a.map(tT)),o=n.filter(e=>!sT(e)&&!r.has(tT(e)));for(const i of o){const e=n.indexOf(i),a=n.slice(e+1).find(e=>sT(e)),r=a?$C(t).find(e=>tT(e)===tT(a))??null:null;t.insertBefore(i.cloneNode(!0),r)}}(a,r),(new Px).serializeToString(r)):t}function uT(e,t,n,a,r){if(e.__isFootnoteRefMarker)return DC("footnote");if(e.__isEndnoteRefMarker)return DC("endnote");const o=dT(e);if(o)return o;const i=function(e,t,n){var a;const r=ln(e.styles,t,n),o={bold:r.bold,italic:r.italic,underline:r.underline,underlineStyle:r.underlineStyle,underlineColor:r.underlineColor,strike:r.strike,doubleStrike:r.doubleStrike,superscript:r.superscript,subscript:r.subscript,smallCaps:r.smallCaps,allCaps:r.allCaps,hidden:r.hidden,noProof:r.noProof,webHidden:r.webHidden,specVanish:r.specVanish,rtl:r.rtl,complexScript:r.complexScript,snapToGrid:r.snapToGrid,fitText:r.fitText,emphasisMark:r.emphasisMark,textBorder:r.textBorder,outline:r.outline,shadow:r.shadow,emboss:r.emboss,imprint:r.imprint,textEffect:r.textEffect,characterScale:r.characterScale,characterSpacing:r.characterSpacing,baselineShift:r.baselineShift,kerningThreshold:r.kerningThreshold,ligatures:r.ligatures,numberSpacing:r.numberSpacing,numberForm:r.numberForm,stylisticSet:r.stylisticSet,contextualAlternates:r.contextualAlternates,fontFamily:r.fontFamily,fontSize:r.fontSize,color:r.color,textFill:r.textFill,textOutline:r.textOutline,textShadow:r.textShadow,glow:r.glow,reflection:r.reflection,scene3dXml:r.scene3dXml,props3dXml:r.props3dXml,highlight:r.highlight,shading:r.shading,language:r.language};return(null==(a=e.styles)?void 0:a.link)&&(o.link=e.styles.link),o}(e,n,a),l=()=>LC(i),s=()=>`<w:r>${l()}${NC(e.text)}</w:r>`,d=Pt(e,{footnoteReference:e=>function(e,t,n){const a=Vt(e);return HC("footnote",a?{noteId:a.footnoteId,customMark:a.customMark}:void 0,t,n)}(e,i,t)??s(),endnoteReference:e=>function(e,t,n){const a=Nt(e);return HC("endnote",a?{noteId:a.endnoteId,customMark:a.customMark}:void 0,t,n)}(e,i,t)??s(),fieldChar:e=>function(e,t){const n=(e.fieldLock?' w:fldLock="true"':"")+(e.dirty?' w:dirty="true"':"");return`<w:r>${t}<w:fldChar w:fldCharType="${e.kind}"${n}/></w:r>`}(e.fieldChar,l()),fieldInstruction:e=>{return t=e.fieldInstruction,`<w:r>${l()}<w:instrText xml:space="preserve">${iI(t)}</w:instrText></w:r>`;var t},field:e=>{return t=e.field.type,n=l(),`<w:fldSimple w:instr="${"PAGE"===t?" PAGE ":" NUMPAGES "}"><w:r>${n}<w:t>1</w:t></w:r></w:fldSimple>`;var t,n},textBox:e=>WC(e,e.textBox,t,a,l(),r),image:e=>{const n=t.imageMap.get(e.id);if(n){const a=BC(e.id,n,t,l());if(null!==a)return a}return s()},sym:e=>`<w:r>${l()}<w:sym w:font="${iI(e.sym.font)}" w:char="${e.sym.char}"/></w:r>`,math:e=>function(e){const t=`<m:oMath>${GC(e.children)}</m:oMath>`;return e.display?`<m:oMathPara>${t}</m:oMathPara>`:t}(e.math),text:()=>s()});return cT(e,d)}function pT(e,t,n,a,r){var o;const i=uT(e,t,n,a,r),l=null==(o=e.styles)?void 0:o.link;return l?function(e,t,n){if(t.startsWith("#"))return`<w:hyperlink w:anchor="${iI(t.slice(1))}">${e}</w:hyperlink>`;const a=n.hyperlinkMap.get(t);return a?`<w:hyperlink r:id="${a}">${e}</w:hyperlink>`:e}(i,l,t):i}function hT(e,t){var n,a,r;let o="",i=0;for(;i<e.length;){const l=e[i],s=null==(n=l.sdtWrappers)?void 0:n[0];if(!s){o+=t(l),i+=1;continue}const d=[];let c=i;for(;c<e.length&&(null==(r=null==(a=e[c].sdtWrappers)?void 0:a[0])?void 0:r.groupId)===s.groupId;){const t=e[c],n=t.sdtWrappers.slice(1);d.push({...t,sdtWrappers:n.length>0?n:void 0}),c+=1}const u=hT(d,t);o+=`<w:sdt>${BI(s.sdtPr)}${s.sdtEndPrXml??""}<w:sdtContent>${u}</w:sdtContent></w:sdt>`,i=c}return o}const fT=new Set(["pStyle","keepNext","keepLines","pageBreakBefore","framePr","widowControl","numPr","suppressLineNumbers","pBdr","shd","tabs","suppressAutoHyphens","kinsoku","wordWrap","overflowPunct","topLinePunct","autoSpaceDE","autoSpaceDN","bidi","adjustRightInd","snapToGrid","spacing","ind","contextualSpacing","mirrorIndents","suppressOverlap","jc","textDirection","textAlignment","textboxTightWrap","outlineLvl","divId","cnfStyle","rPr","sectPr","pPrChange"]);function gT(e){return/\br:(?:id|embed|link)\s*=/.test(e)}function mT(e){const t=[];for(let n=0;n<e.childNodes.length;n+=1){const a=e.childNodes[n];(null==a?void 0:a.nodeType)===a.ELEMENT_NODE&&t.push(a)}return t}function bT(e){return e.localName??e.tagName}function vT(e){return`${e.namespaceURI??""}\0${bT(e)}`}function yT(e,t){var n;if(!e||gT(e))return t;const a=function(e){const t=(new Ox).parseFromString(e,"application/xml").documentElement;return(null==t?void 0:t.namespaceURI)===nI&&"pPr"===bT(t)?t:void 0}(e),r=function(e){if(e){const t=(new Ox).parseFromString(`<oasis:root xmlns:oasis="urn:oasis:docx" xmlns:w="${nI}">${e}</oasis:root>`,"application/xml").documentElement,n=t?mT(t):[];if(1===n.length&&n[0].namespaceURI===nI&&"pPr"===bT(n[0]))return n[0]}return(new Ox).parseFromString(`<w:pPr xmlns:w="${nI}"/>`,"application/xml").documentElement}(t);if(!a||!r)return t;!function(e,t){for(let n=0;n<e.attributes.length;n+=1){const a=e.attributes[n];if(!a||a.namespaceURI===rI)continue;const r=a.localName??a.name;(a.namespaceURI?t.hasAttributeNS(a.namespaceURI,r):t.hasAttribute(a.name))||(a.namespaceURI?t.setAttributeNS(a.namespaceURI,a.name,a.value):t.setAttribute(a.name,a.value))}}(a,r);const o=mT(a),i=mT(r),l=new Map;for(const u of i){const e=vT(u),t=l.get(e)??[];t.push(u),l.set(e,t)}const s=new Map;for(const u of o){const e=vT(u),t=s.get(e)??0;s.set(e,t+1);const a=null==(n=l.get(e))?void 0:n[t];a&&KI(u,a)}const d=new Set(i.map(vT)),c=o.filter(e=>{return!(t=e,t.namespaceURI===nI&&fT.has(bT(t))||d.has(vT(e)));var t});for(const u of c){const e=o.indexOf(u),t=o.slice(e+1).find(e=>d.has(vT(e))),n=t?mT(r).find(e=>vT(e)===vT(t))??null:null;r.insertBefore(u.cloneNode(!0),n)}return t||1!==r.attributes.length||0!==mT(r).length?(new Px).serializeToString(r):""}const wT=new Set(["pPr","r","hyperlink","fldSimple","bookmarkStart","bookmarkEnd","commentRangeStart","commentRangeEnd"]);function xT(e){const t=[];for(let n=0;n<e.childNodes.length;n+=1){const a=e.childNodes[n];(null==a?void 0:a.nodeType)===a.ELEMENT_NODE&&t.push(a)}return t}function MT(e){return e.localName??e.tagName}function ST(e,t){const n=(new Ox).parseFromString(`<oasis:root xmlns:oasis="urn:oasis:docx" xmlns:w="${nI}" xmlns:w14="${oI}" xmlns:r="${rI}" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape">${e}</oasis:root>`,"application/xml").documentElement;if(!n)return;const a=xT(n);return 1===a.length&&a[0].namespaceURI===nI&&MT(a[0])===t?a[0]:void 0}function AT(e){return"http://www.w3.org/2000/xmlns/"===e.namespaceURI||"xmlns"===e.prefix||"xmlns"===e.name}function IT(e,t){const n=(a="pPr",xT(e).find(e=>e.namespaceURI===nI&&MT(e)===a));var a;if(!t)return n&&e.removeChild(n),!0;const r=ST(t,"pPr");if(!r)return!1;const o=r.cloneNode(!0);return n?e.replaceChild(o,n):e.insertBefore(o,e.firstChild),!0}function CT(e,t,n,a){var r,o;const i=null==(r=dA(e))?void 0:r.xml;if(!i||a.hasOverrides||a.hasBoundaryTokens||e.dropCap||/\br:(?:id|embed|link)\s*=/.test(i))return;const l=function(e){const t=(new Ox).parseFromString(e,"application/xml").documentElement;return(null==t?void 0:t.namespaceURI)===nI&&"p"===MT(t)?t:void 0}(i);if(!l||!function(e){for(let t=0;t<e.attributes.length;t+=1){const n=e.attributes[t];if(n&&!AT(n)&&n.namespaceURI!==rI)return!0}return xT(e).some(e=>{const t=MT(e);return e.namespaceURI!==nI||!wT.has(t)})}(l))return;const s=function(e){const t=[],n=e=>{for(const a of xT(e)){const e=MT(a);a.namespaceURI!==nI||"r"!==e?(a.namespaceURI!==nI||"pPr"!==e&&"p"!==e&&"tbl"!==e&&"txbxContent"!==e)&&n(a):t.push(a)}};return n(e),t}(l);if(s.length!==n.length)return;const d=n.map(e=>ST(e,"r"));if(!d.some(e=>!e)&&IT(l,t)){for(let e=0;e<s.length;e+=1)null==(o=s[e].parentNode)||o.replaceChild(d[e].cloneNode(!0),s[e]);return(new Px).serializeToString(l)}}function TT(e,t){return e.rows.some(e=>e.cells.some(e=>e.blocks.some(e=>function(e,t){var n,a;switch(e.type){case"paragraph":return Boolean((null==(n=t.bookmarkEventsByParagraph)?void 0:n.has(e.id))||(null==(a=t.commentEventsByParagraph)?void 0:a.has(e.id)));case"table":return TT(e,t);default:return It(e,"block")}}(e,t))))}function kT(e,t,n){var a;switch(e.type){case"paragraph":return ET(e,t,n);case"table":{const r=(null==(a=e.style)?void 0:a.pageBreakBefore)?'<w:p><w:r><w:br w:type="page"/></w:r></w:p>':"",o=function(e){var t;const n=null==(t=vA(e))?void 0:t.xml;return Boolean(n&&/<w:trPr(?:\s|>)[\s\S]*?<w:jc\b[^>]*\bw:val="(?:start|end)"/.test(n))}(e)?void 0:function(e,t){const n=vA(e);if(n&&!t.hasBoundaryTokens&&!_S(n.xml))return n.semanticSignature===cA(e)?n.xml:void 0}(e,{hasBoundaryTokens:TT(e,t)});return r+(o??bC(e,(e,a)=>function(e,t,n,a){var r;return"paragraph"===e.type?ET(e,n,a,{align:null==(r=t.style)?void 0:r.horizontalAlign}):kT(e,n,a)}(e,a,t,n)))}default:return It(e,"block")}}function RT(e,t,n){var a,r,o;let i="",l=0;for(;l<e.length;){const s=e[l],d=null==(a=s.sdtWrappers)?void 0:a[0];if(!d){i+=kT(s,t,n),l+=1;continue}const c=[];let u=l;for(;u<e.length&&(null==(o=null==(r=e[u].sdtWrappers)?void 0:r[0])?void 0:o.groupId)===d.groupId;){const t=e[u].sdtWrappers.slice(1);c.push({...e[u],sdtWrappers:t.length>0?t:void 0}),u+=1}const p=RT(c,t,n);i+=`<w:sdt>${BI(d.sdtPr)}${d.sdtEndPrXml??""}<w:sdtContent>${p}</w:sdtContent></w:sdt>`,l=u}return i}function ET(e,t,n,a){var r,o,i;const l=e.runs.length>0?e.runs:[{id:"",text:"",kind:"text"}],s=e.dropCap?function(e){const t=LC(e.style);var n;return`<w:p><w:pPr><w:keepNext/><w:framePr w:dropCap="${e.type}" w:lines="${e.lines}" w:wrap="around" w:vAnchor="text" w:hAnchor="text"/><w:spacing w:after="0"/>${t?`<w:rPr>${n=t,n.replace(/^<w:rPr>/,"").replace(/<\/w:rPr>$/,"")}</w:rPr>`:""}</w:pPr><w:r>${t}${NC(e.text)}</w:r></w:p>`}(e.dropCap):"",d=null==(r=t.bookmarkEventsByParagraph)?void 0:r.get(e.id),c=null==(o=t.commentEventsByParagraph)?void 0:o.get(e.id),u=[...(d??[]).map(e=>({offset:e.offset,seq:e.seq,xml:pI(e)})),...(c??[]).map(e=>({offset:e.offset,seq:e.seq,xml:hI(e)}))],p=function(e,t){const n=dA(e);if(!(!(null==n?void 0:n.xml)||!n.semanticSignature||t.hasOverrides||t.hasBoundaryTokens||_S(n.xml)||YS.test(n.xml)||JS.test(n.xml)))return n.semanticSignature===lA(e)?n.xml:void 0}(e,{hasOverrides:Boolean(a),hasBoundaryTokens:u.length>0});if(p)return p;const h=a=>{var r;return pT(a,t,null==(r=e.style)?void 0:r.styleId,n,RT)},f=0===u.length?l.map(h):void 0,g=0===u.length?hT(l,h):function(e,t,n,a,r){const o=[...t].sort((e,t)=>e.offset-t.offset||e.seq-t.seq);let i=0,l=0,s=hT(e,e=>{let t="";const s=l,d=s+e.text.length;for(;i<o.length&&o[i].offset<=s;)t+=o[i].xml,i+=1;if(function(e){return"text"===e.kind||"sym"===e.kind}(e)&&e.text.length>0){let l=s;for(;i<o.length&&o[i].offset<d;){const d=o[i];d.offset>l&&(t+=pT({...e,text:e.text.slice(l-s,d.offset-s)},n,a,r,RT)),t+=d.xml,i+=1,l=d.offset}l<d&&(t+=pT({...e,text:e.text.slice(l-s)},n,a,r,RT))}else t+=pT(e,n,a,r,RT);return l=d,t});for(;i<o.length;)s+=o[i].xml,i+=1;return s}(l,u,t,null==(i=e.style)?void 0:i.styleId,n),m=function(e){var t;return null==(t=dA(e))?void 0:t.attributes}(e),b=m?` ${m}`:"",v=xC(e,t.numberingInfo,n,a),y=function(e,t,n){var a;const r=null==(a=dA(e))?void 0:a.paragraphProperties;return!r||gT(r.xml)?t:n||e.list||r.semanticSignature!==sA(e)?yT(r.xml,t):r.xml}(e,v,Boolean(a));if(f){const t=CT(e,y,f,{hasOverrides:Boolean(a),hasBoundaryTokens:!1});if(t)return t}return`${s}<w:p${b}>${y}${g}</w:p>`}function LT(e){if(0===e.length)return[VT()];const[t,...n]=e;return"paragraph"!==t.type?[VT(!0),t,...n]:[(a=t,{...a,runs:[{id:"synthetic:footnoteRef",text:"",kind:"text",styles:{styleId:"FootnoteReference",superscript:!0},__isFootnoteRefMarker:!0},...a.runs],style:(null==(r=a.style)?void 0:r.styleId)?a.style:{...a.style??{},styleId:"FootnoteText"}}),...n];var a,r}function VT(e=!0){return{id:"synthetic:footnote-body-empty",type:"paragraph",runs:[...e?[{id:"synthetic:footnoteRef",text:"",kind:"text",styles:{styleId:"FootnoteReference",superscript:!0},__isFootnoteRefMarker:!0}]:[],{id:"synthetic:footnote-body-empty-text",text:"",kind:"text"}],style:{styleId:"FootnoteText"}}}function NT(e){var t;const n=null==(t=e.endnotes)?void 0:t.items;if(!n)return[];const a=new Map,r=bI(n);for(const{run:o}of function(e){return qh(e,"endnoteReference")}(e)){const e=Nt(o);if(!e||a.has(e.endnoteId))continue;const t=n[e.endnoteId];t&&a.set(e.endnoteId,{endnoteId:e.endnoteId,docxId:r(t),endnote:t})}return Array.from(a.values())}function zT(e){if(0===e.length)return[PT()];const[t,...n]=e;return"paragraph"!==t.type?[PT(!0),t,...n]:[(a=t,{...a,runs:[{id:"synthetic:endnoteRef",text:"",kind:"text",styles:{styleId:"EndnoteReference",superscript:!0},__isEndnoteRefMarker:!0},...a.runs],style:(null==(r=a.style)?void 0:r.styleId)?a.style:{...a.style??{},styleId:"EndnoteText"}}),...n];var a,r}function PT(e=!0){return{id:"synthetic:endnote-body-empty",type:"paragraph",runs:[...e?[{id:"synthetic:endnoteRef",text:"",kind:"text",styles:{styleId:"EndnoteReference",superscript:!0},__isEndnoteRefMarker:!0}]:[],{id:"synthetic:endnote-body-empty-text",text:"",kind:"text"}],style:{styleId:"EndnoteText"}}}const OT=["wholeTable","band1Horz","band2Horz","band1Vert","band2Vert","firstCol","lastCol","firstRow","lastRow","nwCell","neCell","swCell","seCell"];function qT(e){const t={...e.borders?{...e.borders.borderTop?{borderTop:e.borders.borderTop}:{},...e.borders.borderLeft?{borderLeft:e.borders.borderLeft}:{},...e.borders.borderBottom?{borderBottom:e.borders.borderBottom}:{},...e.borders.borderRight?{borderRight:e.borders.borderRight}:{}}:{},...e.shading?{shading:e.shading}:{},...e.cellStyle};return Object.keys(t).length>0?RI({id:"table-style-cell",blocks:[],style:t}):""}function BT(e,t){if("number"==typeof t)return`<w:${e} w:w="${dI(t)??0}" w:type="dxa"/>`;if("string"==typeof t&&t.endsWith("%")){const n=Number.parseFloat(t);return Number.isFinite(n)?`<w:${e} w:w="${Math.round(50*n)}" w:type="pct"/>`:""}return"auto"===t?`<w:${e} w:w="0" w:type="auto"/>`:""}function WT(e){if(!e)return"";const t=[];void 0!==e.rowBandSize&&t.push(`<w:tblStyleRowBandSize w:val="${e.rowBandSize}"/>`),void 0!==e.colBandSize&&t.push(`<w:tblStyleColBandSize w:val="${e.colBandSize}"/>`);const n=BT("tblW",e.width);n&&t.push(n);const a=BT("tblInd",e.indentLeft);a&&t.push(a);const r=BT("tblCellSpacing",e.cellSpacing);if(r&&t.push(r),e.align&&t.push(`<w:jc w:val="${e.align}"/>`),e.layout&&t.push(`<w:tblLayout w:type="${e.layout}"/>`),void 0!==e.bidiVisual&&t.push(`<w:bidiVisual w:val="${e.bidiVisual?"1":"0"}"/>`),e.defaultCellMargins){const n=Object.entries(e.defaultCellMargins).map(([e,t])=>`<w:${e} w:w="${dI(t)??0}" w:type="dxa"/>`).join("");n&&t.push(`<w:tblCellMar>${n}</w:tblCellMar>`)}if(e.borders){const{borders:n}=e,a=_M.filter(([,e])=>!!n[e]).map(([e,t])=>`<w:${e} ${vI(n[t])}`).join("");a&&t.push(`<w:tblBorders>${a}</w:tblBorders>`)}return t.length>0?`<w:tblPr>${t.join("")}</w:tblPr>`:""}function FT(e,t){const n=[],a=t.paragraphStyle?wC(t.paragraphStyle):"";a&&n.push(a);const r=t.textStyle?LC(t.textStyle):"";r&&n.push(r);const o=WT(t.tableStyle);o&&n.push(o);const i=t.rowStyle?VI(t.rowStyle):"";i&&n.push(i);const l=qT(t);return l&&n.push(l),0===n.length?"":`<w:tblStylePr w:type="${iI(e)}">${n.join("")}</w:tblStylePr>`}function DT(e){const t=[];if(t.push(`<w:name w:val="${iI(e.name)}"/>`),e.basedOn&&t.push(`<w:basedOn w:val="${iI(e.basedOn)}"/>`),e.nextStyle&&t.push(`<w:next w:val="${iI(e.nextStyle)}"/>`),void 0!==e.uiPriority&&t.push(`<w:uiPriority w:val="${Math.max(0,Math.floor(e.uiPriority))}"/>`),void 0!==e.qFormat&&t.push(`<w:qFormat w:val="${e.qFormat?"1":"0"}"/>`),void 0!==e.semiHidden&&t.push(`<w:semiHidden w:val="${e.semiHidden?"1":"0"}"/>`),void 0!==e.unhideWhenUsed&&t.push(`<w:unhideWhenUsed w:val="${e.unhideWhenUsed?"1":"0"}"/>`),("paragraph"===e.type||"table"===e.type)&&e.paragraphStyle){const n=wC(e.paragraphStyle);n&&t.push(n)}if(e.textStyle){const n=LC(e.textStyle);n&&t.push(n)}if("table"===e.type&&e.tableStyle){const n=e.tableStyle,a=WT(n);if(a&&t.push(a),n.conditionalFormats){const e=[...OT.filter(e=>e in n.conditionalFormats),...Object.keys(n.conditionalFormats).filter(e=>!OT.includes(e))];for(const a of e){const e=n.conditionalFormats[a];if(e){const n=FT(a,e);n&&t.push(n)}}}}return`<w:style w:type="${"character"===e.type?"character":"table"===e.type?"table":"paragraph"}" w:styleId="${iI(e.id)}"${e.isDefault?' w:default="1"':""}>${t.join("")}</w:style>`}function HT(e,t,n,a,r,o,i,l,s,d=!1){const c=a.map(e=>{const t="header"===e.kind?"application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml":"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml";return`<Override PartName="/word/${e.path}" ContentType="${t}"/>`}).join("");return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/>${function(e){const t=new Set;let n="";for(const a of e){const e=a.toLowerCase();if(t.has(e))continue;const r=fM[e];r&&(t.add(e),n+=`<Default Extension="${e}" ContentType="${r}"/>`)}return n}(t)}<Override PartName="/word/document.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml"/>${i?'<Override PartName="/word/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml"/>':""}${e?'<Override PartName="/word/numbering.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml"/>':""}${n?'<Override PartName="/word/settings.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml"/>':""}${r?'<Override PartName="/word/footnotes.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml"/>':""}${o?'<Override PartName="/word/endnotes.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml"/>':""}${l?'<Override PartName="/word/comments.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml"/><Override PartName="/word/commentsExtended.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtended+xml"/>':""}${s?'<Override PartName="/word/fontTable.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml"/>':""}${d?'<Override PartName="/word/theme/theme1.xml" ContentType="application/vnd.openxmlformats-officedocument.theme+xml"/>':""}${c}</Types>`}const UT={decimal:"decimal",lowerRoman:"lowerRoman",upperRoman:"upperRoman",lowerLetter:"lowerLetter",upperLetter:"upperLetter",symbol:"symbol"},GT={continuous:"continuous",eachSection:"eachSect"};function jT(e,t){if(!t)return null;const n=[];return t.numberFormat&&n.push(`<w:numFmt w:val="${UT[t.numberFormat]}"/>`),void 0!==t.startAt&&n.push(`<w:numStart w:val="${Math.max(1,t.startAt)}"/>`),t.restart&&n.push(`<w:numRestart w:val="${GT[t.restart]}"/>`),n.length>0?`<w:${e}>${n.join("")}</w:${e}>`:null}function ZT(e,t){let n="";for(const a of t)n+=`<Relationship Id="${a.rId}" Type="${rI}/hyperlink" Target="${iI(a.href)}" TargetMode="External"/>`;for(const a of e){const e="linked"===a.kind?' TargetMode="External"':"";n+=`<Relationship Id="${a.rId}" Type="${rI}/image" Target="${iI(a.target)}"${e}/>`}return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="${aI}">${n}</Relationships>`}function KT(e,t){t(e);for(const n of e.runs)"textBox"===n.kind&&XT(n.textBox.blocks,t)}function XT(e,t){for(const n of e)switch(n.type){case"paragraph":KT(n,t);break;case"table":for(const e of n.rows)for(const n of e.cells)XT(n.blocks,t);break;default:It(n,"block")}}function YT(e,t){for(let n=0;n<e.attributes.length;n+=1){const a=e.attributes.item(n);if((null==a?void 0:a.localName)===t)return a.value}}function JT(e,t,n){if(!e)return 0;const a=(new Ox).parseFromString(e,"application/xml");let r=0;for(const o of Array.from(a.getElementsByTagNameNS(nI,t))){const e=YT(o,n);if(!e||!/^\d+$/.test(e))continue;const t=Number.parseInt(e,10);Number.isSafeInteger(t)&&(r=Math.max(r,t))}return r}function QT(e,t){return void 0!==e&&Number.isSafeInteger(e)&&e>=t}function $T(e){const t=new Map,n=new Map,a=[],r=new Set,o=new Set,i=function(e){var t;const n=e.sourcePackage;if(!n)return;const a=n.parts[n.mainDocumentPart],r=null==(t=null==a?void 0:a.relationships)?void 0:t.find(e=>"External"!==e.targetMode&&e.type.endsWith("/numbering")&&Boolean(e.resolvedTarget)),o=(null==r?void 0:r.resolvedTarget)?n.parts[r.resolvedTarget]:void 0;return"xml"===(null==o?void 0:o.kind)?o.data:void 0}(e);let l=Math.max(1,JT(i,"abstractNum","abstractNumId")+1),s=Math.max(1,JT(i,"num","numId")+1);const d=e=>{if(QT(e,0)&&!r.has(e))return r.add(e),e;for(;r.has(l);)l+=1;const t=l;return l+=1,r.add(t),t},c=e=>{if(QT(e,1)&&!o.has(e))return o.add(e),e;for(;o.has(s);)s+=1;const t=s;return s+=1,o.add(t),t},u=[],p=e=>{e.list&&u.push(e)};for(const h of un(e))XT(h.blocks,p),h.header&&XT(h.header,p),h.firstPageHeader&&XT(h.firstPageHeader,p),h.evenPageHeader&&XT(h.evenPageHeader,p),h.footer&&XT(h.footer,p),h.firstPageFooter&&XT(h.firstPageFooter,p),h.evenPageFooter&&XT(h.evenPageFooter,p);for(const h of u){const e=h.list,r=Math.max(0,e.level??0),o=e.bulletGlyph??"",i=e.instanceId?`instance:${e.instanceId}`:`legacy:${e.kind}:${r}:${o}`;let l=n.get(i);if(!l){const t=PM(e),r=void 0!==(null==t?void 0:t.sourceNumId)&&e.instanceId===String(t.sourceNumId);l={abstractNumId:d(r?t.sourceAbstractNumId:void 0),numId:c(r?t.sourceNumId:void 0),levels:[]},n.set(i,l),a.push(l)}if(!l.levels.some(e=>e.level===r)){const t=PM(e),n=OM(e);l.levels.push({kind:e.kind,level:r,format:e.format,startAt:e.startAt,levelText:e.levelText,suffix:e.suffix,alignment:e.alignment,legal:e.legal,bulletGlyph:e.bulletGlyph,bulletFont:e.bulletFont,...t?{ooxml:{...t,...n?{format:n}:{format:void 0}}}:{}})}t.set(h.id,{numId:l.numId,level:r})}return{numberingInfo:t,definitions:a}}const _T=`xmlns:w="${nI}" xmlns:w14="${oI}" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" xmlns:r="${rI}"`;function ek(e,t,n){var a,r;const o=un(e),i=o.map((a,r)=>{var i;const l=RT(a.blocks,t,e.styles),s=function(e,t,n,a){var r,o,i,l,s,d,c,u,p;const h=lI(e.width,12240),f=lI(e.height,15840),g=e.margins,m="landscape"===e.orientation?' w:orient="landscape"':"",b=[(null==(r=null==t?void 0:t.header)?void 0:r.first)?`<w:headerReference w:type="first" r:id="${t.header.first.relId}"/>`:"",(null==(o=null==t?void 0:t.header)?void 0:o.even)?`<w:headerReference w:type="even" r:id="${t.header.even.relId}"/>`:"",(null==(i=null==t?void 0:t.header)?void 0:i.default)?`<w:headerReference w:type="default" r:id="${t.header.default.relId}"/>`:"",(null==(l=null==t?void 0:t.footer)?void 0:l.first)?`<w:footerReference w:type="first" r:id="${t.footer.first.relId}"/>`:"",(null==(s=null==t?void 0:t.footer)?void 0:s.even)?`<w:footerReference w:type="even" r:id="${t.footer.even.relId}"/>`:"",(null==(d=null==t?void 0:t.footer)?void 0:d.default)?`<w:footerReference w:type="default" r:id="${t.footer.default.relId}"/>`:""].join(""),v=(null==(c=null==t?void 0:t.header)?void 0:c.first)||(null==(u=null==t?void 0:t.footer)?void 0:u.first)?"<w:titlePg/>":"",y=a&&"nextPage"!==a?`<w:type w:val="${a}"/>`:"",w=e.columns;let x="";if(w&&w.count>1){const e=lI(w.space,0),t=w.separator?' w:sep="1"':"";if(!1===w.equalWidth&&(null==(p=w.columns)?void 0:p.length)){const n=w.columns.map(e=>`<w:col w:w="${lI(e.width,0)}" w:space="${lI(e.space,0)}"/>`).join("");x=`<w:cols w:num="${w.count}" w:space="${e}" w:equalWidth="0"${t}>${n}</w:cols>`}else x=`<w:cols w:num="${w.count}" w:space="${e}"${t}/>`}const M=n.pageNumbering;let S="";if(M){const e=[];void 0!==M.start&&e.push(`w:start="${M.start}"`),M.format&&e.push(`w:fmt="${iI(M.format)}"`),M.chapterStyle&&e.push(`w:chapStyle="${iI(M.chapterStyle)}"`),M.chapterSeparator&&e.push(`w:chapSep="${iI(M.chapterSeparator)}"`),e.length>0&&(S=`<w:pgNumType ${e.join(" ")}/>`)}const A=n.verticalAlignment&&"top"!==n.verticalAlignment?`<w:vAlign w:val="${n.verticalAlignment}"/>`:"",I=n.bidi?"<w:bidi/>":"",C=n.pageBorder,T=null==C?void 0:C.color.replace("#","").toUpperCase(),k=C?`<w:pgBorders w:offsetFrom="page"><w:top w:val="${C.style}" w:sz="${Math.max(1,Math.round(8*C.width))}" w:space="${Math.max(0,Math.round(C.distance??0))}" w:color="${T}"/><w:left w:val="${C.style}" w:sz="${Math.max(1,Math.round(8*C.width))}" w:space="${Math.max(0,Math.round(C.distance??0))}" w:color="${T}"/><w:bottom w:val="${C.style}" w:sz="${Math.max(1,Math.round(8*C.width))}" w:space="${Math.max(0,Math.round(C.distance??0))}" w:color="${T}"/><w:right w:val="${C.style}" w:sz="${Math.max(1,Math.round(8*C.width))}" w:space="${Math.max(0,Math.round(C.distance??0))}" w:color="${T}"/></w:pgBorders>`:"";return`<w:sectPr>${b}${v}${y}<w:pgSz w:w="${h}" w:h="${f}"${m}/><w:pgMar w:top="${lI(g.top,1440)}" w:right="${lI(g.right,1440)}" w:bottom="${lI(g.bottom,1440)}" w:left="${lI(g.left,1440)}" w:header="${lI(g.header,720)}" w:footer="${lI(g.footer,720)}" w:gutter="${lI(g.gutter,0)}"/>${S}${x}${A}${I}${k}</w:sectPr>`}(a.pageSettings,n[r],a,null==(i=o[r+1])?void 0:i.breakType);return l+s}).join(""),l=null==(r=null==(a=e.design)?void 0:a.pageColor)?void 0:r.replace("#","").toUpperCase();return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:document ${_T}>${l?`<w:background w:color="${l}"/>`:""}<w:body>${i}</w:body></w:document>`}function tk(e,t,n,a,r){const o="header"===e?"hdr":"ftr",i="header"===e&&"text"===(null==r?void 0:r.kind)&&r.text?`<w:pict xmlns:v="urn:schemas-microsoft-com:vml"><v:shape type="#_x0000_t136" style="position:absolute;margin-left:0;margin-top:0;width:468pt;height:216pt;z-index:-251654144;rotation:${r.rotation??-45}" fillcolor="${r.color??"#94a3b8"}" fillopacity="${r.opacity??.25}"><v:textpath on="true" string="${iI(r.text)}" style="font-family:${iI(r.fontFamily??"Arial")};font-size:${r.fontSize??48}pt"/></v:shape></w:pict>`:"header"===e&&"image"===(null==r?void 0:r.kind)&&n.images.some(e=>"__watermark"===e.runId)?`<w:pict xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"><v:shape type="#_x0000_t75" style="position:absolute;margin-left:0;margin-top:0;width:468pt;height:216pt;z-index:-251654144;rotation:${r.rotation??-45}" fillcolor="${r.color??"#ffffff"}" fillopacity="${r.opacity??.25}" stroked="f"><v:imagedata r:id="rIdWatermark" o:title="Watermark"/></v:shape></w:pict>`:"";return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:${o} ${_T}>${i}${RT(t,n,a)}</w:${o}>`}function nk(e){return e?{...e}:void 0}function ak(e,t){return JSON.stringify(e??null)===JSON.stringify(t??null)}function rk(e,t,n){const a={...e??{}};return n?a[t]=!0:delete a[t],Object.keys(a).length>0?a:void 0}function ok(e,t,n){const a={...e??{}};return null==n||""===n?delete a[t]:a[t]=n,Object.keys(a).length>0?a:void 0}function ik(e,t,n){const a={...e??{}};return null==n?delete a[t]:a[t]=n,Object.keys(a).length>0?a:void 0}function lk(e){return Array.isArray(e)?e.map(lk):e&&"object"==typeof e?Object.fromEntries(Object.entries(e).map(([e,t])=>[e,lk(t)])):e}function sk(e){const t={id:e.id,text:e.text,styles:nk(e.styles),revision:e.revision?{...e.revision}:void 0,sdtWrappers:e.sdtWrappers?[...e.sdtWrappers]:void 0};return function(e,t){const n=iA(e);return n&&(t.ooxmlSource={...n}),t}(e,Pt(e,{text:()=>({...t,kind:"text"}),image:e=>({...t,kind:"image",image:{...e.image}}),textBox:e=>{return{...t,kind:"textBox",textBox:(n=e.textBox,{...n,floating:n.floating?{...n.floating,positionH:n.floating.positionH?{...n.floating.positionH}:void 0,positionV:n.floating.positionV?{...n.floating.positionV}:void 0}:void 0,shape:n.shape?{...n.shape}:void 0,body:n.body?{...n.body}:void 0,blocks:pk(n.blocks)})};var n},field:e=>({...t,kind:"field",field:{...e.field}}),fieldChar:e=>({...t,kind:"fieldChar",fieldChar:{...e.fieldChar}}),fieldInstruction:e=>({...t,kind:"fieldInstruction",fieldInstruction:e.fieldInstruction}),footnoteReference:e=>({...t,kind:"footnoteReference",footnoteReference:{...e.footnoteReference}}),endnoteReference:e=>({...t,kind:"endnoteReference",endnoteReference:{...e.endnoteReference}}),sym:e=>({...t,kind:"sym",sym:{...e.sym}}),math:e=>{return{...t,kind:"math",math:(n=e.math,lk(n))};var n}}))}function dk(e){return{...e,runs:e.runs.map(sk),style:e.style?{...e.style}:void 0,list:e.list?{...e.list}:void 0}}function ck(e){return e?{...e}:void 0}function uk(e){return e.map(dk)}function pk(e){return e.map(e=>{switch(e.type){case"paragraph":return dk(e);case"table":return{...e,style:e.style?{...e.style,defaultCellMargins:e.style.defaultCellMargins?{...e.style.defaultCellMargins}:void 0,floating:e.style.floating?{...e.style.floating}:void 0,revision:e.style.revision?{...e.style.revision,previous:{...e.style.revision.previous}}:void 0}:void 0,gridRevision:e.gridRevision?{...e.gridRevision,previous:[...e.gridRevision.previous]}:void 0,rows:e.rows.map(e=>({...e,conditionalStyle:e.conditionalStyle?{...e.conditionalStyle}:void 0,style:e.style?{...e.style,revision:e.style.revision?{...e.style.revision}:void 0,propertyRevision:e.style.propertyRevision?{...e.style.propertyRevision,previous:{...e.style.propertyRevision.previous}}:void 0}:void 0,cells:e.cells.map(e=>({...e,conditionalStyle:e.conditionalStyle?{...e.conditionalStyle}:void 0,mergeRevisionState:e.mergeRevisionState?{...e.mergeRevisionState,previousCells:e.mergeRevisionState.previousCells.map(e=>({...e,mergeRevisionState:void 0,style:e.style?{...e.style}:void 0,blocks:pk(e.blocks)}))}:void 0,style:e.style?{...e.style,revision:e.style.revision?{...e.style.revision}:void 0,propertyRevision:e.style.propertyRevision?{...e.style.propertyRevision,previous:{...e.style.propertyRevision.previous}}:void 0}:void 0,blocks:pk(e.blocks)}))}))};default:return It(e,"block")}})}function hk(e){return{id:et("").id,text:"",kind:"fieldChar",fieldChar:{kind:e}}}function fk(e,t,n){const a=at([{text:`${t} `},{text:String(n)},{text:e?`: ${e}`:""}]);var r;return a.style={styleId:"Caption",align:"center"},a.runs=[a.runs[0],hk("begin"),(r=" SEQ Figure \\* ARABIC ",{id:et("").id,text:"",kind:"fieldInstruction",fieldInstruction:r}),hk("separate"),a.runs[1],hk("end"),a.runs[2]],a}function gk(e){var t,n;if(!e)return!1;return"caption"===(null==(n=null==(t=e.style)?void 0:t.styleId)?void 0:n.toLowerCase())&&e.runs.some(e=>{const t=Lt(e);return void 0!==t&&new RegExp("\\bSEQ\\s+Figure\\b","i").test(t)})}function mk(e,t){if(!gk(e))return dk(e);let n=!1,a=!1;const r=e.runs.map(e=>"fieldChar"===e.kind&&"separate"===e.fieldChar.kind?(n=!0,{...e,fieldChar:{...e.fieldChar}}):"fieldChar"===e.kind&&"end"===e.fieldChar.kind?(n=!1,{...e,fieldChar:{...e.fieldChar}}):n&&""!==e.text?e.text===String(t)?{...e}:(a=!0,{...e,text:String(t)}):{...e});return a?{...dk(e),runs:r}:dk(e)}function bk(e,t){return e.map(e=>{switch(e.type){case"paragraph":return gk(e)?mk(e,t.next++):dk(e);case"table":return{...e,rows:e.rows.map(e=>({...e,cells:e.cells.map(e=>({...e,blocks:bk(e.blocks,t)}))}))};default:return It(e,"block")}})}function vk(e){const t={next:1},n=un(e).map(e=>({...e,blocks:bk(e.blocks,t),header:e.header?pk(e.header):void 0,footer:e.footer?pk(e.footer):void 0}));return{...e,sections:n}}const yk={oasis:{accent:"0F766E",heading:"115E59",body:"1F2937"},office:{accent:"4472C4",heading:"2F5597",body:"1F2937"},facet:{accent:"8064A2",heading:"604A7B",body:"262626"},integral:{accent:"70AD47",heading:"548235",body:"1F2937"},ion:{accent:"ED7D31",heading:"C55A11",body:"262626"},retrospect:{accent:"5B9BD5",heading:"2F75B5",body:"1F2937"}};function wk(e,t,n,a){const r=[],o=new Map,i=new Map,l=[],s=new Map;return XT(e,e=>{var t;for(const d of e.runs){const e=null==(t=d.styles)?void 0:t.link;if(e&&!e.startsWith("#")&&!s.has(e)){const t=`rIdLink${l.length+1}`;s.set(e,t),l.push({rId:t,href:e})}if("textBox"!==d.kind||i.has(d.id)||(i.set(d.id,n.nextTextBoxDocPrId),n.nextTextBoxDocPrId+=1),"image"!==d.kind)continue;const c=n.nextImageId,u=`rIdImg${c}`,p={rId:u,runId:d.id,cx:Math.round(d.image.width*ht),cy:Math.round(d.image.height*ht),alt:d.image.alt,crop:d.image.crop,cropShape:d.image.cropShape,cropFit:d.image.cropFit,fillMode:d.image.fillMode,border:d.image.border,rotation:d.image.rotation,flipH:d.image.flipH,flipV:d.image.flipV,floating:d.image.floating,wrapPolygon:d.image.wrapPolygon};if(d.image.linkedSrc){r.push({...p,kind:"linked",target:d.image.linkedSrc}),o.set(d.id,u),n.nextImageId+=1;continue}const h=dn(a,d.image.src).match(/^data:([^;,]+);base64,(.*)$/);if(!h)continue;const f=mM(h[1]);if(!f)continue;const g=h[2],m=`media/image${c}.${f}`;r.push({...p,kind:"embedded",target:m,base64:g}),o.set(d.id,u),n.nextImageId+=1}}),{numberingInfo:t.numberingInfo,definitions:t.definitions,images:r,imageMap:o,textBoxDocPrIds:i,hyperlinks:l,hyperlinkMap:s}}function xk(e,t,n){n&&(e.file(`word/${t}.xml`,n.xml),(n.partContext.images.length>0||n.partContext.hyperlinks.length>0)&&e.file(`word/_rels/${t}.xml.rels`,ZT(n.partContext.images,n.partContext.hyperlinks)))}async function Mk(e){var t,n,a,r,o,i,l,s,d,c,u,p,h,f,g,m,b,v;e=vk(e);const y=new Ob,w=$T(e),x={nextImageId:1,nextTextBoxDocPrId:1000001},M=un(e),S=function(e){var t;const n=null==(t=e.design)?void 0:t.watermark;if("image"!==(null==n?void 0:n.kind)||!n.src)return;const a=dn(e,n.src).match(/^data:([^;,]+);base64,(.*)$/);if(!a)return;const r=mM(a[1]);return r?{rId:"rIdWatermark",runId:"__watermark",kind:"embedded",target:`media/watermark.${r}`,base64:a[2],cx:1,cy:1}:void 0}(e),A=function(e){var t;const n=null==(t=e.footnotes)?void 0:t.items;if(!n)return[];const a=new Map,r=bI(n);for(const{run:o}of Fh(e)){const e=Vt(o);if(!e||a.has(e.footnoteId))continue;const t=n[e.footnoteId];t&&a.set(e.footnoteId,{footnoteId:e.footnoteId,docxId:r(t),footnote:t})}return Array.from(a.values())}(e),I=function(e){const t=new Map;for(const n of e)t.set(n.footnoteId,n.docxId);return t}(A),C=A.length>0,T=NT(e),k=function(e){const t=new Map;for(const n of e)t.set(n.endnoteId,n.docxId);return t}(T),R=T.length>0,E=function(e){const t=e.bookmarks;if(!t||0===t.order.length)return;const n=new Map,a=new Set;for(const l of t.order){const e=t.items[l];if(!e)continue;const r=e.docxIdHint;void 0!==r&&r>=0&&!a.has(r)&&(n.set(l,r),a.add(r))}let r=0;for(const l of t.order)if(!n.has(l)){for(;a.has(r);)r+=1;n.set(l,r),a.add(r),r+=1}const o=new Map,i=(e,t)=>{const n=o.get(e);n?n.push(t):o.set(e,[t])};for(const l of t.order){const e=t.items[l];if(!e)continue;const a=n.get(l);e.start&&i(e.start.paragraphId,{kind:"start",offset:e.start.offset,seq:e.start.seq??0,wId:a,name:e.name,...void 0!==e.colFirst?{colFirst:e.colFirst}:{},...void 0!==e.colLast?{colLast:e.colLast}:{}}),e.end&&i(e.end.paragraphId,{kind:"end",offset:e.end.offset,seq:e.end.seq??0,wId:a})}return o}(e),L=function(e){const t=e.comments;if(!t||0===t.order.length)return;const n=new Map,a=new Set;for(const s of t.order){const e=t.items[s];if(!e)continue;const r=e.docxIdHint;void 0!==r&&r>=0&&!a.has(r)&&(n.set(s,r),a.add(r))}let r=0;for(const s of t.order)if(!n.has(s)){for(;a.has(r);)r+=1;n.set(s,r),a.add(r),r+=1}const o=new Map,i=(e,t)=>{const n=o.get(e);n?n.push(t):o.set(e,[t])},l=[];return t.order.forEach((e,a)=>{const r=t.items[e];if(!r)return;const o=n.get(e),s=(1073741824+a).toString(16).toUpperCase();l.push({comment:r,wId:o,paraId:s}),r.start&&i(r.start.paragraphId,{kind:"start",offset:r.start.offset,seq:r.start.seq??0,wId:o}),r.end&&(i(r.end.paragraphId,{kind:"end",offset:r.end.offset,seq:r.end.seq??0,wId:o}),i(r.end.paragraphId,{kind:"reference",offset:r.end.offset,seq:(r.end.seq??0)+.5,wId:o}))}),{eventsByParagraph:o,comments:l}}(e),V=e=>(e.footnoteIdMap=I,e.endnoteIdMap=k,e.bookmarkEventsByParagraph=E,e.commentEventsByParagraph=null==L?void 0:L.eventsByParagraph,e),N=V(wk(M.flatMap(e=>e.blocks),w,x,e)),z=void 0!==L,P=[],O=M.map(()=>({}));let q=1,B=1;M.forEach((t,n)=>{const a=(t,a,r)=>{var o,i,l;if(!(r&&0!==r.length||"header"===t&&"text"===(null==(i=null==(o=e.design)?void 0:o.watermark)?void 0:i.kind)||"header"===t&&void 0!==S))return;const s=r??[],d="header"===t?q:B,c=`${t}${d}.xml`,u=`rId${"header"===t?"Header":"Footer"}${d}`,p=V(wk(s,w,x,e));"header"===t&&S&&p.images.push({...S}),P.push({kind:t,type:a,path:c,relId:u,blocks:s,context:p});const h="header"===t?"header":"footer";((l=O[n])[h]??(l[h]={}))[a]={relId:u},"header"===t?q+=1:B+=1};a("header","first",t.firstPageHeader),a("header","even",t.evenPageHeader),a("header","default",t.header),a("footer","first",t.firstPageFooter),a("footer","even",t.evenPageFooter),a("footer","default",t.footer)});const W=w.definitions.length>0,F=M.some(e=>{var t,n;return((null==(t=e.evenPageHeader)?void 0:t.length)??0)>0||((null==(n=e.evenPageFooter)?void 0:n.length)??0)>0}),D=F||void 0!==(null==(t=e.settings)?void 0:t.defaultTabStop)||void 0!==(null==(n=e.settings)?void 0:n.allowSpaceOfSameStyleInTable)||void 0!==(null==(a=e.settings)?void 0:a.autoHyphenation)||void 0!==(null==(r=e.settings)?void 0:r.consecutiveHyphenLimit)||void 0!==(null==(o=e.settings)?void 0:o.hyphenationZone)||void 0!==(null==(i=e.settings)?void 0:i.doNotHyphenateCaps)||void 0!==(null==(l=e.footnotes)?void 0:l.settings)||void 0!==(null==(s=e.endnotes)?void 0:s.settings),H=[...N.images,...P.flatMap(e=>e.context.images)],U=C?function(e,t,n,a,r,o,i){const l=r(t.flatMap(e=>LT(e.footnote.blocks)));l.footnoteIdMap=i;const s=t.map(e=>{const t=RT(LT(e.footnote.blocks),l,o);return`<w:footnote w:id="${e.docxId}">${t}</w:footnote>`}).join("");return{xml:`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:footnotes xmlns:w="${nI}" xmlns:w14="${oI}" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture" xmlns:r="${rI}"><w:footnote w:type="separator" w:id="-1"><w:p><w:r><w:separator/></w:r></w:p></w:footnote><w:footnote w:type="continuationSeparator" w:id="0"><w:p><w:r><w:continuationSeparator/></w:r></w:p></w:footnote>${s}</w:footnotes>`,partContext:l}}(0,A,0,0,t=>wk(t,w,x,e),e.styles,I):null;U&&H.push(...U.partContext.images);const G=R?function(e,t,n,a,r,o,i){const l=r(t.flatMap(e=>zT(e.endnote.blocks)));l.endnoteIdMap=i;const s=t.map(e=>{const t=RT(zT(e.endnote.blocks),l,o);return`<w:endnote w:id="${e.docxId}">${t}</w:endnote>`}).join("");return{xml:`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:endnotes xmlns:w="${nI}" xmlns:w14="${oI}" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture" xmlns:r="${rI}"><w:endnote w:type="separator" w:id="-1"><w:p><w:r><w:separator/></w:r></w:p></w:endnote><w:endnote w:type="continuationSeparator" w:id="0"><w:p><w:r><w:continuationSeparator/></w:r></w:p></w:endnote>${s}</w:endnotes>`,partContext:l}}(0,T,0,0,t=>wk(t,w,x,e),e.styles,k):null;G&&H.push(...G.partContext.images);const j=H.filter(e=>"embedded"===e.kind).map(e=>{var t;return null==(t=e.target.split(".").pop())?void 0:t.toLowerCase()}).filter(e=>Boolean(e)),Z=null!=e.styles&&Object.keys(e.styles).length>0,K=((null==(d=e.fontTable)?void 0:d.length)??0)>0,X=void 0!==e.design;y.file("[Content_Types].xml",HT(W,j,D,P,C,R,Z,z,K,X)),y.file("_rels/.rels",`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="${aI}"><Relationship Id="rId1" Type="${rI}/officeDocument" Target="word/document.xml"/></Relationships>`),y.file("word/document.xml",ek(e,N,O)),Z&&y.file("word/styles.xml",function(e){const t=Object.values(e).map(DT).join("");return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:styles xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="${oI}">${t}</w:styles>`}(e.styles)),W&&y.file("word/numbering.xml",function(e){const t=e.map(({abstractNumId:e,levels:t})=>`<w:abstractNum w:abstractNumId="${e}">${t.sort((e,t)=>e.level-t.level).map(({kind:e,level:t,format:n,startAt:a,levelText:r,suffix:o,alignment:i,legal:l,bulletGlyph:s,bulletFont:d,ooxml:c})=>{const u="bullet"===e?"bullet":(null==c?void 0:c.format)??n??"decimal",p=r??("bullet"===e?s??"":`%${t+1}.`),h=a??1,f="bullet"===e?d??"Symbol":void 0,g=f?`<w:rPr><w:rFonts w:ascii="${iI(f)}" w:hAnsi="${iI(f)}" w:hint="default"/></w:rPr>`:"",m=o&&"tab"!==o?`<w:suff w:val="${o}"/>`:"",b=l?"<w:isLgl/>":"",v=void 0!==(null==c?void 0:c.restartAfterLevel)?`<w:lvlRestart w:val="${c.restartAfterLevel}"/>`:"",y=(null==c?void 0:c.paragraphStyleId)?`<w:pStyle w:val="${iI(c.paragraphStyleId)}"/>`:"";return`<w:lvl w:ilvl="${t}"><w:start w:val="${h}"/><w:numFmt w:val="${iI(u)}"/>${v}${y}<w:lvlText w:val="${iI(p)}"/><w:lvlJc w:val="${i??"left"}"/>${m}${b}${g}</w:lvl>`}).join("")}</w:abstractNum>`).join(""),n=e.map(({abstractNumId:e,numId:t})=>`<w:num w:numId="${t}"><w:abstractNumId w:val="${e}"/></w:num>`).join("");return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:numbering xmlns:w="${nI}">${t}${n}</w:numbering>`}(w.definitions)),(Z||W||D||N.images.length>0||N.hyperlinks.length>0||P.length>0||C||R||z||K||X)&&y.file("word/_rels/document.xml.rels",function(e,t,n,a,r,o,i,l,s,d,c=!1){let u="";l&&(u+=`<Relationship Id="rIdStyles" Type="${rI}/styles" Target="styles.xml"/>`),e&&(u+=`<Relationship Id="rIdNum" Type="${rI}/numbering" Target="numbering.xml"/>`),t&&(u+=`<Relationship Id="rIdSettings" Type="${rI}/settings" Target="settings.xml"/>`);for(const p of a)u+=`<Relationship Id="${p.rId}" Type="${rI}/hyperlink" Target="${iI(p.href)}" TargetMode="External"/>`;for(const p of n){const e="linked"===p.kind?' TargetMode="External"':"";u+=`<Relationship Id="${p.rId}" Type="${rI}/image" Target="${iI(p.target)}"${e}/>`}for(const p of r){const e="header"===p.kind?"header":"footer";u+=`<Relationship Id="${p.relId}" Type="${rI}/${e}" Target="${p.path}"/>`}return o&&(u+=`<Relationship Id="rIdFootnotes" Type="${rI}/footnotes" Target="footnotes.xml"/>`),i&&(u+=`<Relationship Id="rIdEndnotes" Type="${rI}/endnotes" Target="endnotes.xml"/>`),s&&(u+=`<Relationship Id="rIdComments" Type="${rI}/comments" Target="comments.xml"/>`,u+='<Relationship Id="rIdCommentsExtended" Type="http://schemas.microsoft.com/office/2011/relationships/commentsExtended" Target="commentsExtended.xml"/>'),d&&(u+=`<Relationship Id="rIdFontTable" Type="${rI}/fontTable" Target="fontTable.xml"/>`),c&&(u+=`<Relationship Id="rIdTheme" Type="${rI}/theme" Target="theme/theme1.xml"/>`),`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="${aI}">${u}</Relationships>`}(W,D,N.images,N.hyperlinks,P,C,R,Z,z,K,X)),K&&y.file("word/fontTable.xml",function(e){const t=e.map(e=>{const t=[];if(e.altName&&t.push(`<w:altName w:val="${iI(e.altName)}"/>`),e.panose1&&t.push(`<w:panose1 w:val="${iI(e.panose1)}"/>`),e.charset&&t.push(`<w:charset w:val="${iI(e.charset)}"/>`),e.family&&t.push(`<w:family w:val="${iI(e.family)}"/>`),e.pitch&&t.push(`<w:pitch w:val="${iI(e.pitch)}"/>`),e.sig){const n=Object.entries(e.sig).map(([e,t])=>`w:${e}="${iI(t)}"`).join(" ");n&&t.push(`<w:sig ${n}/>`)}return`<w:font w:name="${iI(e.name)}">${t.join("")}</w:font>`}).join("");return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:fonts xmlns:w="${nI}">${t}</w:fonts>`}(e.fontTable)),X&&y.file("word/theme/theme1.xml",function(e){var t;const n=null==(t=null==e?void 0:e.themeData)?void 0:t.sourceXml;if(n)return n;const a=yk[(null==e?void 0:e.themeId)??"oasis"]??yk.oasis,r=null==e?void 0:e.themeData,o=(e,t)=>{var n;return((null==(n=null==r?void 0:r.colors)?void 0:n[e])??t).replace(/^#/,"").toUpperCase()},i={dk1:o("dk1","000000"),lt1:o("lt1","FFFFFF"),dk2:o("dk2",a.body),lt2:o("lt2","FFFFFF"),accent1:o("accent1",a.accent),accent2:o("accent2",a.heading),accent3:o("accent3","5B9BD5"),accent4:o("accent4","70AD47"),accent5:o("accent5","ED7D31"),accent6:o("accent6","A5A5A5"),hlink:o("hlink","0563C1"),folHlink:o("folHlink","954F72")},l=Object.entries(i).map(([e,t])=>`<a:${e}><a:srgbClr val="${t}"/></a:${e}>`).join(""),s=(e,t,n)=>{var a,o;return iI((null==(o=null==(a=null==r?void 0:r.fonts)?void 0:a[e])?void 0:o[t])??n)},d=iI((null==r?void 0:r.name)??`${((null==e?void 0:e.themeId)??"oasis")[0].toUpperCase()}${((null==e?void 0:e.themeId)??"oasis").slice(1)}`),c=(null==r?void 0:r.effectsXml)??"<a:fillStyleLst/><a:lnStyleLst/><a:effectStyleLst/><a:bgFillStyleLst/>";return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="${d}"><a:themeElements><a:clrScheme name="${d}">${l}</a:clrScheme><a:fontScheme name="${d}"><a:majorFont><a:latin typeface="${s("major","majorHAnsi","Aptos Display")}"/><a:ea typeface="${s("major","majorEastAsia","Aptos Display")}"/><a:cs typeface="${s("major","majorBidi","Aptos Display")}"/></a:majorFont><a:minorFont><a:latin typeface="${s("minor","minorHAnsi","Aptos")}"/><a:ea typeface="${s("minor","minorEastAsia","Aptos")}"/><a:cs typeface="${s("minor","minorBidi","Aptos")}"/></a:minorFont></a:fontScheme><a:fmtScheme name="${d}">${c}</a:fmtScheme></a:themeElements></a:theme>`}(e.design)),D&&y.file("word/settings.xml",function(e,t,n,a,r,o){const i=[],l=dI(t);null!==l&&i.push(`<w:defaultTabStop w:val="${l}"/>`),(null==o?void 0:o.autoHyphenation)&&i.push("<w:autoHyphenation/>"),void 0!==(null==o?void 0:o.consecutiveHyphenLimit)&&o.consecutiveHyphenLimit>=0&&i.push(`<w:consecutiveHyphenLimit w:val="${o.consecutiveHyphenLimit}"/>`);const s=dI(null==o?void 0:o.hyphenationZone);null!==s&&i.push(`<w:hyphenationZone w:val="${s}"/>`),(null==o?void 0:o.doNotHyphenateCaps)&&i.push("<w:doNotHyphenateCaps/>");const d=jT("footnotePr",n);d&&i.push(d);const c=jT("endnotePr",a);return c&&i.push(c),e&&i.push("<w:evenAndOddHeaders/>"),r&&i.push("<w:compat><w:allowSpaceOfSameStyleInTable/></w:compat>"),`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:settings xmlns:w="${nI}">${i.join("")}</w:settings>`}(F,null==(c=e.settings)?void 0:c.defaultTabStop,null==(u=e.footnotes)?void 0:u.settings,null==(p=e.endnotes)?void 0:p.settings,null==(h=e.settings)?void 0:h.allowSpaceOfSameStyleInTable,{autoHyphenation:null==(f=e.settings)?void 0:f.autoHyphenation,consecutiveHyphenLimit:null==(g=e.settings)?void 0:g.consecutiveHyphenLimit,hyphenationZone:null==(m=e.settings)?void 0:m.hyphenationZone,doNotHyphenateCaps:null==(b=e.settings)?void 0:b.doNotHyphenateCaps}));for(const Y of P)y.file(`word/${Y.path}`,tk(Y.kind,Y.blocks,Y.context,e.styles,null==(v=e.design)?void 0:v.watermark)),(Y.context.images.length>0||Y.context.hyperlinks.length>0)&&y.file(`word/_rels/${Y.path}.rels`,ZT(Y.context.images,Y.context.hyperlinks));xk(y,"footnotes",U),xk(y,"endnotes",G),L&&(y.file("word/comments.xml",gI(L)),y.file("word/commentsExtended.xml",function(e){const t=e.comments.map(({comment:e,paraId:t})=>`<w15:commentEx w15:paraId="${t}" w15:done="${e.resolved?"1":"0"}"/>`).join("");return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w15:commentsEx ${fI}>${t}</w15:commentsEx>`}(L)));for(const Y of H)"embedded"===Y.kind&&Y.base64&&y.file(`word/${Y.target}`,Y.base64,{base64:!0});return y.generateAsync({type:"arraybuffer"})}function Sk(e){let t=2166136261;for(const n of e)t^=n,t=Math.imul(t,16777619);return(t>>>0).toString(16).padStart(8,"0")}async function Ak(e){return async function(e){const t=await Ob.loadAsync(e),n={};for(const[a,r]of Object.entries(t.files))r.dir||(n[YA(a)]=Sk(await r.async("uint8array")));return n}(await Mk(e))}const Ik="word/document.xml";function Ck(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(16).padStart(8,"0")}function Tk(e,t){const n=t.overrides[e];if(n)return n;const a=e.includes(".")?e.slice(e.lastIndexOf(".")+1).toLowerCase():"";return t.defaults[a]}function kk(e,t){return!(!e.endsWith(".xml")&&!e.endsWith(".rels"))||("application/xml"===t||Boolean(null==t?void 0:t.endsWith("+xml")))}const Rk="word/document.xml",Ek={"/styles":"word/styles.xml","/numbering":"word/numbering.xml","/settings":"word/settings.xml","/fontTable":"word/fontTable.xml","/theme":"word/theme/theme1.xml","/footnotes":"word/footnotes.xml","/endnotes":"word/endnotes.xml","/comments":"word/comments.xml","/commentsExtended":"word/commentsExtended.xml"};function Lk(e){const t=e.lastIndexOf("/"),n=t>=0?e.slice(0,t):"",a=t>=0?e.slice(t+1):e;return n?`${n}/_rels/${a}.rels`:`_rels/${a}.rels`}function Vk(e,t,n){"base64"===n.encoding?e.file(t,n.data,{base64:!0}):e.file(t,n.data)}function Nk(e){return`word/__oasis_source__/${e}`}function zk(e){return e?e.map(e=>"External"!==e.targetMode&&e.resolvedTarget?{...e,target:`/${Nk(e.resolvedTarget)}`,resolvedTarget:void 0}:e):[]}function Pk(e){for(const[t,n]of Object.entries(Ek))if(e.type.endsWith(t))return n}async function Ok(e,t){if(!function(e){var t;if(e.mainDocumentPart!==Rk)return!0;const n=e.parts[e.mainDocumentPart];return Boolean(null==(t=null==n?void 0:n.relationships)?void 0:t.some(e=>{const t=Pk(e);return Boolean(t&&e.resolvedTarget&&e.resolvedTarget!==t)}))}(t))return e;const n=new Ob;for(const o of Object.values(t.parts))Vk(n,o.path,o);for(const o of Object.values(t.parts)){if(o.path.endsWith(".rels")||"[Content_Types].xml"===o.path)continue;const e=Nk(o.path);Vk(n,e,o);const t=zk(o.relationships);t.length>0&&n.file(Lk(e),eI(t))}const a=t.parts[t.mainDocumentPart];if(!a)throw new Error(`DOCX source package is missing its main part: ${t.mainDocumentPart}`);Vk(n,Rk,a);const r=zk(a.relationships);r.length>0&&n.file(Lk(Rk),eI(r));for(const o of a.relationships??[]){if("External"===o.targetMode||!o.resolvedTarget)continue;const e=Pk(o),a=t.parts[o.resolvedTarget];if(!e||!a)continue;Vk(n,e,a);const r=zk(a.relationships);r.length>0&&n.file(Lk(e),eI(r))}return n.generateAsync({type:"arraybuffer"})}let qk=1;async function Bk(e,t={}){if("undefined"==typeof Worker||"undefined"==typeof URL){const n=await async function(e){var t;const n=await Ob.loadAsync(e),a=[],r=await(null==(t=n.file(ZA))?void 0:t.async("string")),o=QA(r);r||a.push({level:"warning",code:"missing-content-types",message:"The DOCX package does not contain [Content_Types].xml."});const i={};for(const[c,u]of Object.entries(n.files)){if(u.dir)continue;const e=YA(c),t=Tk(e,o),n=kk(e,t)?"xml":"binary",a="xml"===n?await u.async("string"):await u.async("base64");i[e]={path:e,...t?{contentType:t}:{},kind:n,data:a,encoding:"xml"===n?"utf8":"base64",originalHash:Ck(a)}}let l=[];for(const[c,u]of Object.entries(i)){const e=JA(c);if(void 0===e||"xml"!==u.kind)continue;const t=tI(e,_A(u.data),t=>{a.push({level:"warning",code:"unsafe-relationship-target",message:`Relationship ${t.id} points outside the OPC package.`,...e?{partPath:e}:{},relationshipId:t.id})});if(null===e){l=t;continue}const n=i[e];n?n.relationships=t:a.push({level:"warning",code:"orphan-relationships-part",message:`Relationship part ${c} has no owning package part.`,partPath:c})}const s=l.find(e=>"External"!==e.targetMode&&e.type.endsWith("/officeDocument"));let d=null==s?void 0:s.resolvedTarget;if(!d||!i[d]){if(!i[Ik])throw new Error("DOCX package has no resolvable officeDocument relationship or word/document.xml fallback.");d=Ik,a.push({level:"warning",code:"main-document-fallback",message:"The officeDocument relationship was absent or invalid; word/document.xml was used as a compatibility fallback."})}return{format:"docx",mainDocumentPart:d,contentTypes:o,rootRelationships:l,parts:i,...a.length>0?{diagnostics:a}:{}}}(e),a=await Ok(e,n),r=await GA(a,t);return await async function(e,t){try{t.rebuiltPartHashes=await Ak(e)}catch(n){(t.diagnostics??(t.diagnostics=[])).push({level:"warning",code:"rebuilt-baseline-unavailable",message:`The imported document could not be fingerprinted for granular source-part preservation: ${n instanceof Error?n.message:String(n)}`})}}(r,n),r.sourcePackage=n,r}const n=qk;return qk+=1,new Promise((r,o)=>{const i=new Worker(new URL(""+("undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__dirname+"/assets/importDocxWorker-BnENWXFH.js").href:new URL("assets/importDocxWorker-BnENWXFH.js","undefined"==typeof document?location.href:document.currentScript&&"SCRIPT"===document.currentScript.tagName.toUpperCase()&&document.currentScript.src||document.baseURI).href),"undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__filename).href:"undefined"==typeof document?location.href:a&&"SCRIPT"===a.tagName.toUpperCase()&&a.src||new URL("oasis-editor.umd.cjs",document.baseURI).href),{type:"module"}),l=()=>{i.removeEventListener("message",d),i.removeEventListener("error",s),i.terminate()},s=e=>{l(),o(e.error instanceof Error?e.error:new Error(e.message))},d=e=>{var a;const i=e.data;i&&i.id===n&&("progress"!==i.type?(l(),"done"===i.type?r(i.document):o(new Error(i.error))):null==(a=t.onProgress)||a.call(t,i.stage,i.progress))};i.addEventListener("message",d),i.addEventListener("error",s),i.postMessage({type:"import-docx",id:n,buffer:e},[e])})}const Wk={"opening-docx":"opening","parsing-document":"parsing","parsing-headers-footers":"finishing"};function Fk(e){const t={},n=e.style;return function(e,t){switch(e.tagName){case"B":case"STRONG":t.bold=!0;break;case"I":case"EM":case"CITE":case"VAR":t.italic=!0;break;case"U":case"INS":t.underline=!0;break;case"S":case"STRIKE":case"DEL":t.strike=!0}}(e,t),function(e,t){const n=e.fontFamily.trim();n&&(t.fontFamily=n);const a=e.fontSize.trim();if(a.endsWith("px")){const e=Number.parseFloat(a);Number.isFinite(e)&&(t.fontSize=e)}const r=e.color.trim();r&&(t.color=r);const o=e.backgroundColor.trim();o&&(t.highlight=o)}(n,t),function(e,t){const n=e.getAttribute("data-oasis-lang-value")??e.getAttribute("lang"),a=e.getAttribute("data-oasis-lang-east-asia"),r=e.getAttribute("data-oasis-lang-bidi");(n||a||r)&&(t.language={},n&&(t.language.value=n),a&&(t.language.eastAsia=a),r&&(t.language.bidi=r))}(e,t),function(e,t){var n,a;const r=e.textDecoration.toLowerCase();if(r.includes("underline")){t.underline=!0;switch(null==(n=e.textDecorationStyle)?void 0:n.toLowerCase()){case"double":t.underlineStyle="double";break;case"dotted":t.underlineStyle="dotted";break;case"dashed":t.underlineStyle="dash";break;case"wavy":t.underlineStyle="wave"}}r.includes("line-through")&&(t.strike=!0);const o=null==(a=e.textDecorationColor)?void 0:a.trim();o&&(t.underlineColor=o)}(n,t),function(e,t){const n=e.fontWeight.trim();("bold"===n||Number.parseInt(n,10)>=600)&&(t.bold=!0);const a=e.fontStyle.trim();"italic"===a&&(t.italic=!0);"none"===e.display.trim().toLowerCase()&&(t.hidden=!0);"uppercase"===e.textTransform.trim().toLowerCase()&&(t.allCaps=!0);e.fontVariant.trim().toLowerCase().includes("small-caps")&&(t.smallCaps=!0);const r=e.letterSpacing.trim();if(r.endsWith("pt")){const e=Number.parseFloat(r);Number.isFinite(e)&&(t.characterSpacing=e)}const o=e.fontStretch.trim();if(o.endsWith("%")){const e=Number.parseFloat(o);Number.isFinite(e)&&e>0&&(t.characterScale=e)}}(n,t),function(e,t){const n=e.fontVariantLigatures.trim().toLowerCase();"none"===n?t.ligatures="none":n.includes("historical")?t.ligatures="historical":n.includes("common-ligatures")&&n.includes("contextual")?t.ligatures="standardContextual":n.includes("common-ligatures")?t.ligatures="standard":n.includes("contextual")&&(t.ligatures="contextual");const a=e.fontVariantNumeric.trim().toLowerCase();a.includes("proportional-nums")?t.numberSpacing="proportional":a.includes("tabular-nums")&&(t.numberSpacing="tabular");a.includes("lining-nums")?t.numberForm="lining":a.includes("oldstyle-nums")&&(t.numberForm="oldStyle");const r=e.fontFeatureSettings.trim().toLowerCase(),o=r.match(/["']ss(0[1-9]|1[0-9]|20)["']\s+1/);(null==o?void 0:o[1])&&(t.stylisticSet=Number(o[1]));/["']calt["']\s+1/.test(r)&&(t.contextualAlternates=!0)}(n,t),function(e,t,n){"SUP"===e.tagName&&(n.superscript=!0);"SUB"===e.tagName&&(n.subscript=!0);const a=t.verticalAlign.trim();if(a.endsWith("pt")){const e=Number.parseFloat(a);Number.isFinite(e)&&(n.baselineShift=e)}}(e,n,t),function(e,t){var n;const a="A"===e.tagName?(null==(n=e.getAttribute("href"))?void 0:n.trim())??"":"";a&&(t.link=a,t.underline=!0)}(e,t),Object.keys(t).length>0?t:void 0}function Dk(e,t){if(e.nodeType===Node.TEXT_NODE){const n=e.textContent??"";return n.length>0?[tt(n,t)]:[]}if(e.nodeType!==Node.ELEMENT_NODE)return[];const n=e;if("BR"===n.tagName)return[tt("\n",t)];const a=function(e){var t,n,a;if("IMG"!==e.tagName)return;const r=e,o=(null==(t=r.getAttribute("src"))?void 0:t.trim())??"";if(!o||!function(e){const t=e.trim().toLowerCase();return t.startsWith("data:image/")||t.startsWith("blob:")}(o))return;const i=(null==(n=r.getAttribute("width"))?void 0:n.trim())??"",l=(null==(a=r.getAttribute("height"))?void 0:a.trim())??"",s=r.style.width.trim(),d=r.style.height.trim(),c=s.endsWith("px")?Number.parseFloat(s):Number.NaN,u=d.endsWith("px")?Number.parseFloat(d):Number.NaN,p=Number.parseFloat(i),h=Number.parseFloat(l),f=Number.isFinite(c)?c:Number.isFinite(p)?p:100,g=Number.isFinite(u)?u:Number.isFinite(h)?h:100,m=r.getAttribute("alt"),b={src:o,width:Math.max(1,Math.round(f)),height:Math.max(1,Math.round(g))};return null!==m&&(b.alt=m),b}(n);if(a)return[tt("",t,a)];const r={...t??{},...Fk(n)??{}},o=[];for(const i of Array.from(n.childNodes))o.push(...Dk(i,r));return o}function Hk(e){return"P"===e||"DIV"===e||"LI"===e||/^H[1-6]$/.test(e)}function Uk(e){return"UL"===e?"bullet":"OL"===e?"ordered":null}function Gk(e){const t=e.style,n={},a=t.textAlign.trim();"left"!==a&&"center"!==a&&"right"!==a&&"justify"!==a||(n.align=a);const r=t.lineHeight.trim();if(r){const e=Number.parseFloat(r);Number.isFinite(e)&&(n.lineHeight=e,r.endsWith("px")&&(n.lineRule="exact"))}const o=t.paddingTop.trim();if(o.endsWith("px")){const e=Number.parseFloat(o);Number.isFinite(e)&&(n.spacingBefore=e)}const i=t.paddingBottom.trim();if(i.endsWith("px")){const e=Number.parseFloat(i);Number.isFinite(e)&&(n.spacingAfter=e)}const l=t.paddingLeft.trim();if(l.endsWith("px")){const e=Number.parseFloat(l);Number.isFinite(e)&&(n.indentLeft=e)}const s=t.paddingRight.trim();if(s.endsWith("px")){const e=Number.parseFloat(s);Number.isFinite(e)&&(n.indentRight=e)}const d=t.textIndent.trim();if(d.endsWith("px")){const e=Number.parseFloat(d);Number.isFinite(e)&&(n.indentFirstLine=e)}return"page"!==t.breakBefore&&"true"!==e.dataset.oasisPageBreakBefore||(n.pageBreakBefore=!0),"true"===e.dataset.oasisKeepWithNext&&(n.keepWithNext=!0),Object.keys(n).length>0?n:void 0}const jk={H1:"heading1",H2:"heading2",H3:"heading3",H4:"heading3",H5:"heading3",H6:"heading3"};function Zk(e){return e.map(e=>({text:e.text,styles:e.styles,image:Tt(e)}))}function Kk(e,t){const n=at(Zk(Dk(e,void 0))),a=Gk(e),r=jk[e.tagName];return(a||r)&&(n.style={...r?{styleId:r}:{},...a??{}}),t&&(n.list=t),n}function Xk(e,t,n){const a=[];for(const r of Array.from(e.children))if("LI"===r.tagName){a.push(Kk(r,{kind:t,level:n}));for(const e of Array.from(r.children)){const t=Uk(e.tagName);t&&a.push(...Xk(e,t,n+1))}}return a}function Yk(e){const t=$k(e).filter(e=>"paragraph"===e.type),n=Number.parseInt(e.getAttribute("colspan")??"",10),a=Number.parseInt(e.getAttribute("rowspan")??"",10);return rt(t.length>0?t:[nt("")],Number.isFinite(n)&&n>1?n:1,Number.isFinite(a)&&a>1?{rowSpan:a}:void 0)}function Jk(e){const t=[];let n=!0;for(const a of Array.from(e.children))"TD"!==a.tagName&&"TH"!==a.tagName||(t.push(Yk(a)),"TH"!==a.tagName&&(n=!1));return 0===t.length?null:ot(t,n?{isHeader:!0}:void 0)}function Qk(e){const t=[],n=Array.from(e.querySelectorAll("tr")).filter(t=>t.closest("table")===e);for(const a of n){const e=Jk(a);e&&t.push(e)}return 0===t.length?null:it(t)}function $k(e){const t=[];for(const n of Array.from(e.childNodes)){if(n.nodeType===Node.TEXT_NODE){(n.textContent??"").trim().length>0&&t.push(_k(Dk(n,void 0)));continue}if(n.nodeType!==Node.ELEMENT_NODE)continue;const e=n;if("TABLE"===e.tagName){const n=Qk(e);n&&t.push(n);continue}const a=Uk(e.tagName);if(a){t.push(...Xk(e,a,0));continue}if(Hk(e.tagName)){t.push(Kk(e));continue}if(e.children.length>0){t.push(...$k(e));continue}const r=Dk(e,void 0);r.length>0&&t.push(_k(r))}return t}function _k(e){return at(Zk(e))}const eR=[{id:"docx",accept:[".docx"],matches(e){return this.accept.includes(Nb(e.name))},import:(e,t)=>Bk(e,{onProgress:t?(e,n)=>t(Wk[e],n):void 0})},{id:"html",accept:[".html",".htm"],matches(e){return this.accept.includes(Nb(e.name))},async import(e,t){null==t||t("opening");const n=function(e){var t;const n=new Uint8Array(e),a=new TextDecoder("utf-8").decode(n.subarray(0,2048)).match(/charset\s*=\s*["']?([\w-]+)/i),r=null==(t=null==a?void 0:a[1])?void 0:t.toLowerCase();if(r&&"utf-8"!==r&&"utf8"!==r)try{return new TextDecoder(r).decode(n)}catch{}return new TextDecoder("utf-8").decode(n)}(e);null==t||t("parsing");const a=function(e){if("undefined"==typeof document)throw new Error("importHtmlToEditorDocument requires a DOM environment");const t=(new DOMParser).parseFromString(e,"text/html"),n=t.body,a=n?$k(n):[];0===a.length&&a.push(nt(""));const r=t.title.trim();return Dn(a,void 0,void 0,void 0,r?{title:r}:void 0)}(n);return null==t||t("finishing"),a}}];const tR=["nw","n","ne","e","se","s","sw","w"],nR=24;function aR(e,t,n){const a=Math.max(t,e);return void 0===n?a:Math.min(n,a)}function rR(e,t){return"x"===t?e.includes("e")?1:e.includes("w")?-1:0:e.includes("s")?1:e.includes("n")?-1:0}var oR=ge("<button aria-hidden=true class=oasis-editor-rotate-handle tabindex=-1 type=button>"),iR=ge("<div aria-hidden=true style=transform-origin:center>"),lR=ge("<button aria-hidden=true class=oasis-editor-resize-handle tabindex=-1 type=button>");function sR(e){return(t=iR()).$$mousedown=t=>{!e.readOnly&&e.box()&&e.onBodyMouseDown&&(t.preventDefault(),e.onBodyMouseDown(t))},Ie(t,K(re,{get when(){return!e.readOnly},get children(){return[K(ne,{each:tR,children:t=>{return(n=lR()).$$mousedown=n=>{e.box()&&e.onResizeStart(t,n)},be(n,"data-direction",t),n;var n}}),K(re,{get when(){return e.onRotateStart},get children(){var t=oR();return t.$$mousedown=t=>{var n;e.box()&&(t.preventDefault(),t.stopPropagation(),null==(n=e.onRotateStart)||n.call(e,t))},t}})]}})),w(n=>{var a,r,o,i,l,s=`oasis-editor-selection-overlay ${e.variantClass}`,d=e.box()?void 0:"none",c=`${(null==(a=e.box())?void 0:a.left)??0}px`,u=`${(null==(r=e.box())?void 0:r.top)??0}px`,p=`${(null==(o=e.box())?void 0:o.width)??0}px`,h=`${(null==(i=e.box())?void 0:i.height)??0}px`,f=(null==(l=e.rotation)?void 0:l.call(e))?`rotate(${e.rotation()}deg)`:void 0,g=!e.readOnly&&e.box()?"auto":"none";return s!==n.e&&ve(t,n.e=s),d!==n.t&&Me(t,"display",n.t=d),c!==n.a&&Me(t,"left",n.a=c),u!==n.o&&Me(t,"top",n.o=u),p!==n.i&&Me(t,"width",n.i=p),h!==n.n&&Me(t,"height",n.n=h),f!==n.s&&Me(t,"transform",n.s=f),g!==n.h&&Me(t,"pointer-events",n.h=g),n},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0}),t;var t}me(["mousedown"]);var dR=ge("<div aria-hidden=true class=oasis-editor-image-crop-preview><img alt>");function cR(e){return Number.isFinite(e)?Math.max(0,Math.min(.99,e??0)):0}function uR(e){const t=()=>{const t=e.box(),n=e.image();if(!t||!n)return null;const a=n.intrinsicWidth??n.width,r=n.intrinsicHeight??n.height,o=a/Math.max(1,r);if("fit"===n.cropFit&&o>0){const e=o>t.width/Math.max(1,t.height)?t.width:t.height*o,n=e/o;return{crop:{},left:t.left+(t.width-e)/2,top:t.top+(t.height-n)/2,width:e,height:n}}const i=n.crop??{},l=cR(i.left),s=cR(i.top),d=cR(i.right),c=cR(i.bottom),u=t.width/Math.max(.01,1-l-d),p=t.height/Math.max(.01,1-s-c);return{crop:i,left:t.left-l*u,top:t.top-s*p,width:u,height:p}};return n=dR(),be(a=n.firstChild,"draggable",!1),w(r=>{var o,i,l,s,d,c,u,p,h,f,g=t()?void 0:"none",m=`${(null==(o=e.box())?void 0:o.left)??0}px`,b=`${(null==(i=e.box())?void 0:i.top)??0}px`,v=`${(null==(l=e.box())?void 0:l.width)??0}px`,y=`${(null==(s=e.box())?void 0:s.height)??0}px`,w=`rotate(${e.rotation()}deg)`,x=e.src(),M=((null==(d=t())?void 0:d.left)??0)-((null==(c=e.box())?void 0:c.left)??0)+"px",S=((null==(u=t())?void 0:u.top)??0)-((null==(p=e.box())?void 0:p.top)??0)+"px",A=`${(null==(h=t())?void 0:h.width)??0}px`,I=`${(null==(f=t())?void 0:f.height)??0}px`;return g!==r.e&&Me(n,"display",r.e=g),m!==r.t&&Me(n,"left",r.t=m),b!==r.a&&Me(n,"top",r.a=b),v!==r.o&&Me(n,"width",r.o=v),y!==r.i&&Me(n,"height",r.i=y),w!==r.n&&Me(n,"transform",r.n=w),x!==r.s&&be(a,"src",r.s=x),M!==r.h&&Me(a,"left",r.h=M),S!==r.r&&Me(a,"top",r.r=S),A!==r.d&&Me(a,"width",r.d=A),I!==r.l&&Me(a,"height",r.l=I),r},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0}),n;var n,a}var pR=ge("<div aria-hidden=true class=oasis-editor-table-handles-overlay><button aria-hidden=true class=oasis-editor-table-move-handle tabindex=-1 type=button></button><button aria-hidden=true class=oasis-editor-table-resize-corner tabindex=-1 type=button>");function hR(e){return K(re,{get when(){return pe(()=>!e.readOnly)()&&e.box()},children:t=>{return n=pR(),a=n.firstChild,r=a.nextSibling,a.$$mousedown=t=>{e.onMoveStart(t)},r.$$mousedown=t=>{e.onResizeStart(t)},w(e=>{var a=`${t().left}px`,r=`${t().top}px`,o=`${t().width}px`,i=`${t().height}px`;return a!==e.e&&Me(n,"left",e.e=a),r!==e.t&&Me(n,"top",e.t=r),o!==e.a&&Me(n,"width",e.a=o),i!==e.o&&Me(n,"height",e.o=i),e},{e:void 0,t:void 0,a:void 0,o:void 0}),n;var n,a,r}})}me(["mousedown"]);function fR(e){return Number.isFinite(e)?Math.min(200,Math.max(50,Math.round(e))):100}var gR=ge("<div class=oasis-editor-import-overlay data-testid=editor-import-overlay role=status aria-live=polite><div class=oasis-editor-import-card><div class=oasis-editor-import-title></div><div class=oasis-editor-import-phase data-testid=editor-import-phase></div><div class=oasis-editor-import-progress-track><div class=oasis-editor-import-progress-bar data-testid=editor-import-progress-bar></div></div><div class=oasis-editor-import-progress-label>"),mR=ge("<span class=oasis-editor-import-done-icon>"),bR=ge("<span class=oasis-editor-import-error-icon>");function vR(e){const t=Fe();return K(re,{get when(){var t;return null==(t=e.progress)?void 0:t.call(e)},children:e=>{const n="done"===e().phase,a="error"===e().phase;return i=gR(),l=i.firstChild,s=l.firstChild,d=s.nextSibling,c=d.nextSibling,u=c.firstChild,p=c.nextSibling,i.classList.toggle("oasis-editor-import-overlay-done",!!n),i.classList.toggle("oasis-editor-import-overlay-error",!!a),be(i,"aria-busy",!n&&!a),Ie(l,K(Ue,{height:40,class:"oasis-editor-loading-mark"}),s),Ie(s,()=>t("import.overlay.title")),Ie(d,()=>t(`import.phase.${e().phase}`)),u.classList.toggle("oasis-editor-import-progress-bar-done",!!n),u.classList.toggle("oasis-editor-import-progress-bar-error",!!a),Ie(p,n?(Ie(o=mR(),()=>t("import.phase.done")),o):a?(Ie(r=bR(),()=>t("import.phase.error")),r):[pe(()=>Math.round(e().progress)),"%"]),w(t=>{var n=!("preparing-fonts"!==e().phase&&"applying-editor-state"!==e().phase&&"stabilizing-layout"!==e().phase),a=`${e().progress}%`;return n!==t.e&&u.classList.toggle("oasis-editor-import-progress-bar-indeterminate",t.e=n),a!==t.t&&Me(u,"width",t.t=a),t},{e:void 0,t:void 0}),i;var r,o,i,l,s,d,c,u,p}})}var yR=ge('<div class=oasis-editor-statusbar data-testid=editor-statusbar><div class="oasis-editor-statusbar-group oasis-editor-statusbar-start"><span class=oasis-editor-statusbar-item data-testid=editor-statusbar-word-count></span><span class=oasis-editor-statusbar-item data-testid=editor-statusbar-character-count></span><span class=oasis-editor-statusbar-item></span></div><div class="oasis-editor-statusbar-group oasis-editor-statusbar-end"><div class=oasis-editor-statusbar-zoom data-testid=editor-statusbar-zoom-control><button type=button class=oasis-editor-zoom-button>−</button><input class=oasis-editor-zoom-slider type=range><button type=button class=oasis-editor-zoom-button>+</button><span class="oasis-editor-statusbar-item oasis-editor-zoom-value"data-testid=editor-statusbar-zoom>%'),wR=ge("<span>");function xR(e){const t=Fe();return n=yR(),a=n.firstChild,r=a.firstChild,o=r.nextSibling,i=o.nextSibling,l=a.nextSibling,s=l.firstChild,d=s.firstChild,c=d.nextSibling,u=c.nextSibling,p=u.nextSibling,h=p.firstChild,Ie(r,()=>t("status.words",[e.wordCount()])),Ie(o,()=>t("status.characters",[e.characterCount()])),Ie(i,()=>t("status.page",[e.currentPage(),e.totalPages()])),d.$$click=()=>e.adjustZoom(-10),c.$$input=t=>e.setZoomPercent(fR(t.currentTarget.valueAsNumber)),be(c,"min",50),be(c,"max",200),be(c,"step",10),u.$$click=()=>e.adjustZoom(10),Ie(p,()=>e.zoomPercent(),h),Ie(l,K(re,{get when(){return e.persistenceStatus},get children(){return(()=>{const n=e.persistenceStatus().toLowerCase(),a=n.includes("saved")?"status.saved":n.includes("saving")?"status.saving":n.includes("error")?"status.error":null;return K(re,{when:a,get children(){var e=wR();return Ie(e,()=>t(a)),w(()=>ve(e,`oasis-editor-statusbar-item oasis-editor-persistence-status oasis-editor-status-${n.replace("...","ing").replace(".","")}`)),e}})})()}}),null),w(n=>{var a=t("status.zoom"),r=`${t("status.zoom")} -`,o=e.zoomPercent()<=50,i=t("status.zoom"),l=`${e.zoomPercent()}%`,p=`${t("status.zoom")} +`,h=e.zoomPercent()>=200;return a!==n.e&&be(s,"aria-label",n.e=a),r!==n.t&&be(d,"aria-label",n.t=r),o!==n.a&&(d.disabled=n.a=o),i!==n.o&&be(c,"aria-label",n.o=i),l!==n.i&&be(c,"aria-valuetext",n.i=l),p!==n.n&&be(u,"aria-label",n.n=p),h!==n.s&&(u.disabled=n.s=h),n},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),w(()=>c.value=e.zoomPercent()),n;var n,a,r,o,i,l,s,d,c,u,p,h}me(["click","input"]);var MR=ge('<div data-testid=editor-editor-shell><div class=oasis-editor-editor data-testid=editor-editor><div class=oasis-editor-editor-zoom-sizer><div class=oasis-editor-editor-scroll-content data-testid=editor-editor-scroll-content style="position:absolute;top:0px;transform-origin:top left"><textarea aria-label="Editor input"autocomplete=off autocapitalize=off class=oasis-editor-input data-testid=editor-input value style=pointer-events:none></textarea><input data-testid=editor-import-docx-input type=file style=display:none><input accept="image/png, image/jpeg, image/gif"data-testid=editor-insert-image-input type=file style=display:none>');function SR(e){const t=()=>e.layout,n=()=>e.overlays,a=()=>e.refs??{},r=()=>e.surfaceHandlers,o=()=>e.inputHandlers,i=()=>e.fileHandlers;let l,s;const[d,c]=y(),u=()=>un(e.state().document).reduce((e,t)=>Math.max(e,t.pageSettings.width),0)||Ht(e.state().document).width,p=()=>{const e=t().viewportHeight;return"number"==typeof e?`${e}px`:e??"min(72vh, 920px)"},h=M(()=>({width:"100%",height:"100%","max-height":p(),...t().style??{}})),f=M(()=>e.state().document),g=M(()=>bn(f()).reduce((e,t)=>e+Jt(t),0)),m=M(()=>function(e){const t=bn(e);let n=0;for(const a of t){const e=a.runs.reduce((e,t)=>e+t.text,"");e.trim()&&(n+=e.split(/[\s\p{P}]+/u).filter(e=>e.length>0).length)}return n}(f())),[b,v]=y(100),S=()=>{var e,n;return(null==(n=(e=t()).zoomPercent)?void 0:n.call(e))??b()},A=e=>{const n=fR(e),a=t().setZoomPercent;a?a(n):v(n)},I=e=>A(S()+e),T=M(()=>fR(S())/100),k=()=>{var e,n;return(null==(n=(e=t()).zoomFactor)?void 0:n.call(e))??T()},[R,E]=y(0),[L,V]=y({width:0,height:0}),N=()=>u()+68,z=M(()=>Math.max(N()*k(),L().width)),P=M(()=>Math.max(R()*k(),L().height)),O=M(()=>Math.max(0,(z()-N()*k())/2));let q=k();x(()=>{const e=k(),t=q;if(q=e,e===t||t<=0)return;const n=s;if(!n)return;const a=e/t,r=n.clientWidth/2,o=n.clientHeight/2,i=(n.scrollLeft+r)*a-r,l=(n.scrollTop+o)*a-o;requestAnimationFrame(()=>{n.scrollLeft=i,n.scrollTop=l})});const B=()=>t().documentLayout(),W=()=>Math.max(1,B().pages.length),[F,D]=y(null),H=()=>{const e=s;if(!e)return void D(null);const t=Array.from(e.querySelectorAll(".oasis-editor-paper[data-page-index]"));if(0===t.length)return void D(null);const n=e.getBoundingClientRect(),a=n.top+.5*n.height;let r=0,o=Number.POSITIVE_INFINITY;for(const i of t){const e=i.getBoundingClientRect(),t=e.top+.5*e.height,n=Math.abs(t-a);n<o&&(o=n,r=Number(i.dataset.pageIndex??"0"))}D(Number.isFinite(r)?r:null)},U=()=>{const t=F();if(null!==t)return Math.max(1,t+1);const n=B(),a=e.state().selection.focus.paragraphId,r=n.pages.findIndex(e=>e.blocks.some(e=>e.sourceBlockId===a));return-1===r?1:r+1},G=M(()=>n().selectedImageBox()),j=M(()=>{const t=G();if(!t)return null;const n=vn(e.state().document).find(e=>e.id===t.paragraphId);if(!n)return null;let a=0;for(const r of n.runs){if("image"===r.kind&&a===t.startOffset)return{image:Tt(r),src:dn(e.state().document,r.image.src)};a+=r.text.length}return null}),Z=M(()=>n().selectedTextBoxBox()),X=M(()=>n().selectedTableBox()),Y=M(()=>{var t;return(null==(t=e.state().document.comments)?void 0:t.items)??{}});return x(()=>{B(),queueMicrotask(H)}),(()=>{var u=MR(),p=u.firstChild,f=p.firstChild,b=f.firstChild,v=b.firstChild,y=v.nextSibling,x=y.nextSibling;Ie(u,K(re,{get when(){return pe(()=>!!t().showHorizontalRuler)()&&n().toolbarHost},get children(){return K(sb,{get state(){return e.state},get toolbarHost(){return n().toolbarHost},viewportRef:d,readOnly:()=>Boolean(t().readOnly),zoomFactor:k})}}),p),ye(p,"contextmenu",r().onEditorContextMenu,!0),ye(p,"mousedown",r().onEditorMouseDown,!0),ye(p,"drop",r().onDrop),ye(p,"dragover",r().onDragOver),Ae(e=>{var t,n;s=e,c(e),null==(n=(t=a()).onViewportRef)||n.call(t,e);const r=()=>{H()};e.addEventListener("scroll",r,{passive:!0}),queueMicrotask(H);const o=()=>{V({width:e.clientWidth,height:e.clientHeight})};let i;o(),"undefined"!=typeof ResizeObserver&&(i=new ResizeObserver(o),i.observe(e)),C(()=>{e.removeEventListener("scroll",r),null==i||i.disconnect()})},p),Ae(e=>{var t,n;l=e,null==(n=(t=a()).onSurfaceRef)||n.call(t,e);const r=()=>{E(e.offsetHeight)};let o;r(),queueMicrotask(r),"undefined"!=typeof ResizeObserver&&(o=new ResizeObserver(r),o.observe(e)),C(()=>null==o?void 0:o.disconnect())},b),Ie(b,K(Gm,{get state(){return e.state},get documentLayout(){return t().documentLayout},get remoteWebFonts(){return t().remoteWebFonts},get measuredBlockHeights(){return t().measuredBlockHeights},get measuredParagraphLayouts(){return t().measuredParagraphLayouts},viewportRef:()=>s??void 0,get onSurfaceMouseDown(){return r().onSurfaceMouseDown},get onSurfaceClick(){return r().onSurfaceClick},get onSurfaceMouseMove(){return r().onSurfaceMouseMove},get onSurfaceDblClick(){return r().onSurfaceDblClick},get onParagraphMouseDown(){return r().onParagraphMouseDown},get onImageMouseDown(){return r().onImageMouseDown},get onImageResizeHandleMouseDown(){return r().onImageResizeHandleMouseDown},get onTextBoxResizeHandleMouseDown(){return r().onTextBoxResizeHandleMouseDown},get onTableDragHandleMouseDown(){return r().onTableDragHandleMouseDown},get onTableCornerResizeHandleMouseDown(){return r().onTableCornerResizeHandleMouseDown},get onRevisionMouseEnter(){return r().onRevisionMouseEnter},get onRevisionMouseLeave(){return r().onRevisionMouseLeave}}),v),Ie(b,K(re,{get when(){return n().hoveredRevision()},children:e=>K(gb,{get box(){return e()}})}),v),Ie(b,K(re,{get when(){return n().selectionBoxes().length>0},get children(){return K(hb,{get boxes(){return n().selectionBoxes()}})}}),v),Ie(b,K(re,{get when(){return n().commentHighlights().length>0},get children(){return K(xb,{get boxes(){return n().commentHighlights},commentsById:Y})}}),v),Ie(b,K(re,{get when(){return(null==(t=(e=n()).imageCropMode)?void 0:t.call(e))??!1;var e,t},get fallback(){return K(sR,{box:G,get readOnly(){return Boolean(t().readOnly)},variantClass:"oasis-editor-image-selection-overlay",rotation:()=>{var e;return(null==(e=G())?void 0:e.rotation)??0},onResizeStart:(e,t)=>{const n=G();n&&(t.preventDefault(),t.stopPropagation(),r().onImageResizeHandleMouseDown(n.paragraphId,n.startOffset,e,t))},onRotateStart:e=>{const t=G();t&&r().onImageRotateHandleMouseDown(t.paragraphId,t.startOffset,e)},onBodyMouseDown:e=>{const t=G();t&&r().onImageMouseDown(t.paragraphId,t.startOffset,e)}})},get children(){return[K(uR,{box:G,image:()=>{var e;return(null==(e=j())?void 0:e.image)??null},src:()=>{var e;return(null==(e=j())?void 0:e.src)??""},rotation:()=>{var e;return(null==(e=G())?void 0:e.rotation)??0}}),K(sR,{box:G,get readOnly(){return Boolean(t().readOnly)},variantClass:"oasis-editor-image-crop-overlay",rotation:()=>{var e;return(null==(e=G())?void 0:e.rotation)??0},onResizeStart:(e,t)=>{var n,a;const o=G();o&&(t.preventDefault(),t.stopPropagation(),null==(a=(n=r()).onImageCropHandleMouseDown)||a.call(n,o.paragraphId,o.startOffset,e,t))},onBodyMouseDown:e=>{var t,n;const a=G();a&&(null==(n=(t=r()).onImageCropBodyMouseDown)||n.call(t,a.paragraphId,a.startOffset,e))}})]}}),v),Ie(b,K(sR,{box:Z,get readOnly(){return Boolean(t().readOnly)},variantClass:"oasis-editor-textbox-selection-overlay",rotation:()=>{var e;return(null==(e=Z())?void 0:e.rotation)??0},onResizeStart:(e,t)=>{const n=Z();n&&(t.preventDefault(),t.stopPropagation(),r().onTextBoxResizeHandleMouseDown(n.paragraphId,n.startOffset,e,t))},onRotateStart:e=>{const t=Z();t&&r().onTextBoxRotateHandleMouseDown(t.paragraphId,t.startOffset,e)}}),v),Ie(b,K(hR,{box:X,get readOnly(){return Boolean(t().readOnly)},onMoveStart:e=>{const t=X();t&&r().onTableDragHandleMouseDown(t.tableId,e)},onResizeStart:e=>{const t=X();t&&r().onTableCornerResizeHandleMouseDown(t.tableId,e)}}),v),Ie(b,K(re,{get when(){return n().layoutOptions},children:e=>K(Vb,{box:()=>G()??Z(),get layoutOptions(){return e()},surfaceRef:()=>l,get readOnly(){return Boolean(t().readOnly)}})}),v),Ie(b,K(re,{get when(){return n().showCaret()},get children(){return K(cb,{get active(){return n().focused()},get left(){return n().caretBox().left},get top(){return n().caretBox().top},get height(){return n().caretBox().height}})}}),v),ye(v,"paste",o().onPaste),ye(v,"keydown",o().onKeyDown,!0),ye(v,"input",o().onInput,!0),ye(v,"focus",o().onInputFocus),ye(v,"cut",o().onCut),ye(v,"copy",o().onCopy),ye(v,"compositionstart",o().onCompositionStart),ye(v,"compositionend",o().onCompositionEnd),ye(v,"blur",o().onInputBlur);var M=a().onTextareaRef;"function"==typeof M?Ae(M,v):a().onTextareaRef=v,be(v,"spellcheck",!1),ye(y,"change",i().onImportInputChange);var T=a().onImportInputRef;"function"==typeof T?Ae(T,y):a().onImportInputRef=y,ye(x,"change",i().onImageInputChange);var R=a().onImageInputRef;return"function"==typeof R?Ae(R,x):a().onImageInputRef=x,Ie(u,K(vR,{get progress(){return n().importProgress}}),null),Ie(u,K(xR,{wordCount:m,characterCount:g,currentPage:U,totalPages:W,zoomPercent:S,adjustZoom:I,setZoomPercent:A,get persistenceStatus(){return n().persistenceStatus}}),null),w(e=>{var a="oasis-editor-editor-shell"+(t().class?` ${t().class}`:""),r=h(),o=`${z()}px`,i=`${P()}px`,l=`${O()}px`,s=`${N()}px`,d=L().height/k()+"px",c=`scale(${k()})`,p=t().readOnly,g=`${n().inputBox().left}px`,m=`${n().inputBox().top}px`,w=`${n().inputBox().height}px`,x=eR.flatMap(e=>e.accept).join(",");return a!==e.e&&ve(u,e.e=a),e.t=xe(u,r,e.t),o!==e.a&&Me(f,"width",e.a=o),i!==e.o&&Me(f,"height",e.o=i),l!==e.i&&Me(b,"left",e.i=l),s!==e.n&&Me(b,"width",e.n=s),d!==e.s&&Me(b,"min-height",e.s=d),c!==e.h&&Me(b,"transform",e.h=c),p!==e.r&&(v.readOnly=e.r=p),g!==e.d&&Me(v,"left",e.d=g),m!==e.l&&Me(v,"top",e.l=m),w!==e.u&&Me(v,"height",e.u=w),x!==e.c&&be(y,"accept",e.c=x),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0,u:void 0,c:void 0}),u})()}function AR(e,t){const n=e=>void 0===e?0:e/ht,a=e.positionH,r=e.positionV,o="page"===(null==a?void 0:a.relativeFrom)?t.pageLeft:"character"===(null==a?void 0:a.relativeFrom)?t.lineLeftOffset+t.slotLeft:t.contentLeft,i="page"===(null==r?void 0:r.relativeFrom)?t.pageTop:"line"===(null==r?void 0:r.relativeFrom)?t.lineTopOffset+t.lineTop:"margin"===(null==r?void 0:r.relativeFrom)?t.contentTop:t.paragraphTop;return{left:o+n(null==a?void 0:a.offset),top:i+n(null==r?void 0:r.offset)}}function IR(e){const t=[];for(const n of e.lines)for(const a of n.fragments){const r=a.image;if(!(null==r?void 0:r.floating))continue;const o=vg(n.slots,a.startOffset);if(!o)continue;const{left:i,top:l}=AR(r.floating,{pageLeft:e.pageLeft,pageTop:e.pageTop,contentLeft:e.contentLeft,contentTop:e.contentTop,paragraphTop:e.paragraphTop,lineTopOffset:e.lineTopOffset,lineLeftOffset:e.lineLeftOffset,lineTop:n.top,slotLeft:o.left});t.push({paragraphId:e.paragraphId,paragraphIndex:e.paragraphIndex,zone:e.zone,footnoteId:e.footnoteId,pageIndex:e.pageIndex,startOffset:a.startOffset,endOffset:yg(a.startOffset,a.endOffset),left:i,top:l,width:r.width,height:r.height,rotation:r.rotation,behindDoc:r.floating.behindDoc})}return t}function CR(e){const t=[];for(const n of e.lines)for(const a of n.fragments){const r=a.textBox;if(!(null==r?void 0:r.floating))continue;const o=vg(n.slots,a.startOffset);if(!o)continue;const{left:i,top:l}=AR(r.floating,{pageLeft:e.pageLeft,pageTop:e.pageTop,contentLeft:e.contentLeft,contentTop:e.contentTop,paragraphTop:e.paragraphTop,lineTopOffset:e.lineTopOffset,lineLeftOffset:e.lineLeftOffset,lineTop:n.top,slotLeft:o.left});t.push({paragraphId:e.paragraphId,paragraphIndex:e.paragraphIndex,zone:e.zone,footnoteId:e.footnoteId,pageIndex:e.pageIndex,startOffset:a.startOffset,endOffset:yg(a.startOffset,a.endOffset),left:i,top:l,width:r.width,height:e.resolveHeight(r),rotation:r.rotation,behindDoc:r.floating.behindDoc})}return t}function TR(e,t,n){return e.map(e=>({startOffset:e.startOffset,endOffset:e.endOffset,top:n+e.top,height:e.height,slots:e.slots.map(e=>({offset:e.offset,left:t+e.left,top:n+e.top,height:e.height}))}))}function kR(e){const t={x:e.cell.contentLeft,y:e.cell.contentTop,width:e.cell.contentWidth,height:e.cell.contentHeight},n=[];if("stack"===e.verticalMode){const{glyphs:a,endColumnRight:r}=gf(e.paragraph,e.state,t,e.carry.stackColumnRight);for(const e of a)n.push({offset:e.offset,left:e.centerX,top:e.top,height:e.height});const o=a[a.length-1];n.push({offset:e.textLength,left:o?o.centerX:t.x+t.width,top:o?o.top+o.height:t.y,height:o?o.height:16}),e.carry.stackColumnRight=r}else{const a=e.verticalMode;for(const r of e.paragraphLines){let o=8;for(let i=0;i<r.slots.length;i+=1){const l=r.slots[i],s=r.slots[i+1],d=s?Math.max(1,s.left-l.left):o;o=d;const c=cf(t,a,l.left,e.carry.rotatedCursorY+l.top,d,l.height);n.push({offset:l.offset,left:c.left,top:c.top,height:c.height})}}e.carry.rotatedCursorY+=e.paragraphHeight}0===n.length&&n.push({offset:0,left:t.x+t.width,top:t.y,height:16});let a=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;for(const o of n)a=Math.min(a,o.top),r=Math.max(r,o.top+o.height);return[{startOffset:0,endOffset:e.textLength,top:a,height:Math.max(1,r-a),slots:n}]}function RR(e,t){const{state:n,page:a,pageRect:r,paragraphIndexById:o,snapshotParagraphs:i,inlineImages:l,floatingImages:s,inlineTextBoxes:d,floatingTextBoxes:c}=e,{zone:u,block:p,blockContentLeft:h,blockContentWidth:f,cursorY:g,startTop:m,blockFootnoteId:b}=t;if("paragraph"!==p.sourceBlock.type||!p.layout)return;const v=p.sourceBlock,y=v.id,w=o.get(y)??0,x=sn(v.style,n.document.styles),M=g+(0===p.layout.startOffset?x.spacingBefore??0:0);i.push({paragraph:v,paragraphId:y,paragraphIndex:w,zone:u,footnoteId:b,pageIndex:a.index,startOffset:p.layout.startOffset??0,endOffset:p.layout.endOffset??Yt(v).length,textLength:Yt(v).length,left:h,top:g,width:f,height:Math.max(0,p.estimatedHeight),lines:TR(p.layout.lines,h,M)}),l.push(...xg({lines:p.layout.lines,paragraphId:y,paragraphIndex:w,zone:u,footnoteId:b,pageIndex:a.index,lineTopOffset:M,lineLeftOffset:h})),s.push(...IR({lines:p.layout.lines,paragraphId:y,paragraphIndex:w,zone:u,footnoteId:b,pageIndex:a.index,pageLeft:r.left,pageTop:r.top,contentLeft:h,contentTop:m,paragraphTop:M,lineTopOffset:M,lineLeftOffset:h})),d.push(...Mg({lines:p.layout.lines,paragraphId:y,paragraphIndex:w,zone:u,footnoteId:b,pageIndex:a.index,lineTopOffset:M,lineLeftOffset:h,resolveHeight:e=>gg(e,n,a.index)})),c.push(...CR({lines:p.layout.lines,paragraphId:y,paragraphIndex:w,zone:u,footnoteId:b,pageIndex:a.index,pageLeft:r.left,pageTop:r.top,contentLeft:h,contentTop:m,contentWidth:f,paragraphTop:M,lineTopOffset:M,lineLeftOffset:h,resolveHeight:e=>gg(e,n,a.index)}))}function ER(e,t){var n,a;const{state:r,page:o,pageRect:i,paragraphIndexById:l,snapshotParagraphs:s,inlineImages:d,floatingImages:c,inlineTextBoxes:u,floatingTextBoxes:p,floatingTables:h,unsupportedRegions:f}=e,{zone:g,block:m,blockContentLeft:b,blockContentWidth:v,cursorY:y,startTop:w,blockFootnoteId:x}=t;if("table"!==m.sourceBlock.type)return;const M=null==(n=m.sourceBlock.style)?void 0:n.floating,S=M?fp({floating:M,pageSettings:o.pageSettings,contentLeft:b-i.left,contentTop:w-i.top,contentWidth:v,anchorTop:y-i.top,width:Cf(m.sourceBlock,v),height:m.floatingTableHeight??1,pageIndex:o.index}):void 0;S&&(S.y+=m.floatingTableOffsetY??0),S&&h.push({tableId:m.sourceBlock.id,zone:g,footnoteId:x,pageIndex:o.index,left:i.left+S.x,top:i.top+S.y,width:S.width,height:S.height});const A=Vf({table:m.tableSegment?tl(m.sourceBlock,m.tableSegment):m.sourceBlock,state:r,pageIndex:o.index,originX:S?i.left+S.x:b,originY:S?i.top+S.y:y,contentWidth:v,estimatedHeight:m.floatingTableHeight??m.estimatedHeight});for(const k of A.unsupported)f.push({pageIndex:o.index,zone:g,footnoteId:x,left:A.left,top:A.top,width:A.width,height:A.height,reason:k});const I=m.tableSegment,C=I&&I.startRowIndex>0?I.repeatedHeaderRowCount:0,T=e=>I?e<C?e:I.startRowIndex+(e-C):e;for(const k of A.cells){const e="horizontal"!==k.verticalMode,t={stackColumnRight:k.contentLeft+k.contentWidth,rotatedCursorY:0};for(const n of k.paragraphs){const h=n.paragraph.id,f=l.get(h)??0,m=Yt(n.paragraph).length,b=e?kR({paragraph:n.paragraph,paragraphLines:n.lines,paragraphHeight:n.height,textLength:m,cell:k,verticalMode:k.verticalMode,state:r,carry:t}):TR(n.lines,n.originX,n.originY);s.push({paragraph:n.paragraph,paragraphId:h,paragraphIndex:f,zone:g,footnoteId:x,pageIndex:o.index,startOffset:0,endOffset:m,textLength:m,left:n.originX,top:n.originY,width:n.width,height:n.height,lines:b,verticalMode:e?k.verticalMode:void 0,tableCell:{tableId:k.tableId,rowIndex:T(k.rowIndex),cellIndex:k.cellIndex,left:k.left,top:k.top,width:k.width,height:k.height,anchorPosition:k.anchorPosition,revisionId:null==(a=k.revision)?void 0:a.id}}),d.push(...xg({lines:n.lines,paragraphId:h,paragraphIndex:f,zone:g,footnoteId:x,pageIndex:o.index,lineTopOffset:n.originY,lineLeftOffset:n.originX})),c.push(...IR({lines:n.lines,paragraphId:h,paragraphIndex:f,zone:g,footnoteId:x,pageIndex:o.index,pageLeft:i.left,pageTop:i.top,contentLeft:n.originX,contentTop:n.originY,paragraphTop:n.originY,lineTopOffset:n.originY,lineLeftOffset:n.originX})),u.push(...Mg({lines:n.lines,paragraphId:h,paragraphIndex:f,zone:g,footnoteId:x,pageIndex:o.index,lineTopOffset:n.originY,lineLeftOffset:n.originX,resolveHeight:e=>gg(e,r,o.index)})),p.push(...CR({lines:n.lines,paragraphId:h,paragraphIndex:f,zone:g,footnoteId:x,pageIndex:o.index,pageLeft:i.left,pageTop:i.top,contentLeft:n.originX,contentTop:n.originY,contentWidth:n.width,paragraphTop:n.originY,lineTopOffset:n.originY,lineLeftOffset:n.originX,resolveHeight:e=>gg(e,r,o.index)}))}}}function LR(e){const{surface:t,state:n,documentLayout:a}=e,r=e.zoomFactor&&e.zoomFactor>0?e.zoomFactor:1,o=function(e){return Array.from(e.querySelectorAll('[data-renderer="canvas"][data-page-index]')).sort((e,t)=>Number(e.dataset.pageIndex??"0")-Number(t.dataset.pageIndex??"0"))}(t);if(0===a.pages.length||0===o.length)return null;const i=new Map(o.map(e=>[Number(e.dataset.pageIndex??"-1"),e])),l=vn(n.document),s=new Map(l.map((e,t)=>[e.id,t])),d=t.getBoundingClientRect(),c=[],u=[],p=[],h=[],f=[],g=[],m=[],b=[];for(const y of a.pages){const e=i.get(y.index)??null;if(!e)continue;const t=e.getBoundingClientRect(),a={left:d.left+(t.left-d.left)/r,top:d.top+(t.top-d.top)/r,width:t.width/r,height:t.height/r},o=y.bodyTop??Kt(y.pageSettings),l=y.bodyBottom??Xt(y.pageSettings),v=y.headerTop??Zt(y.pageSettings),w=y.footerTop??y.bodyBottom??Xt(y.pageSettings),x={index:y.index,left:a.left,top:a.top,width:a.width,height:a.height,bodyTop:o,bodyBottom:l,footerTop:w,footnoteTop:y.footnoteTop,footnoteSeparatorTop:y.footnoteSeparatorTop};c.push(x);const M=a.left+y.pageSettings.margins.left+y.pageSettings.margins.gutter,S=Ut(y.pageSettings),A={state:n,page:y,pageRect:a,paragraphIndexById:s,snapshotParagraphs:u,inlineImages:p,floatingImages:h,inlineTextBoxes:f,floatingTextBoxes:g,floatingTables:m,unsupportedRegions:b},I=(e,t,n,r={})=>{var o;let i=n,l=r.contentLeft??M,s=r.contentWidth??S;const d=Gt(y.pageSettings);let c;for(const u of t){if(void 0!==u.columnIndex&&u.columnIndex!==c){c=u.columnIndex;const e=d[u.columnIndex]??d[0];l=a.left+e.left,s=e.width,i=n}const t={zone:e,block:u,blockContentLeft:l,blockContentWidth:s,cursorY:i,startTop:n,blockFootnoteId:(null==(o=r.footnoteIdForBlock)?void 0:o.call(r,u))??r.footnoteId};"paragraph"===u.sourceBlock.type&&u.layout?RR(A,t):"table"===u.sourceBlock.type&&ER(A,t),i+=Math.max(0,u.estimatedHeight)+(r.blockGap??0)}};if(I("header",y.headerBlocks??[],a.top+v),I("main",y.blocks,a.top+o),y.footnoteBlocks&&void 0!==y.footnoteTop){const e=y.footnoteReferenceIds??[];I("footnote",y.footnoteBlocks,a.top+y.footnoteTop,{footnoteIdForBlock:t=>e.find(e=>t.blockId.startsWith(`${e}:`)),contentLeft:M+Zd,contentWidth:Math.max(24,S-Zd),blockGap:2})}I("footer",y.footerBlocks??[],a.top+w)}const v=new Map;for(const y of u){const e=v.get(y.paragraphId)??[];e.push(y),v.set(y.paragraphId,e)}for(const[y,w]of v.entries())w.sort((e,t)=>e.pageIndex!==t.pageIndex?e.pageIndex-t.pageIndex:e.startOffset!==t.startOffset?e.startOffset-t.startOffset:e.top-t.top),v.set(y,w);return{surfaceRect:d,pages:c,paragraphs:u,paragraphsById:v,inlineImages:p,floatingImages:h,inlineTextBoxes:f,floatingTextBoxes:g,floatingTables:m,unsupportedRegions:b}}function VR(e){return Ac(e,2)}function NR(){let e=null;return{getCanvasLayoutSnapshot:t=>{const n=t.zoomFactor&&t.zoomFactor>0?t.zoomFactor:1,a=function(e){const t=e.getBoundingClientRect(),n=Array.from(e.querySelectorAll('[data-renderer="canvas"][data-page-index]')).sort((e,t)=>Number(e.dataset.pageIndex??"0")-Number(t.dataset.pageIndex??"0")),a=["surface",VR(t.left),VR(t.top),VR(t.width),VR(t.height)];for(const r of n){const e=r.getBoundingClientRect();a.push(Number(r.dataset.pageIndex??"0"),VR(e.left),VR(e.top),VR(e.width),VR(e.height))}return a.join(":")}(t.surface);if(e&&e.surface===t.surface&&e.documentLayout===t.documentLayout&&e.zoomFactor===n&&e.domRectSignature===a)return e.snapshot;const r=LR({surface:t.surface,state:t.state,documentLayout:t.documentLayout,zoomFactor:n});return e={surface:t.surface,documentLayout:t.documentLayout,zoomFactor:n,domRectSignature:a,snapshot:r},r},clear:()=>{e=null}}}me(["mousedown","contextmenu","input","keydown"]);var zR=ge("<button>");function PR(e){const[t,n]=_(e,["type","icon","label","active","class","classList"]);return Se(a=zR(),$({get type(){return t.type??"button"},get class(){return`oasis-editor-plugin-floating-action ${t.class??""}`},get classList(){return{"is-active":t.active,...t.classList}},get"aria-label"(){return t.label},get title(){return t.label}},n),!1,!0),Ie(a,K(vr,{get name(){return t.icon}})),a;var a}var OR=ge("<aside>"),qR=ge("<div>");function BR(e){const[t,n]=_(e,["mode","width","class","classList","children","style"]);return Se(a=OR(),$({get class(){return`oasis-editor-plugin-side-panel ${t.class??""}`},get classList(){return{[`oasis-editor-plugin-side-panel-${t.mode??"dock"}`]:!0,...t.classList}},get style(){return{"--oasis-plugin-side-panel-width":"number"==typeof t.width?`${t.width}px`:t.width??"360px",...t.style}}},n),!1,!0),Ie(a,()=>t.children),a;var a}function WR(e){const[t,n]=_(e,["class","children"]);return Se(a=qR(),$({get class(){return`oasis-editor-plugin-side-panel-header ${t.class??""}`}},n),!1,!0),Ie(a,()=>t.children),a;var a}function FR(e){const[t,n]=_(e,["class","children"]);return Se(a=qR(),$({get class(){return`oasis-editor-plugin-side-panel-body ${t.class??""}`}},n),!1,!0),Ie(a,()=>t.children),a;var a}var DR=ge("<button>");function HR(e){const[t,n]=_(e,["type","icon","label","active","variant","size","class","classList"]);return Se(a=DR(),$({get type(){return t.type??"button"},get class(){return`oasis-editor-ui-icon-button ${t.class??""}`},get classList(){return{[`oasis-editor-ui-icon-button-${t.variant??"ghost"}`]:!0,[`oasis-editor-ui-icon-button-${t.size??"md"}`]:!0,"is-active":t.active,...t.classList}},get"aria-label"(){return t.label},get title(){return t.label}},n),!1,!0),Ie(a,K(vr,{get name(){return t.icon}})),a;var a}var UR=ge("<div class=oasis-editor-plugin-floating-actions>"),GR=ge("<div class=oasis-editor-plugin-ui-host><div class=oasis-editor-plugin-ui-main>"),jR=ge("<div class=oasis-editor-plugin-side-panel-overlay>"),ZR=ge("<div class=oasis-editor-plugin-side-panel-title>");const KR={floatingActions:[],sidePanels:[],activeSidePanelId:null};function XR(e){const t=Fe(),n=E(()=>e.children),[a,r]=y(KR);x(()=>{const t=e.editor();r(t.ui.getSnapshot());C(t.ui.onChange(()=>{r(t.ui.getSnapshot())}))});const o=M(()=>a().sidePanels.find(e=>e.id===a().activeSidePanelId)),i=()=>{var e;return(null==(e=o())?void 0:e.mode)??"dock"},l=()=>"dock"===i()?o():void 0,s=()=>a().floatingActions.filter(e=>"container"===(e.scope??"container")),d=()=>a().floatingActions.filter(e=>"viewport"===e.scope),c=(n,a=!1)=>K(ne,{get each(){return function(e){const t=new Map;for(const n of e){const e=n.placement??"bottom-right";t.set(e,[...t.get(e)??[],n])}return Array.from(t.entries()).map(([e,t])=>({placement:e,actions:t}))}(n())},children:n=>{return Ie(r=UR(),K(ne,{get each(){return n.actions},children:n=>K(PR,{get icon(){return n.icon??"sparkles"},get label(){return function(e,t){return e.tooltip?e.tooltip:e.labelKey?t(e.labelKey):e.label??e.id}(n,t)},get disabled(){return!function(e,t){const n=Je(t.command);return e.commands.canExecute(n.name,n.payload)}(e.editor(),n)},get"data-testid"(){return`plugin-floating-action-${n.id}`},onClick:()=>function(e,t){const n=Je(t.command);e.commands.execute(n.name,n.payload)}(e.editor(),n)})})),w(e=>we(r,{[`oasis-editor-plugin-floating-actions-${n.placement}`]:!0,"oasis-editor-plugin-floating-actions-viewport":a},e)),r;var r}});return Ie((u=GR()).firstChild,n),Ie(u,K(re,{get when(){return l()},children:n=>YR(e.editor,n(),t)}),null),Ie(u,K(re,{get when(){return"overlay"===i()?o():void 0},children:n=>{return Ie(a=jR(),()=>YR(e.editor,n(),t)),a;var a}}),null),Ie(u,()=>c(s),null),Ie(u,K(re,{get when(){return d().length>0},get children(){return K(ze,{get children(){return c(d,!0)}})}}),null),w(()=>u.classList.toggle("has-docked-side-panel",!!Boolean(l()))),u;var u}function YR(e,t,n){const a=()=>e().ui.closeSidePanel(t.id);return K(BR,{get mode(){return t.mode??"dock"},get width(){return t.width},get"data-testid"(){return`plugin-side-panel-${t.id}`},get children(){return[K(WR,{get children(){return[(e=ZR(),Ie(e,K(re,{get when(){return t.icon},get children(){return K(xr,{class:"oasis-editor-plugin-side-panel-icon",get children(){return K(vr,{get name(){return t.icon}})}})}}),null),Ie(e,K(xr,{get children(){return pe(()=>!!t.titleKey)()?n(t.titleKey):t.title}}),null),e),K(HR,{icon:"x",label:"Close panel",size:"sm",onClick:a})];var e}}),K(FR,{get children(){return t.render({editor:e(),commands:e().commands,ui:e().ui,panelId:t.id,closePanel:a,getState:()=>e().state,getDocument:()=>e().state.document,getSelection:()=>e().state.selection})}})]}})}var JR=ge("<div class=oasis-editor-main-container><section class=oasis-editor-stage>");function QR(e){let t,n;const a=NR(),r=n=>{var a,r;t=n,null==(r=(a=e.refs).onSurfaceRef)||r.call(a,n)},o=t=>{var a,r;n=t,null==(r=(a=e.refs).onViewportRef)||r.call(a,t)},i=r=>{var o,i;if(!t)return;const l=a.getCanvasLayoutSnapshot({surface:t,state:e.state,documentLayout:e.documentLayout(),zoomFactor:null==(i=(o=e.layout).zoomFactor)?void 0:i.call(o)});if(!l)return;const s=Or(l,r)[0];if(!s)return;const d=n,c=s.top;if(d){const e=d.getBoundingClientRect();return void d.scrollTo({top:d.scrollTop+(c-e.top)-24,behavior:"smooth"})}window.scrollTo({top:window.scrollY+c-24,behavior:"smooth"})};return[K(re,{get when(){return e.showChrome},get children(){return[K(re,{get when(){return"compact"===e.toolbarView},get children(){return K(re,{get when(){return e.showTitleBar},get fallback(){return K(re,{get when(){return e.showMenubar},get children(){return K(kr,{get host(){return e.toolbarHost},get registry(){return e.menuRegistry}})}})},get children(){return K(Lr,{get children(){return K(re,{get when(){return e.showMenubar},get children(){return K(kr,{get host(){return e.toolbarHost},get registry(){return e.menuRegistry}})}})}})}})}}),K(re,{get when(){return e.showToolbar},get children(){return K(_i,{get host(){return e.toolbarHost},get registry(){return e.toolbarRegistry},get showFileGroup(){return!!pe(()=>"ribbon"===e.toolbarView)()||!e.showMenubar},get view(){return e.toolbarView},get layout(){return e.toolbarLayout}})}})]}}),K(XR,{get editor(){return e.runtimeEditor},get children(){var l=JR(),s=l.firstChild;return Ie(l,K(re,{get when(){return pe(()=>!!e.showChrome)()&&e.showOutline},get children(){return K(Hr,{get state(){return e.state},onNavigate:i,surfaceRef:()=>t,viewportRef:()=>n,get documentLayout(){return e.documentLayout},get zoomFactor(){return e.layout.zoomFactor},snapshotProvider:a})}}),s),Ie(s,K(SR,{state:()=>e.state,get layout(){return{...e.layout,documentLayout:e.documentLayout,showHorizontalRuler:e.showChrome,measuredBlockHeights:()=>e.measuredBlockHeights(),measuredParagraphLayouts:()=>e.measuredParagraphLayouts(),viewportHeight:e.viewportHeight(),readOnly:e.isReadOnly}},get overlays(){return{...e.overlays,toolbarHost:e.toolbarHost,persistenceStatus:()=>e.persistenceStatus()}},get refs(){return{...e.refs,onViewportRef:o,onSurfaceRef:r}},get surfaceHandlers(){return e.surfaceHandlers},get inputHandlers(){return e.inputHandlers},get fileHandlers(){return e.fileHandlers}})),l}})]}var $R=ge("<div class=oasis-editor-main-container><section class=oasis-editor-stage style=padding:0>"),_R=ge('<div class=oasis-inline-shell style="border:1px solid var(--oasis-toolbar-border);border-radius:var(--oasis-radius);overflow:hidden;display:flex;flex-direction:column">');function eE(e){return Ie(t=_R(),K(re,{get when(){return pe(()=>!!e.showChrome)()&&e.showToolbar},get children(){return K(_i,{get host(){return e.toolbarHost},get registry(){return e.toolbarRegistry},get view(){return e.toolbarView},get layout(){return e.toolbarLayout}})}}),null),Ie(t,K(XR,{get editor(){return e.runtimeEditor},get children(){var t=$R();return Ie(t.firstChild,K(SR,{state:()=>e.state,get layout(){return{...e.layout,documentLayout:e.documentLayout,measuredBlockHeights:()=>e.measuredBlockHeights(),measuredParagraphLayouts:()=>e.measuredParagraphLayouts(),viewportHeight:e.viewportHeight(),readOnly:e.isReadOnly}},get overlays(){return{...e.overlays,toolbarHost:e.toolbarHost,persistenceStatus:()=>e.persistenceStatus()}},get refs(){return e.refs},get surfaceHandlers(){return e.surfaceHandlers},get inputHandlers(){return e.inputHandlers},get fileHandlers(){return e.fileHandlers}})),t}}),null),t;var t}var tE=ge("<div class=oasis-editor-main-container><section class=oasis-editor-stage style=padding:0>"),nE=ge("<div class=oasis-balloon-shell>");function aE(e){return Ie(t=nE(),K(XR,{get editor(){return e.runtimeEditor},get children(){var t=tE();return Ie(t.firstChild,K(SR,{state:()=>e.state,get layout(){return{...e.layout,documentLayout:e.documentLayout,measuredBlockHeights:()=>e.measuredBlockHeights(),measuredParagraphLayouts:()=>e.measuredParagraphLayouts(),viewportHeight:e.viewportHeight(),readOnly:e.isReadOnly}},get overlays(){return{...e.overlays,toolbarHost:e.toolbarHost,persistenceStatus:()=>e.persistenceStatus()}},get refs(){return e.refs},get surfaceHandlers(){return e.surfaceHandlers},get inputHandlers(){return e.inputHandlers},get fileHandlers(){return e.fileHandlers}})),t}})),t;var t}var rE=ge("<div class=oasis-editor-dialog-footer data-testid=editor-dialog-footer>"),oE=ge("<div class=oasis-editor-dialog-overlay><div role=dialog aria-modal=true data-testid=editor-dialog><div class=oasis-editor-dialog-header><h3 class=oasis-editor-dialog-title></h3><button class=oasis-editor-dialog-close data-testid=editor-dialog-close><i data-lucide=x></i></button></div><div data-testid=editor-dialog-body>");function iE(e){const t=Fe();let n;const a=te(),r=M(()=>e.titleId??a),o=M(()=>e.size??"md"),i=M(()=>["oasis-editor-dialog",`oasis-editor-dialog-${o()}`,e.class].filter(Boolean).join(" ")),l=M(()=>["oasis-editor-dialog-body",e.bodyClass].filter(Boolean).join(" ")),s=t=>{"Escape"===t.key&&e.isOpen&&e.onClose()};return I(()=>{window.addEventListener("keydown",s)}),C(()=>{window.removeEventListener("keydown",s)}),K(re,{get when(){return e.isOpen},get children(){var a=oE(),o=a.firstChild,s=o.firstChild,d=s.firstChild,c=d.nextSibling,u=s.nextSibling;a.$$click=()=>{(e.closeOnOverlayClick??1)&&e.onClose()},o.$$click=e=>e.stopPropagation();return"function"==typeof n?Ae(n,o):n=o,Ie(d,()=>e.title),ye(c,"click",e.onClose,!0),Ie(u,()=>e.children),Ie(o,K(re,{get when(){return e.footer},get children(){var t=rE();return Ie(t,()=>e.footer),t}}),null),w(n=>{var a=i(),s=e.ariaLabel,p=e.ariaLabel?void 0:r(),h=e.ariaDescribedBy,f=r(),g=t("generic.close"),m=l();return a!==n.e&&ve(o,n.e=a),s!==n.t&&be(o,"aria-label",n.t=s),p!==n.a&&be(o,"aria-labelledby",n.a=p),h!==n.o&&be(o,"aria-describedby",n.o=h),f!==n.i&&be(d,"id",n.i=f),g!==n.n&&be(c,"title",n.n=g),m!==n.s&&ve(u,n.s=m),n},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),a}})}me(["click"]);var lE=ge("<div><div class=oasis-editor-tabs-list role=tablist>"),sE=ge("<button type=button role=tab class=oasis-editor-tabs-tab>"),dE=ge("<div role=tabpanel class=oasis-editor-tabs-panel>");function cE(e,t,n){if(e.length)for(let a=0;a<e.length;a+=1){const r=e[(t+a*n+e.length)%e.length];if(r&&!r.disabled)return r}}function uE(e){const t=te(),n=M(()=>e.items),a=M(()=>{var e,t;return(null==(e=n().find(e=>!e.disabled))?void 0:e.id)??(null==(t=n()[0])?void 0:t.id)??""}),[r,o]=y(e.defaultValue??a()),i=M(()=>e.value??r()??a()),l=M(()=>n().find(e=>e.id===i()&&!e.disabled)??n().find(e=>!e.disabled)),s=M(()=>["oasis-editor-tabs",e.class].filter(Boolean).join(" ")),d=[],c=(t,a=!1)=>{var r;t&&!t.disabled&&(void 0===e.value&&o(t.id),null==(r=e.onChange)||r.call(e,t.id),a&&queueMicrotask(()=>{var e;return null==(e=d[n().findIndex(e=>e.id===t.id)])?void 0:e.focus()}))},u=e=>{if("ArrowRight"!==e.key&&"ArrowLeft"!==e.key&&"Home"!==e.key&&"End"!==e.key)return;e.preventDefault();const t=Math.max(0,n().findIndex(e=>{var t;return e.id===(null==(t=l())?void 0:t.id)}));if("Home"===e.key)return c(cE(n(),0,1),!0);if("End"===e.key)return c(cE(n(),n().length-1,-1),!0);const a="ArrowRight"===e.key?1:-1;c(cE(n(),t+a,a),!0)};return p=lE(),(h=p.firstChild).$$keydown=u,Ie(h,K(ne,{get each(){return n()},children:(e,n)=>{const a=`${t}-${e.id}-tab`,r=`${t}-${e.id}-panel`;return(o=sE()).$$click=()=>c(e),Ae(e=>{d[n()]=e},o),be(o,"id",a),be(o,"aria-controls",r),Ie(o,()=>e.label),w(t=>{var n,a,r,i=(null==(n=l())?void 0:n.id)===e.id,s=e.disabled?"true":void 0,d=e.disabled,c=(null==(a=l())?void 0:a.id)===e.id?0:-1,u=!((null==(r=l())?void 0:r.id)!==e.id),p=e.testId;return i!==t.e&&be(o,"aria-selected",t.e=i),s!==t.t&&be(o,"aria-disabled",t.t=s),d!==t.a&&(o.disabled=t.a=d),c!==t.o&&be(o,"tabindex",t.o=c),u!==t.i&&o.classList.toggle("is-active",t.i=u),p!==t.n&&be(o,"data-testid",t.n=p),t},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),o;var o}})),Ie(p,K(ne,{get each(){return n()},children:e=>{return Ie(n=dE(),()=>e.panel),w(a=>{var r,o,i=`${t}-${e.id}-panel`,s=`${t}-${e.id}-tab`,d=(null==(r=l())?void 0:r.id)!==e.id,c=!((null==(o=l())?void 0:o.id)!==e.id);return i!==a.e&&be(n,"id",a.e=i),s!==a.t&&be(n,"aria-labelledby",a.t=s),d!==a.a&&(n.hidden=a.a=d),c!==a.o&&n.classList.toggle("is-active",a.o=c),a},{e:void 0,t:void 0,a:void 0,o:void 0}),n;var n}}),null),w(t=>{var n=s(),a=e.ariaLabel;return n!==t.e&&ve(p,t.e=n),a!==t.t&&be(h,"aria-label",t.t=a),t},{e:void 0,t:void 0}),p;var p,h}me(["keydown","click"]);var pE=ge("<button><span class=oasis-editor-ui-button-label>");function hE(e){const[t,n]=_(e,["type","variant","size","icon","iconPosition","fullWidth","class","classList","children"]),a=()=>t.iconPosition??"start";return r=pE(),o=r.firstChild,Se(r,$({get type(){return t.type??"button"},get class(){return`oasis-editor-ui-button ${t.class??""}`},get classList(){return{[`oasis-editor-ui-button-${t.variant??"secondary"}`]:!0,[`oasis-editor-ui-button-${t.size??"md"}`]:!0,"oasis-editor-ui-button-full":t.fullWidth,...t.classList}}},n),!1,!0),Ie(r,K(re,{get when(){return pe(()=>!!t.icon)()&&"start"===a()},get children(){return K(vr,{get name(){return t.icon}})}}),o),Ie(o,()=>t.children),Ie(r,K(re,{get when(){return pe(()=>!!t.icon)()&&"end"===a()},get children(){return K(vr,{get name(){return t.icon}})}}),null),r;var r,o}function fE(e){const[t,n]=_(e,["tone","as","class"]);return K(xr,$({get as(){return t.as??"span"},get tone(){return pe(()=>"success"===t.tone)()?"default":t.tone??"muted"},size:"sm",get class(){return`oasis-editor-ui-status-text ${t.class??""}`}},n))}var gE=ge("<div>");const mE=["xs","sm","md","lg","xl"];function bE(e){return void 0===e?{}:function(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)&&mE.some(t=>t in e)}(e)?e:{xs:e}}function vE(e){return"number"==typeof e?8*e+"px":e}function yE(e,t,n){const a={},r=bE(t);for(const o of mE){const t=r[o];void 0!==t&&(a[`--${e}-${o}`]=n(t))}return a}function wE(...e){const t=e.filter(e=>"object"==typeof e&&null!==e),n=e.find(e=>"string"==typeof e);if(n&&0===t.length)return n;if(n){const e=Object.assign({},...t),r=(a=e,Object.entries(a).map(([e,t])=>`${e}: ${String(t)}`).join("; "));return r?`${n}; ${r}`:n}var a;return Object.assign({},...t)}var xE=ge("<span class=oasis-editor-ui-stack-divider-item aria-hidden=true>");function ME(e){const[t,n]=_(e,["direction","spacing","divider","useFlexGap","alignItems","justifyContent","component","class","classList","style","children"]),a=E(()=>t.children),r=()=>{return e=a(),Array.isArray(e)?e:null==e||!1===e?[]:[e];var e};return K(Pe,$({get component(){return t.component??"div"},get class(){return`oasis-editor-ui-stack ${t.class??""}`},get classList(){return{"oasis-editor-ui-stack-flex-gap":!1!==t.useFlexGap,"oasis-editor-ui-stack-divider":Boolean(t.divider),...t.classList}},get style(){return wE(yE("oasis-stack-direction",t.direction??"column",String),yE("oasis-stack-spacing",t.spacing??0,vE),yE("oasis-stack-align",t.alignItems,String),yE("oasis-stack-justify",t.justifyContent,String),t.style)}},n,{get children(){return K(ne,{get each(){return r()},children:(e,n)=>[K(re,{get when(){return pe(()=>n()>0)()&&t.divider},get children(){var e=xE();return Ie(e,()=>(e=>"function"==typeof t.divider?t.divider(e):t.divider)(n())),e}}),e]})}}))}function SE(e){const t=mE.indexOf(e);let n="0px";for(let a=0;a<=t;a++)n=`var(--oasis-grid-column-spacing-${mE[a]}, ${n})`;return n}function AE(e){const[t,n]=_(e,["container","size","columns","spacing","rowSpacing","columnSpacing","direction","offset","wrap","alignItems","justifyContent","component","class","classList","style","children"]),a=()=>wE(function(e){const t={},n=bE(e);for(const a of mE){const e=n[a];if(void 0!==e){if("number"==typeof e){const n=`calc(${e} / var(--oasis-grid-columns-current) * 100% - ${SE(a)} * (var(--oasis-grid-columns-current) - ${e}) / var(--oasis-grid-columns-current))`;t[`--oasis-grid-size-basis-${a}`]=n,t[`--oasis-grid-size-grow-${a}`]="0",t[`--oasis-grid-size-max-${a}`]=n;continue}"grow"!==e?(t[`--oasis-grid-size-basis-${a}`]="auto",t[`--oasis-grid-size-grow-${a}`]="0",t[`--oasis-grid-size-max-${a}`]="none"):(t[`--oasis-grid-size-basis-${a}`]="0",t[`--oasis-grid-size-grow-${a}`]="1",t[`--oasis-grid-size-max-${a}`]="100%")}}return t}(t.size),function(e){const t={},n=bE(e);for(const a of mE){const e=n[a];void 0!==e&&(t[`--oasis-grid-offset-${a}`]="auto"===e?"auto":`calc(${e} / var(--oasis-grid-columns-current) * 100%)`)}return t}(t.offset),yE("oasis-grid-columns",t.columns,String),yE("oasis-grid-row-spacing",t.rowSpacing??t.spacing,vE),yE("oasis-grid-column-spacing",t.columnSpacing??t.spacing,vE),yE("oasis-grid-direction",t.direction??"row",String),yE("oasis-grid-wrap",t.wrap??"wrap",String),yE("oasis-grid-align",t.alignItems,String),yE("oasis-grid-justify",t.justifyContent,String),t.style);return K(Pe,$({get component(){return t.component??"div"},get class(){return`oasis-editor-ui-grid ${t.class??""}`},get classList(){return{"oasis-editor-ui-grid-container":t.container,"oasis-editor-ui-grid-item":!0,...t.classList}},get style(){return a()}},n,{get children(){return t.children}}))}var IE=ge("<label>"),CE=ge("<div>");function TE(e){const t=te(),[n,a]=_(e,["label","for","description","error","labelClass","class","classList","children"]);return Se(r=CE(),$({get class(){return`oasis-editor-ui-field ${n.class??""}`},get classList(){return n.classList}},a),!1,!0),Ie(r,K(re,{get when(){return n.label},get children(){var e=IE();return Ie(e,()=>n.label),w(t=>{var a=`oasis-editor-ui-field-label ${n.labelClass??""}`,r=n.for;return a!==t.e&&ve(e,t.e=a),r!==t.t&&be(e,"for",t.t=r),t},{e:void 0,t:void 0}),e}}),null),Ie(r,()=>n.children,null),Ie(r,K(re,{get when(){return n.description},get children(){return K(fE,{get id(){return n.for??`${t}-description`},class:"oasis-editor-ui-field-description",get children(){return n.description}})}}),null),Ie(r,K(re,{get when(){return n.error},get children(){return K(fE,{get id(){return n.for??`${t}-error`},tone:"danger",class:"oasis-editor-ui-field-error",get children(){return n.error}})}}),null),r;var r}var kE=ge("<span>"),RE=ge("<span class=oasis-editor-ui-field-description>"),EE=ge("<span class=oasis-editor-ui-field-error>"),LE=ge("<label><input>");function VE(e){const t=te(),[n,a]=_(e,["label","description","error","labelClass","controlClass","onChange","class","classList","id"]),r=()=>n.id??t,o=()=>`${r()}-description`,i=()=>`${r()}-error`;return l=LE(),s=l.firstChild,Ie(l,K(re,{get when(){return n.label},get children(){var e=kE();return Ie(e,()=>n.label),w(()=>ve(e,`oasis-editor-ui-field-label ${n.labelClass??""}`)),e}}),s),s.$$input=e=>{var t;return null==(t=n.onChange)?void 0:t.call(n,e.currentTarget.value)},Se(s,$({get id(){return r()},get class(){return`oasis-editor-ui-input ${n.controlClass??""}`},get"aria-invalid"(){return n.error?"true":void 0},get"aria-describedby"(){return[n.description?o():null,n.error?i():null].filter(Boolean).join(" ")}},a),!1,!1),Ie(l,K(re,{get when(){return n.description},get children(){var e=RE();return Ie(e,()=>n.description),w(()=>be(e,"id",o())),e}}),null),Ie(l,K(re,{get when(){return n.error},get children(){var e=EE();return Ie(e,()=>n.error),w(()=>be(e,"id",i())),e}}),null),w(e=>{var t=`oasis-editor-ui-field ${n.class??""}`,a=n.classList,o=r();return t!==e.e&&ve(l,e.e=t),e.t=we(l,a,e.t),o!==e.a&&be(l,"for",e.a=o),e},{e:void 0,t:void 0,a:void 0}),l;var l,s}me(["input"]);var NE=ge("<textarea>");function zE(e){const t=te(),[n,a]=_(e,["label","description","error","labelClass","controlClass","onChange","class","id"]),r=()=>n.id??t;return K(TE,{get class(){return n.class},get label(){return n.label},get for(){return r()},get labelClass(){return n.labelClass},get description(){return n.description},get error(){return n.error},get children(){var e=NE();return e.$$input=e=>{var t;return null==(t=n.onChange)?void 0:t.call(n,e.currentTarget.value)},Se(e,$({get id(){return r()},get class(){return`oasis-editor-ui-input oasis-editor-ui-textarea ${n.controlClass??""}`},get"aria-invalid"(){return n.error?"true":void 0},get"aria-describedby"(){return[n.description?`${r()}-description`:null,n.error?`${r()}-error`:null].filter(Boolean).join(" ")||void 0}},a),!1,!1),e}})}function PE(e){const[t,n]=_(e,["controlClass","onChange"]);return K(VE,$({type:"color",get controlClass(){return`oasis-editor-ui-color-input ${t.controlClass??""}`},get onChange(){return t.onChange}},n))}me(["input"]);var OE=ge("<span class=oasis-editor-ui-field-description>"),qE=ge("<span class=oasis-editor-ui-field-error>"),BE=ge("<label><input type=checkbox class=oasis-editor-ui-checkbox-input><span class=oasis-editor-ui-checkbox-copy><span class=oasis-editor-ui-field-label>");function WE(e){const t=te(),[n,a]=_(e,["label","description","error","onChange","class","id"]),r=()=>n.id??t,o=()=>`${r()}-description`,i=()=>`${r()}-error`;return l=BE(),s=l.firstChild,d=s.nextSibling,c=d.firstChild,s.addEventListener("change",e=>{var t;return null==(t=n.onChange)?void 0:t.call(n,e.currentTarget.checked)}),Se(s,$({get id(){return r()},get"aria-invalid"(){return n.error?"true":void 0},get"aria-describedby"(){return[n.description?o():null,n.error?i():null].filter(Boolean).join(" ")}},a),!1,!1),Ie(c,()=>n.label),Ie(d,K(re,{get when(){return n.description},get children(){var e=OE();return Ie(e,()=>n.description),w(()=>be(e,"id",o())),e}}),null),Ie(d,K(re,{get when(){return n.error},get children(){var e=qE();return Ie(e,()=>n.error),w(()=>be(e,"id",i())),e}}),null),w(e=>{var t=`oasis-editor-ui-checkbox ${n.class??""}`,a=r();return t!==e.e&&ve(l,e.e=t),a!==e.t&&be(l,"for",e.t=a),e},{e:void 0,t:void 0}),l;var l,s,d,c}var FE=ge("<span>"),DE=ge("<span class=oasis-editor-ui-field-description>"),HE=ge("<span class=oasis-editor-ui-field-error>"),UE=ge("<label><select>"),GE=ge("<option>");function jE(e){const t=te(),[n,a]=_(e,["label","description","error","labelClass","controlClass","options","onChange","class","classList","id","value"]),r=()=>void 0===n.value||null===n.value?"":String(n.value),o=()=>n.id??t,i=()=>`${o()}-description`,l=()=>`${o()}-error`;return s=UE(),d=s.firstChild,Ie(s,K(re,{get when(){return n.label},get children(){var e=FE();return Ie(e,()=>n.label),w(()=>ve(e,`oasis-editor-ui-field-label ${n.labelClass??""}`)),e}}),d),d.addEventListener("change",e=>{var t;return null==(t=n.onChange)?void 0:t.call(n,e.currentTarget.value)}),Se(d,$({get id(){return o()},get class(){return`oasis-editor-ui-select ${n.controlClass??""}`},get"aria-invalid"(){return n.error?"true":void 0},get"aria-describedby"(){return[n.description?i():null,n.error?l():null].filter(Boolean).join(" ")}},a,{get value(){return r()}}),!1,!0),Ie(d,K(ne,{get each(){return n.options},children:e=>{return Ie(t=GE(),()=>e.label),w(n=>{var a=e.disabled,o=e.value===r();return a!==n.e&&(t.disabled=n.e=a),o!==n.t&&(t.selected=n.t=o),n},{e:void 0,t:void 0}),w(()=>t.value=e.value),t;var t}})),Ie(s,K(re,{get when(){return n.description},get children(){var e=DE();return Ie(e,()=>n.description),w(()=>be(e,"id",i())),e}}),null),Ie(s,K(re,{get when(){return n.error},get children(){var e=HE();return Ie(e,()=>n.error),w(()=>be(e,"id",l())),e}}),null),w(e=>{var t=`oasis-editor-ui-field ${n.class??""}`,a=n.classList,r=o();return t!==e.e&&ve(s,e.e=t),e.t=we(s,a,e.t),r!==e.a&&be(s,"for",e.a=r),e},{e:void 0,t:void 0,a:void 0}),s;var s,d}function ZE(e){const[t,n]=_(e,["onChange"]);return K(VE,$({type:"number",onChange:e=>{var n,a;if(""===e.trim())return void(null==(n=t.onChange)||n.call(t,null));const r=Number(e);null==(a=t.onChange)||a.call(t,Number.isNaN(r)?null:r)}},n))}var KE=ge("<span class=oasis-editor-ui-field-description>"),XE=ge("<label><input type=radio class=oasis-editor-ui-radio-input><span class=oasis-editor-ui-checkbox-copy><span class=oasis-editor-ui-field-label>"),YE=ge("<span class=oasis-editor-ui-field-label>"),JE=ge("<div role=radiogroup>");const QE=k();function $E(e){const t=te(),n=R(QE),[a,r]=_(e,["label","description","value","onChange","class","id","checked","name","disabled"]),o=()=>a.id??t,i=()=>`${o()}-description`;return l=XE(),s=l.firstChild,d=s.nextSibling,c=d.firstChild,s.addEventListener("change",e=>{var t;n&&n.onSelect(a.value),null==(t=a.onChange)||t.call(a,e.currentTarget.checked)}),Se(s,$({get id(){return o()},get name(){return a.name??(null==n?void 0:n.name)},get value(){return a.value},get checked(){return n?n.value()===a.value:Boolean(a.checked)},get disabled(){return Boolean(a.disabled)||!!n&&n.disabled()},get"aria-describedby"(){return pe(()=>!!a.description)()?i():void 0}},r),!1,!1),Ie(c,()=>a.label),Ie(d,K(re,{get when(){return a.description},get children(){var e=KE();return Ie(e,()=>a.description),w(()=>be(e,"id",i())),e}}),null),w(e=>{var t=`oasis-editor-ui-radio ${a.class??""}`,n=o();return t!==e.e&&ve(l,e.e=t),n!==e.t&&be(l,"for",e.t=n),e},{e:void 0,t:void 0}),l;var l,s,d,c}function _E(e){const t=te(),n={name:e.name??t,value:()=>e.value,onSelect:t=>{var n;return null==(n=e.onChange)?void 0:n.call(e,t)},disabled:()=>Boolean(e.disabled)};return K(QE.Provider,{value:n,get children(){var t=JE();return Ie(t,K(re,{get when(){return e.label},get children(){var t=YE();return Ie(t,()=>e.label),t}}),null),Ie(t,K(re,{get when(){return e.options},get fallback(){return e.children},get children(){return K(ne,{get each(){return e.options},children:e=>K($E,{get value(){return e.value},get label(){return e.label},get description(){return e.description},get disabled(){return e.disabled}})})}}),null),w(n=>{var a=`oasis-editor-ui-radio-group ${e.class??""}`,r=e.label;return a!==n.e&&ve(t,n.e=a),r!==n.t&&be(t,"aria-label",n.t=r),n},{e:void 0,t:void 0}),t}})}var eL=ge("<div>");const tL={start:"flex-start",center:"center",end:"flex-end",stretch:"stretch"};var nL=ge("<legend>"),aL=ge("<fieldset>");function rL(e){const[t,n]=_(e,["legend","legendClass","class","children"]);return Se(a=aL(),$({get class(){return`oasis-editor-ui-field-group ${t.class??""}`}},n),!1,!0),Ie(a,K(re,{get when(){return t.legend},get children(){var e=nL();return Ie(e,()=>t.legend),w(()=>ve(e,`oasis-editor-ui-field-group-legend ${t.legendClass??""}`)),e}}),null),Ie(a,()=>t.children,null),a;var a}var oL=ge("<label><input type=checkbox class=oasis-editor-ui-toggle-chip-input><span class=oasis-editor-ui-toggle-chip-label>");function iL(e){const[t,n]=_(e,["label","labelStyle","onChange","class","checked"]);return a=oL(),r=a.firstChild,o=r.nextSibling,r.addEventListener("change",e=>{var n;return null==(n=t.onChange)?void 0:n.call(t,e.currentTarget.checked)}),Se(r,$({get checked(){return t.checked}},n),!1,!1),Ie(o,()=>t.label),w(e=>{var n=`oasis-editor-ui-toggle-chip ${t.class??""}`,r=!!Boolean(t.checked),i=t.labelStyle;return n!==e.e&&ve(a,e.e=n),r!==e.t&&a.classList.toggle("is-active",e.t=r),e.a=xe(o,i,e.a),e},{e:void 0,t:void 0,a:void 0}),a;var a,r,o}var lL=ge("<div>");const sL=Number.MAX_SAFE_INTEGER;class dL{constructor(){n(this,"entries",[]),n(this,"listeners",new Set)}register(e){const t=this.entries.findIndex(t=>t.id===e.id);t>=0?this.entries[t]=e:this.entries.push(e),this.sortByOrder(),this.emit()}insertBefore(e,t){this.spliceRelative(e,t,0)}insertAfter(e,t){this.spliceRelative(e,t,1)}replace(e,t){const n=this.entries.findIndex(t=>t.id===e);n<0?this.register(t):(this.entries[n]=t,this.emit())}remove(e){const t=this.entries.filter(t=>t.id!==e);t.length!==this.entries.length&&(this.entries=t,this.emit())}move(e,t){const n=this.entries.findIndex(t=>t.id===e);if(n<0)return;const[a]=this.entries.splice(n,1),r=this.resolveMoveIndex(t);if(null===r)return void this.entries.splice(n,0,a);const o=Math.max(0,Math.min(r,this.entries.length));this.entries.splice(o,0,a),this.emit()}get(e){return this.entries.find(t=>t.id===e)}getOrdered(){return[...this.entries]}getItems(){return this.getOrdered()}clear(){0!==this.entries.length&&(this.entries=[],this.emit())}onChange(e){return this.listeners.add(e),()=>this.listeners.delete(e)}spliceRelative(e,t,n){this.entries=this.entries.filter(e=>e.id!==t.id);const a=this.entries.findIndex(t=>t.id===e);a<0?this.entries.push(t):this.entries.splice(a+n,0,t),this.emit()}resolveMoveIndex(e){if("number"==typeof e)return e;if("before"in e){const t=this.entries.findIndex(t=>t.id===e.before);return t>=0?t:null}const t=this.entries.findIndex(t=>t.id===e.after);return t>=0?t+1:null}sortByOrder(){this.entries=this.entries.map((e,t)=>({item:e,index:t})).sort((e,t)=>(e.item.order??sL)-(t.item.order??sL)||e.index-t.index).map(e=>e.item)}emit(){for(const e of this.listeners)e()}}function cL(){return new dL}class uL{constructor(){n(this,"items",[])}register(e){const t=this.items.findIndex(t=>t.id===e.id);t>=0?this.items[t]=e:this.items.push(e),this.items.sort((e,t)=>(e.order??Number.MAX_SAFE_INTEGER)-(t.order??Number.MAX_SAFE_INTEGER))}unregister(e){this.items=this.items.filter(t=>t.id!==e)}getItems(){return[...this.items]}}const pL=[{value:"single",labelKey:"underline.style.single",preview:{borderStyle:"solid"}},{value:"double",labelKey:"underline.style.double",preview:{borderStyle:"double",borderBottomWidth:"3px"}},{value:"thick",labelKey:"underline.style.thick",preview:{borderStyle:"solid",borderBottomWidth:"3px"}},{value:"dotted",labelKey:"underline.style.dotted",preview:{borderStyle:"dotted"}},{value:"dottedHeavy",labelKey:"underline.style.dottedHeavy",preview:{borderStyle:"dotted",borderBottomWidth:"3px"}},{value:"dash",labelKey:"underline.style.dashed",preview:{borderStyle:"dashed"}},{value:"dashedHeavy",labelKey:"underline.style.dashedHeavy",preview:{borderStyle:"dashed",borderBottomWidth:"3px"}},{value:"dashLong",labelKey:"underline.style.longDashes",preview:{borderStyle:"dashed"}},{value:"dashLongHeavy",labelKey:"underline.style.longDashesHeavy",preview:{borderStyle:"dashed",borderBottomWidth:"3px"}},{value:"dotDash",labelKey:"underline.style.dotDash",preview:{borderStyle:"dashed"}},{value:"dashDotHeavy",labelKey:"underline.style.dotDashHeavy",preview:{borderStyle:"dashed",borderBottomWidth:"3px"}},{value:"dotDotDash",labelKey:"underline.style.dotDotDash",preview:{borderStyle:"dashed"}},{value:"dashDotDotHeavy",labelKey:"underline.style.dotDotDashHeavy",preview:{borderStyle:"dashed",borderBottomWidth:"3px"}},{value:"wave",labelKey:"underline.style.wave",preview:{borderStyle:"wavy",svg:'<svg width="100%" height="6" viewBox="0 0 60 6" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 3 Q 5 0 10 3 T 20 3 T 30 3 T 40 3 T 50 3 T 60 3" fill="none" stroke="currentColor" stroke-width="1"/></svg>'}},{value:"wavyHeavy",labelKey:"underline.style.waveHeavy",preview:{borderStyle:"wavy",svg:'<svg width="100%" height="6" viewBox="0 0 60 6" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 3 Q 5 0 10 3 T 20 3 T 30 3 T 40 3 T 50 3 T 60 3" fill="none" stroke="currentColor" stroke-width="2"/></svg>'}},{value:"wavyDouble",labelKey:"underline.style.waveDouble",preview:{borderStyle:"wavy",svg:'<svg width="100%" height="9" viewBox="0 0 60 9" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 2 Q 5 -1 10 2 T 20 2 T 30 2 T 40 2 T 50 2 T 60 2" fill="none" stroke="currentColor" stroke-width="1"/><path d="M0 7 Q 5 4 10 7 T 20 7 T 30 7 T 40 7 T 50 7 T 60 7" fill="none" stroke="currentColor" stroke-width="1"/></svg>'}}];var hL=ge("<button type=button class=oasis-editor-color-menu-action data-testid=editor-toolbar-underline-remove role=menuitem><span class=oasis-editor-color-menu-action-swatch><i data-lucide=slash></i></span><span>"),fL=ge("<div class=oasis-editor-underline-menu-list>"),gL=ge('<span class="oasis-editor-color-split-icon oasis-editor-underline-split-icon"><span class=oasis-editor-underline-split-glyph aria-hidden=true>U</span><span class=oasis-editor-underline-split-indicator>'),mL=ge('<span class="oasis-editor-underline-menu-stroke oasis-editor-underline-menu-stroke-svg">'),bL=ge("<button type=button class=oasis-editor-underline-menu-item role=menuitemradio><span class=oasis-editor-underline-menu-preview></span><span class=oasis-editor-underline-menu-label>"),vL=ge("<span class=oasis-editor-underline-menu-stroke>");const yL=/Mac/i.test(navigator.userAgent)?"⌘":"Ctrl",wL="editor-toolbar-underline";function xL(e){const t=Fe(),n=`${t("toolbar.underline")} (${yL}+U)`,a=e.api,[r,o]=y("single"),[i,l]=y(!1),s=()=>a.commands.state("underline").isActive,d=()=>String(a.commands.state("setUnderlineStyle").value??"");return K(vo,{get open(){return i()},onOpenChange:l,tooltip:n,get rootActive(){return i()||s()},mainTestId:wL,get mainPressed(){return s()},onMain:()=>{if(!s()){const e=r();"single"===e||d()||a.commands.execute("setUnderlineStyle",e)}a.commands.execute("underline")},menuTestId:`${wL}-dropdown`,panelClass:"oasis-editor-color-menu oasis-editor-underline-menu",panelRole:"menu",get mainContent(){return e=gL(),t=e.firstChild.nextSibling,w(()=>be(t,"data-style",(d()||r()||"single").toLowerCase())),e;var e,t},get children(){return[(n=hL(),r=n.firstChild.nextSibling,n.$$click=()=>{s()&&a.commands.execute("underline"),a.commands.execute("setUnderlineStyle",null),l(!1)},Ie(r,()=>t("toolbar.underlineRemove")),n),(e=fL(),Ie(e,K(ne,{each:pL,children:e=>{const n=()=>s()&&(d()||(s()?"single":"")).toLowerCase()===e.value.toLowerCase();return r=bL(),i=r.firstChild,c=i.nextSibling,r.$$click=()=>{(e=>{o(e);const t=s();a.commands.execute("setUnderlineStyle","single"===e?null:e),t||a.commands.execute("underline")})(e.value),l(!1)},Ie(i,K(re,{get when(){return e.preview.svg},get fallback(){return t=vL(),w(n=>xe(t,"wavy"===e.preview.borderStyle?void 0:{"border-bottom-style":e.preview.borderStyle,"border-bottom-width":e.preview.borderBottomWidth??"1px"},n)),t;var t},get children(){var t=mL();return w(()=>t.innerHTML=e.preview.svg),t}})),Ie(c,()=>t(e.labelKey)),w(a=>{var o=!!n(),i=n(),l=`${wL}-style-${e.value}`,s=t(e.labelKey);return o!==a.e&&r.classList.toggle("oasis-editor-underline-menu-item-active",a.e=o),i!==a.t&&be(r,"aria-checked",a.t=i),l!==a.a&&be(r,"data-testid",a.a=l),s!==a.o&&be(r,"title",a.o=s),a},{e:void 0,t:void 0,a:void 0,o:void 0}),r;var r,i,c}})),e)];var e,n,r}})}me(["click"]);var ML=ge("<option value=decimal>"),SL=ge("<option value=lowerLetter>"),AL=ge("<option value=upperLetter>"),IL=ge("<option value=lowerRoman>"),CL=ge("<option value=upperRoman>"),TL=ge("<option value=bullet>"),kL=ge("<div class=oasis-editor-toolbar-list-options><label class=oasis-editor-toolbar-field><span></span></label><label class=oasis-editor-toolbar-field><span></span><input type=number class=oasis-editor-tool-number data-testid=editor-toolbar-list-start-at min=1 step=1 placeholder=1>");function RL(e){if(""===e.trim())return null;const t=Number(e);return Number.isFinite(t)?t:null}var EL=ge("<div class=oasis-editor-dialog-preview data-testid=editor-line-spacing-dialog-preview><br>");function LL(e){const t=Fe(),[n,a]=y(null),[r,o]=y(null),[i,l]=y(null);x(()=>{e.isOpen&&(a(RL(e.initial.lineHeight??"")),o(RL(e.initial.spacingBefore??"")),l(RL(e.initial.spacingAfter??"")))});const s=M(()=>{const e=n();return{"line-height":null!==e&&e>0?String(e):void 0}}),d=()=>{e.onApply({lineHeight:n(),spacingBefore:r(),spacingAfter:i()},e.initial),e.onClose()};return K(iE,{get isOpen(){return e.isOpen},get title(){return t("lineSpacing.title")},get onClose(){return e.onClose},get footer(){return[K(hE,{variant:"secondary",get onClick(){return e.onClose},"data-testid":"editor-line-spacing-dialog-cancel",get children(){return t("generic.cancel")}}),K(hE,{variant:"primary",onClick:d,"data-testid":"editor-line-spacing-dialog-apply",get children(){return t("generic.apply")}})]},get children(){return[K(AE,{container:!0,spacing:1.5,get children(){return K(AE,{size:{xs:12,md:6},get children(){return K(ZE,{get label(){return t("lineSpacing.lineSpacingLabel")},min:"0.5",step:"0.05",get value(){return n()??""},onChange:a,"data-testid":"editor-line-spacing-dialog-line-height"})}})}}),K(AE,{container:!0,spacing:1.5,get children(){return[K(AE,{size:{xs:12,md:6},get children(){return K(ZE,{get label(){return t("lineSpacing.spacingBeforeLabel")},min:"0",step:"1",get value(){return r()??""},onChange:o,"data-testid":"editor-line-spacing-dialog-spacing-before"})}}),K(AE,{size:{xs:12,md:6},get children(){return K(ZE,{get label(){return t("lineSpacing.spacingAfterLabel")},min:"0",step:"1",get value(){return i()??""},onChange:l,"data-testid":"editor-line-spacing-dialog-spacing-after"})}})]}}),K(TE,{get label(){return t("lineSpacing.preview")},get children(){var e=EL(),n=e.firstChild;return Ie(e,()=>t("lineSpacing.previewText"),n),Ie(e,()=>t("lineSpacing.previewText"),null),w(t=>xe(e,s(),t)),e}})]}})}var VL=ge("<div class=oasis-editor-line-spacing-menu-separator role=separator>"),NL=ge('<button type=button class="oasis-editor-line-spacing-item oasis-editor-line-spacing-item-more"role=menuitem data-testid=editor-toolbar-line-spacing-options><span class=oasis-editor-line-spacing-item-check aria-hidden=true></span><span class=oasis-editor-line-spacing-item-label>'),zL=ge("<button type=button class=oasis-editor-line-spacing-item role=menuitemradio><span class=oasis-editor-line-spacing-item-check aria-hidden=true></span><span class=oasis-editor-line-spacing-item-label>");const PL=[1,1.15,1.5,2,2.5,3];function OL(e){return null==e?"":String(e)}function qL(e){const t=Fe(),n=e.api,[a,r]=y(!1),[o,i]=y({lineHeight:"",spacingBefore:"",spacingAfter:""}),l=M(()=>{const e=OL(n.commands.state("setLineHeight").value);if(""===e)return null;const t=Number(e);return Number.isFinite(t)?t:null}),s=()=>{i({lineHeight:OL(n.commands.state("setLineHeight").value),spacingBefore:OL(n.commands.state("setSpacingBefore").value),spacingAfter:OL(n.commands.state("setSpacingAfter").value)}),r(!0)},d=(e,t)=>{const a=t.lineHeight?Number(t.lineHeight):null,r=t.spacingBefore?Number(t.spacingBefore):null,o=t.spacingAfter?Number(t.spacingAfter):null;e.lineHeight!==a&&n.commands.execute("setLineHeight",e.lineHeight),e.spacingBefore!==r&&n.commands.execute("setSpacingBefore",e.spacingBefore),e.spacingAfter!==o&&n.commands.execute("setSpacingAfter",e.spacingAfter),n.focusEditor()};return[K(co,{icon:"lineSpacing",testId:"editor-toolbar-line-spacing",get tooltip(){return t("metric.lineSpacing")},panelClass:"oasis-editor-line-spacing-menu",get children(){return[K(ne,{each:PL,children:e=>{const a=function(e){return e.toFixed(e===Math.floor(e)?1:2)}(e),r=()=>{const t=l();return null!==t&&(n=t,a=e,Math.abs(n-a)<.001);var n,a};return o=zL(),i=o.firstChild,s=i.nextSibling,o.$$click=()=>(e=>{n.commands.execute("setLineHeight",e),n.focusEditor()})(e),Ie(i,K(re,{get when(){return r()},get children(){return K(mr,{size:14})}})),Ie(s,a),w(e=>{var n=!!r(),i=r(),l=`editor-toolbar-line-spacing-${a.replace(".","_")}`,s=t("metric.lineSpacingOption",[a]);return n!==e.e&&o.classList.toggle("oasis-editor-line-spacing-item-active",e.e=n),i!==e.t&&be(o,"aria-checked",e.t=i),l!==e.a&&be(o,"data-testid",e.a=l),s!==e.o&&be(o,"title",e.o=s),e},{e:void 0,t:void 0,a:void 0,o:void 0}),o;var o,i,s}}),VL(),(e=NL(),a=e.firstChild.nextSibling,e.$$click=s,Ie(a,()=>t("metric.lineSpacingOptions")),e)];var e,a}}),K(re,{get when(){return a()},get children(){return K(ze,{get children(){return K(LL,{get isOpen(){return a()},get initial(){return o()},onClose:()=>r(!1),onApply:d})}})}})]}me(["click"]);var BL=ge('<div class="oasis-editor-toolbar-panel-section oasis-editor-toolbar-panel-actions">'),WL=ge("<div class=oasis-editor-toolbar-panel-grid>");const FL=(e,t)=>{const n=e.commands.state(t).value;return null==n?"":String(n)};var DL=ge('<div class="oasis-editor-toolbar-panel-section oasis-editor-section-panel-section">');function HL(e){return Math.round(e*pt)}function UL(e){return Ac(e/pt,2)}const GL=[{id:"normal",labelKey:"section.marginPreset.normal",top:2.5,bottom:2.5,left:3,right:3},{id:"narrow",labelKey:"section.marginPreset.narrow",top:1.27,bottom:1.27,left:1.27,right:1.27},{id:"moderate",labelKey:"section.marginPreset.moderate",top:2.54,bottom:2.54,left:1.91,right:1.91},{id:"wide",labelKey:"section.marginPreset.wide",top:2.54,bottom:2.54,left:5.08,right:5.08},{id:"mirrored",labelKey:"section.marginPreset.mirrored",top:2.54,bottom:2.54,left:3.18,right:2.54}];function jL(e){return{top:HL(e.top),bottom:HL(e.bottom),left:HL(e.left),right:HL(e.right)}}var ZL=ge("<div class=oasis-editor-margins-list>"),KL=ge("<div class=oasis-editor-margins-custom-form>"),XL=ge("<div class=oasis-editor-toolbar-list-options><button type=button class=oasis-editor-margins-custom-toggle data-testid=editor-toolbar-margins-custom><i data-lucide=sliders-horizontal></i><span>"),YL=ge("<div class=oasis-editor-margins-custom-actions><button type=button class=oasis-editor-margins-custom-apply data-testid=editor-toolbar-margins-custom-apply>"),JL=ge("<button type=button class=oasis-editor-margins-item><span class=oasis-editor-margins-item-name></span><span class=oasis-editor-margins-item-values><br>"),QL=ge("<label class=oasis-editor-margins-custom-field><span></span><input type=number min=0 step=0.1>");const $L=[{key:"top",labelKey:"section.marginField.top"},{key:"bottom",labelKey:"section.marginField.bottom"},{key:"left",labelKey:"section.marginField.left"},{key:"right",labelKey:"section.marginField.right"}];function _L(e){const t=Fe(),n=e=>t("section.marginValue",[String(e).replace(".",t("number.decimalSeparator"))]),a=e.api,[r,o]=y(!1),[i,l]=y({}),s=M(()=>a.commands.state("setPageMargins").value),d=M(()=>{var e;const t=s();if(t)return null==(e=GL.find(e=>function(e,t){const n=jL(t);return Math.abs(e.top-n.top)<=1&&Math.abs(e.bottom-n.bottom)<=1&&Math.abs(e.left-n.left)<=1&&Math.abs(e.right-n.right)<=1}(t,e)))?void 0:e.id}),c=()=>{const e=s();l({top:e?String(UL(e.top)):"",bottom:e?String(UL(e.bottom)):"",left:e?String(UL(e.left)):"",right:e?String(UL(e.right)):""}),o(e=>!e)},u=()=>{const e=i(),t={};for(const{key:n}of $L){const a=e[n];if(null==a||""===a)continue;const r=Number(a.replace(",","."));Number.isFinite(r)&&r>=0&&(t[n]=HL(r))}Object.keys(t).length>0&&a.commands.execute("setPageMargins",t),a.focusEditor()};return K(co,{icon:"square-dashed",get label(){return t("section.margins")},testId:"editor-toolbar-margins-dropdown",get tooltip(){return t("section.margins")},panelClass:"oasis-editor-toolbar-panel oasis-editor-margins-panel",keepMounted:!0,get children(){return[(p=ZL(),Ie(p,K(ne,{each:GL,children:e=>{return r=JL(),o=r.firstChild,i=o.nextSibling,l=i.firstChild,r.$$click=()=>(e=>{a.commands.execute("setPageMargins",jL(e)),a.focusEditor()})(e),Ie(o,()=>t(e.labelKey)),Ie(i,()=>`${t("section.marginField.top")} ${n(e.top)} ${t("section.marginField.bottom")} ${n(e.bottom)}`,l),Ie(i,()=>`${t("section.marginField.left")} ${n(e.left)} ${t("section.marginField.right")} ${n(e.right)}`,null),w(t=>{var n=!(d()!==e.id),a=e.id,o=`editor-toolbar-margins-${e.id}`;return n!==t.e&&r.classList.toggle("oasis-editor-margins-item-active",t.e=n),a!==t.t&&be(r,"data-margin-preset",t.t=a),o!==t.a&&be(r,"data-testid",t.a=o),t},{e:void 0,t:void 0,a:void 0}),r;var r,o,i,l}})),p),(e=XL(),o=e.firstChild,s=o.firstChild.nextSibling,o.$$click=c,Ie(s,()=>t("section.marginPreset.custom")),Ie(e,K(re,{get when(){return r()},get children(){var e=KL();return Ie(e,K(ne,{each:$L,children:e=>{return n=QL(),a=n.firstChild,r=a.nextSibling,Ie(a,()=>t(e.labelKey)),r.$$input=t=>l(n=>({...n,[e.key]:t.currentTarget.value})),w(()=>r.value=i()[e.key]??""),n;var n,a,r}})),e}}),null),e),K(re,{get when(){return r()},get children(){var e=YL(),n=e.firstChild;return n.$$click=u,Ie(n,()=>t("section.marginApply")),e}})];var e,o,s,p}})}me(["click","input"]);const eV=[{headerKey:"toolbar.shapes.lines",presets:["line","lineInv","straightConnector1","bentConnector3","curvedConnector3"]},{headerKey:"toolbar.shapes.rectangles",presets:["rect","roundRect","snip1Rect","snip2SameRect","snip2DiagRect","snipRoundRect","round1Rect","round2SameRect","round2DiagRect","plaque"]},{headerKey:"toolbar.shapes.basicShapes",presets:["ellipse","triangle","rtTriangle","parallelogram","trapezoid","diamond","pentagon","hexagon","heptagon","octagon","decagon","dodecagon","pie","chord","teardrop","frame","halfFrame","corner","diagStripe","plus","bevel","arc","leftBracket","rightBracket","leftBrace","rightBrace","cube","can","lightningBolt","heart","sun","moon","cloud","smileyFace","noSmoking","blockArc","foldedCorner","donut"]},{headerKey:"toolbar.shapes.blockArrows",presets:["rightArrow","leftArrow","upArrow","downArrow","leftRightArrow","upDownArrow","quadArrow","leftRightUpArrow","bentArrow","uturnArrow","leftUpArrow","bentUpArrow","curvedRightArrow","curvedLeftArrow","curvedUpArrow","curvedDownArrow","stripedRightArrow","notchedRightArrow","homePlate","chevron","rightArrowCallout","downArrowCallout","upArrowCallout","leftArrowCallout","leftRightArrowCallout","quadArrowCallout","circularArrow"]},{headerKey:"toolbar.shapes.equation",presets:["mathPlus","mathMinus","mathMultiply","mathDivide","mathEqual","mathNotEqual"]},{headerKey:"toolbar.shapes.flowchart",presets:["flowChartProcess","flowChartAlternateProcess","flowChartDecision","flowChartInputOutput","flowChartPredefinedProcess","flowChartInternalStorage","flowChartDocument","flowChartMultidocument","flowChartTerminator","flowChartPreparation","flowChartManualInput","flowChartManualOperation","flowChartConnector","flowChartOffpageConnector","flowChartPunchedCard","flowChartPunchedTape","flowChartSummingJunction","flowChartOr","flowChartCollate","flowChartSort","flowChartExtract","flowChartMerge","flowChartOnlineStorage","flowChartMagneticDisk","flowChartMagneticDrum","flowChartMagneticTape","flowChartDisplay","flowChartDelay"]},{headerKey:"toolbar.shapes.starsAndBanners",presets:["star4","star5","star6","star7","star8","star10","star12","star16","star24","star32","irregularSeal1","irregularSeal2","ribbon","ribbon2","ellipseRibbon","ellipseRibbon2","verticalScroll","horizontalScroll","wave","doubleWave"]},{headerKey:"toolbar.shapes.callouts",presets:["wedgeRectCallout","wedgeRoundRectCallout","wedgeEllipseCallout","cloudCallout","borderCallout1","borderCallout2","borderCallout3","accentCallout1","accentCallout2","accentCallout3","callout1","callout2","callout3","accentBorderCallout1","accentBorderCallout2","accentBorderCallout3"]}],tV=new Set(["line","lineInv","straightConnector1","bentConnector2","bentConnector3","bentConnector4","bentConnector5","curvedConnector2","curvedConnector3","curvedConnector4","curvedConnector5","arc"]),nV={line:{"pt-BR":"Linha",en:"Line"},lineInv:{"pt-BR":"Linha (invertida)",en:"Line (inverse)"},straightConnector1:{"pt-BR":"Conector reto",en:"Straight connector"},bentConnector3:{"pt-BR":"Conector em cotovelo",en:"Elbow connector"},curvedConnector3:{"pt-BR":"Conector curvo",en:"Curved connector"},rect:{"pt-BR":"Retângulo",en:"Rectangle"},roundRect:{"pt-BR":"Retângulo arredondado",en:"Rounded rectangle"},snip1Rect:{"pt-BR":"Retângulo de canto recortado",en:"Snip single corner rectangle"},snip2SameRect:{"pt-BR":"Retângulo de cantos recortados (mesmo lado)",en:"Snip same side corner rectangle"},snip2DiagRect:{"pt-BR":"Retângulo de cantos recortados (diagonal)",en:"Snip diagonal corner rectangle"},snipRoundRect:{"pt-BR":"Retângulo recortado e arredondado",en:"Snip and round single corner rectangle"},round1Rect:{"pt-BR":"Retângulo de canto arredondado",en:"Round single corner rectangle"},round2SameRect:{"pt-BR":"Retângulo de cantos arredondados (mesmo lado)",en:"Round same side corner rectangle"},round2DiagRect:{"pt-BR":"Retângulo de cantos arredondados (diagonal)",en:"Round diagonal corner rectangle"},plaque:{"pt-BR":"Placa",en:"Plaque"},ellipse:{"pt-BR":"Elipse",en:"Oval"},triangle:{"pt-BR":"Triângulo isósceles",en:"Isosceles triangle"},rtTriangle:{"pt-BR":"Triângulo retângulo",en:"Right triangle"},parallelogram:{"pt-BR":"Paralelogramo",en:"Parallelogram"},trapezoid:{"pt-BR":"Trapézio",en:"Trapezoid"},diamond:{"pt-BR":"Losango",en:"Diamond"},pentagon:{"pt-BR":"Pentágono",en:"Pentagon"},hexagon:{"pt-BR":"Hexágono",en:"Hexagon"},heptagon:{"pt-BR":"Heptágono",en:"Heptagon"},octagon:{"pt-BR":"Octógono",en:"Octagon"},decagon:{"pt-BR":"Decágono",en:"Decagon"},dodecagon:{"pt-BR":"Dodecágono",en:"Dodecagon"},pie:{"pt-BR":"Gráfico de pizza",en:"Pie"},chord:{"pt-BR":"Corda",en:"Chord"},teardrop:{"pt-BR":"Lágrima",en:"Teardrop"},frame:{"pt-BR":"Moldura",en:"Frame"},halfFrame:{"pt-BR":"Meia moldura",en:"Half frame"},corner:{"pt-BR":"Canto",en:"Corner"},diagStripe:{"pt-BR":"Faixa diagonal",en:"Diagonal stripe"},plus:{"pt-BR":"Mais",en:"Plus"},bevel:{"pt-BR":"Bisel",en:"Bevel"},arc:{"pt-BR":"Arco",en:"Arc"},leftBracket:{"pt-BR":"Colchete esquerdo",en:"Left bracket"},rightBracket:{"pt-BR":"Colchete direito",en:"Right bracket"},leftBrace:{"pt-BR":"Chave esquerda",en:"Left brace"},rightBrace:{"pt-BR":"Chave direita",en:"Right brace"},cube:{"pt-BR":"Cubo",en:"Cube"},can:{"pt-BR":"Cilindro",en:"Can"},lightningBolt:{"pt-BR":"Raio",en:"Lightning bolt"},heart:{"pt-BR":"Coração",en:"Heart"},sun:{"pt-BR":"Sol",en:"Sun"},moon:{"pt-BR":"Lua",en:"Moon"},cloud:{"pt-BR":"Nuvem",en:"Cloud"},smileyFace:{"pt-BR":"Rosto sorridente",en:"Smiley face"},noSmoking:{"pt-BR":"Proibido",en:'"No" symbol'},blockArc:{"pt-BR":"Arco em bloco",en:"Block arc"},foldedCorner:{"pt-BR":"Canto dobrado",en:"Folded corner"},donut:{"pt-BR":"Anel",en:"Donut"},rightArrow:{"pt-BR":"Seta para a direita",en:"Right arrow"},leftArrow:{"pt-BR":"Seta para a esquerda",en:"Left arrow"},upArrow:{"pt-BR":"Seta para cima",en:"Up arrow"},downArrow:{"pt-BR":"Seta para baixo",en:"Down arrow"},leftRightArrow:{"pt-BR":"Seta dupla horizontal",en:"Left-right arrow"},upDownArrow:{"pt-BR":"Seta dupla vertical",en:"Up-down arrow"},quadArrow:{"pt-BR":"Seta quádrupla",en:"Quad arrow"},leftRightUpArrow:{"pt-BR":"Seta esquerda-direita-cima",en:"Left-right-up arrow"},bentArrow:{"pt-BR":"Seta dobrada",en:"Bent arrow"},uturnArrow:{"pt-BR":"Seta em U",en:"U-turn arrow"},leftUpArrow:{"pt-BR":"Seta esquerda-cima",en:"Left-up arrow"},bentUpArrow:{"pt-BR":"Seta dobrada para cima",en:"Bent-up arrow"},curvedRightArrow:{"pt-BR":"Seta curva para a direita",en:"Curved right arrow"},curvedLeftArrow:{"pt-BR":"Seta curva para a esquerda",en:"Curved left arrow"},curvedUpArrow:{"pt-BR":"Seta curva para cima",en:"Curved up arrow"},curvedDownArrow:{"pt-BR":"Seta curva para baixo",en:"Curved down arrow"},stripedRightArrow:{"pt-BR":"Seta listrada para a direita",en:"Striped right arrow"},notchedRightArrow:{"pt-BR":"Seta entalhada para a direita",en:"Notched right arrow"},homePlate:{"pt-BR":"Pentágono (seta)",en:"Pentagon"},chevron:{"pt-BR":"Divisa",en:"Chevron"},rightArrowCallout:{"pt-BR":"Texto explicativo de seta à direita",en:"Right arrow callout"},downArrowCallout:{"pt-BR":"Texto explicativo de seta abaixo",en:"Down arrow callout"},upArrowCallout:{"pt-BR":"Texto explicativo de seta acima",en:"Up arrow callout"},leftArrowCallout:{"pt-BR":"Texto explicativo de seta à esquerda",en:"Left arrow callout"},leftRightArrowCallout:{"pt-BR":"Texto explicativo de seta horizontal",en:"Left-right arrow callout"},quadArrowCallout:{"pt-BR":"Texto explicativo de seta quádrupla",en:"Quad arrow callout"},circularArrow:{"pt-BR":"Seta circular",en:"Circular arrow"},mathPlus:{"pt-BR":"Mais",en:"Plus"},mathMinus:{"pt-BR":"Menos",en:"Minus"},mathMultiply:{"pt-BR":"Multiplicação",en:"Multiply"},mathDivide:{"pt-BR":"Divisão",en:"Divide"},mathEqual:{"pt-BR":"Igual",en:"Equal"},mathNotEqual:{"pt-BR":"Diferente",en:"Not equal"},flowChartProcess:{"pt-BR":"Processo",en:"Process"},flowChartAlternateProcess:{"pt-BR":"Processo alternativo",en:"Alternate process"},flowChartDecision:{"pt-BR":"Decisão",en:"Decision"},flowChartInputOutput:{"pt-BR":"Dados",en:"Data"},flowChartPredefinedProcess:{"pt-BR":"Processo predefinido",en:"Predefined process"},flowChartInternalStorage:{"pt-BR":"Armazenamento interno",en:"Internal storage"},flowChartDocument:{"pt-BR":"Documento",en:"Document"},flowChartMultidocument:{"pt-BR":"Multidocumento",en:"Multidocument"},flowChartTerminator:{"pt-BR":"Terminador",en:"Terminator"},flowChartPreparation:{"pt-BR":"Preparação",en:"Preparation"},flowChartManualInput:{"pt-BR":"Entrada manual",en:"Manual input"},flowChartManualOperation:{"pt-BR":"Operação manual",en:"Manual operation"},flowChartConnector:{"pt-BR":"Conector",en:"Connector"},flowChartOffpageConnector:{"pt-BR":"Conector de outra página",en:"Off-page connector"},flowChartPunchedCard:{"pt-BR":"Cartão",en:"Card"},flowChartPunchedTape:{"pt-BR":"Fita perfurada",en:"Punched tape"},flowChartSummingJunction:{"pt-BR":"Junção de soma",en:"Summing junction"},flowChartOr:{"pt-BR":"Ou",en:"Or"},flowChartCollate:{"pt-BR":"Agrupar",en:"Collate"},flowChartSort:{"pt-BR":"Classificar",en:"Sort"},flowChartExtract:{"pt-BR":"Extrair",en:"Extract"},flowChartMerge:{"pt-BR":"Mesclar",en:"Merge"},flowChartOnlineStorage:{"pt-BR":"Armazenamento on-line",en:"Stored data"},flowChartMagneticDisk:{"pt-BR":"Disco magnético",en:"Magnetic disk"},flowChartMagneticDrum:{"pt-BR":"Cilindro magnético",en:"Direct access storage"},flowChartMagneticTape:{"pt-BR":"Fita magnética",en:"Sequential access storage"},flowChartDisplay:{"pt-BR":"Exibir",en:"Display"},flowChartDelay:{"pt-BR":"Atraso",en:"Delay"},star4:{"pt-BR":"Estrela de 4 pontas",en:"4-point star"},star5:{"pt-BR":"Estrela de 5 pontas",en:"5-point star"},star6:{"pt-BR":"Estrela de 6 pontas",en:"6-point star"},star7:{"pt-BR":"Estrela de 7 pontas",en:"7-point star"},star8:{"pt-BR":"Estrela de 8 pontas",en:"8-point star"},star10:{"pt-BR":"Estrela de 10 pontas",en:"10-point star"},star12:{"pt-BR":"Estrela de 12 pontas",en:"12-point star"},star16:{"pt-BR":"Estrela de 16 pontas",en:"16-point star"},star24:{"pt-BR":"Estrela de 24 pontas",en:"24-point star"},star32:{"pt-BR":"Estrela de 32 pontas",en:"32-point star"},irregularSeal1:{"pt-BR":"Explosão 1",en:"Explosion 1"},irregularSeal2:{"pt-BR":"Explosão 2",en:"Explosion 2"},ribbon:{"pt-BR":"Faixa para baixo",en:"Down ribbon"},ribbon2:{"pt-BR":"Faixa para cima",en:"Up ribbon"},ellipseRibbon:{"pt-BR":"Faixa curva para baixo",en:"Curved down ribbon"},ellipseRibbon2:{"pt-BR":"Faixa curva para cima",en:"Curved up ribbon"},verticalScroll:{"pt-BR":"Pergaminho vertical",en:"Vertical scroll"},horizontalScroll:{"pt-BR":"Pergaminho horizontal",en:"Horizontal scroll"},wave:{"pt-BR":"Onda",en:"Wave"},doubleWave:{"pt-BR":"Onda dupla",en:"Double wave"},wedgeRectCallout:{"pt-BR":"Texto explicativo retangular",en:"Rectangular callout"},wedgeRoundRectCallout:{"pt-BR":"Texto explicativo retangular arredondado",en:"Rounded rectangular callout"},wedgeEllipseCallout:{"pt-BR":"Texto explicativo oval",en:"Oval callout"},cloudCallout:{"pt-BR":"Texto explicativo de nuvem",en:"Cloud callout"},borderCallout1:{"pt-BR":"Chamada de linha 1",en:"Line callout 1"},borderCallout2:{"pt-BR":"Chamada de linha 2",en:"Line callout 2"},borderCallout3:{"pt-BR":"Chamada de linha 3",en:"Line callout 3"},accentCallout1:{"pt-BR":"Chamada de linha 1 (acento)",en:"Line callout 1 (accent bar)"},accentCallout2:{"pt-BR":"Chamada de linha 2 (acento)",en:"Line callout 2 (accent bar)"},accentCallout3:{"pt-BR":"Chamada de linha 3 (acento)",en:"Line callout 3 (accent bar)"},callout1:{"pt-BR":"Chamada de linha 1 (sem borda)",en:"Line callout 1 (no border)"},callout2:{"pt-BR":"Chamada de linha 2 (sem borda)",en:"Line callout 2 (no border)"},callout3:{"pt-BR":"Chamada de linha 3 (sem borda)",en:"Line callout 3 (no border)"},accentBorderCallout1:{"pt-BR":"Chamada de linha 1 (borda e acento)",en:"Line callout 1 (border and accent bar)"},accentBorderCallout2:{"pt-BR":"Chamada de linha 2 (borda e acento)",en:"Line callout 2 (border and accent bar)"},accentBorderCallout3:{"pt-BR":"Chamada de linha 3 (borda e acento)",en:"Line callout 3 (border and accent bar)"}};function aV(e,t){var n;return(null==(n=nV[e])?void 0:n[t])??e}var rV=ge('<svg class=oasis-editor-shape-thumb viewBox="0 0 22 22"width=22 height=22 aria-hidden=true><path stroke=currentColor stroke-width=1 stroke-linejoin=round stroke-linecap=round vector-effect=non-scaling-stroke>');function oV(e){return Number(e.toFixed(2)).toString()}function iV(e){const t=()=>function(e,t,n,a,r){const o=[];for(const i of ig(e,t,n,a,r))switch(i.type){case"move":o.push(`M${oV(i.x)} ${oV(i.y)}`);break;case"line":o.push(`L${oV(i.x)} ${oV(i.y)}`);break;case"cubic":o.push(`C${oV(i.x1)} ${oV(i.y1)} ${oV(i.x2)} ${oV(i.y2)} ${oV(i.x)} ${oV(i.y)}`);break;case"close":o.push("Z")}return o.join(" ")}(e.preset,2,2,18,18),n=()=>tV.has(e.preset);return a=rV(),r=a.firstChild,w(e=>{var a=t(),o=n()?"none":"currentColor",i=n()?void 0:"0.18";return a!==e.e&&be(r,"d",e.e=a),o!==e.t&&be(r,"fill",e.t=o),i!==e.a&&be(r,"fill-opacity",e.a=i),e},{e:void 0,t:void 0,a:void 0}),a;var a,r}const lV="oasis-editor.recentShapes";function sV(){var e;try{const t=null==(e=globalThis.localStorage)?void 0:e.getItem(lV);if(!t)return[];const n=JSON.parse(t);return Array.isArray(n)?n.filter(e=>"string"==typeof e):[]}catch{return[]}}var dV=ge("<button type=button class=oasis-editor-shape-gallery-tile>"),cV=ge("<div class=oasis-editor-shape-gallery-section-header>"),uV=ge("<div class=oasis-editor-shape-gallery-grid>"),pV=ge("<div class=oasis-editor-shape-gallery>");function hV(e){const t=Fe(),n=()=>"en"===t("locale.id")?"en":"pt-BR",[a,r]=y(sV()),o=t=>{r(function(e){var t;const n=[e,...sV().filter(t=>t!==e)].slice(0,12);try{null==(t=globalThis.localStorage)||t.setItem(lV,JSON.stringify(n))}catch{}return n}(t)),e.api.commands.execute("insertShape",t),e.api.focusEditor()},i=e=>{return(t=dV()).$$click=()=>o(e.preset),Ie(t,K(iV,{get preset(){return e.preset}})),w(a=>{var r=aV(e.preset,n()),o=aV(e.preset,n()),i=`editor-toolbar-shape-${e.preset}`;return r!==a.e&&be(t,"title",a.e=r),o!==a.t&&be(t,"aria-label",a.t=o),i!==a.a&&be(t,"data-testid",a.a=i),a},{e:void 0,t:void 0,a:void 0}),t;var t};return Ie(l=pV(),K(re,{get when(){return a().length>0},get children(){return[(n=cV(),Ie(n,()=>t("toolbar.shapes.recentlyUsed")),n),(e=uV(),Ie(e,K(ne,{get each(){return a()},children:e=>K(i,{preset:e})})),e)];var e,n}}),null),Ie(l,K(ne,{each:eV,children:e=>{return[(a=cV(),Ie(a,()=>t(e.headerKey)),a),(n=uV(),Ie(n,K(ne,{get each(){return e.presets},children:e=>K(i,{preset:e})})),n)];var n,a}}),null),l;var l}me(["click"]);const fV=e=>Array.from(e).map(e=>({character:e,codePoint:`U+${e.codePointAt(0).toString(16).toUpperCase().padStart(4,"0")}`})),gV=[{id:"common",labelKey:"symbols.category.common",entries:fV("©®™§¶†‡•…—–°µ¿¡")},{id:"math",labelKey:"symbols.category.math",entries:fV("±×÷≠≤≥≈∞√∑∏∂∆∫πΩ")},{id:"arrows",labelKey:"symbols.category.arrows",entries:fV("←→↑↓↔↕⇒⇐⇔↗↘↙↖")},{id:"currency",labelKey:"symbols.category.currency",entries:fV("¢€£¥₽₹₿")},{id:"greek",labelKey:"symbols.category.greek",entries:fV("αβγδεθλμσφωΑΒΓΔΘΛΜΣΦΩ")},{id:"numbers",labelKey:"symbols.category.numbers",entries:fV("①②③④⑤⑥⑦⑧⑨⑩½⅓¼¾²³ⁿ№")}],mV=gV.slice(0,3).flatMap(e=>e.entries),bV=gV.find(e=>"numbers"===e.id).entries,vV=[{character:"a² + b² = c²",codePoint:"Pythagorean theorem"},{character:"E = mc²",codePoint:"Mass–energy equivalence"},{character:"A = πr²",codePoint:"Circle area"},{character:"x = (−b ± √(b² − 4ac)) / 2a",codePoint:"Quadratic formula"}];let yV=[];function wV(e){const t=gV.flatMap(e=>e.entries).find(t=>t.character===e)??{character:e,codePoint:`U+${e.codePointAt(0).toString(16).toUpperCase().padStart(4,"0")}`};yV=[t,...yV.filter(t=>t.character!==e)].slice(0,12)}var xV=ge("<div class=oasis-editor-symbol-menu-actions><button type=button class=oasis-editor-symbol-menu-action data-testid=editor-toolbar-equation><span></span></button><button type=button class=oasis-editor-symbol-menu-action data-testid=editor-toolbar-symbol><span></span></button><button type=button class=oasis-editor-symbol-menu-action data-testid=editor-toolbar-number><span>"),MV=ge("<div class=oasis-editor-symbol-picker><div class=oasis-editor-symbol-picker-header><button type=button class=oasis-editor-symbol-back></button><span></span></div><div class=oasis-editor-symbol-grid></div><button type=button class=oasis-editor-symbol-more data-testid=editor-toolbar-more-symbols><span>"),SV=ge("<button type=button class=oasis-editor-symbol-tile>");function AV(e){const t=Fe(),[n,a]=y("root"),r=()=>{switch(n()){case"symbols":return t("symbols.menu.symbol");case"numbers":return t("symbols.menu.number");case"equations":return t("symbols.menu.equation");default:return t("toolbar.symbols")}};return K(co,{icon:"omega",get label(){return t("toolbar.symbols")},testId:"editor-toolbar-symbols",get tooltip(){return t("toolbar.symbols")},ribbonSize:"large",panelClass:"oasis-editor-symbol-menu-panel",onOpenChange:e=>{e&&a("root")},get children(){return K(re,{get when(){return"root"===n()},get fallback(){return o=MV(),i=o.firstChild,l=i.firstChild,s=l.nextSibling,d=i.nextSibling,c=d.nextSibling,u=c.firstChild,l.$$click=e=>{e.stopPropagation(),a("root")},Ie(l,K(vr,{name:"arrow-left"})),Ie(s,r),Ie(d,K(ne,{get each(){return(()=>{switch(n()){case"symbols":return mV;case"numbers":return bV;case"equations":return vV;default:return[]}})()},children:t=>{return(a=SV()).$$click=()=>(t=>{if("equations"===n()){if(!e.api.commands.canExecute("insertEquation",uu(t.character)))return;return e.api.commands.execute("insertEquation",uu(t.character)),void e.api.focusEditor()}e.api.commands.canExecute("insertText",t.character)&&(wV(t.character),e.api.commands.execute("insertText",t.character),e.api.focusEditor())})(t),Ie(a,()=>t.character),w(e=>{var n=`${t.character} (${t.codePoint})`,r=`${t.character} (${t.codePoint})`,o=`editor-symbol-${t.codePoint.replace(/[^A-Z0-9]/g,"-")}`;return n!==e.e&&be(a,"title",e.e=n),r!==e.t&&be(a,"aria-label",e.t=r),o!==e.a&&be(a,"data-testid",e.a=o),e},{e:void 0,t:void 0,a:void 0}),a;var a}})),c.$$click=()=>{e.api.commands.canExecute("openSymbolDialog")&&e.api.commands.execute("openSymbolDialog")},Ie(c,K(vr,{name:"omega"}),u),Ie(u,()=>t("symbols.more")),w(e=>{var a=t("generic.back"),r=!("equations"!==n());return a!==e.e&&be(l,"aria-label",e.e=a),r!==e.t&&d.classList.toggle("oasis-editor-symbol-equation-grid",e.t=r),e},{e:void 0,t:void 0}),o;var o,i,l,s,d,c,u},get children(){var n=xV(),r=n.firstChild,o=r.firstChild,i=r.nextSibling,l=i.firstChild,s=i.nextSibling,d=s.firstChild;return r.$$click=t=>{t.stopPropagation(),e.api.commands.canExecute("openEquationDialog")&&e.api.commands.execute("openEquationDialog")},Ie(r,K(vr,{name:"square-function"}),o),Ie(o,()=>t("symbols.menu.equation")),Ie(r,K(vr,{name:"chevron-down"}),null),i.$$click=e=>{e.stopPropagation(),a("symbols")},Ie(i,K(vr,{name:"omega"}),l),Ie(l,()=>t("symbols.menu.symbol")),Ie(i,K(vr,{name:"chevron-down"}),null),s.$$click=e=>{e.stopPropagation(),a("numbers")},Ie(s,K(vr,{name:"hash"}),d),Ie(d,()=>t("symbols.menu.number")),Ie(s,K(vr,{name:"chevron-down"}),null),n}})}})}me(["click"]);var IV=ge("<i>"),CV=ge("<div class=oasis-editor-table-style-grid>"),TV=ge("<div class=oasis-editor-table-style-gallery><div class=oasis-editor-table-style-strip role=listbox>");function kV(e){const[t,n]=y(!1),a=()=>e.testId??"editor-toolbar-tbl-style",r=()=>`${a()}-panel`,o=M(()=>(e=>e.filter(e=>"table"===e.type).map((e,t)=>({style:e,index:t})).sort((e,t)=>(e.style.uiPriority??Number.MAX_SAFE_INTEGER)-(t.style.uiPriority??Number.MAX_SAFE_INTEGER)||e.index-t.index).map(({style:e})=>e))(e.styles)),i=t=>t.id===String(e.api.commands.state("setTableStyle").value??"");x(()=>{t()&&queueMicrotask(()=>{var e;null==(e=document.querySelector(`[data-testid="${r()}"] .oasis-editor-table-style-card-active, [data-testid="${r()}"] .oasis-editor-table-style-card`))||e.focus()})});const l=e=>{var t;if("Escape"===e.key)return e.preventDefault(),void n(!1);const a=Array.from(e.currentTarget.querySelectorAll(".oasis-editor-table-style-card")),r=a.indexOf(document.activeElement);if(r<0)return;const o={ArrowLeft:r-1,ArrowRight:r+1,ArrowUp:r-4,ArrowDown:r+4,Home:0,End:a.length-1}[e.key];void 0!==o&&(e.preventDefault(),null==(t=a[Math.max(0,Math.min(a.length-1,o))])||t.focus())},s=()=>K(ne,{get each(){return o()},children:t=>{const a=()=>t.tablePreview??{};return K(wr,{class:"oasis-editor-table-style-card",get active(){return i(t)},get classList(){return{"oasis-editor-table-style-card-active":i(t)}},role:"option",get"aria-selected"(){return i(t)},get title(){return t.name},get label(){return t.name},get"data-style-id"(){return t.id},onClick:()=>(t=>{e.api.commands.canExecute("setTableStyle")&&(e.api.commands.execute("setTableStyle",t.id),n(!1),e.api.focusEditor())})(t),get children(){return K(xr,{class:"oasis-editor-table-style-preview",get style(){return{"--table-fill":a().wholeFill??"#ffffff","--table-header-fill":a().headerFill??a().wholeFill??"#ffffff","--table-band-fill":a().bandFill??a().wholeFill??"#ffffff","--table-border":a().borderColor??"#d1d5db","--table-header-color":a().headerColor??"#17212b"}},get children(){return[IV(),IV(),IV(),IV(),IV(),IV(),IV(),IV(),IV()]}})}})}});return K(re,{get when(){return o().length>0},get fallback(){return K(xr,{class:"oasis-editor-table-style-gallery-empty",get children(){return e.api.t("table.tableStyle")}})},get children(){return K(no,{get open(){return t()},onOpenChange:n,placement:"bottom-end",panelClass:"oasis-editor-table-style-gallery-panel",panelRole:"listbox",get panelTestId(){return r()},trigger:t=>{return n=TV(),r=n.firstChild,"function"==typeof(o=t.ref)?Ae(o,n):t.ref=n,Ie(r,s),Ie(n,K(wr,{class:"oasis-editor-table-style-expand",get label(){return e.api.t("table.tableStyle")},"aria-haspopup":"listbox",get"aria-expanded"(){return t.open},get"data-testid"(){return`${a()}-expand`},onClick:()=>t.toggle(),get children(){return K(ro,{})}}),null),n;var n,r,o},get children(){var e=CV();return e.$$keydown=l,Ie(e,s),e}})}})}me(["keydown"]);var RV=ge("<div class=oasis-editor-table-style-options role=group>");const EV=[{command:"tableToggleHeaderRow",label:"table.headerRow"},{command:"tableToggleTotalRow",label:"table.totalRow"},{command:"tableToggleBandedRows",label:"table.bandedRows"},{command:"tableToggleFirstColumn",label:"table.firstColumn"},{command:"tableToggleLastColumn",label:"table.lastColumn"},{command:"tableToggleBandedColumns",label:"table.bandedColumns"}];function LV(e){return Ie(t=RV(),K(ne,{each:EV,children:t=>K(WE,{class:"oasis-editor-table-style-option",get label(){return e.api.t(t.label)},get checked(){return e.api.commands.state(t.command).isActive},get disabled(){return!e.api.commands.state(t.command).isEnabled},onChange:()=>{e.api.commands.execute(t.command)}})})),t;var t}var VV=ge('<svg class=oasis-editor-table-border-preset-icon viewBox="0 0 20 20"aria-hidden=true><rect x=2 y=2 width=16 height=16 fill=none stroke=currentColor stroke-opacity=.45 stroke-dasharray="1.5 1.5">'),NV=ge('<svg><path d="M2 2h16"></svg>',!1,!0,!1),zV=ge('<svg><path d="M2 18h16"></svg>',!1,!0,!1),PV=ge('<svg><path d="M2 2v16"></svg>',!1,!0,!1),OV=ge('<svg><path d="M18 2v16"></svg>',!1,!0,!1),qV=ge('<svg><path d="M2 10h16"></svg>',!1,!0,!1),BV=ge('<svg><path d="M10 2v16"></svg>',!1,!0,!1),WV=ge('<svg><path d="M2 2l16 16"></svg>',!1,!0,!1),FV=ge('<svg><path d="M2 18 18 2"></svg>',!1,!0,!1),DV=ge("<div class=oasis-editor-table-borders-divider>"),HV=ge("<div class=oasis-editor-table-borders-section>");const UV=[[{preset:"bottom",label:"Borda Inferior"},{preset:"top",label:"Borda Superior"},{preset:"left",label:"Borda Esquerda"},{preset:"right",label:"Borda Direita"},{preset:"none",label:"Sem Borda"}],[{preset:"all",label:"Todas as Bordas"},{preset:"outside",label:"Bordas Externas"},{preset:"inside",label:"Bordas Internas"}],[{preset:"insideHorizontal",label:"Borda Horizontal Interna"},{preset:"insideVertical",label:"Borda Vertical Interna"},{preset:"diagonalDown",label:"Borda Diagonal Inferior"},{preset:"diagonalUp",label:"Borda Diagonal Superior"}]];function GV(e){const t=e.preset;return(n=VV()).firstChild,Ie(n,"none"!==t&&[pe(()=>pe(()=>!!["all","outside","top"].includes(t))()&&NV()),pe(()=>pe(()=>!!["all","outside","bottom"].includes(t))()&&zV()),pe(()=>pe(()=>!!["all","outside","left"].includes(t))()&&PV()),pe(()=>pe(()=>!!["all","outside","right"].includes(t))()&&OV()),pe(()=>pe(()=>!!["all","inside","insideHorizontal"].includes(t))()&&qV()),pe(()=>pe(()=>!!["all","inside","insideVertical"].includes(t))()&&BV()),"diagonalDown"===t&&WV(),"diagonalUp"===t&&FV()],null),n;var n}var jV=ge("<div class=oasis-editor-design-gallery role=dialog><section class=oasis-editor-design-gallery-section><h3></h3><div class=oasis-editor-design-theme-grid role=listbox></div></section><section class=oasis-editor-design-gallery-section><h3></h3><div class=oasis-editor-design-option-grid role=listbox></div></section><section class=oasis-editor-design-gallery-section><h3></h3><div class=oasis-editor-design-option-grid role=listbox></div></section><div class=oasis-editor-design-gallery-columns><section class=oasis-editor-design-gallery-section><h3></h3><div class=oasis-editor-design-compact-grid role=listbox></div></section><section class=oasis-editor-design-gallery-section><h3></h3><div class=oasis-editor-design-compact-grid role=listbox>"),ZV=ge("<button type=button class=oasis-editor-design-theme-card role=option><span class=oasis-editor-design-theme-preview><strong>Aa</strong><span>Lorem ipsum</span><i></i><i></i></span><span>"),KV=ge("<p class=oasis-editor-design-preview-note> · "),XV=ge("<button type=button class=oasis-editor-design-option-card role=option><span class=oasis-editor-design-swatch-row></span><span>"),YV=ge("<i>"),JV=ge('<button type=button class="oasis-editor-design-option-card oasis-editor-design-font-card"role=option><strong>Título</strong><span>Texto normal'),QV=ge("<button type=button class=oasis-editor-design-list-card><strong></strong><small>"),$V=ge("<div class=oasis-editor-design-background-panel><h3></h3><div class=oasis-editor-design-presets></div><label><input></label><div class=oasis-editor-design-fields><label><input type=color></label><label><input type=number min=0 max=1 step=0.05></label><label><input type=number min=0.1 max=5 step=0.1></label><label><input type=number min=-180 max=180></label><label><input></label><label><input type=number min=8 max=240></label></div><div class=oasis-editor-design-actions><button type=button></button><label class=oasis-editor-design-file><input type=file accept=image/png,image/jpeg,image/gif,image/svg+xml></label><button type=button>"),_V=ge("<button type=button>"),eN=ge("<div class=oasis-editor-design-background-panel><h3></h3><div class=oasis-editor-design-border-preview>Página</div><div class=oasis-editor-design-fields><label><select><option value=single>Simples</option><option value=double>Dupla</option><option value=dashed>Tracejada</option><option value=dotted>Pontilhada</option></select></label><label><input type=color></label><label><input type=number min=1 max=12></label><label><input type=number min=0 max=144></label></div><div class=oasis-editor-design-actions><button type=button></button><button type=button>");const tN=[{id:"oasis",label:"Oasis",colors:["#0f766e","#14b8a6","#f0fdfa","#1f2937"],heading:"Aptos Display",body:"Aptos"},{id:"office",label:"Office",colors:["#4472c4","#5b9bd5","#deebf7","#1f2937"],heading:"Calibri Light",body:"Calibri"},{id:"facet",label:"Facet",colors:["#8064a2","#c4a7e7","#eee8f5","#262626"],heading:"Georgia",body:"Georgia"},{id:"integral",label:"Integral",colors:["#70ad47","#a9d18e","#e2f0d9","#1f2937"],heading:"Calibri Light",body:"Calibri"},{id:"ion",label:"Ion",colors:["#ed7d31","#f4b183","#fce4d6","#262626"],heading:"Garamond",body:"Garamond"},{id:"retrospect",label:"Retrospect",colors:["#5b9bd5","#9dc3e6","#deebf7","#1f2937"],heading:"Georgia",body:"Aptos"}],nN=[{id:"oasis",label:"Oasis",colors:["#0f766e","#14b8a6","#f0fdfa","#1f2937"]},{id:"office",label:"Office",colors:["#4472c4","#ed7d31","#a5a5a5","#ffc000"]},{id:"monochrome",label:"Monocromático",colors:["#111827","#4b5563","#9ca3af","#e5e7eb"]},{id:"warm",label:"Quente",colors:["#9a3412","#ea580c","#f59e0b","#fef3c7"]}],aN=[{id:"aptos",heading:"Aptos Display",body:"Aptos"},{id:"calibri",heading:"Calibri Light",body:"Calibri"},{id:"georgia",heading:"Georgia",body:"Georgia"},{id:"garamond",heading:"Garamond",body:"Garamond"}],rN=[{id:"compact",label:"Compacto",sample:"Antes 0 · Depois 4"},{id:"tight",label:"Estreito",sample:"Antes 0 · Depois 6"},{id:"open",label:"Aberto",sample:"Antes 0 · Depois 10"},{id:"relaxed",label:"Relaxado",sample:"Antes 4 · Depois 12"}],oN=[{id:"subtle",label:"Sutil",description:"Sombras leves"},{id:"moderate",label:"Moderado",description:"Contraste equilibrado"},{id:"intense",label:"Intenso",description:"Sombras marcantes"},{id:"flat",label:"Plano",description:"Sem efeitos"}];function iN(e,t,n){var a;const r=e.currentTarget,o=Array.from(r.querySelectorAll(t)),i=o.indexOf(document.activeElement);if(i<0)return;const l={ArrowLeft:i-1,ArrowRight:i+1,ArrowUp:i-n,ArrowDown:i+n,Home:0,End:o.length-1}[e.key];void 0!==l&&(e.preventDefault(),null==(a=o[Math.max(0,Math.min(o.length-1,l))])||a.focus())}me(["keydown","click","input"]);var lN=ge("<div class=oasis-editor-image-size-field><div class=oasis-editor-image-size-icon aria-hidden=true>"),sN=ge("<div class=oasis-editor-image-crop-flyout role=menu>"),dN=ge('<div class="oasis-editor-image-crop-flyout oasis-editor-image-crop-ratio-flyout"role=menu>'),cN=ge('<div class="oasis-editor-toolbar-panel oasis-editor-image-crop-menu"role=menu><div class=oasis-editor-toolbar-panel-separator role=separator></div><div class=oasis-editor-image-crop-menu-submenu-row></div><div class=oasis-editor-image-crop-menu-submenu-row>'),uN=ge("<div class=oasis-editor-image-crop-ratio-group><div class=oasis-editor-image-crop-ratio-heading>");function pN(e){const t=Fe(),n="height"===e.dimension?"imageHeightCm":"imageWidthCm",a="height"===e.dimension?"image.height":"image.width",r="height"===e.dimension?"move-vertical":"move-horizontal";return Ie((o=lN()).firstChild,K(vr,{name:r})),Ie(o,K(ZE,{class:"oasis-editor-tool-metric oasis-editor-image-size-metric",labelClass:"oasis-editor-tool-metric-label",get title(){return t(a)},get label(){return t(a)},controlClass:"oasis-editor-tool-number",get"data-testid"(){return`editor-toolbar-image-${e.dimension}`},min:"0.1",step:"0.1",get value(){return function(e,t){const n=e.commands.state(t).value;return"number"==typeof n?n.toFixed(2):""}(e.api,n)},onChange:t=>{e.api.commands.execute(n,null==t?"":String(t))}}),null),o;var o}const hN=[{id:"square",labelKey:"image.cropRatio.squareGroup",presets:["1:1"]},{id:"portrait",labelKey:"image.cropRatio.portrait",presets:["2:3","3:4","3:5","4:5"]},{id:"landscape",labelKey:"image.cropRatio.landscape",presets:["3:2","4:3","5:3","5:4","16:9","16:10"]}],fN=new Set(["line","lineInv","straightConnector1","bentConnector3","curvedConnector3","arc","leftBracket","rightBracket","leftBrace","rightBrace"]);function gN(e){return K(_r,{class:"oasis-editor-image-crop-menu-row",get"data-testid"(){return e.testId},role:"menuitem",get"aria-haspopup"(){return e.submenu?"menu":void 0},get"aria-expanded"(){return pe(()=>!!e.submenu)()?e.open:void 0},get"aria-controls"(){return pe(()=>!!e.submenu)()?e.submenuId:void 0},get onClick(){return e.onClick},get onMouseEnter(){return e.onHover},get onFocus(){return e.onHover},get icon(){return e.icon},get label(){return e.label},get trailingIcon(){return e.submenu?"chevron-right":void 0}})}function mN(e){const t=Fe(),n=()=>"en"===t("locale.id")?"en":"pt-BR",a=te(),r=`${a}-crop-shapes`,o=`${a}-crop-ratios`,[i,l]=y(null),s=e=>{l(t=>t===e?null:e)},d=(t,n)=>{e.api.commands.execute(t,n),l(null)};return c=cN(),u=c.firstChild,p=u.nextSibling,h=p.nextSibling,Ie(c,K(gN,{testId:"editor-toolbar-image-crop-toggle",icon:"crop",get label(){return t("image.crop")},onClick:()=>d("imageCrop")}),u),p.addEventListener("mouseleave",()=>{l(null)}),Ie(p,K(gN,{testId:"editor-toolbar-image-crop-shape",icon:"shapes",get label(){return t("image.cropToShape")},submenu:!0,get open(){return"shape"===i()},submenuId:r,onHover:()=>{l("shape")},onClick:()=>s("shape")}),null),Ie(p,K(re,{get when(){return"shape"===i()},get children(){var e=sN();return be(e,"id",r),Ie(e,K(ne,{get each(){return eV.flatMap(e=>e.presets).filter((e,t,n)=>!fN.has(e)&&n.indexOf(e)===t)},children:e=>K(_r,{class:"oasis-editor-image-crop-shape-tile",get title(){return aV(e,n())},get"aria-label"(){return aV(e,n())},"data-testid":`editor-toolbar-image-crop-shape-${e}`,onClick:()=>d("imageCropShape",e),get children(){return K(iV,{preset:e})}})})),e}}),null),h.addEventListener("mouseleave",()=>{l(null)}),Ie(h,K(gN,{testId:"editor-toolbar-image-crop-ratio",icon:"ratio",get label(){return t("image.cropAspectRatio")},submenu:!0,get open(){return"ratio"===i()},submenuId:o,onHover:()=>{l("ratio")},onClick:()=>s("ratio")}),null),Ie(h,K(re,{get when(){return"ratio"===i()},get children(){var e=dN();return be(e,"id",o),Ie(e,K(ne,{each:hN,children:e=>{return Ie((n=uN()).firstChild,()=>t(e.labelKey)),Ie(n,K(ne,{get each(){return e.presets},children:e=>K(_r,{class:"oasis-editor-image-crop-option",label:e,"data-testid":`editor-toolbar-image-crop-${e}`,onClick:()=>d("imageCropAspect",e)})}),null),n;var n}})),e}}),null),Ie(c,K(gN,{testId:"editor-toolbar-image-crop-fill",icon:"maximize",get label(){return t("image.cropFill")},onClick:()=>d("imageCropFill")}),null),Ie(c,K(gN,{testId:"editor-toolbar-image-crop-fit",icon:"minimize",get label(){return t("image.cropFit")},onClick:()=>d("imageCropFit")}),null),Ie(c,K(gN,{testId:"editor-toolbar-image-crop-reset",icon:"rotate-ccw",get label(){return t("image.cropReset")},onClick:()=>d("imageCropReset")}),null),c;var c,u,p,h}const bN={"editor-toolbar-new-document":{tab:"file",group:"document",row:1},"editor-toolbar-export-docx":{tab:"file",group:"document",row:1},"editor-toolbar-export-pdf":{tab:"file",group:"document",row:1},"editor-toolbar-import-document":{tab:"file",group:"document",row:1},"editor-toolbar-undo":{tab:"home",group:"clipboard",row:1},"editor-toolbar-redo":{tab:"home",group:"clipboard",row:2},"sep-history":{tab:"home",group:"clipboard",row:2},"editor-toolbar-style":{tab:"home",group:"styles",row:1},"editor-toolbar-font-family":{tab:"home",group:"font",row:1},"editor-toolbar-font-size":{tab:"home",group:"font",row:1},"editor-toolbar-font-increase":{tab:"home",group:"font",row:1},"editor-toolbar-font-decrease":{tab:"home",group:"font",row:1},"editor-toolbar-change-case":{tab:"home",group:"font",row:1},"editor-toolbar-clear-formatting":{tab:"home",group:"font",row:1},"editor-toolbar-color":{tab:"home",group:"font",row:2},"editor-toolbar-highlight":{tab:"home",group:"font",row:2},"editor-toolbar-text-shading":{tab:"home",group:"font",row:2},"sep-style":{tab:"home",group:"font",row:2},"editor-toolbar-bold":{tab:"home",group:"font",row:2},"editor-toolbar-italic":{tab:"home",group:"font",row:2},"editor-toolbar-underline-control":{tab:"home",group:"font",row:2},"editor-toolbar-strike":{tab:"home",group:"font",row:2},"editor-toolbar-superscript":{tab:"home",group:"font",row:2},"editor-toolbar-subscript":{tab:"home",group:"font",row:2},"sep-format":{tab:"home",group:"font",row:2},"editor-toolbar-insert-image":{tab:"insert",group:"illustrations",row:1},"editor-toolbar-insert-shape":{tab:"insert",group:"illustrations",row:2},"editor-toolbar-symbols":{tab:"insert",group:"symbols",row:1},"editor-toolbar-insert-table":{tab:"insert",group:"tables",row:1},"editor-toolbar-link":{tab:"insert",group:"links",row:1},"editor-toolbar-unlink":{tab:"insert",group:"links",row:2},"editor-toolbar-footnote":{tab:"references",group:"footnotes",row:1},"editor-toolbar-image-alt":{tab:"insert",group:"accessibility",row:2},"editor-toolbar-image-caption":{tab:"insert",group:"accessibility",row:1},"sep-insert":{tab:"insert",group:"accessibility",row:2},"editor-toolbar-image-crop":{tab:"imageFormat",group:"size",row:1},"editor-toolbar-image-height":{tab:"imageFormat",group:"size",row:1},"editor-toolbar-image-width":{tab:"imageFormat",group:"size",row:2},"editor-toolbar-image-border":{tab:"imageFormat",group:"imageStyles",row:1},"editor-toolbar-align-left":{tab:"home",group:"paragraph",row:2},"editor-toolbar-align-center":{tab:"home",group:"paragraph",row:2},"editor-toolbar-align-right":{tab:"home",group:"paragraph",row:2},"editor-toolbar-align-justify":{tab:"home",group:"paragraph",row:2},"editor-toolbar-list-bullet":{tab:"home",group:"paragraph",row:1},"editor-toolbar-list-ordered":{tab:"home",group:"paragraph",row:1},"editor-toolbar-list-outdent":{tab:"home",group:"paragraph",row:1},"editor-toolbar-list-indent":{tab:"home",group:"paragraph",row:1},"editor-toolbar-list-options":{tab:"home",group:"paragraph",row:1},"editor-toolbar-special-indent":{tab:"home",group:"paragraph",row:1},"editor-toolbar-line-spacing-control":{tab:"home",group:"paragraph",row:2},"sep-paragraph":{tab:"home",group:"paragraph",row:2},"editor-toolbar-metrics":{tab:"layout",group:"paragraph",row:1},"sep-metrics":{tab:"layout",group:"paragraph",row:2},"editor-toolbar-tbl-insert-row-above":{tab:"tableLayout",group:"rowsColumns",row:1},"editor-toolbar-tbl-insert-row-below":{tab:"tableLayout",group:"rowsColumns",row:1},"editor-toolbar-tbl-delete-row":{tab:"tableLayout",group:"rowsColumns",row:1},"editor-toolbar-tbl-insert-col-left":{tab:"tableLayout",group:"rowsColumns",row:2},"editor-toolbar-tbl-insert-col-right":{tab:"tableLayout",group:"rowsColumns",row:2},"editor-toolbar-tbl-delete-col":{tab:"tableLayout",group:"rowsColumns",row:2},"editor-toolbar-tbl-merge":{tab:"tableLayout",group:"merge",row:1},"editor-toolbar-tbl-split":{tab:"tableLayout",group:"merge",row:2},"editor-toolbar-tbl-width-100":{tab:"tableLayout",group:"cellSize",row:1},"editor-toolbar-tbl-align-left":{tab:"tableLayout",group:"alignment",row:1},"editor-toolbar-tbl-align-center":{tab:"tableLayout",group:"alignment",row:1},"editor-toolbar-tbl-align-right":{tab:"tableLayout",group:"alignment",row:1},"editor-toolbar-tbl-header-row":{tab:"tableDesign",group:"tableStyleOptions",row:1},"editor-toolbar-tbl-total-row":{tab:"tableDesign",group:"tableStyleOptions",row:1},"editor-toolbar-tbl-banded-rows":{tab:"tableDesign",group:"tableStyleOptions",row:1},"editor-toolbar-tbl-first-col":{tab:"tableDesign",group:"tableStyleOptions",row:2},"editor-toolbar-tbl-last-col":{tab:"tableDesign",group:"tableStyleOptions",row:2},"editor-toolbar-tbl-banded-cols":{tab:"tableDesign",group:"tableStyleOptions",row:2},"editor-toolbar-tbl-shading":{tab:"tableDesign",group:"borders",row:1},"editor-toolbar-tbl-borders":{tab:"tableDesign",group:"borders",row:2},"editor-toolbar-tbl-no-borders":{tab:"tableDesign",group:"borders",row:2},"editor-toolbar-tbl-style":{tab:"tableDesign",group:"tableStyles",row:1},"editor-toolbar-tbl-distribute-rows":{tab:"tableLayout",group:"cellSize",row:1},"editor-toolbar-tbl-distribute-cols":{tab:"tableLayout",group:"cellSize",row:1},"editor-toolbar-tbl-autofit":{tab:"tableLayout",group:"cellSize",row:2},"editor-toolbar-margins":{tab:"layout",group:"section",row:1},"editor-toolbar-section":{tab:"layout",group:"section",row:1}};const vN=[{command:"alignLeft",icon:"align-left",testId:"editor-toolbar-align-left",tooltipKey:"toolbar.alignLeft"},{command:"alignCenter",icon:"align-center",testId:"editor-toolbar-align-center",tooltipKey:"toolbar.alignCenter"},{command:"alignRight",icon:"align-right",testId:"editor-toolbar-align-right",tooltipKey:"toolbar.alignRight"},{command:"alignJustify",icon:"align-justify",testId:"editor-toolbar-align-justify",tooltipKey:"toolbar.justify"}],yN=[{command:"bulletList",icon:"list",testId:"editor-toolbar-list-bullet",tooltipKey:"toolbar.bulletList"},{command:"orderedList",icon:"list-ordered",testId:"editor-toolbar-list-ordered",tooltipKey:"toolbar.numberedList"}],wN=[{id:"editor-toolbar-tbl-insert-row-above",command:"tableInsertRowBefore",icon:"tableInsertRowAbove",labelKey:"table.insertAbove",tooltipKey:"table.insertRowAbove",ribbonSize:"large"},{id:"editor-toolbar-tbl-insert-row-below",command:"tableInsertRowAfter",icon:"tableInsertRowBelow",labelKey:"table.insertBelow",tooltipKey:"table.insertRowBelow",ribbonSize:"large"},{id:"editor-toolbar-tbl-delete-row",command:"tableDeleteRow",icon:"tableDeleteRow",labelKey:"table.deleteRow",tooltipKey:"table.deleteRow"},{id:"editor-toolbar-tbl-insert-col-left",command:"tableInsertColumnBefore",icon:"tableInsertColumnLeft",labelKey:"table.insertLeft",tooltipKey:"table.insertColumnLeft",ribbonSize:"large"},{id:"editor-toolbar-tbl-insert-col-right",command:"tableInsertColumnAfter",icon:"tableInsertColumnRight",labelKey:"table.insertRight",tooltipKey:"table.insertColumnRight",ribbonSize:"large"},{id:"editor-toolbar-tbl-delete-col",command:"tableDeleteColumn",icon:"tableDeleteColumn",labelKey:"table.deleteColumn",tooltipKey:"table.deleteColumn"},{id:"editor-toolbar-tbl-merge",command:"tableMerge",icon:"tableMerge",labelKey:"table.merge",tooltipKey:"table.mergeTooltip"},{id:"editor-toolbar-tbl-split",command:"tableSplit",icon:"tableSplit",labelKey:"table.split",tooltipKey:"table.splitTooltip"},{id:"editor-toolbar-tbl-width-100",command:"tableWidth100",icon:"tableWidth",labelKey:"table.width100",tooltipKey:"table.width100Tooltip"},{id:"editor-toolbar-tbl-align-left",command:"tableAlignLeft",icon:"tableAlignLeft",labelKey:"table.alignLeft",tooltipKey:"table.alignLeft"},{id:"editor-toolbar-tbl-align-center",command:"tableAlignCenter",icon:"tableAlignCenter",labelKey:"table.alignCenter",tooltipKey:"table.alignCenter"},{id:"editor-toolbar-tbl-align-right",command:"tableAlignRight",icon:"tableAlignRight",labelKey:"table.alignRight",tooltipKey:"table.alignRight"}],xN=ut;function MN(e){return Number.isFinite(e)?e*xN:0}function SN(e){return MN(e.fontSize??vt)}const AN=[8,9,10,11,12,14,16,18,20,24,28,32,36,48,72];function IN(e){return Ac(MN(e),2)}function CN(e){return Ac((t=e,Number.isFinite(t)?t/xN:0),4);var t}function TN(e){const t=Number(e);return!Number.isFinite(t)||t<=0?"":String(IN(t))}function kN(e){const t=Number(e);return!Number.isFinite(t)||t<=0?null:CN(t)}const RN=/Mac/i.test(navigator.userAgent)?"⌘":"Ctrl",EN=e=>e.commands.state("documentStyles").value??[],LN=e=>{const t=new Set(["Arial","Calibri, sans-serif","Calibri Light, sans-serif","Georgia","Inter","Open Sans, sans-serif","Times New Roman","Courier New"]);for(const a of EN(e))a.fontFamily&&t.add(a.fontFamily);const n=String(e.commands.state("setFontFamily").value??"").trim();return n&&t.add(n),Array.from(t).sort((e,t)=>e.localeCompare(t)).map(e=>({value:e,label:e}))},VN=e=>{const t=new Set(AN);for(const a of EN(e))"number"==typeof a.fontSize&&Number.isFinite(a.fontSize)&&t.add(IN(a.fontSize));const n=Number(e.commands.state("setFontSize").value);return Number.isFinite(n)&&n>0&&t.add(n),Array.from(t).sort((e,t)=>e-t).map(e=>({value:String(e),label:String(e)}))};function NN(e){const t=[];t.push({type:"menu",id:"editor-toolbar-design-themes",testId:"editor-toolbar-design-themes",tab:"design",group:"documentFormatting",row:1,ribbonSize:"large",iconName:"palette",label:e("design.themes"),tooltip:e("design.themes"),panelClass:"oasis-editor-design-gallery-panel",content:{kind:"custom",render:e=>function(e){const[t,n]=y(null),a=(t,n)=>{e.api.commands.execute(t,n),e.api.focusEditor()},r=M(()=>String(e.api.commands.state("applyDocumentTheme").value??"")),o=M(()=>String(e.api.commands.state("setDocumentColorScheme").value??"")),i=M(()=>String(e.api.commands.state("setDocumentFontScheme").value??"")),l=M(()=>String(e.api.commands.state("setDocumentParagraphSpacing").value??"")),s=M(()=>String(e.api.commands.state("setDocumentEffects").value??""));return d=jV(),c=d.firstChild,u=c.firstChild,p=u.nextSibling,h=c.nextSibling,f=h.firstChild,g=f.nextSibling,m=h.nextSibling,b=m.firstChild,v=b.nextSibling,x=m.nextSibling.firstChild,S=x.firstChild,A=S.nextSibling,I=x.nextSibling.firstChild,C=I.nextSibling,Ie(u,()=>e.api.t("design.themes")),p.$$keydown=e=>iN(e,".oasis-editor-design-theme-card",3),Ie(p,K(ne,{each:tN,children:e=>{return t=ZV(),o=t.firstChild,i=o.firstChild,l=i.nextSibling,s=l.nextSibling,d=s.nextSibling,c=o.nextSibling,t.$$click=()=>a("applyDocumentTheme",e.id),t.addEventListener("blur",()=>n(null)),t.addEventListener("focus",()=>n(e.id)),t.addEventListener("mouseleave",()=>n(null)),t.addEventListener("mouseenter",()=>n(e.id)),Ie(c,()=>e.label),w(n=>{var a=!(r()!==e.id),c=r()===e.id,u=`editor-toolbar-design-theme-${e.id}`,p=e.colors[2],h=e.colors[1],f=e.heading,g=e.colors[3],m=e.body,b=e.colors[0],v=e.colors[1];return a!==n.e&&t.classList.toggle("oasis-editor-design-card-active",n.e=a),c!==n.t&&be(t,"aria-selected",n.t=c),u!==n.a&&be(t,"data-testid",n.a=u),p!==n.o&&Me(o,"background-color",n.o=p),h!==n.i&&Me(i,"color",n.i=h),f!==n.n&&Me(i,"font-family",n.n=f),g!==n.s&&Me(l,"color",n.s=g),m!==n.h&&Me(l,"font-family",n.h=m),b!==n.r&&Me(s,"background-color",n.r=b),v!==n.d&&Me(d,"background-color",n.d=v),n},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0}),t;var t,o,i,l,s,d,c}})),Ie(c,K(re,{get when(){return t()},children:e=>{const t=tN.find(t=>t.id===e());return Ie(n=KV(),()=>null==t?void 0:t.heading,n.firstChild),Ie(n,()=>null==t?void 0:t.body,null),n;var n}}),null),Ie(f,()=>e.api.t("design.colors")),g.$$keydown=e=>iN(e,".oasis-editor-design-option-card",4),Ie(g,K(ne,{each:nN,children:e=>{return r=(n=(t=XV()).firstChild).nextSibling,t.$$click=()=>a("setDocumentColorScheme",e.id),Ie(n,K(ne,{get each(){return e.colors},children:e=>{return Me(t=YV(),"background-color",e),t;var t}})),Ie(r,()=>e.label),w(n=>{var a=!(o()!==e.id),r=o()===e.id,i=`editor-toolbar-design-color-${e.id}`;return a!==n.e&&t.classList.toggle("oasis-editor-design-card-active",n.e=a),r!==n.t&&be(t,"aria-selected",n.t=r),i!==n.a&&be(t,"data-testid",n.a=i),n},{e:void 0,t:void 0,a:void 0}),t;var t,n,r}})),Ie(b,()=>e.api.t("design.fonts")),v.$$keydown=e=>iN(e,".oasis-editor-design-font-card",2),Ie(v,K(ne,{each:aN,children:e=>{return t=JV(),n=t.firstChild,r=n.nextSibling,t.$$click=()=>a("setDocumentFontScheme",e.id),w(a=>{var o=!(i()!==e.id),l=i()===e.id,s=`editor-toolbar-design-font-${e.id}`,d=e.heading,c=e.body;return o!==a.e&&t.classList.toggle("oasis-editor-design-card-active",a.e=o),l!==a.t&&be(t,"aria-selected",a.t=l),s!==a.a&&be(t,"data-testid",a.a=s),d!==a.o&&Me(n,"font-family",a.o=d),c!==a.i&&Me(r,"font-family",a.i=c),a},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),t;var t,n,r}})),Ie(S,()=>e.api.t("design.spacing")),Ie(A,K(ne,{each:rN,children:e=>{return r=(n=(t=QV()).firstChild).nextSibling,t.$$click=()=>a("setDocumentParagraphSpacing",e.id),Ie(n,()=>e.label),Ie(r,()=>e.sample),w(()=>t.classList.toggle("oasis-editor-design-card-active",!(l()!==e.id))),t;var t,n,r}})),Ie(I,()=>e.api.t("design.effects")),Ie(C,K(ne,{each:oN,children:e=>{return r=(n=(t=QV()).firstChild).nextSibling,t.$$click=()=>a("setDocumentEffects",e.id),Ie(n,()=>e.label),Ie(r,()=>e.description),w(()=>t.classList.toggle("oasis-editor-design-card-active",!(s()!==e.id))),t;var t,n,r}})),w(()=>be(d,"aria-label",e.api.t("design.themes"))),d;var d,c,u,p,h,f,g,m,b,v,x,S,A,I,C}({api:e})}}),t.push({type:"button",id:"editor-toolbar-design-default",testId:"editor-toolbar-design-default",tab:"design",group:"documentFormatting",row:2,iconName:"check",label:e("design.setDefault"),tooltip:e("design.setDefault"),command:"setDocumentDesignDefault"}),t.push({type:"menu",id:"editor-toolbar-design-watermark",testId:"editor-toolbar-design-watermark",tab:"design",group:"pageBackground",row:1,iconName:"droplets",label:e("design.watermark"),tooltip:e("design.watermark"),panelClass:"oasis-editor-design-background-panel-wrap",content:{kind:"custom",render:e=>function(e){var t,n,a,r,o,i,l;const s=()=>e.api.commands.state("setDocumentWatermark").value??null,[d,c]=y((null==(t=s())?void 0:t.text)??"CONFIDENCIAL"),[u,p]=y((null==(n=s())?void 0:n.color)??"#94a3b8"),[h,f]=y((null==(a=s())?void 0:a.opacity)??.25),[g,m]=y((null==(r=s())?void 0:r.scale)??1),[b,v]=y((null==(o=s())?void 0:o.rotation)??-45),[x,M]=y((null==(i=s())?void 0:i.fontFamily)??"Arial"),[S,A]=y((null==(l=s())?void 0:l.fontSize)??48),I=()=>{e.api.commands.execute("setDocumentWatermark",{kind:"text",text:d(),color:u(),opacity:h(),scale:g(),rotation:b(),fontFamily:x(),fontSize:S()})},C=t=>{var n;const a=null==(n=t.currentTarget.files)?void 0:n[0];if(!a||!a.type.startsWith("image/"))return;const r=new FileReader;r.onload=()=>{e.api.commands.execute("setDocumentWatermark",{kind:"image",src:String(r.result),color:u(),opacity:h(),scale:g(),rotation:b()})},r.readAsDataURL(a)};return T=$V(),k=T.firstChild,R=k.nextSibling,E=R.nextSibling,L=E.firstChild,V=E.nextSibling,N=V.firstChild,z=N.firstChild,P=N.nextSibling,O=P.firstChild,q=P.nextSibling,B=q.firstChild,W=q.nextSibling,F=W.firstChild,D=W.nextSibling,H=D.firstChild,U=D.nextSibling,G=U.firstChild,j=V.nextSibling.firstChild,Z=j.nextSibling,X=Z.firstChild,Y=Z.nextSibling,Ie(k,()=>e.api.t("design.watermark")),Ie(R,K(ne,{each:["CONFIDENCIAL","RASCUNHO","NÃO COPIAR"],children:e=>{return(t=_V()).$$click=()=>{c(e),I()},Ie(t,e),t;var t}})),Ie(E,()=>e.api.t("design.text"),L),L.$$input=e=>c(e.currentTarget.value),Ie(N,()=>e.api.t("design.color"),z),z.$$input=e=>p(e.currentTarget.value),Ie(P,()=>e.api.t("design.opacity"),O),O.$$input=e=>f(Number(e.currentTarget.value)),Ie(q,()=>e.api.t("design.scale"),B),B.$$input=e=>m(Number(e.currentTarget.value)),Ie(W,()=>e.api.t("design.rotation"),F),F.$$input=e=>v(Number(e.currentTarget.value)),Ie(D,()=>e.api.t("design.fontFamily"),H),H.$$input=e=>M(e.currentTarget.value),Ie(U,()=>e.api.t("design.fontSize"),G),G.$$input=e=>A(Number(e.currentTarget.value)),j.$$click=I,Ie(j,()=>e.api.t("design.applyText")),Ie(Z,()=>e.api.t("design.useImage"),X),X.addEventListener("change",C),Y.$$click=()=>e.api.commands.execute("setDocumentWatermark",null),Ie(Y,()=>e.api.t("design.remove")),w(()=>L.value=d()),w(()=>z.value=u()),w(()=>O.value=h()),w(()=>B.value=g()),w(()=>F.value=b()),w(()=>H.value=x()),w(()=>G.value=S()),T;var T,k,R,E,L,V,N,z,P,O,q,B,W,F,D,H,U,G,j,Z,X,Y}({api:e})}}),t.push({type:"colorPicker",id:"editor-toolbar-design-page-color",testId:"editor-toolbar-design-page-color",tab:"design",group:"pageBackground",row:1,kind:"shading",command:"setDocumentPageColor",defaultValue:"#ffffff",label:e("design.pageColor"),tooltip:e("design.pageColor"),ribbonSize:"large"}),t.push({type:"menu",id:"editor-toolbar-design-page-borders",testId:"editor-toolbar-design-page-borders",tab:"design",group:"pageBackground",row:2,iconName:"frame",label:e("design.pageBorders"),tooltip:e("design.pageBorders"),panelClass:"oasis-editor-design-background-panel-wrap",content:{kind:"custom",render:e=>function(e){var t,n,a,r;const o=()=>e.api.commands.state("setDocumentPageBorder").value??null,[i,l]=y((null==(t=o())?void 0:t.style)??"single"),[s,d]=y((null==(n=o())?void 0:n.color)??"#64748b"),[c,u]=y((null==(a=o())?void 0:a.width)??1),[p,h]=y((null==(r=o())?void 0:r.distance)??24),f=()=>{e.api.commands.execute("setDocumentPageBorder",{style:i(),color:s(),width:c(),distance:p()})};return g=eN(),m=g.firstChild,b=m.nextSibling,v=b.nextSibling,x=v.firstChild,M=x.firstChild,S=x.nextSibling,A=S.firstChild,I=S.nextSibling,C=I.firstChild,T=I.nextSibling,k=T.firstChild,R=v.nextSibling.firstChild,E=R.nextSibling,Ie(m,()=>e.api.t("design.pageBorders")),Ie(x,()=>e.api.t("design.borderStyle"),M),M.addEventListener("change",e=>l(e.currentTarget.value)),Ie(S,()=>e.api.t("design.color"),A),A.$$input=e=>d(e.currentTarget.value),Ie(I,()=>e.api.t("design.borderWidth"),C),C.$$input=e=>u(Number(e.currentTarget.value)),Ie(T,()=>e.api.t("design.distance"),k),k.$$input=e=>h(Number(e.currentTarget.value)),R.$$click=f,Ie(R,()=>e.api.t("design.apply")),E.$$click=()=>e.api.commands.execute("setDocumentPageBorder",null),Ie(E,()=>e.api.t("design.remove")),w(e=>Me(b,"border",`${c()}px ${i()} ${s()}`)),w(()=>M.value=i()),w(()=>A.value=s()),w(()=>C.value=c()),w(()=>k.value=p()),g;var g,m,b,v,x,M,S,A,I,C,T,k,R,E}({api:e})}}),t.push({type:"button",id:"editor-toolbar-new-document",testId:"editor-toolbar-new-document",iconName:"file-plus",labelKey:"toolbar.newDocument",tooltipKey:"toolbar.newDocument",command:"newDocument",ribbonSize:"large"}),t.push({type:"button",id:"editor-toolbar-import-document",testId:"editor-toolbar-import-document",iconName:"upload",labelKey:"toolbar.importDocx",tooltipKey:"toolbar.importDocx",command:"importDocument",ribbonSize:"large"}),t.push({type:"button",id:"editor-toolbar-export-docx",testId:"editor-toolbar-export-docx",iconName:"file-text",labelKey:"toolbar.exportDocx",tooltipKey:"toolbar.exportDocx",command:"exportDocx",ribbonSize:"large"}),t.push({type:"button",id:"editor-toolbar-export-pdf",testId:"editor-toolbar-export-pdf",iconName:"file-down",labelKey:"toolbar.exportPdf",tooltipKey:"toolbar.exportPdf",command:"exportPdf",ribbonSize:"large"}),t.push({type:"button",id:"editor-toolbar-undo",testId:"editor-toolbar-undo",iconName:"undo",command:"undo",tooltip:`${e("toolbar.undo")} (${RN}+Z)`}),t.push({type:"button",id:"editor-toolbar-redo",testId:"editor-toolbar-redo",iconName:"redo",command:"redo",tooltip:`${e("toolbar.redo")} (${RN}+Shift+Z)`}),t.push({type:"separator",id:"sep-history"}),t.push({type:"styleGallery",id:"editor-toolbar-style",testId:"editor-toolbar-style",tooltipKey:"toolbar.style",ribbonSize:"large",styles:EN,paragraphCommand:"setStyleId",characterCommand:"setCharacterStyleId"}),t.push({type:"select",id:"editor-toolbar-font-family",testId:"editor-toolbar-font-family",tooltipKey:"toolbar.fontFamily",placeholder:e("toolbar.font"),command:"setFontFamily",options:LN}),t.push({type:"select",id:"editor-toolbar-font-size",testId:"editor-toolbar-font-size",width:"small",tooltipKey:"toolbar.fontSize",command:"setFontSize",options:VN}),t.push({type:"button",id:"editor-toolbar-font-increase",testId:"editor-toolbar-font-increase",iconName:"a-arrow-up",command:"increaseFontSize",tooltipKey:"toolbar.increaseFontSize"}),t.push({type:"button",id:"editor-toolbar-font-decrease",testId:"editor-toolbar-font-decrease",iconName:"a-arrow-down",command:"decreaseFontSize",tooltipKey:"toolbar.decreaseFontSize"}),t.push({type:"menu",id:"editor-toolbar-change-case",testId:"editor-toolbar-change-case",iconName:"case-sensitive",tooltipKey:"toolbar.changeCase",isDisabled:e=>!e.commands.state({name:"changeTextCase"}).isEnabled,content:{kind:"items",items:[{type:"button",id:"editor-toolbar-case-sentence",testId:"editor-toolbar-case-sentence",labelKey:"toolbar.caseSentence",wide:!0,tooltipKey:"toolbar.caseSentence",command:{name:"changeTextCase",payload:"sentence"}},{type:"button",id:"editor-toolbar-case-lower",testId:"editor-toolbar-case-lower",labelKey:"toolbar.caseLower",wide:!0,tooltipKey:"toolbar.caseLower",command:{name:"changeTextCase",payload:"lower"}},{type:"button",id:"editor-toolbar-case-upper",testId:"editor-toolbar-case-upper",labelKey:"toolbar.caseUpper",wide:!0,tooltipKey:"toolbar.caseUpper",command:{name:"changeTextCase",payload:"upper"}},{type:"button",id:"editor-toolbar-case-capitalize",testId:"editor-toolbar-case-capitalize",labelKey:"toolbar.caseCapitalize",wide:!0,tooltipKey:"toolbar.caseCapitalize",command:{name:"changeTextCase",payload:"capitalize"}},{type:"button",id:"editor-toolbar-case-toggle",testId:"editor-toolbar-case-toggle",labelKey:"toolbar.caseToggle",wide:!0,tooltipKey:"toolbar.caseToggle",command:{name:"changeTextCase",payload:"toggle"}}]}}),t.push({type:"button",id:"editor-toolbar-clear-formatting",testId:"editor-toolbar-clear-formatting",iconName:"remove-formatting",command:"clearFormatting",tooltipKey:"toolbar.clearFormatting"}),t.push({type:"toggle",id:"editor-toolbar-bold",testId:"editor-toolbar-bold",iconName:"bold",command:"bold",tooltipKey:"toolbar.bold"}),t.push({type:"toggle",id:"editor-toolbar-italic",testId:"editor-toolbar-italic",iconName:"italic",command:"italic",tooltipKey:"toolbar.italic"}),t.push({type:"custom",id:"editor-toolbar-underline-control",render:e=>xL({api:e})}),t.push({type:"toggle",id:"editor-toolbar-strike",testId:"editor-toolbar-strike",iconName:"strikethrough",command:"strike",tooltipKey:"toolbar.strike"}),t.push({type:"toggle",id:"editor-toolbar-subscript",testId:"editor-toolbar-subscript",iconName:"subscript",command:"subscript",tooltipKey:"toolbar.subscript"}),t.push({type:"toggle",id:"editor-toolbar-superscript",testId:"editor-toolbar-superscript",iconName:"superscript",command:"superscript",tooltipKey:"toolbar.superscript"}),t.push({type:"separator",id:"sep-format"}),t.push({type:"colorPicker",id:"editor-toolbar-color",testId:"editor-toolbar-color",kind:"color",iconName:"type",defaultValue:"#111827",tooltipKey:"toolbar.color",command:"setColor"}),t.push({type:"colorPicker",id:"editor-toolbar-highlight",testId:"editor-toolbar-highlight",kind:"highlight",iconName:"highlighter",defaultValue:"#fef08a",tooltipKey:"toolbar.highlight",command:"setHighlight"}),t.push({type:"colorPicker",id:"editor-toolbar-text-shading",testId:"editor-toolbar-text-shading",kind:"shading",iconName:"paint-bucket",defaultValue:"#fef3c7",tooltipKey:"toolbar.textShading",command:"setTextShading"}),t.push({type:"separator",id:"sep-style"}),t.push({type:"button",id:"editor-toolbar-insert-image",testId:"editor-toolbar-insert-image",iconName:"image",tooltipKey:"toolbar.image",labelKey:"toolbar.image",ribbonSize:"large",command:"insertImage"}),t.push({type:"menu",id:"editor-toolbar-insert-shape",testId:"editor-toolbar-insert-shape",iconName:"shapes",tooltipKey:"toolbar.shapes",labelKey:"toolbar.shapes",ribbonSize:"large",panelClass:"oasis-editor-shape-gallery-panel",content:{kind:"custom",render:e=>hV({api:e})}}),t.push({type:"custom",id:"editor-toolbar-symbols",testId:"editor-toolbar-symbols",ribbonSize:"large",render:e=>AV({api:e})}),t.push({type:"gridPicker",id:"editor-toolbar-insert-table",testId:"editor-toolbar-insert-table",tooltipKey:"toolbar.table",labelKey:"toolbar.table",ribbonSize:"large",command:"insertTable"}),t.push({type:"button",id:"editor-toolbar-link",testId:"editor-toolbar-link",iconName:"link",command:"link",tooltip:`${e("toolbar.link")} (${RN}+K)`,labelKey:"toolbar.link",ribbonSize:"large"}),t.push({type:"button",id:"editor-toolbar-unlink",testId:"editor-toolbar-unlink",iconName:"unlink",command:"unlink",tooltipKey:"toolbar.unlink",labelKey:"toolbar.unlink",ribbonSize:"large"}),t.push({type:"button",id:"editor-toolbar-footnote",testId:"editor-toolbar-footnote",iconName:"footnote",command:"insertFootnote",tooltip:`${e("toolbar.footnote")} (${RN}+Alt+F)`,labelKey:"toolbar.footnote",ribbonSize:"large"}),t.push({type:"button",id:"editor-toolbar-image-alt",testId:"editor-toolbar-image-alt",iconName:"file-text",tooltipKey:"toolbar.alt",labelKey:"toolbar.alt",ribbonSize:"large",command:"editImageAlt",isVisible:e=>e.commands.state("editImageAlt").isEnabled}),t.push({type:"button",id:"editor-toolbar-image-caption",testId:"editor-toolbar-image-caption",iconName:"subtitles",tooltipKey:"toolbar.imageCaption",labelKey:"toolbar.imageCaption",ribbonSize:"large",command:"insertImageCaption",isVisible:e=>e.commands.state("insertImageCaption").isEnabled}),t.push({type:"separator",id:"sep-insert"}),t.push({type:"menu",id:"editor-toolbar-image-crop",testId:"editor-toolbar-image-crop",iconName:"crop",tooltipKey:"image.crop",labelKey:"image.crop",ribbonSize:"large",isActive:e=>e.commands.state("imageCrop").isActive,panelClass:"oasis-editor-image-crop-panel",content:{kind:"custom",render:e=>mN({api:e})}}),t.push({type:"custom",id:"editor-toolbar-image-height",testId:"editor-toolbar-image-height",render:e=>pN({api:e,dimension:"height"})}),t.push({type:"custom",id:"editor-toolbar-image-width",testId:"editor-toolbar-image-width",render:e=>pN({api:e,dimension:"width"})}),t.push({type:"pictureBorder",id:"editor-toolbar-image-border",testId:"editor-toolbar-image-border",command:"imageBorder",labelKey:"image.border",tooltipKey:"image.border",ribbonSize:"large"});for(const n of vN)t.push({type:"toggle",id:n.testId,testId:n.testId,iconName:n.icon,command:n.command,tooltipKey:n.tooltipKey});for(const n of yN)t.push({type:"toggle",id:n.testId,testId:n.testId,iconName:n.icon,command:n.command,tooltipKey:n.tooltipKey});t.push({type:"button",id:"editor-toolbar-list-outdent",testId:"editor-toolbar-list-outdent",iconName:"indent-decrease",tooltipKey:"toolbar.decreaseIndent",command:"outdent"}),t.push({type:"button",id:"editor-toolbar-list-indent",testId:"editor-toolbar-list-indent",iconName:"indent-increase",tooltipKey:"toolbar.increaseIndent",command:"indent"}),t.push({type:"custom",id:"editor-toolbar-list-options",render:e=>function(e){const t=Fe(),n=e.api;return K(co,{icon:"list-filter",get tooltip(){return t("toolbar.listFormat")},testId:"editor-toolbar-list-options-dropdown",hideChevron:!0,get children(){var e=kL(),a=e.firstChild,r=a.firstChild,o=a.nextSibling.firstChild,i=o.nextSibling;return Ie(r,()=>t("toolbar.listFormat")),Ie(a,K(fo,{"data-testid":"editor-toolbar-list-format",onChange:e=>n.commands.execute("setListFormat",e.currentTarget.value),get tooltip(){return t("toolbar.listFormat")},get children(){return[(i=ML(),Ie(i,()=>t("toolbar.formatDecimal")),i),(o=SL(),Ie(o,()=>t("toolbar.formatLowerLetter")),o),(r=AL(),Ie(r,()=>t("toolbar.formatUpperLetter")),r),(a=IL(),Ie(a,()=>t("toolbar.formatLowerRoman")),a),(n=CL(),Ie(n,()=>t("toolbar.formatUpperRoman")),n),(e=TL(),Ie(e,()=>t("toolbar.formatBullet")),e)];var e,n,a,r,o,i}}),null),Ie(o,()=>t("toolbar.listStartAt")),i.addEventListener("change",e=>n.commands.execute("setListStartAt",e.currentTarget.value)),w(()=>be(i,"title",t("toolbar.listStartAt"))),e}})}({api:e})}),t.push({type:"split",id:"editor-toolbar-special-indent",testId:"editor-toolbar-special-indent",iconName:"specialIndentFirstLine",tooltipKey:"toolbar.specialIndent",command:{name:"setSpecialIndent",payload:{kind:"firstLine"}},isActive:()=>!1,panelClass:"oasis-editor-toolbar-dropdown-menu oasis-editor-special-indent-menu",menu:{kind:"items",items:[{type:"button",id:"editor-toolbar-special-indent-none",testId:"editor-toolbar-special-indent-none",iconName:"minus",labelKey:"toolbar.specialIndentNone",tooltipKey:"toolbar.specialIndentNone",command:{name:"setSpecialIndent",payload:{kind:"none"}},wide:!0},{type:"button",id:"editor-toolbar-special-indent-first-line",testId:"editor-toolbar-special-indent-first-line",iconName:"list-collapse",labelKey:"toolbar.specialIndentFirstLine",tooltipKey:"toolbar.specialIndentFirstLine",command:{name:"setSpecialIndent",payload:{kind:"firstLine"}},wide:!0},{type:"button",id:"editor-toolbar-special-indent-hanging",testId:"editor-toolbar-special-indent-hanging",iconName:"list-indent-increase",labelKey:"toolbar.specialIndentHanging",tooltipKey:"toolbar.specialIndentHanging",command:{name:"setSpecialIndent",payload:{kind:"hanging"}},wide:!0}]}}),t.push({type:"custom",id:"editor-toolbar-line-spacing-control",render:e=>qL({api:e})}),t.push({type:"separator",id:"sep-paragraph"}),t.push({type:"custom",id:"editor-toolbar-metrics",ribbonSize:"large",render:e=>function(e){const t=Fe(),n=e.api;return K(co,{icon:"sliders-horizontal",testId:"editor-toolbar-metrics-dropdown",get tooltip(){return t("metric.leftIndent")},hideChevron:!0,panelClass:"oasis-editor-toolbar-panel",keepMounted:!0,get children(){return[(a=BL(),Ie(a,K(_r,{icon:"file-up",get active(){return n.commands.state("togglePageBreakBefore").isActive},"data-testid":"editor-toolbar-page-break-before",onClick:()=>n.commands.execute("togglePageBreakBefore"),get tooltip(){return t("metric.pageBreakBefore")}}),null),Ie(a,K(_r,{icon:"link-2",get active(){return n.commands.state("toggleKeepWithNext").isActive},"data-testid":"editor-toolbar-keep-with-next",onClick:()=>n.commands.execute("toggleKeepWithNext"),get tooltip(){return t("metric.keepWithNext")}}),null),a),(e=WL(),Ie(e,K(ZE,{class:"oasis-editor-tool-metric",labelClass:"oasis-editor-tool-metric-label",get title(){return t("metric.spacingAfter")},get label(){return t("metric.after")},controlClass:"oasis-editor-tool-number","data-testid":"editor-toolbar-spacing-after",min:"0",step:"1",get value(){return FL(n,"setSpacingAfter")},onChange:e=>n.commands.execute("setSpacingAfter",null==e?"":String(e))}),null),Ie(e,K(ZE,{class:"oasis-editor-tool-metric",labelClass:"oasis-editor-tool-metric-label",get title(){return t("metric.leftIndent")},get label(){return t("metric.indent")},controlClass:"oasis-editor-tool-number","data-testid":"editor-toolbar-indent-left",min:"0",step:"1",get value(){return FL(n,"setIndentLeft")},onChange:e=>n.commands.execute("setIndentLeft",null==e?"":String(e))}),null),Ie(e,K(ZE,{class:"oasis-editor-tool-metric",labelClass:"oasis-editor-tool-metric-label",get title(){return t("metric.firstLineIndent")},get label(){return t("metric.first")},controlClass:"oasis-editor-tool-number","data-testid":"editor-toolbar-indent-first-line",step:"1",get value(){return FL(n,"setIndentFirstLine")},onChange:e=>n.commands.execute("setIndentFirstLine",null==e?"":String(e))}),null),Ie(e,K(ZE,{class:"oasis-editor-tool-metric",labelClass:"oasis-editor-tool-metric-label",get title(){return t("metric.hangingIndent")},get label(){return t("metric.hang")},controlClass:"oasis-editor-tool-number","data-testid":"editor-toolbar-indent-hanging",min:"0",step:"1",get value(){return FL(n,"setIndentHanging")},onChange:e=>n.commands.execute("setIndentHanging",null==e?"":String(e))}),null),Ie(e,K(VE,{class:"oasis-editor-tool-color",labelClass:"oasis-editor-tool-metric-label",get title(){return t("metric.paragraphBgColor")},get label(){return t("metric.paraBg")},type:"color",controlClass:"oasis-editor-tool-color-input","data-testid":"editor-toolbar-paragraph-shading",get value(){return FL(n,"setParagraphShading")||"#ffffff"},onChange:e=>n.commands.execute("setParagraphShading",e)}),null),Ie(e,K(_r,{icon:"frame","data-testid":"editor-toolbar-paragraph-borders",onClick:()=>n.commands.execute("applyParagraphBorders"),get tooltip(){return t("metric.applyBorders")}}),null),e)];var e,a}})}({api:e})}),t.push({type:"separator",id:"sep-metrics"});for(const n of wN)t.push({type:"button",id:n.id,testId:n.id,iconName:n.icon,command:n.command,tooltipKey:n.tooltipKey,labelKey:n.labelKey,ribbonSize:n.ribbonSize});return t.push({type:"custom",id:"editor-toolbar-tbl-style-options",tab:"tableDesign",group:"tableStyleOptions",row:1,ribbonSize:"large",render:e=>LV({api:e})}),t.push({type:"colorPicker",id:"editor-toolbar-tbl-shading",testId:"editor-toolbar-tbl-shading",kind:"shading",command:"tableCellShading",defaultValue:"#f1f5f9",tooltipKey:"table.cellColor",labelKey:"table.cellColor",ribbonSize:"large"}),t.push({type:"custom",id:"editor-toolbar-tbl-borders",testId:"editor-toolbar-tbl-borders",ribbonSize:"large",render:e=>function(e){const[t,n]=y(!1),a=t=>{e.api.commands.execute("tableApplyBorderPreset",t),n(!1),e.api.focusEditor()};return K(no,{get open(){return t()},onOpenChange:n,panelRole:"menu",panelClass:"oasis-editor-table-borders-menu",trigger:e=>K(_r,{ref(t){var n=e.ref;"function"==typeof n?n(t):e.ref=t},class:"oasis-editor-table-borders-trigger",get active(){return e.open},"aria-haspopup":"menu",get"aria-expanded"(){return e.open},tooltip:"Bordas",onClick:()=>e.toggle(),get children(){return[K(vr,{name:"tableBorders"}),K(xr,{children:"Bordas"}),K(ro,{})]}}),get children(){return[K(ne,{each:UV,children:(e,t)=>{return Ie(r=HV(),K(ne,{each:e,children:e=>K(wr,{class:"oasis-editor-table-borders-action",role:"menuitem",get label(){return e.label},onClick:()=>a(e.preset),get children(){return[K(GV,{get preset(){return e.preset}}),K(xr,{get children(){return e.label}})]}})}),null),Ie(r,(n=pe(()=>t()<UV.length-1),()=>n()&&DV()),null),r;var n,r}}),DV(),K(wr,{class:"oasis-editor-table-borders-action",role:"menuitem",label:"Linha Horizontal",onClick:()=>a("bottom"),get children(){return[K(xr,{class:"oasis-editor-table-borders-text-icon",children:"A"}),K(xr,{children:"Linha Horizontal"})]}}),K(wr,{class:"oasis-editor-table-borders-action",role:"menuitem",label:"Desenhar Tabela",onClick:()=>{e.api.commands.execute("toggleTableDrawBorders"),n(!1)},get children(){return[K(vr,{name:"tableBorders"}),K(xr,{children:"Desenhar Tabela"})]}}),K(wr,{class:"oasis-editor-table-borders-action",role:"menuitem",label:"Exibir Linhas de Grade",onClick:()=>{e.api.commands.execute("toggleTableGridlines"),n(!1)},get children(){return[K(vr,{name:"tableBorders"}),K(xr,{children:"Exibir Linhas de Grade"})]}}),K(wr,{class:"oasis-editor-table-borders-action",role:"menuitem",label:"Bordas e Sombreamento…",onClick:()=>{e.api.commands.execute("tableCellBorders")},get children(){return[K(vr,{name:"tableBorders"}),K(xr,{children:"Bordas e Sombreamento…"})]}})]}})}({api:e})}),t.push({type:"toggle",id:"editor-toolbar-tbl-border-painter",testId:"editor-toolbar-tbl-border-painter",iconName:"paintbrush",command:"toggleTableDrawBorders",label:"Pincel de Borda",tooltip:"Pincel de Borda",ribbonSize:"large"}),t.push({type:"custom",id:"editor-toolbar-tbl-style",testId:"editor-toolbar-tbl-style",tab:"tableDesign",group:"tableStyles",row:1,ribbonSize:"large",render:e=>kV({api:e,styles:EN(e),testId:"editor-toolbar-tbl-style"})}),t.push({type:"button",id:"editor-toolbar-tbl-distribute-rows",testId:"editor-toolbar-tbl-distribute-rows",iconName:"tableDistributeRows",command:"tableDistributeRows",tooltipKey:"table.distributeRows",labelKey:"table.distributeRows"}),t.push({type:"button",id:"editor-toolbar-tbl-distribute-cols",testId:"editor-toolbar-tbl-distribute-cols",iconName:"tableDistributeColumns",command:"tableDistributeColumns",tooltipKey:"table.distributeColumns",labelKey:"table.distributeColumns"}),t.push({type:"toggle",id:"editor-toolbar-tbl-autofit",testId:"editor-toolbar-tbl-autofit",iconName:"tableAutoFit",command:"tableToggleAutoFit",labelKey:"table.autoFit",tooltipKey:"table.autoFit"}),t.push({type:"custom",id:"editor-toolbar-margins",ribbonSize:"large",render:e=>_L({api:e})}),t.push({type:"custom",id:"editor-toolbar-section",ribbonSize:"large",render:e=>function(e){const t=Fe(),n=e.api;return K(co,{icon:"layout-template",get label(){return t("section.orientation")},testId:"editor-toolbar-section-dropdown",get tooltip(){return t("section.pageSetup")},panelClass:"oasis-editor-toolbar-panel oasis-editor-section-panel",keepMounted:!0,get children(){return[(a=DL(),Ie(a,K(_r,{icon:"rectangle-vertical",get label(){return t("section.portrait")},class:"oasis-editor-section-option",get active(){return!n.commands.state("toggleOrientation").isActive},"data-testid":"editor-toolbar-orientation-portrait",onClick:()=>n.commands.execute({name:"setOrientation",payload:"portrait"}),get tooltip(){return t("section.portrait")}}),null),Ie(a,K(_r,{icon:"rectangle-horizontal",get label(){return t("section.landscape")},class:"oasis-editor-section-option",get active(){return n.commands.state("toggleOrientation").isActive},"data-testid":"editor-toolbar-orientation-landscape",onClick:()=>n.commands.execute({name:"setOrientation",payload:"landscape"}),get tooltip(){return t("section.landscape")}}),null),a),(e=DL(),Ie(e,K(_r,{icon:"scissors",get label(){return t("section.secNext")},class:"oasis-editor-section-option","data-testid":"editor-toolbar-section-break-next",onClick:()=>n.commands.execute("sectionBreakNextPage"),get tooltip(){return t("section.secNextTooltip")}}),null),Ie(e,K(_r,{icon:"scissors-line-dashed",get label(){return t("section.secCont")},class:"oasis-editor-section-option","data-testid":"editor-toolbar-section-break-continuous",onClick:()=>n.commands.execute("sectionBreakContinuous"),get tooltip(){return t("section.secContTooltip")}}),null),e)];var e,a}})}({api:e})}),function(e){return e.map((e,t)=>{const n=bN[e.id]??{tab:"plugins",group:e.group??"general",row:1};return{...e,tab:e.tab??n.tab,group:n.group,row:e.row??n.row,order:e.order??t}})}(t)}function zN(e){switch(e.type){case"paragraph":return{...e,runs:e.runs.map(sk),style:e.style?{...e.style}:void 0,list:e.list?{...e.list}:void 0};case"table":return{...e,style:e.style?{...e.style,defaultCellMargins:e.style.defaultCellMargins?{...e.style.defaultCellMargins}:void 0,floating:e.style.floating?{...e.style.floating}:void 0,revision:e.style.revision?{...e.style.revision,previous:{...e.style.revision.previous}}:void 0}:void 0,gridRevision:e.gridRevision?{...e.gridRevision,previous:[...e.gridRevision.previous]}:void 0,rows:e.rows.map(e=>({...e,conditionalStyle:e.conditionalStyle?{...e.conditionalStyle}:void 0,style:e.style?{...e.style,revision:e.style.revision?{...e.style.revision}:void 0,propertyRevision:e.style.propertyRevision?{...e.style.propertyRevision,previous:{...e.style.propertyRevision.previous}}:void 0}:void 0,cells:e.cells.map(e=>({...e,conditionalStyle:e.conditionalStyle?{...e.conditionalStyle}:void 0,mergeRevisionState:e.mergeRevisionState?{...e.mergeRevisionState,previousCells:e.mergeRevisionState.previousCells.map(e=>({...e,mergeRevisionState:void 0,style:e.style?{...e.style}:void 0,blocks:e.blocks.map(zN)}))}:void 0,colSpan:e.colSpan??void 0,rowSpan:e.rowSpan??void 0,vMerge:e.vMerge??void 0,style:e.style?{...e.style,revision:e.style.revision?{...e.style.revision}:void 0,propertyRevision:e.style.propertyRevision?{...e.style.propertyRevision,previous:{...e.style.propertyRevision.previous}}:void 0}:void 0,blocks:e.blocks.map(zN)}))}))};default:return It(e,"block")}}function PN(e){var t,n,a,r,o,i;return{...e,blocks:e.blocks.map(zN),header:null==(t=e.header)?void 0:t.map(zN),firstPageHeader:null==(n=e.firstPageHeader)?void 0:n.map(zN),evenPageHeader:null==(a=e.evenPageHeader)?void 0:a.map(zN),footer:null==(r=e.footer)?void 0:r.map(zN),firstPageFooter:null==(o=e.firstPageFooter)?void 0:o.map(zN),evenPageFooter:null==(i=e.evenPageFooter)?void 0:i.map(zN)}}function ON(e){return{...e,blocks:e.blocks.map(zN)}}function qN(e){var t,n;if(!e)return;const a={};for(const[r,o]of Object.entries(e.items))a[r]=ON(o);return{items:a,settings:e.settings?{...e.settings}:void 0,separator:null==(t=e.separator)?void 0:t.map(zN),continuationSeparator:null==(n=e.continuationSeparator)?void 0:n.map(zN)}}function BN(e){return{...e,blocks:e.blocks.map(zN)}}function WN(e){var t,n;if(!e)return;const a={};for(const[r,o]of Object.entries(e.items))a[r]=BN(o);return{items:a,settings:e.settings?{...e.settings}:void 0,separator:null==(t=e.separator)?void 0:t.map(zN),continuationSeparator:null==(n=e.continuationSeparator)?void 0:n.map(zN)}}function FN(e){var t;return{...e,document:{...e.document,sections:null==(t=e.document.sections)?void 0:t.map(PN),footnotes:qN(e.document.footnotes),endnotes:WN(e.document.endnotes)},selection:{anchor:{...e.selection.anchor},focus:{...e.selection.focus}},activeSectionIndex:e.activeSectionIndex??0,activeZone:e.activeZone??"main",activeFootnoteId:e.activeFootnoteId}}
13
13
  /**
14
14
  * @license lucide v1.11.0 - ISC
15
15
  *