(()=>{function e(r){var s=n[r];if(void 0!==s)return s.exports;var i=n[r]={exports:{}};return t[r](i,i.exports,e),i.exports}var t={462:(e,t,n)=>{e.exports=function e(t,n,r){function s(o){if(!n[o]){if(!t[o]){if(i)return i(o,!0);var a=new Error("Cannot find module '"+o+"'");throw a.code="MODULE_NOT_FOUND",a}var c=n[o]={exports:{}};t[o][0].call(c.exports,(function(e){return s(t[o][1][e]||e)}),c,c.exports,e,t,n,r)}return n[o].exports}for(var i=void 0,o=0;o>2,a=(3&t)<<4|n>>4,c=h>1?(15&n)<<2|s>>6:64,l=h>2?63&s:64,u.push(i.charAt(o)+i.charAt(a)+i.charAt(c)+i.charAt(l)) ;return u.join("")},n.decode=function(e){var t,n,r,o,a,c,l=0,u=0;if("data:"===e.substr(0,5))throw new Error("Invalid base64 input, it looks like a data url.");var d,A=3*(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;if(e.charAt(e.length-1)===i.charAt(64)&&A--,e.charAt(e.length-2)===i.charAt(64)&&A--,A%1!=0)throw new Error("Invalid base64 input, bad content length.");for(d=s.uint8array?new Uint8Array(0|A):new Array(0|A);l>4, n=(15&o)<<4|(a=i.indexOf(e.charAt(l++)))>>2,r=(3&a)<<6|(c=i.indexOf(e.charAt(l++))),d[u++]=t,64!==a&&(d[u++]=n),64!==c&&(d[u++]=r);return d}},{"./support":30,"./utils":32}],2:[function(e,t){"use strict";function n(e,t,n,r,s){this.compressedSize=e,this.uncompressedSize=t,this.crc32=n,this.compression=r,this.compressedContent=s}var r=e("./external"),s=e("./stream/DataWorker"),i=e("./stream/DataLengthProbe"),o=e("./stream/Crc32Probe");i=e("./stream/DataLengthProbe"),n.prototype={ getContentWorker:function(){var e=new s(r.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 s(r.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},n.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=n},{"./external":6,"./stream/Crc32Probe":25, "./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,n){"use strict";var r=e("./stream/GenericWorker");n.STORE={magic:"\0\0",compressWorker:function(){return new r("STORE compression")},uncompressWorker:function(){return new r("STORE decompression")}},n.DEFLATE=e("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t){"use strict";var n=e("./utils"),r=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t }();t.exports=function(e,t){return void 0!==e&&e.length?"string"!==n.getTypeOf(e)?function(e,t,n){var s=r,i=0+n;e^=-1;for(var o=0;o>>8^s[255&(e^t[o])];return-1^e}(0|t,e,e.length):function(e,t,n){var s=r,i=0+n;e^=-1;for(var o=0;o>>8^s[255&(e^t.charCodeAt(o))];return-1^e}(0|t,e,e.length):0}},{"./utils":32}],5:[function(e,t,n){"use strict";n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null, n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(e,t){"use strict";var n;n="undefined"!=typeof Promise?Promise:e("lie"),t.exports={Promise:n}},{lie:37}],7:[function(e,t,n){"use strict";function r(e,t){a.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}var s="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,i=e("pako"),o=e("./utils"),a=e("./stream/GenericWorker"),c=s?"uint8array":"array" ;n.magic="\b\0",o.inherits(r,a),r.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(o.transformTo(c,e.data),!1)},r.prototype.flush=function(){a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},r.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},r.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this ;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},n.compressWorker=function(e){return new r("Deflate",e)},n.uncompressWorker=function(){return new r("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t){"use strict";function n(e,t,n,r){s.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=r,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0, this.entriesCount=0,this.currentFile=null,this._sources=[]}var r=e("../utils"),s=e("../stream/GenericWorker"),i=e("../utf8"),o=e("../crc32"),a=e("../signature"),c=function(e,t){var n,r="";for(n=0;n>>=8;return r},l=function(e,t,n,s,l,u){ var d,A,h=e.file,p=e.compression,f=u!==i.utf8encode,m=r.transformTo("string",u(h.name)),g=r.transformTo("string",i.utf8encode(h.name)),v=h.comment,w=r.transformTo("string",u(v)),_=r.transformTo("string",i.utf8encode(v)),b=g.length!==h.name.length,y=_.length!==v.length,k="",R="",x="",E=h.dir,C=h.date,S={crc32:0,compressedSize:0,uncompressedSize:0};t&&!n||(S.crc32=e.crc32,S.compressedSize=e.compressedSize,S.uncompressedSize=e.uncompressedSize);var M=0;t&&(M|=8),f||!b&&!y||(M|=2048);var I,U,G=0,Z=0 ;E&&(G|=16),"UNIX"===l?(Z=798,G|=(U=I=h.unixPermissions,I||(U=E?16893:33204),(65535&U)<<16)):(Z=20,G|=63&(h.dosPermissions||0)),d=C.getUTCHours(),d<<=6,d|=C.getUTCMinutes(),d<<=5,d|=C.getUTCSeconds()/2,A=C.getUTCFullYear()-1980,A<<=4,A|=C.getUTCMonth()+1,A<<=5,A|=C.getUTCDate(),b&&(R=c(1,1)+c(o(m),4)+g,k+="up"+c(R.length,2)+R),y&&(x=c(1,1)+c(o(w),4)+_,k+="uc"+c(x.length,2)+x);var T="";return T+="\n\0",T+=c(M,2),T+=p.magic,T+=c(d,2),T+=c(A,2),T+=c(S.crc32,4),T+=c(S.compressedSize,4), T+=c(S.uncompressedSize,4),T+=c(m.length,2),T+=c(k.length,2),{fileRecord:a.LOCAL_FILE_HEADER+T+m+k,dirRecord:a.CENTRAL_FILE_HEADER+c(Z,2)+T+c(w.length,2)+"\0\0\0\0"+c(G,4)+c(s,4)+m+k+w}},u=function(e){return a.DATA_DESCRIPTOR+c(e.crc32,4)+c(e.compressedSize,4)+c(e.uncompressedSize,4)};r.inherits(n,s),n.prototype.push=function(e){var t=e.meta.percent||0,n=this.entriesCount,r=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length, s.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-r-1))/n:100}}))},n.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=l(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},n.prototype.closedSource=function(e){this.accumulate=!1 ;var t=this.streamFiles&&!e.file.dir,n=l(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),t)this.push({data:u(e),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},n.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t0?e.substring(0,t):""},f=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},m=function(e,t){ return t=void 0!==t?t:a.createFolders,e=f(e),this.files[e]||h.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]},g={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,r;for(t in this.files)this.files.hasOwnProperty(t)&&(r=this.files[t],(n=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(n,r))},filter:function(e){var t=[];return this.forEach((function(n,r){ e(n,r)&&t.push(r)})),t},file:function(e,t,r){if(1===arguments.length){if(n(e)){var s=e;return this.filter((function(e,t){return!t.dir&&s.test(e)}))}var i=this.files[this.root+e];return i&&!i.dir?i:null}return e=this.root+e,h.call(this,e,t,r),this},folder:function(e){if(!e)return this;if(n(e))return this.filter((function(t,n){return n.dir&&e.test(t)}));var t=this.root+e,r=m.call(this,t),s=this.clone();return s.root=r.name,s},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})),r=0;r=0;--i)if(this.data[i]===t&&this.data[i+1]===n&&this.data[i+2]===r&&this.data[i+3]===s)return i-this.zero;return-1},n.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1),r=e.charCodeAt(2),s=e.charCodeAt(3),i=this.readData(4);return t===i[0]&&n===i[1]&&r===i[2]&&s===i[3]},n.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=n},{"../utils":32,"./DataReader":18}],18:[function(e,t){"use strict";function n(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}var r=e("../utils");n.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return r.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4) ;return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=n},{"../utils":32}],19:[function(e,t){"use strict";function n(e){r.call(this,e)}var r=e("./Uint8ArrayReader");e("../utils").inherits(n,r),n.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=n},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t){"use strict";function n(e){ r.call(this,e)}var r=e("./DataReader");e("../utils").inherits(n,r),n.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},n.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},n.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},n.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=n},{"../utils":32,"./DataReader":18}], 21:[function(e,t){"use strict";function n(e){r.call(this,e)}var r=e("./ArrayReader");e("../utils").inherits(n,r),n.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=n},{"../utils":32,"./ArrayReader":17}],22:[function(e,t){"use strict" ;var n=e("../utils"),r=e("../support"),s=e("./ArrayReader"),i=e("./StringReader"),o=e("./NodeBufferReader"),a=e("./Uint8ArrayReader");t.exports=function(e){var t=n.getTypeOf(e);return n.checkSupport(t),"string"!==t||r.uint8array?"nodebuffer"===t?new o(e):r.uint8array?new a(n.transformTo("uint8array",e)):new s(n.transformTo("array",e)):new i(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,n){"use strict" ;n.LOCAL_FILE_HEADER="PK",n.CENTRAL_FILE_HEADER="PK",n.CENTRAL_DIRECTORY_END="PK",n.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",n.ZIP64_CENTRAL_DIRECTORY_END="PK",n.DATA_DESCRIPTOR="PK\b"},{}],24:[function(e,t){"use strict";function n(e){r.call(this,"ConvertWorker to "+e),this.destType=e}var r=e("./GenericWorker"),s=e("../utils");s.inherits(n,r),n.prototype.processChunk=function(e){this.push({data:s.transformTo(this.destType,e.data),meta:e.meta})},t.exports=n},{"../utils":32, "./GenericWorker":28}],25:[function(e,t){"use strict";function n(){r.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}var r=e("./GenericWorker"),s=e("../crc32");e("../utils").inherits(n,r),n.prototype.processChunk=function(e){this.streamInfo.crc32=s(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=n},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t){"use strict";function n(e){s.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)} var r=e("../utils"),s=e("./GenericWorker");r.inherits(n,s),n.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}s.prototype.processChunk.call(this,e)},t.exports=n},{"../utils":32,"./GenericWorker":28}],27:[function(e,t){"use strict";function n(e){s.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then((function(e){t.dataIsReady=!0, t.data=e,t.max=e&&e.length||0,t.type=r.getTypeOf(e),t.isPaused||t._tickAndRepeat()}),(function(e){t.error(e)}))}var r=e("../utils"),s=e("./GenericWorker");r.inherits(n,s),n.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this.data=null},n.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,r.delay(this._tickAndRepeat,[],this)),!0)},n.prototype._tickAndRepeat=function(){this._tickScheduled=!1, this.isPaused||this.isFinished||(this._tick(),this.isFinished||(r.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},n.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=n},{"../utils":32,"./GenericWorker":28}],28:[function(e,t){"use strict";function n(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}n.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush() ;try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){ if(this._listeners[e])for(var n=0;n "+e:e}},t.exports=n},{}],29:[function(e,t){"use strict";function n(e,t,n){var o=t;switch(t){case"blob":case"arraybuffer":o="uint8array";break ;case"base64":o="string"}try{this._internalType=o,this._outputType=t,this._mimeType=n,r.checkSupport(o),this._worker=e.pipe(new s(o)),e.lock()}catch(e){this._worker=new i("error"),this._worker.error(e)}}var r=e("../utils"),s=e("./ConvertWorker"),i=e("./GenericWorker"),o=e("../base64"),a=e("../support"),c=e("../external"),l=null;if(a.nodestream)try{l=e("../nodejs/NodejsStreamOutputAdapter")}catch(e){}n.prototype={accumulate:function(e){return t=this,n=e,new c.Promise((function(e,s){ var i=[],a=t._internalType,c=t._outputType,l=t._mimeType;t.on("data",(function(e,t){i.push(e),n&&n(t)})).on("error",(function(e){i=[],s(e)})).on("end",(function(){try{var t=function(e,t,n){switch(e){case"blob":return r.newBlob(r.transformTo("arraybuffer",t),n);case"base64":return o.encode(t);default:return r.transformTo(e,t)}}(c,function(e,t){var n,r=0,s=null,i=0;for(n=0;n=252?6:u>=248?5:u>=240?4:u>=224?3:u>=192?2:1;l[254]=l[254]=1,n.utf8encode=function(e){ return o.nodebuffer?a.newBufferFrom(e,"utf-8"):function(e){var t,n,r,s,i,a=e.length,c=0;for(s=0;s>>6, t[i++]=128|63&n):n<65536?(t[i++]=224|n>>>12,t[i++]=128|n>>>6&63,t[i++]=128|63&n):(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 o.nodebuffer?i.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,n,r,s,o=e.length,a=new Array(2*o);for(n=0,t=0;t4)a[n++]=65533,t+=s-1;else{for(r&=2===s?31:3===s?15:7;s>1&&t1?a[n++]=65533:r<65536?a[n++]=r:(r-=65536,a[n++]=55296|r>>10&1023,a[n++]=56320|1023&r)}return a.length!==n&&(a.subarray?a=a.subarray(0,n):a.length=n),i.applyFromCharCode(a)}(e=i.transformTo(o.uint8array?"uint8array":"array",e))},i.inherits(r,c),r.prototype.processChunk=function(e){var t=i.transformTo(o.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(o.uint8array){var r=t;(t=new Uint8Array(r.length+this.leftOver.length)).set(this.leftOver,0), t.set(r,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var s=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+l[e[n]]>t?n:t}(t),a=t;s!==t.length&&(o.uint8array?(a=t.subarray(0,s),this.leftOver=t.subarray(s,t.length)):(a=t.slice(0,s),this.leftOver=t.slice(s,t.length))),this.push({data:n.utf8decode(a),meta:e.meta})},r.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({ data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=r,i.inherits(s,c),s.prototype.processChunk=function(e){this.push({data:n.utf8encode(e.data),meta:e.meta})},n.Utf8EncodeWorker=s},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,n){"use strict";function r(e){return e}function s(e,t){for(var n=0;n1;)try{return A.stringifyByChunk(e,r,t)}catch(e){t=Math.floor(t/2)}return A.stringifyByChar(e)}function o(e,t){for(var n=0;n1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e0)this.isSignature(t,i.CENTRAL_FILE_HEADER)||(this.reader.zero=r);else if(r<0)throw new Error("Corrupted zip: missing "+Math.abs(r)+" bytes.")},prepareReader:function(e){this.reader=r(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}}, t.exports=n},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utf8":31,"./utils":32,"./zipEntry":34}],34:[function(e,t){"use strict";function n(e,t){this.options=e,this.loadOptions=t}var r=e("./reader/readerFor"),s=e("./utils"),i=e("./compressedObject"),o=e("./crc32"),a=e("./utf8"),c=e("./compressions"),l=e("./support");n.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(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 c)if(c.hasOwnProperty(t)&&c[t].magic===e)return c[t];return null }(this.compressionMethod)))throw new Error("Corrupted zip : compression "+s.pretty(this.compressionMethod)+" unknown (inner file : "+s.transformTo("string",this.fileName)+")");this.decompressed=new i(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=r(this.extraFields[1].value) ;this.uncompressedSize===s.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===s.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===s.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===s.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,n,r,s=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+40?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&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=i.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==d)throw new Error(c[n]);if(t.header&&i.deflateSetHeader(this.strm,t.header),t.dictionary){var s ;if(s="string"==typeof t.dictionary?a.string2buf(t.dictionary):"[object ArrayBuffer]"===u.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(n=i.deflateSetDictionary(this.strm,s))!==d)throw new Error(c[n]);this._dict_set=!0}}function s(e,t){var n=new r(t);if(n.push(e,!0),n.err)throw n.msg||c[n.err];return n.result}var i=e("./zlib/deflate"),o=e("./utils/common"),a=e("./utils/strings"),c=e("./zlib/messages"),l=e("./zlib/zstream"),u={}.toString,d=0,A=-1,h=0,p=8 ;r.prototype.push=function(e,t){var n,r,s=this.strm,c=this.options.chunkSize;if(this.ended)return!1;r=t===~~t?t:!0===t?4:0,"string"==typeof e?s.input=a.string2buf(e):"[object ArrayBuffer]"===u.call(e)?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;do{if(0===s.avail_out&&(s.output=new o.Buf8(c),s.next_out=0,s.avail_out=c),1!==(n=i.deflate(s,r))&&n!==d)return this.onEnd(n),this.ended=!0,!1 ;0!==s.avail_out&&(0!==s.avail_in||4!==r&&2!==r)||("string"===this.options.to?this.onData(a.buf2binstring(o.shrinkBuf(s.output,s.next_out))):this.onData(o.shrinkBuf(s.output,s.next_out)))}while((s.avail_in>0||0===s.avail_out)&&1!==n);return 4===r?(n=i.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===d):2!==r||(this.onEnd(d),s.avail_out=0,!0)},r.prototype.onData=function(e){this.chunks.push(e)},r.prototype.onEnd=function(e){ e===d&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},n.Deflate=r,n.deflate=s,n.deflateRaw=function(e,t){return(t=t||{}).raw=!0,s(e,t)},n.gzip=function(e,t){return(t=t||{}).gzip=!0,s(e,t)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(e,t,n){"use strict";function r(e){if(!(this instanceof r))return new r(e) ;this.options=o.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var n=i.inflateInit2(this.strm,t.windowBits) ;if(n!==c.Z_OK)throw new Error(l[n]);this.header=new d,i.inflateGetHeader(this.strm,this.header)}function s(e,t){var n=new r(t);if(n.push(e,!0),n.err)throw n.msg||l[n.err];return n.result}var i=e("./zlib/inflate"),o=e("./utils/common"),a=e("./utils/strings"),c=e("./zlib/constants"),l=e("./zlib/messages"),u=e("./zlib/zstream"),d=e("./zlib/gzheader"),A={}.toString;r.prototype.push=function(e,t){var n,r,s,l,u,d,h=this.strm,p=this.options.chunkSize,f=this.options.dictionary,m=!1 ;if(this.ended)return!1;r=t===~~t?t:!0===t?c.Z_FINISH:c.Z_NO_FLUSH,"string"==typeof e?h.input=a.binstring2buf(e):"[object ArrayBuffer]"===A.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 o.Buf8(p),h.next_out=0,h.avail_out=p),(n=i.inflate(h,c.Z_NO_FLUSH))===c.Z_NEED_DICT&&f&&(d="string"==typeof f?a.string2buf(f):"[object ArrayBuffer]"===A.call(f)?new Uint8Array(f):f,n=i.inflateSetDictionary(this.strm,d)), n===c.Z_BUF_ERROR&&!0===m&&(n=c.Z_OK,m=!1),n!==c.Z_STREAM_END&&n!==c.Z_OK)return this.onEnd(n),this.ended=!0,!1;h.next_out&&(0!==h.avail_out&&n!==c.Z_STREAM_END&&(0!==h.avail_in||r!==c.Z_FINISH&&r!==c.Z_SYNC_FLUSH)||("string"===this.options.to?(s=a.utf8border(h.output,h.next_out),l=h.next_out-s,u=a.buf2string(h.output,s),h.next_out=l,h.avail_out=p-l,l&&o.arraySet(h.output,h.output,s,l,0),this.onData(u)):this.onData(o.shrinkBuf(h.output,h.next_out)))),0===h.avail_in&&0===h.avail_out&&(m=!0) }while((h.avail_in>0||0===h.avail_out)&&n!==c.Z_STREAM_END);return n===c.Z_STREAM_END&&(r=c.Z_FINISH),r===c.Z_FINISH?(n=i.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===c.Z_OK):r!==c.Z_SYNC_FLUSH||(this.onEnd(c.Z_OK),h.avail_out=0,!0)},r.prototype.onData=function(e){this.chunks.push(e)},r.prototype.onEnd=function(e){e===c.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg}, n.Inflate=r,n.inflate=s,n.inflateRaw=function(e,t){return(t=t||{}).raw=!0,s(e,t)},n.ungzip=s},{"./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){"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;n.assign=function(e){for(var t=[].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 r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}}return e},n.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var s={arraySet:function(e,t,n,r,s){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+r),s);else for(var i=0;i=252?6:c>=248?5:c>=240?4:c>=224?3:c>=192?2:1;a[254]=a[254]=1,n.string2buf=function(e){var t,n,r,i,o,a=e.length,c=0 ;for(i=0;i>>6,t[o++]=128|63&n):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|63&n):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63, t[o++]=128|n>>>6&63,t[o++]=128|63&n);return t},n.buf2binstring=function(e){return r(e,e.length)},n.binstring2buf=function(e){for(var t=new s.Buf8(e.length),n=0,r=t.length;n4)l[s++]=65533,n+=o-1;else{for(i&=2===o?31:3===o?15:7;o>1&&n1?l[s++]=65533:i<65536?l[s++]=i:(i-=65536,l[s++]=55296|i>>10&1023, l[s++]=56320|1023&i)}return r(l,s)},n.utf8border=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+a[e[n]]>t?n:t}},{"./common":41}],43:[function(e,t){"use strict";t.exports=function(e,t,n,r){for(var s=65535&e|0,i=e>>>16&65535|0,o=0;0!==n;){n-=o=n>2e3?2e3:n;do{i=i+(s=s+t[r++]|0)|0}while(--o);s%=65521,i%=65521}return s|i<<16|0}},{}],44:[function(e,t){"use strict";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){"use strict";var n=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}() ;t.exports=function(e,t,r,s){var i=n,o=s+r;e^=-1;for(var a=s;a>>8^i[255&(e^t[a])];return-1^e}},{}],46:[function(e,t,n){"use strict";function r(e,t){return e.msg=R[t],t}function s(e){return(e<<1)-(e>4?9:0)}function i(e){for(var t=e.length;--t>=0;)e[t]=0}function o(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(_.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 a(e,t){b._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,o(e.strm)}function c(e,t){e.pending_buf[e.pending++]=t}function l(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function u(e,t){ var n,r,s=e.max_chain_length,i=e.strstart,o=e.prev_length,a=e.nice_match,c=e.strstart>e.w_size-N?e.strstart-(e.w_size-N):0,l=e.window,u=e.w_mask,d=e.prev,A=e.strstart+P,h=l[i+o-1],p=l[i+o];e.prev_length>=e.good_match&&(s>>=2),a>e.lookahead&&(a=e.lookahead);do{if(l[(n=t)+o]===p&&l[n+o-1]===h&&l[n]===l[i]&&l[++n]===l[i+1]){i+=2,n++;do{}while(l[++i]===l[++n]&&l[++i]===l[++n]&&l[++i]===l[++n]&&l[++i]===l[++n]&&l[++i]===l[++n]&&l[++i]===l[++n]&&l[++i]===l[++n]&&l[++i]===l[++n]&&io){if(e.match_start=t,o=r,r>=a)break;h=l[i+o-1],p=l[i+o]}}}while((t=d[t&u])>c&&0!=--s);return o<=e.lookahead?o:e.lookahead}function d(e){var t,n,r,s,i,o,a,c,l,u,d=e.w_size;do{if(s=e.window_size-e.lookahead-e.strstart,e.strstart>=d+(d-N)){_.arraySet(e.window,e.window,d,d,0),e.match_start-=d,e.strstart-=d,e.block_start-=d,t=n=e.hash_size;do{r=e.head[--t],e.head[t]=r>=d?r-d:0}while(--n);t=n=d;do{r=e.prev[--t],e.prev[t]=r>=d?r-d:0}while(--n);s+=d}if(0===e.strm.avail_in)break;if(o=e.strm, a=e.window,c=e.strstart+e.lookahead,l=s,u=void 0,(u=o.avail_in)>l&&(u=l),n=0===u?0:(o.avail_in-=u,_.arraySet(a,o.input,o.next_in,u,c),1===o.state.wrap?o.adler=y(o.adler,a,u,c):2===o.state.wrap&&(o.adler=k(o.adler,a,u,c)),o.next_in+=u,o.total_in+=u,u),e.lookahead+=n,e.lookahead+e.insert>=F)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=(e.ins_h<=F&&(e.ins_h=(e.ins_h<=F)if(r=b._tr_tally(e,e.strstart-e.match_start,e.match_length-F),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=F){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<=F&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=F-1)),e.prev_length>=F&&e.match_length<=e.prev_length){ s=e.strstart+e.lookahead-F,r=b._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-F),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=s&&(e.ins_h=(e.ins_h<15&&(a=2,s-=16),i<1||i>T||n!==Z||s<8||s>15||t<0||t>9||o<0||o>U)return r(e,S);8===s&&(s=9);var c=new f;return e.state=c,c.strm=e,c.wrap=a,c.gzhead=null, c.w_bits=s,c.w_size=1<e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(d(e),0===e.lookahead&&t===x)return Q;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n ;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,a(e,!1),0===e.strm.avail_out))return Q;if(e.strstart-e.block_start>=e.w_size-N&&(a(e,!1),0===e.strm.avail_out))return Q}return e.insert=0,t===E?(a(e,!0),0===e.strm.avail_out?X:Y):(e.strstart>e.block_start&&(a(e,!1),e.strm.avail_out),Q) })),new p(4,4,8,4,A),new p(4,5,16,8,A),new p(4,6,32,32,A),new p(4,4,16,16,h),new p(8,16,32,32,h),new p(8,16,128,128,h),new p(8,32,128,256,h),new p(32,128,258,1024,h),new p(32,258,258,4096,h)],n.deflateInit=function(e,t){return v(e,t,Z,15,8,0)},n.deflateInit2=v,n.deflateReset=g,n.deflateResetKeep=m,n.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?S:(e.state.gzhead=t,C):S},n.deflate=function(e,t){var n,u,A,h;if(!e||!e.state||t>5||t<0)return e?r(e,S):S;if(u=e.state, !e.output||!e.input&&0!==e.avail_in||u.status===H&&t!==E)return r(e,0===e.avail_out?-5:S);if(u.strm=e,n=u.last_flush,u.last_flush=t,u.status===V)if(2===u.wrap)e.adler=0,c(u,31),c(u,139),c(u,8),u.gzhead?(c(u,(u.gzhead.text?1:0)+(u.gzhead.hcrc?2:0)+(u.gzhead.extra?4:0)+(u.gzhead.name?8:0)+(u.gzhead.comment?16:0)),c(u,255&u.gzhead.time),c(u,u.gzhead.time>>8&255),c(u,u.gzhead.time>>16&255),c(u,u.gzhead.time>>24&255),c(u,9===u.level?2:u.strategy>=2||u.level<2?4:0),c(u,255&u.gzhead.os), u.gzhead.extra&&u.gzhead.extra.length&&(c(u,255&u.gzhead.extra.length),c(u,u.gzhead.extra.length>>8&255)),u.gzhead.hcrc&&(e.adler=k(e.adler,u.pending_buf,u.pending,0)),u.gzindex=0,u.status=69):(c(u,0),c(u,0),c(u,0),c(u,0),c(u,0),c(u,9===u.level?2:u.strategy>=2||u.level<2?4:0),c(u,3),u.status=q);else{var p=Z+(u.w_bits-8<<4)<<8;p|=(u.strategy>=2||u.level<2?0:u.level<6?1:6===u.level?2:3)<<6,0!==u.strstart&&(p|=32),p+=31-p%31,u.status=q,l(u,p),0!==u.strstart&&(l(u,e.adler>>>16),l(u,65535&e.adler)), e.adler=1}if(69===u.status)if(u.gzhead.extra){for(A=u.pending;u.gzindex<(65535&u.gzhead.extra.length)&&(u.pending!==u.pending_buf_size||(u.gzhead.hcrc&&u.pending>A&&(e.adler=k(e.adler,u.pending_buf,u.pending-A,A)),o(e),A=u.pending,u.pending!==u.pending_buf_size));)c(u,255&u.gzhead.extra[u.gzindex]),u.gzindex++;u.gzhead.hcrc&&u.pending>A&&(e.adler=k(e.adler,u.pending_buf,u.pending-A,A)),u.gzindex===u.gzhead.extra.length&&(u.gzindex=0,u.status=73)}else u.status=73 ;if(73===u.status)if(u.gzhead.name){A=u.pending;do{if(u.pending===u.pending_buf_size&&(u.gzhead.hcrc&&u.pending>A&&(e.adler=k(e.adler,u.pending_buf,u.pending-A,A)),o(e),A=u.pending,u.pending===u.pending_buf_size)){h=1;break}h=u.gzindexA&&(e.adler=k(e.adler,u.pending_buf,u.pending-A,A)),0===h&&(u.gzindex=0,u.status=91)}else u.status=91;if(91===u.status)if(u.gzhead.comment){A=u.pending ;do{if(u.pending===u.pending_buf_size&&(u.gzhead.hcrc&&u.pending>A&&(e.adler=k(e.adler,u.pending_buf,u.pending-A,A)),o(e),A=u.pending,u.pending===u.pending_buf_size)){h=1;break}h=u.gzindexA&&(e.adler=k(e.adler,u.pending_buf,u.pending-A,A)),0===h&&(u.status=z)}else u.status=z;if(u.status===z&&(u.gzhead.hcrc?(u.pending+2>u.pending_buf_size&&o(e), u.pending+2<=u.pending_buf_size&&(c(u,255&e.adler),c(u,e.adler>>8&255),e.adler=0,u.status=q)):u.status=q),0!==u.pending){if(o(e),0===e.avail_out)return u.last_flush=-1,C}else if(0===e.avail_in&&s(t)<=s(n)&&t!==E)return r(e,-5);if(u.status===H&&0!==e.avail_in)return r(e,-5);if(0!==e.avail_in||0!==u.lookahead||t!==x&&u.status!==H){var f=2===u.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(d(e),0===e.lookahead)){if(t===x)return Q;break}if(e.match_length=0, n=b._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(a(e,!1),0===e.strm.avail_out))return Q}return e.insert=0,t===E?(a(e,!0),0===e.strm.avail_out?X:Y):e.last_lit&&(a(e,!1),0===e.strm.avail_out)?Q:W}(u,t):3===u.strategy?function(e,t){for(var n,r,s,i,o=e.window;;){if(e.lookahead<=P){if(d(e),e.lookahead<=P&&t===x)return Q;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=F&&e.strstart>0&&(r=o[s=e.strstart-1])===o[++s]&&r===o[++s]&&r===o[++s]){i=e.strstart+P ;do{}while(r===o[++s]&&r===o[++s]&&r===o[++s]&&r===o[++s]&&r===o[++s]&&r===o[++s]&&r===o[++s]&&r===o[++s]&&se.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=F?(n=b._tr_tally(e,1,e.match_length-F),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=b._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(a(e,!1),0===e.strm.avail_out))return Q}return e.insert=0,t===E?(a(e,!0), 0===e.strm.avail_out?X:Y):e.last_lit&&(a(e,!1),0===e.strm.avail_out)?Q:W}(u,t):w[u.level].func(u,t);if(f!==X&&f!==Y||(u.status=H),f===Q||f===X)return 0===e.avail_out&&(u.last_flush=-1),C;if(f===W&&(1===t?b._tr_align(u):5!==t&&(b._tr_stored_block(u,0,0,!1),3===t&&(i(u.head),0===u.lookahead&&(u.strstart=0,u.block_start=0,u.insert=0))),o(e),0===e.avail_out))return u.last_flush=-1,C}return t!==E?C:u.wrap<=0?1:(2===u.wrap?(c(u,255&e.adler),c(u,e.adler>>8&255),c(u,e.adler>>16&255), c(u,e.adler>>24&255),c(u,255&e.total_in),c(u,e.total_in>>8&255),c(u,e.total_in>>16&255),c(u,e.total_in>>24&255)):(l(u,e.adler>>>16),l(u,65535&e.adler)),o(e),u.wrap>0&&(u.wrap=-u.wrap),0!==u.pending?C:1)},n.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status)!==V&&69!==t&&73!==t&&91!==t&&t!==z&&t!==q&&t!==H?r(e,S):(e.state=null,t===q?r(e,-3):C):S},n.deflateSetDictionary=function(e,t){var n,r,s,o,a,c,l,u,A=t.length;if(!e||!e.state)return S ;if(2===(o=(n=e.state).wrap)||1===o&&n.status!==V||n.lookahead)return S;for(1===o&&(e.adler=y(e.adler,t,A,0)),n.wrap=0,A>=n.w_size&&(0===o&&(i(n.head),n.strstart=0,n.block_start=0,n.insert=0),u=new _.Buf8(n.w_size),_.arraySet(u,t,A-n.w_size,n.w_size,0),t=u,A=n.w_size),a=e.avail_in,c=e.next_in,l=e.input,e.avail_in=A,e.next_in=0,e.input=t,d(n);n.lookahead>=F;){r=n.strstart,s=n.lookahead-(F-1);do{n.ins_h=(n.ins_h<>>=_=w>>>24,p-=_,0==(_=w>>>16&255))E[i++]=65535&w;else{if(!(16&_)){if(0==(64&_)){w=f[(65535&w)+(h&(1<<_)-1)];continue t}if(32&_){n.mode=12;break e}e.msg="invalid literal/length code",n.mode=30;break e}b=65535&w,(_&=15)&&(p<_&&(h+=x[r++]<>>=_,p-=_),p<15&&(h+=x[r++]<>>=_=w>>>24,p-=_,!(16&(_=w>>>16&255))){if(0==(64&_)){w=m[(65535&w)+(h&(1<<_)-1)];continue n}e.msg="invalid distance code",n.mode=30 ;break e}if(y=65535&w,p<(_&=15)&&(h+=x[r++]<c){e.msg="invalid distance too far back",n.mode=30;break e}if(h>>>=_,p-=_,y>(_=i-o)){if((_=y-_)>u&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(k=0,R=A,0===d){if(k+=l-_,_2;)E[i++]=R[k++],E[i++]=R[k++],E[i++]=R[k++],b-=3;b&&(E[i++]=R[k++],b>1&&(E[i++]=R[k++]))}else{k=i-y;do{E[i++]=E[k++],E[i++]=E[k++],E[i++]=E[k++],b-=3}while(b>2);b&&(E[i++]=E[k++],b>1&&(E[i++]=E[k++]))}break}}break}}while(r>3,h&=(1<<(p-=b<<3))-1,e.next_in=r,e.next_out=i,e.avail_in=r>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function s(){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 h.Buf16(320), this.work=new h.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function i(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=y,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new h.Buf32(x),t.distcode=t.distdyn=new h.Buf32(E),t.sane=1,t.back=-1,_):b}function o(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,i(e)):b}function a(e,t){var n,r ;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?b:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,o(e))):b}function c(e,t){var n,r;return e?(r=new s,e.state=r,r.window=null,(n=a(e,t))!==_&&(e.state=null),n):b}function l(e){if(C){var t;for(d=new h.Buf32(512),A=new h.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(g(v,e.lens,0,288,d,0,e.work,{bits:9}), t=0;t<32;)e.lens[t++]=5;g(w,e.lens,0,32,A,0,e.work,{bits:5}),C=!1}e.lencode=d,e.lenbits=9,e.distcode=A,e.distbits=5}function u(e,t,n,r){var s,i=e.state;return null===i.window&&(i.wsize=1<=i.wsize?(h.arraySet(i.window,t,n-i.wsize,i.wsize,0),i.wnext=0,i.whave=i.wsize):((s=i.wsize-i.wnext)>r&&(s=r),h.arraySet(i.window,t,n-r,s,i.wnext),(r-=s)?(h.arraySet(i.window,t,n-r,r,0),i.wnext=r,i.whave=i.wsize):(i.wnext+=s, i.wnext===i.wsize&&(i.wnext=0),i.whave>>8&255,n.check=f(n.check,N,2,0),A=0,x=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&A)<<8)+(A>>8))%31){ e.msg="incorrect header check",n.mode=R;break}if(8!=(15&A)){e.msg="unknown compression method",n.mode=R;break}if(x-=4,D=8+(15&(A>>>=4)),0===n.wbits)n.wbits=D;else if(D>n.wbits){e.msg="invalid window size",n.mode=R;break}n.dmax=1<>8&1),512&n.flags&&(N[0]=255&A,N[1]=A>>>8&255,n.check=f(n.check,N,2,0)),A=0,x=0,n.mode=3;case 3:for(;x<32;){if(0===c)break e;c--,A+=s[o++]<>>8&255,N[2]=A>>>16&255,N[3]=A>>>24&255,n.check=f(n.check,N,4,0)),A=0,x=0,n.mode=4;case 4:for(;x<16;){if(0===c)break e;c--,A+=s[o++]<>8),512&n.flags&&(N[0]=255&A,N[1]=A>>>8&255,n.check=f(n.check,N,2,0)),A=0,x=0,n.mode=5 ;case 5:if(1024&n.flags){for(;x<16;){if(0===c)break e;c--,A+=s[o++]<>>8&255,n.check=f(n.check,N,2,0)),A=0,x=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((S=n.length)>c&&(S=c),S&&(n.head&&(D=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),h.arraySet(n.head.extra,s,o,S,D)),512&n.flags&&(n.check=f(n.check,s,S,o)),c-=S,o+=S,n.length-=S),n.length))break e ;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===c)break e;S=0;do{D=s[o+S++],n.head&&D&&n.length<65536&&(n.head.name+=String.fromCharCode(D))}while(D&&S>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=k;break;case 10:for(;x<32;){if(0===c)break e;c--,A+=s[o++]<>>=7&x,x-=7&x,n.mode=27;break}for(;x<3;){if(0===c)break e;c--,A+=s[o++]<>>=1)){case 0:n.mode=14;break;case 1:if(l(n),n.mode=20,6===t){A>>>=2,x-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=R}A>>>=2,x-=2;break;case 14:for(A>>>=7&x,x-=7&x;x<32;){if(0===c)break e;c--,A+=s[o++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=R;break} if(n.length=65535&A,A=0,x=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(S=n.length){if(S>c&&(S=c),S>d&&(S=d),0===S)break e;h.arraySet(i,s,o,S,a),c-=S,o+=S,d-=S,a+=S,n.length-=S;break}n.mode=k;break;case 17:for(;x<14;){if(0===c)break e;c--,A+=s[o++]<>>=5,x-=5,n.ndist=1+(31&A),A>>>=5,x-=5,n.ncode=4+(15&A),A>>>=4,x-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=R;break}n.have=0,n.mode=18;case 18:for(;n.have>>=3,x-=3}for(;n.have<19;)n.lens[V[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,L={bits:n.lenbits},j=g(0,n.lens,0,19,n.lencode,0,n.work,L),n.lenbits=L.bits,j){e.msg="invalid code lengths set",n.mode=R;break}n.have=0,n.mode=19;case 19:for(;n.have>>16&255,Z=65535&P,!((U=P>>>24)<=x);){if(0===c)break e;c--,A+=s[o++]<>>=U,x-=U,n.lens[n.have++]=Z;else{ if(16===Z){for(F=U+2;x>>=U,x-=U,0===n.have){e.msg="invalid bit length repeat",n.mode=R;break}D=n.lens[n.have-1],S=3+(3&A),A>>>=2,x-=2}else if(17===Z){for(F=U+3;x>>=U)),A>>>=3,x-=3}else{for(F=U+7;x>>=U)),A>>>=7,x-=7}if(n.have+S>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=R;break}for(;S--;)n.lens[n.have++]=D}} if(n.mode===R)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=R;break}if(n.lenbits=9,L={bits:n.lenbits},j=g(v,n.lens,0,n.nlen,n.lencode,0,n.work,L),n.lenbits=L.bits,j){e.msg="invalid literal/lengths set",n.mode=R;break}if(n.distbits=6,n.distcode=n.distdyn,L={bits:n.distbits},j=g(w,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,L),n.distbits=L.bits,j){e.msg="invalid distances set",n.mode=R;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(c>=6&&d>=258){ e.next_out=a,e.avail_out=d,e.next_in=o,e.avail_in=c,n.hold=A,n.bits=x,m(e,C),a=e.next_out,i=e.output,d=e.avail_out,o=e.next_in,s=e.input,c=e.avail_in,A=n.hold,x=n.bits,n.mode===k&&(n.back=-1);break}for(n.back=0;G=(P=n.lencode[A&(1<>>16&255,Z=65535&P,!((U=P>>>24)<=x);){if(0===c)break e;c--,A+=s[o++]<>T)])>>>16&255,Z=65535&P,!(T+(U=P>>>24)<=x);){if(0===c)break e;c--,A+=s[o++]<>>=T,x-=T,n.back+=T} if(A>>>=U,x-=U,n.back+=U,n.length=Z,0===G){n.mode=26;break}if(32&G){n.back=-1,n.mode=k;break}if(64&G){e.msg="invalid literal/length code",n.mode=R;break}n.extra=15&G,n.mode=22;case 22:if(n.extra){for(F=n.extra;x>>=n.extra,x-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;G=(P=n.distcode[A&(1<>>16&255,Z=65535&P,!((U=P>>>24)<=x);){if(0===c)break e;c--,A+=s[o++]<>T)])>>>16&255,Z=65535&P,!(T+(U=P>>>24)<=x);){if(0===c)break e;c--,A+=s[o++]<>>=T,x-=T,n.back+=T}if(A>>>=U,x-=U,n.back+=U,64&G){e.msg="invalid distance code",n.mode=R;break}n.offset=Z,n.extra=15&G,n.mode=24;case 24:if(n.extra){for(F=n.extra;x>>=n.extra,x-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=R;break}n.mode=25;case 25: if(0===d)break e;if(S=C-d,n.offset>S){if((S=n.offset-S)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=R;break}S>n.wnext?(S-=n.wnext,M=n.wsize-S):M=n.wnext-S,S>n.length&&(S=n.length),I=n.window}else I=i,M=a-n.offset,S=n.length;S>d&&(S=d),d-=S,n.length-=S;do{i[a++]=I[M++]}while(--S);0===n.length&&(n.mode=21);break;case 26:if(0===d)break e;i[a++]=n.length,d--,n.mode=21;break;case 27:if(n.wrap){for(;x<32;){if(0===c)break e;c--,A|=s[o++]<=1&&0===B[E];E--);if(C>E&&(C=E),0===E)return l[u++]=20971520,l[u++]=20971520,A.bits=1,0;for(x=1;x0&&(0===e||1!==E))return-1;for(O[1]=0,k=1;k<15;k++)O[k+1]=O[k]+B[k];for(R=0;R852||2===e&&U>592)return 1;for(;;){w=k-M,d[R]v?(_=D[j+d[R]],b=Z[T+d[R]]):(_=96,b=0),h=1<>M)+(p-=h)]=w<<24|_<<16|b|0}while(0!==p);for(h=1<>=1;if(0!==h?(G&=h-1,G+=h):G=0,R++,0==--B[k]){if(k===E)break;k=t[a+d[R]]}if(k>C&&(G&m)!==f){for(0===M&&(M=C),g+=x,I=1<<(S=k-M);S+M852||2===e&&U>592)return 1;l[f=G&m]=C<<24|S<<16|g-u|0}}return 0!==G&&(l[g+G]=k-M<<24|64<<16|0),A.bits=C,0}},{"../utils/common":41}],51:[function(e,t){"use strict";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){"use strict";function r(e){for(var t=e.length;--t>=0;)e[t]=0}function s(e,t,n,r,s){this.static_tree=e,this.extra_bits=t, this.extra_base=n,this.elems=r,this.max_length=s,this.has_stree=e&&e.length}function i(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function o(e){return e<256?F[e]:F[256+(e>>>7)]}function a(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function c(e,t,n){e.bi_valid>M-n?(e.bi_buf|=t<>M-e.bi_valid,e.bi_valid+=n-M):(e.bi_buf|=t<>>=1,n<<=1}while(--t>0);return n>>>1}function d(e,t,n){var r,s,i=new Array(S+1),o=0;for(r=1;r<=S;r++)i[r]=o=o+n[r-1]<<1;for(s=0;s<=t;s++){var a=e[2*s+1];0!==a&&(e[2*s]=u(i[a]++,a))}}function A(e){var t;for(t=0;t8?a(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0, e.bi_valid=0}function p(e,t,n,r){var s=2*t,i=2*n;return e[s]>1;n>=1;n--)f(e,i,n);s=c;do{n=e.heap[1], e.heap[1]=e.heap[e.heap_len--],f(e,i,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,i[2*s]=i[2*n]+i[2*r],e.depth[s]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,i[2*n+1]=i[2*r+1]=s,e.heap[1]=s++,f(e,i,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,s,i,o,a,c=t.dyn_tree,l=t.max_code,u=t.stat_desc.static_tree,d=t.stat_desc.has_stree,A=t.stat_desc.extra_bits,h=t.stat_desc.extra_base,p=t.stat_desc.max_length,f=0;for(i=0;i<=S;i++)e.bl_count[i]=0 ;for(c[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;np&&(i=p,f++),c[2*r+1]=i,r>l||(e.bl_count[i]++,o=0,r>=h&&(o=A[r-h]),a=c[2*r],e.opt_len+=a*(i+o),d&&(e.static_len+=a*(u[2*r+1]+o)));if(0!==f){do{for(i=p-1;0===e.bl_count[i];)i--;e.bl_count[i]--,e.bl_count[i+1]+=2,e.bl_count[p]--,f-=2}while(f>0);for(i=p;0!==i;i--)for(r=e.bl_count[i];0!==r;)(s=e.heap[--n])>l||(c[2*s+1]!==i&&(e.opt_len+=(i-c[2*s+1])*c[2*s],c[2*s+1]=i),r--)}}(e,t),d(i,l,e.bl_count)} function v(e,t,n){var r,s,i=-1,o=t[1],a=0,c=7,l=4;for(0===o&&(c=138,l=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)s=o,o=t[2*(r+1)+1],++a>=7;r0?(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 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1 ;for(t=32;t=3&&0===e.bl_tree[2*D[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),s=e.opt_len+3+7>>>3,(i=e.static_len+3+7>>>3)<=s&&(s=i)):s=i=n+5,n+4<=s&&-1!==t?_(e,t,n,r):4===e.strategy||i===s?(c(e,2+(r?1:0),3),m(e,j,L)):(c(e,4+(r?1:0),3),function(e,t,n,r){var s;for(c(e,t-257,5),c(e,n-1,5), c(e,r-4,4),s=0;s>>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*(P[n]+k+1)]++,e.dyn_dtree[2*o(t)]++),e.last_lit===e.lit_bufsize-1}, n._tr_align=function(e){c(e,2,3),l(e,I,j),function(e){16===e.bi_valid?(a(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{"../utils/common":41}],53:[function(e,t){"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t){"use strict" ;t.exports="function"==typeof setImmediate?setImmediate:function(){var e=[].slice.apply(arguments);e.splice(1,0,0),setTimeout.apply(null,e)}},{}]},{},[10])(10)}},n={};e.n=t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},e.d=(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){ if("object"==typeof window)return window}}(),e.o=(e,t)=>({}.hasOwnProperty.call(e,t)),(()=>{"use strict";function t(e){if(this.data="",this.read=0,"string"==typeof e)this.data=e;else if(Oa.isArrayBuffer(e)||Oa.isArrayBufferView(e)){var n=new Uint8Array(e);try{this.data=String.fromCharCode.apply(null,n)}catch(e){for(var r=0;r=64;){for(a=0;a<16;++a)t[a]=n.getInt32();for(;a<64;++a)r=((r=t[a-2])>>>17|r<<15)^(r>>>19|r<<13)^r>>>10,s=((s=t[a-15])>>>7|s<<25)^(s>>>18|s<<14)^s>>>3,t[a]=r+t[a-7]+s+t[a-16]|0;for(c=e.h0,l=e.h1,u=e.h2,d=e.h3,A=e.h4,h=e.h5,p=e.h6,f=e.h7,a=0;a<64;++a)i=(c>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10),o=c&l|u&(c^l),r=f+((A>>>6|A<<26)^(A>>>11|A<<21)^(A>>>25|A<<7))+(p^A&(h^p))+Fa[a]+t[a],f=p,p=h,h=A, A=d+r|0,d=u,u=l,l=c,c=r+(s=i+o)|0;e.h0=e.h0+c|0,e.h1=e.h1+l|0,e.h2=e.h2+u|0,e.h3=e.h3+d|0,e.h4=e.h4+A|0,e.h5=e.h5+h|0,e.h6=e.h6+p|0,e.h7=e.h7+f|0,m-=64}}function r(e,t){return e.toLowerCase()===t.toLowerCase()}function s(e){let t="";const n=e=>c(e)?parseInt(e,10):e>="A"&&e<="F"?e.charCodeAt(0)-"A".charCodeAt(0)+10:e.charCodeAt(0)-"a".charCodeAt(0)+10;let r=0;for(;r=e.length||!l(s)||!l(i)?(t+="%", r++):(t+=String.fromCharCode((n(s)<<4)+n(i)),r+=3)}return t}function i(e){return e.replace(/([^\x20-\x7E]|[,;])/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))}function o(e){return"\t"===e||"\n"===e||"\f"===e||"\r"===e||" "===e}function a(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"}function c(e){return e>="0"&&e<="9"}function l(e){return void 0!==e&&(c(e)||e>="A"&&e<="F"||e>="a"&&e<="f")}function u(e){if(e.endsWith("=")&&(e=e.substring(0,e.length-1)), e.endsWith("=")&&(e=e.substring(0,e.length-1)),0===e.length)return!1;for(const t of e)if(!a(t)&&!c(t)&&"+"!==t&&t!==od&&t!==ad&&"_"!==t)return!1;return!0}function d(e,t){const n=e.GetCspNonce();if(!n)return!1;for(const e of t)if(e.isNonce()&&e.getNonce()===n)return!0;return!1}function A(e,t){return e.toLowerCase()===t}function h(e,t,n,r,s){const i=t.scheme;if(!e)return!0;if(e===i)return!0;if("http"===e){if("https"===i)return!0;if(("ws"===i||"wss"===i)&&s)return!0} return!("https"!==e||"wss"!==i||!s)||"ws"===e&&"wss"===i||r&&!n&&("http"===i&&"https"===e||"ws"===i&&"wss"===e)}let p;Object.fromEntries?p=Object.fromEntries:(p=e=>[...e].reduce(((e,[t,n])=>(e[t]=n,e)),{}),Object.fromEntries=p),Object.defineProperties(Promise.prototype,{done:{value:function(e){return this.then(((...t)=>e.apply(this,t)))},configurable:!0,enumerable:!0,writable:!1},fail:{value:function(e){return this.then((()=>{}),((...t)=>e.apply(this,t)))},configurable:!0,enumerable:!0, writable:!1},always:{value:function(e){return this.then(((...t)=>e.apply(this,t)),((...t)=>e.apply(this,t)))},configurable:!0,enumerable:!0,writable:!1}});const f=Promise,m=!1;let g=0;const v=[],w=()=>{const e=["debug"],t=["log"],n=["warn","info"],r=["error"],s=[...e,...t,...n,...r],i=r;g>=80&&i.push(...e),g>=60&&i.push(...t),g>=30&&i.push(...n),s.forEach((e=>_[e]=i.includes(e)?console[e].bind(console):()=>{}))},_={set:e=>{g=e,v.forEach((e=>{e(_,g)})),w()},get:()=>g,get verbose(){ return(_.debug||(()=>{})).bind(console)},debug:()=>{},log:()=>{},warn:()=>{},info:()=>{},error:()=>{},addChangeListener:e=>{v.push(e)}};w();let b=[];const y={late:!1,init:()=>{},registerLateCallback:e=>{_.debug("toea: register callback"),b.push(e)},ensureLate:e=>{y.late?e():y.registerLateCallback(e)},setReady:()=>{_.debug("toea: run "+b.length+" callbacks"),y.late=!0;for(let e=0;e{const t=(()=>{let e,t;const n=[],r=[],s=e=>{r.push(e),i()},i=()=>{ if(void 0!==e){let n;for(;r.length;)n=r.shift(),void 0!==n.state&&n.state!==e||"function"==typeof n.f&&n.f.call(o,t)}},o={promise:()=>o,done:e=>(s({state:!0,f:e}),o),fail:e=>(s({state:!1,f:e}),o),always:e=>(s({f:e}),o),progress:e=>(e&&n.push(e),o),then:(e,n,r)=>R((s=>{const i=(e,n)=>(...r)=>{const i=e?e(t):void 0,o=i&&"function"==typeof i.promise?i.promise():null,a=i&&"function"==typeof i.then?i:null ;if(o)o.done((e=>s.resolve(e))).fail(((...e)=>s.reject(e[0]))).progress(((...e)=>s.notify(...e)));else if(a)a.then(((...e)=>s.resolve(...e)),(e=>s.reject(e)));else{const t=e?[i]:r;s[n](t[0])}};o.done(i(e,"resolve")),o.fail(i(n,"reject")),o.progress(i(r,"notify"))})).promise(),each:e=>{const t=R();return o.then((n=>{const r=Array.isArray(n)?n:[n];R.when(r.map((t=>e(t)))).then(t.resolve)})),t.promise()},iterate:e=>{const t=R();return o.then((n=>{const r=(Array.isArray(n)?n:[n]).map((t=>()=>e(t))) ;R.onebyone(r,!0).done((e=>{t.resolve(e)})).fail(t.reject)})),t.promise()}};return{get:()=>o,try_resolve:n=>(void 0===e&&(e=!0,t=n),i(),o),try_reject:n=>(void 0===e&&(e=!1,t=n),i(),o),do_notify:e=>((e=>{n.forEach((t=>t(e)))})(e),o)}})(),n={promise:()=>t.get(),resolve:e=>t.try_resolve(e),reject:e=>t.try_reject(e),notify:e=>t.do_notify(e), consume:e=>(e&&e.promise?e.promise().done((e=>n.resolve(e))).fail(((...e)=>n.reject(e[0]))).progress((e=>n.notify(e))):e&&e.then?e.then((e=>n.resolve(e)),((...e)=>n.reject(e[0]))):_.warn("promise: incompatible object given to consume()",e),n.promise())};return e&&e(n),n};R.Pledge=(...e)=>{const t=R();return t.resolve(...e),t.promise()},R.Breach=(...e)=>{const t=R();return t.reject(e[0]),t.promise()},R.onebyone=(e,t=!0)=>{const n=[],r=R();let s=0;const i=()=>{if(s{n.push(e),i()})).fail((()=>{if(n.push(null),t)return r.reject();i()})):o&&o.then?o.then((e=>{n.push(e),i()}),(()=>{if(n.push(null),t)return r.reject();i()})):(n.push(o),i())}else r.resolve(n)};return i(),r.promise()},R.or=e=>{let t;const n=R(),r=()=>{e.length?(t=e.shift(),t&&R.Pledge().then(t).done(n.resolve).fail(r)):n.reject()};return r(),n.promise()},R.sidebyside=e=>{e=Array.isArray(e)?e:[e];const t=R();let n=e.length;return n?e.forEach((e=>{ e&&e.promise&&e.promise().always((()=>{0==--n&&t.resolve()}))})):t.resolve(),t.promise()},R.when=e=>{e=Array.isArray(e)?e:[e];const t=R();let n=e.length;const r=[];return n?e.forEach((e=>{let s;if(e&&e.promise)s=e.promise();else{if(!e.then)return void _.warn("promise: incompatible object given to when()",e);s=e}s.fail((()=>{t.reject(),n=-1})).done((e=>{r.push(e),0==--n&&t.resolve(r)}))})):t.resolve(r),t.promise()},R.all=e=>R.when(e).then((()=>{})),R.from=e=>{const t=R() ;return e.then(t.resolve,t.reject),t.promise()},R.heal=e=>e instanceof Array?R.all(e.map((e=>R.from(e).then((()=>{}),(()=>R.Pledge()))))):R.from(e).then((()=>{}),(()=>{}));const x=globalThis;let E,C,S,M,{chrome:I,browser:U}=x;S=()=>{if(void 0!==E)return E;try{const e=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);e&&(E=parseInt(e[2]))}catch(e){}return E},M=()=>{if(void 0!==C)return C;try{C=-1!=navigator.userAgent.search(/Android|Mobile/)}catch(e){}return C};const G={STORAGE:{ SCHEMA:"#schema",TYPE:"#storage",CONFIG:"#config",SESSION:"#session",VERSION:"#version",LAST_START:"#laststart",UPDATE:"#update",BEGGING:"#begging",LEGACY_VERSION:"TM_version",STATE_DB:"!state",MISC_DB:"!misc",EXT_DB:"!extdb"},PREFIX:{SCRIPT_UID:"@uid#",COND:"@re#",STORE:"@st#",SCRIPT:"@source#",EXTERNAL:"@ext#",META:"@meta#"}},Z=S()>=58,T={DEFAULT:"storage.local",SECURE:!1,NO_WARNING:!1},B={RETRIES:0,PARTIAL_SIZE:1<<23,COOKIE_PASSTHROUGH:!1},O={HAS_SENDER_ID:!0, INTERNAL_PAGE_PROTOCOLS:["chrome-extension:"],SENDS_ORIGIN:!0},D=!0;[].concat(["chrome"]);const j=(()=>{const e={getInternalPathRegexp:function(e,t){const n=new RegExp("(\\"+["/",".","+","?","|","(",")","[","]","{","}","\\"].join("|\\")+")","g"),r=O.INTERNAL_PAGE_PROTOCOLS[0]+"//"+j.id+"/";return new RegExp(r.replace(n,"\\$1")+"([a-zA-Z"+(e?"\\/":"")+"]*)"+(t||"").replace(n,"\\$1"))},getInternalPageRegexp:function(){return j.getInternalPathRegexp(!1,".html")}, getPlatformInfo:e=>I.runtime.getPlatformInfo(e),getBrowserInfo:e=>{e({name:"Chrome",version:`${S()}`,vendor:"unknown"})}};return Object.defineProperty(e,"lastError",{get:()=>I.runtime.lastError,enumerable:!0}),Object.defineProperty(e,"id",{get:()=>I.runtime.id,enumerable:!0}),Object.defineProperty(e,"short_id",{get:()=>e.id.replace(/[^0-9a-zA-Z]/g,"").substr(0,4),enumerable:!0}),e})(),L=(()=>{let e;return Object.defineProperties({},{inIncognitoContext:{ get:()=>(void 0===e&&(e=I.extension.inIncognitoContext),e),set:t=>{e=t},enumerable:!0},...Object.getOwnPropertyDescriptors({getURL:function(e){return I.runtime.getURL(e)},sendMessage:(e,t)=>I.runtime.sendMessage(e,t),onMessage:{addListener:e=>I.runtime.onMessage.addListener(e)},connect:e=>I.runtime.connect({name:e}),urls:{prepareForReport:function(e){return e}}})})})(),F={isDefaultStoreId:e=>!(void 0!==e),getIdFromStoreId:()=>{}},P={supported:!0,createDocument:async(e,t)=>{ await I.offscreen.createDocument({url:"offscreen.html",...e}),t&&t()},closeDocument:async e=>{await I.offscreen.closeDocument(),e&&e()}},N=e=>new f((t=>H(t,e)));let V=0;const z=(e,t)=>{const n=Date.now();if(V+ece((()=>{V=Date.now(),e()}),t||0)))},q=async function(e,...t){await z(1e3),e.apply(this,t)},H=function(e,t){return t?ce.apply(this,[e,t]):(q.apply(this,[e]),0)},Q=e=>{const t=[],n=[],r=()=>{let s;if(n.length{let e;(e=n.indexOf(t))>-1&&n.splice(e,1),r()})),s.p.consume(t)}},s={add:function(e){const n=R();return t.push({fn:e,p:n}),r(),n.promise()}};return s},W=e=>{const t={},{retimeout_on_get:n,timeout:r,check_interval:s,auto_remove_mutex:i}=Object.assign({retimeout_on_get:!1,timeout:300,check_interval:120},e||{});let o;const a=()=>{c(),o=ce(u,1e3*s)},c=()=>{o&&te(o),o=null},l=e=>{ const n=t[e];return delete t[e],n?n.value:void 0},u=()=>{o=null;const e=Date.now()-1e3*r,n=Object.entries(t).filter((([t,n])=>n.ts{n.forEach((([e,t])=>{const n=t&&t.d;n&&n.resolve([e,t.value]),l(e)})),i&&i.release(),a()})):a()};r&&a();const d={set:(e,n)=>{const r=R();return t[e]={value:n,ts:Date.now(),d:r},r.promise()},get:(e,r)=>{const s=t[e];return s?(n&&(s.ts=Date.now()),s.value):r},remove:l,removeAll:()=>{Object.keys(t).map((e=>l(e)))}} ;return d},{AbortController:X,FileReader:Y,TextDecoder:J,atob:K,btoa:$,clearInterval:ee,clearTimeout:te,crypto:ne,decodeURIComponent:re,encodeURIComponent:se,escape:ie,location:oe,setInterval:ae,setTimeout:ce,unescape:le}=self;let{fetch:ue}=self;const de=self,Ae=oe.origin,he=oe.host,{addEventListener:pe,removeEventListener:fe}=self,me=pe,{DOMParser:ge,Notification:ve,Image:we,Worker:_e,alert:be,confirm:ye,document:ke,screen:Re,webkitNotifications:xe}=self;let Ee;try{Ee=self.localStorage }catch(e){}const Ce=Ee;let{XMLHttpRequest:Se}=self;const{clients:Me}=self,Ie=e=>[...new Set(e)],Ue=(e,t,n)=>{const r=e.indexOf(t);if(-1==r)return"";if(!n)return e.substr(r+t.length);const s=e.substr(r+t.length).indexOf(n);return-1==s?"":e.substr(r+t.length,s)},Ge=(e,t)=>{null==t&&(t=[]);const n=new RegExp("(\\"+["/",".","+","?","|","(",")","[","]","{","}","\\"].concat(t).join("|\\")+")","g");return e.replace(n,"\\$1") },Ze=e=>Ge(e,["*"]),Te=e=>(({}.toString.apply(e).match(/\s([a-z|A-Z]+)/)||[])[1]),Be=(e,t)=>{const n=Te(e);if("Array"===n||"NodeList"===n){for(let n=0;ne.slice(0,t)+r+e.slice(t+Math.abs(n)),De=(e,t,n,r)=>{let s;if(Array.isArray(n)){const e={};n.forEach((t=>{e[t]=!0})),s=e }else s=n;return Be(s||e,((n,i)=>{if(!s||s.hasOwnProperty(i)){let n;const o=e[i],a=Te(o);if("Undefined"==a)return;if(s&&r&&(n=Te(s[i]))&&n!==a&&("Array"===n||"Object"===n))return;"Object"==a?(t[i]={},De(o,t[i],s?s[i]:null)):"Array"==a?(t[i]=[],De(o,t[i])):t[i]=o}})),t},je=(e,t)=>{let n=!0;if("object"!=typeof e||"object"!=typeof t||null===e||null===t)return e===t ;for(const[r,s]of Object.entries(t))if(void 0!==s&&(n=void 0!==e[r]&&(null===s?null===e[r]:s instanceof RegExp?!!`${e[r]}`.match(s):"object"==typeof s?je(e[r],s):e[r]===s),!n))break;return n},Le=e=>(()=>{let t={};const n=e||1e3,r={clear:()=>{Be(t,(e=>te(e))),t={}},is:(e,n)=>{const s=void 0!==t[e];return n&&r.add(e),s},add:(e,s)=>{r.is(e)&&te(t[e]),t[e]=ce((()=>{delete t[e]}),s||n)}};return r })(),Fe=e=>Array.isArray(e)?e:[e],Pe=(e,t,n="both")=>"notinfirst"==n?t.filter((t=>!e.includes(t))):e.concat(t).filter((n=>!e.includes(n)||!t.includes(n))),Ne=(e,t,n)=>{void 0===n&&(n="-");const r=t?/[:<>|~?*\x00-\x1F\uFDD0-\uFDEF"]/g:/[:<>|~?*\x00-\x1F\uFDD0-\uFDEF"\/\\]|^[.]|[.]$/g;return!t&&/^((CON|PRN|AUX|NUL|CLOCK\$|COM[1-9]|LPT[1-9])(\..*)?|device(\..*)?|desktop.ini|thumbs.db)$/i.test(e)?(n||"_")+e.replace(r,n):e.replace(r,n) },Ve=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})),ze=(e,t)=>{const n=[];for(let r=0,s=e.length;rthis.off(e,t)}once(e,t,n){const r=void 0===n||Array.isArray(n)?n:[n],s=this.on(e,((...e)=>(s(), t.bind(this)(...e))),r);return s}off(e,t){const n=this.events[e];n&&(this.events[e]=n.filter((e=>e.listener!==t)))}has(e,t){const n=this.events[e];return!!n&&n.some((e=>e.listener===t))}emit(e,...t){const n=this.events[e];if(n)for(const e of n){const{listener:n,filter:r}=e;if((!r||je(t,r))&&!0===n(...t))return!0}return!1}listening(e,t){const n=this.events[e];if(n){if(t){const e=Array.isArray(t)?t:[t];return n.filter((t=>!t.filter||je(t.filter,e))).length}return n.length}return 0}}class He{ constructor(e){this.storage={},this.prefix=e}supported(){return R.Pledge(!0)}keys(){return R((({resolve:e})=>{const t=Object.keys(this.storage).filter((e=>e.startsWith(this.prefix)));e(t)})).promise()}list(){return R((({resolve:e})=>{const t=Object.keys(this.storage).filter((e=>e.startsWith(this.prefix))).map((e=>({key:e.substr(this.prefix.length),value:this.storage[e]})));e(t)})).promise()}set(e,t){return R((({resolve:n})=>{this.storage[`${this.prefix}${e}`]=t,n()})).promise()}get(e){ return R((({resolve:t})=>{const n=`${this.prefix}${e}`;n in this.storage?t(this.storage[n]):t(null)})).promise()}delete(e){return R((({resolve:t})=>{delete this.storage[`${this.prefix}${e}`],t()})).promise()}clear(){return R((({resolve:e})=>{this.storage={},e()})).promise()}}class Qe{constructor(e,t){this.db=null,this.dbName=e,this.storeName=t}open(){const e=R();if(this.db)return e.resolve(this.db),e.promise();const t=indexedDB.open(this.dbName,1);return t.onerror=()=>{ e.reject(new Error("Error opening database."))},t.onupgradeneeded=e=>{const t=e.target.result;t.objectStoreNames.contains(this.storeName)||t.createObjectStore(this.storeName)},t.onsuccess=t=>{this.db=t.target.result,e.resolve(this.db)},e.promise()}supported(){return R((async({resolve:e})=>{"undefined"!=typeof indexedDB?this.list().done((()=>e(!0))).fail((()=>e(!1))):e(!1)})).promise()}keys(){return this.open().then((e=>{ const t=R(),n=e.transaction(this.storeName,"readonly").objectStore(this.storeName).openCursor(),r=[];return n.onerror=()=>{t.reject(new Error("Error getting keys values."))},n.onsuccess=e=>{const n=e.target.result;n?(r.push(n.key),n.continue()):t.resolve(r)},t.promise()}))}list(){return this.open().then((e=>{const t=R(),n=e.transaction(this.storeName,"readonly").objectStore(this.storeName).openCursor(),r=[];return n.onerror=()=>{t.reject(new Error("Error listing values."))},n.onsuccess=e=>{ const n=e.target.result;n?(r.push({key:n.key,value:n.value}),n.continue()):t.resolve(r)},t.promise()}))}set(e,t){return this.open().then((n=>{const r=R(),s=n.transaction(this.storeName,"readwrite").objectStore(this.storeName).put(t,e);return s.onerror=()=>{r.reject(new Error("Error setting value."))},s.onsuccess=()=>{r.resolve()},r.promise()}))}get(e){return this.open().then((t=>{const n=R(),r=t.transaction(this.storeName,"readonly").objectStore(this.storeName).get(e);return r.onerror=()=>{ n.reject(new Error("Error getting value."))},r.onsuccess=()=>{n.resolve(r.result)},n.promise()}))}delete(e){return this.open().then((t=>{const n=R(),r=t.transaction(this.storeName,"readwrite").objectStore(this.storeName).delete(e);return r.onerror=()=>{n.reject(new Error("Error deleting value."))},r.onsuccess=()=>{n.resolve()},n.promise()}))}clear(){return this.open().then((e=>{const t=R(),n=e.transaction(this.storeName,"readwrite").objectStore(this.storeName).clear();return n.onerror=()=>{ t.reject(new Error("Error clearing the store."))},n.onsuccess=()=>{t.resolve()},t.promise()}))}}const We=e=>le(se(e)),Xe=e=>re(ie(e)),Ye=e=>{let t="";for(let n=0;nK(e),Ke=(e,t)=>{try{let n,r;if("object"==typeof t?(n=t.encoding,r=t.array):n=t,!r&&n)return new J(n).decode(e);{let t=0;const r=[],s=e.byteLength;for(;t{try{let n;n="object"==typeof t?t.encoding:t,n&&"utf-8"==n.toLowerCase()&&(e=We(e));const r=new Uint8Array(e.length);for(let t=0;tnew Promise(((n,r)=>{const s=t&&t.encoding?"text/plain":"binary/octet-stream",i=new Blob([e],{type:s}),o=new Y;o.onload=e=>{ e.target?n(e.target.result):r(new Error("Could not convert array to string!"))},t&&t.encoding?o.readAsText(i,t.encoding):o.readAsBinaryString(i)})),tt=(e,t)=>{const n=(e,t)=>e<>>32-t,r=(e,t)=>{const n=2147483648&e,r=2147483648&t,s=1073741824&e,i=1073741824&t,o=(1073741823&e)+(1073741823&t);return s&i?2147483648^o^n^r:s|i?1073741824&o?3221225472^o^n^r:1073741824^o^n^r:o^n^r},s=(e,t,s,i,o,a,c)=>(e=r(e,r(r(((e,t,n)=>e&t|~e&n)(t,s,i),o),c)), r(n(e,a),t)),i=(e,t,s,i,o,a,c)=>(e=r(e,r(r(((e,t,n)=>e&n|t&~n)(t,s,i),o),c)),r(n(e,a),t)),o=(e,t,s,i,o,a,c)=>(e=r(e,r(r(((e,t,n)=>e^t^n)(t,s,i),o),c)),r(n(e,a),t)),a=(e,t,s,i,o,a,c)=>(e=r(e,r(r(((e,t,n)=>t^(e|~n))(t,s,i),o),c)),r(n(e,a),t)),c=e=>{let t,n,r="",s="";for(n=0;n<=3;n++)t=e>>>8*n&255,s="0"+t.toString(16),r+=s.substr(s.length-2,2);return r};let l,u,d,A,h,p,f,m,g,v=[];for(t&&"utf-8"==t.toLowerCase()&&(e=We(e)),v=(e=>{let t;const n=e.length,r=n+8,s=16*((r-r%64)/64+1),i=Array(s-1) ;let o=0,a=0;for(;a>>29,i})(e),p=1732584193,f=4023233417,m=2562383102,g=271733878,l=0;l{let t;t=e.split(",")[0].includes("base64")?K(e.split(",")[1]):le(e.split(",")[1]);const n=e.split(",")[0].split(":")[1].split(";")[0];return new Blob([$e(t)],{type:n})},rt=e=>new Promise((t=>{const n=new Y;n.onload=e=>{var n;t((null===(n=e.target)||void 0===n?void 0:n.result)||void 0)},n.readAsDataURL(e)})),st=async(e,t)=>new Promise((n=>{const r=new Y;r.onload=()=>{ n(r.result||"")},r.onerror=e=>{_.warn(`unable to decode data ${e}`),n(void 0)},t?r.readAsText(e,t):r.readAsBinaryString(e)}));class it{constructor(e=1){if(this.waiting=[],e<0)throw new Error("Count must not be negative");this._count=e}acquire(){if(this._count>0)return this._count--,R.Pledge();{const e=R();return this.waiting.push(e.resolve),e.promise()}}release(){if(this.waiting.length>0){const e=this.waiting.shift();e&&e(void 0)}else this._count++}get count(){return this._count}} const ot=new it(1),at=new qe,ct={};let lt=[];at.on("download",(({id:e,url:t,error:n})=>{const r=ct[e];r?(r.state=n?"interrupted":"complete",lt.forEach((t=>{t({id:e,state:{current:r.state}})})),ce((()=>{delete ct[e]}),6e4)):console.warn("download event for unknown id",e,t)}));const ut={notDetermined:void 0,denied:"denied",authorized:"granted",provisional:"granted"};let dt=[],At=[],ht=[],pt=ut.notDetermined;at.on("notification",(({id:e,clicked:t,error:n})=>{ n?console.warn("notifications: error",e,n):(t&&dt.forEach((function(t){t(e)})),At.forEach((function(t){t(e)})))})),at.on("permission",(({permission:e})=>{pt=ut[e],ht.forEach((function(e){e(pt)}))}));let ft=!0;(async()=>{await null,ft=!1})();const mt=Object.defineProperties({},{...Object.getOwnPropertyDescriptors(L),...Object.getOwnPropertyDescriptors({onConnect:{addListener:function(e){ if(!ft)throw new Error("extension.onConnect listener can only be registered during startup in non-persistent background pages!");return I.runtime.onUserScriptConnect?I.runtime.onUserScriptConnect.addListener(e):console.error("chrome.runtime.onUserScriptConnect is not available!"),I.runtime.onConnect.addListener(e)}},onConnectExternal:{addListener:function(e){if(!ft)throw new Error("extension.onConnectExternal listener can only be registered during startup in non-persistent background pages!") ;return I.runtime.onConnectExternal.addListener(e)}},onMessageExternal:{addListener:function(e){if(!ft)throw new Error("extension.onMessageExternal listener can only be registered during startup in non-persistent background pages!");return I.runtime.onMessageExternal.addListener(e)}},onMessage:{...L.onMessage,addDynamicListener:e=>{const t=(t,n,r)=>e(t,n,r) ;I.runtime.onUserScriptMessage?I.runtime.onUserScriptMessage.addListener(t):console.error("chrome.runtime.onUserScriptMessage is not available!"),L.onMessage.addListener(t)},addListener:e=>{if(!ft)throw new Error("extension.onMessage listener can only be registered during startup in non-persistent background pages!");return mt.onMessage.addDynamicListener(e)}}}),inIncognitoContext:{get:function(){return L.inIncognitoContext}},manifest:{get:function(){return I.runtime.getManifest()}} }),gt=Object.defineProperties({},{...Object.getOwnPropertyDescriptors(j),...Object.getOwnPropertyDescriptors({onInstalled:{addListener:function(e){if(!ft)throw new Error("runtime.onInstalled listener can only be registered during startup in non-persistent background pages!");I.runtime.onInstalled&&I.runtime.onInstalled.addListener(e)}},onUpdateAvailable:{addListener:function(e){ if(!ft)throw new Error("runtime.onUpdateAvailable listener can only be registered during startup in non-persistent background pages!");I.runtime.onUpdateAvailable&&I.runtime.onUpdateAvailable.addListener(e)}},setUninstallURL:e=>{I.runtime.setUninstallURL&&I.runtime.setUninstallURL(e)},getContexts:async e=>{if("getContexts"in I.runtime)return await I.runtime.getContexts(e)}})}),vt={onActivated:{addListener:function(e){ if(!ft)throw new Error("tabs.onActivated listener can only be registered during startup in non-persistent background pages!");return I.tabs.onActivated.addListener(e)},addDynamicListener:function(e){return I.tabs.onActivated.addListener(e)},removeListener:function(e){return I.tabs.onActivated.removeListener(e)}},onUpdated:{addListener:function(e){if(!ft)throw new Error("tabs.onUpdated listener can only be registered during startup in non-persistent background pages!") ;return I.tabs.onUpdated.addListener(e)},addDynamicListener:function(e){return I.tabs.onUpdated.addListener(e)},removeListener:function(e){return I.tabs.onUpdated.removeListener(e)}},onReplaced:{addListener:function(e){if(!ft)throw new Error("tabs.onReplaced listener can only be registered during startup in non-persistent background pages!");if(I.tabs.onReplaced)return I.tabs.onReplaced.addListener(e)},addDynamicListener:function(e){if(I.tabs.onReplaced)return I.tabs.onReplaced.addListener(e)}, removeListener:function(e){return I.tabs.onReplaced.removeListener(e)}},onRemoved:{addListener:function(e){if(!ft)throw new Error("tabs.onRemoved listener can only be registered during startup in non-persistent background pages!");return I.tabs.onRemoved.addListener(e)},addDynamicListener:function(e){return I.tabs.onRemoved.addListener(e)},removeListener:function(e){return I.tabs.onRemoved.removeListener(e)}},executeScript:function(e,t,n){return I.tabs.executeScript(e,t,n)},create:function(e,t){ let{url:n,active:r,index:s,openerTabId:i,windowId:o,parent:a,incognito:c}=e;const l={url:n,active:r,index:s,openerTabId:i,windowId:o};a&&(void 0!==(i=a.id)&&(i<0?console.warn(`tabs.create: openerTabId lower than 0 is not supported -> ${i}!`):l.openerTabId=i),void 0!==(o=a.windowId)&&(l.windowId=o)),c&&wt.supported?wt.getAll({windowTypes:["normal"]},(e=>{let n;return e.some((e=>e.incognito?n=e.id:null)),void 0===n?I.windows.create({url:l.url,incognito:!0},t):(l.windowId=n,I.tabs.create(l,t)) })):I.tabs.create(l,t)},update:function(e,t,n){return I.tabs.update(e,t,n)},remove:function(e,t){return I.tabs.remove(e,t)},highlight:function(e,t){if(!e||!e.tabs)return void(t&&t());const n=e.tabs instanceof Array?e.tabs:[e.tabs];if(!I.tabs.highlight){const e=n.pop();return I.tabs.update(e,{active:!0},(()=>{t&&t()}))}{const e=[];let r;const s=()=>{if(!n.length)return I.tabs.highlight({windowId:r,tabs:e},(()=>{I.windows.update(r,{focused:!0},(()=>{t&&t()}))}));{const t=n.pop();I.tabs.get(t,(t=>{ void 0===r&&(r=t.windowId),t.windowId===r&&e.push(t.index),s()}))}};s()}},getSelected:function(e,t){let n=1;const r=()=>vt.query({active:!0,lastFocusedWindow:!0},(e=>{I.runtime.lastError&&n-- >0?ce(r,1):t&&t(e[0])}));return r()},get:function(e,t){return I.tabs.get(e,t)},query:function(e,t){return I.tabs.query(e,(e=>t(e||[])))},sendMessage:function(e,t,n,r){return"function"==typeof n&&(r=n,n={}),I.tabs.sendMessage(e,t,n,r)}},wt=I&&I.windows&&I.windows.getAll?{supported:!0,getAll:function(e,t){ I.windows.getAll?I.windows.getAll(e,(e=>t(e||[]))):t([])}}:{supported:!1},_t={headerModificationSupported:!0,extraHeaderNeeded:I&&I.webRequest&&I.webRequest.OnBeforeSendHeadersOptions&&I.webRequest.OnBeforeSendHeadersOptions.hasOwnProperty("EXTRA_HEADERS"),onBeforeRequest:{addListener:(e,t,n)=>{if(!ft)throw new Error("webRequest.onBeforeRequest.addListener can only be registered during startup in non-persistent background pages!");return I.webRequest.onBeforeRequest.addListener(e,t,n)}, addDynamicListener:(e,t,n)=>I.webRequest.onBeforeRequest.addListener(e,t,n),removeListener:e=>I.webRequest.onBeforeRequest.removeListener(e),hasListener:e=>I.webRequest.onBeforeRequest.hasListener(e)},onBeforeSendHeaders:{addListener:(e,t,n)=>{if(!ft)throw new Error("webRequest.onBeforeSendHeaders.addListener can only be registered during startup in non-persistent background pages!");return I.webRequest.onBeforeSendHeaders.addListener(e,t,n)}, addDynamicListener:(e,t,n)=>I.webRequest.onBeforeSendHeaders.addListener(e,t,n),removeListener:e=>I.webRequest.onBeforeSendHeaders.removeListener(e),hasListener:e=>I.webRequest.onBeforeSendHeaders.hasListener(e)},onHeadersReceived:{addListener:(e,t,n)=>{if(!ft)throw new Error("webRequest.onHeadersReceived.addListener can only be registered during startup in non-persistent background pages!");return I.webRequest.onHeadersReceived.addListener(e,t,n)}, addDynamicListener:(e,t,n)=>I.webRequest.onHeadersReceived.addListener(e,t,n),removeListener:e=>I.webRequest.onHeadersReceived.removeListener(e),hasListener:e=>I.webRequest.onHeadersReceived.hasListener(e)},onBeforeRedirect:{addListener:(e,t,n)=>{if(!ft)throw new Error("webRequest.onBeforeRedirect.addListener can only be registered during startup in non-persistent background pages!");return I.webRequest.onBeforeRedirect.addListener(e,t,n)}, addDynamicListener:(e,t,n)=>I.webRequest.onBeforeRedirect.addListener(e,t,n),removeListener:e=>I.webRequest.onBeforeRedirect.removeListener(e),hasListener:e=>I.webRequest.onBeforeRedirect.hasListener(e)},onResponseStarted:{addListener:(e,t,n)=>{if(!ft)throw new Error("webRequest.onResponseStarted.addListener can only be registered during startup in non-persistent background pages!");return I.webRequest.onResponseStarted.addListener(e,t,n)}, addDynamicListener:(e,t,n)=>I.webRequest.onResponseStarted.addListener(e,t,n),removeListener:e=>I.webRequest.onResponseStarted.removeListener(e),hasListener:e=>I.webRequest.onResponseStarted.hasListener(e)},onErrorOccurred:{addListener:(e,t)=>{if(!ft)throw new Error("webRequest.onErrorOccurred.addListener can only be registered during startup in non-persistent background pages!");return I.webRequest.onErrorOccurred.addListener(e,t)}, addDynamicListener:(e,t)=>I.webRequest.onErrorOccurred.addListener(e,t),removeListener:e=>I.webRequest.onErrorOccurred.removeListener(e),hasListener:e=>I.webRequest.onErrorOccurred.hasListener(e)},handlerBehaviorChanged:()=>I.webRequest.handlerBehaviorChanged()},bt={supported:!(!I||!I.webNavigation),onCommitted:{addListener:function(e){if(!ft)throw new Error("webNavigation.onCommitted listener can only be registered during startup in non-persistent background pages!") ;if(I.webNavigation.onCommitted)return I.webNavigation.onCommitted.addListener(e)},addDynamicListener:function(e){if(I.webNavigation.onCommitted)return I.webNavigation.onCommitted.addListener(e)}},onUrlUpdated:I&&I.webNavigation&&(I.webNavigation.onHistoryStateUpdated||I.webNavigation.onReferenceFragmentUpdated)?{addListener:function(e){if(!ft)throw new Error("webNavigation.onUrlUpdated listener can only be registered during startup in non-persistent background pages!") ;I.webNavigation.onHistoryStateUpdated&&I.webNavigation.onHistoryStateUpdated.addListener(e),I.webNavigation.onReferenceFragmentUpdated&&I.webNavigation.onReferenceFragmentUpdated.addListener(e)},addDynamicListener:function(e){I.webNavigation.onHistoryStateUpdated&&I.webNavigation.onHistoryStateUpdated.addListener(e),I.webNavigation.onReferenceFragmentUpdated&&I.webNavigation.onReferenceFragmentUpdated.addListener(e)} }:void console.warn("webNavigation onReferenceFragmentUpdated or onHistoryStateUpdated not supported, onurlchange will not work!"),onBeforeNavigate:{addListener:function(e,t){if(!ft)throw new Error("webNavigation.onBeforeNavigate listener can only be registered during startup in non-persistent background pages!");if(I.webNavigation.onBeforeNavigate)return I.webNavigation.onBeforeNavigate.addListener(e,t)},addDynamicListener:function(e,t){ if(I.webNavigation.onBeforeNavigate)return I.webNavigation.onBeforeNavigate.addListener(e,t)}},onErrorOccurred:{addListener:function(e){if(!ft)throw new Error("webNavigation.onErrorOccurred listener can only be registered during startup in non-persistent background pages!");if(I.webNavigation.onErrorOccurred)return I.webNavigation.onErrorOccurred.addListener(e)},addDynamicListener:function(e){if(I.webNavigation.onErrorOccurred)return I.webNavigation.onErrorOccurred.addListener(e)}} },yt=I&&I.action,kt=yt?{supported:!0,setIcon:function(e,t){const{path:n,...r}=e;let s={};return n&&(s=S()>=53?{19:n.replace(/\.png$/,"19.png"),38:n.replace(/\.png$/,"38.png"),16:n.replace(/\.png$/,"16.png"),24:n.replace(/\.png$/,"24.png"),32:n.replace(/\.png$/,"32.png")}:{19:n.replace(/\.png$/,"19.png"),38:n.replace(/\.png$/,"38.png")}),yt.setIcon({path:s,...r},t)},setTitle:function(e){if(yt.setTitle)return yt.setTitle(e)},setBadgeText:function(e){if(yt.setBadgeText)return yt.setBadgeText(e)}, setBadgeBackgroundColor:function(e){if(yt.setBadgeBackgroundColor)return yt.setBadgeBackgroundColor(e)},setBadgeTextColor:function(e){return yt.setBadgeTextColor?yt.setBadgeTextColor(e):null},setPopup:function(e){if(yt.setPopup)return yt.setPopup(e)},openPopup:()=>yt.openPopup?yt.openPopup():null}:{supported:!1},Rt=(I&&I.declarativeContent&&I.declarativeContent.onPageChanged&&(I.declarativeContent.PageStateMatcher,I.declarativeContent.RequestContentScript), U&&U.contentScripts&&U.contentScripts.register,U&&U.userScripts&&U.userScripts.register,{supported:!0,register:(...e)=>I.userScripts.register(...e),unregister:(...e)=>I.userScripts.unregister(...e),update:(...e)=>I.userScripts.update(...e),configureWorld:(...e)=>I.userScripts.configureWorld(...e),getScripts:(...e)=>I.userScripts.getScripts(...e),available:()=>{try{return!!I.userScripts}catch{return!1}}}),xt=(()=>{const e=I;return e&&e.scripting&&e.scripting.executeScript?{supported:!0, executeScript:t=>e.scripting.executeScript(t),registerContentScripts:t=>e.scripting.registerContentScripts(t),getRegisteredContentScripts:t=>e.scripting.getRegisteredContentScripts(t),unregisterContentScripts:t=>e.scripting.unregisterContentScripts(t)}:{supported:!1}})(),Et=I&&I.declarativeNetRequest&&I.declarativeNetRequest.updateSessionRules&&I.declarativeNetRequest.getSessionRules?{supported:!0,getSessionRules:(...e)=>I.declarativeNetRequest.getSessionRules(...e), updateSessionRules:(e,t)=>new Promise(((n,r)=>{try{I.declarativeNetRequest.updateSessionRules(e,(()=>{const e=I.runtime.lastError;if(e){if(r(e),t)throw e}else t&&t(),n()}))}catch(e){if(r(e),t)throw e}}))}:{supported:!1},Ct={onChanged:{addListener:function(e){return I.storage.onChanged.addListener(e)}},local:(()=>{let e={},t={},n=null,r=!1,s=[];const i=e=>{r?s.push(e):e()},o=(i,o)=>{n&&te(n);const a=()=>{r=!0;let i=1;const a=()=>{let n;if((n=I.runtime.lastError)&&console.warn(n),0==--i){r=!1 ;const n=s;s=[],e={},t={},n.forEach((e=>e())),o&&o()}},c=()=>{Object.keys(e).length&&(i++,I.storage.local.set(e,a))};let l;(l=Object.keys(t)).length?(i++,I.storage.local.remove(l,(()=>{c(),a()}))):c(),a(),n=null};i?a():n=ce(a,100)},a=(t,n)=>{if(t instanceof Array){let e=1;const r={},s=()=>{0==--e&&n(r)};t.forEach((t=>{e++,a(t,(e=>{r[t]=e[t],s()}))})),s()}else if(void 0!==e[t]){const r={};r[t]=e[t],n(r)}else I.storage.local.get(t,n)},c=n=>{n instanceof Array?n.forEach((e=>c(e))):(t[n]=!0, delete e[n])},l={set:function(n,r){i((()=>{r&&s.push(r),Object.keys(n).forEach((r=>{var s,i;s=r,i=n[r],e[s]=i,delete t[s]})),o()}))},get:(e,t)=>{null===e?o(!0,(()=>{I.storage.local.get(null,t)})):i((()=>{const n="string"==typeof e||e instanceof Array?e:Object.keys(e);a(n,(e=>t(e)))}))},remove:function(e,t){i((()=>{t&&s.push(t),c(e),o()}))},clear:function(r){i((()=>{n&&te(n),s=[],e={},t={},I.storage.local.clear(r)}))}};return l})(),session:(()=>{const e=U||I;return{ supported:e&&e.storage&&e.storage.session,set:t=>e.storage.session.set(t),get:t=>e.storage.session.get(t),remove:t=>e.storage.session.remove(t),clear:()=>e.storage.session.clear()}})(),sync:{supported:!0,set:function(e,t){return I.storage.sync.set(e,t)},get:function(e,t){return I.storage.sync.get(e,t)},remove:function(e,t){return I.storage.sync.remove(e,t)},clear:function(e){return I.storage.sync.clear(e)}}},St=(()=>{const e=()=>I.downloads;return{supported:!0,onChanged:{addListener:function(t){ var n;if(!ft)throw new Error("downloads.onChanged listener can only be registered during startup in non-persistent background pages!");return null===(n=e())||void 0===n?void 0:n.onChanged.addListener(t)},addDynamicListener:function(t){var n;return null===(n=e())||void 0===n?void 0:n.onChanged.addListener(t)}},search:function(t,n){var r;return null===(r=e())||void 0===r?void 0:r.search(t,n)},cancel:function(t,n){var r;return null===(r=e())||void 0===r?void 0:r.cancel(t,n)},download:function(t,n){ var r;try{return null===(r=e())||void 0===r?void 0:r.download(t,n)}catch(e){n(void 0,e.message)}}}})(),Mt=async function(e,t,n){try{const n=await ue(e),r=await n.blob();t(await new Response(r).arrayBuffer())}catch(e){n(e.message)}},It=Object.defineProperties({},{...Object.getOwnPropertyDescriptors(F),...Object.getOwnPropertyDescriptors({getAll:function(e,t){return I.cookies.getAll(e,t)},remove:function(e,t){return I.cookies.remove(e,t)},set:function(e,t){return I.cookies.set(e,t)}})}),Ut={ supported:!1,set:()=>{}},Gt=!!(I&&I.commands&&I.commands.onCommand),Zt=(()=>{const e=I&&I.notifications;return e&&e.getPermissionLevel&&e.onPermissionLevelChanged&&e.onClicked?{supported:!0,onPermissionLevelChanged:{addListener:function(t){if(!ft)throw new Error("notifications.onPermissionLevelChanged listener can only be registered during startup in non-persistent background pages!");return e.onPermissionLevelChanged.addListener(t)},removeListener:function(t){ return e.onPermissionLevelChanged.removeListener(t)}},onClicked:{addListener:function(t){if(!ft)throw new Error("notifications.onClicked listener can only be registered during startup in non-persistent background pages!");return e.onClicked.addListener(t)},removeListener:function(t){return e.onClicked.removeListener(t)}},onClosed:{addListener:function(t){if(!ft)throw new Error("notifications.onClosed listener can only be registered during startup in non-persistent background pages!") ;return e.onClosed.addListener(t)},removeListener:function(t){return e.onClosed.removeListener(t)}},getPermissionLevel:function(t){return e.getPermissionLevel(t)},create:function(t,n,r){return e.create(t,n,r)},clear:function(t,n){return e.clear(t,n)}}:{supported:!1}})(),Tt=I&&I.contextMenus&&I.contextMenus.create&&I.contextMenus.update&&I.contextMenus.remove?{supported:!0,create:function(e,t){return I.contextMenus.create(e,t)},update:function(e,t,n){return I.contextMenus.update(e,t,n)}, remove:function(e,t){return I.contextMenus.remove(e,t)},removeAll:function(e){return I.contextMenus.removeAll(e)},onClicked:{addListener:function(e){if(!ft)throw new Error("contextMenus.onClicked listener can only be registered during startup in non-persistent background pages!");return I.contextMenus.onClicked.addListener(e)}}}:{supported:!1},Bt=(()=>{const e=I&&I.permissions&&!!I.permissions.getAll;return e?{supported:e,getAll:t=>{if(e)return I.permissions.getAll(t);t&&t({permissions:[], origins:[]})},contains:(t,n)=>{if(e)return I.permissions.contains(t,n);n&&n(!1)},request:(t,n)=>{if(e)return I.permissions.request(t,n);n&&n(!1)},remove:(t,n)=>{if(e)return I.permissions.remove(t,n);n&&n(!1)},onAdded:{addListener:t=>{if(e&&I.permissions.onAdded)return I.permissions.onAdded.addListener(t)}},onRemoved:{addListener:t=>{if(e&&I.permissions.onRemoved)return I.permissions.onRemoved.addListener(t)}}}:{supported:!1}})(),Ot={native_support:!0,getMessage:function(...e){ return I.i18n.getMessage(...e)},getUILanguage:function(){return I.i18n.getUILanguage?I.i18n.getUILanguage():navigator.language},getAcceptLanguages:function(e){return I.i18n.getAcceptLanguages?I.i18n.getAcceptLanguages(e):e([])}},Dt=function(e,t){return I.idle?I.idle.queryState(e,t):t("unknown")},jt=(()=>{if(!I||!I.alarms||!I.alarms.create)return{supported:!1};const e={supported:!0,create:(e,t)=>new Promise((n=>{(I.alarms.create(e,t)||Promise.resolve()).then((()=>n()))})), get:e=>new Promise((t=>I.alarms.get(e,(e=>t(e))))),getAll:()=>new Promise((e=>I.alarms.getAll((t=>e(t))))),clear:e=>new Promise((t=>I.alarms.clear(e,(e=>t(e))))),clearAll:()=>new Promise((e=>I.alarms.clearAll((t=>e(t))))),onAlarm:{addListener:e=>{if(!ft)throw new Error("alarms.onAlarm listener can only be registered during startup in non-persistent background pages!");return I.alarms.onAlarm.addListener(e)}}};return e})();let Lt=!1;(async()=>{try{ Ce&&(T.NO_WARNING="nowarning"===Ce.getItem("#brokenprofile"))}catch(e){console.warn("prep: error at storage type detection",e)}var e;e=e=>{Lt=e},I.extension.isAllowedFileSchemeAccess?I.extension.isAllowedFileSchemeAccess(e):e(!1)})();const Ft=()=>Lt;class Pt{constructor(e){this.pack=e=>e,this.unpack=e=>e,this.origin=null,this.prefix=e,this.origin=L.inIncognitoContext?"incognito":"normal",this.pack=e=>({origin:this.origin,value:e}),this.unpack=e=>e.value}supported(){return R.Pledge(!!Ct.local)} keys(){return R((async({resolve:e})=>{Ct.local.get(null,(t=>{const n=Object.keys(t).filter((e=>e.startsWith(this.prefix)));e(n)}))})).promise()}list(){return R((async({resolve:e})=>{Ct.local.get(null,(t=>{const n=Object.entries(t).filter((([e,t])=>e.startsWith(this.prefix))).map((([e,t])=>({key:e.substr(this.prefix.length),value:this.unpack(t)})));e(n)}))})).promise()}set(e,t){return R((async({resolve:n})=>{Ct.local.set({[`${this.prefix}${e}`]:this.pack(t)},(()=>n()))})).promise()}get(e){ return R((async({resolve:t})=>{const n=`${this.prefix}${e}`;Ct.local.get(n,(e=>{const r=e&&n in e?this.unpack(e[n]):null;t(r||null)}))})).promise()}delete(e){return R((async({resolve:t})=>{Ct.local.remove(`${this.prefix}${e}`,(()=>t()))})).promise()}clear(){return R((async({resolve:e})=>{this.list().then((t=>{const n=t.map((e=>`${this.prefix}${e.key}`));Ct.local.remove(n,(()=>e()))}))})).promise()}on(e,t){if(!["add","change","remove"].includes(e))throw new Error("Unknown event") ;if(!this.origin)throw new Error("No origin set");let n=this.events;if(!n){const e=n=this.events=new qe;Ct.onChanged.addListener(((t,n)=>{if("local"==n&&t)for(const[n,r]of Object.entries(t)){if(!n.startsWith(this.prefix))continue;const{newValue:t,oldValue:s}=r;let i;if(t?i=t:s&&(i=s),i&&"object"==typeof i&&"origin"in i&&i.origin===this.origin)continue;const o=n.substr(this.prefix.length),a=t&&"object"==typeof t&&"origin"in t?this.unpack(t):r,c=s&&"object"==typeof s&&"origin"in s?this.unpack(s):r ;if(t)s?e.emit("change",{key:o,value:a,old:c}):e.emit("add",{key:o,value:a});else{if(!s)throw new Error("Invalid change");e.emit("remove",{key:o,value:a})}}}))}n.on(e,t)}}const Nt=(e,t)=>{if(!e)return t;const n=e[0];switch(e=e.substring(1),n){case"b":return"true"==e;case"n":return Number(e);case"o":try{return JSON.parse(e)}catch(e){console.error("Storage: getValue ERROR: "+e.message)}return t;case"x":try{return Xe(Je(e))}catch(t){return e}default:return e}},Vt=e=>{const t=(typeof e)[0] ;if("o"===t)try{e=t+JSON.stringify(e)}catch(n){console.error("Storage: setValue ERROR: "+n.message),e=t+JSON.stringify({})}else e=t+e;return e};class zt{constructor(e){this.prefix=e,this.storage=Ce}supported(){let e=!1;try{this.storage&&(this.storage.setItem("test","1"),this.storage.removeItem("test"),e=!0)}catch(e){}return R.Pledge(e)}keys(){return R((({resolve:e})=>{const t=[];for(let e=0;ee.map((e=>({key:e,value:this.storage[e]})))))}set(e,t){return R((({resolve:n})=>{const r=`${this.prefix}.${e}`;this.storage[r]=t,this.storage.setItem(r,Vt(t)),n()})).promise()}get(e){return R((({resolve:t})=>{const n=`${this.prefix}${e}`;t(Nt(this.storage.getItem(n)||null))})).promise()}delete(e){return R((({resolve:t})=>{const n=`${this.prefix}${e}`;this.storage.removeItem(n),t()})).promise()}clear(){return R((({resolve:e})=>{this.keys().then((e=>{e.forEach((e=>{ this.storage.removeItem(e)}))})),e()})).promise()}}const{STORAGE:{EXT_DB:qt,VERSION:Ht,TYPE:Qt,LEGACY_VERSION:Wt}}=G,Xt=[Ht,Qt],Yt=[{type:"memory",init:()=>new He("")},{type:"indexedDB",init:()=>new Qe("ext","general"),persistent:!0},{type:"localStorage",init:()=>new zt(""),persistent:!0},(()=>{const e=new qe;return{type:"storage.local",init:()=>{const t=new Pt(`${qt}.`);return["change","add","remove"].forEach((n=>{t.on(n,(t=>{e.emit(n,t)}))})),t},events:e,persistent:!0}})()];let Jt=!1 ;const Kt=async(e,t,n)=>{const r=await e.list();await Promise.all(r.map((async({key:r,value:s})=>{n.drop&&await e.delete(r),await t.set(r,s)})))},$t=new qe;let en=T.DEFAULT;const tn={setValue:async(e,t)=>{await f.all(Yt.map((({active:n,instance:r})=>{if(n)return r.set(e,t)})))},setValues:async e=>{await f.all(Object.keys(e).map((t=>{const n=e[t];return tn.setValue(t,n)})))},getValue:(e,t)=>{let n;return Yt[0].instance.get(e).then((e=>n=e)),null!=n?n:t},deleteAll:async()=>{ const e=Yt[0].instance,t=await((e,t)=>{const n={};return R.all(t.map((t=>e.get(t).then((e=>{null!=e&&(n[t]=e)}))))).then((()=>n))})(e,Xt);await f.all(Yt.map((async({active:e,instance:n})=>{e&&(await n.clear(),await((e,t)=>{const n=R(),r=[];return Object.getOwnPropertyNames(t).forEach((n=>{void 0!==t[n]&&r.push(e.set(n,t[n]))})),R.when(r).done((()=>{n.resolve()})),n.promise()})(n,t))})))},deleteValue:async e=>{await f.all(Yt.map((({active:t,instance:n})=>{if(t)return n.delete(e)})))}, listValues:()=>{const e=Yt[0].instance;let t=[];return e.keys().then((e=>t=e)),t},isWorking:async()=>{let e=!0;return await f.all(Yt.map((async({instance:t})=>{const n=await t.supported();e=e&&!!n}))),e},migrate:async(e,t,n)=>{const r=Yt.find((t=>t.type==e)),s=Yt.find((e=>e.type==t)),i=n||{};if(!r||!s)throw new Error(`Migration: unknown storage implementation(s): ${e} -> ${t}`);if(!(i.force||r.active&&s.active))throw new Error("Migration: inactive source or target") ;r.instance=r.instance||r.init(),s.instance=s.instance||s.init();const{instance:o}=r,{instance:a}=s;if(!await o.supported())throw new Error("Migration failed. Source storage is not supported.");if(!await a.supported())throw new Error("Migration failed. Target storage is not supported.");await Kt(o,a,i)},setTemporary:e=>{if(Jt!=e)return Jt=e,tn.init()},init:async()=>{let e,t;for(const n of[...Yt].reverse()){n.active=!1;const{persistent:r,init:s,type:i}=n;let o,a=n.instance ;if(a||(a=n.instance=s(),n.events&&(n.events.on("add",(async({key:e,value:t})=>{n.active&&(await f.all(Yt.map((({type:n,active:r,instance:s})=>{if(r&&i!=n)return s.set(e,t)}))),$t.emit("add",{key:e,value:t}))})),n.events.on("change",(async({key:e,value:t,old:r})=>{n.active&&(await f.all(Yt.map((({type:n,active:r,instance:s})=>{if(r&&i!=n)return s.set(e,t)}))),$t.emit("change",{key:e,value:t,old:r}))})),n.events.on("remove",(async({key:e,value:t})=>{ n.active&&(await f.all(Yt.map((({type:t,active:n,instance:r})=>{if(n&&i!=t)return r.delete(e)}))),$t.emit("remove",{key:e,value:t}))})))),r){if(i!==en)continue;if(o=await a.supported(),!o)continue;const t=await a.get(Qt);if(t&&(en=t,i!==en))continue;e=n}("storage.session"!==i||Jt)&&(void 0===o&&(o=await a.supported()),o&&(t&&await Kt(t.instance,a,{drop:!1}),t=n,Jt&&r||(console.debug("Storage: use "+n.type),n.active=!0)))} e||console.error("No persistent storage found. Using memory only, but this will cause data loss on every background context restart!")},on:(e,t,n)=>{$t.on(e,(({key:e,value:n})=>{t(e,n)}),n)},factoryReset:()=>(Ce&&Ce.removeItem(Wt),tn.deleteAll()),get used(){return en}},nn=tn,rn=e=>({utm_source:"ext",utm_medium:e.substr(0,3),utm_campaign:j.short_id}),sn={protocol:"https:",www:"www",api:"api",domain:"userscript.zone"},{STORAGE:{MISC_DB:on}}=G,an=(e,t,n)=>{const r=`${e}.${t}`,s=new Pt(`${on}.`),i={ get:e=>{let i={};const o=void 0===e||Array.isArray(e)?e:[e];return s.get(r).then((e=>{if(null===e&&n&&Ce){const r=n[t];if(r){const{key:t,from:n}="string"==typeof r?{key:r,from:e=>e}:r;try{e=JSON.parse(n(Ce.getItem(t))||"")}catch(e){}}}if(null!==e)if(o)for(const t of o)i[t]=e[t];else i=e;return i}))},set:e=>s.get(r).then((i=>{i||(i={}),Object.entries(e).forEach((([e,t])=>{null===t?delete i[e]:void 0!==t&&(i[e]=t)}));const o=n?n[t]:null;if(o&&Ce){const{key:e,to:t}="string"==typeof o?{key:o,to:e=>e }:o;try{Ce.setItem(e,t(JSON.stringify(i)))}catch(e){}}return s.set(r,i)})),delete:e=>{const t=(Array.isArray(e)?e:[e]).reduce(((e,t)=>(e[t]=null,e)),{});return i.set(t)},clear:()=>{const e=n?n[t]:null;if(e&&Ce){const{key:t}="string"==typeof e?{key:e}:e;Ce.removeItem(t)}return s.delete(r)}};return i},cn=[{name:"ECMAScript 5", value:["// ==UserScript==","// @name New Userscript","// @namespace http://tampermonkey.net/","// @version <$DATE$>","// @description try to take over the world!","// @author You","// @match <$URL$>","// @icon <$ICON$>","// @grant none","// ==/UserScript==","","(function() {"," 'use strict';",""," // Your code here...","})();"].join("\n")},{name:"ECMAScript 6", value:["// ==UserScript==","// @name New ES6-Userscript","// @namespace http://tampermonkey.net/","// @version <$DATE$>","// @description shows how to use babel compiler","// @author You","// @require https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.18.2/babel.js","// @require https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/6.16.0/polyfill.js","// @match <$URL$>","// @icon <$ICON$>","// ==/UserScript==","","var inline_src = (<>).toString();",'var c = Babel.transform(inline_src, { presets: [ "es2015", "es2016" ] });',"eval(c.code);"].join("\n") },{name:"CoffeeScript", value:["// ==UserScript==","// @name New Coffee-Userscript","// @namespace http://tampermonkey.net/","// @version <$DATE$>","// @description shows how to use coffeescript compiler","// @author You","// @require http://coffeescript.org/browser-compiler/coffeescript.js","// @match <$URL$>","// @icon <$ICON$>","// ==/UserScript==","","var inline_src = (<>).toString();","var compiled = this.CoffeeScript.compile(inline_src);","eval(compiled);"].join("\n") }],ln={},un={enabled:!0,configMode:0,debug:!1,logLevel:0,showFixedSrc:!1,webrequest_modHeaders:"yes",webrequest_fixCSP:"auto",webrequest_fixContentCSP:"no",notification_showUpdate:"changelog",notification_silentScriptUpdate:!0,script_templates:cn,scriptUpdateCheckPeriod:864e5,scriptUpdateHideNotificationAfter:15e3,scriptUpdateCheckDisabled:!1,scriptUrlDetection:"auto",script_cookie_access:["iikm","dhdg","fire"].includes(gt.short_id)?"!httponly":"all",script_file_access:"externals", trash_mode:"on",trash_cleanup_after:6048e5,runtime_strict_mode:"byscript",runtime_top_level_await:"default",runtime_run_in:[],runtime_inject_mode:"default",runtime_content_mode:"userscripts",autoReload:!1,appearance_badges:"alltime",appearance_badge_color:["gcal","fcmf","firb","heif"].includes(gt.short_id)?"#444":"#ee3131",appearance_badge_text_color:"#ffffff",context_menu_enabled:!0,context_menu_scripts:!0,context_menu_commands:!0,editor_enabled:!0,editor_fontSize:100,editor_theme:"default", editor_keyMap:"windows",editor_indentUnit:4,editor_tabSize:4,editor_indentWithTabs:"spaces",editor_tabMode:"indent",editor_electricChars:!0,editor_autoSave:!1,editor_easySave:!0,editor_autoLint:!0,editor_autoLintMaxLen:1e6,editor_lineWrapping:!1,userscript_search_url:sn,userscript_search_mode:"off",editor_highlightTrailingWhitespace:!0,editor_trimTrailingSpacesFromModifiedLines:!0,editor_highlightSelectionMatches:"cursor",editor_linter_config:null,favicon_service:"google",i18n:null, action_menu_columns:1,action_menu_scripts_hide_disabled:!1,action_menu_scripts_sort:"auto",incognito_mode:"temporary",layout:"default",layout_user_css:"",sync_enabled:!1,sync_type:2,statistics_enabled:!0,downloads_mode:"default", downloads_extension_whitelist:["/^[^\\.]*$/","/\\.(mp[34a]|m4[ab]|m3u|wma|wav|aac|og[ag]|cda|flac)$/","/\\.(avi|mkv|flv|divx|mpe?g|webm)$/","/\\.(jpe?g|jpe|png|gif|bmp|tiff?|webp|hei[cf]|avif|jxl|svg|eps|ai|ico|dds|psd|xcf|raw|cr2|nef|arw)$/","/\\.(srt|sub|idx)$/","/\\.(ttf|otf|woff)$/","/\\.(txt|pdf|json|yml|xml|csv)$/",".iso","/\\.(zip|tgz|tar|bin)$/","/\\.r(ar|[0-9]{2,2})$/",".rss"],external_update_interval:0,external_connect:"all",require_timeout:2e4, require_blacklist:["/^https?:\\/\\/example.com(:[0-9]{1,5})?\\/.*/"],require_sri_mode:"supported",sandbox_mode:"default",script_include_mode:"default",script_blacklist_server:[],script_blacklist_type:"server",script_blacklist_severity:4,tags_enabled:!0,tags:{"social media":{},utilities:{},games:{},productivity:{},news:{}},background_control:!1,connect_mode:"ask",page_filter_mode:"black",page_whitelist:["/https?:\\/\\/greasyfork\\.org\\/.*/","http://xkcd.com/970/"], forbiddenPages:["*example.org/*","*paypal.tld/*","*stripe.com/*","https://*deutsche-bank-24.tld/*","https://*bankofamerica.tld/*","/^.*:\\/\\/apis\\.google\\.com\\/((?!render)([^\\/]+)\\/)+([^\\/]+)?$/","*://www.facebook.com/plugins/*","*://platform.twitter.com/widgets/*","https://vscode.dev/?connectTo=tampermonkey"]},dn={cloud_url:null,cloud_user:null,cloud_pass:null,missing_host_permissions:[]},An=e=>{let t,n=nn.getValue(G.STORAGE.CONFIG,{});return n instanceof Object||(n={}), void 0!==(t=n[e])?t:"function"==typeof(t=un[e])?t():t},hn=(e,t)=>{let n=nn.getValue(G.STORAGE.CONFIG,{});n instanceof Object||(n={});const r=An(e);n[e]=t;const s=nn.setValue(G.STORAGE.CONFIG,n),i=ln[e];return i&&JSON.stringify(r)!=JSON.stringify(t)&&i.forEach((n=>{try{n(e,r,t,s)}catch(e){_.warn("config: changeListener error",e)}})),R.from(s)};let pn={};const fn=an("session","data",{data:{key:G.STORAGE.SESSION,from:e=>Je(e),to:e=>Ye(e)}}),mn=e=>{let t;return void 0!==(t=pn[e])?t:dn[e] },gn=(e,t)=>{const n=mn(e);return void 0===t?delete pn[e]:pn[e]=t,fn.set(pn).then((()=>{const r=ln[e];r&&JSON.stringify(n)!=JSON.stringify(t)&&r.forEach((r=>{try{r(e,n,t)}catch(e){_.warn("config: changeListener error",e)}}))}))},vn={initialized:!1,values:{},snapshot:{},init:()=>fn.get().then((e=>{e&&(pn=e)})).then((()=>{const e={};Object.defineProperty(vn,"snapshot",{get:function(){return{...vn.values}},enumerable:!0}),Object.keys(un).forEach((t=>{Object.defineProperty(e,t,{get:function(){ return An(t)},set:function(e){hn(t,e)},enumerable:!0})})),Object.keys(dn).forEach((t=>{Object.defineProperty(e,t,{get:function(){return mn(t)},set:function(e){gn(t,e)},enumerable:!0})})),vn.values=e,vn.initialized=!0})),defaultScripts:async()=>[],getValue:e=>dn.hasOwnProperty(e)?mn(e):An(e),setValue:(e,t)=>dn.hasOwnProperty(e)?gn(e,t):hn(e,t),getDefaults:()=>un,addChangeListener:(e,t)=>{Fe(e).forEach((e=>{let n=ln[e];n||(n=ln[e]=[]),n.push(t)}))} },wn=vn,_n=".tld",bn="aaa\naarp\nabb\nabbott\nabogado\nac\nacademy\naccenture\naccountant\naccountants\naco\nactive\nactor\nad\nadac\nads\nadult\nae\naeg\naero\naf\nafl\nag\nagency\nai\naig\nairforce\nairtel\nal\nalibaba\nalipay\nallfinanz\nalsace\nam\namica\namsterdam\nan\nanalytics\nandroid\nao\napartments\napp\napple\naq\naquarelle\nar\naramco\narchi\narmy\narpa\narte\nas\nasia\nassociates\nat\nattorney\nau\nauction\naudi\naudio\nauthor\nauto\nautos\naw\nax\naxa\naz\nazure\nba\nbaidu\nband\nbank\nbar\nbarcelona\nbarclaycard\nbarclays\nbargains\nbauhaus\nbayern\nbb\nbbc\nbbva\nbcn\nbd\nbe\nbeats\nbeer\nbentley\nberlin\nbest\nbet\nbf\nbg\nbh\nbharti\nbi\nbible\nbid\nbike\nbing\nbingo\nbio\nbiz\nbj\nbl\nblack\nblackfriday\nbloomberg\nblue\nbm\nbms\nbmw\nbn\nbnl\nbnpparibas\nbo\nboats\nboehringer\nbom\nbond\nboo\nbook\nboots\nbosch\nbostik\nbot\nboutique\nbq\nbr\nbradesco\nbridgestone\nbroadway\nbroker\nbrother\nbrussels\nbs\nbt\nbudapest\nbugatti\nbuild\nbuilders\nbusiness\nbuy\nbuzz\nbv\nbw\nby\nbz\nbzh\nca\ncab\ncafe\ncal\ncall\ncamera\ncamp\ncancerresearch\ncanon\ncapetown\ncapital\ncar\ncaravan\ncards\ncare\ncareer\ncareers\ncars\ncartier\ncasa\ncash\ncasino\ncat\ncatering\ncba\ncbn\ncc\ncd\nceb\ncenter\nceo\ncern\ncf\ncfa\ncfd\ncg\nch\nchanel\nchannel\nchat\ncheap\nchloe\nchristmas\nchrome\nchurch\nci\ncipriani\ncircle\ncisco\ncitic\ncity\ncityeats\nck\ncl\nclaims\ncleaning\nclick\nclinic\nclinique\nclothing\ncloud\nclub\nclubmed\ncm\ncn\nco\ncoach\ncodes\ncoffee\ncollege\ncologne\ncom\ncommbank\ncommunity\ncompany\ncompare\ncomputer\ncomsec\ncondos\nconstruction\nconsulting\ncontact\ncontractors\ncooking\ncool\ncoop\ncorsica\ncountry\ncoupons\ncourses\ncr\ncredit\ncreditcard\ncreditunion\ncricket\ncrown\ncrs\ncruises\ncsc\ncu\ncuisinella\ncv\ncw\ncx\ncy\ncymru\ncyou\ncz\ndabur\ndad\ndance\ndate\ndating\ndatsun\nday\ndclk\nde\ndealer\ndeals\ndegree\ndelivery\ndell\ndeloitte\ndelta\ndemocrat\ndental\ndentist\ndesi\ndesign\ndev\ndiamonds\ndiet\ndigital\ndirect\ndirectory\ndiscount\ndj\ndk\ndm\ndnp\ndo\ndocs\ndog\ndoha\ndomains\ndoosan\ndownload\ndrive\ndubai\ndurban\ndvag\ndz\nearth\neat\nec\nedeka\nedu\neducation\nee\neg\neh\nemail\nemerck\nenergy\nengineer\nengineering\nenterprises\nepson\nequipment\ner\nerni\nes\nesq\nestate\net\neu\neurovision\neus\nevents\neverbank\nexchange\nexpert\nexposed\nexpress\nfage\nfail\nfairwinds\nfaith\nfamily\nfan\nfans\nfarm\nfashion\nfast\nfeedback\nferrero\nfi\nfilm\nfinal\nfinance\nfinancial\nfirestone\nfirmdale\nfish\nfishing\nfit\nfitness\nfj\nfk\nflickr\nflights\nflorist\nflowers\nflsmidth\nfly\nfm\nfo\nfoo\nfootball\nford\nforex\nforsale\nforum\nfoundation\nfox\nfr\nfresenius\nfrl\nfrogans\nfrontier\nfund\nfurniture\nfutbol\nfyi\nga\ngal\ngallery\ngallup\ngame\ngarden\ngb\ngbiz\ngd\ngdn\nge\ngea\ngent\ngenting\ngf\ngg\nggee\ngh\ngi\ngift\ngifts\ngives\ngiving\ngl\nglass\ngle\nglobal\nglobo\ngm\ngmail\ngmo\ngmx\ngn\ngold\ngoldpoint\ngolf\ngoo\ngoog\ngoogle\ngop\ngot\ngov\ngp\ngq\ngr\ngrainger\ngraphics\ngratis\ngreen\ngripe\ngroup\ngs\ngt\ngu\ngucci\nguge\nguide\nguitars\nguru\ngw\ngy\nhamburg\nhangout\nhaus\nhdfcbank\nhealth\nhealthcare\nhelp\nhelsinki\nhere\nhermes\nhiphop\nhitachi\nhiv\nhk\nhm\nhn\nhockey\nholdings\nholiday\nhomedepot\nhomes\nhonda\nhorse\nhost\nhosting\nhoteles\nhotmail\nhouse\nhow\nhr\nhsbc\nht\nhu\nhyundai\nibm\nicbc\nice\nicu\nid\nie\nifm\niinet\nil\nim\nimmo\nimmobilien\nin\nindustries\ninfiniti\ninfo\ning\nink\ninstitute\ninsurance\ninsure\nint\ninternational\ninvestments\nio\nipiranga\niq\nir\nirish\nis\niselect\nist\nistanbul\nit\nitau\niwc\njaguar\njava\njcb\nje\njetzt\njewelry\njlc\njll\njm\njmp\njo\njobs\njoburg\njot\njoy\njp\njprs\njuegos\nkaufen\nkddi\nke\nkfh\nkg\nkh\nki\nkia\nkim\nkinder\nkitchen\nkiwi\nkm\nkn\nkoeln\nkomatsu\nkp\nkpn\nkr\nkrd\nkred\nkw\nky\nkyoto\nkz\nla\nlacaixa\nlamborghini\nlamer\nlancaster\nland\nlandrover\nlanxess\nlasalle\nlat\nlatrobe\nlaw\nlawyer\nlb\nlc\nlds\nlease\nleclerc\nlegal\nlexus\nlgbt\nli\nliaison\nlidl\nlife\nlifeinsurance\nlifestyle\nlighting\nlike\nlimited\nlimo\nlincoln\nlinde\nlink\nlive\nliving\nlixil\nlk\nloan\nloans\nlol\nlondon\nlotte\nlotto\nlove\nlr\nls\nlt\nltd\nltda\nlu\nlupin\nluxe\nluxury\nlv\nly\nma\nmadrid\nmaif\nmaison\nmakeup\nman\nmanagement\nmango\nmarket\nmarketing\nmarkets\nmarriott\nmba\nmc\nmd\nme\nmed\nmedia\nmeet\nmelbourne\nmeme\nmemorial\nmen\nmenu\nmeo\nmf\nmg\nmh\nmiami\nmicrosoft\nmil\nmini\nmk\nml\nmm\nmma\nmn\nmo\nmobi\nmobily\nmoda\nmoe\nmoi\nmom\nmonash\nmoney\nmontblanc\nmormon\nmortgage\nmoscow\nmotorcycles\nmov\nmovie\nmovistar\nmp\nmq\nmr\nms\nmt\nmtn\nmtpc\nmtr\nmu\nmuseum\nmutuelle\nmv\nmw\nmx\nmy\nmz\nna\nnadex\nnagoya\nname\nnatura\nnavy\nnc\nne\nnec\nnet\nnetbank\nnetwork\nneustar\nnew\nnews\nnexus\nnf\nng\nngo\nnhk\nni\nnico\nnikon\nninja\nnissan\nnl\nno\nnokia\nnorton\nnowruz\nnp\nnr\nnra\nnrw\nntt\nnu\nnyc\nnz\nobi\noffice\nokinawa\nom\nomega\none\nong\nonl\nonline\nooo\noracle\norange\norg\norganic\norigins\nosaka\notsuka\novh\npa\npage\npamperedchef\npanerai\nparis\npars\npartners\nparts\nparty\npe\npet\npf\npg\nph\npharmacy\nphilips\nphoto\nphotography\nphotos\nphysio\npiaget\npics\npictet\npictures\npid\npin\nping\npink\npizza\npk\npl\nplace\nplay\nplaystation\nplumbing\nplus\npm\npn\npohl\npoker\nporn\npost\npr\npraxi\npress\npro\nprod\nproductions\nprof\npromo\nproperties\nproperty\nprotection\nps\npt\npub\npw\npwc\npy\nqa\nqpon\nquebec\nquest\nracing\nre\nread\nrealtor\nrealty\nrecipes\nred\nredstone\nredumbrella\nrehab\nreise\nreisen\nreit\nren\nrent\nrentals\nrepair\nreport\nrepublican\nrest\nrestaurant\nreview\nreviews\nrexroth\nrich\nricoh\nrio\nrip\nro\nrocher\nrocks\nrodeo\nroom\nrs\nrsvp\nru\nruhr\nrun\nrw\nrwe\nryukyu\nsa\nsaarland\nsafe\nsafety\nsakura\nsale\nsalon\nsamsung\nsandvik\nsandvikcoromant\nsanofi\nsap\nsapo\nsarl\nsas\nsaxo\nsb\nsbs\nsc\nsca\nscb\nschaeffler\nschmidt\nscholarships\nschool\nschule\nschwarz\nscience\nscor\nscot\nsd\nse\nseat\nsecurity\nseek\nselect\nsener\nservices\nseven\nsew\nsex\nsexy\nsfr\nsg\nsh\nsharp\nshell\nshia\nshiksha\nshoes\nshow\nshriram\nsi\nsingles\nsite\nsj\nsk\nski\nskin\nsky\nskype\nsl\nsm\nsmile\nsn\nsncf\nso\nsoccer\nsocial\nsoftbank\nsoftware\nsohu\nsolar\nsolutions\nsony\nsoy\nspace\nspiegel\nspreadbetting\nsr\nsrl\nss\nst\nstada\nstar\nstarhub\nstatefarm\nstatoil\nstc\nstcgroup\nstockholm\nstorage\nstudio\nstudy\nstyle\nsu\nsucks\nsupplies\nsupply\nsupport\nsurf\nsurgery\nsuzuki\nsv\nswatch\nswiss\nsx\nsy\nsydney\nsymantec\nsystems\nsz\ntab\ntaipei\ntaobao\ntatamotors\ntatar\ntattoo\ntax\ntaxi\ntc\ntci\ntd\nteam\ntech\ntechnology\ntel\ntelefonica\ntemasek\ntennis\ntf\ntg\nth\nthd\ntheater\ntheatre\ntickets\ntienda\ntiffany\ntips\ntires\ntirol\ntj\ntk\ntl\ntm\ntmall\ntn\nto\ntoday\ntokyo\ntools\ntop\ntoray\ntoshiba\ntours\ntown\ntoyota\ntoys\ntp\ntr\ntrade\ntrading\ntraining\ntravel\ntravelers\ntravelersinsurance\ntrust\ntrv\ntt\ntube\ntui\ntushu\ntv\ntvs\ntw\ntz\nua\nubs\nug\nuk\num\nunicom\nuniversity\nuno\nuol\nus\nuy\nuz\nva\nvacations\nvana\nvc\nve\nvegas\nventures\nverisign\nversicherung\nvet\nvg\nvi\nviajes\nvideo\nvillas\nvin\nvip\nvirgin\nvision\nvista\nvistaprint\nviva\nvlaanderen\nvn\nvodka\nvolkswagen\nvote\nvoting\nvoto\nvoyage\nvu\nwales\nwalter\nwang\nwanggou\nwatch\nwatches\nweather\nweatherchannel\nwebcam\nweber\nwebsite\nwed\nwedding\nweir\nwf\nwhoswho\nwien\nwiki\nwilliamhill\nwin\nwindows\nwine\nwme\nwolterskluwer\nwork\nworks\nworld\nws\nwtc\nwtf\nxbox\nxerox\nxin\n测试\nकॉम\nपरीक्षा\n佛山\n慈善\n集团\n在线\n한국\n点看\nคอม\nভারত\n八卦\n‏موقع‎\nবাংলা\n公益\n公司\n移动\n我爱你\nмосква\nиспытание\nқаз\nонлайн\nсайт\n联通\nсрб\nбел\n‏קום‎\n时尚\n테스트\n淡马锡\nорг\nनेट\n삼성\nசிங்கப்பூர்\n商标\n商店\n商城\nдети\nмкд\n‏טעסט‎\nею\nポイント\n新闻\n工行\n‏كوم‎\n中文网\n中信\n中国\n中國\n娱乐\n谷歌\nభారత్\nලංකා\n购物\n測試\nભારત\nभारत\n‏آزمایشی‎\nபரிட்சை\n网店\nसंगठन\n餐厅\n网络\nком\nукр\n香港\n诺基亚\nδοκιμή\n飞利浦\n‏إختبار‎\n台湾\n台灣\n手表\n手机\nмон\n‏الجزائر‎\n‏عمان‎\n‏ارامكو‎\n‏ایران‎\n‏امارات‎\n‏بازار‎\n‏پاکستان‎\n‏الاردن‎\n‏موبايلي‎\n‏بھارت‎\n‏المغرب‎\n‏السعودية‎\n‏سودان‎\n‏همراه‎\n‏عراق‎\n‏مليسيا‎\n澳門\n닷컴\n政府\n‏شبكة‎\n‏بيتك‎\nგე\n机构\n组织机构\n健康\nไทย\n‏سورية‎\nрус\nрф\n珠宝\n‏تونس‎\n大拿\nみんな\nグーグル\nελ\n世界\nਭਾਰਤ\n网址\n닷넷\nコム\n游戏\nvermögensberater\nvermögensberatung\n企业\n信息\n‏مصر‎\n‏قطر‎\n广东\nஇலங்கை\nஇந்தியா\nհայ\n新加坡\n‏فلسطين‎\nテスト\n政务\nxperia\nxxx\nxyz\nyachts\nyahoo\nyamaxun\nyandex\nye\nyodobashi\nyoga\nyokohama\nyoutube\nyt\nza\nzara\nzero\nzip\nzm\nzone\nzuerich\nzw".split("\n").join("|"),yn="ac.cn\nac.jp\nac.uk\nad.jp\nah.cn\naichi.jp\nakita.jp\naomori.jp\nasn.au\nbj.cn\nchiba.jp\nco.cc\nco.ck\nco.fk\nco.gg\nco.im\nco.in\nco.ir\nco.je\nco.jp\nco.kr\nco.ma\ncom.ac\ncom.af\ncom.ag\ncom.ai\ncom.al\ncom.ar\ncom.au\ncom.aw\ncom.az\ncom.ba\ncom.bb\ncom.bh\ncom.bi\ncom.bm\ncom.bo\ncom.br\ncom.bs\ncom.bt\ncom.by\ncom.bz\ncom.ci\ncom.cm\ncom.cn\ncom.co\ncom.cu\ncom.cw\ncom.cy\ncom.de\ncom.dm\ncom.do\ncom.dz\ncom.ec\ncom.ee\ncom.eg\ncom.es\ncom.et\ncom.fr\ncom.ge\ncom.gh\ncom.gi\ncom.gl\ncom.gn\ncom.gp\ncom.gr\ncom.gt\ncom.gu\ncom.gy\ncom.hk\ncom.hn\ncom.hr\ncom.ht\ncom.im\ncom.io\ncom.iq\ncom.is\ncom.jo\ncom.kg\ncom.ki\ncom.km\ncom.kp\ncom.ky\ncom.kz\ncom.la\ncom.lb\ncom.lc\ncom.lk\ncom.lr\ncom.lv\ncom.ly\ncom.mg\ncom.mk\ncom.ml\ncom.mo\ncom.ms\ncom.mt\ncom.mu\ncom.mv\ncom.mw\ncom.mx\ncom.my\ncom.na\ncom.nf\ncom.ng\ncom.ni\ncom.nr\ncom.om\ncom.pa\ncom.pe\ncom.pf\ncom.ph\ncom.pk\ncom.pl\ncom.pr\ncom.ps\ncom.pt\ncom.py\ncom.qa\ncom.re\ncom.ro\ncom.ru\ncom.rw\ncom.sa\ncom.sb\ncom.sc\ncom.sd\ncom.se\ncom.sg\ncom.sh\ncom.sl\ncom.sn\ncom.so\ncom.st\ncom.sv\ncom.sy\ncom.tj\ncom.tm\ncom.tn\ncom.to\ncom.tr\ncom.tt\ncom.tw\nco.mu\ncom.ua\ncom.ug\ncom.uy\ncom.uz\ncom.vc\ncom.ve\ncom.vi\ncom.vn\ncom.vu\ncom.ws\ncom.zm\nconf.au\nco.nz\nco.rw\nco.th\nco.tj\nco.tt\nco.tv\nco.tz\nco.ug\nco.uk\nco.us\nco.ve\nco.yu\nco.za\nco.zm\nco.zw\ncq.cn\ncsiro.au\nde.net\ndk.org\ned.jp\nedu.au\nedu.cn\nedu.uk\nehime.jp\neu.org\nfukui.jp\nfukuoka.jp\nfukushima.jp\ngb.net\ngd.cn\ngifu.jp\ngo.jp\ngov.au\ngov.cn\ngov.jp\ngov.uk\ngr.jp\ngs.cn\ngunma.jp\ngx.cn\ngz.cn\nhb.cn\nhe.cn\nhi.cn\nhiroshima.jp\nhk.cn\nhl.cn\nhn.cn\nhokkaido.jp\nhyogo.jp\nibaraki.jp\nid.au\ninfo.au\nishikawa.jp\niwate.jp\njl.cn\njs.cn\nkagawa.jp\nkagoshima.jp\nkanagawa.jp\nkanazawa.jp\nkawasaki.jp\nkitakyushu.jp\nkobe.jp\nkochi.jp\nkumamoto.jp\nkyoto.jp\nlg.jp\nln.cn\nltd.uk\nmatsuyama.jp\nme.uk\nmie.jp\nmiyagi.jp\nmiyazaki.jp\nmo.cn\nmod.uk\nnagano.jp\nnagasaki.jp\nnagoya.jp\nnara.jp\nne.jp\nnet.au\nnet.cn\nnet.jp\nnet.uk\nnhs.uk\nnic.uk\nniigata.jp\nnm.cn\nnx.cn\noita.jp\nokayama.jp\nokinawa.jp\norg.au\norg.cn\norg.jp\norg.uk\nor.jp\nosaka.jp\notc.au\noz.au\nplc.uk\npolice.uk\nqh.cn\nsaga.jp\nsaitama.jp\nsapporo.jp\nsc.cn\nsch.uk\nsendai.jp\nsh.cn\nshiga.jp\nshimane.jp\nshizuoka.jp\nsn.cn\nsx.cn\ntakamatsu.jp\ntelememo.au\ntj.cn\ntochigi.jp\ntokushima.jp\ntokyo.jp\ntottori.jp\ntoyama.jp\ntw.cn\nuk.net\nutsunomiya.jp\nwakayama.jp\nxj.cn\nxz.cn\nyamagata.jp\nyamaguchi.jp\nyamanashi.jp\nyn.cn\nyokohama.jp\nzj.cn".split("\n").join("|"),kn=(".("+[bn,yn].join("|")+")").replace(/\./gi,"\\."),Rn=W({ timeout:180,check_interval:120,retimeout_on_get:!0}),xn=/^([^:]+:\/\/)([^/]+)(.*)?/,En=e=>{const t=xn.exec(e);if(t){const[,e,n,r]=t;return{protocol:e,host:n,path:r}}},Cn=e=>e.split("").map((e=>{const t=e.toLowerCase(),n=e.toUpperCase();return t!=n?"["+t+n+"]":e})).join(""),Sn="://",Mn=e=>{let t,n,r,s;const i="/",o=e.replace(/\$$/,"").split(Sn);o.length<2?(t="",n=e):(t=o[0].replace(/^\^/,""),n=o.slice(1).join(Sn));const a=n.split(i);if(s=a.length<2?"/":i+a.slice(1).join(i),r=a[0], "http*"===t||t.match(/\*|http|https|file|ftp/)||(_.warn('uri: override scheme "'+t+'" with "*"'),t="*"),"file"===t)r="";else{const e=r,t=r.match(/\*$|(\*\.)?[^/*]+/);r=(t?t[0]:"").replace(/:[0-9]*$/,""),r!==e&&_.warn('uri: override host "'+e+'" with "'+r+'"')}return s&&s.substr(0,1)===i||(_.warn('uri: prefix path "'+s+'" with "/"'),s=i+s),{scheme:t,host:r,path:s}},In=(e,t)=>{let{scheme:n,host:r,path:s}=Mn(e);return n="http*"===n?"https?":Ge(n).replace(/\*/gi,"[^:/#?]*"), r=Ge(r).replace(/\*\\\./gi,"(*\\.)?").replace(/\*/gi,"[^#?/]*"),s=Ge(s).replace(/\*/gi,".*"),r=r.replace(new RegExp(Ge(_n)+"$"),kn),t?(n=n.toLowerCase(),r=r.toLowerCase()):(n=Cn(n),r=Cn(r)),r+="(:[0-9]{1,5})?","^"+n+Ge(Sn)+r+s+"$"},Un=["protocol","hostname","origin"],Gn=["port"],Zn=["pathname"],Tn=["search","hash"];let Bn;const On={protocol:"",scheme:"",origin:"",pathname:"",hostname:"",port:void 0,search:"",hash:""},Dn=(e,t)=>{let n=Object.assign({},On) ;if(null==e);else if(["data:","view-source:"].some((t=>e.startsWith(t)))){n.origin="null";const t=e.indexOf(":");n.protocol=e.substr(0,t+1),n.pathname=e.substr(t+1)}else{let r,s;try{r=new URL(e)}catch(t){try{const t="http:";s=Ve(),r=new URL(e||"/",`${t}//${s}/${s}`)}catch(e){s=void 0}}if(r){let{protocol:i,origin:o,pathname:a,hostname:c,port:l,search:u,hash:d,username:A,password:h}=r;if(s&&(i=o="",c===s&&(c=""),a=a.replace(`/${s}`,"")),n={protocol:i,origin:o,pathname:a,hostname:c, port:parseInt(l)||void 0,search:u,hash:d,username:A,password:h},!t&&i){if(0!==e.toLowerCase().indexOf(i))if(e.startsWith("//"))n.origin="",n.protocol="";else{if(!["/","?","#"].includes(e[0]))return Dn("/"+e);Bn=Bn||Dn("",!0),[...Tn,...Zn].forEach((e=>{Bn[e]===n[e]&&(n[e]="")})),Un.forEach((e=>{n[e]=""})),Gn.forEach((e=>{n[e]=void 0}))}["tampermonkey:"].includes(n.protocol)&&(n.pathname=((n.hostname?"/"+n.hostname:"")+(n.pathname||"")).replace(/^\/+/,"/"),n.hostname="")}}} return 0===n.port&&(n.port=void 0),Object.defineProperties(n,{domain:{get:function(){const e=n.hostname.split("."),t=e.pop();let r=`${e.pop()}.${t}`;return Nn(r)&&(r=`${e.pop()}.${r}`),r}},scheme:{get:function(){return n.protocol.replace(/:$/,"")}}}),n },jn=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,Ln=/((^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$)|(^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$))/ ;let Fn;const Pn=e=>{return!(!(t=e).match(jn)&&!t.match(Ln)&&e.includes("."));var t},Nn=e=>(Fn=Fn||new RegExp("^("+yn.replace(/\./g,"\\.")+")$"),!!e.match(Fn)),Vn=(e,t)=>{"string"==typeof t&&(t={base:t});const{base:n,schemes:r,enforce_path:s}=t||{};let i=!1;const o=zn(e);if(!o)return;s&&Hn(o,{nopath:!0})===e&&(e+="/");let a=e;return"tampermonkey:"==o.protocol?o.pathname.includes("..")?i=!0:a=L.getURL(e.replace(/^tampermonkey:\/\//,"")):o.protocol||n&&(a=qn(e,n,r||["http:","https:"]))||(i=!0), i?null:a},zn=e=>{if(null==e)return;let t=Rn.get(e);return t||(t=Dn(e),Rn.set(e,t),t)},qn=(e,t,n)=>{let r,s,i;if(e&&t&&(r=zn(e))&&(s="string"==typeof t?zn(t):t)&&s.protocol&&(!n||n.includes(s.protocol)||!e.includes(".."))){if(e.startsWith("//"))return s.protocol+"//"+r.hostname+(r.port?":"+r.port:"")+r.pathname+r.search;if("/"===e[0])i=r.pathname;else{if(t=Hn(s,{nosearch:!0,nofile:!0}),!(s=zn(t+("/"===t[t.length-1]?"":"/")+e)))return;i=s.pathname} return s.protocol+"//"+s.hostname+(s.port?":"+s.port:"")+i+r.search+r.hash}},Hn=(e,t)=>((t=t||{}).noprotocol?"":["about:"].includes(e.protocol)?e.protocol:e.protocol+"//")+(t.auth&&(e.username||e.password)?((e,t)=>{const n=e=>e.replace(/[^A-Za-z0-9-._~!$&'()*+,;=]/g,(e=>"%"+e.charCodeAt(0).toString(16).toUpperCase()));return n(e)+(t?":"+n(t):"")+"@" })(e.username||"",e.password)+"@":"")+e.hostname+(!t.noport&&e.port&&e.port>0?":"+e.port:"")+(t.nopath?"":t.nofile?e.pathname.replace(/\/[^/]*$/,"/"):e.pathname+(t.nosearch?"":e.search)),Qn=e=>{const t="string"==typeof e?zn(e):e;if(!t)throw new Error("invalid url");return Hn(t)},Wn=e=>{const t="string"==typeof e?zn(e):e;if(!t)throw new Error("invalid url");return Hn(t,{auth:!1}) },Xn=e=>Object.entries(e).map((([e,t])=>void 0===t?null:se(e)+"="+se(t))).filter((e=>e)).join("&"),Yn="mtm_visitor",Jn="default",Kn="pageview",$n="script_update",er="script",tr="cloud",nr="event",rr="pageview",sr="ping",ir="https://a.tampermonkey.net/matomo.php",or=Ce;let ar,cr,lr,ur=null;const dr=()=>({url:ir,siteId:4,tracker:{[Jn]:{enabled:kr(4,1)},[er]:{enabled:!0},[$n]:{enabled:kr(4,10)},[tr]:{enabled:kr(4,5e-4)}}}),Ar=()=>({url:ir,siteId:5,tracker:{[Jn]:{enabled:kr(5,10)},[er]:{enabled:!0}, [$n]:{enabled:kr(5,10)},[tr]:{enabled:kr(5,.001)}}}),hr=()=>({url:ir,siteId:6,tracker:{[Jn]:{enabled:kr(6,50)},[er]:{enabled:!0},[$n]:{enabled:kr(6,10)},[tr]:{enabled:kr(6,.01)}}}),pr=()=>({url:ir,siteId:7,tracker:{[Jn]:{enabled:!0},[er]:{enabled:!0},[$n]:{enabled:kr(7,10)},[tr]:{enabled:kr(7,.01)}}}),fr={default:Ar,gcal:Ar,iikm:dr,fcmf:dr,saap:pr,swgx:pr,fire:hr,firb:hr,dhdg:()=>({url:ir,siteId:3,tracker:{[Jn]:{enabled:kr(3,1)},[er]:{enabled:!0},[$n]:{enabled:kr(3,10)},[tr]:{enabled:kr(3,5e-4)} }}),mfdh:Ar,heif:()=>({url:"http://a.userscript.grobilan:8081/matomo.php",siteId:2,tracker:{[Jn]:{enabled:!0}}})};let mr;const gr=[{msg:"a disconnected port"},{msg:"Function.prototype.apply: Arguments list has wrong type",url:"event_bindings"},{msg:"Script error."}],vr=e=>[...Array(e)].map((()=>Math.floor(16*Math.random()).toString(16))).join(""),wr=e=>{if(!or)return;const t=[e.uuid,e.createTs,e.visitCount,e.currentVisitTs,e.lastVisitTs].join(".");or.setItem(Yn,t)},_r=e=>{ const t=e||Jn,n=mr.tracker[t]||mr.tracker[Jn];return n.enabled?{url:mr.url,siteId:mr.siteId,options:n}:null},br=vr(6),yr=async(e,t,n)=>{if(!e)return;const r=(()=>{if(!or)return;const e=or.getItem(Yn);if(!e)return;const t=e.split(".");if(t.length>=5){t.unshift("0");const[e,n,r,s,i,o]=t;return{createdNow:!1,newVisitor:e,uuid:n,createTs:r,visitCount:s,currentVisitTs:i,lastVisitTs:o}}})()||(()=>{const e=Math.floor(Date.now()/1e3).toString(),t={createdNow:!0,newVisitor:"1",uuid:vr(16),createTs:e, visitCount:"0",currentVisitTs:e,lastVisitTs:""};return wr(t),t})();let s;const i=new Date,o={idsite:e.siteId,rec:1,action_name:ke?ke.title:oe.href||j.short_id,url:oe.href,_id:r.uuid,rand:vr(4),apiv:1,h:i.getHours(),m:i.getMinutes(),s:i.getSeconds(),cookie:1,pv_id:br},a={...o,_idts:Number(r.createTs),_idvc:Number(r.visitCount),_viewts:Number(r.lastVisitTs),res:Re?`${Re.width}x${Re.height}`:"0x0"};if(t==rr){const e=cr?{gt_ms:cr}:{},t={...o,...a,...e,new_visit:1};wr((e=>{ const t=Math.floor(Date.now()/1e3).toString();return e.newVisitor="0",e.visitCount=(Number(e.visitCount)+1).toString(),e.lastVisitTs=e.currentVisitTs,e.currentVisitTs=t,e})(r)),s=t}else if(t==nr){if(!n)return;s={...o,ca:1,e_c:n.category,e_a:n.action,e_n:n.name,e_v:n.value}}else{if(t!=sr)return;s={...o,...a,ping:1}}s=Object.assign(o,s);const c=`${e.url}?${Xn(s)}`;if(ke){const e=ke.createElement("img");e.src=c,e.onload=()=>{var t;null===(t=e.parentNode)||void 0===t||t.removeChild(e)}, e.onerror=()=>{var t;null===(t=e.parentNode)||void 0===t||t.removeChild(e)},(ke.body||ke.head||ke.documentElement).appendChild(e)}else try{await ue(c)}catch(e){_.warn("stats:",e)}},kr=(e,t)=>{let n=100*Math.random()null===ur&&Rr?Rr.promise():R.Pledge(!!ur);let Er;const Cr=e=>{ur=e,Rr&&(Rr.resolve(ur),Rr=void 0),ur?Sr():lr&&(ee(lr),lr=void 0)},Sr=()=>{ar&&(yr(_r(Kn),rr),ar=!1),lr=ae((()=>yr(_r(Kn),sr)),864e5)},Mr=async(e,t,n)=>{if(!await xr())return;const r=`${e}${n?` <${n}> `:""}`;let s="",i=null;if("i"===t)s="Installed";else if("u"===t)s="Updated",i=_r($n);else if("m"===t)s="Revealed";else{if("r"!==t)return;s="Removed"}yr(i||_r(er),nr,{category:"Script",action:s,name:r})},Ir=async(e,t,n)=>{ if(!await xr())return;let r="",s="";"init"===t?(s="Initialized",r=e):"error"===t&&(s="Error",r=e+" -> "+n),yr(_r(tr),nr,{category:"Cloud",action:s,name:r})},Ur=async(e,t,n)=>{if(!await xr())return;void 0===n&&(t+=" "+oe.href,n="");let r=!1;for(const n of gr){if(!n.msg&&!n.url)return;n.msg&&-1==e.indexOf(n.msg)||n.url&&-1==t.indexOf(n.url)||(r=!0)}r||yr(_r("error"),nr,{category:"Error",action:e,name:t+":"+n})},Gr=async(e,t,n)=>{if(!await xr())return;let r="",s="";"clicked"===e?(s="Click", r=t+":"+n):"button"===e?(s="Button",r=t||"?"):"dialog"===e&&(s="Dialog"),yr(_r("begging"),nr,{category:"Begging",action:s,name:r})},Zr="en";let Tr={},Br={},Or=null;const Dr=[],jr=async e=>{const t=`_locales/${e}/messages.json`,n=await(e=>{let t;const n=L.getURL(e);return R((async({resolve:r})=>{try{if(Se){const s=new Se;Se.onlyasync?(s.open("GET",n),s.onload=()=>{r(s.responseText)},s.onerror=()=>{r()},s.send(null)):(s.open("GET",n,!1),s.send(null),t=s.responseText, t||_.warn("registry: content of "+e+" is null!"),r(t))}else r(await ue(n).then((e=>e.text())))}catch(e){_.log("getRaw:"+e),r()}})).promise()})(t);try{if(n)return JSON.parse(n)}catch(e){}_.warn("i18n: parsing locale "+e+" failed!")},Lr=async e=>{e=e.concat(Zr);let t=-1,n=null;const r=async()=>{if(t++,te?e.replace(/-/g,"_").split("_").map(((e,t)=>t?e.toUpperCase():e.toLowerCase())).join("_"):e,Pr=(e,t)=>{let n,r;return t=t||(Or?[Or,Or.split("_")[0]].concat(Dr).filter((e=>e)):Dr),Be(t,((t,s)=>{const i=Number(s);if(Be(e,((e,s)=>{const o=Number(s),a=Fr(e),c=a.split(/_/)[0];if(a==t)return r=o,!1;c==t&&(void 0===n||ie.value)),zr=!(void 0===Ot)&&Ot.native_support,qr={init:async()=>{const e=async()=>{Or||zr||(Or=await Lr(Dr))},t=Fr(zr?Ot.getUILanguage():navigator.language);if(t){const e=[t],n=t.split(/_/);n[0]!==t&&e.push(n[0]),e.forEach((e=>{Dr.unshift(e)}))}await e(),zr&&(await new Promise((e=>{ Ot.getAcceptLanguages((t=>{t.forEach((e=>{Dr.push(Fr(e))})),e()}))})),await e())},getMessage:(e,...t)=>{let n;return Or&&(n=Tr[e]||Br[e])?((e,t)=>{let n,r=e.message;return n=1==t.length&&Array.isArray(t[0])?t[0]:t,e.placeholders&&Object.entries(e.placeholders).forEach((([e,t])=>{try{const s=Number(t.content.replace(/^\$/,""))-1;let i;s{const n=[],r=e=>{for(let t=0;t{let n;const r=e[t];if(e){let s=e[t+"_i18n"]||{};r&&(s={en:r,...s});const i=Pr(Object.keys(s));void 0!==i&&(n=s[i])}return n||r},setLocale:async e=>{let t=e;if("null"===e&&(t=null),t&&(t=Fr(t)),!t&&zr)Or=t;else if(t!==Or)return Lr([t,...Dr,Or].filter((e=>e))).then((t=>{Or=t,Or!=e&&_.log("i18n: retrieving locale "+t+" failed!")})) },getLocale:()=>Or,getUiLocale:()=>Fr(Or||zr?Ot.getUILanguage():Dr[0]||navigator.language||Zr),getBestLocale:Pr,supported:Nr};let Hr;const Qr=["DOM","JavaScript","raw"],Wr={},Xr=e=>{const t=null==e?void 0:e.keys,n={keys:t,default:()=>[],set:(e,t)=>(e.push(t),e)};return(null==t?void 0:t.length)&&t.forEach((e=>Wr[e]=n)),n},Yr=e=>{const t=null==e?void 0:e.keys,n={keys:t,default:()=>null,set:(t,n,r)=>{const s=(null==e?void 0:e.convert)?e.convert(n,r):n;return null===t?s:t}} ;return(null==t?void 0:t.length)&&t.forEach((e=>Wr[e]=n)),n},Jr=e=>{const t=null==e?void 0:e.keys,n={default:()=>null,set:()=>!0};return(null==t?void 0:t.length)&&t.forEach((e=>Wr[e]=n)),n},Kr=e=>{const t=null==e?void 0:e.keys,n={keys:t,default:()=>({}),set:(t,n,r,s)=>{s=s?Fr(s):"default";const i=(null==e?void 0:e.convert)?e.convert(n,r):n;return t[s]=t[s]||i,t}};return(null==t?void 0:t.length)&&t.forEach((e=>Wr[e]=n)),n},$r={name:Kr({convert:e=>null==e?void 0:e.replace(/\s\s+/g," ")}), version:Yr({convert:e=>(null==e?void 0:e.replace(/\s/g,""))||e}),grants:Xr({keys:["grant"]}),icon:Yr({keys:["icon","iconURL","iconUrl","defaulticon"]}),icon64:Yr({keys:["icon64","iconURL64"]}),supportURL:Yr({keys:["supportURL","supportUrl"]}),fileURL:Yr(),downloadURL:Yr({keys:["downloadURL","downloadUrl"]}),updateURL:Yr({keys:["updateURL","updateUrl"]}),namespace:Yr({convert:e=>""===e?null:e}),author:Yr(),copyright:Yr(),homepage:Yr({ keys:["homepage","homepageURL","homepageUrl","website","source"]}),description:Kr(),includes:Xr({keys:["include"]}),excludes:Xr({keys:["exclude"]}),matches:Xr({keys:["match"]}),requires:Xr({keys:["require"]}),resources:(e=>{const t=null==e?void 0:e.keys,n={keys:t,default:()=>({}),set:(t,n,r)=>{const s=n.match(/^(\S*)\s+(.*)/);if(s&&void 0===t[s[1]]){const n=(null==e?void 0:e.convert)?e.convert(s[2],r):s[2];t[s[1]]=n}return t}};return(null==t?void 0:t.length)&&t.forEach((e=>Wr[e]=n)),n})({ keys:["resource"]}),sandbox:Yr({keys:["sandbox","inject-into"],convert:(e,t)=>null!==e&&"inject-into"===t?{auto:"DOM",content:"DOM",page:null}[e]||null:e}),tags:Xr({keys:["tag"]}),noframes:Jr(),unwrap:Jr(),connects:Xr({keys:["connect","connect-src","domain"]}),webRequest:Xr(),"run-at":Yr(),"run-in":Xr(),antifeatures:(e=>{const t=null==e?void 0:e.keys,n={keys:t,default:()=>({}),set:(t,n,r,s)=>{var i;s=s?Fr(s):"default";const o=n.match(/^(\S*)\s+(.*)/);if(o){ const n=t[i=o[1]]||(t[i]={}),a=(null==e?void 0:e.convert)?e.convert(o[2],r):o[2];n[s]=a}return t}};return(null==t?void 0:t.length)&&t.forEach((e=>Wr[e]=n)),n})({keys:["antifeature"]})},es={};Object.entries($r).forEach((([e,t])=>{t.keys?t.keys.forEach((t=>{es[t]=e})):es[e]=e}));const ts="==UserScript==",ns="==/UserScript==",rs=/(?:^|\n)\s*\/\/\x20*==UserScript==([\s\S]*?\n)\s*\/\/\x20*==\/UserScript==|$/,ss=()=>{const e={...Object.fromEntries(Object.keys($r).map((e=>[e,$r[e].default()])))} ;return{...e}},is=e=>{const t=e.match(rs),n=(t?t[1]:"")||"",r={};return n.replace(/(?:^|\n)\s*\/\/\s*(@\S+)(.*)/g,((e,t,n)=>{const[s,i]=t.slice(1).split(":"),o=es[s];let a;if(o&&(a=Wr[o]||$r[o]||void 0)){const e=n.trim();let t=r[o];void 0===t&&(t=a.default()),r[o]=a.set(t,e,s,i)}return""})),{...ss(),...r}},os=e=>{const{name:t,description:n,version:r,grants:s,tags:i,fileURL:o,requires:a,resources:c,webRequest:l,namespace:u,sandbox:d,noframes:A,unwrap:h,author:p,copyright:f,antifeatures:m}=e ;let{icon:g,icon64:v,updateURL:w,downloadURL:_,supportURL:b,homepage:y,includes:k,matches:R,excludes:x,connects:E}=e;const C=e["run-at"]||null,S=e["run-in"]||[],M=(e,{[e]:t,...n})=>n,I=s.includes("none")?["none"]:s.filter((e=>e)),U=d&&Qr.includes(d)?d:null;g=g||null,v=v||null,w=w||null,_=_||null,b=b||null,y=y||null;const G=t.default,Z=n.default||"",T=M("default",t),B=M("default",n);k=k.filter((e=>e)),R=R.filter((e=>e)),x=x.filter((e=>e)),E=E.filter((e=>e)) ;const O=Object.entries(c).map((([e,t])=>({name:e,url:t,loaded:!1}))).filter((e=>e.url)),D=a.filter((e=>e)).map((e=>({url:e,loaded:!1,textContent:""}))),j=l.length?l.map((e=>{const t=JSON.parse(e);return Array.isArray(t)?t:[t]})).reduce(((e,t)=>e.concat(t)),[]):null;return{name:G,description:Z,version:r||"0.0",grant:I,icon:g,icon64:v,supportURL:b,fileURL:o,downloadURL:_,updateURL:w,namespace:u,requires:D,includes:k,matches:R,excludes:x,homepage:y,resources:O,connects:E,webRequest:j,author:p, copyright:f,antifeatures:m,name_i18n:T,description_i18n:B,uuid:null,system:!1,enabled:!0,position:0,blockers:[],lastModified:0,sync:{},options:{check_for_updates:!0,user_modified:null,comment:null,compatopts_for_requires:!0,compat_wrappedjsobject:!1,compat_metadata:!1,compat_foreach:!1,compat_powerful_this:null,sandbox:U,noframes:A,unwrap:h,run_at:C,run_in:S,tags:i,override:{use_includes:[],orig_includes:[],merge_includes:!0,use_matches:[],orig_matches:[],merge_matches:!0,use_excludes:[], orig_excludes:[],merge_excludes:!0,use_connects:[],orig_connects:[],merge_connects:!0,use_blockers:[],orig_run_at:null,orig_run_in:[],orig_noframes:null,orig_tags:void 0}},textContent:null,header:null}},as=(()=>{const e=e=>{const t=e.split(".");return t.slice(0,3).concat([t.slice(3).join(".")]).concat([0,0,0,0]).slice(0,4).map((e=>{const t=e.toString().match(/((?:-?[0-9]+)?)([^0-9]*)((?:[0-9]+)?)(.*)/);return t?[Number(t[1]),t[2],Number(t[3]),t[4]]:[]})).reduce(((e,t)=>e.concat(t)))},t=(n,r)=>{ const s=Array.isArray(n)?n:e(n),i=Array.isArray(r)?r:e(r);for(let e=0;e<16;e++){const n=s[e],r=i[e];if(e%2==1){if(!n&&r)return t.eNEWER;if(n&&!r)return t.eOLDER;const e=n.match(/\w/g)||[],s=r.match(/\w/g)||[];for(let n=0;ns[n].charCodeAt(0))return t.eNEWER;if(e[n].charCodeAt(0)s.length)return t.eNEWER;if(e.lengthNumber(r))return t.eNEWER ;if(Number(n){const t=(e=>{const t=Ue(e,ts,ns);if(!t)return null;const n=e.indexOf(ts),r=e.indexOf("{ const t=(e=>is(e))(e=(e=(e=(e=(e||"").replace(/(\r\n|\n|\r)/gm,"\n")).replace(/\t/g," ")).replace(/\n\n+/g,"\n")).replace(/[^|\n][ \t]+\/\//g,"//"));if(t)return os(t)},us=()=>os(ss()),ds="try to take over the world!",As="This script was deleted from Greasy Fork, and due to its negative effects, it has been automatically removed from your browser.",hs={uso:new class{constructor(){ this.regexps=["https?://userscripts\\.org/scripts/(source|version)/([0-9]{1,9})\\.user\\.js","https?://userscripts-mirror\\.org/scripts/(source|version)/([0-9]{1,9})\\.user\\.js"],this.domains=["userscripts.org","userscripts-mirror.org"]}test(e){const t=this.regexps.reduce(((t,n)=>t||e.match(new RegExp(n))),null);if(t&&3==t.length)return{id:t[2],token:"uso",meta_url:!0,url:"http://userscripts-mirror.org/scripts/show/"+t[2],code_url:"http://userscripts-mirror.org/scripts/review/"+t[2], issue_url:"http://contactbyweb.com/userscripts-mirror"}}updates(e){return!1}},gf:new class{constructor(){this.regexps=["https?://greasyfork\\.org/(?:[^/]+/)?scripts/([^/-]+).*/code.*\\.user\\.js","https?://update.greasyfork\\.org/(?:[^/]+/)?scripts/([^/-]+).*/.*\\.user\\.js"],this.domains=["greasyfork.org","update.greasyfork.org"]}test(e){const t=this.regexps.reduce(((t,n)=>t||e.match(new RegExp(n))),null);if(t&&2==t.length){const e=t[1];return{id:e,token:"gf",meta_url:!0, url:"https://greasyfork.org/scripts/"+e,issue_url:"https://greasyfork.org/scripts/"+e+"/feedback",code_url:"https://greasyfork.org/scripts/"+e+"/code"}}}async converts(e){let t,n=e;if(n){const e=n.description.trim();e===ds?n.description="":e===As&&(n=null,t="deleted by hoster")}return{script:n,warning:t}}updates(e){ const t=new RegExp("https?://greasyfork\\.org/scripts/[^/]+/code/.*\\.user\\.js.*version=[0-9]+.*"),n=new RegExp("https?://update\\.greasyfork\\.org/scripts/[^/]+/[^/]+/[^/]+\\.user\\.js");return!e.match(n)&&!e.match(t)}},sf:new class{constructor(){this.regexps=["https?://sleazyfork\\.org/(?:[^/]+/)?scripts/([^/-]+).*/code.*\\.user\\.js","https?://update.sleazyfork\\.org/(?:[^/]+/)?scripts/([^/-]+).*/.*\\.user\\.js"],this.domains=["sleazyfork.org","update.sleazyfork.org"]}test(e){ const t=this.regexps.reduce(((t,n)=>t||e.match(new RegExp(n))),null);if(t&&2==t.length){const e=t[1];return{id:e,token:"sf",meta_url:!0,url:"https://sleazyfork.org/scripts/"+e,issue_url:"https://sleazyfork.org/scripts/"+e+"/feedback",code_url:"https://sleazyfork.org/scripts/"+e+"/code"}}}async converts(e){let t,n=e;if(n){const e=n.description.trim();e===ds?n.description="":e===As&&(n=null,t="deleted by hoster")}return{script:n,warning:t}}updates(e){ const t=new RegExp("https?://sleazyfork\\.org/scripts/([^/]+)/code/.*\\.user\\.js.*version=[0-9]+.*"),n=new RegExp("https?://update\\.sleazyfork\\.org/scripts/[^/]+/[^/]+/[^/]+\\.user\\.js");return!e.match(n)&&!e.match(t)}},ouj:new class{constructor(){this.regexps=["https?://openuserjs\\.org/install/([^/]+)+/(.+?)(?:\\.min)?\\.user\\.js"],this.domains=["openuserjs.org"]}test(e){const t=this.regexps.reduce(((t,n)=>t||e.match(new RegExp(n))),null);if(t&&3==t.length)return t.shift(),{ id:t.join("/"),token:"ouj",meta_header:!0,url:"https://openuserjs.org/scripts/"+t[0]+"/"+t[1],issue_url:"https://openuserjs.org/scripts/"+t[0]+"/"+t[1]+"/issues",code_url:"https://openuserjs.org/scripts/"+t[0]+"/"+t[1]+"/source"}}async converts(e){const t=e;return t&&t.description.trim()===ds&&(t.description=""),{script:t,warning:void 0}}updates(e){return!0}},gh:new class{constructor(){ this.regexps=["https?://raw\\.githubusercontent\\.com/([^/]+)/([^/]+)/[^/]+/(.*)\\.user\\.js","https?://github\\.com/([^/]+)/([^/]+)/raw/[^/]+/(.*)\\.user\\.js","https?://raw.github\\.com/([^/]+)/([^/]+)/[^/]+/(.*)\\.user\\.js","https?://github\\.com/([^/]+)/([^/]+)/releases/latest/download/(.*)\\.user\\.js","https?://github\\.com/([^/]+)/([^/]+)/releases/download/[^/]+/(.*)\\.user\\.js","https?://(([^\\.]+).github\\.io)/(.*)\\.user\\.js"], this.domains=["github.com","githubusercontent.com","github.io"]}test(e){let t;const n=this.regexps.slice(0,-1).reduce(((t,n)=>t||e.match(new RegExp(n))),null),r=this.regexps.slice(-1).reduce(((t,n)=>t||e.match(new RegExp(n))),null);if(n&&4==n.length||r&&4==r.length){let e;if(n){n.shift();const[r,s,i]=n;e=[r,s].join("/"),t=[r,s].concat(s==i?[]:i).join("/")}else{if(!r)throw new Error("Should never happen!");{r.shift();const[n,s,i]=r;e=[s,n].join("/"),t=[s,n].concat(n==i?[]:i).join("/")}}return{ id:t,token:"gh",url:"https://github.com/"+e,issue_url:"https://github.com/"+e+"/issues"}}}updates(e){return!0}},gst:new class{constructor(){this.regexps=["https?://gist\\.github\\.com/([^/]+)/([^/]+)/raw/(.*/)?.*\\.user\\.js","https?://gist\\.githubusercontent\\.com/([^/]+)/([^/]+)/raw/(.*/)?.*\\.user\\.js"],this.domains=["gist.github.com","gist.githubusercontent.com"]}test(e){const t=this.regexps.reduce(((t,n)=>t||e.match(new RegExp(n))),null);if(t&&4==t.length){ const e=t[1],n=t[2],r=`${e}/${n}`;if(n&&r)return{id:r,token:"gst",url:`https://gist.github.com/${r}`,issue_url:`https://gist.github.com/${r}#new_comment_field`,code_url:`https://gist.github.com/${r}`}}}updates(e){const t=this.regexps.reduce(((t,n)=>t||e.match(new RegExp(n))),null);return!(!t||null!=t[3])}},gl:new class{constructor(){this.regexps=["https?://gitlab\\.com/([^/]+)(?:/([^/]+))?/([^/-]{1,1}[^/]+)/?(?:-/)?(snippets/[^/]+/)?(raw|wikis)/(?:[^/]+/)?(.*?)\\.user\\.js"], this.domains=["gitlab.com"]}test(e){const t=this.regexps.reduce(((t,n)=>t||e.match(new RegExp(n))),null);if(t&&7==t.length){const[,e,n,r,,,s]=t,i=[e].concat([n,r].filter((e=>e))).join("/");return{id:[i].concat(r==s?[]:s).join("/"),token:"gl",url:"https://gitlab.com/"+i,issue_url:"https://gitlab.com/"+i+"/issues"}}}updates(e){return!0}},bb:new class{constructor(){ this.regexps=["https?://bitbucket\\.org/([^/]+)/([^/]+)/raw/[^/]+/(.*)\\.user\\.js","https?://bitbucket\\.org/([^/]+)/([^/]+)/downloads/(.*)\\.user\\.js"],this.domains=["bitbucket.org"]}test(e){const t=this.regexps.reduce(((t,n)=>t||e.match(new RegExp(n))),null);if(t&&4==t.length){t.shift();const[e,n,r]=t,s=[e,n].concat(n==r?[]:r).join("/"),i=[e,n].join("/");return{id:s,token:"bb",url:"https://bitbucket.org/"+i,issue_url:"https://bitbucket.org/"+i+"/issues"}}}updates(e){return!0}}, usty:new class{constructor(){this.regexps=["https?://userstyles\\.org/styles/userjs/([^/]+)/.*\\.user\\.js"],this.domains=["userstyles.org"]}test(e){const t=this.regexps.reduce(((t,n)=>t||e.match(new RegExp(n))),null);if(t&&2==t.length)return t.shift(),{id:t[0],token:"usty",url:"https://userstyles.org/styles/"+t[0],issue_url:"https://forum.userstyles.org/post/discussion?Discussion/StyleID="+t[0]}}async converts(e){let t,n,r,s;const i=[{tag:"includes", re:/(?: \|\| \(new RegExp\("\^)([^$]+)(?:\$"\)\)\.test\(document\.location\.href\))/g,idx:1,value:e=>"/^"+e.replace(/\\\\(.)/g,"\\$1")+"$/"},{tag:"includes",re:/(?: \|\| \(document\.location\.href\.indexOf\(")([^"]+)"(?:\) == 0\))/g,idx:1,value:e=>e+"*"},{tag:"matches",re:/(?: \|\| \(document\.domain == ")([^"]+)"(?: \|\| document\.domain\.substring\(document\.domain\.indexOf\("[^"]+"\) \+ 1\) == "[^"]+"\))/g,idx:1,value:e=>"*."+e }],o=new RegExp("(?:if \\(false)("+i.map((e=>"(?:"+e.re.source+")")).join("|")+")+","g");return e.textContent&&0===e.includes.length&&0===e.matches.length&&0===e.excludes.length&&e.options&&e.options.override&&e.options.override.orig_includes&&0===e.options.override.orig_includes.length&&e.options.override.orig_matches&&0===e.options.override.orig_matches.length&&(n=e.textContent.match(o))&&(n.forEach((t=>{i.forEach((n=>{for(;r=n.re.exec(t);)if(r.length>n.idx){const t=n.value(r[n.idx]) ;e.options.override["orig_"+n.tag].push(t),e[n.tag].push(t),s=!0}}))})),s&&(t="includes added")),0===e.grant.length&&(e.grant.push("GM_addStyle"),t="includes added"),{script:e,info:t}}updates(e){return!0}},web:new class{constructor(){this.regexps=["https://static\\.iitc\\.me/build/release/(plugins/)?(.*)\\.user\\.js","https://iitc\\.app/build/release/(plugins/)?(.*)\\.user\\.js","https?://socialfixer\\.com/socialfixer\\.user\\.js","https?://www\\.fbpurity\\.com/.*\\.user\\.js"], this.domains=["static.iitc.me","iitc.app","socialfixer.com","fbpurity.com"]}test(e){const[t,n,r,s]=this.regexps,i=e.match(new RegExp(t));if(i&&3===i.length){i.shift();const[e,t]=i,n="iitc-project/ingress-intel-total-conversion";return{id:[n].concat(e?[e,t]:[]).join("/").replace(/\/\//g,"/"),token:"gh",url:"https://github.com/"+n,issue_url:"https://github.com/"+n+"/issues"}}const o=e.match(new RegExp(n));if(o&&3===o.length){o.shift();const[e,t]=o,n="IITC-CE/ingress-intel-total-conversion";return{ id:[n].concat(e?[e,t]:[]).join("/").replace(/\/\//g,"/"),token:"gh",url:"https://github.com/"+n,issue_url:"https://github.com/"+n+"/issues"}}return e.match(new RegExp(r))?{id:"socialfixer",token:"web",url:"http://socialfixer.com",issue_url:"https://www.facebook.com/groups/SocialFixerUsersSupport/"}:e.match(new RegExp(s))?{id:"fbpurity",token:"web",url:"https://www.fbpurity.com/",issue_url:"https://www.facebook.com/fluffbustingpurity"}:void 0}updates(e){return!0}}},ps=e=>{ if(e)for(const t of Object.values(hs)){const n=t.test(e);if(n)return n}},fs=[],ms=[{name:qr.getMessage("Default"),layout:"default",value:"default"},{name:qr.getMessage("Default_Light"),layout:"default",theme:"light",value:"default#light"},{name:qr.getMessage("Default_Dark"),layout:"default",theme:"dark",value:"default#dark"},{name:qr.getMessage("Default_Darker"),layout:"default",theme:"darker", footer:'Theme by narcolepticinsomniac from the Stylus project.',value:"default#darker"}],gs={default:qr.getMessage("Default"),monokai:"Monokai",solarized:"Solarized","mdn-like":"MDN-like",eclipse:"Eclipse",railscasts:"RailsCasts",zenburn:"ZenBurn"},vs={ unknown:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9wKDBcWHLi+jYAAACAASURBVHja7X13nBRV9v15r6p7egIgElUkioCCIqBgxEVEBRMyiJJBUbKAuKvwVUQJKoqooCAGoiKiElVkBRPq7sqKGUHSkNOQplOFd39/vNDVQxB/MiO49n5mB3uqq6vq3ff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i4xMjVWMjRIMHYtNy44NzV6Ii8+PHBhdGggZmlsbD0iIzM0OThEQiIgbWFzaz0idXJsKCNiKSIgZD0iTTI0IDkuNTYzdjE0LjYyNEgxMi43NVY5LjU2M3oiLz48L2c+PC9zdmc+" },ws=e=>vs["gst"==e?"gh":e]||vs.unknown,_s=e=>"data:image/svg+xml,"+encodeURI({ tampermonkey:"", monkey:"\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n", webdav:"", yandex:"", firefox:"", chrome:"", onedrive:"Artboard 1", gdrive:"", dropbox:"", instagram:"", facebook:"", edge:'\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n', android:'\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n', safari:'\n', apple:'\n\n' }[e]).replace(/#|%20|%0A/g,(e=>"#"==e?"%23":" "));var bs;!function(e){e[e.OBJ_URL=1]="OBJ_URL",e[e.BLOB=2]="BLOB",e[e.BINARY=4]="BINARY",e[e.DATA_URI=8]="DATA_URI"}(bs||(bs={}));const ys=0+bs.BINARY+bs.DATA_URI,ks=e=>void 0!==e.objUrl,Rs=e=>void 0!==e.blob,xs=e=>void 0!==e.dataUri,Es=e=>void 0!==e.binary;class Cs{constructor(e,t){if(ks(e)){this.objUrl=e.objUrl.url,this.type=e.objUrl.type;const t=e.objUrl.revoke;t&&(Cs.objUrlDisposers[this.objUrl]=t) }else if(Rs(e))this.blob=e.blob;else if(xs(e))this.dataUri=e.dataUri;else{if(!Es(e))throw new Error("incompatible TransferableData");this.binary=e.binary,this.type=e.type}this.kinds=t||ys}async dispose(){if(this.objUrl){const e=Cs.objUrlDisposers,t=e[this.objUrl];t?(delete e[this.objUrl],await t()):console.error(`Unable to revoke object URL ${this.objUrl} in service worker`)}}async toTransferableData(){if(this.kinds&bs.OBJ_URL){ if(!this.objUrl&&(!this.blob&&this.dataUri&&(this.blob=nt(this.dataUri)),this.blob&&(this.objUrl=URL.createObjectURL(this.blob)),!this.objUrl))throw new Error("incomplete Transferable");return{objUrl:{url:this.objUrl,type:this.type}}}if(this.kinds&bs.BLOB){if(!this.blob&&(this.objUrl?this.blob=await ue(this.objUrl).then((e=>e.blob())):this.dataUri&&(this.blob=nt(this.dataUri)),!this.blob))throw new Error("incomplete Transferable");return{blob:this.blob}}if(this.kinds&bs.BINARY){ if(void 0===this.binary){let e=this.blob;if(!e&&this.objUrl&&(e=await ue(this.objUrl).then((e=>e.blob()))),e&&(this.binary=await st(e),this.type=this.type||e.type),void 0===this.binary)throw new Error("incomplete Transferable")}return{binary:this.binary,type:this.type||"application/octet-stream"}}if(this.kinds&bs.DATA_URI){if(!this.dataUri){let e=this.blob;if(!e&&this.objUrl&&(e=await ue(this.objUrl).then((e=>e.blob()))),e&&(this.dataUri=await rt(e)), !this.dataUri)throw new Error("incomplete Transferable")}return{dataUri:this.dataUri}}throw new Error("incompatible Transferable")}get tryObjectUrl(){return this.objUrl}get tryBlob(){return this.blob}get tryDataUri(){return this.dataUri}get tryBinary(){return this.binary}async toBlob(){if(this.blob)return this.blob;if(!this.objUrl){if(this.dataUri)return nt(this.dataUri);if(this.binary)return new Blob([$e(this.binary)],{type:this.type||"application/octet-stream"}) ;throw new Error("incompatible Transferable")}try{return await(await ue(this.objUrl)).blob()}catch(e){return}}async toDataUri(){if(this.dataUri)return this.dataUri;{const e=await this.toBlob();if(!e)throw new Error("incompatible Transferable");return await rt(e)}}async toObjectUrl(){if(this.objUrl)return this.objUrl}static fromTransferableData(e){return e&&(Rs(e)||ks(e)||xs(e)||Es(e))?new Cs(e):void 0}}Cs.objUrlDisposers={};const Ss=W({timeout:10800,check_interval:300,retimeout_on_get:!0 }),Ms=Q({threads:5}),Is={},Us=async(e,t)=>{let n,r;const s=Is[e];if(s)return await s;const i=Ms.add((async()=>(r=Ss.get(e),r&&(n=await r.toBlob()),n||(n=await Gs(e)),n?r||(r=new Cs({blob:n}),Ss.set(e,r)):!r&&t&&(r=new Cs({dataUri:"data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="},bs.DATA_URI),Ss.set(e,r)),delete Is[e],r)));return Is[e]=i,await i},Gs=async e=>{try{const t=await ue(e);if(t.ok&&200===t.status)return await t.blob()}catch(e){}};class Zs{ constructor(e){this.prefix=e}supported(){return R.Pledge(!!Ct.session.supported)}keys(){return R((async({resolve:e})=>{const t=await Ct.session.get(null),n=Object.values(t).filter((e=>e.startsWith(this.prefix)));e(n)})).promise()}list(){return R((async({resolve:e})=>{const t=await Ct.session.get(null),n=Object.entries(t).filter((([e,t])=>e.startsWith(this.prefix))).map((([e,t])=>({key:e.substr(this.prefix.length),value:t})));e(n)})).promise()}set(e,t){return R((async({resolve:n})=>{ await Ct.session.set({[`${this.prefix}${e}`]:t}),n()})).promise()}get(e){return R((async({resolve:t})=>{const n=`${this.prefix}${e}`;t((await Ct.session.get(n))[n]||null)})).promise()}delete(e){return R((async({resolve:t})=>{await Ct.session.remove(`${this.prefix}${e}`),t()})).promise()}clear(){return R((async({resolve:e})=>{const t=await this.list().then((e=>e.map((e=>`${this.prefix}${e.key}`))));await Ct.session.remove(t),e()})).promise()}}const{STORAGE:{STATE_DB:Ts}}=G,Bs=[{ type:"storage.session",storage:(e,t)=>new Zs(`${e}.${t}.`)},{type:"indexedDB",storage:(e,t)=>new Qe(e,t)},{type:"storage.local",storage:(e,t)=>new Pt(`${Ts}.${e}.${t}.`)},{type:"memory",storage:(e,t)=>new He(`${e}.${t}.`)}],Os={};class Ds{constructor(e){this.dbName=e}init(){if(!this.storage_promise){let e=0;this.storage_promise=R((({resolve:t})=>{const n=()=>{if(e>=Bs.length)throw new Error("No supported storage found.");const{type:r,storage:s}=Bs[e++],i=s(this.dbName,"stateStorage") ;i.supported().then((e=>{if(!e)return n();"memory"===r&&console.warn("InMemoryStorage is not persistent!"),this.storage_type=r,t(i)}))};n()})).promise()}return this.storage_promise}keys(){return this.init().then((e=>e.keys()))}list(){return this.init().then((e=>e.list()))}set(e,t){return this.init().then((n=>n.set(e,t)))}get(e){return this.init().then((t=>t.get(e)))}delete(e){return this.init().then((t=>t.delete(e)))}clear(){return this.init().then((e=>e.clear()))}type(){ return this.init().then((()=>{if(!this.storage_type)throw new Error("internal error");return this.storage_type}))}}const js=e=>{let t=Os[e];return t||(t=Os[e]=new Ds(e)),t},Ls={},Fs=[],Ps=js("notify"),Ns=new it(1);Ns.acquire().then((async()=>{for(const{key:e,value:t}of await Ps.list())Ls[e]={cbs:[],o:t}})).always((()=>Ns.release()));const Vs=async e=>{Ls[e]&&(delete Ls[e],await Ps.delete(e))},zs=async(e,t)=>{_.log("notify: click",e);const n=Ls[e];if(n){ce((()=>Vs(e)),1e3);const r={...n.o,id:e} ;await f.all(n.cbs.map((async e=>{await e({clicked:t,notification:r})})));for(const e of Fs)await e({clicked:t,notification:r})}else _.log("notify: click, notification not found",e)},qs=async e=>{_.log("notify: close",e);const t=Ls[e];if(t){const n={...t.o,id:e};await Vs(e),t.cbs.forEach((e=>e({notification:n})));for(const e of Fs)e({notification:n})}else _.log("notify: close, notification not found",e)},Hs=(()=>{let e,t=null;const n=()=>{if(e)return e;const n=R(),r=e=>{t=e||"unknown", _.log("notify: chronos level",e),n.resolve()};return Zt.supported?(Zt.getPermissionLevel(r),Zt.onPermissionLevelChanged.addListener(r),Zt.onClicked.addListener((e=>zs(e,!0))),Zt.onClosed.addListener((e=>qs(e)))):r("unsupported"),e=n.promise()};return n(),{cancel:e=>new f((t=>{Zt.supported?Zt.clear(e,(()=>{gt.lastError?t(!1):(qs(e),t(!0))})):t(!1)})),create:(e,r,s,i,o)=>n().then((async()=>{const n=R();let a=10;const c=async()=>{if(t)if("granted"==t){const{silent:t}=o,a={type:"basic",title:s||"", message:i||""},c=()=>new f((t=>{Zt.supported?Zt.create(e,a,(()=>{gt.lastError?t(!1):(_.log("notify: chronos created",e),t(!0))})):t(!1)}));S()>=70&&void 0!==t&&(a.silent=t),S()>=50&&(a.requireInteraction=!0);const l=Ls[e];l&&(_.log("notify: chronos notification already exists",e),await f.all([Hs.cancel(e),Vs(e)])),a.iconUrl=r;let u=await c();if(u||(_.log("notify: chronos creating failed, retry...",gt.lastError), a.iconUrl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==",u=await c()),!u)return _.log("notify: chronos creating finally failed",gt.lastError),void n.reject();l&&(Ls[e]=l),n.resolve({type:"chronos",id:e})}else n.resolve();else{const e=()=>{t?c():a--?ce(e,200):n.resolve()};e()}};return c(),n.promise()}))}})(),Qs=(()=>{const e={};let t,n=null;const r=ve,s={cancel:t=>e[t]?(e[t].close(),delete e[t],qs(t),f.resolve(!0)):f.resolve(!1),create:(s,i,o,a,c)=>{ return(t||(l=r?r.permission:"unsupported",n=l||"unknown",_.log("notify: notification level",l),t=R.Pledge())).then((async()=>{const t=R(),l=async()=>{if("granted"==n||"default"==n){const{silent:n}=c,l={body:a||"",icon:i};S()>=43&&void 0!==n&&(l.silent=n),l.requireInteraction=!0;const u=e[s];Ls[s]&&(_.log("notify: notification already exists",s),delete e[s],u&&u.close());const d=new r(o||"",l);d.onclick=()=>{_.log("notify: notification click",s);const t=e[s];t&&t.onClick.forEach((e=>e(s,!0)))}, d.onclose=d.onerror=t=>{_.log("notify: notification close",s,t);const n=e[s];n&&n.onClose.forEach((e=>e(s)))},e[s]={close:()=>d.close(),onClose:(u?u.onClose:[]).concat([qs]),onClick:(u?u.onClick:[]).concat([zs])},t.resolve({type:"native",id:s})}else if("denied"==n)t.resolve();else if("unsupported"==n)t.resolve();else{const e=e=>{n="granted"==e?"granted":"denied",l()};r.requestPermission().then(e)}};return l(),t.promise()}));var l}};return s})(),Ws=(()=>{const e={};return{ cancel:t=>e[t]?(e[t].close(),delete e[t],qs(t),f.resolve(!0)):f.resolve(!1),create:(t,n,r,s)=>{if(xe){const i=e[t];Ls[t]&&(_.log("notify: notification already exists",t),delete e[t],i&&i.close());try{const o=xe.createNotification(n,r||"",s||"");return o.onclick=()=>{_.log("notify: webkit click",t);const n=e[t];n&&n.onClick.forEach((e=>e(t,!0)))},o.onclose=()=>{_.log("notify: webkit close",t);const n=e[t];n&&n.onClose.forEach((e=>e(t)))},e[t]={close:()=>o.cancel(), onClose:(i?i.onClose:[]).concat([qs]),onClick:(i?i.onClick:[]).concat([zs])},o.show(),R.Pledge({type:"webkit",id:t})}catch(e){_.warn("notify: webkitNotifications creation failed with: "+e.message)}}return R.Pledge()}}})(),Xs=(()=>{const e=ye,t={};return{cancel:e=>t[e]?(t[e](),delete t[e],qs(e),f.resolve(!0)):f.resolve(!1),create:(t,n,r,s,i)=>{const{informational:o}=i,a=R();return!e||o?(a.resolve(),ce((()=>{qs(t)}),1)):(a.resolve({type:"conf",id:t}),ce((()=>{const n=e((r?r+"\n\n":"")+s) ;zs(t,!!n),ce((()=>qs(t)),1)}),1)),a.promise()}}})(),Ys=(e,t,n,r,s,i)=>{s=s||{};const{timeout:o}=s;let a;const c=o;let l,u=!1,d=null;const A=e=>{switch(e){case"webkit":return Ws;case"native":return Qs;case"chronos":return Hs;case"conf":return Xs}},h=()=>{d&&te(d),!u&&i&&i({})},p=()=>{if(u=!0,i&&i({clicked:u}),a){const e=A(a.type);e&&e.cancel(a.id)}};return r=r||mt.getURL("images/icon128.png"), Us(r,!1).then((e=>null==e?void 0:e.toDataUri())).then((e=>l=e||r)).then((()=>Ns.acquire())).then((()=>Hs.create(e,l,t,n,s))).then((r=>r||Ws.create(e,l,t,n,s))).then((r=>r||Qs.create(e,l,t,n,s))).then((r=>r||Xs.create(e,l,t,n,{informational:!i,notificationId:e}))).then((e=>{if(!e)return;const{id:i,type:o}=a=e,l=Ls[i]=Ls[i]||((e,t)=>{const n=Ls[e]={cbs:[],o:t};return Ps.set(e,t),n})(i,s);l.cbs.push((e=>{"clicked"in e&&p&&p(),h&&h()})),d=ce((()=>{d=null;const e=A(o);e&&e.cancel(i)}),c||6e5), _.log("notify:",t,n,r,c)})).always((()=>Ns.release())),{cancel:()=>{if(a){const e=A(a.type);e&&e.cancel(a.id)}}}},Js=(e,t,n,r,s)=>Ys(r.notificationId||Ve(),e,t,n,r,s),Ks=new qe,$s={};Ks.on("added",(e=>{$s[e.id]=e})),Ks.on("removed",(e=>{delete $s[e.id]}));const ei=e=>Object.values($s).filter((t=>{let n=!0,r=!0;const s=t.extpage;return"popup"==e.type?n="action"===s:"tab"==e.type&&(n=!(!s||"action"===s)),e.url&&(r=t.url.startsWith(e.url)),n&&r})),ti={},ni={},ri=(e,t)=>{let n ;const r=t.key||"general",s=t.timeout;let i,o;s&&(i=ce((()=>{delete e[r]}),s),o=Date.now()+s),(n=e[r])&&n.to&&te(n.to),e[r]={options:t,...s?{ts:o,to:i}:{}}},si=e=>{const t=Date.now();return Object.keys(e).map((n=>{const r=e[n],s=r.options;let i;if(!r.ts||(i=Math.max(0,r.ts-t)))return s.timeout=i,s})).filter((e=>e))},ii={all:(e,t)=>{ii.actionPage(e,t),ii.optionsPage(e,t)},removeAll:e=>{delete ti[e],delete ni[e]},actionPage:(e,t)=>{const n=ei({type:"popup"}) ;if(n&&n.length&&("status"==e||"update"==e)){const n={method:e,options:t,realm:"actions"};mt.sendMessage(n,(()=>{}))}t&&ri(ni,t)},optionsPage:(e,t)=>{const n=ei({type:"tab"});if(n&&n.length&&"status"==e){const n={method:e,options:t,realm:"options"};mt.sendMessage(n,(()=>{}))}t&&ri(ti,t)},actionStatus:()=>si(ni),optionsStatus:()=>si(ti)},oi=ii;let ai;const ci={newV:mt.manifest.version,oldV:void 0,first_run:!1,active:!1},li=()=>{if(!k.late)return void k.registerLateCallback(li) ;let e,t="version="+ci.newV+"&ext="+gt.short_id+"&updated=true";if(ci.first_run?(e="https://www.tampermonkey.net/installed.php?"+t,ci.active=!0):(t+="&old="+ci.oldV,e="https://www.tampermonkey.net/changelog.php?"+t),"off"==wn.values.notification_showUpdate);else if("notification"==wn.values.notification_showUpdate)n=qr.getMessage("Updated_to__0version0",ci.newV),r=qr.getMessage("Click_here_to_see_the_recent_changes"),s=_s("tampermonkey"),i=t=>{if(t.clicked){const t={url:e};vt.create(t,(()=>{}))} },Ys(Ve(),n,r,s,{timeout:3e5},i);else if("changelog"==wn.values.notification_showUpdate){ci.active||(e+="&intr=true"),ci.active=!0;const t={url:e,active:ci.active};vt.create(t,(()=>{}))}var n,r,s,i},ui=(()=>{const e=R(),t=()=>{const t=Date.now(),n=nn.getValue(G.STORAGE.LAST_START,0),r=Math.round((t-n)/1e3),s=r<=60;_.log("upd: restart?",s,"(",r,"seconds ago)"),e.resolve(s)};return k.late?t():k.registerLateCallback(t),e.promise()})(),di=()=>{let e=!1,t=!1;(()=>{let e,t;const n=R(),r=()=>{ t&&(t=void 0,n.resolve(!!e))};return t=ce(r,300),Dt(15,(t=>{e="active"==t,r()})),n.promise()})().then((e=>(t=e,ui))).then((t=>{e=t})).always((()=>{ci.active=!t||e,li(),fi=!0}))};let Ai=!1;const hi="extentsion_update_available";let pi,fi;const mi={scheduleNotification:(e,t)=>{fi||(ci.oldV=e||void 0,ci.first_run||(ci.first_run=t),pi&&te(pi),pi=ce(di,1e3))},updateAvailable:()=>ai,onInstalled:()=>{mi.scheduleNotification(void 0,!0)},onUpdated:e=>{mi.scheduleNotification(e,!1)},onUpdateAvailable:e=>{ Ai||(_.info("An update to version",e.version,"is available"),ai=e.version,oi.all("status",{key:hi,id:hi,class:"information",text:qr.getMessage("0name0_0version0_is_available__Please_re_start_your_browser_to_update_",mt.manifest.name,e.version),timeout:864e5}),Ai=!0)}};k.registerLateCallback((()=>{nn.setValue(G.STORAGE.LAST_START,Date.now())}));const gi=mi,vi=new qe,wi=new qe,_i=new qe,bi=new qe;let yi={},ki=null;const Ri=()=>{const e=Date.now(),t={},n=Object.keys(yi);n.forEach((n=>{const r=yi[n] ;r?e-r.ts{r.com.reject({error:"timeout",please_close:!0})}),1),xi(n)):_.error("cleanup: e is undefined",n)})),yi=t,null!==ki&&0===n.length&&(ee(ki),ki=null)},xi=e=>{const t=yi[e];if(t){delete yi[e];const n=t.preparat;if((e=>{const t=e;return void 0!==t.script&&"tfd"in t.script})(n)){const{script:e,oldscript:t}=n;new Cs(e.tfd).dispose(),t&&new Cs(t.tfd).dispose()}}},Ei=15e3;let Ci=!1;const Si=(e,t)=>{Ci||Mi.init(),null===ki&&(ki=ae(Ri,5e3));const n=R();return((e,t)=>{ const n=R();return void 0===t&&(t=!0),vt.getSelected(null,(r=>{const s=r?r.index+1:void 0;vt.create({url:mt.getURL("ask.html")+"?aid="+e,active:t,index:s,parent:r},(e=>{if(!e){const e="tabs.create failed -> giving up now!";return _.error(e),void n.reject({error:e})}n.resolve({id:e.id,close:()=>vt.remove(e.id)})}))})),n.promise()})((e=>{const t=Ve();return yi[t]=e,t})({ts:Date.now(),com:n,preparat:t,type:e}),t.active).then((e=>n.promise().done((t=>{(t.ok||t.aborted)&&e.close()}))))},Mi={ init:()=>{Ci||(Ci=!0)},onMessage:e=>{const t=R(),n=e.aid,r=yi[n];if(r){if(r.aborter&&(te(r.aborter),delete r.aborter),"ping"==e.method)yi[n].ts=Date.now(),t.resolve({pong:!0});else if("preparat"==e.method)t.resolve({preparat:r.preparat,type:r.type});else if("install"==e.method){const s=e.message;r.com.resolve({ok:!0,message:s||{}}),t.resolve({}),xi(n)}else if("import"==e.method){const s=e.message;r.com.resolve({ok:!0,message:s}),t.resolve({}),xi(n)}else if("permission"==e.method){ const s=e.message;r.com.resolve({ok:!0,message:s}),t.resolve({}),xi(n)}else if("unload"==e.method||"abort"==e.method){const s=e.message;t.resolve({});const i=()=>{r.com.resolve({ok:!1,aborted:!0,message:s||{}}),xi(n)};"abort"==e.method?i():r.aborter=ce(i,3e3)}else if("connect"==e.method){const s=e.message;r.com.resolve({ok:!0,message:s}),t.resolve({}),xi(n)}}else t.reject({error:"unknown_id",please_close:!0});return t.promise()},install:e=>Si("install",e),import:e=>Si("import",e), askForPermission:(e,t,n)=>{const r={permissions:e.permissions,origins:e.origins,title:t,message:n};return Si("permission",r)},installError:e=>Si("install_error",e),askForConnect:e=>Si("connect",e)},Ii=Mi;let Ui,Gi,Zi;const Ti=()=>Ui||R.Pledge(),Bi=e=>{Bt.supported&&(Bt.onAdded.addListener((t=>{e({added:t})})),Bt.onRemoved.addListener((t=>{e({removed:t})})))},Oi=()=>{const e=R(),t=Gi={},n=Zi={};return Ui=e.promise(),Bt.supported?Bt.getAll((r=>{ r.permissions&&Object.values(r.permissions).forEach((e=>t[e]=!0)),r.origins&&Object.values(r.origins).forEach((e=>n[e]=!0)),Ui=void 0,e.resolve()})):e.resolve(),e.promise()},Di=an("runtime_host_permissions","denied");let ji;const Li=()=>R((({resolve:e})=>{if(void 0!==ji)e(ji);else{if(Bt.supported)return(0,Fi.hasOrigin)("*://*/*").then((t=>{ji=t,e(ji)}),(()=>{ji=!0,e(ji)}));ji=!0,e(ji)}})).promise();Bi((()=>{ji=void 0}));const Fi={permDownloads:"downloads", has:e=>Ti().then((()=>!Bt.supported||(Gi&&Zi?!!Gi[e]||!!Zi[e]:(Bi((()=>{Ti().then((()=>Oi()))})),Oi().then((()=>Fi.has(e))))))),hasOrigin:e=>{const t=Fe(e);return Ti().then((()=>{const e=R();return Bt.supported?Bt.contains({origins:t},(t=>{e.resolve(t)})):e.resolve(!0),e.promise()}))},ask:(e,t,n)=>{const r=Fe(e),s=R();return Bt.supported?Ii.askForPermission({permissions:r},t,n).done((({message:e})=>{const t=!!(null==e?void 0:e.granted);if(t){Gi||(Gi={});for(const e of r)Gi[e]=!0}s.resolve(t) })):s.resolve(!1),s.promise()},askOrigin:(e,t,n)=>{const r=Fe(e),s=R();return Bt.supported?Ii.askForPermission({origins:r},t,n).done((({message:e})=>{const t=!!(null==e?void 0:e.granted);if(t){Zi||(Zi={});for(const e of r)Zi[e]=!0}s.resolve(t)})):s.resolve(!1),s.promise()},remove:e=>Ti().then((()=>{const t=R();return Bt.supported?(Ui=t.promise(),Bt.remove({permissions:[e]},(n=>{Ui=void 0,Gi&&(Gi[e]=!1),t.resolve(n)}))):t.resolve(!0),t.promise()})),addListener:Bi},Pi=Fi,Ni={} ;at.on("xhr",(function(e){let t,n;void 0!==(t=e.id)&&void 0!==(n=Ni[t])&&n.handle(e)&&delete Ni[t]}));class Vi{constructor(e){this.readyState=Vi.UNSENT,this.status=0,this.statusText="",this.responseType="",this.async=!0,this.timeout=-1,this.canceled=!1,this.loaded=0,this.headers={},this.onreadystatechange=null,this.onredirect=null,this.onopen=null,this.onload=null,this.onloadstart=null,this.onprogress=null,this.onabort=null,this.onerror=null,this.ontimeout=null,this.upload={onprogress:null, loaded:0,total:void 0},this.open=function(e,t,n=!0,r,s){if(this.method=e,this.url=t,this.async=n,this.user=r,this.password=s,this.responseURL=t,!this.async)throw new Error("Synchronous requests are not supported");this.onopen&&this.onopen(this)},this.send=async function(e){this.mime_type&&(this.request_headers||(this.request_headers={}),this.request_headers["content-type"]||(this.request_headers["content-type"]=this.mime_type)), (this.user||this.password)&&(this.request_headers||(this.request_headers={}),this.request_headers.Authorization="Basic "+$((this.user||"")+":"+(this.password||"")));const t=this.method||"GET",n=this.url;if(!n)throw new Error("No URL specified");const r={method:t,url:n,headers:this.request_headers,timeout:this.timeout>0?this.timeout:void 0,anonymous:"withCredentials"in this?!this.withCredentials:this.options&&!!this.options.anonymous},s=e=>{ this.method&&"POST"==this.method.toUpperCase()&&(this.request_headers||(this.request_headers={}),this.request_headers["content-type"]||(this.request_headers["content-type"]=e))};if(e){let t,n="";if(e instanceof Blob){t=e.size;const i=await st(e);i?(r.data=Ye(i),s(n)):(this.readyState=0,this.statusText="data read error",this.onerror&&this.onerror(this))}else t=e.length,n="text/plain",r.data=Ye(We(e));s(n),this.upload&&(this.upload.loaded=0,this.upload.total=t)}(async e=>{await ot.acquire();try{ let t;const n=await Promise.race([new Promise(((n,r)=>{t=ce((()=>{t=void 0,r(`timeout: ${e.method}`)}),15e3)})),U.runtime.sendNativeMessage("application",e)]);return void 0!==t&&te(t),n}catch(e){throw console.error("sendNativeMessage",e),e}finally{ot.release()}})({method:"xhr",id:this.id,details:r}),e&&this.upload&&this.upload.onprogress&&this.upload.onprogress.apply(this,[this.upload])},this.abort=function(){this.canceled=!0,delete Ni[this.id],this.onabort&&this.onabort(this)}, this.overrideMimeType=function(e){this.mime_type=e},this.getAllResponseHeaders=function(){const e=this.headers;return Object.keys(e).map((function(t){const n=e[t];return n&&n.includes(",")?n.split(",").map((function(e){return t+":"+e.trimStart()})).join("\r\n"):t+":"+n})).join("\r\n")},this.getResponseHeader=function(e){return this.headers[e]},this.setRequestHeader=function(e,t){null!==t&&(this.request_headers||(this.request_headers={}),this.request_headers[e.trim().toLowerCase()]=t.trim())}, this.toString=function(){return"[object XMLHttpRequest]"},this.handle=function(e){const t=e.data,n=()=>{this.onprogress&&this.onprogress(this)};if(t.timeout)this.ontimeout&&this.ontimeout.apply(this,[this]);else if(1==t.readyState&&"loaded"in t)this.upload&&this.upload.onprogress&&(this.upload.loaded=t.loaded||0,this.upload.total=t.total,this.upload.onprogress.apply(this,[this.upload]));else if(2==t.readyState&&301==t.status)Object.assign(this,t), this.onredirect&&this.onredirect(this);else if(t.readyState!=this.readyState){if(Object.assign(this,t),this.onreadystatechange&&this.onreadystatechange(this),4==t.readyState){const e=t.status;return e>=400?this.onload&&this.onload.apply(this,[this]):e>=300||(e>=200?this.onload&&this.onload.apply(this,[this]):e>=100||0===e&&this.onerror&&this.onerror.apply(this,[this])),!0}t.readyState>1?n():1==t.readyState&&this.onloadstart&&this.onloadstart.apply(this,[this]) }else 3==t.readyState&&(Object.assign(this,t),n())},this.id=Date.now()+(Math.random()+1).toString(36).substring(7),this.options=e,Ni[this.id]=this}get lengthComputable(){return null!=this.total}get target(){return this}get response(){const e=qi(this.responseData);if(null==e)return null;const t=this.responseType?this.responseType.toLowerCase():"",n=(this.headers?this.headers["content-type"]:null)||"binary/octet-stream";return zi(e,t,n)}get responseText(){const e=qi(this.responseData) ;return null==e?null:zi(e,this.mime_type?"binary":"text")}get responseXML(){const e=qi(this.responseData);if(null==e)return null;const t=(this.headers?this.headers["content-type"]:null)||"";return zi(e,"document",t.split(";")[0])}}Vi.UNSENT=0,Vi.OPENED=1,Vi.HEADERS_RECEIVED=2,Vi.LOADING=3,Vi.DONE=4,Vi.toString=function(){return"[XMLHttpRequest]"};const zi=function(e,t,n){let r;if("arraybuffer"==t)r=$e(e);else if("blob"==t)r=new Blob([$e(e)],{type:n});else if("json"==t)r=JSON.parse(Xe(e));else{ if("document"==t)return"text/xml"==n&&ge?(new ge).parseFromString(e,n):null;if("text"==t||n&&(n.match(/charset=(utf[-_]?8)/i)||"text/html"==n))try{r=Xe(e)}catch(t){r=e}else r=e}return r},qi=e=>{try{if(void 0===e)return;return Je(e)}catch(e){return void console.warn("XmlHttpRequest:",e)}};var Hi;!function(e){e.TESTING="TESTING",e.AUDIO_PLAYBACK="AUDIO_PLAYBACK",e.IFRAME_SCRIPTING="IFRAME_SCRIPTING",e.DOM_SCRAPING="DOM_SCRAPING",e.BLOBS="BLOBS",e.DOM_PARSER="DOM_PARSER",e.USER_MEDIA="USER_MEDIA", e.DISPLAY_MEDIA="DISPLAY_MEDIA",e.WEB_RTC="WEB_RTC",e.CLIPBOARD="CLIPBOARD",e.LOCAL_STORAGE="LOCAL_STORAGE",e.WORKERS="WORKERS",e.BATTERY_STATUS="BATTERY_STATUS",e.MATCH_MEDIA="MATCH_MEDIA",e.GEOLOCATION="GEOLOCATION"}(Hi||(Hi={}));const Qi=async(e,t)=>{{let n;try{const r=n=await(e=>e({justification:"create an object URL",reasons:[Hi.BLOBS]}))(t),s=(await r.sendBinary({action:"objectURL",blob:e})).url;if(s)return new Cs({objUrl:{url:s,revoke:async()=>{r&&(await r.send({action:"objectURL",url:s }),r.release())}}},ys+bs.OBJ_URL);n&&n.release()}catch(e){n&&n.release(),console.warn("offscreen: failed to create object URL",e)}}return new Cs({blob:e})},Wi=[301,302,303,307,308],Xi=["arraybuffer","blob","document","json","xml","headers","stream"];let Yi,Ji={},Ki=()=>f.resolve({done:()=>{}}),$i=()=>f.resolve({done:()=>{}}),eo=()=>Promise.resolve(!0) ;const to=["internal","user-agent","accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"],no={"cache-control":"max-age=0, must-revalidate"},ro=e=>{const t={},n={};return Object.keys(e).forEach((r=>{let s=r,i=e[r];var o;o=r.toLowerCase(), to.includes(o)||0===o.indexOf("proxy-")||0===o.indexOf("sec-")?n[s]=i:t[s]=i})),{...Object.keys(n).length?{forbidden:n}:{},...Object.keys(t).length?{regular:t}:{}}},so=e=>({responseText:"",response:null,readyState:4,responseHeaders:"",status:0,statusText:"",error:e=e||"Forbidden"}),io=e=>e&&"object"==typeof e&&"type"in e&&"value"in e,oo=e=>{if("Blob"===e.type)return new Blob([$e(e.value)]);if("File"===e.type){if(!e.name)return;return new File([$e(e.value)],e.name,{type:e.meta, lastModified:e.lastModified||Date.now()})}if("FormData"==e.type){const t=new FormData;return e.value.forEach((({name:e,value:n})=>{const r=oo(n);void 0!==r?t.append(e,r):_.warn("Unable to un-typify value for FormData field",n)})),t}if("URLSearchParams"===e.type)return new URLSearchParams(e.value);if("Array"===e.type||"Object"===e.type){let t,n,r;"Object"===e.type?(r=Object.keys(e.value),n=e=>et{const t={};return e&&e.split("\n").forEach((e=>{const n=e.match(/^([^:]+): ?(.*)/);if(n){const e=n[1].toLowerCase();t[e]=(void 0!==t[e]?t[e]+",":"")+(n[2]||"").replace(/,/g,"%2C")}})),t},co=(e,t,n)=>{const r={...t||{}},s=async(e,t)=>{const n=r[e];n&&n("function"==typeof t?await t():t)},i=async(e,t)=>{r[e]&&(await s(e,t),r[e]=void 0)};if(!(n=n||{}).internal&&(o=e.url, !["https:","http:","data:","blob"].some((e=>o.startsWith(e))))){_.warn("xhr: invalid scheme of url:",e.url);const t=so("Invalid scheme");return i("onerror",t),void i("ondone",t)}var o;const a=void 0!==e.responseType?e.responseType.toLowerCase():void 0,c=e.redirect&&"follow"!==e.redirect,l=!Ji.mozAnon&&e.anonymous||"stream"==a||c||!e.partialSize&&a||"typified"===e.data_type,u=e.fetch||!1;return l||u?Ao(e,r,n,e.retries||0,i,s):ho(e,r,n,e.retries||0,i,s) },lo="tm-finalurl"+j.short_id.toLowerCase(),uo="tm-setcookie"+j.short_id.toLowerCase(),Ao=(e,t,n,r,s,i)=>{const o=ge,a=!e.redirect||"follow"===e.redirect;let c,l,u,d,A;const h=(t,n,r)=>{const s=[];let i;const o=r||t.headers;if(o){const n=[],r=[];o.forEach(((e,t)=>{const o=t.toLowerCase();o.startsWith(uo)?n.push(e):"set-cookie"===o?r.push(e):o===lo?i=e:s.push(o+":"+e)})),i=a?i||t.url:e.url,(n.length?n:r).forEach((e=>s.push("set-cookie:"+e)))}const c=void 0===n?4:n,l=t.status||0,u=t.statusText||"" ;return{readyState:c,responseHeaders:s.join("\r\n"),finalUrl:i,status:l,statusText:u}},p=(e,t,n)=>Object.assign(n||{},{lengthComputable:void 0!==e,loaded:e,done:e,position:e,total:t,totalSize:t}),f=e=>{let t;d&&d(),l||(u?(t=h({status:408,statusText:"Request Timeout"}),s("ontimeout")):"AbortError"==(null==e?void 0:e.name)?(t=so("aborted"),s("onabort",t)):(t=h({status:408,statusText:(null==e?void 0:e.message)||"Request Timeout"}),s("onerror",t)),l=!0,s("ondone",t)) },m=e.responseType?e.responseType.toLowerCase():"";if("document"==m&&!o)return void f({name:"Error",message:"response type not supported"});const g=async(e,t,r)=>{let s;if(r)s=e;else{const t=e;if(!n.no_blob&&!n.foreign_context){let e;if(!Yi)throw new Error("Offscreen document not available");return e=await Qi(t,Yi),i("onpartial",{tfd:await e.toTransferableData()}),void ce((()=>e.dispose()),3e5)}{const e=await st(t);if(!e)return void _.warn("xhr: failed to convert blob to binary text");s=e}} const o=ze(s,t);o.forEach(((e,t)=>{i("onpartial",{partial:e,index:t,length:o.length})}))};let v=!1;const w=e=>{e&&(u=!0),b?b.abort():u?f():f({name:"AbortError",message:"Aborted by user"})};let b;return(async()=>{try{const u={};u.method=e.method||"GET";const y=zn(e.url);let k,R;if(y){let t=!1;y.username&&(e.user=e.user||y.username,t=!0),y.password&&(e.password=e.password||y.password,t=!0),k=t?Hn(y):e.url}else k=e.url;if(e.headers){let{forbidden:t,regular:n}=ro(e.headers);if(R=n,t){ const{responseHeaders:e,done:n}=await Ki(k,u.method,!a,t);d=()=>{n(),d=void 0},e&&(A=e)}}if(!a&&(u.redirect=e.redirect,!d)){const{responseHeaders:e,done:t}=await Ki(k,u.method,!a);d=()=>{t(),d=void 0},e&&(A=e)}if(!await eo()&&!d){const{responseHeaders:e,done:t}=await Ki(k,u.method,!1);d=()=>{t(),d=void 0},e&&(A=e)}if(!d){const{done:e}=await $i(k,u.method);d=()=>{e(),d=void 0}}e.nocache?u.cache="reload":e.revalidate&&(u.cache="default",R=R||{},R={...R,...no}), e.anonymous?u.credentials="omit":u.credentials="include",e.user&&e.password&&(R=R||{},R.Authorization="Basic "+$(e.user+":"+e.password)),R&&(u.headers=new Headers(R)),void 0!==e.data&&null!==e.data&&(io(e.data)&&"typified"===e.data_type?u.body=oo(e.data):"string"==typeof e.data?u.body=e.data:u.body=JSON.stringify(e.data)),b=X?new X:void 0,b&&(u.signal=b.signal),s("onloadstart",h({status:0,statusText:""},1)),ue(k,u).then((async a=>{var u,f,w;let b;if(c&&(te(c),c=null),A){ const e=await Promise.race([A,N(5e3)]);if(e){b=(e=>{const t=new Headers;for(const[n,r]of e.entries())t.append(n,r);return t})(a.headers);for(const t of e)if(void 0!==t.value)try{b.set(t.name,t.value)}catch(e){try{b.set(t.name,We(t.value))}catch(e){_.warn("xhr: failed to set header",t.name,t.value)}}}}if(d&&d(),l)return;let y=h(a,void 0,b);if(y.status>0&&(y.status<200||y.status>=399)&&r>0)return void Ao(e,t,n,r-1,s,i);const{partialSize:k,overrideMimeType:R,responseType:x}=e ;if(a.ok)if(i("onreadystatechange",h(a,2,b)),"stream"==m){const t=null===(u=a.body)||void 0===u?void 0:u.getReader();if(t)for(;;){const{done:n,value:r}=await t.read();if(r){const t=new Blob([r]);await g(t,parseInt(e.partialSize),!1)}if(n)break}}else{const t=await(async(e,t)=>{var n;const r=null===(n=e.body)||void 0===n?void 0:n.getReader();if(r){const n=[];let s=0;const o=parseInt(e.headers.get("Content-Length")||"-1");for(;;){const{done:a,value:c}=await r.read();if(c&&(n.push(c),s+=c.length, await i("onprogress",(async()=>{const n=h(e,3,t);return p(s,o,n)}))),a)break}const a=new Uint8Array(s);let c=0;for(const e of n)a.set(e,c),c+=e.length;return a}{const n=await e.arrayBuffer();return await i("onprogress",(async()=>{const r=h(e,3,t);return p(n.byteLength,n.byteLength,r)})),new Uint8Array(n)}})(a,b),n=null===(f=a.headers)||void 0===f?void 0:f.get("Content-Type"),r=((null===(w=R||n)||void 0===w?void 0:w.toLowerCase().match(/charset=([^;]+)/))||[])[1],s=()=>new Blob([t],{ type:R||n||"binary/octet-stream"});if(k){let t;["arraybuffer","blob"].includes(m)||void 0!==R?(y.response=s(),t=!1):(y.response=await st(s(),r||"utf-8"),t=!0),y=await(async(t,n)=>{if(e.partialSize){const r=t.response;["response","responseText","responseXML"].forEach((e=>{delete t[e]})),!v&&r&&(v=!0,await g(r,parseInt(e.partialSize),n))}return t})(y,t)}else if(void 0!==x){let e;if("arraybuffer"==m)y.response=t.buffer;else if("blob"==m)y.response=s();else if("document"==m){ e=(n||"text/xml").toString().split(";")[0];const t=new o,i=await st(s(),r||"utf-8");y.response=t.parseFromString(i||"",e)}else if("json"==m){const e=await st(s(),r||"utf-8");y.response=JSON.parse(e||"")}else _.warn("xhr: responseType",m," is not implemented!"),y.responseText=y.response=await st(s(),r||"utf-8")}else{const e=await st(s(),r||"utf-8");y.responseText=y.response=e}}else if(y.responseXML=void 0,"follow"!==e.redirect&&"opaqueredirect"==a.type){const e=h(a,2,b) ;e.responseText=e.response=y.responseText=y.response=void 0,e.status=y.status=301,i("onreadystatechange",e)}else{i("onreadystatechange",h(a,2,b));try{if("stream"==m){const t=await a.text(),n=new Blob([t]);await g(n,parseInt(e.partialSize),!1)}else y.responseText=y.response=await a.text()}catch(e){}}s("onreadystatechange",y),s("onload",y),s("ondone",y)})).catch((async e=>{A&&await Promise.race([A,N(500)]),f(e)})),void 0!==e.timeout&&null!==e.data&&(c=ce((()=>{c=null,w(!0)}),e.timeout))}catch(e){ d&&d();const t=e;_.error(t.message,t.stack);const n=so(t.message);s("onerror",n),s("ondone",n)}})(),{abort:()=>w()}},ho=(e,t,n,r,s,i)=>{let o,a,c=!1;const l=(()=>{if(!Yi)throw new Error("Offscreen document not available");return Yi({justification:"make a XMLHttpRequest and forward BLOB data",reasons:[Hi.BLOBS]})})().then((async({connect:l})=>{if(o=await l("xhr",6e4),c){const e=so("aborted");return await s("onabort"),await s("ondone",e),void o.disconnect()}const u=new it(1);let d,A,h ;if(e.method=e.method||"GET",e.headers){let t;const{forbidden:n,regular:r}=ro(e.headers);t=r;{const{responseHeaders:t,done:r}=await Ki(e.url,e.method,!1,n);a=()=>{r(),a=void 0},t&&(d=t)}e.headers=t}if(!a){const{done:t}=await $i(e.url,e.method);a=()=>{t(),a=void 0}}o.onMessage.addListener((async e=>{await u.acquire();try{let t;if(e.data&&"responseHeaders"in e.data&&(t=e.data.responseHeaders)){if(d){let e;const n=await Promise.race([d,N(5e3)]);if(n){e=new Headers(ao(t)) ;for(const t of n)if(void 0!==t.value)try{e.set(t.name,t.value)}catch(n){try{e.set(t.name,We(t.value))}catch(e){_.warn("xhr: failed to set header",t.name,t.value)}}const{rh:r,fu:s}=(e=>{const t=[],n=[],r=[];let s;return e.forEach(((e,i)=>{const o=i.toLowerCase();o.startsWith(uo)?n.push(e):"set-cookie"===o?r.push(e):o===lo?s=e:t.push(o+":"+e)})),(n.length?n:r).forEach((e=>t.push("set-cookie:"+e))),{rh:t.join("\r\n"),fu:s}})(e);A=r,h=s}d=void 0}a&&a(),A&&(e.data.responseHeaders=A), h&&(e.data.finalUrl=h)}"ondone"===e.type&&a&&a(),await i(e.type,e.data)}finally{u.release()}})),o.onDisconnect.addListener((()=>{o=void 0}));const p=Object.keys(t).reduce(((e,n)=>{const r=n;return t[r]&&(e[r]=!0),e}),{}),{data_type:f,data:m}=e;if(io(m)&&"typified"===f)throw new Error("unsupported data type");o.postMessage({action:"xhr",details:e,retries:r,callbacks:p,options:n})}));return{abort:async()=>{c||(c=!0,await l,o&&o.postMessage({action:"xhr",abort:!0}))}}};let po,fo,mo={} ;const go="runtime_host_permissions";let vo;const wo=(e,t)=>{if(vo||(vo=ce((()=>{vo=void 0,(()=>{let e;R.Pledge().then((()=>Li())).then((t=>{e=t,e?oi.removeAll(go):oi.all("status",{key:go,id:go,class:"warning",text:qr.getMessage("Limited_runtime_host_permissions_might_break_some_Tampermonkey_features_"),timeout:31536e6}),e||void 0!==fo?e&&fo&&(vi.off("onRequestRedirect",fo),fo=void 0):(fo=({url:e})=>{wo(e,1e3)},vi.on("onRequestRedirect",fo))})).then((()=>po)).then((()=>{const t=Object.values(mo) ;if(mo={},e)return t;{const e={},n=po=R.Pledge().then((async()=>{const n=await Di.get(),r=[];await f.all(t.map((async t=>{const s=zn(t.url);if(!s||!s.protocol||!s.hostname||["data:","blob:"].includes(s.protocol))return;const i=(e=>{const t="string"==typeof e?zn(e):e;if(!t)throw new Error("invalid url");return Hn(t,{nopath:!0})})(s)+"/";await Pi.hasOrigin(i)?r.push(i):n[i]||(e[i]=Date.now())})));const s=Object.keys(e);return s.length&&await Di.set(e),r.length&&await Di.delete(r),s })).then((e=>e.length?(_.info("pcx: need to ask for some permissions",e),Pi.askOrigin(e,qr.getMessage("Cross_Origin_Request_Permission"),qr.getMessage("Click_here_to_allow_TM_to_access_the_following_hosts_0hostlist0",e.join("\n"))).then((()=>(po=void 0,t)))):t)).always((()=>{po=void 0}));return n}})).always((t=>{t&&t.forEach((t=>t.deferred.resolve(e))),Object.keys(mo).length&&wo()}))})()}),t||100)),!e)return R.Pledge();if(mo[e])return mo[e].deferred.promise();const n=R(),r={url:e,deferred:n} ;return mo[e]=r,n.promise()},_o=(e,t,n,r)=>{let s,i;const o=t||{};return wo(e.url).then((()=>{if(i){const e=so("aborted");return o.onabort&&o.onabort(e),void(o.ondone&&o.ondone(e))}(n=n||{}).internal=r,s=co(e,o,n)})),{abort:function(){if(s)return s.abort();i=!0}}},bo={init:()=>{},internal:(e,t,n)=>_o(e,t,n,!0),external:(e,t,n)=>_o(e,t,n,!1) },yo=bo,ko=e=>!!L.inIncognitoContext||(e?e.incognito||!F.isDefaultStoreId(e.cookieStoreId):void 0),Ro=({frameType:e,frameId:t})=>void 0!==e?"outermost_frame"===e:void 0===t||0===t,xo=(e,t)=>{const{frameId:n,documentId:r,frameType:s}=e,{topframe:i}=t||{},o=void 0!==n?n:i?0:void 0;if(r||void 0!==o)return{frameId:o,frameType:s||(i?"outermost_frame":void 0),documentId:r,get id(){return r||`${o}`}}},Eo=(e,t)=>{ if(!e||-1!=e.search(/#bypass=true/)||-1!=e.search(gt.getInternalPageRegexp())||!["https:","http:","file:","ftp:"].some((t=>e.startsWith(t))))return!1;const n=t?e:e.split(/[?#$]/)[0],r=-1!=n.search(/[^/]{1}\.user\.(js#|js\?|js$)/)||-1!=n.search(/[^/]{1}\.tamper\.(js#|js\?|js$)/);return r?!(-1!=n.search(/^htt[ps]{1,2}:\/\/code\.google\.com/)||-1!=n.search(/^htt[ps]{1,2}:\/\/(github|gitlab)\.com/)&&!ps(n)||-1!=n.search(/^htt[ps]{1,2}:\/\/bitbucket\.org/)&&!ps(n)):r},Co=(e,t)=>{const n=R(),r=zn(e) ;if(r&&["file:"].concat(O.INTERNAL_PAGE_PROTOCOLS).includes(r.protocol))Mt(e,(e=>{n.resolve(e)}),(e=>{n.reject(e)}));else{const r={method:"GET",retries:B.RETRIES,timeout:6e4,revalidate:!0,headers:null==t?void 0:t.headers,responseType:"arraybuffer",url:e};yo.internal(r,{onload:t=>{4!=t.readyState||200!=t.status&&0!=t.status||t.error?(_.verbose("getScriptFromUrl: "+e+" req.status = "+t.status),n.reject(t.responseText||"request error")):n.resolve(t.response)}, onerror:e=>n.reject(e.responseText||"request error"),ontimeout:()=>n.reject("timeout")})}return n.promise()},So=e=>{const t=R();return Co(e,{headers:{Accept:"text/x-userscript, */*"}}).then((e=>{et(e,{encoding:"UTF-8"}).then((e=>{t.resolve(e)}),(e=>{t.reject(e.message||"charset issue")}))}),(e=>{t.reject(e)})),t.promise()},Mo=()=>{const e=R();return vt.getSelected(null,(t=>{t?e.resolve(t):e.reject()})),e.promise()},Io=(e,t)=>{let n,r;try{t||"/"!=e.substr(0,1)?t?(r=In(e),n=new RegExp(r)):(r=(e=>{ let t;if("*"==e)t="^(https?|file)://.*";else{t=e;const n=En(t);if(n){let{protocol:e,host:r,path:s}=n;e=e?Ge(e).replace(/\*/gi,"[^:]*"):"",r=r?Ge(s?r.replace(/\.\*$/,_n):r).replace(/\*+/g,((e,t)=>1==e.length&&(s||!t&&r.length>1&&(r.match(/\*/g)||[]).length>1&&r.replace(/\*\./g,"").length>0)?"[^/]*":".*")):r||"",s=s?Ge(s).replace(/\*/gi,".*"):"",t="^"+[e,r,s].join("")+"$"}else t="^"+Ge(t)+"$",t=t.replace(/\*/gi,".*"),t=t.replace(/(\^|:\/\/)\.\*/,"$1([^?#])*");t=t.replace(Ge(_n+"/"),kn+"/")} return t})(e),n=new RegExp(r,"i")):(r=("^"==e.substr(1,1)?"":".*")+e.replace(/^\//g,"").replace(/\/$/g,"")+("$"==e.substr(-2,1)?"":".*"),r=r.replace(/(\.\*){1,}/g,".*"),n=new RegExp(r,"i"))}catch(t){return void _.warn("scriptman: invalid regexp ",e)}return n},Uo=(e,t)=>""===e.replace(t,""),Go=(e,t)=>{let n=[],r=[];const s=(e,t)=>e&&e.length?e.map((e=>Io(e,t))).filter((e=>void 0!==e)):[],{inc:i,match:o,exc:a}=e;return n=s(i).concat(s(o,!0)),r=s(a),{rinc:n.length||t?n:void 0, rexc:r.length||t?r:void 0}},Zo=e=>({source:e.source,flags:e.flags}),To=(e,t,n)=>{let r=!1;if(t.rinc){if(t.rinc.every((t=>!Uo(e,t)||(_.debug('scriptman: @include "'+t+'" matched'+(n?" ("+n+")":'"')),r=!0,!1))),!r)return r}else r=!0;return t.rexc&&t.rexc.every((t=>!Uo(e,t)||(_.debug('scriptman: @exclude "'+t+'" matched'+(n?" ("+n+")":'"')),r=!1,!1))),r},Bo=W({timeout:5,check_interval:10,retimeout_on_get:!0}),Oo=W({timeout:300,check_interval:120,retimeout_on_get:!0}),Do={ePASTEBIN:1,eCHROMESYNC:2, eSYNCFS:3,eGDRIVE:4,eDROPBOX:5,eWEBDAV:6,eYANDEX:7,eONEDRIVE:8,eUNKNOWN:9},jo={ts:0,data:{}},Lo={init:()=>{const e=(e,t)=>{const n=e.substr(G.PREFIX.STORE.length),r=t||void 0;if(r)for(const[e,t]of Object.entries(r.data)){const s={},i={uuid:n,storage:s,ts:r.ts};void 0===t?i.removed=e:s[e]=t,vi.emit("scriptStorage",i)}};nn.on("add",e,{key:new RegExp("^"+Ze(G.PREFIX.STORE))}),nn.on("change",e,{key:new RegExp("^"+Ze(G.PREFIX.STORE))})},getUidList:()=>{const e=[];return nn.listValues().forEach((t=>{ t.startsWith(G.PREFIX.SCRIPT_UID)&&e.push(t.substr(G.PREFIX.SCRIPT_UID.length))})),e},getUidsByName:(e,t)=>{const n=[];return Lo.getUidList().forEach((r=>{const s=Lo.getMetaByUid(r);!s||s.name!=e||t&&t!=s.namespace||n.push(r)})),n},getUidByName:e=>Lo.getUidsByName(e)[0],getStorageByUid:e=>{const t=nn.getValue(G.PREFIX.STORE+e,{ts:0,data:{}});let{ts:n,data:r}=t||jo;return void 0===n&&(n=0),void 0===r&&(r={}),{ts:n,data:r}}, setStorageByUid:(e,t)=>t?R.from(nn.setValue(G.PREFIX.STORE+e,t)):R.from(nn.deleteValue(G.PREFIX.STORE+e)),setStorageByUidAndNotify:(e,t,n,r,s,i)=>{_.verbose("sb: ("+e+"): set key "+r+' to "'+s+'"');const o=Fo.getStorageByUid(e);i?delete o.data[r]:o.data[r]=s,o.ts=t=t||Date.now();const a=Fo.setStorageByUid(e,o),c={storage:{[r]:s},ts:t,removed:i?r:void 0,uuid:e,id:n};return vi.emit("scriptStorage",c),a},getMetaByUid:e=>nn.getValue(G.PREFIX.META+e,null),getByUid:(e,t)=>{ if(!e)return _.error("sb: no UUID set"),{};let n,r=nn.getValue(G.PREFIX.META+e,null);if(r){const{requires:s,resources:i}=r;let{sync:o}=r;r.requires=(s||[]).map((e=>{const{unsafe_url:t,abs_url:n}=e;return{unsafe_url:t,abs_url:n}})),r.resources=(i||[]).map((e=>{const{name:t,unsafe_url:n,abs_url:r}=e;return{name:t,unsafe_url:n,abs_url:r}})),r.uuid=e;const a=r.grant||[];r.grant=a.includes("none")?["none"]:a,r.options.override.use_connects||(r.connects=r.connects||[], r.options.override.merge_connects=!0,r.options.override.use_connects=[]),void 0===r.options.check_for_updates&&(r.options.check_for_updates=!0),void 0===r.options.user_modified&&(r.options.user_modified=null),void 0===r.options.run_in&&(r.options.run_in=null),void 0===r.options.override.orig_run_in&&(r.options.override.orig_run_in=[]),void 0===r.options.tags&&(r.options.tags=[]),void 0===r.options.compat_powerful_this&&(r.options.compat_powerful_this=null),t&&(r=De(r,{})),o&&!o.imported&&(o={ imported:9});const c=r.textContent,l=nn.getValue(G.PREFIX.SCRIPT+e,c);l&&(n={...r,sync:o,textContent:l})}return{script:n,cond:nn.getValue(G.PREFIX.COND+e,null)}},setByUid:(e,t)=>{if(!e)throw _.error("sb: no UUID set",t),new Error("No UUID set!");if("string"!=typeof t.textContent)throw new Error("No script code set!");const{name:n,includes:r,matches:s,excludes:i}=t,{textContent:o,...a}=t,c={...a,uuid:e},l={};l[G.PREFIX.META+e]=c,l[G.PREFIX.SCRIPT_UID+e]=n,l[G.PREFIX.COND+e]={inc:r,match:s,exc:i}, l[G.PREFIX.SCRIPT+e]=o;const u=nn.setValues(l);return Bo.removeAll(),Oo.remove(e),R.from(u)},restoreByUid:e=>{const t=Lo.getByUid(e);if(!t.script||!t.cond)return R.Breach("invalid script");const{script:n}=t;return delete n.deleted,Lo.setByUid(e,n)},softRemoveByUid:e=>{const t=Lo.getByUid(e);if(!t.script||!t.cond)return R.Breach("invalid script");const{script:n}=t;n.deleted=Date.now();const r=Lo.setByUid(e,n);return Bo.removeAll(),Oo.remove(e),r},removeByUid:e=>{const t=Lo.getByUid(e) ;if(!t)return R.Breach("not found");const n=R.when([nn.deleteValue(G.PREFIX.SCRIPT_UID+e),nn.deleteValue(G.PREFIX.COND+e),nn.deleteValue(G.PREFIX.SCRIPT+e),nn.deleteValue(G.PREFIX.META+e),nn.deleteValue(G.PREFIX.STORE+e)]).then((()=>{})),{script:r}=t;return wn.values&&r&&Mr(r.name,"r"),n}},Fo=Lo,Po=Fo,No=(()=>{let e=!1,t={};const n={setValue:(e,n,r)=>{const s=R(),i=e,o=r?{origin:"normal",value:n}:n;t[i]=o;{let e=ce((()=>{_.error(`migrate: storing key ${i} timed out after 30s!`),s.reject()}),3e4) ;const t={};t[i]=o;try{Ct.local.set(t,(()=>{e&&te(e),e=void 0,s.resolve()}))}catch{s.reject()}}return s.promise()},getValue:(e,n)=>{let r=t[e];return n&&r&&"object"==typeof r&&"value"in r&&(r=r.value),r},deleteValue:e=>{const n=R(),r=e;delete t[r];{let e=ce((()=>{_.error(`migrate: deleting key ${r} timed out after 30s!`),n.reject()}),3e4);try{Ct.local.remove(r,(()=>{e&&te(e),e=void 0,n.resolve()}))}catch(e){n.reject()}}return n.promise()},listValues:()=>{const e=[] ;return Object.getOwnPropertyNames(t).forEach((t=>{e.push(t)})),e},init:()=>{const n=R();if(e)n.resolve();else{e=!0;const r=e=>{t={},e&&Object.keys(e).forEach((n=>{t[n]=e[n]})),n.resolve()};Ct.local.get(null,r)}return n.promise()},clean:()=>{const n=R();return e=!1,t={},n.resolve(),n.promise()}};return n})(),Vo="#schema",zo="#config",qo="#version",Ho="#update",Qo="TM_version",Wo="@uid#",Xo="@re#",Yo="@st#",Jo="@source#",Ko="@meta#",$o=new it(1);let ea=0;const ta=(()=>{ const e=[],t=n=>new Promise(((r,s)=>{mt.sendMessage({target:"offscreen",method:"offscreen",request:n},(async n=>{let i=1e3;if(gt.lastError)s(gt.lastError),i=0;else if(n){const{result:t,poll:s}=n;i=s||0,t&&e.forEach((e=>{e(t)})),r(n)}else s(new Error("no response"));if(i){await N(i);const e=Math.random().toString(36).substring(2);await t({action:"port",details:{id:e}})}}))}));return{send:e=>{const n=Math.random().toString(36).substring(2);return t({action:"port",details:{id:n,message:e}})}, onMessage:{addListener:t=>{e.push(t)}}}})(),na=(e=>{const t={};let n;const r=n=>{let r=[],i=[];const o=()=>{r=[],i=[],a=null,delete t[n]};let a={postMessage:t=>{(t=>{if(!a)throw"port is disconnected";e.send({response_id:n,value:t})})(t)},onMessage:{addListener:e=>{r.push(e)}},onDisconnect:{addListener:e=>{i.push(e)}},disconnect:()=>{o(),s(n)}};return t[n]={message:e=>{r&&r.forEach((t=>t(e)))},disconnect:()=>{i.length&&i.forEach((e=>e())),o()}},a},s=t=>{e.send({response_id:t,disconnect:!0})} ;return e.onMessage.addListener((e=>{let s;if(e.connect){if(!e.destination||!e.response_id)throw"invalid message";n&&n(e.destination,r(e.response_id))}else{if(!e.response_id)throw"invalid message";if(!(s=t[e.response_id]))return void console.warn("ports: unknown id",e.response_id,e);if(e.disconnect)s.disconnect();else{const t=e.value;t&&s.message(t)}}})),{connect:function(t){const n=Math.random().toString(36).slice(2);return((t,n)=>{e.send({response_id:n,connect:!0,destination:t})})(t,n),r(n)}, onConnect:{addListener:e=>{n=e}}}})(ta),ra=async e=>{if(!P.supported)throw new Error("Offscreen documents not supported");const t=P;await $o.acquire();try{if(1==++ea){try{const n=await gt.getContexts({contextTypes:["OFFSCREEN_DOCUMENT"]});n&&n.length||await t.createDocument(e)}catch(e){console.warn("Failed to create offscreen document -> assume getContexts is not supported and we were restarted")}await new Promise(((e,t)=>{mt.sendMessage({target:"offscreen",method:"offscreen",request:{ action:"config",version:mt.manifest.version,config:wn.snapshot}},(()=>{gt.lastError?t(gt.lastError):e()}))}))}}finally{$o.release()}const n=async e=>{await N(e||15e3),await $o.acquire();try{0==--ea&&await t.closeDocument()}finally{$o.release()}};return{send:e=>new Promise(((t,n)=>{mt.sendMessage({target:"offscreen",method:"offscreen",request:e},(e=>{gt.lastError?n(gt.lastError):e?e.error?n(new Error(e.error)):t(e.result):n(new Error("no response"))}))})),sendBinary:async e=>{ if(!Me)throw new Error("Offscreen documents not supported");const t=mt.getURL("offscreen.html"),n=(await Me.matchAll({includeUncontrolled:!0})).find((e=>e.url===t));if(!n)throw new Error("No running offscreen document found");const r=new MessageChannel;n.postMessage(e,[r.port2]);const s=await new Promise((e=>r.port1.onmessage=e));if(!s||!s.data)throw new Error("Offscreen document sent no response");return s.data.result},connect:(e,t)=>{const r=na.connect(e) ;return r.onDisconnect.addListener((()=>{n(t)})),r},release:n}};let sa,ia,oa;(()=>{const e=R();sa=e.promise();const t=js("general");t.type().then((n=>{"storage.session"===n?t.get("session_start").then((n=>{n?(oa=!1,ia=parseInt(n)):(oa=!0,ia=(new Date).getTime(),t.set("session_start",`${ia}`)),e.resolve()})):(oa=void 0,ia=void 0,e.resolve())}))})();const aa=()=>sa.then((()=>oa)),ca=()=>sa.then((()=>ia)),la={DEFAULT:"default",OFF:"off",NATIVE:"native",CHROME:"chrome",NOT_ENABLED:"not_enabled", NOT_WHITELISTED:"not_whitelisted",NOT_PERMITTED:"not_permitted",NOT_SUPPORTED:"not_supported",NOT_SUCCEEDED:"not_succeeded"},ua=new qe;let da,Aa=la.OFF,ha=[],pa=!1;const fa=js("general"),ma={},ga={},va=js("downloads"),wa=new it(1),_a=(Q({threads:3}),Q({threads:6})),ba=()=>void 0!==da?R.Pledge(da):!Bt.supported&&St.supported?(da=!0,R.Pledge(da)):Pi.has(Pi.permDownloads).then((e=>(da=e,_.log("downs: permission to use downloads ->",e),ba()))),ya=()=>ra({justification:"download a blob", reasons:[Hi.BLOBS]}),ka=async e=>new f((t=>{St.supported?St.search({id:e},(n=>{const r=n[0];r?t(r):(_.warn("downs: unable to query download ID",e),t(void 0))})):t(void 0)})),Ra=(e,t)=>{St.supported&&St.cancel(e,(()=>{ka(e).then((e=>{e&&Ea(e)})),t&&t()}))},xa=(e,t)=>{const n=R();if(!St.supported)return n.reject("not supported"),ua.emit("error",{id:t.download_id,error:"not_supported"}),n.promise();let r;Ca();let{name:s,url:i,method:o,saveAs:a,data:c,headers:l,conflictAction:u}=e ;const{download_id:d}=t;u&&!{uniquify:!0,prompt:!0,overwrite:!0}[u]&&(u="uniquify"),r={filename:s,url:i,method:o,saveAs:a,...u?{conflictAction:u}:{},body:c},l&&(Array.isArray(l)?_.warn("downs: invalid type of headers property",l):r.headers=Object.entries(l).map((([e,t])=>({name:e,value:t}))));const A=ga[d],h=ga[d]={...A,type:"chrome",download_id:d,url:i,name:s};if(St.download(r,((e,t)=>{if(void 0===e)return n.reject(t),void ua.emit("error",{id:d,error:t||"unknown"});h.browser_download_id=e ;const r=ma[d]={deferred:n};!0===h.cancel?Ra(e):(r.cancel=t=>Ra(e,t),r.interval=ae((async()=>{const t=await ka(e);t&&Ea(t)}),1e3))})),gt.lastError){const e=gt.lastError.message;n.reject(e),ua.emit("error",{id:d,error:e})}return n.promise()},Ea=async e=>{const{item:t,key:n}=(e=>{let t,n;return Object.keys(ga).every((r=>{const s=ga[r];return!s||s.browser_download_id!=e||(n=r,t=s,!1)})),{item:t,key:n}})(e.id);if(t&&n){const{name:r,url:s,download_id:i}=t,{interval:o,deferred:a}=ma[i]||{},c=()=>{ o&&ee(o),delete ga[n],delete ma[n],a&&a.resolve()},{id:l,error:u,totalBytes:d,bytesReceived:A,state:h,endTime:p,estimatedEndTime:f}=e;if(u||"interrupted"==h)_.warn(`downs: download of ${r} (${s}) failed`,u),ua.emit("error",{id:i,error:la.NOT_SUCCEEDED,details:u}),c();else{const e=p||"complete"==h;let n=!1;if((void 0!==d&&t.total!==d||void 0!==A&&t.loaded!==A)&&(t.total=null!=d?d:t.total,t.loaded=null!=A?A:t.loaded,n=!0),e&&(c(),-1===t.total||-1===t.loaded)){const e=await ka(l) ;e&&void 0!==e.totalBytes&&void 0!==e.bytesReceived&&(t.total=e.totalBytes,t.loaded=e.bytesReceived,n=!0)}if(n&&ua.emit("progress",{id:i,info:{loaded:Math.max(t.loaded,0),total:t.total,estimatedEndTime:p||f}}),e){_.log(`downs: download of ${r} (${s}) finished`);const{total:e,loaded:n}=t;ua.emit("load",{id:i,info:{total:e,loaded:n,mode:"browser"}})}}}},Ca=()=>{if(da&&!pa&&St.supported){const e=["state","totalBytes","fileSize"];St.onChanged.addDynamicListener((t=>{let n=!1;const r={id:t.id} ;for(const s of e){const e=t[s],i=e&&"string"!=typeof e&&"current"in e?e.current:void 0;i&&(r[s]=i,n=!0)}n&&Ea(r)})),pa=!0}},Sa=e=>{Aa=e,Aa==la.CHROME&&ba().then((async e=>{if(!e){const e=await Pi.has(Pi.permDownloads),t=R(),n=await ca(),r=void 0===n?void 0:n.toString(),s=await fa.get("asked_for_download_permission");return void 0!==r&&s===r||e?t.resolve({permission:e,asked:!1 }):(Pi.ask(Pi.permDownloads,qr.getMessage("Browser_API_Downloads"),qr.getMessage("Click_here_to_allow_TM_to_start_downloads")).done((e=>{t.resolve({permission:e,asked:!0}),da=e})),r&&fa.set("asked_for_download_permission",r)),t.promise()}}))},Ma=e=>{ha=Fe(e)},Ia=e=>{for(const t of ha)if(t&&t.length)try{let n;if("/"===t[0]){let e=t.replace(/^\//g,"").replace(/\/$/g,"");"$"!==e[e.length-1]&&(_.log(`downs: patching $ into ${e}`),e+="$"),n=new RegExp(e,"i")}else if("."===t[0]){ const e=[Ze(t),"$"].join("");n=new RegExp(e,"i")}else _.warn(`downs: invalid file extension: "${t}" starts neither with "." nor with "/"`);if(n&&-1!==e.search(n))return _.log(`downs: ${t} matched @${e}`),!0}catch(e){_.warn(`downs: can't process ${t}`,e)}return!1},Ua={init:()=>{const e=()=>{Sa(wn.values.downloads_mode),Ma(wn.values.downloads_extension_whitelist)};e(),wn.addChangeListener(["downloads_extension_whitelist","downloads_mode"],e),wa.acquire().then((async()=>{ for(const{key:e,value:t}of await va.list())"chrome"==t.type&&(ga[e]=t,ma[e]={cancel:t=>Ra(e,t),interval:ae((async()=>{const t=await ka(e);t&&Ea(t)}),1e3)})})).always((()=>wa.release()))},start:(e,t)=>{const n=t||{},r=Ve();let s,{name:i,from:{tfd:o,url:a},mode:c}=e;if(_.log("downs: start",e),!n.internal){if(Aa==la.OFF)return _.warn("downs: feature is not enabled"),N(1).then((()=>ua.emit("error",{id:r,error:la.NOT_ENABLED}))),r;if(i&&!Ia(i))return _.warn("downs:",`"${i}" is not whitelisted`), N(1).then((()=>ua.emit("error",{id:r,error:la.NOT_WHITELISTED}))),r;if(!St.supported&&Aa==la.CHROME)return _.warn("downs: this download mode is not supported"),N(1).then((()=>ua.emit("error",{id:r,error:la.NOT_SUPPORTED}))),r}const l=()=>{const e=ga[r];if(e&&e.cancel)return ua.emit("error",{id:r,error:"aborted"}),R.Breach("aborted")},u=i;let d;u&&(i=Ne(u,!0),u!=i&&_.warn(`downs: changed file name from ${u} to ${i} for safety`));const A=void 0!==c?"browser"===c:void 0;let h="native" ;const p=ga[r]={type:"unknown",download_id:r,url:a,name:u,loaded:-1,total:-1};return(async()=>{if(o){if(s=Cs.fromTransferableData(o),!s)return _.warn("downs: invalid transferable"),ua.emit("error",{id:r,error:la.NOT_SUPPORTED}),R.Breach("not_supported");if(a=s.tryObjectUrl||s.tryDataUri||a,a||(a=await s.toObjectUrl()),!a)return _.warn("downs: can't get URL from transferable"),ua.emit("error",{id:r,error:la.NOT_SUPPORTED}),R.Breach("not_supported");p.url=a} })().then((()=>wa.acquire())).then((()=>va.set(r,p).always((()=>wa.release())))).then((()=>{if(St.supported&&(void 0===A||A)&&(n.internal||Aa==la.CHROME||Aa==la.DEFAULT))return ba().then((e=>d=e)).then(l);d=!1})).then((()=>{if(A&&!d)return h="browser",ua.emit("error",{id:r,error:la.NOT_SUPPORTED}),R.Breach("not_supported");if(s&&s.tryBlob)return{blob:s.tryBlob};if(a){const t=zn(a);if(t&&"data:"==t.protocol)return{blob:nt(a)};if(!d||!n.internal&&Aa==la.DEFAULT)return((e,t)=>{ const{internal:n,download_id:r}=t;return _a.add((()=>{const t=R(),s=()=>{t.reject(),ua.emit("error",{id:r,error:"aborted"})},i=ga[r];if(i&&i.cancel)s();else{const o={...i,type:"xhr",name:e.name,url:e.url,download_id:r},a=n=>{if(4!=n.readyState||200!=n.status&&0!=n.status||n.error){const e=n.error||n.statusText||"xhr_failed";t.reject(e),ua.emit("error",{id:r,error:e})}else{let s;const i=ao(n.responseHeaders),a=i["content-type"];if(!e.name){const e=i["content-disposition"];if(e){ const n=e.match(/filename="(.+)"/);if(n){let e=n[1];try{e=re(e)}catch(e){_.warn("downs:",e)}const i=Ne(e,!0);if(i){if(!Ia(i)){const e=`"${i}" is not whitelisted`;return _.warn("downs:",e),t.reject(e),void ua.emit("error",{id:r,error:la.NOT_WHITELISTED})}s=i}}}}const c=new Blob([n.response],{type:e.overrideMimeType||a||"binary/octet-stream"});-1!==o.total&&-1!==o.loaded||(o.total=o.loaded=c.size,ua.emit("progress",{id:r,info:{loaded:o.loaded,total:o.total}})),t.resolve({name:s,blob:c})}} ;e.responseType="blob",e.method=e.method||"GET";const c=(n?yo.internal:yo.external)(e,{onload:a,onerror:e=>{t.reject(),ua.emit("error",{id:r,error:e.error||"failed",details:e.statusText})},onabort:s,ontimeout:()=>{t.reject(),ua.emit("error",{id:r,error:"timeout"})},onprogress:e=>{e.lengthComputable&&(o.total=e.total,o.loaded=e.loaded,ua.emit("progress",{id:r,info:{loaded:e.loaded,total:e.total}}))}});ga[r]=o,ma[r]={cancel:c?c.abort:()=>{}}}return t.promise()}))})({url:a,...e,name:i},{ internal:n.internal,download_id:r})}})).then((t=>{const{name:o,blob:c}=t||{};if(c&&d){let t;return h="browser",R.Pledge().then((()=>s&&s.tryObjectUrl?s.tryObjectUrl:ya().then((async e=>{const n=await e.sendBinary({action:"objectURL",blob:c});return n.error||!n.url?(ua.emit("error",{id:r,error:n.error||"unknown error"}),e.release(),R.Breach()):(t=async()=>{await e.send({action:"objectURL",url:a}),e.release()},n.url)})))).then((n=>xa({url:n,name:o||i,saveAs:e.saveAs},{download_id:r}).always((()=>{ t&&t()}))))}return c?Qi(c,ra).then((e=>ya().then((async t=>{try{const n=await t.send({action:"download",id:r,details:{name:o||i||"File.download",tfd:await e.toTransferableData()}});n.error?ua.emit("error",{id:r,error:n.error}):(p.total=p.loaded=c.size,ua.emit("load",{id:r,info:{loaded:p.loaded,total:p.total,mode:n.mode}}))}finally{t.release(),ce((()=>{e.dispose()}),1e3)}})))):a&&d?(h="browser",xa({url:a,...e,name:i},{download_id:r })):void(a&&!n.internal&&Aa==la.CHROME?(_.warn("downs: download permission is missing"),ua.emit("error",{id:r,error:la.NOT_PERMITTED})):(_.warn("downs: download failed"),ua.emit("error",{id:r,error:"failed"})))})).always((()=>{wa.acquire().then((()=>(delete ga[r],delete ma[r],va.delete(r)))).always((()=>{wa.release(),ua.emit("done",{id:r,info:{loaded:p.loaded,total:p.total,mode:h}})}))})),r},cancel:e=>{const t=ga[e],n=ma[e];return!!t&&(n&&n.cancel?n.cancel():t.cancel=!0,!0)},set_mode:Sa, set_whitelist:Ma,is_whitelisted:Ia,remove_permission:()=>Pi.remove(Pi.permDownloads),staticVars:la},Ga=Ua,Za={run:(e,t)=>{let n=1;const r=()=>{0==--n&&(t&&t(),I.runtime.reload?I.runtime.reload():location.reload())};if("config"==e){const e=nn.listValues();for(const t of e){if(-1!=t.indexOf(G.PREFIX.SCRIPT)||-1!=t.indexOf(G.PREFIX.COND)||-1!=t.indexOf(G.PREFIX.STORE)||-1!=t.indexOf(G.PREFIX.META))return;n++,nn.deleteValue(t).always(r)}}else"factory"==e&&(n++,Ga.remove_permission().done(r),n++, nn.factoryReset().always(r));r()},reset:e=>{Za.run(void 0,e)},factoryReset:e=>{Za.run("factory",e)},configReset:e=>{Za.run("config",e)}},Ta=Za;var Ba={},Oa=Ba.util=Ba.util||{};Oa.isArrayBuffer=function(e){return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer},Oa.isArrayBufferView=function(e){return e&&Oa.isArrayBuffer(e.buffer)&&void 0!==e.byteLength},Oa.ByteBuffer=t,Oa.ByteStringBuffer=t,Oa.ByteStringBuffer.prototype._optimizeConstructedString=function(e){ this._constructedStringLength+=e,this._constructedStringLength>4096&&(this.data.substr(0,1),this._constructedStringLength=0)},Oa.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read},Oa.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0},Oa.ByteStringBuffer.prototype.putByte=function(e){return this.putBytes(String.fromCharCode(e))},Oa.ByteStringBuffer.prototype.fillWithByte=function(e,t){e=String.fromCharCode(e);for(var n=this.data;t>0;)1&t&&(n+=e), (t>>>=1)>0&&(e+=e);return this.data=n,this._optimizeConstructedString(t),this},Oa.ByteStringBuffer.prototype.putBytes=function(e){return this.data+=e,this._optimizeConstructedString(e.length),this},Oa.ByteStringBuffer.prototype.putString=function(e){return this.putBytes(Oa.encodeUtf8(e))},Oa.ByteStringBuffer.prototype.putInt16=function(e){return this.putBytes(String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},Oa.ByteStringBuffer.prototype.putInt24=function(e){ return this.putBytes(String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},Oa.ByteStringBuffer.prototype.putInt32=function(e){return this.putBytes(String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},Oa.ByteStringBuffer.prototype.putInt16Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255))},Oa.ByteStringBuffer.prototype.putInt24Le=function(e){ return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255))},Oa.ByteStringBuffer.prototype.putInt32Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>24&255))},Oa.ByteStringBuffer.prototype.putInt=function(e,t){var n="";do{t-=8,n+=String.fromCharCode(e>>t&255)}while(t>0);return this.putBytes(n)},Oa.ByteStringBuffer.prototype.putSignedInt=function(e,t){ return e<0&&(e+=2<0);return t},Oa.ByteStringBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),n=2<=n&&(t-=n<<1),t},Oa.ByteStringBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):0===e?t="":(t=0===this.read?this.data:this.data.slice(this.read),this.clear()),t},Oa.ByteStringBuffer.prototype.bytes=function(e){ return void 0===e?this.data.slice(this.read):this.data.slice(this.read,this.read+e)},Oa.ByteStringBuffer.prototype.at=function(e){return this.data.charCodeAt(this.read+e)},Oa.ByteStringBuffer.prototype.setAt=function(e,t){return this.data=this.data.substr(0,this.read+e)+String.fromCharCode(t)+this.data.substr(this.read+e+1),this},Oa.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)},Oa.ByteStringBuffer.prototype.copy=function(){ var e=Oa.createBuffer(this.data);return e.read=this.read,e},Oa.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this},Oa.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this},Oa.ByteStringBuffer.prototype.truncate=function(e){var t=Math.max(0,this.length()-e);return this.data=this.data.substr(this.read,t),this.read=0,this},Oa.ByteStringBuffer.prototype.toHex=function(){ for(var e="",t=this.read;t0;)1&t&&(n+=e),(t>>>=1)>0&&(e+=e);return n},Oa.encodeUtf8=function(e){return unescape(encodeURIComponent(e))}, Oa.decodeUtf8=function(e){return decodeURIComponent(escape(e))};var Da=Ba.sha256=Ba.sha256||{};Ba.md=Ba.md||{},Ba.md.algorithms=Ba.md.algorithms||{},Ba.md.sha256=Ba.md.algorithms.sha256=Da,Da.create=function(){La||(ja=String.fromCharCode(128),ja+=Ba.util.fillString(String.fromCharCode(0),64), Fa=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298], La=!0);var e=null,t=Ba.util.createBuffer(),r=new Array(64),s={algorithm:"sha256",blockLength:64,digestLength:32,messageLength:0,messageLength64:[0,0],start:function(){return s.messageLength=0,s.messageLength64=[0,0],t=Ba.util.createBuffer(),e={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225},s}};return s.start(),s.update=function(i,o){return"utf8"===o&&(i=Ba.util.encodeUtf8(i)),s.messageLength+=i.length, s.messageLength64[0]+=i.length/4294967296>>>0,s.messageLength64[1]+=i.length>>>0,t.putBytes(i),n(e,r,t),(t.read>2048||0===t.length())&&t.compact(),s},s.digest=function(){var i=Ba.util.createBuffer();i.putBytes(t.bytes()),i.putBytes(ja.substr(0,64-(s.messageLength64[1]+8&63))),i.putInt32(s.messageLength64[0]<<3|s.messageLength64[0]>>>28),i.putInt32(s.messageLength64[1]<<3);var o={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4,h5:e.h5,h6:e.h6,h7:e.h7};n(o,r,i);var a=Ba.util.createBuffer() ;return a.putInt32(o.h0),a.putInt32(o.h1),a.putInt32(o.h2),a.putInt32(o.h3),a.putInt32(o.h4),a.putInt32(o.h5),a.putInt32(o.h6),a.putInt32(o.h7),a},s};var ja=null,La=!1,Fa=null;Oa.hasWideChar=function(e){for(var t=0;t>>8)return!0;return!1};const Pa=function(e,t){var n=Ba.md.sha256.create();return n.update(e,"UTF-8"==t||void 0===t&&Oa.hasWideChar(e)?"utf8":void 0),n.digest().toHex()},Na=["md5","sha256","sha1","sha384","sha512"],Va=(()=>{const e=e=>{ const t=[],n=new DataView(e);for(let e=0;e{try{return e($e(Je(t)))}catch(e){return null}},n={md5:(e,t)=>R.Pledge(tt(e,t)),sha256:(e,t)=>R.Pledge(Pa(e,t))},r={};["SHA-1","SHA-384","SHA-512"].forEach((t=>{const n=t.toLowerCase().replace("-","");r[n]=()=>{const n=(n,r)=>{const s=R();return ne.subtle.digest(t,$e(n,{encoding:r})).then((t=>{s.resolve(e(t))}),(()=>{s.reject()})), s.promise()};try{return n("").then((e=>e&&e.substr(0,4).toLowerCase().match(/[0-9a-f]{4,4}/)?n:R.Breach()))}catch(e){return R.Breach()}}}));const s=e=>Object.keys(n).includes(e),i=e=>(...t)=>{if(!1!==o){const n=R();return o.push((()=>n.consume(e(...t)))),n.promise()}return e(...t)};let o=[];const a={init:()=>(_.get()>=60&&Object.keys(n).forEach((e=>_.log("sri:",e,"is supported"))),R.sidebyside(Object.keys(r).map((e=>r[e]().done((t=>{_.log("sri:",e,"is supported"),n[e]=t})).fail((()=>{ _.log("sri:",e,"is unsupported")}))))).always((()=>{if(!1===o)return;const e=o;o=!1,e.forEach((e=>e()))}))),isSupported:i((e=>R.Pledge(s(e)))),getHash:i(((e,n)=>{const r=R(),i="string"==typeof e?zn(e):e;if(i&&i.hash){let e;const o=i.hash.replace(/^#/,"").split(/,|;/g);for(let n=0;nt&&e&&s(e.type)?n[e.type](t,r).then((t=>t===e.value?R.Pledge(!0):R.Breach({type:e.type,value:t}))):R.Breach()))};return a})(),za=Va;let qa;const Ha=()=>{if(!qa)throw new Error("Offscreen document not available");return qa({justification:"XML parsing",reasons:[Hi.DOM_PARSER]})},Qa=async e=>{{const t=await Ha();try{return await t.send({action:"xmlToWebdavResults",doc:e})}finally{t.release()}} },Wa=async e=>{{const t=await Ha();try{return await t.send({action:"xmlToCursor",doc:e})}finally{t.release()}}};let Xa;const Ya=Q({threads:1}),Ja=(e,t)=>{const n=(e?e.split("/"):[]).concat(t?[t]:[]).join("/");return n?("/"==n.substr(0,1)?"":"/")+n:""};let Ka=()=>({get:()=>R.Breach(),set:()=>R.Breach(),delete:()=>R.Breach(),clear:()=>R.Breach()});const $a=e=>{const t=(e.match(/[\dA-F]{2}/gi)||[]).map((e=>parseInt(e,16)));return new Uint8Array(t).buffer},ec=e=>{const t={type:e,request:e=>{ const t=()=>{const t=R(),n=e=>{_.log("rest service: request failed",e),t.reject(e)},r=Object.assign({},e),s="headers"===r.responseType;return s&&delete r.responseType,co(r,{onload:e=>{if([200,201,204,207].includes(e.status)){let n;n=s?ao(e.responseHeaders):e.response,t.resolve({result:n})}else n(e)},onerror:n,ontimeout:()=>n("timed out"),onprogress:e=>t.notify(e),onuploadprogress:e=>t.notify(e)},{internal:!0}),t.promise()};return e.no_queue?t():Ya.add(t)},error:t=>{const n=t;let r ;if(void 0!==n.status){r=n.status.toString();try{r=r+" | "+n.responseText}catch(e){}}else r=t;Ir(e,"error","request: "+r)},wait:e=>(...t)=>e(...t).then((e=>e),(e=>(e=>R.Breach(e?e.responseText||e.statusText:void 0))(e))),changes:(()=>{let e;return{listen:()=>(e||(e=R(),t.watch&&t.watch.start()),e.promise()),notify:t=>{e.notify(t)},stop:()=>(t.watch&&t.watch.stop(),R.Pledge())}})()};return t},tc=e=>{const t=Object.assign({},e),n=t.type;if(void 0===n)throw new Error("Internal error");let r,s,i=[] ;const o=e=>{const t={client_id:u.config.client_id,redirect_uri:u.config.redirect_uri,state:s,scope:u.config.scope,refresh_token:e};return u.config.redirect_uri+"?"+Xn(t)},a=e=>{let t,n;if(e&&0===e.indexOf(u.config.redirect_uri)&&(n=zn(e))&&("string"!=typeof(r=n)&&(r=r.search?r.search.substring(1):r.hash?r.hash.substring(1):""),t=r.split("&").reduce(((e,t)=>{const n=t.split("=");return e[re(n[0])]=re(n[1]),e}),{}))&&(t.access_token||t.error)&&t.state===s)return{uid:t.uid, access_token:t.access_token,refresh_token:t.refresh_token,error:t.error};var r};let c;const l={};Object.defineProperty(l,"credentials",{get:()=>(c||(c=Ka(e.type)),c),enumerable:!1});const u=Object.assign(l,e,{...t,config:{...t.config,auth_prefix:"Bearer"},request:e=>R((async({resolve:t,reject:n})=>{if(!e.no_auth){const t=(await u.credentials.get()).access_token;if(!t)return void n("Authentication failed");e.headers=e.headers||{},e.headers.Authorization=u.config.auth_prefix+" "+t}t() })).promise().then((()=>t.request(e))),oauth:(()=>{const e={run:()=>{if(r)return r;let e=R();const t=r=e.promise();s="!!"+n+"-"+Ve();const{redirect_uri:i,refresh_supported:c}=u.config,l=void 0,d=async(t,n)=>{const r=e;e=void 0,await u.credentials.set(n),null==r||r.resolve(),t&&t.close()},A=e=>R((({resolve:t})=>{co({url:e,responseType:"json"},{ondone:e=>t(e)},{internal:!0})})).promise();return u.credentials.get().then((async e=>{const t=e.refresh_token;if(c&&t){let e,r=1e3,s=4 ;const i=[200,400,401,403,404,405,406,408,412],a=o(t);for(;!e;)e=await A(a),e&&i.includes(e.status)||!(--s>=0)||(await N(r),r=Math.min(3*r,36e5),e=void 0);if(200==e.status){const t=e.response;if(t){if(!t.error&&t.access_token){const{access_token:e,refresh_token:n,basic_auth:r,uid:s}=t;return void d(null,{access_token:e,refresh_token:n,basic_auth:r,uid:s})}Ir(n,"error","auth refresh token use: "+(t.error||"!access_token"))} }else Ir(n,"error",`auth refresh token use failed with status ${e.status}`)}})).then((()=>{if(!e)return;if(!c)return R.Pledge();const t=R(),r=Xa({url:o(),filter:l});return r.promise.progress((t=>{let s;e&&(s=a(t.url))&&(s.error||!s.access_token?(Ir(n,"error","auth refresh: "+(s.error||"!access_token")),u.config.refresh_supported=!1):d(r,s))})).always(t.resolve),t.promise()})).then((()=>{if(!e)return;const t=R(),r=Xa({url:u.config.request_uri+"?"+Xn({response_type:u.config.response_type, client_id:u.config.client_id,redirect_uri:u.config.redirect_uri,state:s,scope:u.config.scope}),filter:l});return r.promise.progress((t=>{let s;e&&(s=a(t.url))&&(s.error||!s.access_token?Ir(n,"error","auth: "+(s.error||"!access_token")):d(r,s))})).always(t.resolve),t.promise()})).done((()=>{r=void 0,e&&e.reject("auth_failed")})),t},revoke:()=>u.credentials.get().then((e=>{const r=e.access_token;return r?(s=s||"!!"+n+"-"+Ve(),t.request({method:"GET",retry_auth:!1,url:`${rc}/revoke?`+Xn({token:r, state:s})}).then((()=>u.oauth.reset()),(()=>u.oauth.reset()))):R.Breach()})),reset:()=>u.credentials.clear()};return e})(),wait:e=>t.wait(((...t)=>u.credentials.get().then((n=>{if(n.access_token)return e(...t);{const n=R();return i.push((()=>n.consume(e(...t)))),u.oauth.run().done((()=>{i.forEach((e=>e())),i=[]})).fail((e=>{n.reject(e)})),n.promise()}}))))});return u},nc=e=>{let t,n,r,s;const i=R();let o,a,c,l,u,d=null,A=null ;const h=Object.assign({},e),p=e=>h.wait(((...t)=>g.init().then((()=>e(...t))))),f=(e,t)=>{const n=t||{};n.set_current_list&&(o={});const r=g.request({method:"PROPFIND",url:e,headers:{"Content-Type":"text/xml; charset=UTF-8",Depth:void 0!==n.depth?n.depth:1}}).then((async e=>{const t=e.result;if(null==t)return;const r=await Qa(t);if(void 0===r)return;const s=m(r);if(n.set_current_list){const e=await Wa(t);e&&(a=e),s.forEach((e=>{o[e.id]=e}))}return s })).then((e=>void 0===e?R.Breach("not found"):e));return r},m=e=>e.map((e=>{const{id:s,...i}=e,o=s.replace(new RegExp("^("+[Ge(n+t)+"/?",Ge(r+t)+"/?"].join("|")+")"),"");let a;try{a=re(o)}catch(e){a=s}return{id:o,...i,name:a}})),g=Object.assign(e,{...e,config:{...e.config,watch_interval:36e5,root:void 0,path:void 0},request:e=>(e.fetch=!0,e.anonymous=!0,h.request(e).then((e=>e),(t=>{const n=(null==t?void 0:t.status)||-1;return!t||[429,500].includes(n)?(e.backoff=2*(e.backoff||1e3), N(e.backoff).then((()=>g.request(e)))):404==n?R.Pledge(t):(g.error(t),R.Breach(t))}))),init:()=>{if(s)return s;t=Ja(g.config.root,g.config.path),n=g.config.url||"","/"==n.slice(-1)&&(n=n.slice(0,-1));const e=zn(n);if(!e)return R.Breach("invalid url");r=e.pathname,"/"==r.slice(-1)&&(r=r.slice(0,-1));const o=R(),a=s=o.promise();return g.request({method:"OPTIONS",url:`${n}/`,responseType:"headers"}).done((e=>{const t=e.result;let n ;t&&(n=t["access-control-allow-methods"])&&n.includes("EDITOR")&&(u=!0)})).always((()=>{f(`${n}${t}/`,{depth:0}).done((()=>{o.resolve(),i.resolve()})).fail((()=>{const e=[];R.onebyone(t.split("/").filter((e=>e)).map((t=>{e.push(t);const r=e.join("/");return()=>g.request({method:"MKCOL",url:`${n}/${r}/`,headers:{"Content-Type":"text/xml; charset=UTF-8"}}).then((e=>e),(e=>{if(405==((null==e?void 0:e.status)||-1))return R.Pledge(e)}))}))).done((()=>{o.resolve(),i.resolve()})).fail((()=>{s=void 0, o.reject()}))}))})),a},list:p((e=>{const r=f(`${n}${t}/`,{set_current_list:!0}).then((t=>{const n={};return t.map((t=>{if(!e){if(n[t.id])return;n[t.id]=!0}return{name:t.name,id:t.id,size:t.size||0,etag:t.etag,modified:t.modifiedTime,precision:1e3,removed:t.removed}})).filter((e=>e))}));return r})),get:p((e=>{const r=e.id||e;return g.request({method:"GET",url:n+Ja(t,r),headers:{"Content-Type":"text/xml; charset=UTF-8"},responseType:"arraybuffer"}).then((e=>{const t=e.result;return new Blob([t]) }))})),put:p(((e,r,s)=>{const i=e.id||e;let o,a,c;const l={"Content-Type":"application/octet-stream"};let u=!1;return s&&s.lastModified&&(u=null===A,o=s.lastModified,c=new Date(s.lastModified).toISOString(),a=s.lastModified/1e3,(A||u)&&(l["X-OC-Mtime"]=a)),g.request({method:"PUT",url:n+Ja(t,i),headers:l,data_type:"typified",data:{type:"raw",value:r},responseType:"headers"}).then((e=>{const r=e.result;if(r&&u){let e ;A=!("accepted"!=r["x-oc-mtime"]&&(!r.date||!(e=new Date(r.date).getTime())||e!=o&&e!=Math.floor(a)))}if(!A&&!d&&c){const e=()=>{_.warn("WebDAV: no way to set file modification date! This might cause redundant up and downloads."),d=!0};return g.request({method:"PROPPATCH",url:n+Ja(t,i),headers:{"Content-Type":"text/xml; charset=UTF-8"}, data:['','',"","",`${c}`,"","",""].join("")}).then((async t=>{const n=t.result;if(null===n)return;const r=await(async e=>{{const t=await Ha();try{return await t.send({action:"xmlToResponseCodes",doc:e})}finally{t.release()}}})(n);r&&403===r[0]&&e()}),(()=>(e(),R.Pledge())))}}))})),delete:p((e=>{const r=e.id||e;return g.request({method:"DELETE", url:n+Ja(t,r),headers:{"Content-Type":"text/xml; charset=UTF-8"}})})),watch:{start:()=>{if(c)return;let e=100;const r=c=Ve();let s=null;const u=()=>{if(l=void 0,c)if(!1===s){const e=o;f(`${n}${t}/`,{set_current_list:!0}).then((()=>{e&&(Object.keys(e).forEach((t=>{const n=o[t],r=e[t];n?r.modifiedTime!=n.modifiedTime&&h.changes.notify({time:n.modifiedTime,name:n.name,id:n.id}):h.changes.notify({time:Date.now(),name:r.name,id:r.id,removed:!0})})),Object.keys(o).forEach((t=>{if(!e[t]){const e=o[t] ;h.changes.notify({time:e.modifiedTime,name:e.name,id:e.id})}})))})).fail((e=>{_.warn("WebDAV: file changes check failed",e)})).always((()=>{l=ce(u,g.config.watch_interval)}))}else((e,t)=>{const n={"Content-Type":"text/xml; charset=UTF-8",Depth:1,Timeout:90};return t&&(n.Cursor=t),g.request({method:"SUBSCRIBE",url:e,headers:n,no_queue:!0}).then((async e=>{const t=e.result;if(null===t)return R.Pledge({changes:[],cursor:a});const n=await Qa(t);return void 0!==n?{changes:m(n),cursor:await Wa(t) }:void 0})).then((e=>void 0===e?R.Breach():e))})(`${n}${t}/`,a).then((t=>{s=!0;const n=t.changes;a=t.cursor,e=100,n.forEach((e=>{h.changes.notify({time:e.modifiedTime,name:e.name,id:e.id,removed:e.removed})}))}),(()=>{if(null!==s)return e*=2,N(e);s=!1})).always(u)},d=()=>!c||c!==r;i.promise().then((()=>{d()||p((()=>d()?R.Breach():(u(),R.Pledge())))()}))},stop:()=>{c=void 0,l&&(te(l),l=void 0)}},getRemoteUrl:e=>{if(u)return n+Ja(t,e)+"?method=editor#bypass=true"},getRemoteDomains:()=>{var e ;return[((null===(e=zn(n))||void 0===e?void 0:e.origin)||"").replace(/^.*:\/\//,"")]}});return g},rc="https://accounts.tampermonkey.net/e/oauth2/v1",sc={drive:()=>{let e;Ce&&(e=parseInt(Ce.getItem("gdrive_poll_interval")||""))||(e=18e5);const t=tc(ec("drive")),n=Object.assign({},t),r="appDataFolder";let s,i;const o=Object.assign(t,{...t,config:{...t.config,redirect_uri:`${rc}/auth`,refresh_supported:!0,request_uri:"https://accounts.google.com/o/oauth2/v2/auth", client_id:"408438522028-3cgn3t3jas3fak7isbnfod1q4h15g2fv.apps.googleusercontent.com",scope:"https://www.googleapis.com/auth/drive.appdata",response_type:"token",watch_interval:e},request:e=>n.request(e).then((e=>e),(t=>{const n=(null==t?void 0:t.status)||-1;return!t||[403,429,500].includes(n)?(e.backoff=2*(e.backoff||1e3),N(e.backoff).then((()=>o.request(e)))):[400,401].includes(n)?(_.warn("Google Drive: authentication error",t),o.credentials.delete("access_token").then((()=>{ if(!e.retry_auth)return e.retry_auth=!0,o.oauth.run().fail((e=>o.error(e))).then((()=>o.request(e)))}))):404==n?R.Pledge(t):(o.error(t),R.Breach(t))})),list:n.wait((e=>{let t=[];const n=R(),s=e=>"https://www.googleapis.com/drive/v3/files?"+Xn({spaces:r,pageToken:e,orderBy:"modifiedTime desc",fields:"nextPageToken, files(id, size, name, modifiedTime, md5Checksum)",pageSize:500}),i=e=>{o.request({method:"GET",url:e,headers:{"Content-Type":"application/json"}}).then((e=>{ const r=e.result,o=r?JSON.parse(r):{files:[]};if(t=t.concat(o.files),o.nextPageToken)return i(s(o.nextPageToken));n.resolve(t)}))};return i(s()),n.promise().then((t=>{const n={};return t.map((t=>{if(!e){if(n[t.name])return;n[t.name]=!0}return{name:t.name,size:t.size||0,id:t.id,md5:t.md5Checksum,modified:new Date(t.modifiedTime).getTime()}})).filter((e=>e))}))})),get:n.wait((e=>{const t=e.id||e;return o.request({method:"GET",url:"https://www.googleapis.com/drive/v3/files/"+t+"?"+Xn({spaces:r, alt:"media"}),responseType:"arraybuffer"}).then((e=>{const t=e.result;return new Blob([t])}))})),put:n.wait(((e,t,n)=>{const s=e,i=s.name||e,a=s.id,c=Ve();return R.Pledge().then((()=>{if(t)return st(t)})).then((e=>{const t=n&&n.lastModified?new Date(n.lastModified).toISOString():void 0,s=[];return s.push("--"+c),s.push("Content-Type: application/json"),s.push(""),s.push(JSON.stringify({name:i,parents:a?void 0:[r],modifiedTime:t})),s.push("--"+c), e&&(s.push("Content-Type: application/octet-stream"),s.push("Content-Transfer-Encoding: base64"),s.push(""),s.push(Ye(e)),s.push("--"+c+"--")),s.push(""),o.request({method:a||!e?"PATCH":"POST",url:"https://www.googleapis.com/"+(e?"upload/":"")+"drive/v3/files"+(a?"/"+a:"")+"?"+Xn({uploadType:"multipart"}),headers:{"Content-Type":"multipart/related; boundary="+c},data:s.join("\r\n")})}))})),delete:n.wait((e=>{const t=e.id||e;return o.request({method:"DELETE", url:"https://www.googleapis.com/drive/v3/files/"+t+"?"+Xn({spaces:r}),headers:{"Content-Type":"application/json"}})})),revoke:()=>o.oauth.revoke(),compare:(e,t)=>{const n=R();let r;return(r=e.md5)&&r==tt(t,"utf-8")?n.resolve(!0):n.resolve(!1),n.promise()},watch:{start:()=>{if(s)return;let e;s=!0;const t=()=>{i=null,s&&o.request({method:"GET",url:"https://www.googleapis.com/drive/v3/changes/?"+Xn({pageToken:e,spaces:r,pageSize:1e3,includeRemoved:!0}),headers:{"Content-Type":"application/json"} }).then((t=>{const n=t.result;if(!s)return R.Breach();const r=n?JSON.parse(n):{};if(!(e=r.newStartPageToken))return _.warn("Google Drive: watch token error",n),o.watch.stop();r.nextPageToken&&_.warn("Google Drive: too much changes",n),(r.changes||[]).forEach((e=>{let t;const n=e.file;"file"===e.type&&n&&(t=Date.parse(e.time),isNaN(t)&&(t=Date.now()),o.changes.notify({id:n.id,time:t,name:n.name,removed:e.removed}))}))})).fail((e=>{_.warn("Google Drive: file changes check failed",e) })).always((()=>{i=ce(t,o.config.watch_interval)}))};n.wait((()=>s?o.request({method:"GET",url:"https://www.googleapis.com/drive/v3/changes/startPageToken",headers:{"Content-Type":"application/json"}}).then((n=>{const r=n.result,s=r?JSON.parse(r):{};if(!(e=s.startPageToken))return _.warn("Google Drive: watch token error",r),o.watch.stop();t()})):R.Breach()))()},stop:()=>{s=!1,i&&(te(i),i=null)}},getRemoteUrl:void 0});return o},dropbox:e=>{const t=e.path||"";let n ;Ce&&(n=parseInt(Ce.getItem("dropbox_poll_interval")||""))||(n=18e5);const r=tc(ec("dropbox")),s=Object.assign({},r);let i,o,a,c,l=!0;const u=e=>{let n=[];const r=R(),s=e=>{d.request({method:"POST",url:"https://api.dropboxapi.com/2/files/list_folder"+(e?"/continue":""),headers:{"Content-Type":"application/json"},data:{path:e?void 0:Ja(t),cursor:e}}).then((e=>{const t=e.result,i=t?JSON.parse(t):{entries:[]};if(n=n.concat(i.entries),i.has_more&&i.cursor)return s(i.cursor);r.resolve({list:n, cursor:i.cursor})})).fail(r.reject)};return l?(l=!1,d.put(".version",new Blob([ic])).then((()=>{s(e)})).fail(r.reject)):s(e),r.promise()},d=Object.assign(r,{...r,config:{...r.config,redirect_uri:`${rc}/auth`,request_uri:"https://www.dropbox.com/oauth2/authorize",client_id:"gq3auc9yym0e21y",response_type:"token",watch_interval:n?Number(n):0},request:e=>s.request(e).then((e=>e),(t=>{const n=(null==t?void 0:t.status)||-1;return!t||[500,429].includes(n)?(e.backoff=2*(e.backoff||1e3), N(e.backoff).then((()=>d.request(e)))):[401].includes(n)?(_.warn("Dropbox: authentication error",t),d.credentials.delete("access_token").then((()=>{if(!e.retry_auth)return e.retry_auth=!0,d.oauth.run().fail((e=>d.error(e))).then((()=>d.request(e)))}))):(d.error(t),R.Breach(t))})),list:s.wait((e=>u().then((t=>{const n={};return o=t.cursor,t.list.map((t=>{if(!e){if(n[t.name])return;n[t.name]=!0}return{name:t.name,size:t.size,dropbox_hash:t.content_hash, modified:new Date(t.client_modified).getTime(),precision:1e3}})).filter((e=>e))})).always((()=>{i&&o&&(i(),i=null)})))),get:s.wait((e=>{const n=e.name||e;return d.request({method:"POST",url:"https://content.dropboxapi.com/2/files/download",headers:{"Dropbox-API-Arg":JSON.stringify({path:Ja(t,n)})},responseType:"arraybuffer"}).then((e=>{const t=e.result;return new Blob([t])}))})),put:s.wait(((e,n,r)=>{ const s=e.name||e,i=r&&r.lastModified?(new Date(r.lastModified).toISOString().match(/[^:]*:[^:]*:[^:.a-zA_Z]*/)||"")[0]+"Z":void 0;return d.request({method:"POST",url:"https://content.dropboxapi.com/2/files/upload",headers:{"Dropbox-API-Arg":JSON.stringify({path:Ja(t,s),client_modified:i,mode:"overwrite"}),"Content-Type":"application/octet-stream"},data_type:"typified",data:{type:"raw",value:n}})})),delete:s.wait((e=>{const n=e.name||e;return d.request({method:"POST", url:"https://api.dropboxapi.com/2/files/delete",headers:{"Content-Type":"application/json"},data:{path:Ja(t,n)}})})),revoke:()=>d.credentials.get().then((e=>e.access_token?s.request({method:"POST",url:"https://api.dropboxapi.com/2/auth/token/revoke"}).always((()=>d.oauth.reset())):R.Breach())),compare:(e,t)=>{const n=R(),r=4194304,s=$e(t,{encoding:"utf-8"}),i=[],o=s.byteLength;let a=1;const c=async()=>{if(0==--a){let t=new ArrayBuffer(0);i.forEach((e=>{e&&(t=((e,t)=>{ const n=new Uint8Array(e.byteLength+t.byteLength);return n.set(new Uint8Array(e),0),n.set(new Uint8Array(t),e.byteLength),n.buffer})(t,e))}));const r=await et(t),s=Pa(r,"ASCII");n.resolve(s==e.dropbox_hash)}};for(let e=0,t=0;t{i.push(null),a++,et(s.slice(t,t+Math.min(r,o-t))).then((t=>{const n=Pa(t,"ASCII");i[e]=$a(n),c()}),(()=>{_.warn("Dropbox: unable to calculate SHA-256 hashes"),n.reject()}))})(e);return c(),n.promise()},watch:{start:()=>{if(a)return;a=!0;let e=0 ;const t=()=>{if(c=null,e=0,a)return o?void d.request({method:"POST",url:"https://notify.dropboxapi.com/2/files/list_folder/longpoll",headers:{"Content-Type":"application/json"},no_auth:!0,no_queue:!0,data:{cursor:o,timeout:180}}).then((t=>{const n=t.result;if(!a)return R.Breach();const r=n?JSON.parse(n):{};return r.backoff&&(e=1e3*r.backoff),r.changes?N(6e4).then((()=>u(o))).then((e=>(o=e.cursor)?e.list:(_.warn("Dropbox: watch token error",n),d.watch.stop()))):null})).then((e=>{ e&&e.forEach((e=>{let t;const n=e[".tag"];["file","deleted"].includes(n)&&(t=Date.parse(e.server_modified),d.changes.notify({id:e.id,time:t,name:e.name,removed:"deleted"==n}))}))})).fail((e=>{_.warn("Dropbox: file changes check failed",e)})).always((()=>{c=ce(t,e+d.config.watch_interval)})):(_.warn("Dropbox: watch token error",o),d.watch.stop())};s.wait((()=>a?(o?t():i=t,R.Pledge()):R.Breach()))()},stop:()=>{a=!1,c&&(te(c),c=null)}},getRemoteDomains:()=>["dropbox.com","dropboxapi.com"], getRemoteUrl:void 0});return d},onedrive:e=>{const t=e.path||"";let n,r;n=18e5;const s=tc(ec("onedrive")),i=Object.assign({},s);let o,a;const c=e=>{const n=R();let s=[];const i=o=>{l.request({method:"GET",url:o||"https://api.onedrive.com/v1.0/drive/special"+(t?"/approot:"+Ja(t)+":/children":"/approot/children"),headers:{"Content-Type":"application/json"}}).then((t=>{const o=t.result,a=o?JSON.parse(o):{value:[]};if(s=s.concat(a.value.map((e=>{var t,n,r ;const s=(null===(t=null==e?void 0:e.fileSystemInfo)||void 0===t?void 0:t.lastModifiedDateTime)||0,i=(null===(r=null===(n=null==e?void 0:e.file)||void 0===n?void 0:n.hashes)||void 0===r?void 0:r.sha1Hash)||void 0;return{id:e.id,name:e.name,size:e.size,sha1:i,modified:new Date(s).getTime()}}))),a["@odata.nextLink"])return i(a["@odata.nextLink"]);e.set_current_list&&(r=s),n.resolve(s)})).fail((e=>n.reject(e)))};return i(),n.promise()},l=Object.assign(s,{...s,config:{...s.config, redirect_uri:`${rc}/auth`,refresh_supported:!0,request_uri:"https://login.live.com/oauth20_authorize.srf",client_id:"000000004C1A3122",response_type:"token",scope:"onedrive.appfolder",watch_interval:18e5},request:e=>i.request(e).then((e=>e),(t=>{const n=(null==t?void 0:t.status)||-1;return!t||[429,500].includes(n)?(e.backoff=2*(e.backoff||1e3),N(e.backoff).then((()=>l.request(e)))):[401,403].includes(n)?(_.warn("OneDrive: authentication error",t),l.credentials.delete("access_token").then((()=>{ if(!e.retry_auth)return e.retry_auth=!0,l.oauth.run().fail((e=>l.error(e))).then((()=>l.request(e)))}))):404==n?R.Pledge(t):(l.error(t),R.Breach(t))})),list:i.wait((()=>c({set_current_list:!0}))),get:i.wait((e=>{const n=e.name||e;return l.request({method:"GET",url:"https://api.onedrive.com/v1.0/drive/special/approot:"+Ja(t,se(n))+":/content",responseType:"arraybuffer"}).then((e=>{const t=e.result;return new Blob([t])}))})),put:i.wait(((e,n,r)=>{ const s=e.name||e,i=se(s.replace(/[#%<>:"|?*/\\]/g,"-"));return l.request({method:"PUT",url:"https://api.onedrive.com/v1.0/drive/special/approot:"+Ja(t,i)+":/content",headers:{"Content-Type":"application/octet-stream"},data_type:"typified",data:{type:"raw",value:n}}).then((e=>{const t=r&&r.lastModified?new Date(r.lastModified).toISOString():void 0;if(!t)return e;const n=e.result,s=JSON.parse(n);return l.request({method:"PATCH",url:"https://api.onedrive.com/v1.0/drive/items/"+s.id,headers:{ "Content-Type":"application/json"},data:JSON.stringify({fileSystemInfo:{lastModifiedDateTime:t}})})}))})),delete:i.wait((e=>{const n=e.name||e;return l.request({method:"DELETE",url:"https://api.onedrive.com/v1.0/drive/special/approot:"+Ja(t,se(n))})})),revoke:()=>l.oauth.revoke(),watch:{start:()=>{if(o)return;o=!0;const e=()=>{if(a=null,!o)return;const t=r;c({set_current_list:!0}).then((()=>{if(!t)return;const e={},n={};r.forEach((t=>{e[t.id]=t})),t.forEach((e=>{n[e.id]=e})), Object.keys(n).forEach((t=>{const r=e[t],s=n[t];r?s.modified!=r.modified&&l.changes.notify({time:r.modified,name:r.name}):l.changes.notify({time:Date.now(),name:s.name,removed:!0})})),Object.keys(e).forEach((t=>{if(!n[t]){const n=e[t];l.changes.notify({time:n.modified,name:n.name})}}))})).fail((e=>{_.warn("OneDrive: file changes check failed",e)})).always((()=>{a=ce(e,l.config.watch_interval)}))};i.wait((()=>o?(e(),R.Pledge()):R.Breach()))()},stop:()=>{o=!1,a&&(te(a),a=null)}}, getRemoteDomains:()=>["onedrive.live.com"],getRemoteUrl:void 0});return l},yandex:()=>{let e;e=18e5;const t=tc(ec("yandex")),n=nc(t),r=Object.assign({},n);let s;const i=Object.assign(n,{...t,...n,config:{...n.config,root:"/Programs/Tampermonkey",url:"https://webdav.yandex.ru",redirect_uri:`${rc}/auth`,refresh_supported:!0,request_uri:"https://oauth.yandex.com/authorize",client_id:"a591fcd2ccd248f0baa84222898065f4",response_type:"token",auth_prefix:"OAuth",watch_interval:18e5},init:()=>{ if(s)return s;const e=R();return s=e.promise(),i.request({method:"GET",url:"https://cloud-api.yandex.net/v1/disk/"}).done((e=>{const t=e.result,n=t?JSON.parse(t):{};n.total_space&&n.used_space&&(n.used_space+5e7>n.total_space?_.warn("Yandex: low disk space warning, only "+(n.total_space-n.used_space)+" bytes available"):_.log("Yandex: "+(n.total_space-n.used_space)+" bytes on disk available!"))})).always((()=>{e.consume(r.init())})),s},getRemoteDomains:()=>["disk.yandex.com"], getRemoteUrl:void 0,list:e=>r.list(e).then((e=>e.map((e=>(e.md5=e.etag,e))))),request:e=>(()=>{const t=e.headers=e.headers||{};if(t["X-Requested-With"]="XMLHttpRequest","PUT"==e.method&&io(e.data)&&"raw"==e.data.type&&e.data.value){const n=R();return st(e.data.value).then((e=>{const n=e||"";t.Etag=tt(n),t.Sha256=Pa(n,"ASCII")})).always(n.resolve),n.promise()}return R.Pledge()})().then((()=>r.request(e))).then((e=>e),(t=>{const n=(null==t?void 0:t.status)||-1 ;return[401].includes(n)?(_.warn("Yandex: authentication error",t),i.credentials.delete("access_token").then((()=>{if(!e.retry_auth)return e.retry_auth=!0,i.oauth.run().fail((e=>i.error(e))).then((()=>r.request(e)))}))):t})),compare:(e,t)=>{const n=R();let r;return(r=e.md5)&&r==tt(t,"utf-8")?n.resolve(!0):n.resolve(!1),n.promise()},revoke:()=>i.oauth.revoke()});return i},webdav:e=>{let t;t=18e5;const n=e.url;if(n){const t=n.toLowerCase() ;t.startsWith("webdav")?e.url=n.replace(/^webdav/i,"http"):t.startsWith("http")||(e.url=`http://${n}`)}const r=nc((e=>{const t=Object.assign({},e);if(void 0===t.type)throw new Error("Internal error");const n=Object.assign(e,{...t,config:{...t.config},credentials:{get:()=>R.Pledge({basic_auth:n.config.basic_auth}),set:()=>R.Breach(),delete:e=>R((({resolve:t,reject:r})=>{"basic_auth"===e?(delete n.config[e],t()):r()})).promise(),clear:()=>R.Breach()},request:e=>R((async({resolve:t,reject:r})=>{ if(!e.no_auth){const t=(await n.credentials.get()).basic_auth;if(!t)return void r("Authentication failed");e.headers=e.headers||{},e.headers.Authorization="Basic "+t}t()})).promise().then((()=>t.request(e))).then((e=>e),(t=>{if(!e.no_auth){const e=(null==t?void 0:t.status)||-1;[401].includes(e)&&(_.warn("basic auth: authentication error",t),n.credentials.delete("basic_auth"))}return t})),wait:e=>t.wait(((...t)=>e(...t)))});return n})(ec("webdav")));return Object.assign(r,{...r,config:{ ...r.config,root:"Tampermonkey",watch_interval:18e5,...e}})}};let ic;const oc=Object.keys(sc),ac=new qe,cc={drive:"gd_config",dropbox:"db_config",onedrive:"od_config",yandex:"ya_config"},lc=()=>{const e=nn.getValue(G.STORAGE.UPDATE,{})||{};let{scripts:t,black:n}=e;return null==n&&(n=Object.assign({},{version:0,last:0})),null==t&&(t=0),{black:n,scripts:t}},uc=function(e){e&&nn.setValue(G.STORAGE.UPDATE,e)},dc=((e,t,n)=>{const r=new it(1),s={},i={},o={},a={},c={} ;if(void 0===t)throw new Error("alarm: storage or setTimeout++ needs to be provided");const l=(e=>e&&"function"==typeof e.setTimeout)(t),u=l?t:void 0,d=l?void 0:t,A=n;let h=[];const p=async e=>{const t=e.name;if(console.debug(`alarm: onAlarm[${t}]`,e),t){await r.acquire(),console.debug(`alarm: onAlarm[${t}] mutex acquired`,a,c);const n=c[t],s=a[t];n&&s?(m(n.type,...n.args), void 0===e.periodInMinutes&&await v([t])):(n?console.warn(`alarm: onAlarm[${t}|${n.type}] - no alarm for alarm`):console.warn(`alarm: onAlarm[${t}] - no data for alarm`),await v([t])),console.debug(`alarm: onAlarm[${t}] mutex release`),h=h.filter((e=>e.name!==t)),r.release()}},m=(t,...n)=>{e((()=>{console.debug(`alarm: emit[*|${t}]`,n);const e=s[t];if(e)for(const t of e)if(!0===t(...n))return}))},g=(e,t)=>{const{clearTimeout:n,clearInterval:r}=t;let s=!1;const a=i[e];a&&(n(a),delete i[e],s=!0) ;const c=o[e];return c&&(r(c),delete o[e],s=!0),s},v=async e=>{let t=!1;return console.debug("alarm: internalClear",e),d&&A?await f.all(e.map((e=>(delete a[e],delete c[e],f.all([A.delete(e),d.clear(e).then((e=>t=e||t))]))))):u&&e.forEach((e=>{delete a[e],delete c[e],t=g(e,u)||t})),console.debug("alarm: internalClear done",e,a,c),t},w=(e,t)=>{let n=s[e];return n||(n=[],s[e]=n),n.push(t),()=>_(e,t)},_=(e,t)=>{const n=s[e];if(n){const e=n.indexOf(t);e>=0&&n.splice(e,1)}},b=async e=>{ const t=Array.isArray(e)?e:[e];if(console.debug("alarm: clear",t),d){await r.acquire();const e=await v(t);return r.release(),e}return v(t)};return d&&A&&(r.acquire().then((async()=>{const e=[],t=await A.list();for(const{key:e,value:n}of t)c[e]=n;const n=await d.getAll();h&&n.push(...h);for(const t of n){const n=t.name;c[n]?a[n]=t:(console.warn("alarm: no data for alarm "+n),e.push(n))}Object.keys(c).map((t=>a[t]?null:e.push(t))),e.length&&await v(e),console.debug("alarm: init done",a,c), r.release()})),d.onAlarm.addListener((e=>{h.push(e),p(e)}))),{onAlarm:p,on:w,once:(e,t)=>{const n=w(e,((...e)=>(n(),t.bind(void 0)(...e))));return n},off:_,schedule:async(e,t,...n)=>{const s=e,{when:l,delayInMinutes:h,periodInMinutes:p,keepExistent:w}=t;return await r.acquire().then((async()=>{const e=(Object.entries(c).find((([e,t])=>t.type===s))||[])[0];if(console.debug(`alarm: schedule[?|${s}]`,t,n,e),e&&w)return e;const r=e||Math.random().toString(36).substr(2,10);if(d&&A){ console.debug(`alarm: schedule[${r}|${s}] mutex acquired`),e&&await d.clear(r);const i=c[r]={type:s,args:n};await f.all([A.set(r,i),d.create(r,{when:l,delayInMinutes:h,periodInMinutes:p})]);const o=await d.get(r);o?a[r]=o:console.warn(`alarm: schedule[${r}|${s}] unable to create alarm`,t),console.debug(`alarm: schedule[${r}|${s}] mutex release`)}else if(u){const{setInterval:e,setTimeout:t,getCurrentTime:d}=u,A=d();let f;g(r,u);const w=p?60*p*1e3:void 0;if(f=l?l-A:h?60*h*1e3:w||0,w){ if(w<0)return console.warn(`alarm: schedule[${r}|${s}] - period ${p} is too small`),r;for(;f<0;)f+=w}if(f<0)return console.warn(`alarm: schedule[${r}|${s}] - when ${l} is too small`),r;i[r]=t((()=>{m(s,...n),delete i[s],w?o[r]=e((()=>m(s,...n)),w):v([r])}),f),c[r]={type:s,args:n},a[r]={name:r,scheduledTime:A+f,periodInMinutes:p}}return r})).always((()=>r.release()))},get:e=>a[e],list:()=>d?Object.keys(a):Object.keys(i).concat(Object.keys(o)),clear:b, clearAll:async()=>(console.debug("alarm: clearAll"),d?await b(Object.keys(a)):b(Object.keys(i).concat(Object.keys(o))))}})(k.ensureLate,jt&&jt.supported?jt:{setInterval:ae,setTimeout:ce,clearInterval:ee,clearTimeout:te,getCurrentTime:()=>Date.now()},jt&&jt.supported?js("alarms"):void 0),Ac="broadcast",hc="android_hint",pc=e=>{if("object"!=typeof e||null===e||!("text"in e))return!1;const t=Date.now(),{expires:n}=e;return!n||n>t},fc=an("global_hints","items"),mc=e=>fc.set({[e]:Date.now() }),gc=async(e,t)=>{const n=Date.now();let{timeout:r,id:s,...i}=e;const o=e.key||s||(s=Math.random().toString(36).substr(2,9)),a=await fc.get();if(!t&&Object.entries(a).some((([e,t])=>e===o&&!pc(t))))return;const c=r?n+r:void 0,l={...i,id:s,expires:c};return await fc.set({[o]:l}),{...i,id:s,key:o}},vc=e=>{const{expires:t,...n}=e;return{...n,timeout:t?Math.max(t-Date.now(),1):void 0}},wc=async e=>{const t=(await fc.get())[e];return"number"==typeof t?null:t&&pc(t)?vc(t):void 0 },_c="https://blacklist.tampermonkey.net/get.php",bc=(e,t)=>{let n=!1;if(t.length){if("/"==t.substr(0,1)){const r=Io(t);if(!r)return;n=Uo(e,r)}else n=-1!=e.indexOf(t);return n&&_.log('black: entry "'+t+'" matched'),n}},yc={SEVERITY_MAX:10,SEVERITY_MANUALLY_DEFINED:11,SEVERITY_FOISTED_SCRIPT:12,init:()=>{const e=R();dc.on("blu",(()=>{"server"===wn.values.script_blacklist_type&&yc.checkUpdate()}));const t=()=>{dc.schedule("blu",{when:Date.now()+6e4,keepExistent:!0})};return t(), wn.addChangeListener("script_blacklist_type",t),e.resolve(),e.promise()},getWarningsFor:e=>{const t=[];return e&&Be(wn.values.script_blacklist_server,(n=>{if(!n)return;const{rules:r,reasons:s,reason:i,exclude:o}=n;if(o&&o.includes(j.short_id))return;let a=!1;if(Be(r,(t=>(a=a||!!bc(e,t),1!=a))),a)if(s){const e=qr.getBestLocale(Object.keys(s));t.push(s[e||"en"])}else i&&t.push(i)})),t},getEvilnessOf:e=>{if("off"===wn.values.script_blacklist_type)return 0;if(!e)return 0;let t=!1,n=0 ;return Be(wn.values.require_blacklist,(n=>(t=t||!!bc(e,n),1!=t))),t?n=yc.SEVERITY_MANUALLY_DEFINED:"server"===wn.values.script_blacklist_type&&Be(wn.values.script_blacklist_server,(r=>{if(!r)return;const{rules:s,severity:i,exclude:o}=r;return o&&o.includes(j.short_id)?void 0:(Be(s,(n=>(t=t||!!bc(e,n),1!=t))),t?(n=i,!1):void 0)})),Number(n)},checkUpdate:e=>{const t=R();let n,r=lc();if(e||Date.now()-r.black.last>864e5){const s=(e,t)=>{const n=R(),r={method:"GET",url:e,nocache:t,retries:B.RETRIES, overrideMimeType:"text/plain; charset=x-user-defined"};return yo.internal(r,{ondone:e=>n.resolve(e)}),n.promise()};s(_c+"?version=get").then((t=>{if(4==t.readyState&&200==t.status){try{const e=JSON.parse(t.responseText);n=e.version}catch(e){_.warn("black: unable to parse version response! "+t.responseText)}if(_.info("black: local version: "+r.black.version+" remote: "+n),n>r.black.version||e)return s(_c,!0)}})).then((e=>{if(e&&4==e.readyState&&200==e.status)try{const t=JSON.parse(e.responseText) ;t&&t.blacklist&&1==t.version&&(wn.values.script_blacklist_server=t.blacklist,(e=>{if(oi.removeAll(Ac),e&&e.description){let{name:t,name_i18n:n,description:r,description_i18n:s,expires:i,exclude:o,timeout:a,...c}=e;if(i){const e=Date.now();if(!(i>e))return;a=i-e}if(o&&o.includes(j.short_id))return;t=t||qr.getMessage("Info"),a=a||864e5;const l={name:t,description:r,name_i18n:n||null,description_i18n:s||null,timeout:a,...c},u={key:Ac,realm:"all",class:l.class||"information", title:qr.getTranslation(l,"name"),text:qr.getTranslation(l,"description"),timeout:a};gc(u),oi.all("status",u)}else mc(Ac)})(t.broadcast)),_.info("black: updated blacklist to ",t)}catch(t){_.warn("black: blacklist update failed! ",e.responseText)}})).always((()=>{r=lc(),r.black.last=Date.now(),r.black.version=n||r.black.version,uc(r),t.resolve()}))}else t.resolve();return t.promise()}},kc=yc,Rc={content:"",error:void 0,forbidden:void 0,sri:void 0,determined:void 0,meta:void 0,name:void 0, blacklisted:void 0},xc=(e,t)=>G.PREFIX.EXTERNAL+[e,t?tt(t):null].filter((e=>e)).join(":"),Ec={list:e=>{const t=new RegExp("^"+e);return nn.listValues().filter((e=>-1!=e.search(t)))},set:(e,t,n,r,s)=>{const i=xc(e,t),{content:o,meta:a,name:c,forbidden:l,blacklisted:u,error:d,determined:A,sri:h}=n,p={base:(m=o,$(We(m))),meta:a,name:c,forbidden:l,blacklisted:u,error:d,determined:A,sri:h},f={ts:s||Date.now(),url:t,resource:p,modified:r};var m;nn.setValue(i,f)},get:(e,t)=>{ const n=xc(e,t),r=nn.getValue(n);let s;if(r&&r.resource){const{resource:e,ts:t,url:n,modified:o}=r,{base:a,meta:c,name:l,forbidden:u,blacklisted:d,error:A,determined:h,sri:p}=e;s={ts:t,url:n,data:{content:(i=a,Xe(K(i))),meta:c,name:l,forbidden:u,blacklisted:d,error:A,determined:h,sri:p},modified:o}}var i;return s},clean:(e,t)=>{const n=xc(e,t);nn.deleteValue(n)},cleanAll:(e,t)=>{let n;const r=Ec.list(xc(e));if(t){const s={};Be(t,(t=>{const n=xc(e,t);s[n]=!0})),n=[],Be(r,(e=>{s[e]||n.push(e)})) }else n=r;n.forEach((e=>{nn.deleteValue(e)}))}},Cc=Le(9e3),Sc=(e,t,n,r)=>{const s=R(),{encoding:i,refresh:o}=r,a=!1;let c;return((e,t)=>{const n=R(),r=r=>{let s,i="";if(4!=r.readyState||200!=r.status&&0!=r.status||r.error){const e={...Rc,content:i,meta:s};n.reject(e)}else{let o,a;const c=ao(r.responseHeaders)["content-type"];c&&c.match(/^\s*(image\/|text\/)([+-.a-zA-Z0-9]+)\s*$/)&&(o=c.trim()), o||((a=e.match(/.*\.(ico|jpg|jpeg)+($|\?|#).*/))?o="image/x-icon":(a=e.match(/.*\.(gif|png)+($|\?|#).*/))?o="image/"+a[1]:-1!=e.search(/.*\.(js)+($|\?|#).*/)?o="text/javascript":(a=e.match(/.*\.(css|html|xml)+($|\?|#).*/))?o="text/"+a[1]:(e=>{const t="background.js";let n=L.getURL(t);return n=n.replace(t,"")+"images/",e.length>=n.length&&n==e.substr(0,n.length)})(e)&&(o="image/x-icon")),s=o,i=Ke(r.response,t.encoding)||"";const l={...Rc,content:i,meta:s};n.resolve(l)}},s=({error:e})=>{n.reject({ ...Rc,error:e})},i=zn(e);if(i)if(["file:"].concat(O.INTERNAL_PAGE_PROTOCOLS).includes(i.protocol))if("file:"!=i.protocol||Ft()&&["externals","all"].includes(wn.values.script_file_access))Mt(e,(e=>{r({readyState:4,status:0,response:e,statusText:"",responseHeaders:""})}),(e=>{s({error:e})}));else{const t="Access to this or all local files is forbidden!";_.warn("externals:",t,"Loading the following @resource failed:",e,"-> more info:","https://www.tampermonkey.net/faq.php#Q204"),s({error:t})}else{ const n={method:"GET",url:e,retries:B.RETRIES,...t.refresh?{revalidate:!0}:{nocache:!1},responseType:"arraybuffer"};n.timeout=wn.values.require_timeout,yo.internal(n,{onload:e=>r(e),onerror:e=>s({error:e.responseText||e.statusText||"unknown error"}),ontimeout:()=>s({error:"timed out"})})}else s({error:"unable to parse url"});return n.promise()})(t,{encoding:i,refresh:o}).done((i=>{n&&(i.sri=n);const o=n=>{const r=zn(t) ;r&&r.protocol&&!["file:"].concat(O.INTERNAL_PAGE_PROTOCOLS).includes(r.protocol)&&Ec.set(e,t,n)};n&&["supported","given"].includes(wn.values.require_sri_mode)?za.check(n,i.content,r.encoding).done((()=>{c=i,o(c),s.resolve({sync:a,resource:c})})).fail((e=>{c={...Rc,forbidden:!0,sri:{mode:wn.values.require_sri_mode,type:n.type,value:"invalid"},determined:e},o(c),s.reject({sync:a,resource:c})})):(c=i,o(c),s.resolve({sync:a,resource:c}))})).fail((n=>{_.log("externals: get.failed",e,t,n),c={...Rc, error:n.error||"internal error"},s.reject({sync:a,resource:c})})),s.promise()},Mc=e=>e.url||e.unsafe_url&&Vn(e.unsafe_url,e.abs_url)||"",Ic=(e,t,n)=>{const r=R(),s=zn(t),i=n.sync;let o,a;return t&&s?kc.getEvilnessOf(t)>=wn.values.script_blacklist_severity?(o={...Rc,blacklisted:!0},r.reject({sync:i,resource:o})):za.getHash(s,"supported"==wn.values.require_sri_mode).done((c=>{if("enforce"!=wn.values.require_sri_mode||c)if("file:"!==s.protocol&&(a=Ec.get(e,t))){const s=xc(e,t),l=Date.now() ;wn.values.external_update_interval>0&&l-a.ts>wn.values.external_update_interval&&(Cc.is(s)||(wn.values.external_update_interval>1&&Cc.add(s),a.modified?_.log("externals: resource is not updated due to user modifications",t,new Date(a.ts).toISOString(),new Date(l).toISOString()):(_.log("externals: resource needs update",t,new Date(a.ts).toISOString(),new Date(l).toISOString()),ce((()=>{Sc(e,t,c,n)}),3e3)))),o=a.data,o.forbidden||o.blacklisted?r.reject({sync:i,resource:o}):r.resolve({sync:i, resource:o})}else r.consume(Sc(e,t,c,n));else o={...Rc,forbidden:!0,sri:{mode:wn.values.require_sri_mode,type:"unsupported",value:""}},r.reject({sync:i,resource:o})})):(o={...Rc,forbidden:!0},r.reject({sync:i,resource:o})),r.promise()},Uc={setElement:(e,t,n,r)=>{const{lastModified:s,...i}=n;return Ec.set(e,t,i,r,s)},getElement:(e,t)=>Ec.get(e,t),updateRequire:(e,t)=>Ic(e,t,{refresh:!0,sync:!1,encoding:"UTF-8"}),updateResource:(e,t)=>Ic(e,t,{refresh:!0,sync:!1}),cleanElement:(e,t)=>Ec.clean(e,t), dropAll:e=>(Ec.cleanAll(e),R.Pledge()),dropAllBut:(e,t)=>(Ec.cleanAll(e,t),R.Pledge()),loadResources:(e,t)=>{const n=R();return Uc.getResources(e,t).always((()=>{n.resolve()})),n.promise()},loadRequires:(e,t)=>{const n=R();return Uc.getRequires(e,t).always((()=>{n.resolve()})),n.promise()},getResources:(e,t)=>{const n=R(),r=[],s=[],i={sync:!0};return t.forEach((t=>{const n=Mc(t),o=t.name;let a,c,l;const u=R();Ic(e,n,i).done((e=>{const t=e.resource;a=t.content,c=t.meta||"application" })).fail((e=>{if(e.resource){const{forbidden:n,sri:r,blacklisted:s,error:i}=e.resource;n?l=r?`can't load @resource '${t.name}' from URL '${t.unsafe_url}' due to a SRI error`:`can't load @resource '${t.name}' from forbidden URL '${t.unsafe_url}'`:s?l=`can't load @resource '${t.name}' from blacklisted URL '${t.unsafe_url}'`:i&&(l=`can't load @resource '${t.name}' from URL '${t.unsafe_url}': ${i}`)}l||(l=`can't load @resource '${t.name}' from URL '${t.unsafe_url}'`),_.warn("externals: "+l) })).always((e=>{i.sync=i.sync&&(!e||e.sync),r.push({name:o,url:n,error:l,content:a,meta:c}),u.resolve()})),s.push(u.promise())})),R.when(s).always((()=>{n.resolve({elements:r,sync:i.sync})})),n.promise()},getRequires:(e,t)=>{const n=[],r=R(),s=[],i={encoding:"UTF-8",sync:!0};return t.forEach(((t,r)=>{const o=Mc(t);let a="";const c=R();Ic(e,o,i).done((e=>{a=e.resource.content||""})).fail((e=>{let n;if(e.resource){const{forbidden:r,sri:s,blacklisted:i,error:o}=e.resource ;r?n=s?`couldn't load @require from URL '${t.unsafe_url}' due to a SRI error`:`couldn't load @require from forbidden URL '${t.unsafe_url}'`:i?n=`couldn't load @require from blacklisted URL '${t.unsafe_url}'`:o&&(n=`couldn't load @require from URL '${t.unsafe_url}': ${o}`)}n||(n=`couldn't load @require from URL '${t.unsafe_url}'`),a=(e=>'console.warn("@require: " + decodeURIComponent("'+se(e)+'"));')(n)+"\n",_.warn("externals: "+n)})).always((e=>{i.sync=i.sync&&(!e||e.sync),n[r]={textContent:a}, c.resolve()})),s.push(c.promise())})),R.when(s).always((()=>{r.resolve({elements:n.filter((e=>e)),sync:i.sync})})),r.promise()}},Gc=Uc;let Zc,Tc;const Bc={},Oc=e=>e&&e.includes("*"),Dc=()=>{const e=e=>{for(let t=0;t{for(;!jc&&(t=e(n.id));)t.fn()}))};let jc,Lc=[];const Fc=(e,t,n,r)=>{const s=((e,t)=>{const n=e=>e?e.map((e=>{let n=e;if(n.match(/^'?self'?$/)){const e=zn(t.url) ;n=(null==e?void 0:e.hostname)||null}else if("'none'"==n)n="none";else{if(["none","localhost","*"].includes(n))return n;if(Pn(n))return n;if(0===n.indexOf("."))return null;if(1===(n.match(/\./g)||[]).length&&Nn(n))return null}return n})).filter((e=>e)):[];return{connects:e.options.override.merge_connects&&"paranoid"!=wn.values.connect_mode?n(e.connects):[],userconnects:n(e.options.override.use_connects),blockers:n(e.options.override.use_blockers)}})(e,t),i=(e=>{const t=R() ;return yl.isAllowed(e)?t.resolve({allowed:!0}):t.resolve({allowed:!1}),t.promise()})(n).then((r=>{if(!0!==r.allowed)return R.Breach("URL is blacklisted");let i,o;return(i=zn(n))&&i.origin&&(o=zn(t.url))&&o.origin&&i.origin===o.origin?R.Pledge({permitted:!0}):((e,t,n)=>{const r=R(),s=()=>{r.resolve({permitted:!0})},i=e=>{r.resolve({permitted:!1,reason:e})},o=()=>{r.resolve({unknown:!0})};let a,c;const l=e=>Oc(e)?s:null,u=(e,t)=>{let n=null;const r=Pn(e);return t.every((({a:t,blocker:o})=>{ if(!t)return!0;for(const a of t)if(a&&(r||Pn(a)?a===e:-1!=e.search(new RegExp("(^|.+\\.)"+Ze(a)+"$"))))return n=o?i:s,!1;return!0})),n};return"off"==wn.values.connect_mode||n.startsWith("data:")||n.startsWith("blob:")?s():(a=zn(n))&&a.hostname?(c=u(a.hostname,[{a:Bc[e.uuid] }]))||(c=l(Bc[e.uuid]))?c():0===t.connects.length&&0===t.userconnects.length&&0===t.blockers.length?"casual"==wn.values.connect_mode?s():"strict"==wn.values.connect_mode?i("No @connects given, but strict mode enabled"):o():t.connects.includes("none")?i("None value found"):("casual"==wn.values.connect_mode&&!Oc(t.blockers)&&(c=l(t.connects))||(c=l(t.userconnects))||(c=u(a.hostname,[{a:t.blockers,blocker:!0},{a:t.connects},{a:t.userconnects}])||o),c()):i("URL can not be parsed"),r.promise() })(e,s,n)})).then((i=>{var o;if(!1===i.permitted)return R.Breach("URL is not permitted"+(i.reason?": "+i.reason:""));if(!0===i.permitted)return R.Pledge();if(0===s.connects.length||Oc(s.connects)){if(["ask","paranoid"].includes(wn.values.connect_mode)){if(Oc(s.blockers))return R.Breach("URL was permanently blocked by the user");if(jc){_.log('cor: queuing access permission check from "'+e.name+'" to',n,t);const s=R();return Lc.push({tabId:null===(o=null==t?void 0:t.tab)||void 0===o?void 0:o.id, fn:()=>{s.consume(Fc.apply(void 0,[e,t,n,r]))}}),s.promise()}return((e,t,n,r,s)=>{const i=R(),o=()=>{i.resolve({approved:!0})},a=()=>{i.resolve({forbidden:!0})};_.log('cor: "'+e.name+'" is asking for permission to access',r,t);const c=zn(r);if(c&&c.hostname){const i=(e=>{if(Pn(e))return;const t=e.split(".");if(t.length<3)return e;const n=Nn(t.slice(-2).join("."))?-3:-2;return t.slice(n).join(".")})(c.hostname),l=t.tab?t.tab.id:null;jc=!0,Mo().then((o=>Ii.askForConnect({src_url:t.url, hostname:c.hostname,domain:i,all_domains:Oc(n.connects),tabid:l,active:l===o.id,timeout:s,url:r,settings_url:mt.getURL("options.html")+"#nav="+e.uuid+"+settings",connect_url:"https://www.tampermonkey.net/documentation.php#_connect",script:{name:qr.getTranslation(e,"name"),uuid:e.uuid,icon:e.icon64||e.icon||ws("unknown")}}))).done((({message:t,aborted:n})=>{let r;if(!t)return _.log("cor: unexpected response",t),void a();const s=t.whole_domain?i:c.hostname ;if(!s)return _.log("cor: internal error",t,i),void a();t.allow?t.once?(_.log('cor: allowing "'+e.name+'" to access',s,"once"),o()):t.temporary?(_.log('cor: allowing "'+e.name+'" to access',s,"temporarily"),void 0===Bc[e.uuid]&&(Bc[e.uuid]=[]),Bc[e.uuid].includes(s)||Bc[e.uuid].push(s),o()):(r=o,t.all_domains?(_.log('cor: allowing "'+e.name+'" to access all domains always'),e.options.override.use_connects.push("*")):(_.log('cor: allowing "'+e.name+'" to access',s,"always"), e.options.override.use_connects.push(s),r=o)):t.once||n?(_.log('cor: denying "'+e.name+'" to access',s,"once"),a()):(e.options.override.use_blockers||(e.options.override.use_blockers=[]),r=a,t.all_domains?(_.log('cor: denying "'+e.name+'" to access any domains (additional) domain'),e.options.override.use_blockers.push("*")):(_.log('cor: denying "'+e.name+'" to access',s,"always"),e.options.override.use_blockers.push(s))),r&&Zc(e.uuid,e,!1).always(r)})).fail(a).always((()=>{jc=!1, Lc.length&&ce(Dc,1)}))}else a();return i.promise()})(e,t,s,n,r).then((e=>!0===e.approved?R.Pledge():R.Breach("Request was blocked by the user")))}return R.Breach()}return R.Breach("This domain is not a part of the @connect list")}));return i},Pc={getSessionConnects:e=>Bc[e]||[],setSessionConnects:(e,t)=>{Bc[e]=t||[]},purgeAppeals:e=>{Lc=Lc.filter((t=>t.tabId!==e))},exec:(e,t,n,r,s)=>{let i,o,a,c,l,u,d,A=e.url;const h=[],p=Math.max(Math.min(e.timeout||0,6e4),2e4),f=()=>{let e ;for(;!d&&(e=h.shift());)e()},m=(t,n)=>{const r='Refused to connect to "'+(n||e.url)+'": '+(t||"Blocked by @connect CORS check"),i=so(r);["onerror","ondone"].forEach((e=>{const t=s[e];t&&t({response:i,exception:r})}))};if(n&&n.url&&n.tab&&e.url&&t&&(o=Tc(t))&&({script:a,cond:c}=o)&&a&&c&&!a.deleted)return Fc(a,n,e.url,p).done((()=>{if(u)return;const t={};for(const[e,r]of Object.entries(s)){if(!r)continue;const s=(e,...t)=>{if(l)return;if(d)return void h.push((()=>s(e,...t)));const o=e ;(o&&o.finalUrl&&A!==o.finalUrl?(d=!0,Fc(a,n,o.finalUrl,p).fail((()=>{u||l||(i&&i.abort(),l=!0,m("Request was redirected to a not whitelisted URL",o.finalUrl),_.warn("cor: request to",A,"was redirect to a not whitelisted URL",o.finalUrl))})).always((()=>{A=o.finalUrl,d=!1,h.length&&ce(f,1)}))):R.Pledge()).always((()=>{l||r({response:o})}))};t[e]=s}i=yo.external(e,t,r)})).fail((e=>{u||(m(e),_.warn("cor: access to",A,"was denied"))})).always((()=>{if(u){const e={response:so("aborted"), exception:"Aborted by user"};s.onabort&&s.onabort(e),s.ondone&&s.ondone(e)}})),{abort:()=>{i?i.abort():u=!0}};m()}},Nc=Pc,Vc=e=>(e.sort(((e,t)=>e.position-t.position)),e),zc=e=>{let t;void 0===e.ask&&(e.ask=!0),e.url||(e.url=""),""===e.force_url&&delete e.force_url;const n={errors:[],info:[],warnings:[],flags:{}},r=R(),s=Date.now(),i=e.save&&!e.ask&&wn.values.editor_easySave;let o;const a=cs(e.src)||void 0;let c;if(a&&(a.name||(c=qr.getMessage("Invalid_UserScript_name__Sry_"))), !a||c)return n.errors.push((c||qr.getMessage("Invalid_UserScript__Sry_"))+"\n\n"),e.name&&n.errors.push(qr.getMessage("Script_name_0name0",e.name)+"\n\n"),e.url&&n.errors.push(qr.getMessage("Downloaded_from_0url0",e.url)),_.warn("scriptman: invalid userscript",n,a),R.Breach({messages:n});const{antifeatures:l,connects:u,name:d,namespace:A,textContent:h,version:p}=a ;let f,m,g,{downloadURL:v,enabled:w,excludes:b,fileURL:y,includes:k,lastModified:x,matches:E,options:C,sync:S,position:M,uuid:I,updateURL:U,system:G}=a;return R.Pledge().then((()=>{let n=e.uuid;if(e.replace&&!n&&(n=Po.getUidsByName(d,A)[0]),n){const e=Po.getByUid(n);e.cond&&e.script&&(t=e.script)}else if(I)n=I;else{if(!e.replace)return _.warn("scriptman: neither UUID, @uuid nor replace option set"),R.Breach();n=Ve()} return n&&""===n.replace(/[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}/,"")?(I=n,R.Pledge(I)):(_.warn("scriptman: invalid UUID",n),R.Breach())})).then((()=>{if(!e.clean&&!e.defaultscript&&t&&t.system)return R.Breach()})).then((()=>{if(e.clean&&e.name&&e.name!=d||-1!=d.indexOf("\n"))return n.errors.push(qr.getMessage("Invalid_UserScript_name__Sry_")),R.Breach()})).then((()=>{if(t){if(t.name!=d&&(n.flags.renamed=!0), e.internal||t.evilness!=kc.SEVERITY_FOISTED_SCRIPT||(n.warnings.push(qr.getMessage("This_is_a_possibly_foisted_script_and_a_modification_will_enable_it_")),n.flags.forceAsk=!0),t.lastModified&&void 0!==e.lastModTime&&t.lastModified!==e.lastModTime){let e=qr.getMessage("some_secs");try{const n=Math.max(1,Math.floor((s-t.lastModified)/1e3));isNaN(n)||(e=n)}catch(e){}n.warnings.push(qr.getMessage("CONFLICT__This_script_was_modified_0t0_seconds_ago_",e)),n.flags.forceAsk=!0} p==t.version&&(e.save?n.flags.modification=!0:n.flags.reset=!0),e.clean&&(n.flags.factory=!0),t.options.user_modified&&(n.flags.user_modified=!0),o=!e.internal}else n.flags.first_install=!0,o=!e.internal||e.save;k.length||E.length||i&&t||e.internal||n.warnings.push(qr.getMessage("This_script_does_not_provide_any__include_information_")),l&&!e.internal&&Object.keys(l).forEach((e=>{const r=l[e];let s ;s=qr.getMessage("ads"==e?"Antifeature_ads":"miner"==e?"Antifeature_miner":"tracking"==e?"Antifeature_tracking":"Antifeature_other");const o=r[qr.getBestLocale(Object.keys(r))||"default"]||r.en||qr.getMessage("Antifeature_no_details");let a,c;t&&t.antifeatures&&(c=t.antifeatures[e])&&(a=c[qr.getBestLocale(Object.keys(c))||"default"]||c.en||qr.getMessage("Antifeature_no_details")),i&&a&&o===a||n.warnings.push(qr.getMessage("Antifeature__0name0__0description0",s,o))})),n.flags.sync=!!e.sync, n.flags.internal=e.internal,n.flags.ask=e.ask,n.flags.save=e.save,n.flags.whitewash=e.whitewash})).then((()=>{if(G=e.defaultscript,M=Wc.determineLastPosition()+1,x=s,e.force_meta){let t;(t=e.force_meta.fileURL)&&(y=t),(t=e.force_meta.lastModified)&&(x=t)}if(n.flags.factory||n.flags.reset)t&&(x=t.lastModified);else if(e.force_url&&(U=null,v=e.force_url),t){C.override=De(t.options.override,{}),C.comment=t.options.comment,C.check_for_updates=t.options.check_for_updates ;const r=t.options.override.orig_tags,s=r?C.tags.filter((e=>!r.includes(e))):C.tags;if(C.tags=t.options.tags.concat(s),h!=t.textContent){const r=t.options.user_modified;if(e.save&&!e.internal){C.user_modified=Date.now();const e=y||v;!wn.values.editor_easySave&&!r&&C.check_for_updates&&e&&"none"!=e&&n.warnings.push(qr.getMessage("Modifying_a_script_will_disable_automatic_script_updates_")) }else!0!==e.replace&&!0!==e.internal&&!0!==e.clean&&!0!==e.whitewash&&r&&n.warnings.push(qr.getMessage("The_script_was_modified_locally_on_0date0__Updating_it_will_overwrite_your_changes_",new Date(r).toLocaleString()))}}C.override.orig_includes=k,C.override.orig_excludes=b,C.override.orig_matches=E,C.override.orig_connects=u,C.override.orig_noframes=C.noframes,C.override.orig_run_at=C.run_at||"document-idle",C.override.orig_run_in=C.run_in||[],C.override.orig_tags=C.tags,C.noframes=null, C.run_at=null,C.run_in=null})).then((()=>{if(t&&(y=t.fileURL,t.deleted||(M=t.position),t.sync&&(S=t.sync),!n.flags.factory&&!n.flags.reset)){w=t.enabled,C.noframes=t.options.noframes,C.run_at=t.options.run_at,C.run_in=t.options.run_in;const{compatopts_for_requires:r,compat_wrappedjsobject:s,compat_metadata:o,compat_foreach:a,compat_powerful_this:c}=t.options;C={...C,compatopts_for_requires:r,compat_wrappedjsobject:s,compat_metadata:o,compat_foreach:a,compat_powerful_this:c}, e.save&&!e.force_url&&(v=t.downloadURL||v);const l=Wc.determineSourceURL(t),d=Wc.determineSourceURL({fileURL:y,downloadURL:v,updateURL:U}),A=l?Qn(l):l||qr.getMessage("_not_set_"),h=d?Qn(d):d||qr.getMessage("_not_set_");if(A==h||i||e.internal||n.warnings.push(qr.getMessage("The_update_url_has_changed_from_0oldurl0_to__0newurl0",[A,h])),!e.save){const e=t.options.override.orig_includes||t.includes,r=t.options.override.orig_matches||t.matches,s=t.options.override.orig_excludes||t.excludes ;Pe(e,k,"notinfirst").length+Pe(r,E,"notinfirst").length+Pe(b,s,"notinfirst").length&&n.warnings.push(qr.getMessage("At_least_one_of_the_include_match_or_exclude_statements_was_changed_")),Pe(t.connects||[],u||[],"notinfirst").length&&n.warnings.push(qr.getMessage("At_least_one_new_connect_statement_was_added_"))}}})).then((()=>{if(t&&!n.flags.factory&&p==t.version){if(e.defaultscript)return R.Breach();if(e.noreinstall)return R.Breach()}})).then((()=>{ t?(n.flags.factory||n.flags.reset?(n.flags.reset?(n.heading=qr.getMessage("You_are_about_to_reinstall_a_UserScript_"),n.flags.reinstall=!0):(n.heading=qr.getMessage("You_are_about_to_install_a_UserScript_"),n.flags.install=!0),e.internal||n.warnings.splice(0,0,qr.getMessage("All_script_settings_will_be_reset_"))):n.flags.modification?n.heading=qr.getMessage("You_are_about_to_modify_a_UserScript_"):as(p,t.version)==as.eOLDER?(n.heading=qr.getMessage("You_are_about_to_downgrade_a_UserScript"), n.flags.downgrade=!0,i||e.internal||n.warnings.splice(0,0,qr.getMessage("The_downgraded_script_might_have_problems_to_read_its_stored_data_"))):(n.heading=qr.getMessage("You_are_about_to_update_a_UserScript_"),n.flags.update=!0),n.info.push({label:qr.getMessage("Installed_Version_"),value:qr.getMessage("v0version0",t.version)})):(n.heading=qr.getMessage("You_are_about_to_install_a_UserScript_"),i||e.internal||n.info.splice(0,0,qr.getMessage("Malicious_scripts_can_violate_your_privacy_")), n.flags.install=!0),i||e.internal||kc.getWarningsFor(Wc.determineSourceURL({fileURL:y,downloadURL:v,updateURL:U})).forEach((e=>{n.warnings.splice(0,0,e)})), n.flags.whitewash?n.action=qr.getMessage("Enable"):n.flags.install?n.action=qr.getMessage("Install"):n.flags.reinstall?n.action=qr.getMessage("Reinstall"):n.flags.modification?n.action=qr.getMessage("Modify"):n.flags.downgrade?n.action=qr.getMessage("Downgrade"):n.flags.update&&(n.flags.user_modified?n.action=qr.getMessage("Overwrite"):n.action=qr.getMessage("Update"))})).then((()=>{if(e.url&&(y=e.url),e.sync&&(S=e.sync),e.force_options&&De(e.force_options,C,us().options,!0),e.force_settings){ const{enabled:t,position:n}=e.force_settings;void 0!==t&&(w=t),void 0!==n&&(M=n)}({options:C,includes:k,excludes:b,matches:E}=Wc.mergeCludes({options:C,includes:k,excludes:b,matches:E}))})).then((()=>{const e=y?y.split("/").slice(0,-1).join("/")+"/":void 0;m=a.requires.map((({url:t})=>({unsafe_url:t,abs_url:e}))),g=a.resources.map((({name:t,url:n})=>({unsafe_url:n,abs_url:e,name:t})))})).then((async()=>{var t;const{compat_wrappedjsobject:r,compat_metadata:s,compat_foreach:i}=C ;(r||s||i)&&n.info.push({label:qr.getMessage("Note"),value:qr.getMessage("A_recheck_of_the_GreaseMonkey_FF_compatibility_options_may_be_required_in_order_to_run_this_script_")});let o,c,l={...a,downloadURL:v,enabled:w,excludes:b,fileURL:y,includes:k,lastModified:x,matches:E,options:C,sync:S,position:M,uuid:I,updateURL:U,system:G};if((o=Wc.determineOrigin(l))&&(c=null===(t=hs[o.token])||void 0===t?void 0:t.convert)){const t=await c(l) ;if(t.info&&("includes added"===t.info?n.info.push(qr.getMessage("Automatically_added_user_includes_for_compatibility_reasons_")):_.warn("scriptman: unknown script convert info",t.info)),t.warning){let r;"deleted by hoster"===t.warning&&(r=qr.getMessage("This_script_was_deleted_by_the_hoster_")),r?e.internal?n.info.push(r):n.warnings.push(r):_.warn("scriptman: unknown script convert warning",t.warning)}l=t.script||l}return f=Wc.getEvilness(l),{...l,uuid:I,textContent:h,evilness:f,requires:m, resources:g}})).done((async e=>{const{textContent:s,...i}=e;let a;if(t){const{textContent:e,...n}=t||{},r=await Qi(new Blob([e],{type:"text/javascript"}),ra);a={...n,tfd:await r.toTransferableData()}}const c=await Qi(new Blob([s],{type:"text/javascript"}),ra),l={script:{...i,tfd:await c.toTransferableData()},oldscript:a,messages:n,trigger_sync:!!o,short_info:[{label:qr.getMessage("Author"),prop:"author"},{label:qr.getMessage("Description"),prop:"description",i18n:!0},{ label:qr.getMessage("Source"),prop:"fileURL"}],hints:[]};r.resolve(l)})).fail((()=>{r.reject({messages:n})})),r.promise()},qc=e=>{const t=R(),n=e.messages,r=e.script,s=n.warnings.length||n.flags.ask,i=e.trigger_sync,o=async()=>{const e=await new Cs(r.tfd).toBlob(),s={...r,textContent:await new Response(e).text()};n.flags.modification||Gc.dropAll(s.uuid),t.notify();const o=Wc.doModify(s.uuid,s,i)||{} ;return n.flags.save||!n.flags.install&&!n.flags.update||n.flags.factory||n.flags.reset||Mr(s.name,n.flags.install?"i":"u",s.fileURL||""),(n.flags.first_install||n.flags.factory)&&Po.setStorageByUid(s.uuid,{ts:Date.now(),data:{}}),o},a={uuid:r.uuid,lastModified:void 0,installed:!0,renamed:n.flags.renamed};if(s){if(mt.inIncognitoContext&&"temporary"==wn.values.incognito_mode){const t={globalhint:!0,options:{id:"incognito",image:"critical", text:qr.getMessage("All_modifications_are_only_kept_a_few_moments_Reconfigure_the_0name0_option_to_save_them_permanently_",qr.getMessage("Store_data_in_incognito_mode"))}};e.hints.push(t)}Ii.install(e).done((async({ok:e,aborted:n,message:r})=>{e&&await o(),t.resolve({installed:e,aborted:n,disable_update:"disable_update"in r?r.disable_update:void 0})})).fail((()=>{t.reject()}))}else ce((async()=>{await o(),t.resolve(a)}),1);return t.promise()},Hc=(e,t)=>{const n=t||{},r=Object.values(e).map((t=>{ let r,s,i;t.evilness&&(t.evilness==kc.SEVERITY_FOISTED_SCRIPT?r=qr.getMessage("The_origin_of_this_script_cant_be_determined_"):t.evilness>=Math.min(kc.SEVERITY_MAX,wn.values.script_blacklist_severity)&&(s=qr.getMessage("This_script_is_blacklisted_"))),t.evilness&&(i=kc.getWarningsFor(Xc.determineSourceURL(t)));const o=n.options_page,a={userscript:!0,foisted:r,blacklisted:s,warnings:i,icon:t.icon64||t.icon||void 0};if(o){const{textContent:r,requires:s,resources:i,...o}=t,c=(e,r)=>{ const s=e.url||Vn(e.unsafe_url,e.abs_url),i=Gc.getElement(t.uuid,s);let o,a,c,l,u,d=0,A=null,h=null;return i&&i.data&&(i.data.content&&(u=i.data.content,d=u.length),h=i.data.sri,A=i.ts,o=i.modified,l=i.data.meta||"text/plain",c=r||/text\/.*|application\/(?:x-)?(?:java|ecma)script/.test(l),a=!0),{display_url:e.url||e.unsafe_url,abs_url:e.abs_url,unsafe_url:e.unsafe_url,url:s,data:{length:d,content:n.externals?u:void 0},sri:h||void 0,ts:A,mimetype:l,editable:a,viewable:c,modified:o} },l=s.map((e=>c(e,!0))),u=i.map((e=>c(e))),d=Xc.determineOrigin(t),A=Xc.isContexter(t),h=Nc.getSessionConnects(t.uuid),p=Po.getStorageByUid(t.uuid),f=Object.keys(p.data).length,m=wl(t),g=t.deleted,v=t.lastUpdated,w=t.downloadURL||t.fileURL||void 0,_=e.length;return{...o,...a,requires:l,resources:u,...n.referrer?{referrer:n.referrer,length:r.length}:{code:r},origin:d,contexter:A,temp_connects:h,...n.storage?{storage:p}:{},storage_key_count:f,remote_url:m,deleted:g,lastUpdated:v,file_url:w, positionof:_}}{const e=Xc.determineOrigin(t),r=n.active_urls||{},s=n.active_counts||{},i=n.all_time_active_counts||{};return{...a,name:t.name,name_i18n:t.name_i18n,uuid:t.uuid,nnew:!1,system:t.system,support:!!t.supportURL||e&&!!e.issue_url,abuse:void 0,active_urls:r[t.uuid],active_count:s[t.uuid],all_time_active_count:i[t.uuid],referrer:n.referrer,contexter:Xc.isContexter(t),enabled:t.enabled,position:t.position,deleted:t.deleted,options:t.options}}}));return r},Qc=Le(1e3),Wc={ determineSourceURL:e=>{if(e)return[e.downloadURL,e.fileURL].filter((e=>{var t;if(!e||"file:"!==(null===(t=zn(e))||void 0===t?void 0:t.protocol))return e}))[0]||void 0},determineMetaURL:e=>{if(!e)return;let t;const n=Wc.determineOrigin(e);return n&&n.meta_header?t=e.fileURL:!e.fileURL||n&&!n.meta_url||(t=e.fileURL.replace(".user.js",".meta.js"),e.fileURL==t&&(t=e.fileURL.replace(".tamper.js",".meta.js")),e.fileURL==t&&(t=null)),[e.updateURL,e.downloadURL,t].filter((e=>{var t ;if(!e||"file:"!==(null===(t=zn(e))||void 0===t?void 0:t.protocol))return e}))[0]||void 0},mergeCludes:e=>{let t,n;const r=e.options.override;if(["includes","excludes","matches"].forEach((t=>{const n=`merge_${t}`,s=`orig_${t}`;e[t]=r[n]&&r[s]?r[s].slice():[]})),r.use_includes)for(t=0;t=0&&e.excludes.splice(n,1),e.includes.push(r.use_includes[t]) ;if(r.use_matches)for(t=0;t=0&&e.excludes.splice(n,1),e.matches.push(r.use_matches[t]);if(r.use_excludes)for(t=0;tzc(e).then(qc),doRemove:(e,t)=>{const n=Po.getByUid(e);if(!n.script||!n.cond)return R.Breach("invalid script");const r=n.script;if(t)Po.removeByUid(e),Po.setStorageByUid(e,void 0),Gc.dropAll(e);else if(Po.softRemoveByUid(e).then((()=>{ vi.emit("scriptEvent",{type:"removed",name:r.name,script:r,sync:!0})})),"off"==wn.values.trash_mode)return Wc.doRemove(e,!0);return R.Pledge()},restore:e=>{const t=Po.getByUid(e);if(!t.script||!t.cond)return R.Breach("invalid script");const n=t.script;return n.deleted?Po.restoreByUid(e).then((()=>{vi.emit("scriptEvent",{type:"added",name:n.name,script:n,sync:!0})})):R.Pledge()},doModify:(e,t,n)=>{void 0===n&&(n=!0);const r=!!nn.getValue(G.PREFIX.META+e) ;return Po.setByUid(e,t).then((()=>n?Gc.loadResources(e,t.resources).then((()=>Gc.loadRequires(e,t.requires))).then((()=>{const n=[].concat(t.resources).concat(t.requires).map((e=>Vn(e.unsafe_url,e.abs_url))).filter((e=>e));return Gc.dropAllBut(e,n)})):R.Pledge())).always((()=>{r?vi.emit("scriptEvent",{type:"changed",name:t.name,script:t,sync:n}):vi.emit("scriptEvent",{type:"added",name:t.name,script:t,sync:n})}))},exportToJson:(e,t)=>{const n=R();let r=Wc.determineScriptsToRun({deleted:!1}) ;e&&(r=r.filter((t=>e[t.uuid])));const{storage:s,externals:i,global_settings:o}=t||{},a={scripts:Hc(r,{options_page:!0,storage:s,externals:i})};return o&&(a.global_settings=nn.getValue(G.STORAGE.CONFIG,{})),n.resolve(a),n.promise()},importFromJson:e=>{if(!e||!e.scripts||!e.scripts.length)return R.Breach("invalid json");const t={},n=[],r=[],s=[],i={},o={};for(const a of e.scripts)try{const e=R(),c=a.uuid||Ve();if("new-user-script"==c)continue;a.storage&&(i[c]=a.storage) ;for(const e of["resources","requires"]){const t=a[e];t&&t.length&&(o[c]=o[c]||{},o[c][e]=t)}const l=a.file_url||a.update_url;zc({uuid:a.uuid,name:a.name,src:a.source,force_settings:{enabled:a.enabled,position:a.position},force_options:a.options,force_meta:{lastModified:a.lastModified},replace:!0,url:l,ask:!1}).done((n=>{const i=Ve();t[i]=n,a.storage&&a.storage.data&&Object.keys(a.storage.data).length&&r.push(i),o[c]&&s.push(i),e.resolve()})).fail((t=>{_.warn("import: Error @ script",a.name,t), e.resolve()})),n.push(e.promise())}catch(e){_.warn("import: Error while importing script",a.name,e)}const a=(()=>{const e=R();return R.when(n).always((()=>{e.resolve()})),e.promise()})().then((()=>Ii.import({scripts:t,storage_ids:r,externals_ids:s,global_settings:!!e.global_settings,hints:mt.inIncognitoContext&&"temporary"==wn.values.incognito_mode?[{globalhint:!0,options:{id:"incognito",image:"critical", text:qr.getMessage("All_modifications_are_only_kept_a_few_moments_Reconfigure_the_0name0_option_to_save_them_permanently_",qr.getMessage("Store_data_in_incognito_mode"))}}]:[]}))).then((({message:e,ok:n,aborted:r})=>{const s=R(),a=[],c=[];if(r)return R.Breach(qr.getMessage("Aborted_by_user"));if(!e)return R.Breach("invalid response");if(n)for(let n,r=0;n=e.import_ids[r];r++)(()=>{const r=n;if(t[r]){t[r].messages.warnings=[];const n=t[r].script.uuid,s=qc(t[r]).progress((()=>{ if(!e.externals_ids.includes(r))return;const t=o[n];["resources","requires"].forEach((e=>{let r;t&&(r=t[e])&&r.length&&r.forEach((e=>{Gc.setElement(n,e.url,{content:e.content||"",meta:e.mimetype||"text/javascript"},e.modified)}))}))})).done((()=>{let t;e.storage_ids.includes(r)&&i[n]&&(t=Po.setStorageByUid(n,{data:i[n].data||{},ts:Date.now()}),c.push(t))}));a.push(s)}})();return R.when(a).always((()=>{Wc.reorderScripts(),R.when(c).always((()=>{s.resolve(e)}))})),s.promise() }),(e=>e.error)).then((t=>{if(e.global_settings&&t.global_settings){const t=nn.setValue(G.STORAGE.CONFIG,e.global_settings).then((()=>(a.done((()=>{ce(Ta.reset,1)})),R.Pledge({global_settings:!0}))));return nn.setTemporary(!0),t}return R.Pledge({})}));return a},installFromUrl:(e,t,n)=>{const r=R(),s={messages:{info:[],errors:[qr.getMessage("Unable_to_load_script_from_url_0url0",e)],warnings:[],flags:{}}};t=t||{};const i=n||{},o=["url",e,JSON.stringify(t)].join("_") ;if(Qc.is(o))return _.debug("scriptman: de-bounced installFromUrl",e),R.Breach(s);Qc.add(o);const a=zn(e);return a&&a.protocol.match(/(https?|file):/)?("file:"!=a.protocol||Ft()||_.warn("scriptman: Access to local files is forbidden! Loading the following script for installation may fail:",e,"-> more info:","https://www.tampermonkey.net/faq.php#Q204"),So(e).then((n=>{const s={url:e,ask:!0,replace:!0,...t};r.consume(Wc.installFromSource(n,s,i))})).fail((e=>{let t;e?(t=s, "file:"!=a.protocol||Ft()||t.messages.warnings.unshift(qr.getMessage("Tampermonkey_has_no_file_access_permission_")),t.heading=qr.getMessage("You_are_about_to_install_a_UserScript_"),i.silent_fail?r.reject(t):Ii.installError(t).always((e=>{r.reject(e)}))):r.reject()})),r.promise()):(_.warn("scriptman: can't install from ",e),R.Breach(s))},installFromSource:(e,t,n)=>{const r=R();t=t||{};const s=n||{},i={src:e,ask:!0,replace:!0,...t};return Wc.doSave(i).done((e=>{r.resolve(!!e.installed) })).fail((e=>{e?(e.heading=qr.getMessage("You_are_about_to_install_a_UserScript_"),s.silent_fail?r.reject(e):Ii.installError(e).always((()=>r.reject()))):r.reject()})),r.promise()},determineLastPosition:()=>{let e=0;return Po.getUidList().forEach((t=>{const n=Po.getByUid(t);n.script&&n.cond?n.script.position&&n.script.position!=Number.MAX_SAFE_INTEGER&&n.script.position>e&&(e=n.script.position):_.warn("scriptman: inconsistent script entry",t)})),e},getEvilness:e=>{let t=0 ;return e.fileURL&&(t=kc.getEvilnessOf(e.fileURL))||e.downloadURL&&(t=kc.getEvilnessOf(e.downloadURL))||e.updateURL&&(t=kc.getEvilnessOf(e.updateURL))?(_.debug("scriptman: found blacklisted script",e),t):0},blackCheckAll:()=>{const e=Po.getUidList().map((e=>{const t=Po.getByUid(e),{script:n,cond:r}=t;if(!n||!r)return;const s=Wc.getEvilness(n);return s!==n.evilness?(n.evilness=s,Wc.doModify(e,n,!1)):void 0})).filter((e=>e));return R.when(e).then((()=>{}))},reorderScripts:(e,t)=>{const n=t||0 ;let r=Wc.determineScriptsToRun();const s=r.reduce(((e,t)=>(e[t.uuid]=t.position,e)),{});if(e)for(let t=0;t(e.deleted?e.position=Number.MAX_SAFE_INTEGER:e.position=i++,s[e.uuid]!==e.position?Wc.doModify(e.uuid,e,!1):R.Pledge())));return R.when(o).then((()=>{}))},getUrlCondition:e=>{const t=nn.getValue(G.PREFIX.COND+e,null);if(!t)return;const{match:n,inc:r,exc:s}=t;let i ;switch(wn.values.script_include_mode){case"off":i={match:n,exc:s};break;case"match":i={match:(n||[]).concat((r||[]).filter((e=>"/"!==e[0]))),exc:s};break;case"unsafe":case"default":i={match:n,inc:r,exc:s}}return i},scriptWillRun:(e,t)=>{if(!t||!e)return;let n=Oo.get(e);if(!n){const t=Wc.getUrlCondition(e);if(!t)return;n=Go(t,!0),Oo.set(e,n)}return!!To(t,n,e)},determineScriptsToRun:e=>{const{enabled:t,warn:n,url:r,deleted:s}=e||{},i=[];return _.log("scriptman: determineScriptsToRun @"+r), Po.getUidList().forEach((e=>{let o=!0,a=0;const c=Po.getByUid(e);if(!(void 0!==t&&c.script&&c.script.enabled!==t||void 0!==s&&c.script&&!!c.script.deleted!==s)){if(r){const t=Date.now();o=!!Wc.scriptWillRun(e,r),a=Date.now()-t}if(c.script&&c.cond){if(n&&a>1e3&&(_.warn("scriptman: checking "+c.script.name+"'s ("+e+") includes and excludes took "+a+"ms!"),oi.all("status",{key:"slowdown",class:"warning", text:qr.getMessage("Script_0name0_is_slowing_down_some_page_loads_",qr.getTranslation(c.script,"name")),timeout:3e5})),!o)return;_.verbose("scriptman: determineScriptsToRun: found script ",c),i.push(c.script)}else _.warn("scriptman: inconsistent script entry",e,c)}})),Vc(i)},isContexter:e=>e.options&&("context-menu"===e.options.run_at||null===e.options.run_at&&"context-menu"===e.options.override.orig_run_at),determineOrigin:e=>{const t=e.fileURL||e.downloadURL||e.updateURL;return t?ps(t):void 0 },clean:e=>{const t=Date.now();Po.getUidList().forEach((n=>{const r=Po.getByUid(n);if(r.script&&r.cond){if(!r.script.deleted)return;{const e="on"===wn.values.trash_mode,s=Math.floor((r.script.deleted+wn.values.trash_cleanup_after-t)/1e3);if(e&&s>=0)return void _.log(`scriptman: script entry in trash ${n} will be cleaned in ${s}s`,r);_.log(`scriptman: script entry in trash ${n} will be cleaned now`,r)}}else _.warn(`scriptman: inconsistent script entry ${n} will be cleaned now`,r) ;e||Wc.doRemove(n,!0)}))}},Xc=Wc,Yc=Xc,Jc=[],Kc={},$c=js("closeableTabs"),el=new it(1);el.acquire().then((async()=>{const e=await $c.list();await f.all(e.map((({key:e})=>{return(t=+e,new Promise((e=>{try{vt.get(t,(t=>{const n=gt.lastError;return e(t),n}))}catch(t){e(void 0),_.warn("getTab error",t)}}))).then((t=>{t?Kc[+e]=!0:$c.delete(e)}));var t})))})).always((()=>el.release()));const tl=(Ce?parseInt(Ce.getItem("inactive_tab_done_timeout")||""):null)||1e3,nl=(e,...t)=>{ k.late?wi.emit("active",e):ce((()=>{nl(e,...t)}),100)},rl=(e,t,n)=>{if(!k.late)return void ce((()=>{rl(e,t,n)}),100);const r=n.pendingUrl||n.url,s=xo({frameId:0},{topframe:!0}),{status:i,mutedInfo:o,audible:a}=t;r?(("legacy"==wn.values.scriptUrlDetection||"manual"!=wn.values.scriptUrlDetection&&r.startsWith("file:"))&&Eo(r)&&Yc.installFromUrl(r,{},{silent_fail:!0}),"loading"==i?wi.emit("loading",{tabId:e,sender:s,url:r,incognito:ko(n)||!1,cookieStoreId:n.cookieStoreId }):"complete"==i&&wi.emit("complete",{tabId:e,sender:s,url:r})):_.warn("tu: no tab url set! ",n);const c={reason:"updated",status:i};o&&(c.muted=!!o.muted&&(o.extensionId?"extension":o.reason||"other")),"boolean"==typeof a&&(c.audible=a),Jc.forEach((e=>{e(c,n)}))},sl=e=>{if(wi.emit("remove",{tabId:e}),Kc[e])return el.acquire().then((async()=>{delete Kc[e],await $c.delete(e.toString())})).always((()=>el.release()));Jc.forEach((t=>{t({reason:"removed"},{id:e})}))},il=(e,t)=>{sl(t),np.setIcon(e), np.setBadge(e),Jc.forEach((t=>{t({reason:"replaced"},{id:e})}))},ol=e=>{if(!k.late)return void ce((()=>{ol(e)}),100);const{url:t,tabId:n}=e,r=xo(e,{topframe:!0});if(wi.emit("commited",{tabId:n,sender:r,url:t}),Ro(r)&&Jc.forEach((e=>{e({reason:"commited"},{url:t,id:n})})),n>=0){const e=e=>{const t=R();return vt.get(e,(e=>{e?t.resolve(e):t.reject()})),t.promise()};e(n).then((e=>{$h(n,r,t,e)}))}},al=e=>{const{tabId:t}=e,n=xo(e);n&&Ro(n)&&wi.emit("reset",{tabId:t,early:!0})},cl={init:()=>{ vt.onUpdated.addListener(rl),vt.onRemoved.addListener(sl),vt.onReplaced.addListener(il),vt.onActivated.addListener(nl),bt.supported&&(bt.onCommitted.addListener(ol),bt.onBeforeNavigate.addListener(al,{url:[{schemes:["http","https"].concat([])}]}))},openAndWatch:function(e,t){let n,r;const{filter:s,url:i,active:o,index:a,parent:c,openerTabId:l,windowId:u,incognito:d}=e,A=(e,i)=>{ (void 0!==n&&i.id===n||s&&i.url&&s.exec(i.url))&&(["updated","commited"].includes(e.reason)?t(i):"removed"==e.reason&&(r&&(te(r),r=void 0),cl.removeListener(A),t()))},h={url:i,active:o,index:a,parent:c,openerTabId:l,windowId:u,incognito:d};return vt.create(h,(s=>{s?(n=s.id,!1===e.active&&(r=ce((()=>{r=void 0,vt.update(s.id,{active:!0},(()=>null))}),tl)),t(s)):_.warn("tab.create failed",e,s)})),cl.addListener(A),{cancel:()=>{cl.removeListener(A),void 0!==n&&vt.remove(n,(()=>{const e=gt.lastError ;e?_.warn("tab.close",e.message):n=void 0}))}}},addListener:e=>{Jc.push(e)},removeListener:e=>{let t;Jc&&(t=Jc.indexOf(e))>-1&&Jc.splice(t,1)}},ll=cl;let ul=0,dl=[],Al=!1;const hl=(()=>{const e=e=>{const t=e.type,n=e.id,r=".meta.json",s=".user.js";let i,o;const a=e=>{let t;return R.Pledge().then((()=>{if(!o)return t=!0,c()})).then((()=>{if(o&&void 0===o[e]&&!t)return c()})).then((()=>o?(o[e]=o[e]||void 0,o[e]):(_.warn("si: unable to list remote list!"),R.Breach())))},c=e=>i.list(e).then((e=>{ o={};const t={},n={};let i,a;const c=Date.now();return e.map((e=>{const{name:l,modified:u}=e;if(!o)return;o[l]=e;const d=new RegExp(r+"$"),A=new RegExp(s+"$");if(u>c)_.log("si: ignore future list item",c,e);else if((i=!!l.match(d))||(a=!!l.match(A))){let r;if(i){r=l.replace(d,"");const n=u,{precision:s}=e;t[r]={uuid:r,options:{},url:void 0,precision:s,lastModified:n}}else a&&(r=l.replace(A,""),n[r]=!!e)}})),Object.keys(t).map((e=>{const r=t[e];return r&&(r.sourceAvailable=n[e]),r })).filter((e=>e))}));let l;const u={init:e=>{const o=l=Ve();return i=sc[t]({...e,path:"sync"}),R.Pledge().then((()=>(i.changes.listen().progress((e=>{o===l&&((e,t)=>{if(t!=ul)return;const n=e.name;_.log("si: cloud file changed",n,e),(n.endsWith(r)||n.endsWith(s))&&dl.forEach((e=>{e(n)}))})(e,n)})),!0)))},disable:()=>{var e;return l=void 0,(null===(e=null==i?void 0:i.changes)||void 0===e?void 0:e.stop())||R.Pledge()},list:c,setSource:(e,t)=>{const n=e+s;return a(n).then((e=>{let r ;return R.Pledge(!1).then((()=>{if(e&&i.compare)return i.compare(e,t)})).then((s=>s?(_.log("si: remote source data matches, skip upload of",n),R.Pledge()):(r=new Blob([t],{type:"text/plain"}),o&&delete o[n],i.put(e||n,r))))}))},getSource:(e,t)=>{const n=e+s;return a(n).then((r=>r?R.Pledge(!1).then((()=>{if(t&&i.compare)return i.compare(r,t)})).then((e=>e?(_.log("si: remote source data matches, skip download of",n), R.Pledge(t)):i.get(r).then((e=>st(e,"utf-8"))).then((e=>e||(_.warn("si: remote source data is empty or broken, skip download of",n),R.Breach()))))):(_.warn("si: list cache does not contain this UUID",e),R.Breach())))},getMeta:e=>a(e+r).then((t=>t?i.get(t).then((e=>st(e,"utf-8"))).then((n=>{let r;if(void 0!==n&&(r=(e=>{let t;try{t=JSON.parse(e)}catch(e){}if(t&&t.uuid)return t;_.log("si: unable to parse extended info of "+void 0)})(n))&&(r.uuid=e)){let{options:n,url:s,precision:i,lastModified:o}=r ;return o=t.modified||o||0,i=t.precision||i,n=n||{},{...r,uuid:e,url:s,options:n,precision:i,lastModified:o}}})):R.Breach())),setMeta:(e,t)=>{const n=new Blob([JSON.stringify(e)],{type:"text/plain"}),s=e.uuid+r;return a(s).then((e=>i.put(e||s,n,t)))},remove:e=>{const t=e.uuid+r;e.options.removed=Date.now();const n=new Blob([JSON.stringify(e)],{type:"text/plain"});return i.put(t,n).then((()=>{const t=e.uuid+s;return a(t).then((e=>{if(e)return o&&delete o[t],i.delete(e)}))}))}, reset:()=>i.list(!0).then((e=>e.filter((e=>{const t=new RegExp(r+"$"),n=new RegExp(s+"$");return e.name.match(t)||e.name.match(n)})))).then((e=>{const t=[];return e.forEach((e=>{t.push((()=>{const t=R();return i.delete(e).always((()=>{t.resolve()})),t.promise()})())})),R.when(t).always((()=>{o=void 0}))})).then((()=>{})),getRemoteUrl:function(e){if(i.getRemoteUrl)return i.getRemoteUrl(e.uuid+s)},getRemoteDomains:function(){if(i.getRemoteDomains)return i.getRemoteDomains()}};return u},t=e({ type:"drive",id:Do.eGDRIVE}),n=e({type:"dropbox",id:Do.eDROPBOX}),r=e({type:"onedrive",id:Do.eONEDRIVE}),s=e({type:"webdav",id:Do.eWEBDAV}),i=e({type:"yandex",id:Do.eYANDEX}),o=(()=>{let e,t=!1;const n=(t,n)=>{ul==Do.eCHROMESYNC&&"sync"==n&&R.Pledge().then((()=>{const r=new RegExp(e+"$");t&&Object.keys(t).forEach((e=>{const s=t[e],o=s.newValue;if(_.log('si: storage key "%s" in namespace "%s" changed. Old value was "%s", new value is "%s".',e,n,s.oldValue,s.newValue), -1!=e.search(r))for(let t=0;t{const t=R();let n=[];return e?s().done((r=>{n=r.filter((t=>t.item.uuid==e)),t.resolve(n)})).fail((e=>{t.reject(e)})):t.resolve(n),t.promise()},s=()=>fl((()=>{const t=R(),n=new RegExp(e+"$");return Ct.sync.get(null,(e=>{const r=[];e&&Object.entries(e).forEach((([e,t])=>{if(-1==e.search(n))return;const s=i(t,e);s&&r.push({key:e,item:s})})),t.resolve(r)})),t.promise()})),i=(e,t)=>{let n;try{ n=JSON.parse(e)}catch(e){}if(n&&(n.url||n.options))return n;_.log("si: unable to parse extended info of "+t)},o=e=>e.then((e=>{const t={};if((e=e.filter((e=>{if(!t[e.key])return t[e.key]=!0,!0}))).length>1){const t=R(),n=[],r=e.pop();return e.forEach((e=>{n.push(l(e.key))})),R.when(n).done((()=>{t.resolve(r)})),t.promise()}return R.Pledge(e[0])}));let a,c={};const l=e=>{const t=R();return Ct.sync.remove(e,(()=>{const e=gt.lastError;e?t.reject(e):t.resolve()})),t.promise()},u=()=>{const e=R() ;return Ct.sync.set(c,(()=>{const t=gt.lastError;t?e.reject(t):(c={},e.resolve())})),e.promise()},d=()=>R.Pledge().then((()=>s())).then((t=>{const n=new RegExp(e+"$"),r=[];return t.forEach((e=>{const t=e.key,s=e.item,o=t.replace(n,"");let a;if(a=c[t]?i(c[t],t):s,!a)return;const l=a.options||{};r.push({uuid:l.removed?o:a.uuid,lastModified:l.removed||a.lastModified,url:a.url,options:l})})),R.Pledge(r)})),A={init:function(){let r=!0;if(!t)try{Ct.onChanged.addListener(n),t=!0}catch(e){ _.warn("si: error registering sync callback: "+e.message),r=!1}return e="@v2",R.Pledge(r)},disable:()=>R.Pledge(),list:d,setMeta:(t,n)=>{const s=R();return o(r(t.uuid)).done((r=>{let i;i=r?r.key:t.uuid+e;const{uuid:o,options:l,url:d}=t,A=(null==n?void 0:n.lastModified)||0,h={...(null==r?void 0:r.item)||{},url:d,options:l||{},uuid:o,lastModified:A};c[i]=JSON.stringify(h),a&&te(a),a=ce(u,3e3),s.resolve()})),s.promise()},getMeta:e=>d().then((t=>{let n;return t.some((t=>{if(t.uuid==e)return n=t,!0 })),n})),remove:t=>{const n=R();return o(r(t.uuid)).done((r=>{let s;s=r?r.key:t.uuid+e;const{url:i,options:o,uuid:l,lastModified:d}=t,A={...(null==r?void 0:r.item)||{},url:i,options:o||{},uuid:l,lastModified:d};A.options.removed=Date.now(),c[s]=JSON.stringify(A),a&&(te(a),a=void 0),a=ce(u,3e3),n.resolve()})),n.promise()},reset:()=>fl((()=>{const e=R();return Ct.sync.clear((()=>{c={},e.resolve()})),e.promise()}))};return A})();return{[Do.eCHROMESYNC]:Ct.sync.supported?o:void 0,[Do.eGDRIVE]:t, [Do.eDROPBOX]:n,[Do.eONEDRIVE]:r,[Do.eWEBDAV]:s,[Do.eYANDEX]:i}})();let pl;const fl=(e,t)=>{const n=R();let r=void 0!==t?t:3;const s=()=>{if(Al)ce(s,500);else{Al=!0;try{e().always((()=>{Al=!1})).done((e=>n.resolve(e))).fail((()=>{--r>0?(_.log("si: some retries left, wait for 60000 ms"),ce(s,6e4)):(_.warn("si: no retries left, skipping this sync request!"),n.reject("no retries left"))}))}catch(e){_.warn(e),Al=!1,n.reject(("string"==typeof e?e:e.message)||"internal error")}}};return s(), n.promise()},ml={init:(e,t)=>(dl=[],ul=e,pl=hl[e],(null==pl?void 0:pl.init(t))||R.Breach()),disable:e=>{const t=hl[e];return t&&t.disable()||R.Breach()},addChangeListener:e=>{dl.push(e)},getRemoteUrl:e=>{if(pl&&pl.getRemoteUrl)return pl.getRemoteUrl(e)},getRemoteDomains:()=>{if(pl&&pl.getRemoteDomains)return pl.getRemoteDomains()},caps:(()=>{const e={};return Object.defineProperties(e,{specialMeta:{get:function(){return pl&&!!pl.getMeta},enumerable:!0},syncsSource:{get:function(){ return pl&&!!pl.getSource},enumerable:!0}}),e})(),types:Do,list:()=>(null==pl?void 0:pl.list())||R.Pledge([]),setMeta:(e,t)=>(null==pl?void 0:pl.setMeta(e,t))||R.Pledge(),getMeta:e=>(null==pl?void 0:pl.getMeta(e))||R.Pledge(),setSource:(e,t)=>(null==pl?void 0:pl.setSource)?pl.setSource(e,t):R.Pledge(),getSource:(e,t)=>(null==pl?void 0:pl.getSource)?pl.getSource(e,t):R.Pledge(),reset:()=>(null==pl?void 0:pl.reset())||R.Pledge(),remove:e=>(null==pl?void 0:pl.remove(e))||R.Pledge()},gl=e=>{ const{uuid:t,name:n,downloadURL:r,fileURL:s,lastModified:i,options:o}=e,a=r?r.split("#")[0]:void 0,c=s?s.split("#")[0]:void 0,l=[c,a].filter((e=>{const t=e?zn(e):void 0;if(!t||"file:"!==t.protocol)return e}))[0],{comment:u,user_modified:d}=o;return{uuid:t,name:n,options:{comment:u||void 0,user_modified:d||void 0},durl:a,furl:c,url:l,lastModified:i||e.lastUpdated}},vl=ml.getRemoteDomains,wl=ml.getRemoteUrl,_l="PageFilter",bl={init:()=>{const e=()=>{Oo.remove(_l)} ;wn.addChangeListener("forbiddenPages",e),wn.addChangeListener("page_whitelist",e),wn.addChangeListener("page_filter_mode",e)},isAllowed:e=>{const t=bl.conditions;return!t||To(e,t)},get conditions(){let e=Oo.get(_l);if(!e){let t=!1,n=!1;const r=(vl()||[]).map((e=>`*://${e}/*`)),s=wn.values.forbiddenPages.concat(r),i=s.length>0,o=wn.values.page_whitelist.length>0;switch(wn.values.page_filter_mode){case"black":n=i;break;case"off":break;case"white":t=o;break;default:t=o,n=i}e=Go({ inc:t?wn.values.page_whitelist:void 0,exc:n?s:void 0}),Oo.set(_l,e)}return e.rinc||e.rexc?e:void 0}},yl=bl,kl=W({timeout:600,check_interval:300,retimeout_on_get:!0});let Rl,xl,El,Cl,Sl,Ml;const Il=e=>{const t=(e=>`${Rl}/api?`+Xn(Object.assign({l:El,q:e},rn(Cl))))(e),n=kl.get(t);if(n)return n;const r=R(),s=r.promise(),i=e=>{r.reject({error:e})};if(Ml&&Ml>Date.now())return i("rate limit or backoff"),s;if(!e.startsWith("http"))return i("unsupported url"),s;Ml=void 0;let o=1;const a=Sl({url:t, headers:{Accept:"application/json, */*"},fetch:!0,responseType:"json"},{onload:e=>{if(200==e.status){const{count:t,url:n}=e.response,s=`${Rl}${n}`;o=1,r.resolve({count:Number(t||0),url:s})}else if(429===e.status){const t=ao(e.responseHeaders),n=Number(t["retry-after"]||15);o=1,n&&(Ml=Date.now()+1e3*n,i("rate limit"))}else o=Math.min(2*o,300),Ml=Date.now()+1e3*o,i(e.responseText||"unknown error")},onerror:e=>{i(e.responseText||e.statusText)},onabort:()=>{i("aborted")},ontimeout:()=>{ i("timed out")}},{internal:!0});return s.abort=()=>null==a?void 0:a.abort(),kl.set(t,s),s},Ul=e=>((e,t)=>{let n,r="",s="";return"click"==Cl?(r="?"+Xn(Object.assign({l:El},rn(Cl))),s="#"+Xn(Object.assign({q:t})),n=`${e}/`+r+s):(r="?"+Xn(Object.assign({l:El,q:t},rn(Cl))),n=`${e}/search?`+r+s),n})(xl,e),Gl=()=>{const e="?"+Xn(Object.assign({l:El},rn(Cl)));return`${Rl}/privacy?`+e},Zl=e=>(delete e.firstPartyDomain,e),Tl={getAll:e=>{const t=R();return It.getAll(Zl(e),(e=>t.resolve(e))),t.promise()}, remove:e=>{const t=R();try{It.remove(Zl(e),(e=>{if(e)t.resolve();else{const e=gt.lastError;t.reject(e?e.message:"unknown error")}}))}catch(e){t.reject(e?e.message:"unknown error")}return t.promise()},set:e=>{const t=R();try{It.set(Zl(e),(e=>{if(e)t.resolve(e);else{const e=gt.lastError;t.reject(e?e.message:"unknown error")}}))}catch(e){t.reject(e?e.message:"unknown error")}return t.promise()},get fpi(){}},Bl={ mkCompat:(e,t,n,r)=>(t&&((t.options.compat_wrappedjsobject||r)&&(e=Bl.unWrappedJsObjectify(e)),(t.options.compat_metadata||r)&&(e=Bl.unMetaDataify(e)),(t.options.compat_foreach||r)&&(e=Bl.unEachify(e))),n||(e=e.replace(/(['"])use strict(['"])/g,"$1use strict$2")),e),findPrototypes:e=>{if(e.includes(".toSource("))return!0;const t=["indexOf","lastIndexOf","filter","forEach","every","map","some","slice"];for(const n in t)if(e.includes(`Array.${t[n]}(`))return!0;return!1},unEachify:e=>{ const t=(e=e.replace(/for each[ \t]*\(/gi,"for each(")).split("for each");for(let e=1;e{let t=e,n=e;const r="<>";let i=t.indexOf(r);for(;-1!=i;){const e=t.substr(0,i),o=e.lastIndexOf("\n");let a="";-1!=o&&(a=e.substr(o,e.length-o)),t=t.substr(i,t.length-i);const c=a.indexOf("/*"),l=a.indexOf("//");if(-1==c&&-1==l){const e=Ue(t,r,s);let i=e;i=i.replace(/\\/g,"\\\\"),i=i.replace(/"/g,'\\"').replace(/\n/g,'\\n" + \n"'),i=i.replace(/^\n/g,"").replace(/\n$/g,""),i=i.replace(/\r/g,"");const o=r+e+s ;n=n.replace(o,'(new CDATA("'+i+'"))')}t=t.substr(1,t.length-1),i=t.indexOf(r)}return n},unWrappedJsObjectify:e=>{const t=e.split("\n");for(let e=0;e{const[n,r]=t;return r.forEach((t=>e[t]=[...e[t]||jl,n])),e}),{}),Fl=Object.keys({GM:!0,unsafeWindow:!0,...Ll }).filter((e=>!e.includes("."))),Pl=new RegExp("[a-z0-9A-Z_$]\\s*(\\.\\s*|\\[\\s*[\"'`])("+Fl.join("\\b|")+"\\b)([\"'`]\\s*\\])?(\\s*)(?!=[^=])(\\S|$)"),Nl=2<<16,Vl=e=>(e.length>Nl?e.split("\n"):[e]).some((e=>!!Pl.test(e.length>Nl?e.substr(Nl):e))),zl=e=>!!e&&void 0!==e.script,ql={},Hl={bundle:e=>{let t,n=ql[e.uuid],r=!0;if(n)return n;let{includes:s,matches:i,requires:o,resources:a,excludes:c,connects:l,textContent:u,...d}=e;const A=JSON.parse(JSON.stringify(e.options));let h,p ;return A.run_at=A.run_at||e.options.override.orig_run_at||"document-idle",A.run_in=A.run_in||e.options.override.orig_run_in,d.options=A,n=Gc.getResources(d.uuid,e.resources).then((t=>(r&&!t.sync&&(_.log("ri: uncached @external detected -> fast script start disabled"),r=t.sync),h=t.elements,Gc.getRequires(d.uuid,e.requires)))).then((e=>{r&&!e.sync&&(_.log("ri: uncached @external detected -> fast script start disabled"),r=e.sync),p=e.elements;const t={resources:h,requires:p,...d} ;return null===A.compat_powerful_this&&(A.compat_powerful_this=Vl(u)||p.some((e=>Vl(e.textContent)))),((e,t,n)=>{const r=R(),s=[];n.forEach((t=>{let n=t.textContent||"";n=Ol.mkCompat(n,e.options.compatopts_for_requires?e:void 0,"off"!=wn.values.runtime_strict_mode),s.push({textContent:n})}));const i=Po.getStorageByUid(e.uuid);let o=Ol.mkCompat(t,e,"off"!=wn.values.runtime_strict_mode);if(wn.values.debug){const e=o.split("\n");let t,n=!1;for(let r=0;r{t=!0,delete ql[d.uuid]})),t||(ql[d.uuid]=n),n}},Ql=Hl;let Wl;const Xl=()=>Wl;let Yl,Jl,Kl=0;const $l={ts:0},eu={},tu=Q({threads:1}),nu={},ru={comment:!0,user_modified:!0},su=!!de.Tests,iu=(e,t)=>tu.add((async()=>{if(!Yl.caps.syncsSource){let t;if(!e.url||!(t=zn(e.url))||!t.protocol.match(/https?:/))return _.log("sync: skip export due to missing URL",e.name,e.url),!1}_.log("sync: export",e.name,e.url),vi.emit("syncProgressEvent",{type:"export", text:qr.getMessage("Export_script_0name0_0uuid0",e.name,e.uuid)});try{return Yl.setSource&&t&&(vi.emit("syncProgressEvent",{type:"export",text:qr.getMessage("Export_script_source_of_0name0",e.name,e.uuid)}),await Yl.setSource(e.uuid,t)),vi.emit("syncProgressEvent",{type:"export",text:qr.getMessage("Export_script_meta_data_of_0name0",e.name,e.uuid)}),await Yl.setMeta(e,{lastModified:e.lastModified}),!0}catch(e){return!1}})),ou=()=>{const e=Po.getUidList().map((e=>{const t=Po.getByUid(e) ;if(t.script&&t.cond&&!t.script.deleted){const e=gl(t.script);return e.lastModified||su?t.script.evilness&&t.script.evilness>=Math.min(kc.SEVERITY_MAX,wn.values.script_blacklist_severity)?void _.warn("sync: ignore evil script",t.script):e:void _.warn("sync: script without updated/modified timestamps found",t.script)}})).filter((e=>e));return e},au=(e,t,n)=>n?Math.floor(e/n)*n{Jl&&(_.verbose("sync: remoteChangeCb()"),uu(500,!0))},lu=()=>{const e=R();let t=!1 ;return R.Pledge().then((()=>{if(wn.values.sync_type){if(wn.values.sync_enabled){let e={};return wn.values.sync_type==Do.eWEBDAV&&(e={url:wn.values.cloud_url||void 0,basic_auth:Ye(wn.values.cloud_user+":"+wn.values.cloud_pass)}),Yl.init(wn.values.sync_type,e).done((e=>{t=e,e?Yl.addChangeListener(cu):_.warn("sync: init failed!")})).fail((()=>{_.warn("sync: init failed!")}))}return Yl.disable(wn.values.sync_type)}})).always((()=>{Jl=t,e.resolve(Jl)})),e.promise()},uu=(e,t)=>{const n=Date.now() ;e=e||500,t=$l.force||t,$l.to?(te($l.to),$l.ts{(e=>{let t=[],n=[],r=0,s=0,i=!0,o=!1;const a=e=>{if(e)for(let t=0;t{if(void 0===Jl&&e)return Au()})).then((()=>Jl?Kl>0?(e&&vi.once("syncFinished",(t=>{t&&uu(50,e)})),R.Breach()):(Kl++,o=!0, _.verbose("sync: start syncing = "+Kl),void oi.all("status",{key:"sync_status",class:"information",title:qr.getMessage("Script_Sync"),text:qr.getMessage("Sync_is_running"),timeout:9e5})):R.Breach())).then((()=>(t=ou(),(vi.emit("syncProgressEvent",{type:"lookup",text:qr.getMessage("Lookup_remote_script_list")}),Yl.list()).done((e=>{n=e})).fail((()=>{_.warn("sync: unable to get remotelist!")}))))).then((()=>{const e=n.map((e=>{let n;const s=(e=>{ if(e)for(let n=0;nR.Pledge().then((()=>Yl.caps.specialMeta?(vi.emit("syncProgressEvent",{type:"lookup", text:qr.getMessage("Lookup_remote_script_0uuid0",e.uuid)}),Yl.getMeta(e.uuid)):R.Pledge(e))).then((e=>{if(!e)return;const{uuid:t,url:a}=e;if(s){if(e.options.removed)r++,vi.emit("syncProgressEvent",{type:"import",text:qr.getMessage("Remove_local_script_0name0_0uuid0",s.name,s.uuid)}),_.log(`sync: remove local script ${t}`,a),Yc.doRemove(s.uuid);else if(i)return c=o,l=e.lastModified, ((u=e.precision)?Math.floor(c/u)*u!=Math.floor(l/u)*u:c!=l)&&(e.lastModified&&_.warn("sync: list and meta data lastModified differ, this will cause extra traffic!","file ts:",new Date(o),"meta ts:",new Date(e.lastModified),e),e.lastModified=o),r++,_.log(`sync: update local script ${t}`,a),vi.emit("syncProgressEvent",{type:"import",text:qr.getMessage("Update_local_script_0name0_0uuid0",s.name,s.uuid)}),R.Pledge().then((()=>{if(Yl.caps.syncsSource&&Yl.getSource){const n=R() ;return Yl.getSource(t,void 0).then((e=>e?Yc.doSave({uuid:t,src:e,ask:!1,internal:!0,save:!0}):R.Breach())).fail((()=>{_.warn(`sync: getting source of ${t} failed`,e)})).always((()=>n.resolve())),n.promise()}})).then((()=>{const{script:n}=Po.getByUid(s.uuid);if(!n)return _.warn(`sync: getting entry ${t} failed`,e),R.Breach();for(const[t,r]of Object.entries(ru))!0===r&&(n.options[t]=e.options[t]||null);return n.lastModified=e.lastModified,Yc.doModify(n.uuid,n,!1)})) }else if(s||e.options.removed)!n&&e.options.removed&&(nu[t]=e);else{const n=R();if(!(a&&eu[a]||t&&eu[t]))return(e=>tu.add((()=>{const{uuid:t,url:n,lastModified:r}=e;vi.emit("syncProgressEvent",{type:"import",text:qr.getMessage("Import_remote_script_0uuid0",e.uuid)}),_.log("sync: import",t,n);const s={imported:wn.values.sync_type},i={};for(const[t,n]of Object.entries(ru))!0===n&&(i[t]=e.options[t]);const o={uuid:t,ask:!1,internal:!0,sync:s,force_meta:{lastModified:r,fileURL:n||void 0}, force_options:i},a={silent_fail:!0};return(Yl.caps.syncsSource&&Yl.getSource?Yl.getSource(t).then((e=>e?Yc.installFromSource(e,o,a):(_.warn("sync: import export due to missing source",t,n),R.Breach())),(()=>{_.warn("sync: import export due to missing source",t,n)})):n?Yc.installFromUrl(n,o,a):(_.log("sync: skip import due to missing URL and source",t),R.Breach())).done((()=>{Bo.removeAll()}))})))(e).done((n=>{n?r++:(_.warn("sync: unable to import",e),a&&(eu[a]=!0),eu[t]=!0)})).fail((()=>{ _.warn("sync: unable to load",e),a&&(eu[a]=!0),eu[t]=!0})).always((()=>n.resolve())),n.promise();_.warn("sync: skip previously failed import",e)}var c,l,u}))})).filter((e=>e));return R.onebyone(e)})).then((()=>(r&&(Yc.reorderScripts(),oi.all("status",{key:"sync",class:"information",title:qr.getMessage("Script_Sync"),text:qr.getMessage("0count0_changes_imported",r),timeout:1e4})),t=ou(),R.Pledge()))).then((()=>{const e=[];for(let n=0;n{const e=t[n];let r,i ;if(!Yl.caps.syncsSource&&!e.url)return R.Pledge();const o=a(e.uuid);var c,l,u;if(o?o.lastModified&&(c=e.lastModified,l=o.lastModified,!((u=o.precision)?Math.floor(c/u)*u>Math.floor(l/u)*u:c>l))||(r=!0,_.log("sync: exportable change detected!",e.name,"remote ts:",new Date(o.lastModified),"local ts:",new Date(e.lastModified),e)):_.log("sync: export because remotely missing!",e.name,"local ts:",new Date(e.lastModified),e),!o||r||Yl.caps.syncsSource&&!o.sourceAvailable){if(Yl.caps.syncsSource){ const t=Po.getByUid(e.uuid);t.script&&t.cond&&(i=t.script.textContent)}return iu(e,i).then((e=>{e&&s++}))}return R.Pledge()})());return R.when(e)})).then((()=>{i=!0})).fail((()=>{i=!1})).always((()=>{if(_.log("sync: finished"),o&&0==--Kl){let e=qr.getMessage(i?"Sync_finished":"Sync_failed");if(oi.all("status",{key:"sync_status",class:"information",title:qr.getMessage("Script_Sync"),text:e,timeout:15e3}),s){const t=qr.getMessage("0count0_changes_exported",s);oi.all("status",{key:"sync", class:"information",title:qr.getMessage("Script_Sync"),text:t,timeout:5e3}),e=`${e}\n${t}`}vi.emit("syncProgressEvent",{type:"finished",success:i,text:e}),vi.emit("syncFinished",i)}}))})($l.force),$l.to=$l.force=void 0}),e)};let du=!0;const Au=()=>R.Pledge().then((()=>{if(du)return du=!1,lu()}));let hu;const pu={get enabled(){return Jl},SYNCED:ru,init:async()=>{dc.on("sync",(()=>{Au().always((()=>{Jl&&pu.sync()}))})),dc.schedule("sync",{delayInMinutes:1,periodInMinutes:10,keepExistent:!0}), Yl=(e=>(((e,t,n)=>{Xa=e=>{let t=R();const n=ll.openAndWatch({url:e.url,filter:e.filter?new RegExp(e.filter):void 0,active:!1},(e=>{e?t&&t.notify(e):t&&(t.resolve(),t=void 0)}));return{promise:t.promise(),close:function(){n.cancel()}}},ic=n,Ka=e=>an("cloud",e,cc)})(0,0,e),ml))(mt.manifest.version),wn.addChangeListener(["sync_enabled","sync_type","cloud_url","cloud_user","cloud_pass"],((e,t,n)=>{"sync_type"==e&&t&&t!==n&&Yl.disable(t),hu||(hu=ce((()=>{hu=void 0,lu()}),3e3))})), vi.on("scriptEvent",(({type:e,name:t,script:n,sync:r})=>{if(!Jl||!r)return;_.verbose(`sync: script ${e} event for ${t} (sync: ${r})`);const s=gl(n);switch(e){case"added":iu(s,n.textContent);break;case"changed":dc.schedule("sync",{periodInMinutes:10,delayInMinutes:1});break;case"removed":(e=>{tu.add((()=>(vi.emit("syncProgressEvent",{type:"export",text:qr.getMessage("Remove_remote_script_0name0_0uuid0",e.name,e.uuid)}),_.log("sync: remove",e.name,e.url),Yl.remove(e))))})(s)}}))},sync:uu, reset:()=>R.Pledge().then((()=>{if(void 0===Jl)return Au()})).then((()=>Jl?Yl.reset():R.Breach()))};de.sycl=pu;const fu=pu,mu=new qe,gu={},vu=(e,{name:t,title:n,accessKey:r,uuid:s})=>tt(`${e}-${s}-${t}-${n}-${r}`),wu=e=>{let t;const{uuid:n,...r}=e,s=Po.getByUid(n);return t=s.script&&s.cond?qr.getTranslation(s.script,"name"):qr.getMessage("This_script_was_deleted"),{uuid:n,scriptName:t,...r}},_u=e=>{const t=Object.values(gu).sort(((e,t)=>e.createdAt-t.createdAt)),n={};for(const r of t){ const{tabId:t,groupId:s}=r;n[s]||void 0!==e&&t!==e||(n[s]=wu(r))}return Object.values(n)},bu={set:e=>{var t;const{tabId:n,name:r,title:s,uuid:i,accessKey:o,autoClose:a,menuId:c}=e,l=(null===(t=gu[c])||void 0===t?void 0:t.createdAt)||Date.now();gu[c]={tabId:n,createdAt:l,name:r,title:s,uuid:i,accessKey:o,autoClose:a,menuId:c,groupId:vu(n,e)}},list:()=>_u(),listByTabId:e=>_u(e),clearByTabId:e=>{const t=Object.values(gu).filter((t=>t.tabId==e));for(const e of t)delete gu[e.menuId]},clearById:e=>{ delete gu[e]},getById:e=>{const t=gu[e];if(t)return wu(t)},fire:(e,t)=>{const n=Object.values(gu).filter((t=>t.groupId==e));for(const e of n)mu.emit("run",{menuId:e.menuId,event:t});n.length||console.warn(`mc: unable to find menu command group ${e}`)},convertToMenuItems:e=>{const t={},n=null==e||null==e?bu.list():bu.listByTabId(e);for(const e of n){const{name:n,title:r,uuid:s,accessKey:i,autoClose:o,groupId:a}=e,c={name:n,title:r,uuid:s,id:a,accessKey:i,autoClose:!1!==o,image:"menu_cmd", menucmd:!0};(t[e.uuid]=t[e.uuid]||[]).push(c)}return t}},yu=bu,ku="root",Ru=["http://*/*","https://*/*","file://*/*"];let xu,Eu,Cu,Su={},Mu={};const Iu=(e,t)=>{const n=e.id;if(Su[n]){const t=e;delete t.id,Gu.update(n,t)}else Gu.create(e);Mu[n]=!0,ce(t,1)},Uu=()=>{const e=R();return Gu.removeAll((()=>{xu=void 0,Su={},e.resolve()})),e.promise()};let Gu;const Zu=e=>{if(!k.late)return k.registerLateCallback((()=>{Zu(e)})),!0;let{id:t,frameId:n,tab:r,url:s,isMenuCommand:i}=e;if(i)yu.fire(t,{ keyCode:void 0,button:0,shiftKey:!1,metaKey:!1,altKey:!1,ctrlKey:!1});else{const e=Po.getByUid(t);if(!e||!e.script)return void _.log("ctxm: unable to find script "+t);const i=e.script;if(i.deleted)return;Ql.bundle(i).then((e=>{const t=R(),i={};let o;void 0!==n?n=i.frameId=n:s?s=Qn(s):o=!0;const a={method:"executeScript",url:s,frameId:n,topframe:o,info:mh({contexters:[],runners:[e]},s,r)};return vt.sendMessage(r.id,a,i,t.resolve),t.promise()}))}},Tu={init:()=>!0===Tt.supported?(Gu=Tt, Gu.onClicked.addListener(((e,t)=>{_.debug(e,t),t&&e.menuItemId&&e.parentMenuItemId&&Zu&&Zu({id:e.menuItemId,tab:t,frameId:e.frameId,url:e.frameUrl||e.pageUrl,isMenuCommand:e.parentMenuItemId!=ku})})),Uu()):R.Pledge(),clean:e=>{if(!Gu)return R.Pledge();const t=R();return e.forEach((e=>{Gu.remove(e,(()=>{const e=gt.lastError;e&&_.warn(e.message),t.resolve()}))})),t.promise()},update:({contexters:e,commands:t})=>{if(!Gu)return R.Pledge();if(Eu){Cu&&Cu.deferred.reject();const n=R();return Cu={ contexters:e,commands:t,deferred:n},n.promise()}if(!e.length&&!t.length)return Uu();const n=Object.keys(Su);return Mu={},Eu=R.Pledge().then((()=>xu||(()=>{const e=R();return Uu().then((()=>{const t=xu=Gu.create({id:ku,contexts:["all"],title:"Tampermonkey",type:"normal",documentUrlPatterns:Ru},(()=>{e.resolve(t)}))})),e.promise()})())).then((()=>{if(t.length)return R.when(t.map((e=>((e,t)=>R.Pledge().then((()=>{const n=R();return Iu({id:e,parentId:ku,contexts:["all"],title:`🛠 ${t}`, type:"normal",documentUrlPatterns:Ru},(()=>n.resolve())),n.promise()})))(e.uuid,e.scriptName))))})).then((()=>((e,t)=>{const n=[];for(const t of e){const e=R();Iu({id:t.uuid,contexts:["all"],parentId:ku,title:`🖱 ${qr.getTranslation(t,"name")}`,type:"normal",documentUrlPatterns:Ru},(()=>e.resolve())),n.push(e.promise())}for(const e of t){const t=R();let r;try{const t=new RegExp("^"+Ze(e.scriptName)+"[ -:+/]*");r=e.name.replace(t,"")}catch(e){_.warn(e)}const s={id:e.groupId,contexts:["all"], parentId:e.uuid,title:`🔧 ${r||e.name}`,type:"normal",documentUrlPatterns:Ru};Iu(s,(()=>t.resolve())),n.push(t.promise())}return R.when(n).then((()=>{}))})(e,t))).always((()=>{const e=Pe(Object.keys(Mu),n,"notinfirst");e.length&&Tu.clean(e),Su=Mu;const t=Cu;Eu=Cu=void 0,t&&Tu.update(t).then(t.deferred.resolve)})),Eu}},Bu=Tu,Ou={check:(e,t,n)=>{if(!e&&wn.values.scriptUpdateCheckPeriod<=0)return R.Breach();let r,s,i=lc() ;return!e&&Date.now()-i.scripts{const e=()=>{s=void 0;const e=qr.getMessage("Script_Update"),t=qr.getMessage("Waiting_for_sync_to_finish")+"...";s=Js(e,t,_s("tampermonkey"),{timeout:6e4})};if(fu.enabled){const n=R();return vi.once("syncFinished",(()=>n.resolve())),fu.sync(50,!1),t&&(r=ce(e,500)),n.promise()}})).then((()=>{if(e)return;const t=R(),n=()=>{Dt(15,(e=>{"active"==e?ce(n,1e3*Math.round(7.5)):r()})) },r=()=>{let e;wt.supported?wt.getAll({},(r=>{r.forEach((t=>{"fullscreen"===t.state&&(e=!0)})),e?ce(n,15e3):t.resolve()})):t.resolve()};return n(),t.promise()})).then((()=>{const o=R();return r&&(te(r),r=void 0),s&&s.cancel(),((e,t,n)=>{let r=0,s=0,i=0;const o=qr.getMessage("Script_Update"),a=qr.getMessage("Check_for_userscripts_updates")+"...";e&&Js(o,a,_s("tampermonkey"),{timeout:1e4});const c=(t?[t]:Po.getUidList()).map((e=>{let o,a;return(()=>{const{script:s,cond:i}=Po.getByUid(e) ;if(!s||!i)return _.warn("update: inconsistent script entry",e,s,i),R.Breach();if(o=s,o.deleted)return R.Breach();const c=!wn.values.scriptUpdateCheckDisabled&&!o.enabled&&!t||!o.options.check_for_updates,l=!!o.options.user_modified;if(!n&&(c||l)||!(a=Yc.determineSourceURL(o)))return R.Breach();if(o.evilness&&o.evilness>=Math.min(kc.SEVERITY_MAX,wn.values.script_blacklist_severity))return R.Breach();let u,d;return(u=Yc.determineOrigin(o))&&(d=hs[u.token])&&!d.updates(a)?R.Breach():(r++, _.info("update: check for script updates @",e),R.Pledge())})().then((()=>{const e=Yc.determineMetaURL(o);if(!e)return R.Pledge(void 0);if("none"==e)return _.debug("update: ignore non-updatable script",o.name),R.Breach();const t=R(),n={method:"GET",retries:B.RETRIES,timeout:6e4,revalidate:!0,headers:{Accept:"text/x-userscript-meta, */*"},url:e};return yo.internal(n,{ondone:n=>{let r;var s;4==n.readyState&&200==n.status&&n.responseText?(s=n.responseText, r=is(s)):_.warn("update: unable to find meta data @ "+e+" req.status = "+n.status),t.resolve(r)}}),t.promise()})).then((e=>e&&e.version&&o.version&&as(e.version,o.version)!=as.eNEWER?(_.verbose("update: version of script "+o.name+" has NOT changed."),R.Breach()):(_.verbose("update: version of script "+o.name+" has changed or doesn't exist -> running version check!"),R.Pledge()))).then((()=>{let e;if(a&&(e=zn(a))){if(e.protocol.match(/(https?|file):/))return So(a).fail((()=>{ _.warn("update: failed",o.name,a)}));_.warn("update: can't download URL",o.name,a)}else _.warn("update: can't parse URL",o.name,a)})).then((e=>{if(e&&((e,t)=>{const n=cs(t);if(!n||!n.name||void 0===n.version)return as.eERROR;let r;if(r=Po.getMetaByUid(e)){if(r.system)return;return n.version==r.version?as.eEQUAL:as(n.version,r.version)}return as.eNEWER})(o.uuid,e)==as.eNEWER){s++;const t={name:qr.getTranslation(o,"name"),url:a,code:e};return R.Pledge(t)}return R.Breach()})).then((e=>{ if(wn.values.notification_silentScriptUpdate)return R.Pledge(e);{const t=qr.getMessage("There_is_an_update_for_0name0_avaiable_",e.name)+"\n"+qr.getMessage("Click_here_to_install_it_"),n=qr.getMessage("Just_another_service_provided_by_your_friendly_script_updater_")+":",r=R();return Js(n,t,_s("tampermonkey"),{timeout:wn.values.scriptUpdateHideNotificationAfter},(t=>r.resolve(t.clicked?e:void 0))),r.promise()}})).then((t=>{const n=e||o.uuid;return t?Yc.doSave({url:t.url,uuid:n,replace:!n, src:t.code,ask:!wn.values.notification_silentScriptUpdate}).done((e=>{if(e&&(e.installed&&i++,e.disable_update)){const e=Po.getByUid(n,!0).script;e&&(e.options.check_for_updates=!1,Yc.doModify(n,e,!1))}})):R.Breach()}))}));return r&&oi.all("status",{key:"script_update",class:"information",title:o,text:a,timeout:1e4}),R.sidebyside(c).then((()=>(c.length&&0==s&&(_.debug("No update found"),e&&Js("Narf!",qr.getMessage("No_update_found__sry_"),_s("tampermonkey"),{timeout:1e4}),oi.all("status",{ key:"script_update",class:"information",text:qr.getMessage("No_update_found__sry_"),timeout:1e4})),{found:s,installed:i})))})(t,n,!(!e||!n)).done((e=>{o.resolve(e.installed)})).fail((()=>{o.resolve(void 0)})),i=lc(),i.scripts=Date.now(),uc(i),o.promise()}))},init:()=>{dc.on("suc",(()=>{Ou.check()})),dc.schedule("suc",{periodInMinutes:60,keepExistent:!0})}},Du=Ou;de.trup=Du;const ju=Du,Lu={},Fu=(e,t)=>{const n=Lu[e]=Lu[e]||{};return n[t]=n[t]||{}},Pu=e=>{const t={} ;for(const n of Object.keys(Lu).map(Number))t[n]=Lu[n][e];return t},Nu=12096e5,Vu=["contributed","later","hide"];let zu;const qu={init:()=>{let e;zu=nn.getValue(G.STORAGE.BEGGING);const t=Date.now();zu?(e=parseInt(nn.getValue(G.STORAGE.LAST_START,"0")))&&t-e>Nu&&(zu.later={type:"after_pause",ts:t},qu.save()):(zu={first_run:{type:"from_init",ts:t}},qu.save())},save:()=>{zu&&nn.setValue(G.STORAGE.BEGGING,zu)},needed:()=>{ const e=Date.now(),t=!zu.first_run||zu.first_run.ts+Nu{Gr("clicked",e,t+n)},dialog:{shown:e=>{const t=Date.now();zu.dialog={ts:t,extra:e},qu.save(),Gr("dialog")}},button:(()=>{const e={};for(const t of Vu)e[t]=(e,n)=>{const r=Date.now();zu[t]={ts:r,type:e,extra:n},qu.save(),Gr("button",t)};return e})()},Hu=qu,Qu={create:(e,t)=>{const n=e||"",r=t||{},s=e=>R.onebyone(e).fail((()=>{ _.warn("tree: wait failed!")})).then((e=>e.filter((e=>e)).reduce(((e,t)=>e.concat(t)),[]))),i=(e,t)=>{const n=e.replace(/\.$/,"").split(".");let s=c;for(;n.length;){const i=n.shift();if(void 0===i)throw Error("invalid path segment");const o=s[i];if(!o)return _.warn("tree: unable to find",e,r),()=>R.Pledge([]);if("function"==typeof o)return()=>o(r,!t);s=o,n.length||n.unshift("root")}return _.warn("tree: unable to find",e,r),()=>R.Pledge([])},o={root:e=>{const t=R() ;return vt.getSelected(null,(n=>{n&&n.id>=0?r.tab=n:e&&e.tabId&&(r.tab={id:e.tabId,index:-1,url:"",windowId:-1});const o=s([i("actions.general"),i("actions.scripts"),i("actions.commands"),i("actions.tags")]);t.consume(o)})),t.promise()},general:async()=>{const e=r.tab,t=e?e.url:null,n=t&&t.length>4&&""==t.substr(0,4).replace(/file|http/,"")?t:"",s=[],i={name:"enabled",id:"enabled",sub_menu_item:!0,pos:"top",items:[],tabId:null==e?void 0:e.id};let o;i.items.push({name:qr.getMessage("Enabled"), display:wn.values.enabled?void 0:"greyed",id:"enabled",button:!0,reload:!0,enabler:!0}),i.items=i.items.concat(oi.actionStatus().map((e=>({options:e,globalhint:!0})))),s.push(i),!t||!Eo(t,!0)||(o=Eo(t))&&"manual"!=wn.values.scriptUrlDetection||i.items.push({name:qr.getMessage(o?"Install_this_script":"Try_to_install_as_script"),image:"script_download",id:"installFromUrl",data:{url:t},button:!0,reload:!0});const a={name:"about",id:"about",sub_menu_item:!0,pos:"bottom",items:[]};a.items.push({ name:qr.getMessage("Dashboard"),image:"utilities",url:mt.getURL("options.html")+"#"+["url="+Ye(n),"nav=dashboard"].join("&"),url_alt:(null==e?void 0:e.url)?mt.getURL("options.html")+"#"+["filter="+se(e.url),"url="+Ye(n),"nav=dashboard"].join("&"):void 0,newtab:!0});const c="version="+mt.manifest.version+"&ext="+gt.short_id,l=[{name:" "+qr.getMessage("Help"),url:"https://www.tampermonkey.net/faq.php?"+c,newtab:!0},{name:" "+qr.getMessage("Changelog"), url:"https://www.tampermonkey.net/changelog.php?"+c,newtab:!0},{social:!0,newtab:!0}];return null===await wc(hc)&&l.push({button:!0,id:"reset_persistent_hint",image:"mobile",reload:!0,data:{key:hc},title:qr.getMessage("Tampermonkey_is_available_on_mobile_platforms")}),a.items.push({image:"about",id:"about",urls:l}),s.push(a),s},scripts:{root:e=>{const t=r.tab,n=t?t.url:null,s=[],i=n?zn(n):null,o=i&&["http:","https:","file:"].includes(i.protocol)?Qn(i):"",a={name:"scripts",id:"scripts", sub_menu_item:!0,pos:"center",items:[]},c={},l={},u={},d={},A={},h=i?O.INTERNAL_PAGE_PROTOCOLS.includes(i.protocol):null;if(t){const e=qh(t,r.sender);Object.keys(e).forEach((t=>{const n=e[t];d[t]=n,A[t]="z"+n.name.toLowerCase()+n.position}));const n=zh(t);Object.keys(n).forEach((e=>{const t=n[e];c[e]=t.urls,l[e]=t.count,u[e]=t.all_time;let r=d[e];if(!r){const t=Po.getByUid(e);t.script&&t.cond&&!t.script.deleted?d[e]=r=t.script:d[e]=r={...us(),uuid:e,name:qr.getMessage("This_script_was_deleted"), enabled:!0,deleted:Date.now(),textContent:"",resources:[],requires:[]}}A[e]="a"+r.name.toLowerCase()+r.position}))}let p;p="position"==wn.values.action_menu_scripts_sort?(e,t)=>e.position-t.position:"name"==wn.values.action_menu_scripts_sort?(e,t)=>e.name.toLowerCase()t.name.toLowerCase()?1:0:"enabled"==wn.values.action_menu_scripts_sort?(e,t)=>1e4*(e.enabled?0:1)+e.position-(1e4*(t.enabled?0:1)+t.position):(e,t)=>A[e.uuid].localeCompare(A[t.uuid]) ;const f=Object.values(d).sort(p);let m=Hc(f,{active_urls:c,active_counts:l,all_time_active_counts:u});const g=t?yu.convertToMenuItems(t.id):{};let v;wn.values.action_menu_scripts_hide_disabled&&(m=m.filter((e=>e.enabled||l[e.uuid]))),m.forEach((e=>{let t;(t=g[e.uuid])&&(e.menu_cmds=t)})),!wn.values.action_menu_scripts_hide_disabled&&Math.min(wn.values.action_menu_columns,(e?e.available_columns:null)||99)>2?(v={name:"scripts_right",id:"scripts_right",sub_menu_item:!0,pos:"right",items:[]}, m.forEach((e=>{e.enabled||l[e.uuid]?a.items.push(e):v.items.push(e)})),s.push(a),v.items.length&&s.push(v)):(v=a,a.items=a.items.concat(m),s.push(a)),wn.values.enabled&&!m.length&&n&&(h?a.items.push({name:qr.getMessage("Tampermonkey_has_no_access_to_this_page"),image:"no_script",class:"disabled"}):yl.isAllowed(n)?a.items.push({name:qr.getMessage("No_script_is_running"),image:"no_script",class:"disabled"}):a.items.push({name:qr.getMessage("This_page_is_blacklisted_at_the_security_settings"), image:"critical",class:"disabled"}));const w=qr.getLocale();if(wn.values.enabled){let e;m.length?(e={name:"scripts_new",id:"scripts_new",sub_menu_item:!0,pos:"center",items:[]},s.push(e)):e=a;const t=!!wn.values.userscript_search_url,n=wn.values.userscript_search_mode;t&&o&&"click"==n?e.items.push({name:qr.getMessage("Search_for_userscripts_for_this_tab"),image:"script_search",data:{url:o},id:"script_search",button:!0}):t&&o&&["action_menu","badge"].includes(n)?e.items.push({ name:qr.getMessage("Searching_for_userscripts_for_this_tab"),image:"script_search",data:{url:o},id:"script_search",class:"disabled",partial:!0,referrer:"actions.script_search"}):e.items.push({name:qr.getMessage("Get_new_scripts___"),image:"script_search",url:"https://www.tampermonkey.net/scripts.php"+(w?"?locale="+w:""),newtab:!0}),e.items.push({name:qr.getMessage("Add_new_script___"),image:"script_add",url:mt.getURL("options.html")+"#nav=new-user-script"+(h?"":"&url="+Ye(o)),newtab:!0})} return R.Pledge(s)}},script_search:{root:async e=>{let t;const n=null==e?void 0:e.url;let r,s;return t=n?await Il(n):{count:0},t.error||!t.url?(r=qr.getMessage("Search_for_userscripts_for_this_tab"),s={url:n}):(r=t.count?qr.getMessage("Found_0count0_available_scripts",t.count):qr.getMessage("No_available_scripts"),s={result_url:t.url}),[{name:r,data:s,button:!0,image:"script_search",id:"script_search"}]}},commands:()=>{const e=[],t={name:"commands",id:"commands",sub_menu_item:!0,pos:"left", items:[]},n={name:qr.getMessage("Utilities"),id:"commands",sub_menu_item:!0,more_menu:!0,pos:"left",items:[]};if(n.items.push({name:qr.getMessage("Check_for_userscripts_updates"),id:"run_script_updates",button:!0,image:"update"}),wn.values.configMode>=80&&n.items.push({name:qr.getMessage("Report_a_bug"),image:"bug",url:"https://www.tampermonkey.net/bug",newtab:!0}),wn.values.configMode>=50){let e,t,s,i ;["black","black+white"].includes(wn.values.page_filter_mode)&&(e=r.tab)&&(t=e.url)&&(s=zn(t))&&!O.INTERNAL_PAGE_PROTOCOLS.includes(s.protocol)&&(i=s.hostname)&&yl.isAllowed(t)&&n.items.push({name:qr.getMessage("Blacklist_0domain0",i),image:"no",button:!0,id:"blacklist_page",data:{domain:i}})}return t.items.push({name:qr.getMessage("Please_consider_a_contribution"),image:"contrib",button:!0,id:"contrib"}),t.items.push(n),e.push(t),R.Pledge(e)},tags:()=>{const e=r.tab ;if(!e||!wn.values.tags_enabled)return R.Pledge([]);const t={},n={},s=qh(e,r.sender);Object.keys(s).forEach((e=>{n[e]=!0}));const i=zh(e);Object.keys(i).forEach((e=>{n[e]=!0}));const o=wn.values.tags;for(const e of Object.keys(n)){const n=Po.getByUid(e);if(n.script&&n.cond&&!n.script.deleted)for(const e of n.script.options.tags)o[e]&&(t[e]||(t[e]=[]),t[e].push(n.script.enabled))}const a=Object.keys(t).sort(((e,n)=>t[e].length-t[n].length));if(!a.length)return R.Pledge([]);const c={ name:qr.getMessage("Tags"),id:"tags",sub_menu_item:!0,more_menu:!0,pos:"left",items:[]};for(const e of a){const n=t[e].length,r={id:"tag_"+e,tag:e,data:{x:t[e].filter((e=>e)).length,of:n}};c.items.push(r)}return R.Pledge([c])}},a={root:()=>s([i("options.general"),i("options.verification"),i("options.scripts"),i("options.settings"),i("options.trash")]),general:function(){let e,t,n=[];return mt.inIncognitoContext&&"temporary"==wn.values.incognito_mode?n.push({globalhint:!0,options:{id:"incognito", image:"critical",text:qr.getMessage("All_modifications_are_only_kept_a_few_moments_Reconfigure_the_0name0_option_to_save_them_permanently_",qr.getMessage("Store_data_in_incognito_mode"))}}):(e=oi.optionsStatus().map((e=>({globalhint:!0,options:e}))))&&e.length?n=n.concat(e):(t=gi.updateAvailable())&&n.push({globalhint:!0,options:{id:"extensionupdate",image:"info",class:"information",text:qr.getMessage("0name0_0version0_is_available__Please_re_start_your_browser_to_update_",mt.manifest.name,t)} }),R.Pledge(n)},verification:()=>{const e=[];return fs.forEach((t=>{e.push({globalhint:!0,options:{image:"critical",class:"warning",text:t.text,title:t.description,info_url:t.url}})})),R.Pledge(e)},scripts:{root:(e,t)=>{const n=R(),r={name:qr.getMessage("Installed_userscripts"),main_menu_item:!0,id:"dashboard",items:[]};return((null==e?void 0:e.complete)||!t?s(["options.scripts.userscripts","options.scripts.new"].map((e=>i(e)))):(r.referrer="options.scripts",r.partial=!0, s([i("options.scripts.new")]))).done((e=>{r.items=e,n.resolve([r])})).fail(n.reject),n.promise()},new:()=>{const e=[];return e.push({id:"new-script",name:qr.getMessage("New_userscript"),image:"script_add",title:qr.getMessage("Add_new_script___"),icon:ws("unknown"),nnew:!0,uuid:"new-user-script",position:-1,positionof:1e3,enabled:!0,userscript:!0}),R.Pledge(e)},userscripts:{root:(e,t)=>{const n=(null==e?void 0:e.complete)||!t?void 0:"options.scripts.userscripts",r=Yc.determineScriptsToRun({ deleted:!1}),s=Hc(r,{options_page:!0,referrer:n}),i=s.length,o=qr.getLocale();return s.push({id:"no-script-installed",name:qr.getMessage("No_script_is_installed"),image:"info",class:"disabled",visible:!i}),s.push({id:"get-some-scripts",name:qr.getMessage("Get_some_scripts___"),image:"edit_add",url:"https://www.tampermonkey.net/scripts.php"+(o?"?locale="+o:""),newtab:!0,visible:!i}),R.Pledge(s)},matches:e=>{const{filter:t,uuid:n}=e||{};let r;if(!t||!t.code)return R.Pledge([]) ;const s=/\/(.*)\/(.*)/.exec(t.code);if(!s)return R.Pledge([]);const i=new RegExp(s[1],s[2]);if(n){const e=Po.getByUid(n);e.script&&e.cond&&(r=[e.script])}else r=Yc.determineScriptsToRun({deleted:!1});if(r){const e=r.map((e=>-1!=e.textContent.search(i)?e.uuid:null)).filter((e=>e));return R.Pledge(e)}return R.Pledge([])},source:e=>{if(!(null==e?void 0:e.uuid))return R.Pledge([]);const t=Po.getByUid(e.uuid);if(t.script&&t.cond){let e ;return e=wn.values.showFixedSrc?Ol.mkCompat(t.script.textContent,t.script,"off"!=wn.values.runtime_strict_mode):t.script.textContent,R.Pledge([e])}return _.warn("tree: unable to process ",t),R.Breach()},storage:e=>{if(!(null==e?void 0:e.uuid))return R.Pledge([]);const t=Po.getStorageByUid(e.uuid);return R.Pledge([t?t.data:{}])},external:e=>{const{uuid:t,url:n}=e||{};if(!t)return R.Pledge([]);const r=Po.getByUid(t);if(r.script&&r.cond){let e ;return[...r.script.requires,...r.script.resources].some((r=>{const s=r.url||Vn(r.unsafe_url,r.abs_url);if(!s||s!=n)return;const i=Gc.getElement(t,s);return i&&i.data&&i.data.content?(e=i.data.content,!0):void 0})),R.Pledge([e])}return _.warn("tree: unable to process ",r),R.Breach()}}},trash:(()=>{const e=()=>"off"===wn.values.trash_mode?[]:Yc.determineScriptsToRun({deleted:!0});return{root:(t,n)=>{const r=R(),o=qr.getMessage("Trash_bin"),a={name:o,image:"trash",title:o,main_menu_item:!0, hidden:!e().length,id:"trash",items:[]};return(()=>{if((null==t?void 0:t.complete)||!n){const e=s(["options.trash.userscripts"].map((e=>i(e))));return e}return a.referrer="options.trash",a.partial=!0,R.Pledge([])})().done((e=>{a.items=e,r.resolve([a])})).fail((()=>r.reject())),r.promise()},userscripts:{root:(t,n)=>{const r=(null==t?void 0:t.complete)||!n?void 0:"options.trash.userscripts",s=Hc(e(),{options_page:!0,referrer:r});return R.Pledge(s)}}}})(),settings:(e,t)=>{const n=R(),r={ name:qr.getMessage("Settings"),main_menu_item:!0,id:"settings",selected_default:!0,items:[]};return((null==e?void 0:e.complete)||!t?(async()=>{const e=de.Tests,t={id:"general",name:qr.getMessage("General"),sub_menu_item:!0,items:[]};t.items.push({name:qr.getMessage("Config_Mode"),id:"configMode",level:0,option:!0,select:[{name:qr.getMessage("Novice"),value:0},{name:qr.getMessage("Beginner"),value:50},{name:qr.getMessage("Advanced"),value:100}],value:wn.values.configMode, desc:qr.getMessage("Changes_the_number_of_visible_config_options")}),t.items.push({name:qr.getMessage("Language"),id:"i18n",level:0,option:!0,reload:!0,warning:qr.getMessage("A_reload_is_required"),select:[{name:"Browser Default",value:null},...qr.supported],value:wn.values.i18n,validation:{image:"info",opacity:.9,msg:qr.getMessage("Your_language_is_not_supported__Click_here_to_get_intructions_how_to_translate_TM_"),url:"https://www.tampermonkey.net/faq.php#Q500"}}),t.items.push({ name:qr.getMessage("Auto_reload_on_script_enabled"),level:20,id:"autoReload",option:!0,checkbox:!0,enabled:wn.values.autoReload,desc:qr.getMessage("Auto_reload_on_script_enabled_desc")}),t.items.push({name:qr.getMessage("Anonymous_statistics"),level:0,id:"statistics_enabled",option:!0,checkbox:!0,enabled:!!wn.values.statistics_enabled,validation:{image:"info",opacity:.9,msg:qr.getMessage("Allow_Tampermonkey_to_collect_anonymous_statistics"), url:"https://www.tampermonkey.net/privacy.php#extension"}}),t.items.push({name:qr.getMessage("Debug_scripts"),level:100,id:"debug",option:!0,checkbox:!0,enabled:wn.values.debug,desc:""}),t.items.push({name:qr.getMessage("Show_fixed_source"),level:100,id:"showFixedSrc",option:!0,checkbox:!0,enabled:wn.values.showFixedSrc,desc:""}),(["heif"].includes(j.short_id)||wn.values.background_control)&&t.items.push({name:"Allow userscripts to control the background context",id:"background_control", level:wn.values.background_control?0:50,option:!0,checkbox:!0,enabled:wn.values.background_control,validation:{image:"critical",msg:"Don't use this option unless you know what you are doing!"}}),t.items.push({name:qr.getMessage("LogLevel"),id:"logLevel",level:0,option:!0,select:[{name:qr.getMessage("Debug"),value:80},{name:qr.getMessage("Info"),value:60},{name:qr.getMessage("Warning"),value:30},{name:qr.getMessage("Error"),value:0}],value:wn.values.logLevel,desc:""}),t.items.push({ name:qr.getMessage("Trash_Mode"),id:"trash_mode",level:50,option:!0,select:[{name:qr.getMessage("Enabled"),value:"on"},{name:qr.getMessage("Disabled"),value:"off"},{name:qr.getMessage("Clean_after_session"),value:"session"}],value:wn.values.trash_mode, desc:qr.getMessage("Controls_how_deleted_scripts_are_handled__0enabled0_moves_scripts_to_a_virtual_trash__0disabled0_permanently_deletes_scripts__0cleanAfterSession0_automatically_deletes_all_on_session_end_",qr.getMessage("Enabled"),qr.getMessage("Disabled"),qr.getMessage("Clean_after_session"))});const n={id:"script_sync",name:qr.getMessage("Script_Sync"),sub_menu_item:!0,level:50,need_save:!0,items:[]};n.items.push({name:qr.getMessage("Enable_Script_Sync"),id:"sync_enabled",enabler:!0, level:50,option:!0,checkbox:!0,enabled:wn.values.sync_enabled,desc:qr.getMessage("Synchronize_your_scripts_across_browsers_and_operation_systems")});const r=(()=>{const e=[],t={reset_sync:!0,cloud_url:!1,cloud_user:!1,cloud_pass:!1};return Ct.sync.supported&&e.push({name:qr.getMessage("Browser_Sync"),value:Do.eCHROMESYNC,enable:t}),e.push({name:qr.getMessage("Google_Drive"),value:Do.eGDRIVE,enable:t}),e.push({name:qr.getMessage("Dropbox"),value:Do.eDROPBOX,enable:t}),e.push({ name:qr.getMessage("OneDrive"),value:Do.eONEDRIVE,enable:t}),e.push({name:qr.getMessage("Yandex_Disk"),value:Do.eYANDEX,enable:t}),e.push({name:qr.getMessage("WebDAV"),value:Do.eWEBDAV,enable:{reset_sync:!0,cloud_url:!0,cloud_user:!0,cloud_pass:!0}}),e})();n.items.push({name:qr.getMessage("Sync_Type"),id:"sync_type",enabler:!0,level:50,option:!0,select:r,value:wn.values.sync_type}),n.items.push({name:qr.getMessage("URL"),id:"cloud_url",enabledBy:"sync_type",level:50,option:!0,text:!0,width:2, value:wn.values.cloud_url}),n.items.push({name:qr.getMessage("Login"),id:"cloud_user",enabledBy:"sync_type",level:50,option:!0,text:!0,width:2,value:wn.values.cloud_user}),n.items.push({name:qr.getMessage("Password"),id:"cloud_pass",enabledBy:"sync_type",level:50,option:!0,text:!0,password:!0,width:2,value:wn.values.cloud_pass}),n.items.push({name:qr.getMessage("Sync_Now"),id:"run_sync",enabledBy:"sync_enabled",needsSave:!0,level:50,button:!0}),n.items.push({name:qr.getMessage("Sync_Reset"), id:"reset_sync",enabledBy:"sync_enabled",needsSave:!0,level:80,button:!0,reload:!0,warning:qr.getMessage("This_will_remove_all_remote_data_from_sync_Ok_")}),n.items.push({name:qr.getMessage("Recent_Sync_Log"),status:!0,event:"syncProgressEvent",id:"sync_status"});const s={id:"appearance",name:qr.getMessage("Appearance"),sub_menu_item:!0,need_save:!0,items:[],warning:qr.getMessage("A_reload_is_required"),reload:!0};s.items.push({name:qr.getMessage("Layout"),id:"layout",level:0,option:!0, select:ms.map((e=>{const{name:t,theme:n,layout:r}=e;return{name:t,value:n?[r,n].join("#"):r}})),value:wn.values.layout,desc:""}),s.items.push({name:qr.getMessage("Custom_CSS"),id:"layout_user_css",level:100,option:!0,input:!0,value:wn.values.layout_user_css,desc:qr.getMessage("You_can_add_your_custom_CSS_rules_here_")}),s.items.push({name:qr.getMessage("Update_Notification"),id:"notification_showUpdate",level:50,option:!0,select:[{name:qr.getMessage("Disabled"),value:"off"},{ name:qr.getMessage("Show_notification"),value:"notification"},{name:qr.getMessage("Open_changelog"),value:"changelog"}],value:wn.values.notification_showUpdate,validation:"off"==wn.values.notification_showUpdate?{image:"critical",msg:qr.getMessage("Are_you_sure_that_you_don_t_want_to_be_notified_of_updates_")}:void 0}),s.items.push({name:qr.getMessage("Favicon_Service"),id:"favicon_service",level:50,option:!0,select:[{name:qr.getMessage("Google"),value:"google"},{ name:qr.getMessage("DuckDuckGo"),value:"duckduckgo"},{name:qr.getMessage("Native"),value:"native",warning:qr.getMessage("Warning_unsafe_site_warnings_might_appear_")}],value:wn.values.favicon_service});const i={id:"tags",name:qr.getMessage("Tags"),sub_menu_item:!0,level:0,items:[],reload:!0};i.items.push({name:qr.getMessage("Enable_Tags"),id:"tags_enabled",level:0,option:!0,checkbox:!0,enabled:wn.values.tags_enabled,desc:""}),wn.values.tags_enabled&&i.items.push({ name:qr.getMessage("System_Tags"),id:"tags",level:0,option:!0,input:!0,tags:!0,value:wn.values.tags,desc:""});const o={id:"action_menu",name:qr.getMessage("Action_Menu"),sub_menu_item:!0,need_save:!0,items:[],level:50};o.items.push({name:qr.getMessage("Hide_disabled_scripts"),id:"action_menu_scripts_hide_disabled",level:100,option:!0,checkbox:!0,enabled:wn.values.action_menu_scripts_hide_disabled,desc:""}),o.items.push({name:qr.getMessage("Columns"),id:"action_menu_columns",level:50,option:!0, select:[{name:qr.getMessage("1"),value:1},{name:qr.getMessage("2"),value:2},{name:qr.getMessage("3"),value:3}],value:wn.values.action_menu_columns}),o.items.push({name:qr.getMessage("Script_order"),id:"action_menu_scripts_sort",level:50,option:!0,select:[{name:qr.getMessage("Auto"),value:"auto"},{name:qr.getMessage("Position_"),value:"position"},{name:qr.getMessage("Name"),value:"name"},{name:qr.getMessage("Enabled"),value:"enabled"}],value:wn.values.action_menu_scripts_sort}),o.items.push({ name:qr.getMessage("Icon_badge_info"),id:"appearance_badges",level:50,option:!0,select:[{name:qr.getMessage("Disabled"),value:"off"},{name:qr.getMessage("No_text"),value:"active"},{name:qr.getMessage("Alltime_running_instances"),value:"alltime"},{name:qr.getMessage("Running_scripts"),value:"running"},{name:qr.getMessage("Unique_running_scripts"),value:"running_unique"}],value:wn.values.appearance_badges}),o.items.push({name:qr.getMessage("Icon_badge_color"),id:"appearance_badge_color",option:!0, level:100,color:!0,value:wn.values.appearance_badge_color});const a={id:"context_menu",name:qr.getMessage("Context_Menu"),sub_menu_item:!0,items:[],level:50};let c;a.items.push({name:qr.getMessage("Enable_context_menu"),id:"context_menu_enabled",level:50,option:!0,checkbox:!0,enabled:wn.values.context_menu_enabled,desc:""}),a.items.push({name:qr.getMessage("Scripts_activated_by_context_menu"),id:"context_menu_scripts",level:50,option:!0,checkbox:!0,enabled:wn.values.context_menu_scripts,desc:"" }),a.items.push({name:qr.getMessage("Script_menu_commands"),id:"context_menu_commands",level:50,option:!0,checkbox:!0,enabled:wn.values.context_menu_commands,desc:""}),wn.values.userscript_search_url&&(c={id:"userscript_search",name:qr.getMessage("Userscript_Search"),sub_menu_item:!0,level:0,items:[],reload:!0},c.items.push({name:qr.getMessage("Userscript_search_integration_mode"),id:"userscript_search_mode",level:0,option:!0,select:[{name:qr.getMessage("Disabled"),value:"off"},{ name:qr.getMessage("On_Click"),value:"click"},{name:qr.getMessage("On_Action_Menu"),value:"action_menu"},{name:qr.getMessage("Add_to_icon_badge_text"),value:"badge"}],value:wn.values.userscript_search_mode,validation:{image:"info",opacity:.9, msg:qr.getMessage("In_order_to_search_for_userscripts__0on_action_menu0__and__0icon_badge_number0__automatically_transfer_the_tab_s_url_to_the_search_website__0on_click0_opens_the_search_page_on_click_Please_click_at_this_icon_to_open_the_privacy_policy_",qr.getMessage("Add_to_icon_badge_text"),qr.getMessage("On_Action_Menu"),qr.getMessage("On_Click")),url:Gl()}}));const l={id:"editor",name:qr.getMessage("Editor"),sub_menu_item:!0,level:20,need_save:!0,items:[], warning:qr.getMessage("A_reload_is_required"),reload:!0};l.items.push({name:qr.getMessage("Enable_Editor"),id:"editor_enabled",level:100,option:!0,checkbox:!0,enabled:wn.values.editor_enabled,desc:""}),l.items.push({name:qr.getMessage("Theme"),id:"editor_theme",level:50,option:!0,select:Object.keys(gs).map((e=>({name:gs[e]||e,value:e}))),value:wn.values.editor_theme}),l.items.push({name:qr.getMessage("Font_Size"),id:"editor_fontSize",level:50,option:!0,select:[{name:"50%",value:50},{name:"70%", value:70},{name:"80%",value:80},{name:"90%",value:90},{name:"100%",value:100},{name:"110%",value:110},{name:"120%",value:120},{name:"150%",value:150}],value:wn.values.editor_fontSize}),l.items.push({name:qr.getMessage("Key_Mapping"),id:"editor_keyMap",level:50,option:!0,select:[{name:qr.getMessage("Windows"),value:"windows"},{name:qr.getMessage("VSCode"),value:"vscode"},{name:qr.getMessage("Sublime"),value:"sublime"},{name:qr.getMessage("Emacs"),value:"emacs"},{name:qr.getMessage("Vim"), value:"vim"}],value:wn.values.editor_keyMap}),l.items.push({name:qr.getMessage("Indentation_Width"),id:"editor_indentUnit",level:50,option:!0,select:[{name:qr.getMessage("1"),value:1},{name:qr.getMessage("2"),value:2},{name:qr.getMessage("3"),value:3},{name:qr.getMessage("4"),value:4},{name:qr.getMessage("5"),value:5},{name:qr.getMessage("6"),value:6},{name:qr.getMessage("7"),value:7},{name:qr.getMessage("8"),value:8},{name:qr.getMessage("9"),value:9},{name:qr.getMessage("10"),value:10},{ name:qr.getMessage("11"),value:11}],value:wn.values.editor_indentUnit,desc:""}),l.items.push({name:qr.getMessage("Tab_Size"),id:"editor_tabSize",level:50,option:!0,select:[{name:qr.getMessage("1"),value:1},{name:qr.getMessage("2"),value:2},{name:qr.getMessage("3"),value:3},{name:qr.getMessage("4"),value:4},{name:qr.getMessage("5"),value:5},{name:qr.getMessage("6"),value:6},{name:qr.getMessage("7"),value:7},{name:qr.getMessage("8"),value:8},{name:qr.getMessage("9"),value:9},{ name:qr.getMessage("10"),value:10},{name:qr.getMessage("11"),value:11}],value:wn.values.editor_tabSize,desc:""}),l.items.push({name:qr.getMessage("Indent_with"),id:"editor_indentWithTabs",level:50,option:!0,select:[{name:qr.getMessage("Tabs"),value:"tabs"},{name:qr.getMessage("Spaces"),value:"spaces"}],value:wn.values.editor_indentWithTabs,desc:""}),l.items.push({name:qr.getMessage("TabMode"),id:"editor_tabMode",level:50,option:!0,select:[{name:qr.getMessage("Classic"),value:"classic"},{ name:qr.getMessage("Smart"),value:"smart"},{name:qr.getMessage("Indent"),value:"indent"}],value:wn.values.editor_tabMode,desc:""}),l.items.push({name:qr.getMessage("Highlight_selection_matches"),id:"editor_highlightSelectionMatches",level:50,option:!0,select:[{name:qr.getMessage("Cursor"),value:"cursor"},{name:qr.getMessage("On"),value:"on"},{name:qr.getMessage("Off"),value:"off"}],value:wn.values.editor_highlightSelectionMatches,desc:""}),l.items.push({name:qr.getMessage("Line_break"), id:"editor_lineWrapping",level:50,option:!0,checkbox:!0,enabled:wn.values.editor_lineWrapping,desc:""}),l.items.push({name:qr.getMessage("Reindent_on_typing"),id:"editor_electricChars",level:50,option:!0,checkbox:!0,enabled:wn.values.editor_electricChars,desc:""}),l.items.push({name:qr.getMessage("Enable_autoSave"),id:"editor_autoSave",level:20,option:!0,checkbox:!0,enabled:wn.values.editor_autoSave,desc:""}),l.items.push({name:qr.getMessage("Enable_easySave"),id:"editor_easySave",level:20, option:!0,checkbox:!0,enabled:wn.values.editor_easySave,desc:""}),l.items.push({name:qr.getMessage("Highlight_trailing_whitespace"),id:"editor_highlightTrailingWhitespace",level:50,option:!0,checkbox:!0,enabled:wn.values.editor_highlightTrailingWhitespace,desc:""}),l.items.push({name:qr.getMessage("Trim_trailing_whitespace_from_modified_lines"),id:"editor_trimTrailingSpacesFromModifiedLines",level:50,option:!0,checkbox:!0,enabled:wn.values.editor_trimTrailingSpacesFromModifiedLines,desc:""}), l.items.push({name:qr.getMessage("Auto_syntax_check_on_typing"),id:"editor_autoLint",level:50,option:!0,checkbox:!0,enabled:wn.values.editor_autoLint,desc:qr.getMessage("Enable_this_option_to_automatically_check_the_code_on_typing_")}),l.items.push({name:qr.getMessage("Auto_syntax_check_max_length"),id:"editor_autoLintMaxLen",level:50,option:!0,text:!0,value:wn.values.editor_autoLintMaxLen,desc:qr.getMessage("Check_only_scripts_up_to_this_size_automatically_")}),l.items.push({ name:qr.getMessage("Custom_Linter_Config"),id:"editor_linter_config",level:100,option:!0,input:!0,json:!0,value:wn.values.editor_linter_config,validation:{image:"info",opacity:.9,msg:qr.getMessage("You_can_add_your_custom_linter_config_here_"),url:"https://eslint.org/docs/user-guide/configuring"}});const u={id:"script_update",name:qr.getMessage("Script_Update"),sub_menu_item:!0,level:0,items:[]};u.items.push({name:qr.getMessage("Check_disabled_scripts"),id:"scriptUpdateCheckDisabled",level:0, option:!0,checkbox:!0,enabled:wn.values.scriptUpdateCheckDisabled,desc:""}),u.items.push({name:qr.getMessage("Dont_ask_me_for_simple_script_updates"),id:"notification_silentScriptUpdate",level:80,option:!0,checkbox:!0,enabled:wn.values.notification_silentScriptUpdate,desc:""}),u.items.push({name:qr.getMessage("Check_interval"),id:"scriptUpdateCheckPeriod",level:0,option:!0,select:[{name:qr.getMessage("Never"),value:0},{name:qr.getMessage("Every_6_Hours"),value:216e5},{ name:qr.getMessage("Every_12_Hour"),value:432e5},{name:qr.getMessage("Every_Day"),value:864e5},{name:qr.getMessage("Every_Week"),value:6048e5}],value:wn.values.scriptUpdateCheckPeriod,desc:""}),u.items.push({name:qr.getMessage("Hide_notification_after"),id:"scriptUpdateHideNotificationAfter",level:50,option:!0,select:[{name:qr.getMessage("Never"),value:0},{name:qr.getMessage("15_Seconds"),value:15e3},{name:qr.getMessage("30_Seconds"),value:3e4},{name:qr.getMessage("1_Minute"),value:6e4},{ name:qr.getMessage("5_Minutes"),value:3e5},{name:qr.getMessage("1_Hour"),value:36e5}],value:wn.values.scriptUpdateHideNotificationAfter,desc:""});const d={id:"externals",name:qr.getMessage("Externals"),desc:qr.getMessage("require_and_resource"),sub_menu_item:!0,level:0,items:[]};d.items.push({name:qr.getMessage("Update_interval"),id:"external_update_interval",level:0,option:!0,select:[{name:qr.getMessage("Always"),value:1},{name:qr.getMessage("Every_Day"),value:864e5},{ name:qr.getMessage("Every_Week"),value:6048e5},{name:qr.getMessage("Every_Month"),value:2592e6},{name:qr.getMessage("Never"),value:0}],value:wn.values.external_update_interval,desc:""});const A={id:"security",name:qr.getMessage("Security"),sub_menu_item:!0,need_save:!0,level:50,items:[]};A.items.push({name:qr.getMessage("Content_Script_API"),id:"runtime_content_mode",level:80,option:!0,select:"content"!=wn.values.runtime_content_mode?[{name:qr.getMessage("UserScripts_API"),value:"userscripts"},{ name:qr.getMessage("UserScripts_API_Dynamic"),value:"userscripts-dynamic"}]:[{name:qr.getMessage("Content_Script"),value:"content"},{name:qr.getMessage("UserScripts_API"),value:"userscripts"},{name:qr.getMessage("UserScripts_API_Dynamic"),value:"userscripts-dynamic"}],value:wn.values.runtime_content_mode}),A.items.push({name:qr.getMessage("Sandbox_Mode"),id:"sandbox_mode",level:80,option:!0,select:[{name:qr.getMessage("Default"),value:"default"},{name:qr.getMessage("All"),value:"raw+"},{ name:qr.getMessage("Force_Raw"),value:"raw"},...["js","-js","js+"].includes(wn.values.sandbox_mode)?[{name:qr.getMessage("Force_JavaScript"),value:"js"},{name:qr.getMessage("Raw_and_JavaScript"),value:"-js"},{name:qr.getMessage("JavaScript_and_DOM"),value:"js+"}]:[],{name:qr.getMessage("Force_DOM"),value:"dom"}],value:wn.values.sandbox_mode,desc:qr.getMessage("Configures_which_sandbox_values_are_valid"),validation:["dom","js+","raw+"].includes(wn.values.sandbox_mode)?{image:"critical", msg:qr.getMessage("DOM_mode_is_unsecure__Scripts_can_install_new_scripts_")}:void 0});{const e=[{name:qr.getMessage("Auto"),value:"auto"},{name:qr.getMessage("Remove__possibly_unsecure_"),value:"remove"},..."yes"==wn.values.webrequest_fixCSP?[{name:qr.getMessage("Yes"),value:"yes"}]:[],{name:qr.getMessage("No"),value:"no"}];A.items.push({name:qr.getMessage("Add_TM_to_CSP"),id:"webrequest_fixCSP",level:80,option:!0,select:e,value:wn.values.webrequest_fixCSP, desc:qr.getMessage("Tampermonkey_might_not_be_able_to_provide_access_to_the_unsafe_context_when_this_is_disabled")}),A.items.push({name:qr.getMessage("Allow_headers_to_be_modified_by_scripts"),id:"webrequest_modHeaders",level:80,option:!0,reload:!0,select:[{name:qr.getMessage("Yes"),value:"yes"},{name:qr.getMessage("Auto"),value:"auto"},{name:qr.getMessage("No"),value:"no"}],value:wn.values.webrequest_modHeaders, warning:qr.getMessage("Tampermonkey_needs_to_be_restarted_to_make_this_change_apply_Do_you_want_to_continue_"),desc:""})}A.items.push({name:qr.getMessage("Allow_scripts_to_run_scripts_in"),id:"runtime_run_in",level:80,option:!0,array:!0,select:[{name:qr.getMessage("All_tabs"),value:[]},{name:qr.getMessage("Normal_tabs"),value:["normal-tabs"],warning:qr.getMessage("Tampermonkey_won_t_inject_into_other_tab_types_anymore_")},{name:qr.getMessage("Incognito_tabs"),value:["incognito-tabs"], warning:qr.getMessage("Tampermonkey_won_t_inject_into_other_tab_types_anymore_")}],value:wn.values.runtime_run_in}),A.items.push({name:qr.getMessage("Script_local_files_access"),id:"script_file_access",level:80,option:!0,select:[{name:qr.getMessage("All_local_files"),value:"all"},{name:qr.getMessage("require_and_resource"),value:"externals"},{name:qr.getMessage("Disabled"),value:"off"}],value:wn.values.script_file_access}),A.items.push({name:qr.getMessage("Script_cookies_access"), id:"script_cookie_access",level:80,option:!0,select:[{name:qr.getMessage("All"),value:"all"},{name:qr.getMessage("All_but_HttpOnly"),value:"!httponly"},{name:qr.getMessage("Disabled"),value:"off"}],value:wn.values.script_cookie_access}),A.items.push({name:qr.getMessage("Allow_communication_with_cooperate_pages"),id:"external_connect",level:80,option:!0,reload:!0,select:[{name:qr.getMessage("Tampermonkey_and_script_version"),value:"all"},{name:qr.getMessage("Tampermonkey_version"),value:"version" },{name:qr.getMessage("Disabled"),value:"off"}],value:wn.values.external_connect,desc:qr.getMessage("This_option_allows_the_Tampermonkey_homepage_and_some_script_hosting_pages_to_determine_the_Tampermonkey_version_and_whether_a_script_is_installed_")}),A.items.push({name:qr.getMessage("Subresource_Integrity"),id:"require_sri_mode",level:80,option:!0,select:[{name:qr.getMessage("Disabled"),value:"ignore"},{name:qr.getMessage("Validate_if_supported"),value:"supported"},{ name:qr.getMessage("Validate_if_given"),value:"given"},{name:qr.getMessage("Enforce"),value:"enforce"}],value:wn.values.require_sri_mode,desc:qr.getMessage("Script_authors_can_secure_external_resources_by_adding_a_SRI_hash_to_the_URL_")});let h=[];(wn.values.configMode>=80||["off","casual"].includes(wn.values.connect_mode))&&(h=h.concat([{name:qr.getMessage("Disabled"),value:"off"},{name:qr.getMessage("Casual"),value:"casual"}])),h=h.concat([{name:qr.getMessage("Ask_if_unknown"),value:"ask"},{ name:qr.getMessage("Strict"),value:"strict"},{name:qr.getMessage("Always_ask"),value:"paranoid"}]),A.items.push({name:qr.getMessage("Script_Include_Mode"),id:"script_include_mode",level:50,option:!0,select:[{name:qr.getMessage("Disabled"),value:"off"},{name:qr.getMessage("Treat_like__match"),value:"match"},{name:qr.getMessage("Unsafe"),value:"unsafe"},{name:qr.getMessage("Default"),value:"default"}],value:wn.values.script_include_mode, desc:qr.getMessage("Using__include_is_potentially_unsafe_and_may_be_obsolete_soon___0off0_disables__include_completely__0match0__is_safe__but_may_not_compatible_the_script_developers_intention__0unsafe0__mostly_keeps_the_legacy_behavior_0default0__means__0used_default0",qr.getMessage("Disabled"),qr.getMessage("Treat_like__match"),qr.getMessage("Unsafe"),qr.getMessage("Default"),qr.getMessage("Unsafe"))}),A.items.push({name:qr.getMessage("connect_mode"),id:"connect_mode",level:50,option:!0, select:h,value:wn.values.connect_mode,desc:""}),mt.inIncognitoContext||A.items.push({name:qr.getMessage("Store_data_in_incognito_mode"),id:"incognito_mode",level:50,option:!0,select:[{name:qr.getMessage("Temporary"),value:"temporary"},{name:qr.getMessage("Permanent"),value:"permanent"}],value:wn.values.incognito_mode,validation:"temporary"==wn.values.incognito_mode?void 0:{image:"critical",msg:"Permanent mode is still a BETA feature!"}}),A.items.push({name:qr.getMessage("Page_Filter_Mode"), id:"page_filter_mode",level:50,option:!0,select:[{name:qr.getMessage("Disabled"),value:"off"},{name:qr.getMessage("Blacklist"),value:"black"},{name:qr.getMessage("Whitelist"),value:"white"},{name:qr.getMessage("Both"),value:"black+white"}],value:wn.values.page_filter_mode,desc:""}),A.items.push({name:qr.getMessage("Whitelisted_Pages"),id:"page_whitelist",level:50,option:!0,input:!0,array:!0,value:wn.values.page_whitelist,desc:""}),A.items.push({name:qr.getMessage("Blacklisted_Pages"), id:"forbiddenPages",level:50,option:!0,input:!0,array:!0,value:wn.values.forbiddenPages,desc:""});const p={id:"runtime_host_permissions",name:qr.getMessage("Runtime_Host_Permissions"),sub_menu_item:!0,level:50,items:[]},f=Object.keys(await Di.get());p.items.push({name:qr.getMessage("Requested_Host_Permissions"),id:"missing_host_permissions",level:50,option:!0,permission:!0,array:!0,value:f,desc:""});const m={id:"blackcheck",name:qr.getMessage("BlackCheck"),sub_menu_item:!0,need_save:!0,level:50, items:[]};let g;m.items.push({name:qr.getMessage("Script_Blacklist_Source"),id:"script_blacklist_type",level:50,option:!0,select:[{name:qr.getMessage("Disabled"),value:"off"},{name:qr.getMessage("Server_And_Manual"),value:"server"},{name:qr.getMessage("Only_Manual"),value:"only_manual"}],value:wn.values.script_blacklist_type}),m.items.push({name:qr.getMessage("Blacklist_Severity"),id:"script_blacklist_severity",level:50,option:!0,select:[{name:qr.getMessage("severity_1"),value:1},{ name:qr.getMessage("severity_2"),value:2},{name:qr.getMessage("severity_3"),value:3},{name:qr.getMessage("severity_4"),value:4},{name:qr.getMessage("severity_5"),value:5},{name:qr.getMessage("severity_6"),value:6},{name:qr.getMessage("severity_7"),value:7},{name:qr.getMessage("severity_8"),value:8},{name:qr.getMessage("severity_9"),value:9},{name:qr.getMessage("severity_10"),value:kc.SEVERITY_MAX}],value:wn.values.script_blacklist_severity}),m.items.push({ name:qr.getMessage("Manual_Script_Blacklist"),id:"require_blacklist",level:50,option:!0,input:!0,array:!0,value:wn.values.require_blacklist,desc:""});{const e=["exe","sh","crx","com","bat","scr"].map((e=>"name."+e)).some((e=>Ga.is_whitelisted(e)));g={id:"downloads",name:qr.getMessage("Downloads")+" BETA",sub_menu_item:!0,need_save:!0,level:50,items:[]},g.items.push({name:qr.getMessage("Download_Mode"),id:"downloads_mode",level:50,option:!0,select:[{name:qr.getMessage("Default"), value:Ga.staticVars.DEFAULT},{name:qr.getMessage("Disabled"),value:Ga.staticVars.OFF},{name:qr.getMessage("Native"),value:Ga.staticVars.NATIVE},{name:qr.getMessage("Browser_API"),value:St.supported?Ga.staticVars.CHROME:null}].filter((e=>e.value)),value:wn.values.downloads_mode,desc:qr.getMessage("The_Browser_API_mode_requires_a_special_permission_")}),g.items.push({name:qr.getMessage("Whitelisted_File_Extensions"),id:"downloads_extension_whitelist",level:50,option:!0,input:!0,array:!0, value:wn.values.downloads_extension_whitelist,desc:qr.getMessage("Only_files_with_these_extensions_can_be_saved_to_the_harddisk_Be_careful_to_not_allow_file_extensions_that_represent_executables_at_your_operating_system_"),validation:e?{image:"critical",msg:qr.getMessage("Your_whitelist_seems_to_include_executable_files_This_means_your_userscripts_may_download_malware_or_spyware_to_your_harddisk_")}:void 0})}const v={id:"experimental",name:qr.getMessage("Experimental"),sub_menu_item:!0,level:80, items:[]};v.items.push({name:qr.getMessage("strict_mode"),id:"runtime_strict_mode",level:80,option:!0,select:[{name:qr.getMessage("Default"),value:"byscript"},{name:qr.getMessage("Always"),value:"on"},{name:qr.getMessage("Disabled"),value:"off"}],value:wn.values.runtime_strict_mode}),v.items.push({name:qr.getMessage("top_level_await"),id:"runtime_top_level_await",level:80,option:!0,select:[{name:qr.getMessage("Default"),value:"default"},{name:qr.getMessage("Enabled"),value:"on"},{ name:qr.getMessage("Disabled"),value:"off"}],value:wn.values.runtime_top_level_await}),_t.filterResponseData&&v.items.push({name:qr.getMessage("Add_Tampermonkey_to_the_site_s_content_csp"),id:"webrequest_fixContentCSP",level:80,option:!0,select:[{name:qr.getMessage("Yes"),value:"yes"},{name:qr.getMessage("No"),value:"no"}],value:wn.values.webrequest_fixContentCSP,warning:"Warning: enabling this option is may break pages!"});const w={id:"userscripts",name:qr.getMessage("Userscripts"), sub_menu_item:!0,need_save:!0,level:80,items:[]};w.items.push({name:qr.getMessage("Script_URL_detection"),id:"scriptUrlDetection",level:80,option:!0,select:[{name:qr.getMessage("Auto"),value:"auto"},{name:qr.getMessage("Legacy"),value:"legacy"},{name:qr.getMessage("Disabled"),value:"manual"}],value:wn.values.scriptUrlDetection}),w.items.push({name:qr.getMessage("New_script_template_"),id:"script_templates",level:80,option:!0,input:!0,array:!0,named:!0,value:wn.values.script_templates});const _={ id:"reset",name:qr.getMessage("Reset_Section"),sub_menu_item:!0,level:50,items:[]};return _.items.push({name:qr.getMessage("Restart_Tampermonkey"),id:"reset_simple",level:50,button:!0,reload:!0,warning:qr.getMessage("This_will_restart_Tampermonkey_Ok_")}),_.items.push({name:qr.getMessage("Factory_Reset"),id:"reset_factory",level:80,button:!0,reload:!0,warning:qr.getMessage("This_will_remove_all_scripts_and_reset_all_settings_Ok_")}),e&&_.items.push({name:"Install Tests",id:"install_tests", level:80,button:!0,reload:!1,ignore:!0,warning:"This will install a lot of test scripts!"}),[t,s,i,o,a,c,u,d,n,l,A,p,m,g,w,v,_].filter((e=>e))})():(r.referrer="options.settings",R.Pledge([]))).done((e=>{r.items=e,n.resolve([r])})).fail(n.reject),n.promise()}},c={actions:o,options:a};return _.debug("tree: loading",n,r),i(n,!0)()},level:e=>e.replace(/\.$/,"").split(".").length},Wu=Qu,Xu={};let Yu;const Ju=({tabId:e,frameId:t,url:n})=>{const r=Xu[e];r&&r.forEach((r=>{r({tabId:e,frameId:t,url:n})})) },Ku={addListener:(e,t)=>{Xu[e]=Xu[e]||[],Xu[e].push(t),!Yu&&Object.keys(Xu).length&&(bt.supported&&bt.onUrlUpdated&&bt.onUrlUpdated.addDynamicListener(Ju),Yu=!0)},removeListener:(e,t)=>{let n;const r=Xu[e];r&&(n=r.indexOf(t))>-1&&r.splice(n,1),0===r.length&&Ku.removeListeners(e)},removeListeners:e=>{delete Xu[e]}},$u=Ku;var ed=e(462),td=e.n(ed);const nd=(()=>{let e,t,n=!1;const r=()=>{const e=R();return t=e,e};return{write:()=>{const t=R();return n=!1,e=new(td()),t.resolve(e),t.promise()}, open:s=>{const i=r();return n=!0,td().loadAsync(s).then((t=>{e=t,i.resolve(e)}),(e=>{t&&t.reject(e),i.reject(e)})),i.promise()},entries:()=>{const t=r(),n=e.files,s=Object.keys(n).map((e=>{const t=n[e];if(t&&!t.dir)return{filename:t.name}})).filter((e=>e));return t.resolve(s),t.promise()},get:t=>{const n=r(),s=e.file(t.filename);return s?s.async("arraybuffer").then((e=>{n.resolve(e)})):n.resolve(),n.promise()},put:(t,n,s)=>{const i=r();try{e.file(t,n,{date:s?new Date(s):void 0}),i.resolve() }catch(e){i.reject(e)}return i.promise()},end:()=>{const t=r();return n?t.reject():e.generateAsync({type:"blob",compression:"DEFLATE",comment:"Created by Tampermonkey"}).then((e=>t.resolve(e)),(e=>t.reject(e))),t.promise()}}})(),rd={zip:{create:function(e,t){const n=R();return R.Pledge().then((()=>nd.write())).then((()=>{const t=R(),r={},s=(e,t)=>{let n=[e,t].join(".");if(r[n]){let i;do{i=e+" ("+r[n]+")",n=[i,t].join("."),r[n]++}while(r[n]);return s(i,t)}return r[n]=1,n},i=e.length,o=()=>{ if(!e.length)return t.resolve();const r=e.shift();if(!r)return t.resolve();const a=r.meta.name.replace(/[\\/$*?|]/g,"-"),c=s(a,"user.js"),l=s(a,"options.json"),u=s(a,"storage.json"),d={options:r.options,settings:r.settings,meta:r.meta},A=JSON.stringify(d),h=r.storage?JSON.stringify(r.storage):null;n.notify("Zip: "+Math.floor((i-e.length)/i*100)+"%"),nd.put(c,r.source,r.meta.modified).then((()=>nd.put(l,A))).then((()=>h?nd.put(u,h):R.Pledge())).then((()=>{ if(!r.resources.length&&!r.requires.length)return R.Pledge();const e=[];return["resources","requires"].forEach((t=>{const n=r[t];n&&n.length&&n.forEach((n=>{if(void 0===n.source)return;const r=n.meta.name.replace(/[\\/$*?|]/g,"-"),s=tt(t+n.meta.url),i=[c,s,r].join("-"),o=JSON.stringify(n.meta),a=$e(n.source,{encoding:"resources"==t?void 0:"UTF-8"}),l=nd.put(i,a).then((()=>nd.put(i+"."+t+".json",o)));e.push(l)}))})),R.when(e)})).fail((()=>{_.log("porter: add to zip failed")})).always((async()=>{ await z(1e3),o()}))};return o(),t.promise()})).then((()=>t?nd.put("Tampermonkey.global.json",JSON.stringify(t)):R.Pledge())).then((()=>nd.end())).done((e=>{n.resolve(e)})).fail((()=>{n.reject()})),n.promise()},read:function(e){const t=R();let n;return R.Pledge().then((()=>nd.open(e))).then((()=>nd.entries())).then((e=>{const r=R(),s={},i={},o=e.length,a=()=>{const c=e.shift();if(c)nd.get(c).done((e=>{ let t=c.filename.match(/((.*)\.(storage\.json)|(.*)\.(options\.json)|(.*)\.(global\.json)|(.*)\.(user\.js)|(.*)\.user\.js-[0-9a-f]+-.*\.(resources\.json)|(.*)\.user\.js-[0-9a-f]+-.*\.(requires\.json))$/);if(t&&(t=t.slice(1).filter((e=>e))),!e||!t||t.length<3)i[c.filename]=e;else try{const r=t[1],i=t[2],o=Ke(e,"UTF-8");if("global.json"==i)n=JSON.parse(o);else{const e=s[r]||{resources:{},requires:{}};s[r]=e, "user.js"==i?e.source=o:"options.json"==i?e.options=JSON.parse(o):"resources.json"==i?e.resources[c.filename]={name:c.filename,data:JSON.parse(o)}:"requires.json"==i?e.requires[c.filename]={name:c.filename,data:JSON.parse(o)}:"storage.json"==i&&(e.storage=JSON.parse(o))}}catch(e){_.warn("porter: read from zip failed",e)}})).always((async()=>{t.notify("Zip: "+Math.floor((o-e.length)/o*100)+"%"),await z(1e3),a()}));else{const e=[];for(const[t,n]of Object.entries(s)){ const{options:r,source:s,storage:o}=n;if(!s){_.warn(`porter: invalid script ${t}`);continue}const a={requires:[],resources:[]};["resources","requires"].forEach((e=>{for(const t of Object.values(n[e])){const n=t.name.replace("."+e+".json",""),r=i[n];r&&a[e].push({meta:t.data,source:Ke(r,{encoding:"resources"==e?void 0:"UTF-8"})||void 0})}}));const c={...a,...r,source:s,storage:o};e.push(c)}r.resolve({scripts:e,global_settings:n})}};return a(),r.promise()})).done((e=>{t.resolve(e)})).fail((()=>{ t.reject()})),t.promise()}},json:{create:function(e,t){const n=R(),r={created_by:"Tampermonkey",version:"1",scripts:[],settings:t};return e.forEach((e=>{const t={name:e.meta.name,options:e.options,storage:e.storage,enabled:e.settings.enabled,position:e.settings.position,file_url:e.meta.file_url,uuid:e.meta.uuid,source:Ye(We(e.source))};["resources","requires"].forEach((n=>{const r=e[n];if(!r||!r.length)return;const s=t[n]=[];r.forEach((e=>{if(void 0===e.source)return ;const t=e.meta,n=Ye(We(e.source));s.push({meta:t,source:n})}))})),r.scripts.push(t)})),n.resolve(JSON.stringify(r)),n.promise()},read:function(e){const t=R(),n=(e,r)=>{if(e.trim()){let s=null;try{s=JSON.parse(e);const n=e=>{if(e&&e.length)return e.map((e=>({meta:e.meta,source:e.source?Xe(Je(e.source)):e.source})))},r=s.scripts.map((e=>({meta:{uuid:e.uuid,name:e.name,file_url:e.file_url},settings:{enabled:e.enabled,position:e.position},options:e.options,storage:e.storage,source:Xe(Je(e.source)), resources:n(e.resources)||[],requires:n(e.requires)||[]})));return t.resolve({scripts:r,global_settings:s.settings})}catch(t){if(!r){const t="",r="";if(-1!=e.indexOf(t)){const s=e.indexOf(t),i=e.lastIndexOf(r);if(-1!=s&&-1!=i)return e=e.substr(s+t.length,i-(s+t.length)),n(e,!0)}}}}t.reject()};return n(e),t.promise()}} },sd=rd,id=":",od="/",ad="-",cd="-error-",ld="default-src",ud="script-src",dd="style-src",Ad="frame-src",hd="report-uri",pd="frame-ancestors",fd="reflected-xss",md="upgrade-insecure-requests",gd="child-src",vd="block-all-mixed-content",wd="sandbox",_d="worker-src",bd="navigate-to",yd="script-src-elem",kd="script-src-attr",Rd="style-src-elem",xd="style-src-attr",Ed=["sha256","sha384","sha512"],Cd=[cd,ld,ud,"object-src",dd,"img-src","media-src",Ad,"font-src","connect-src",hd,pd,fd,"base-uri","form-action","manifest-src",md,gd,vd,wd,_d,bd,yd,kd,Rd,xd],Sd="'self'",Md="'unsafe-inline'",Id="'unsafe-eval'",Ud="'unsafe-hashes'",Gd="'none'",Zd="'nonce-",Td="'report-sample'",Bd="'strict-dynamic'",Od="'unsafe-allow-redirects'",Dd="'wasm-unsafe-eval'",jd="'sha-",Ld=[Sd,Md,Id,Ud,Gd,Zd,Td,Bd,Od,Dd,jd],Fd=-1,Pd=e=>"http"===e?80:"https"===e?443:Fd ;class Nd{constructor(e){this.mValue=e,this.mCurCharPos=0,this.mEndCharPos=e.length,this.mCurToken=""}get mCurChar(){return this.mValue[this.mCurCharPos]}atEnd(){return this.mCurCharPos>=this.mEndCharPos}skipWhiteSpace(){for(;this.mCurCharPosn.allows(e,t)))}toString(){let e="";return e+=this.mDirective+" ",e+=this.mSrcs.map((e=>e.toString())).join(" "),e}addSrcs(e){this.mSrcs=[...e]}getSrcs(){return[...this.mSrcs]}isDefaultDirective(){return this.mDirective===ld}equals(e){return this.mDirective===e}getReportURIs(){ return this.mDirective!=hd?(console.warn("cspd::getReportURIs: not a report-uri directive!",this.mDirective),[]):this.mSrcs.map((e=>e.toString()))}getDirName(){return this.mDirective}allowsAllInlineBehavior(e){let t=!1;for(const n of this.mSrcs){if(n.isNonce()||n.isHash())return!1;if((e===yd||e===kd)&&n.isKeyword(Bd))return!1;n.isKeyword(Md)&&(t=!0)}return t}}class zd extends Vd{constructor(e,t){super(e),this.mStringSrc=t}allows(e,t){return!1}permits(e,t,n,r,s,i){return!1}equals(e){ return this.mStringSrc[0]===e}toString(){return this.mStringSrc.join(" ")}}class qd extends Vd{constructor(e){super(e)}permits(e,t,n,r,s,i){return!1}allows(e,t){return!1}toString(){return md}addSrcs(e){throw new Error("upgrade-insecure-requests does not hold any srcs")}getDirName(){return md}}class Hd extends Vd{constructor(e){super(e),this.mRestrictWorkers=!1,this.mRestrictScriptElem=!1,this.mRestrictScriptAttr=!1,this.mDirective=e}setRestrictWorkers(){this.mRestrictWorkers=!0} setRestrictScriptElem(){this.mRestrictScriptElem=!0}setRestrictScriptAttr(){this.mRestrictScriptAttr=!0}equals(e){return e===_d?this.mRestrictWorkers:e===yd?this.mRestrictScriptElem:e===kd?this.mRestrictScriptAttr:this.mDirective===e}}class Qd{permits(e,t,n,r){return!1}allows(e,t){return!1}isReportSample(){return!1}isKeyword(e){return!1}isHash(){return!1}isNonce(){return!1}}class Wd extends Qd{constructor(e){if(super(),this.mKeyword=e, e===Sd)throw new Error("'self' should have been replaced in the parser")}allows(e,t){return this.mKeyword===e}toString(){return i(this.mKeyword)}isReportSample(){return this.mKeyword==Td}isKeyword(e){return this.mKeyword==e}}class Xd extends Qd{constructor(e){super(),this.mPath="",this.mHost=e.toLowerCase(),this.mGeneratedFromSelfKeyword=!1,this.mIsUniqueOrigin=!1,this.mWithinFrameAncstorsDir=!1}permits(e,t,n,r){if(this.mIsUniqueOrigin)return!1 ;if(!h(this.mScheme,e,n,r,this.mGeneratedFromSelfKeyword))return!1;const i=s(e.hostname);if("*"==this.mHost){if("blob"===e.scheme||"data"===e.scheme||"filesystem"===e.scheme)return!1;if(!this.mScheme)return!0}else if("*"==this.mHost[0]){if("."!=this.mHost[1])throw new Error("Second character needs to be '.' whenever host starts with '*'");const e=this.mHost.substr(1);if(!i.endsWith(e))return!1}else if(this.mHost!=i)return!1;if(!function(e,t,n){if("*"===t)return!0;let r=n.port;if(!r){ if(!e)return!1;const t=Pd(e);return t==Fd||0==t}if(r===Fd&&!t)return!0;if(r===Fd){const e=n.scheme;r=Pd(e)}const s=r.toString();if(t===s)return!0;let i=t;if(!i){if(!e)throw new Error("need a scheme to query default port");i=Pd(e).toString()}return i===s||"80"===i&&"443"===s}(this.mScheme,this.mPort,e))return!1;if(!t&&this.mPath){const t=e.pathname;if(this.mWithinFrameAncstorsDir)return!0;const n=s(t);if("/"==this.mPath.substr(-1)){if(!n.startsWith(this.mPath))return!1 }else if(this.mPath!=n)return!1}return!0}toString(){let e="";return this.mGeneratedFromSelfKeyword?Sd:"*"!==this.mHost||this.mScheme||this.mPort?(e+=this.mScheme,e+="://",e+=this.mHost,this.mPort&&(e+=":"+this.mPort),e+=i(this.mPath),e):this.mHost}setScheme(e){this.mScheme=e.toLowerCase()}setPort(e){this.mPort=`${e}`}appendPath(e){this.mPath+=e}setGeneratedFromSelfKeyword(){this.mGeneratedFromSelfKeyword=!0}setIsUniqueOrigin(){this.mIsUniqueOrigin=!0}setWithinFrameAncestorsDir(e){ this.mWithinFrameAncstorsDir=e}getScheme(){return this.mScheme}getHost(){return this.mHost}getPort(){return`${this.mPort||Fd}`}getPath(){return this.mPath}}class Yd extends Qd{constructor(e){super(),this.mNonce=e}allows(e,t){return e===Zd&&this.mNonce===t}toString(){return`${Zd}${this.mNonce}'`}getNonce(){return this.mNonce}isNonce(){return!0}}class Jd extends Qd{constructor(e,t){super(),this.mAlgorithm=e.toLowerCase(),this.mHash=t.replace(/-/g,"+").replace(/_/g,"/")}allows(e,t){return!1} toString(){return`'${this.mAlgorithm}-${this.mHash}'`}getAlgorithm(){return this.mAlgorithm}getHash(){return this.mHash}isHash(){return!0}}class Kd extends Qd{constructor(e){super(),this.mScheme=e.toLowerCase()}permits(e,t,n,r){if(""===this.mScheme)throw new Error("scheme cannot be the empty string");return h(this.mScheme,e,n,r,!1)}toString(){return`${this.mScheme}:`}getScheme(){return this.mScheme}}class $d extends Qd{constructor(e){super(),this.mReportURI=e}toString(){ return i(Hn(this.mReportURI))}}class eA{constructor(){this.mDeliveredViaMetaTag=!1,this.mUpgradeInsecDir=null,this.mDirectives=[],this.mReportOnly=!1}setDeliveredViaMetaTagFlag(e){this.mDeliveredViaMetaTag=e}getDeliveredViaMetaTagFlag(){return this.mDeliveredViaMetaTag}matchingOrDefaultDirective(e){let t=null;for(let n=0;ne.toString())).join("; ")}hasDirective(e,t){for(const n of this.mDirectives)if(t){if(n.getDirName()===e)return!0}else if(n.equals(e))return!0;return!1}addDirective(e){this.mDirectives.push(e)}getDirectives(){return this.mDirectives}setReportOnlyFlag(e){this.mReportOnly=e}getReportOnlyFlag(){return this.mReportOnly}getDirectiveAsString(e){for(const t of this.mDirectives)if(!t.equals(cd)&&t.equals(e))return t.toString();return""}getNumDirectives(){ return this.mDirectives.length}getReportURIs(){for(const e of this.mDirectives)if(e.equals(hd))return e.getReportURIs();return[]}allowsAllInlineBehavior(e){const t=this.matchingOrDefaultDirective(e);return!t||t.allowsAllInlineBehavior(e)}addNonce(e){let t=null,n=null,r=null;for(let e=0;e!e.allows(Gd)));this.mDirectives[i].addSrcs([s,...e])}else{const e=new Vd(ud);e.addSrcs([s]),this.mDirectives.push(e)}}getAllowsEval(){return!(!this.allows(ud,Id)&&!this.getReportOnlyFlag())}getAllowsInline(e,t,n,r,s,i,o,a,c){if(![yd,kd,Rd,xd].includes(e))return console.warn("csppo: can only allow inline for (script/style)-src-(attr/elem)"),!0;let l="";if(this.allowsAllInlineBehavior(e))return!0;if(this.allows(e,Zd,n))return!0 ;""===l&&s&&(l=s.innerText),""===l&&(l=o);const u=this.allows(e,Ud);if((!t||u)&&this.allows(e,jd,l))return!0;let d=!1;return[yd,kd].includes(e)&&this.allows(e,Bd)&&(d=!r),!(!d&&!this.getReportOnlyFlag())}}class tA{constructor(e,t,n){this.mCurCharPos=0,this.mEndCharPos=0,this.mCurValue="",this.mValue="",this.mHasHashOrNonce=!1,this.mHasAnyUnsafeEval=!1,this.mStrictDynamic=!1,this.mUnsafeInlineKeywordSrc=void 0,this.mWorkerSrc=void 0,this.mScriptSrc=void 0,this.mParsingFrameAncestorsDir=!1, this.mTokens=e,this.mCurDir=[],this.mCurToken="",this.mSelfURI=t,this.mPolicy=void 0,this.mDeliveredViaMetaTag=n}get mCurChar(){return this.mValue[this.mCurCharPos]}atEnd(){return this.mCurCharPos>=this.mEndCharPos}accept(e){return!this.atEnd()&&("string"==typeof e?this.mCurChar===e:e(this.mCurChar))&&this.advance()}peek(e){return!this.atEnd()&&("string"==typeof e?this.mCurChar===e:e(this.mCurChar))}advance(){return!this.atEnd()&&(this.mCurValue+=this.mCurChar,this.mCurCharPos++,!0)} resetCurValue(){this.mCurValue=""}resetCurChar(e){this.mValue=e,this.mCurCharPos=0,this.mEndCharPos=e.length,this.resetCurValue()}atEndOfPath(){return this.atEnd()||this.peek("?")||this.peek("#")}atValidUnreservedChar(){return this.peek(a)||this.peek(c)||this.peek(ad)||this.peek(".")||this.peek("_")||this.peek("~")}schemeChar(){return!this.atEnd()&&(this.accept(a)||this.accept(c)||this.accept("+")||this.accept(ad)||this.accept("."))}directiveName(){const e=function(e){const t=e.toLowerCase() ;for(let e=1;e512)return!1}return n=s(this.mCurValue),e.appendPath(n),this.resetCurValue(),!0}path(e){return this.resetCurValue(),this.accept(od)?this.atEndOfPath()?(e.appendPath("/"),!0):this.peek(od)?(console.warn("Couldn't parse invalid source:",this.mCurToken), !1):this.subPath(e):(console.warn("Couldn't parse invalid source:",this.mCurToken),!1)}subHost(){let e=0;for(;!this.atEndOfPath()&&!this.peek(id)&&!this.peek(od);){for(e++;this.hostChar();)e++;if(this.accept(".")&&!this.hostChar())return!1;if(e>512)return!1}return!0}host(){if(this.accept("*")){if(this.atEnd()||this.peek(":"))return new Xd(this.mCurValue);if(!this.accept("."))return console.warn("cspp: couldntParseInvalidHost",this.mCurToken),null} if(!this.hostChar())return console.warn("cspp: couldntParseInvalidHost",this.mCurToken),null;if(!this.subHost())return console.warn("cspp: couldntParseInvalidHost",this.mCurToken),null;if(function(e){const t=e.toLowerCase();for(const e of Ld){const n=e.toLowerCase();if(t===n.substring(1,n.length-1))return!0}return!1}(this.mCurValue)){const e=this.mCurValue.toLowerCase();console.warn("cspp: hostNameMightBeKeyword",this.mCurToken,e)}return new Xd(this.mCurValue)}keywordSource(){ return r(this.mCurToken,Sd)?function(e){const t=e.hostname,n=new Xd(t);n.setGeneratedFromSelfKeyword();const r=e.scheme;if(n.setScheme(r),""===t)return n.setIsUniqueOrigin(),n;const s=e.port||Fd;return s>0&&n.setPort(s),n}(this.mSelfURI):r(this.mCurToken,Td)?new Wd(this.mCurToken):r(this.mCurToken,Bd)?this.mCurDir[0]!==ud&&this.mCurDir[0]!==yd&&this.mCurDir[0]!==kd&&this.mCurDir[0]!==ld?(console.warn("cspp: ignoringStrictDynamic",this.mCurToken),null):(this.mStrictDynamic=!0, new Wd(this.mCurToken)):r(this.mCurToken,Md)?this.mUnsafeInlineKeywordSrc?(console.warn("cspp: ignoringDuplicateSrc",this.mCurToken),null):(this.mUnsafeInlineKeywordSrc=new Wd(this.mCurToken),this.mUnsafeInlineKeywordSrc):r(this.mCurToken,Id)||tA.sSecurityCspWasmUnsafeEvalEnabled&&r(this.mCurToken,Dd)?(this.mHasAnyUnsafeEval=!0, new Wd(this.mCurToken)):tA.sSecurityCspUnsafeHashesEnabled&&r(this.mCurToken,Ud)?new Wd(this.mCurToken):r(this.mCurToken,Od)?A(this.mCurDir[0],bd)?new Wd(this.mCurToken):(console.warn("cspp: IgnoringSourceWithinDirective",this.mCurToken),null):null}nonceSource(){if(!this.mCurToken.startsWith("'nonce-")||"'"!==this.mCurToken[this.mCurToken.length-1])return null;const e=this.mCurToken.substring(1,this.mCurToken.length-1),t=e.indexOf("-") ;return t<0?null:u(e.substring(t+1))?(this.mHasHashOrNonce=!0,new Yd(e.substring(t+1))):null}hashSource(){if("'"!==this.mCurToken[0]||"'"!==this.mCurToken[this.mCurToken.length-1])return null;const e=this.mCurToken.substring(1,this.mCurToken.length-1),t=e.indexOf("-");if(t<0)return null;if(!u(e.substring(t+1)))return null;const n=e.substring(0,t).toLowerCase(),r=e.substring(t+1);for(const e of Ed)if(n===e)return this.mHasHashOrNonce=!0,new Jd(n,r);return null}hostSource(){const e=this.host() ;if(!e)return null;if(this.peek(":")){if(!this.port())return null;e.setPort(this.mCurValue)}return this.atEndOfPath()||this.path(e)?e:null}schemeSource(){if(!this.accept(a))return null;for(;this.schemeChar(););const e=this.mCurValue;return this.accept(id)?this.peek(c)||this.peek("*")?null:new Kd(e):null}sourceExpression(){const e=this.keywordSource();if(e)return e;const t=this.nonceSource();if(t)return t;const n=this.hashSource();if(n)return n;if("*"===this.mCurToken)return new Xd("*") ;this.resetCurChar(this.mCurToken);let r="";const s=this.schemeSource();if(s){if(this.atEnd())return s;if(r=s.toString(),r=r.replace(":",""),!this.accept(od)||!this.accept(od))return console.warn("cspp: failedToParseUnrecognizedSource",this.mCurToken),null}this.resetCurValue(),r||(this.resetCurChar(this.mCurToken),r=this.mSelfURI.scheme);const i=this.hostSource();return i?(i.setScheme(r),i.setWithinFrameAncestorsDir(this.mParsingFrameAncestorsDir),i):null}sourceList(){let e=!1;const t=[] ;for(let n=1;n1&&console.warn("cspp: ignoreSrcForDirective - block-all-mixed-content",e.getDirName(),this.mCurDir));if(e.equals(md))return void(this.mCurDir.length>1&&console.warn("cspp: ignoreSrcForDirective - upgrade-insecure-requests",e.getDirName(),this.mCurDir)) ;if(A(this.mCurDir[0],wd))return;this.mHasHashOrNonce=!1,this.mStrictDynamic=!1,this.mHasAnyUnsafeEval=!1,this.mUnsafeInlineKeywordSrc=void 0;const t=this.directiveValue();if(0==t.length){const e=new Wd(Gd);t.push(e)}if(this.mStrictDynamic&&!e.equals(ld)){for(const e of t){const t=e.toString();e.isKeyword(Bd)||e.isKeyword(Id)||e.isKeyword(Dd)||e.isKeyword(Ud)||e.isNonce()||e.isHash()||console.warn("cspp: ignoringScriptSrcForStrictDynamic",t)} this.mHasHashOrNonce||console.warn("cspp: strictDynamicButNoHashOrNonce",this.mCurDir)}this.mHasHashOrNonce&&this.mUnsafeInlineKeywordSrc&&(e.isDefaultDirective()||e.equals(ud)||e.equals(yd)||e.equals(kd)||e.equals(dd)||e.equals(Rd)||e.equals(xd))&&console.warn("cspp: ignoringSrcWithinNonceOrHashDirective - 'unsafe-inline'",this.mCurDir),this.mHasAnyUnsafeEval&&(e.equals(yd)||e.equals(kd))&&console.warn("cspp: ignoringUnsafeEval",this.mCurDir),e.addSrcs(t)}policy(){this.mPolicy=new eA ;for(let e=0;ee.toString()))}}const rA={js:[{file:"page.js"},{file:"content.js"}],matches:[""],runAt:"document_start",allFrames:!0};let sA;const iA=(()=>{const e=new it(1);let t=!1,n=!1;return{acquire:()=>(t||(t=!0,bi.emit("schedule")),e.acquire().done((()=>{n||(n=!0,bi.emit("start"))}))),release:()=>{e.release(), e.count>0&&(bi.emit("complete"),t=!1,n=!1)}}})();let oA,aA=!1,cA=!1,lA=[];const uA=({type:e,name:t,script:n})=>{_.verbose(`dc: script ${e} event for ${t} (uuid: ${n.uuid})`),AA(n.uuid,!0)},dA=({uuid:e,tabId:t})=>{_.verbose(`dc: storage changed event for uuid: ${e} from tabId: ${t}`),AA(e,!1)},AA=(e,t)=>{oA&&te(oA),lA.includes(e)||lA.push(e),oA=ce((()=>{mA({renew:lA}),lA=[]}),t?100:0)},hA="|",pA="userscript-api";let fA;const mA=async e=>{ const{force:t,renew:n}=e||{},r="userscripts"==wn.values.runtime_content_mode,s="userscripts-dynamic"==wn.values.runtime_content_mode;await iA.acquire(),_.verbose("dc: userScriptsLock acquired");try{if(r||s){if(!sA.available()){const e="https://www.tampermonkey.net/faq#Q209";oi.all("developerMode",{key:"developer_mode",class:"information",title:qr.getMessage("Developer_Mode"),text:qr.getMessage("Please_enable_developer_mode_to_allow_userscript_injection_"),info_url:e,timeout:864e5});const t=()=>{ sA.available()&&(oi.removeAll("developer_mode"),dc.clear(n),mA())};dc.on("devMode",t);const n=await dc.schedule("devMode",{periodInMinutes:1,keepExistent:!0});ce(t,3e3);const r=xt;return void(!fA&&r.supported&&(fA=async(t,n,s)=>{const i=s.url;if("complete"===n.status&&i){const n=Ah.externally_connectable_reg;"off"!=wn.values.external_connect&&n.rinc&&n.rinc.length&&n.rinc.some((e=>e.test(i)))&&r.executeScript({target:{tabId:t,frameIds:[0]},injectImmediately:!0,world:"MAIN",func:(e,t,n,r)=>{ const s=window,i=s.console,o=s.external||{};if(o.Tampermonkey)return;const a={getVersion:n=>{n({id:e,version:t,errors:["devmode"]})},openOptions:()=>{i.warn(n,r)},isInstalled:(e,t,s)=>{let o;i.warn(n,r),"function"==typeof t?s=t:o=t||void 0,s&&s({name:e,namespace:o,installed:void 0})}};Object.defineProperty(o,"Tampermonkey",{configurable:!0,value:a})},args:[j.short_id,mt.manifest.version,"Please enable developer mode to make this API fully functional.",e]})}},vt.onUpdated.addDynamicListener(fA))) }if(fA&&(vt.onUpdated.removeListener(fA),fA=void 0),!aA){const{dom:e}=hh(wn.values.sandbox_mode),t=e?"script-src 'self' 'unsafe-inline' 'unsafe-eval' *":"script-src 'self' 'unsafe-inline' *";await sA.configureWorld({csp:t,messaging:!0}),aA=!0}const e=mt.inIncognitoContext,r=`nt7mb+${S()}`,i=(e,t)=>`2${hA}${pA}${hA}${e}${hA}${r}${hA}${t||p}`,o=e=>{const[,t,n,s]=e.split(hA);if(t===pA&&s===r)return n},{js:a,runAt:c,matches:l,allFrames:u}=rA,d=[],A=[];let h=(await sA.getScripts()).map((e=>e.id)) ;const p=Math.random().toString(36).substring(2),f=`1${hA}tm-info${hA}${r}`,m=`1${hA}page${hA}${r}`,g=`3${hA}content${hA}${r}${hA}${s?"d":"r"}`;let v,w=`${g}${hA}${p}`;const b={};if(h.map((e=>{const t=o(e);t?b[t]=e:e.startsWith(g)&&(v=e)})),_.verbose("dc: getScripts - registered_ids: ",h),!wn.values.enabled)return await sA.unregister({ids:h}),cA&&(vi.off("scriptEvent",uA),vi.off("scriptStorage",dA),cA=!1),void _.verbose("dc: disabled - unregister all scripts",h);if(t)await sA.unregister({ids:h }),h=[],_.verbose("dc: force - registered_ids: ",h);else if(h.length&&!h.includes(m))_.debug("dc: scripts were modified, re-registering all scripts"),await sA.unregister({ids:h}),h=[],_.verbose("dc: PAGE_ID missing - registered_ids: ",h);else if(n&&n.length){if(!s)throw new Error("renew is only supported in userscripts-dynamic mode");const e=n.map((e=>b[e])).filter((e=>!!e));e.length&&(v&&e.push(v),A.push(...e),h=h.filter((t=>!e.includes(t))), _.verbose("dc: renew && renew.length - registered_ids: ",h," to_unregister_late_ids: ",e))}else v&&(_.verbose("dc: keep current content script: ",v),w=v);if(s){cA||(cA=!0,vi.on("scriptEvent",uA),vi.on("scriptStorage",dA));const t=mh({runners:[],contexters:[]},"*",{incognito:e}),r="("+(e=>{const t=window;Object.defineProperty(t,"tm_info",{configurable:!0,get:()=>{delete t.tm_info;const n=t.tm_scripts||{},r={},s={};for(const{entry:e,sandbox:t}of Object.values(n))if(e.script){let n=r[t] ;n||(n=r[t]=[]),n.push(e)}else{let n=s[t];n||(n=s[t]=[]),n.push(e)}for(const e of Object.keys(r))r[e]=(r[e]||[]).sort(((e,t)=>e.script.position-t.script.position));return e.scripts=r,e.contexters=s,e}})}).toString()+`)(${JSON.stringify(t)});\n`+`//# sourceURL=${mt.getURL("userscript-api-init")}\n`,s={allFrames:u,id:f,js:[{code:r}],matches:l,runAt:c,world:"USER_SCRIPT"};d.push({id:f,fn:async()=>(await sA.register([s]),!0)});const{rinc:o,rexc:a}=yl.conditions||{},A=e?"incognito-tabs":"normal-tabs" ;await Promise.all(Yc.determineScriptsToRun({deleted:!1,enabled:!0}).map((async e=>{const t=!(!0===e.options.noframes||null===e.options.noframes&&!0===e.options.override.orig_noframes);let r=null;if((r=wn.values.runtime_run_in)&&r.length&&!r.includes(A)||(r=e.options.run_in||e.options.override.orig_run_in)&&r.length&&!r.includes(A))return;const s=Yc.getUrlCondition(e.uuid);if(!s)return void _.warn(`dc: unable to get URL conditions for "${e.name}" (${e.uuid})`);let c,l,u,h;const p=[] ;let{rinc:f,rexc:m}=Go(s,!0);if(o&&(f=(f||[]).concat(o)),a&&(m=(m||[]).concat(a)),s.inc&&["unsafe","default"].includes(wn.values.script_include_mode)&&s.inc.some((e=>e.startsWith("/")))?(c=[""],u=s.exc&&s.exc.length?s.exc.filter((e=>!e.startsWith("/"))):void 0,h={warn:!0,inc:null==f?void 0:f.map((e=>Zo(e))),exc:null==m?void 0:m.map((e=>Zo(e)))}, p.push(`dc: "${e.name}" (${e.uuid}) is injected ahead of time into every tab due to the use of a RegExp include. The RegExp is then evaluated on each tab.`)):(c=s.match&&s.match.length?s.match.map((e=>(e=>{const{scheme:t,host:n,path:r}=Mn(e),s=[],i=`${n}${r}`;return"http*"===t?(s.push(`http${Sn}${i}`),s.push(`https${Sn}${i}`)):s.push(`${t}${Sn}${i}`),s})(e))).flat():s.inc&&s.inc.length?["http://willneverexist.tmnk.net/"]:void 0,l=s.inc?s.inc.map((e=>{if(-1!==e.indexOf(".tld")){const t=En(e) ;if(t){let{protocol:n,host:r,path:s}=t;r.endsWith(".tld")&&(r=r.replace(/\.tld$/,".*"),e=`${n}${r}${s||""}`)}else e=e.replace(/\.tld/,".*")}return e.endsWith("*")||(e+="*"),e})):void 0,u=s.exc&&s.exc.length?s.exc.filter((e=>!e.startsWith("/"))):void 0,h={warn:!1,inc:null==f?void 0:f.map((e=>Zo(e))),exc:null==m?void 0:m.map((e=>Zo(e)))}),!c||!c.length)return void _.warn(`dc: unable to get URL matches for "${e.name}" (${e.uuid})`);const{name:g,uuid:v,evilness:w}=e ;if(w&&w>=Math.min(kc.SEVERITY_MAX,wn.values.script_blacklist_severity))return;const y=(n&&n.includes(v)?void 0:b[v])||i(v);d.push({id:y,script:!0,fn:async()=>{const n=[],r=[];Yc.isContexter(e)?r.push(e):n.push(await Ql.bundle(e));const s={runners:n,contexters:r},{scripts:i,contexters:o}=fh(s),a="("+((e,t,n,r)=>{const s=window,i=s.tm_scripts=s.tm_scripts||{},o=e=>!!e.script;for(const a of[e,t]){const e=Object.entries(a);for(const[t,a]of e)if(a)for(const e of a)if(o(e)){ const{uuid:o,name:a,position:c}=e.script;if(n){const e=s.location.href.split("#")[0],{inc:t,exc:i,warn:o}=n;if(t&&!t.some((t=>""===e.replace(new RegExp(t.source,t.flags),"")))||i&&i.some((t=>""===e.replace(new RegExp(t.source,t.flags),"")))){o&&r>=30&&s.console.warn(`"${a}" uses a RegExp include and is injected ahead of time into every tab`,t,i);continue}}i[o]={entry:e,sandbox:t,position:c}}else i[e.uuid]={entry:e,sandbox:t,position:-1}} }).toString()+`)(${JSON.stringify(i)}, ${JSON.stringify(o)}, ${h?JSON.stringify(h):"undefined"}, ${wn.values.logLevel});\n`+`//# sourceURL=${mt.getURL(y)}\n`,d={allFrames:t,id:y,js:[{code:a}],matches:c,includeGlobs:l,excludeGlobs:u,runAt:"document_start",world:"USER_SCRIPT"};if(p.length)for(const e of p)_.warn(e);try{return await sA.register([d]),!0}catch(d){return _.error(`dc: can't register "${g}" (${v})`,d),!1}}})})))}else cA&&(vi.off("scriptEvent",uA),vi.off("scriptStorage",dA),cA=!1) ;const[y,k]=a;let R;if(s){const e=mt.getURL(k.file),t=await ue(e).then((e=>e.text()));R={allFrames:u,id:w,js:[{code:`window.tm_scripts=window.tm_scripts||null;${t}\n//# sourceURL=${e}\n`}],matches:l,runAt:c,world:"USER_SCRIPT"}}else R={allFrames:u,id:w,js:[k],matches:l,runAt:c,world:"USER_SCRIPT"};d.push({id:w,fn:async()=>(await sA.register([R]),!0)});const x={allFrames:u,id:m,js:[y],matches:l,runAt:c,world:"USER_SCRIPT"};d.push({id:m,fn:async()=>(await sA.register([x]),!0)}) ;const E=d.map((e=>e.id)),C=h.filter((e=>!E.includes(e)));_.verbose("dc: to_unregister_ids: ",C),C.length&&await sA.unregister({ids:C}),_.verbose("dc: to_register: ",E);for(const{id:e,fn:t}of d)if(!h.includes(e)){_.verbose("dc: register id:",e);try{await t()}catch(t){_.error(`dc: can't register ${e}`,t)}}_.verbose("dc: to_unregister_late: ",A),A.length&&await sA.unregister({ids:A})}}finally{_.verbose("dc: userScriptsLock release"),iA.release()}},gA=async()=>{if(Rt.supported){sA=Rt;try{await mA() }catch(e){_.error("dc: userscripts API init failed",e)}wn.addChangeListener(["runtime_content_mode"],(()=>mA())),wn.addChangeListener(["sandbox_mode"],(()=>{aA=!1,mA({force:!0})})),wn.addChangeListener(["enabled","runtime_run_in","external_connect","script_include_mode","forbiddenPages","page_whitelist","page_filter_mode"],(()=>{"userscripts-dynamic"===wn.values.runtime_content_mode&&mA({force:!0})}))}},vA={},wA={},_A=(("TM_"+Ve().substr(0,5)).toLowerCase(), ["content-security-policy","x-content-security-policy","x-webkit-csp"]),bA="feature-policy",yA="x-frame-options",kA=_t.extraHeaderNeeded,RA=(e,t)=>e.split(",").map((e=>{let n,r,s,i;const o=[],a=[],c=e.split(";");let l,u;if(c.forEach(((e,t)=>{0===e.search(/^\s*script-src /)?r=t:0===e.search(/^\s*default-src /)?s=t:0===e.search(/^\s*img-src /)?i=t:0===e.search(/^\s*trusted-types /)||0===e.search(/^\s*require-trusted-types-for /)?a.push(t):0===e.search(/^\s*frame-ancestors /)&&o.push(t)})), void 0!==s&&void 0===r&&(n=!0,c.push(c[s].replace(/default-src /,"script-src ")),r=c.length-1,_.verbose("webRequest: add script-src CSP",t)),void 0!==s&&void 0===i&&(n=!0,c.push(c[s].replace(/default-src /,"img-src ")),i=c.length-1,_.verbose("webRequest: add img-src CSP",t)),void 0!==i&&(u=!1,l=c[i],-1==l.search(/data:/)&&(u=!0,l=l.replace(/img-src /,"img-src data: ")),-1!=l.search(/'none'/)&&(u=!0,l=l.replace(/ 'none'/,"")),u&&(_.verbose("webRequest: relaxing",c[i]," to ",l,t),c[i]=l,n=!0)), void 0!==r&&(u=!1,l=c[r],-1==l.search(/ 'unsafe-eval'(\s|$)/)&&(u=!0,l=l.replace(/script-src /,"script-src 'unsafe-eval' ")),-1!=l.search(/ 'none'(\s|$)/)&&(u=!0,l=l.replace(/ 'none'/,"")),u&&(_.verbose("webRequest: relaxing",c[r],l,t),c[r]=l,n=!0)),void 0!==s&&(u=!1,l=c[s],u&&(_.verbose("webRequest: relaxing",l,t),n=!0)),a.length){for(const e of a)c[e]="";n=!0}return n?c.filter((e=>e)).join(";"):null})).filter((e=>e)).join(",")||null,xA=e=>{if(k.late)if("main_frame"==e.type){ if(e.documentId)return;if(wi.emit("reset",{tabId:e.tabId,early:!0}),e.tabId>0&&"POST"!=e.method&&("legacy"==wn.values.scriptUrlDetection||"manual"!=wn.values.scriptUrlDetection&&e.url.startsWith("file:"))){const t=e.url;if(Eo(t))return _.verbose("webRequest: user script detected @ "+e.url+" -> open install page"),void Yc.installFromUrl(t,{},{silent_fail:!0}).fail((n=>{_.info("webRequest: user script detected @ "+t+" was invalid",n?n.messages:""),vt.update(e.tabId,{url:t+"#bypass=true"},(()=>{})) }))}}else{let t,n;const r=xo(e);if(!r)return void _.error("webRequest: unable to determine tab sender",e);if((t=Xh(e.tabId,r))&&(n=((e,t)=>{let n={};const r=e.url;return Object.keys(t).forEach((e=>{const s=t[e];Object.entries(s.rules).some((([e,t])=>{let i,o,a;if(!(i=t.selector)||!(o=t.action))return;const c=s.id+"/"+e;if((a=Oo.get(c))||(a=Go({inc:i.include,match:i.match,exc:i.exclude}),Oo.set(c,a)),To(r,a)){if(o.cancel)return _.log("webRequest: request was canceled by script "+s.uuid,r,t,s), s.callback&&s.callback({type:"cancel",details:{rule:t,url:r}}),n={cancel:!0},!0;if(o.redirect){const{url:e,from:i,to:a}=o.redirect;let c,l;if(e)c=e;else if(i&&a&&(l=r.match(i))){l.shift();let e=a;l.concat(["","",""]).forEach(((t,n)=>{e=e.replace("$"+(n+1),t||"")})),c=e}const u=e=>{_.warn("webRequest: error while request redirect by script "+s.uuid,r,t,s),s.callback&&s.callback({type:"redirect",message:"error",details:{description:e,rule:t,url:r,redirect_url:c}})} ;if(!c)return void u("unable to determine the redirect URL");c=Qn(c),yl.isAllowed(c)?Yc.scriptWillRun(s.uuid,c)?(_.log("webRequest: request was redirected by script "+s.uuid,r,c,t,s),s.callback&&s.callback({type:"redirect",details:{rule:t,url:r,redirect_url:c}}),n.redirectUrl=c):u("the redirect URL needs to be included by the scripts @include or @match tag"):u("the redirect URL is filtered by the security settings")}}}))})),n})(e,t)))return n}else k.registerLateCallback((()=>{xA(e)}))},EA=e=>{ let t,n=!0;if(R.Pledge().then((()=>{if(!k.late){const e=R();return k.registerLateCallback((()=>e.resolve())),e.promise()}})).then((()=>{e.responseHeaders,"xmlhttprequest"==e.type&&(t=null)})).then((()=>{if(void 0!==t)return;let r,s,i,o,a,c,l=e.responseHeaders||[];const u=wn.values.webrequest_fixCSP,d=MA&&D,A=d&&"remove"==u,h=d&&("yes"==u||m),p=MA&&m,f=MA&&m,g=A||h||p||f,v=g&&S()>=60,w=g&&m;if(l.some((e=>{if(!e.name)return;const t=e.name.toLowerCase();if(s=s||"location"==t,g&&_A.includes(t)){ let t;if(i=!0,p&&!c&&(t=e.value)){const e=t.match(/'nonce-([^']+)'/);c=e?e[1]:void 0}}return v&&(o=o||t==bA),w&&(a=a||t==yA),s})),s)return _.verbose("webRequest: redirect found, skip script determination",e),void(t=null);const{tabId:b,url:y}=e,k=xo(e);let x,E,C;return k?(E="xmlhttprequest"==e.type?ph(k,y,e):Jh(b,k,y,e),R.Pledge().then((()=>{if(f)return iA.acquire().then((()=>"uninitialized")).always((()=>iA.release())).then((e=>{C=e}))})).then((()=>{ if(E&&(p&&c?E.nonce=`n:${c}`:f&&(E.nonce=`b:${C}`),h||A||f)){const{runners:e,contexters:t}=E;x=e.length+t.length>0}if(x&&(i||o||a)){const t=[];if(l.forEach(((n,s)=>{if(!n.name||!n.value)return;const c=n.name.toLowerCase();if(i&&_A.includes(c))for(const e of n.value.split(",")){const r={name:n.name,value:e};t.push({i:s,item:r})}if(o&&c==bA)if(A)r=!0,l[s]={name:n.name,value:void 0};else{const t=((e,t)=>{let n,r;const s=e.split(";");let i,o;return s.forEach(((e,t)=>{ 0===e.search(/^\s*sync-xhr /)&&(r=t)})),void 0!==r&&(o=!1,i=s[r],-1!=i.search(/'none'/)&&(o=!0,i=i.replace(/ 'none'/," *")),o&&(_.verbose("webRequest: relaxing",s[r],i,t),s[r]=i,n=!0)),n?s.join(";"):null})(n.value,e);t&&(r=!0,l[s]={name:n.name,value:t})}a&&c==yA&&(l[s]={name:n.name,value:void 0})})),A)t.forEach((({i:e,item:t})=>{r=!0,l[e]={name:t.name,value:void 0}}));else if(f){const n=t.map((({item:e})=>e.value||""));let s,i,o;if((s=zn(e.url))&&(i=tt(`${s.hostname}#${C}`))&&(o=((e,t,n)=>{ const r=zn(t.url);if(!r)return _.verbose(`webRequest: unable to parse URL ${t.url}`),null;const s=e.map((e=>{const t=Nd.tokenizeCSPPolicy(e);return tA.parseContentSecurityPolicy(t,r,!1)||(_.verbose(`webRequest: unable to parse CSP ${e}`),null)})),i=s.filter((e=>null!==e)),o=new nA;o.addPolicies(i);const a=((e,t)=>{if(e.getAllowsInline(yd,!1,"",!1,null,null,"",0,0))return;if(e.getAllowsInline(yd,!1,t,!1,null,null,"",0,0))return!1;const n=e.getPolicies() ;for(const e of n)e.getAllowsInline(yd,!1,t,!1,null,null,"",0,0)||e.addNonce(t);return!0})(o,n);if(a){let t=0;const n=o.toStrings();return n.length!=i.length?(_.verbose("webRequest: internal error on adding nonce to CSP",e),null):s.map(((r,s)=>null===r?e[s]:n[t++]))}return null})(n,e,i))){const e={},n=o;t.forEach((({item:t,i:r},s)=>{const i=n[s];e[r]?l[r].value+=","+i:l[r]={name:t.name,value:i},e[r]=!0})),r=!0}}else{const n={};t.forEach((({i:t,item:s})=>{if(!s.name||!s.value)return ;const i=RA(s.value,e);null===i||(""===i?(r=!0,l[t]={name:s.name,value:void 0}):(n[t]?l[t].value+=","+i:l[t]={name:s.name,value:i},r=!0,n[t]=!0))}))}}})).then((()=>Lh(e.tabId,k,{},y))).then((()=>{if(x&&n&&_t.filterResponseData&&(A||h)&&"yes"==wn.values.webrequest_fixContentCSP&&["main_frame","sub_frame"].includes(e.type)){let t;if(l.some((e=>{if(e.name&&e.value)return"content-type"==e.name.toLowerCase()&&"text/html"==e.value.split(";")[0].toLowerCase().trim()?(t=!0,!0):void 0})),t){ const t=_t.filterResponseData(e.requestId);t.ondata=n=>{const r=new J("x-user-defined").decode(n.data,{stream:!0}),s=new RegExp('([\\s\\S]*)(]+http-equiv="(?:'+_A.join("|")+')"[^>]*>)([\\s\\S]*?<\\/head>)',"i");let i;const o=r.replace(s,((t,n,r,s)=>{const o=new RegExp('(content=")([^">]+)(")');return n+r.replace(o,((t,n,r,s)=>{const o=RA(r||"",e);return null!==o&&(i=!0),n+(o||r)+s}))+s}));i?t.write($e(o)):t.write(n.data),t.disconnect()},t.onstop=()=>{t&&t.disconnect()}}} r?(l=l.filter((e=>void 0!==e.value)),t={responseHeaders:l}):t=null}))):(_.error("webRequest: unable to determine tab sender",e),void(t=null))})),n=!1,void 0!==t)return t||void 0},CA=e=>{const{type:t,tabId:n,url:r,cookieStoreId:s,requestId:i}=e;if(k.late)if("xmlhttprequest"==t)delete wA[i],delete vA[i];else{const t=xo(e);if(!t)return void _.warn("webRequest: unable to determine tab sender",e);wi.emit("response",{tabId:n,sender:t,url:r,cookieStoreId:s,incognito:ko(e)||!1}) }else k.registerLateCallback((()=>{CA(e)}))},SA=e=>{const{type:t,tabId:n,requestId:r}=e;if("xmlhttprequest"==t)delete wA[r],delete vA[r];else if("main_frame"==t){const t=xo({frameId:0},{topframe:!0});wi.emit("error",{tabId:n,sender:t,url:e.url})}else _.warn("webRequest: unexpected request type",e)},MA=!1,IA=MA?["blocking"]:[],UA=["http://*/*","https://*/*","ftp://*/*","file:///*"].concat(Z?["ws://*/*","wss://*/*"]:[]),GA=e=>{try{e&&(_t.onBeforeRequest.addListener(xA,{urls:UA, types:["main_frame","sub_frame","script","xmlhttprequest",...Z?["websocket"]:[]]},[...IA]),_t.onHeadersReceived.addListener(EA,{urls:UA,types:["main_frame","sub_frame"]},[...IA,"responseHeaders",...kA?["extraHeaders"]:[]]),_t.onResponseStarted.addListener(CA,{urls:UA,types:["main_frame","sub_frame","xmlhttprequest"]},[]),_t.onErrorOccurred.addListener(SA,{urls:UA,types:["main_frame","xmlhttprequest"]})),_t.handlerBehaviorChanged()}catch(e){_.warn("webRequest: error initializings",e.message)} },ZA="https://www.tampermonkey.net/script_installation.php",TA=(e,t)=>{const n=zn(e);if(!n||!n.hash)return;const r=n.hash.substr(5),s=async()=>{if(r.startsWith(ZA))return;const e=await PA([t]);Promise.race([new Promise((e=>{wi.once("complete",(()=>e()),{tabId:t})})),N(3e4)]).then((()=>e())),vt.update(t,{url:r},(()=>{j.lastError}))};Eo(r)?(_.verbose("events.commited: user script detected @ "+r+" -> open install page"),Yc.installFromUrl(r,{},{silent_fail:!0}).fail((e=>{ _.info("events.commited: user script detected @ "+r+" was invalid",e?e.messages:""),s()})).done((()=>{xt.supported&&xt.executeScript({func:()=>history.length>1?history.back():window.close(),target:{tabId:t,frameIds:[0]},injectImmediately:!0,world:"ISOLATED"})}))):s()},BA=new it(1);let OA,DA;const jA=async(e,t)=>await DA.updateSessionRules({addRules:e,removeRuleIds:t});let LA;const FA=e=>{const t=[],[n,r]=e?[4,{excludedTabIds:e}]:[3,{}],s={type:"redirect",redirect:{regexSubstitution:ZA+"#url=\\0" }};Object.values(hs).map((e=>{for(const i of e.regexps){const o={id:OA++,priority:n,condition:{...r,requestDomains:e.domains,requestMethods:["get"],regexFilter:"^"+i+"(?:$|\\?|\\#)",resourceTypes:["main_frame"]},action:s};t.push(o)}}));const i={id:OA++,priority:n,condition:{...r,excludedRequestDomains:["tampermonkey.net",...(LA||(LA=Object.values(hs).reduce(((e,t)=>e.concat(t.domains)),[])),LA)],requestMethods:["get"], regexFilter:"^(?:https?|ftp)://[^\\#\\?]+/[^\\#\\?]+\\.(?:user|tamper)\\.js[^/]*$",resourceTypes:["main_frame"]},action:s};return t.push(i),t},PA=async e=>{await BA.acquire();const t=async e=>{try{const{install_general:t,install_excludes:n}=await WA(!1),r=[...t,...n].map((e=>e.id)),s=FA(e);await jA(s,r)}catch(e){_.error("dNr:",e)}};await t(e);const n=async()=>{void 0!==r&&(te(r),r=void 0,await t(),BA.release())};let r=ce(n,3e4);return n},NA={},VA=new it(1);let zA=!1;const qA=async()=>{ await VA.acquire();const e=Math.random().toString(36).substr(2);let t;NA[e]=new Promise((e=>{t=e})),VA.release();const n=()=>{t&&(t(),delete NA[e],t=void 0)};return ce(n,6e4),{done:n}},HA=["connect","delete","get","head","options","patch","post","put"],QA=async(e,t,n,r)=>{let s;const i=new Promise((e=>s=e)),o=t.toLowerCase(),a=(c=o,HA.includes(c)?c:"other");var c;let l;const u=r&&!n;await VA.acquire(),u?(zA=!0,await Promise.all(Object.values(NA))):(l=`${a}-${e}`,await(async e=>{for(;;){ const t=NA[e];if(!t)break;await t}})(l),NA[l]=i,VA.release());const d=zn(e),A=OA++;if(r){const t=Object.entries(r).map((([e,t])=>({header:e,operation:null===t?"remove":"set",...null===t?{}:{value:`${t}`}})));if(t.length){const n={urlFilter:u?"*":d?Hn(d,{noprotocol:!0}):e.replace(/^[^:]*:\/\//,""),initiatorDomains:[he],requestMethods:[a],resourceTypes:["xmlhttprequest"]},r={id:A,priority:2,condition:n,action:{type:"modifyHeaders",requestHeaders:t}};try{await DA.updateSessionRules({addRules:[r]}) }catch(e){_.error("dNr:",e)}}}let h,p,f,m,g;if(d&&d.protocol.startsWith("http")){const t=d?Hn(d):e;let r,s;const i=[];let a,c;h=new Promise((e=>{a=t=>{e(t),a=void 0}}));const l=e=>{const{tabId:t}=e;if(s&&c!==s){c=s;const n=xo(e);n?vi.emit("onRequestRedirect",{tabId:t,sender:n,url:s}):_.warn("netRequest: unable to determine tab sender",e)}};m=e=>{var n;if(void 0!==r)return;const s=e.initiator||e.originUrl&&(null===(n=zn(e.originUrl))||void 0===n?void 0:n.origin) ;a&&s==Ae&&Wn(e.url)===t&&e.method.toLowerCase()==o&&(r=e.requestId)};const u=e=>{let t=e.responseHeaders||[],r=401===e.statusCode;t=t.map(((t,n)=>{const{name:o,value:a}=t;if(o){const t=o.toLowerCase();if(t.startsWith(uo))return;if("set-cookie"==t)i.push({name:`${uo}-${n+0}`,value:a});else if("location"==t){if(r=!0,a){const t=Vn(a,{base:e.url,enforce_path:!0});t&&(s=t)}s&&l(e)}}return t})).filter((e=>!!e)),!r&&s&&t.push({name:lo,value:s}),(!r||n)&&(a(i.concat(t)),v())};f=e=>{var n ;a&&(e.initiator||e.originUrl&&(null===(n=zn(e.originUrl))||void 0===n?void 0:n.origin))==Ae&&(void 0===r?Wn(e.url)===t&&e.method.toLowerCase()==o:e.requestId===r)&&(r=e.requestId,u(e))},p=e=>{var n;(e.initiator||e.originUrl&&(null===(n=zn(e.originUrl))||void 0===n?void 0:n.origin))==Ae&&(void 0===r?Wn(e.url)===t&&e.method.toLowerCase()==o:e.requestId===r)&&(r=e.requestId,a&&u(e),v())},_t.onBeforeRequest.addDynamicListener(m,{urls:UA,types:["xmlhttprequest"]}), _t.onHeadersReceived.addDynamicListener(f,{urls:UA,types:["xmlhttprequest"]},["responseHeaders",..._t.extraHeaderNeeded?["extraHeaders"]:[]]),_t.onResponseStarted.addDynamicListener(p,{urls:UA,types:["xmlhttprequest"]}),await N(1)}const v=async()=>{if(g)return await g;if(f&&_t.onHeadersReceived.removeListener(f),p&&_t.onResponseStarted.removeListener(p),m&&_t.onBeforeRequest.removeListener(m),r){r=void 0;try{g=DA.updateSessionRules({removeRuleIds:[A]}),await g}catch(e){_.error("dNr:",e)}} zA&&(zA=!1,VA.release()),l&&delete NA[l]},w=async()=>{if(!s)return;const e=s;s=void 0,await v(),e()};return ce(w,6e4),{done:w,responseHeaders:h}},WA=async e=>{const t=await DA.getSessionRules();let n,r;e&&(n=t.reduce(((e,t)=>Math.max(e,t.id)),1)+1);const s=[],i=[],o=[];return t.forEach((e=>{1===e.priority?r=e:2===e.priority?s.push(e):3===e.priority?i.push(e):4===e.priority&&o.push(e)})),{max_id:n,all:t,csp:r,install_general:i,install_excludes:o}},XA=async()=>{const e=await aa() ;await BA.acquire();try{const t=void 0===OA;let{max_id:n,all:r,csp:s,install_general:i,install_excludes:o}=await WA(t);void 0!==n&&(OA=n);const a=[],c=[];e&&(a.push(...r),s=void 0,i=[],o=[]),"remove"===wn.values.webrequest_fixCSP?s||c.push({id:OA++,priority:1,condition:{resourceTypes:["main_frame","sub_frame"]},action:{type:"modifyHeaders",responseHeaders:[{header:"x-content-security-policy",operation:"remove"},{header:"content-security-policy",operation:"remove"}]}}):s&&a.push(s), "auto"==wn.values.scriptUrlDetection?i.length||o.length||c.push(...FA()):(i&&a.push(...i),o&&a.push(...o)),await jA(c,a.map((e=>e.id)))}catch(e){_.error("dNr:",e)}finally{BA.release()}},YA=async()=>{Et.supported&&(DA=Et,wn.addChangeListener(["webrequest_fixCSP"],XA),wn.addChangeListener(["scriptUrlDetection"],XA),await XA())},JA=async()=>{var e;if(!M()){if(null===await wc(hc))return ;const t=Xl(),n=(null==t?void 0:t.platform)||"unknown",r=null===(e=null==t?void 0:t.brands)||void 0===e?void 0:e.find((e=>e.brand.includes("Edge"))),s="macOS"===n;if(r&&s)return;const i=r?"edge":s?"safari":"tampermonkey",o="https://www.tampermonkey.net/qr/"+i[0],a=qr.getMessage("Scan_the_QR_code_to_use_Tampermonkey_on_your_phone_or_tablet_"),c={key:hc,realm:"actions",class:"notice",title:qr.getMessage("Tampermonkey_is_available_on_mobile_platforms"),text:a,info_url:o,buttons:[{ text:qr.getMessage("Learn_more"),url:"https://www.tampermonkey.net/faq#Q406"}],qr:{text:o,img:i,size:66,oversample:4,csize:14,bsize:4,pixelPrecise:!0}};gc(c),oi.actionPage("status",c)}},KA=Ve(),$A=e=>"extpage"in e,eh=(()=>{const e={allow:{script:"window.close"},exec:(e,t,n)=>{const r=t&&t.tab?t.tab.id:null;r?vt.query({windowType:"normal"},(e=>{if(e.length<=1){const e="refused to close last tab!";_.warn("mh:",e),n({error:e})}else vt.remove(r,(()=>{const e=gt.lastError;n({error:e?e.message:void 0 })}))})):n({error:"internal error"})}},t={allow:{extpage:!0},exec:(e,t,n)=>{const{key:r}=e;r&&(oi.removeAll(r),mc(r)),n({})}},n={allow:{extpage:!0},exec:(e,t,n)=>{(!$A(t)||"options"!=t.extpage&&"options"!=e.origin?Mo():R.Pledge(t.tab)).then((t=>{let r,s,i;if(e.uuid&&(r=Po.getByUid(e.uuid))&&r.script&&r.cond){let n;s=Yc.determineOrigin(r.script),"hoster"==e.to&&s?i=s:(n=r.script.supportURL||(null==s?void 0:s.issue_url)||(null==s?void 0:s.url))&&(i={issue_url:n}),i&&(Mr(r.script.name,"m"), vt.create({url:i.abuse_url||i.issue_url,active:!0,parent:t},(()=>{})))}n({})}))}},r={allow:{extpage:!0},exec:(e,t,n)=>{if("dialog"==e.action)Hu.dialog.shown(e.extra);else if("clicked"==e.action){let t,n;e.extra&&(t=e.extra.amount,n=e.extra.currency),Hu.clicked(e.type,t||"?",n||"?")}else if(Hu.button[e.action]){const t=Hu.button[e.action];t&&t(e.type,e.extra)}else _.warn("mh: Warning: unknown request ",e);n({})}},s={allow:{extpage:!0},exec:async(e,t,n)=>{ const r=$A(t)&&("options"==t.extpage||"options"==e.origin),s=()=>n({});switch(e.name){case"reset_simple":Ta.reset(s);break;case"reset_factory":Ta.factoryReset(s);break;case"reset_sync":fu.reset().always(s);break;case"run_sync":vi.once("syncFinished",(()=>s())),fu.sync(1,!0);break;case"install_tests":{const e="chrome",t=de.Tests.framework.prepare(Yc,Po,e,S(),"mv3",s);t&&_.error(t);break}case"enabled":{const{name:t}=e;wn.setValue(t,!wn.values[t]).always(s);break}case"installFromUrl":{ const{data:{url:t,source:i,transferable:o}}=e;let a;if(o){const e=Cs.fromTransferableData(o);if(!e)throw new Error("Invalid Transferable");const n=await e.toBlob();if(!n)throw new Error("Invalid Transferable");const r=await st(n,"utf-8")||"";a=Yc.installFromSource(r,{url:t})}else a=i?Yc.installFromSource(i,{url:t}):Yc.installFromUrl(t);a.done((()=>{r?Wu.create("options.scripts").done((e=>{const t={success:!0,items:e,options:wn.snapshot};n(t)})):s()})).fail((()=>s()));break} case"externals_delete":{const{safe_url:t,scriptuid:r}=e;Gc.cleanElement(r,t),Wu.create("options.scripts").done((e=>{n({items:e,options:wn.snapshot})})).fail((e=>{n({error:e||"unknown error",options:wn.snapshot})}));break}case"externals_update":{const{safe_url:t,scriptuid:r}=e,s=Po.getByUid(r);if(!s.script||!s.cond)return void n({error:"script deleted",options:wn.snapshot});const{requires:i,resources:o}=s.script;let a,c,l=!1;i.some((e=>{if(Mc(e)===t)return a=e,!0})),a?l=!0:o.some((e=>{ if(Mc(e)===t)return a=e,!0})),a?(Gc.cleanElement(r,t),c=l?Gc.updateRequire(r,t):Gc.updateResource(r,t),c.then((()=>Wu.create("options.scripts"))).done((e=>{n({items:e,options:wn.snapshot})})).fail((e=>{n({error:e||"unknown error",options:wn.snapshot})}))):n({error:"not found",options:wn.snapshot});break}case"focus_tab":{const{tabid:t}=e;eh.focusTab.exec({},{tab:{id:t,url:"",index:-1,windowId:-1},url:"",frameId:0,id:mt.manifest.id},s);break}case"run_script_updates":{const{scriptuid:t}=e;if(t){ let e;ju.check(!0,!1,t).done((t=>{e=t})).always((()=>{n({scriptuid:t,updatable:e})}))}else ju.check(!0,!0),s();break}case"blacklist_page":{const{data:t}=e,n=t.domain;if(!n)throw new Error("Blacklisted domain is missing!");const r="/"+In(`*://*.${n}/*`,!0)+"/";wn.setValue("forbiddenPages",wn.values.forbiddenPages.concat([r])).always(s);break}case"permissions":{const{data:t}=e,{origins:r,reset:s}=t;if(s||r){let e,t=[];if(s){const n=await Di.get();t=Object.keys(n),e=!0}else t=r, e=!r.length||await Pi.askOrigin(r,qr.getMessage("Cross_Origin_Request_Permission"),qr.getMessage("Click_here_to_allow_TM_to_access_the_following_hosts_0hostlist0",r.join("\n")));e&&t.length&&await Di.delete(t),Wu.create("options.settings").done((t=>{const r={success:e,items:t,options:wn.snapshot};n(r)}))}else n({});break}case"script_search":{const{data:t}=e,{url:n,result_url:r}=t;if(n){const e={url:Ul(n),active:!0};vt.create(e,s)}else{if(!r)throw new Error("Search URL is missing!");{const e={ url:r,active:!0};vt.create(e,s)}}break}case"toggle_tagged_scripts":{const{data:t}=e,{tag:r,toggle:i}=t,o=Po.getUidList().map((e=>Po.getByUid(e))).filter((e=>!!(e&&e.script&&e.cond&&e.script.options.tags.includes(r))));R.onebyone(o.map((({script:e})=>()=>{if(e.enabled!=i)return e.enabled=i,Yc.doModify(e.uuid,e,!0)}))).done((()=>{Wu.create("actions").done((e=>{const t={items:e,options:wn.snapshot};n(t)})).fail((()=>{const e={items:[],options:wn.snapshot};n(e)}))})).fail((()=>s()));break} case"reset_persistent_hint":{const{data:{key:t}}=e;await(e=>fc.delete(e))(t),await JA(),s();break}case"contrib":{const e={url:mt.getURL("options.html")+"#contribute",active:!0};vt.create(e,s);break}case"enable_stats":wn.setValue("statistics_enabled",!0).always(s);break;case"disable_stats":wn.setValue("statistics_enabled",!1).always(s);break;default:_.warn("mh: Warning: unknown button "+name),s()}}},i={allow:{extpage:!0},exec:async(e,t,n)=>{ const{action:r,realm:s,key:i,config:o}=e,a=an(s,i,"cloud"==s?cc:void 0);if("get"==r)n({config:await a.get()});else{if("set"!=r)throw new Error("Invalid action");if(o){if(await a.set(o),"cloud"==s){const e=a,t=await e.get();c=i,oc.includes(c)?ac.emit("credentials",{type:i,credentials:t}):_.warn("mh+miscConfig[cloud]: invalid key")}}else await a.clear()}var c;n({})}},o=async(e,t)=>{if("userscripts-dynamic"==wn.values.runtime_content_mode){const e=new f((e=>{bi.once("complete",(()=>{e()}))})) ;await f.race([N(5e3),e])}if(e&&wn.values.autoReload){const e=await new f((e=>vt.getSelected(null,(t=>e(t)))));e&&e.id>=0&&(vt.sendMessage(e.id,{method:"reload"},{frameId:0}),await f.race([N(500),new f((t=>{wi.once("complete",(()=>{t()}),{tabId:e.id})}))]))}Wu.create("actions").done((e=>{const n={items:e,i18n:wn.values.i18n,options:{enabled:wn.values.enabled}};t(n)})).fail((()=>{const e={items:[],i18n:wn.values.i18n,options:{enabled:wn.values.enabled}};t(e)}))},a={allow:{extpage:!0}, exec:(e,t,n)=>{for(const t of e.uuids)Yc.doRemove(t,!0);Yc.reorderScripts(),R.onebyone([()=>Wu.create("options.scripts"),()=>Wu.create("options.trash")]).then((e=>e.filter((e=>e)).reduce(((e,t)=>e.concat(t)),[]))).done((e=>{const t={items:e,options:wn.snapshot};n(t)})).fail((e=>{n({error:e||"unknown error",options:wn.snapshot})}))}},c={allow:{extpage:!0},exec:(e,t,n)=>{const r=void 0===e.reload||!!e.reload,s=$A(t)&&("options"==t.extpage||"options"==e.origin),i=t=>{ s?r?R.onebyone([()=>Wu.create("options.scripts"),()=>Wu.create("options.trash")]).then((e=>e.filter((e=>e)).reduce(((e,t)=>e.concat(t)),[]))).done((e=>{const r={...t,items:e,options:wn.snapshot};n(r)})).fail((e=>{n({error:e||"unknown error",options:wn.snapshot})})):n({}):o(e.uuid,n)};if(e.clean){const t=e.uuid;if(!t)return void n({error:"uuid missing",options:wn.snapshot});_.debug("mh: clean userscript "+t);const r=Po.getByUid(t),s=e=>{Wu.create("options.scripts").done((r=>{const s={ cleaned:e.installed,items:r,options:wn.snapshot};n(s),e.installed&&vi.emit("scriptStorage",{uuid:t,storage:Po.getStorageByUid(t).data})})).fail((e=>{n({error:e||"unknown error",options:wn.snapshot})}))};r.script&&r.cond?Yc.doSave({name:e.name,uuid:t,src:r.script.textContent,clean:!0,ask:!1,internal:!0,save:!0}).always((e=>{s(e||{installed:!1})})):(_.error(qr.getMessage("fatal_error")+" ("+t+")!!!"),s({installed:!1}))}else if(e.code){let t=e.uuid;if(!t)return void n({error:"uuid missing", options:wn.snapshot});let s=e=>n(e);r&&(s=e=>{Yc.reorderScripts(),i(e)}),e.new_script&&(t=Ve()),Yc.doSave({name:e.name,uuid:t,force_url:e.force_url,src:e.code,ask:!wn.values.editor_easySave,lastModTime:e.lastModTime,save:!0}).always((e=>{s(e||{installed:!1})}))}else if(e.auto_save)i({});else{const t=e.uuids||(e.uuid?[e.uuid]:[]);for(const n of t)e.restore?Yc.restore(n):Yc.doRemove(n,!1);Yc.reorderScripts(),i({})}}},l={allow:{extpage:!0,script:"values"},exec:(e,t,n)=>{if(t.tab){if(e.uuid){ const{uuid:t,id:n,value:r,key:s,removed:i,ts:o}=e;Po.setStorageByUidAndNotify(t,o,n,s,r,i)}}else _.warn("storage: unable to save storage due to empty tabID!");n({})}},u={allow:{extpage:!0},exec:(e,t,n)=>{Ii.onMessage(e.data).always((e=>{const t=wn.values.i18n,r=wn.snapshot;n({i18n:t,options:r,message:e})}))}},d={allow:{script:"cookie"},exec:(e,t,n)=>{var r ;const s=["expirationDate","domain","httpOnly","secure","path","sameSite","partitionKey","value"],i=[...s,"url"],o=[...s,"name","session","hostOnly"],a=e.location||t.url||void 0;let{url:c,partitionKey:l,name:u}=e.details;c=c?Vn(c,a)||c:a;const d=t.tab?t.tab.cookieStoreId:void 0;let A;if(Tl.fpi&&a&&(A=null===(r=zn(a))||void 0===r?void 0:r.domain),"off"===wn.values.script_cookie_access)n({data:{error:"not supported"} });else if(c)if(yl.isAllowed(Qn(c)))if(Yc.scriptWillRun(e.uuid,c))if("list"==e.action){const t=e.details,r={url:c};t.domain&&(r.domain=t.domain),u&&(r.name=u),t.path&&(r.path=t.path),A&&(r.firstPartyDomain=null),void 0!==l&&(r.partitionKey=l),void 0!==d&&(r.storeId=d),Tl.getAll(r).done((e=>{let t=e.map((e=>{const t=o.reduce(((t,n)=>({...t,...n in e?{[n]:e[n]}:{}})),{});return t}));"!httponly"===wn.values.script_cookie_access&&(t=t.filter((e=>!e.httpOnly))),n({data:{cookies:t}})})) }else if("delete"==e.action){if(!u)return void n({data:{error:"missing name"}});const e={url:c,name:u};A&&(e.firstPartyDomain=A),void 0!==l&&(e.partitionKey=l),void 0!==d&&(e.storeId=d),Tl.remove(e).done((()=>{n({data:{success:!0}})})).fail((e=>{n({data:{error:e}})}))}else if("set"==e.action){let{name:t,value:r,...s}=e.details;t=String(void 0===t?"":t),r=String(void 0===r?"":r);const o={name:t,value:r};void 0!==A&&(o.firstPartyDomain=A),void 0!==d&&(o.storeId=d),i.forEach((e=>{const t=s[e] ;void 0!==t&&(o[e]=t)})),o.url=o.url||c,Tl.set(o).done((()=>n({data:{success:!0}}))).fail((e=>n({data:{error:e}})))}else n({data:{error:"unknown action"}});else n({data:{error:"the URL needs to be included by the scripts @include or @match tag"}});else n({data:{error:"the URL is filtered by the security settings"}});else n({data:{error:"invalid URL"}})}};return{ping:{allow:{insecure:!0},exec:(e,t,n)=>{n({pong:!0,instanceID:KA,config:{layout:wn.values.layout}})}},newTab:{allow:{extpage:!0}, exec:(e,t,n)=>{(!$A(t)||"options"!=t.extpage&&"options"!=e.origin?Mo():R.Pledge(t.tab)).then((r=>{vt.create({url:e.url,parent:r},(r=>{if(!r)return void _.warn("mh: unable to create tab",t,e);const s={tabId:r.id};n(s)}))}))}},tabs:{allow:{script:"tabs"},exec:(e,t,n)=>{"get"==e.action?t.tab&&e.uuid?n({data:Fu(t.tab.id,e.uuid)}):(_.warn("mh: unable to process request",t,e),n({data:null})):"list"==e.action?e.uuid?n({data:Pu(e.uuid)}):(_.warn("mh: unable to process request",t,e),n({data:null })):"set"==e.action?(t.tab&&e.uuid?((e,t,n)=>{const r=Lu[e]=Lu[e]||{},s={};n&&(Object.assign(s,n),r[t]=s)})(t.tab.id,e.uuid,e.tab):_.warn("mh: unable to process request",t,e),n({})):n({error:"unknown action"})}},focusTab:{allow:{script:"window.focus"},exec:(e,t,n)=>{const r=t&&t.tab?t.tab.id:null;r?vt.update(r,{active:!0},(()=>{const e=gt.lastError;n({error:e?e.message:void 0})})):n({error:"internal error"})}},closeTab:e,navigateTab:{allow:{script:[]},exec:(e,t,n)=>{ const r=t&&t.tab?t.tab.id:null;if(r){let{url:t,location:s}=e;t=Vn(t||"",s)||t,vt.update(r,{url:t},(()=>{const e=gt.lastError;n({error:e?e.message:void 0})}))}else n({error:"internal error"})}},setOption:{allow:{extpage:!0},exec:(e,t,n)=>{const r=$A(t)&&("options"==t.extpage||"options"==e.origin);wn.setValue(e.name,e.value).always((()=>{r?Wu.create("options.settings").done((e=>{const t={items:e,options:wn.snapshot};n(t)})).fail((e=>{n({error:e||"unknown error",options:wn.snapshot})})):n({})}))}}, reportAnIssue:n,clearHint:t,begEvent:r,buttonPress:s,imageUrlToTransferable:{allow:{extpage:!0},exec:async(e,t,n)=>{const{url:r,fallback:s}=e;let i;r&&(i=await Us(r,s)),n({transferable:i?await i.toTransferableData():void 0})}},loadTree:{allow:{extpage:!0},exec:(e,t,n)=>{Wu.create(e.referrer,{complete:e.complete,url:e.url,uuid:e.uuid,filter:e.filter,tabId:e.tabId,sender:t}).done((t=>{const r={items:t},s=1==Wu.level(e.referrer)?{i18n:wn.values.i18n,options:wn.snapshot,xhr:Ji,begging:Hu.needed() }:{},i=Object.assign(r,s);n(i)})).fail((e=>{n({error:e||"unknown error",options:wn.snapshot})}))}},miscConfig:i,modifyScriptOptions:{allow:{extpage:!0},exec:(e,t,n)=>{if(!e.uuid)return void n({});const r=$A(t)&&("options"==t.extpage||"options"==e.origin);let s=null==e.reload||1==e.reload,i=!1;const a=Po.getByUid(e.uuid,!0),c=()=>{s?(void 0!==e.position&&Yc.reorderScripts(e.uuid,e.position),r?eh.loadTree.exec({referrer:"options.scripts"},t,n):o(e.uuid,n)):n({})} ;if(a.script&&a.cond)if(e.whitewash&&a.script.evilness==kc.SEVERITY_FOISTED_SCRIPT)s=!0,a.script&&a.cond?Yc.doSave({uuid:e.uuid,src:a.script.textContent,force_settings:{enabled:!0},whitewash:!0,save:!0}).always(c):(_.error(qr.getMessage("fatal_error")+" ("+e.uuid+")!!!"),c());else{let t=!1;const r=us(),s=["includes","excludes","matches"],o=["connects","blockers"],l=a.script.options;Object.keys(r.options).forEach((t=>{const n=e[t];void 0!==n&&(l[t]=n,i=i||!0===fu.SYNCED[t])}));const u=l.override ;Object.keys(r.options.override).forEach((n=>{if(-1==n.indexOf("merge_"))return;const r=e[n];void 0!==r&&(u[n]=r,t=!0)})),s.forEach((n=>{const r=e[n];void 0!==r&&(t=!0,u["use_"+n]=r)})),o.forEach((t=>{const n=e[t];void 0!==n&&(u["use_"+t]=n)})),void 0!==e.tags&&(l.tags=e.tags),e.add_excludes&&(l.override.use_excludes=l.override.use_excludes.concat(e.add_excludes),t=!0),t&&(a.script=Yc.mergeCludes(a.script)),e.temp_connects&&Nc.setSessionConnects(a.script.uuid,e.temp_connects), void 0!==e.enabled&&(a.script.enabled=e.enabled),i&&(a.script.lastModified=Date.now()),void 0!==e.file_url&&(a.script.downloadURL=e.file_url),Yc.doModify(a.script.uuid,a.script,i).done(c).fail((()=>{n({})}))}else n({})}},purgeScripts:a,saveScript:c,saveExternal:{allow:{extpage:!0},exec:(e,t,n)=>{Gc.setElement(e.uuid,e.url,{content:e.code||"",meta:e.mimetype||"text/javascript"},!0),Wu.create("options.scripts").done((e=>{const t={success:!0,items:e,options:wn.snapshot};n(t)})).fail((e=>{const t={ error:e||"unknown error",options:wn.snapshot};n(t)}))}},saveStorageKey:l,download:{allow:{extpage:!0},exec:(e,t,n)=>{ih.download.exec({postMessage:e=>{(e.error||e.load)&&n(e)},onMessage:()=>null,onDisconnect:()=>null,disconnect:()=>null},e,t)}},askCom:u,execMenuCmd:{allow:{extpage:!0},exec:(e,t,n)=>{yu.fire(e.id,e.event),n({})}},prepare:{allow:{script:[]},exec:(e,t,n)=>{const r=t.tab;if(r){const s=xo(t,e);if(!s)return _.error("mh: unknown frameId",t,e);const{url:i}=e,o=Qn(i);if(e.cleanup){ let t=e.scripts;"userscripts-dynamic"==wn.values.runtime_content_mode&&(t||(_.warn("mh: missing scripts for cleanup",e),t={}),Lh(r.id,s,t,o)),Yh(r.id,s,o),np.setIcon(r.id),np.setBadge(r.id),n({})}else Kh(r.id,s,o,r,(t=>{const s=t?mh(t,e.url,r):{fast:!0};n(s),np.setIcon(r.id),np.setBadge(r.id)}))}else n({})}},contextmenu:{allow:{script:[]},exec:(e,t,n)=>{const{tab:r}=t;if(r&&wn.values.context_menu_enabled){const n=xo(t,e);if(!n)return _.error("mh: unknown frameId",t,e);const s=Qn(e.url) ;let i=[],o=[];wn.values.context_menu_scripts&&(i=ph(n,s,r).contexters),wn.values.context_menu_commands&&(o=yu.listByTabId(r.id)),Bu.update({contexters:i,commands:o})}n({})}},clipboard:{allow:{script:"setClipboard",extpage:!0},exec:(e,t,n)=>{Ut&&Ut.supported?Ut.set({mimetype:e.mimetype,content:e.content},(()=>{n({success:!0})})):n({error:"unsupported"})}},determineScriptsToRun:{allow:{extpage:!0},exec:(e,t,n)=>{n({scripts:Yc.determineScriptsToRun({url:e.url,deleted:!1}).map((e=>e.uuid))})}}, externalMessage:{allow:{insecure:!0},exec:(e,t,n)=>sh(e.request,t,n)},cookie:d,audio:{allow:{script:"audio"},exec:(e,t,n)=>{const r=t.tab;if(r)if("setMute"==e.action){const t=e.details;if(!t||"object"!=typeof t)return void n({data:{error:"wrong arguments"}});vt.update(r.id,{muted:t.isMuted},(()=>{n({data:{success:!0}})}))}else"getState"==e.action&&vt.get(r.id,(e=>{if(!e)return void n({data:{error:"no tab"}}) ;const t=e.mutedInfo,r=t?!!t.muted&&(t.extensionId?"extension":t.reason||"other"):void 0,s=e.audible;n({data:{muted:r,audible:s}})}))}}}})(),th=e=>{const t=gt.id,n=!O.HAS_SENDER_ID&&e.tab||e.id===t;let r;const s=O.INTERNAL_PAGE_PROTOCOLS[0],i=s?s+"//":null,o=gt.getInternalPageRegexp(),a=e.url?e.url:e.tab?e.tab.url:null,c=e.origin?e.origin.toLowerCase():void 0;let l=n&&(!a||!!i&&0==a.indexOf(i))&&(!c||c===Ae);if(l||!i){if(a){const e=a.match(o);e&&2==e.length&&(r=e[1])}else r="*";!i&&r&&(l=!0)} return{id_valid:n,url:a,page:r,extpage:l}},nh=(e,t)=>{const{uuid:n}=e;if(void 0===t)return!1;const r=Fe(t);if(0===r.length)return!0;if(!n)return!1;const s=r.map((e=>{const t=Dl[e];if(t)return[...t]})).filter((e=>void 0!==e));return((e,t)=>{const n=Fe(t),{script:r,cond:s}=Po.getByUid(e);if(r&&s&&r.grant.length){const{grant:e}=r;return n.some((t=>e.includes(t)))}return!1})(n,[].concat(...s))},rh=(e,t,n)=>{if(!k.late)return k.registerLateCallback((()=>{rh(e,t,n)})),!0 ;_.verbose("mh: request ",e," sender: ",t);const r=eh[e.method];if(!r)return _.warn("mh: unknown method "+e.method),!1;if(!r.allow||!r.exec)return _.warn("mh: invalid implementation of "+e.method),!1;const s=th(t),i=s.extpage,o=s.page,a=s.id_valid;_.verbose("mh: request page:",o,"extpage:",i),i?t.extpage=o:delete e.origin;const c="options"==o,l=a&&!i;let u=!0;if("background"==o||r.allow.insecure||r.allow.extpage&&i||r.allow.options&&c||l&&nh(e,r.allow.script)){const s=r.exec(e,t,(e=>{if(u=!1, n(e),gt.lastError)return gt.lastError.message}));return!1!==u&&!1!==s||void 0}return!1===e.topframe&&(i||c)||_.warn("mh: this context doesn't have the permission to call \""+e.method+'"',s),!1},sh=(e,t,n)=>{let r,s;if("off"!=wn.values.external_connect&&(r=t.url)&&yl.isAllowed(r)){for(const[t,n]of Object.entries(ah)){const i=Go({match:[t]});if(i&&To(r,i)&&(n.includes("*")||n.includes(e.method))){s=!0;break}}if(s)if("getVersion"==e.method)n({version:mt.manifest.version,id:gt.short_id });else if("openOptions"==e.method){const r=t.tab;if(!r)return void _.warn("emh: unable to openOptions due to empty tabID!");let s=e.params||"";s&&!s.startsWith("#")&&(s=`#${s}`),vt.update(r.id,{url:mt.getURL("options.html")+s,active:!0},(()=>n({})))}else if("all"!=wn.values.external_connect)_.warn("mh: calling external method "+e.method+" is not permitted to "+r+" by the user");else if("isInstalled"==e.method){let t,r,s,i,o=!1;const a=e.script.name,c=e.script.namespace||void 0 ;(r=Po.getUidsByName(a,c)[0])&&(t=Po.getByUid(r))&&t.script&&!t.script.deleted&&(o=!0,i=t.script.enabled,s=t.script.version),n({name:a,namespace:c,installed:o,enabled:i,version:s})}else _.warn("emh: unknown external method "+e.method);else _.warn("mh: calling external method "+e.method+" is not permitted to "+r)}},ih=(()=>{const e={allow:{script:"xmlHttpRequest"},exec:(e,t,n)=>{const{disconnect:r,postMessage:s,onMessage:i,onDisconnect:o}=e;let a=!1;const{details:c}=t;let{url:l,tfd:u,...d}=c ;const{anonymous:A,cookiePartition:h}=d,p=d.redirect||"follow",f=n.tab?n.tab.cookieStoreId:void 0,g=h&&h.topLevelSite?h:void 0,v=!A&&(!!g||m);v&&(d.anonymous=!0,d.redirect&&"follow"!==d.redirect||(d.redirect="manual"));const w=async(e,t)=>{const r=(t||ao(e.responseHeaders||""))["set-cookie"];if(r&&l)return await(async(e,t)=>{await Promise.all(e.toString().split(",").map((async e=>{var r;const s=(e=>{const t=e.split(";").filter((e=>"string"==typeof e&&!!e.trim())),n=t.shift();if(!n)return ;const r=n.split("="),s=r.shift(),i=r.join("=");if(!s)return;const o={name:s,value:i};return t.forEach((function(e){var t;const n=e.split("="),r=null===(t=n.shift())||void 0===t?void 0:t.trimLeft().toLowerCase(),s=n.join("=");if(r)if("expires"===r){const e=new Date(re(s));isNaN(e.getTime())||(o.expires=e)}else"max-age"===r?o.maxAge=parseInt(s,10):"secure"===r?o.secure=!0:"partitioned"===r?o.partitioned=!0:"httponly"===r?o.httpOnly=!0:"samesite"===r?o.sameSite=s:o[r]=s})),o})(e);if(!s)return ;const{expires:i,httpOnly:o,name:a,path:c,sameSite:l,secure:u,partitioned:d,value:A}=s;let h=(l?(e=>{switch(e.toLowerCase()){case"lax":return"lax";case"strict":return"strict";case"none":return"no_restriction";default:return"unspecified"}})(l):void 0)||"unspecified";const p={expirationDate:i?i.getTime():void 0,httpOnly:o,name:a,path:c,sameSite:h,secure:u,url:t,value:A};if(d)if(void 0!==g)p.partitionKey=g;else{let e ;if(n.origin?e=n.origin.toLowerCase():n.url&&(e=null===(r=zn(n.url))||void 0===r?void 0:r.origin),!e)return void _.warn("mh: no origin for partitioned cookie");p.partitionKey={topLevelSite:e}}void 0!==f&&(p.storeId=f);try{await Tl.set(p)}catch(e){_.log("mh: failed to set/overwrite cookie",e)}})))})(r,e.finalUrl||l),!0};let b;d.partialSize=d.partialSize||B.PARTIAL_SIZE;const y=new it(1),k=[()=>{r()}],R=Object.assign({},...Object.keys(t.callbacks).map((e=>{ const n=t.callbacks[e]||"onload"===e,r="ondone"===e,i=v&&"onreadystatechange"===e,o=v&&"onredirect"===e;if(n||r||o||i)return{[e]:async t=>{await y.acquire();const a=(t=t||{}).response;try{if(b&&await b(t,e))return;if((o||i&&2===a.readyState&&!Wi.includes(a.status))&&await w(a),n||r){const n={data:a||{},exception:t.exception,[e]:!0};s(n)}r&&k.forEach((e=>e(t)))}finally{y.release()}}}})));let x;const E=t.location||n.url||void 0;l&&(l=Vn(l,E)||l);const C=d.responseType ;void 0!==C&&Xi.includes(C)&&"document"!==C||delete d.responseType,"no"!=wn.values.webrequest_modHeaders&&(d.headers=d.headers||{},O.SENDS_ORIGIN&&!Object.keys(d.headers).map((e=>e.toLowerCase())).includes("origin")&&(d.headers.origin=null));const S=d.cookie,M=async(e,t)=>{if((t||v)&&e){const n=[];if(!A){const t={url:e};void 0!==f&&(t.storeId=f);let r=await Tl.getAll(t);n.push(...r),void 0!==g&&(t.partitionKey=g,r=await Tl.getAll(t),n.push(...r))}return n.map((e=>{ const t=e.name.replace(/[^\x21\x23-\x27\x2A-\x2B\x2D-\x2E\x30-\x39\x41-\x5A\x5E-\x7A\x7C\x7E]/g,se);let n=!1,r=e.value;return r.startsWith('"')&&r.endsWith('"')&&(r=r.slice(1,-1),n=!0),r=r.replace(/[^\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]/g,se),t+"="+(n?'"'+r+'"':r)})).concat(t?[t]:[]).join("; ")}};M(l,S).then((e=>{delete d.cookie,e&&(d.headers=d.headers||{},d.headers.cookie=e)})).then((async()=>{var e;if(a){const e={response:so("aborted"),exception:"aborted"};return R.onabort&&R.onabort(e), void R.ondone(e)}let r;if(l&&(r=null===(e=zn(l))||void 0===e?void 0:e.protocol)&&["file:"].concat(O.INTERNAL_PAGE_PROTOCOLS).includes(r)){const e=e=>{const t='Refused to connect to "'+l+'": '+e,n=so(t);["onerror","ondone"].forEach((e=>{const r=R[e];r&&r({response:n,exception:t})}))};if("file:"==r){let n,r ;if(Ft()&&("all"==wn.values.script_file_access?n=!0:"externals"!=wn.values.script_file_access||(r=Po.getByUid(t.uuid))&&r.script&&r.cond&&[...r.script.resources,...r.script.requires].map((e=>Vn(e.unsafe_url,e.abs_url))).includes(l)&&(n=!0)),!n)return e("Access to this local file is forbidden!")}Mt(l,(e=>{const t=Ke(e),n=R.onpartial;if(n){const e=ze(t||"",B.PARTIAL_SIZE);e.forEach(((t,r)=>{n({response:{partial:t,index:r,length:e.length}})}))}const r={readyState:4,responseHeaders:"",status:0, statusText:""};["onload","ondone"].forEach((e=>{const t=R[e];t&&t({response:r})}))}),e)}else{if(u){const e=Cs.fromTransferableData(u);e&&(k.push((()=>e.dispose())),l=e.tryObjectUrl||e.tryDataUri||l,l||(l=await e.toObjectUrl()))}if(!l)throw new Error("neither url nor tfd set!");const e={foreign_context:m,no_blob:t.no_blob};if(x=Nc.exec({...d,url:l},t.uuid,n||{},e,R),v){let r,s=!1;b=async({response:i},o)=>{if(a)return!1;if("onredirect"===o)return!1 ;if("onreadystatechange"===o&&i&&2==i.readyState&&Wi.includes(i.status)){s=!0;const e=i.responseHeaders,t=ao(e),{location:n}=t;return"follow"==p&&(r=n),await w(i,t),"follow"==p}if("ondone"==o&&r){const s=r;if(r=void 0,"follow"===p){l=Vn(s,{base:l,enforce_path:!0})||s;const r=await M(l,S);return r&&(d.headers=d.headers||{},d.headers.cookie=r),x=Nc.exec({...d,url:l},t.uuid,n||{},e,R),!0}return!1}return!("follow"!==p||!r&&(!s||!["onloadstart"].includes(o)))}}}}));const I=()=>{a||(x?x.abort():a=!0)} ;i((e=>{e.cancel&&I()})),o(I)}},t={allow:{script:"download"},exec:(e,t,n)=>{const{disconnect:r,postMessage:s,onMessage:i,onDisconnect:o}=e;let a,c=e;if("details"in t){const e=t.details;if(e.from.url){const r=t.location||n.url||void 0;e.from.url=Vn(e.from.url,r)||e.from.url}a=Ga.start(e,{internal:!!$A(n)})}else a=t.id;const l=e=>{c&&s({id:a,load:!0,data:e.info})},u=e=>{c&&s({id:a,progress:!0,data:e.info})},d=e=>{c&&s({id:a,error:!0,data:e})},A=e=>{c&&s({id:a,timeout:!0,data:e})},h=()=>{c&&r(), c=null,ua.off("load",l),ua.off("progress",u),ua.off("error",d),ua.off("timeout",A),ua.off("done",h)};ua.on("load",l,{id:a}),ua.on("progress",u,{id:a}),ua.on("error",d,{id:a}),ua.on("timeout",A,{id:a}),ua.on("done",h,{id:a}),i((e=>{e.cancel&&Ga.cancel(a)})),o((()=>{c=null}))}},n={allow:{script:"values"},exec:(e,t,n)=>{const{postMessage:r,onMessage:s,onDisconnect:i}=e;if(n.tab){_.verbose("storage: "+t.uuid+" "+t.id);const o=e=>{if(e.id===t.id)return;const{storage:n,ts:s,removed:i}=e;r({storage:n, ts:s,removed:i})},a=({tabId:e})=>{vi.has("scriptStorage",o)||_.warn("storage: no scriptStorage listener found for tab "+e+" "+t.uuid+" "+t.id),vi.off("scriptStorage",o)};wi.once("remove",a,{tabId:n.tab.id}),vi.on("scriptStorage",o,{uuid:t.uuid}),s((t=>{"saveStorageKey"===t.method?eh.saveStorageKey.exec(t,n,(t=>e&&r(t))):_.warn("storage: unknown message",t)})),i((()=>{_.verbose("storage disconnectHandler "+t.uuid+" "+t.id),vi.off("scriptStorage",o),wi.off("remove",a)})) }else _.verbose("storage: unable to load storage due to empty tabID!",t),r({error:"missing tab id"})}},r={allow:{script:"openInTab"},exec:(e,t,n)=>{const{postMessage:r,onMessage:s,onDisconnect:i}=e;let o,a=e;const c=["active"];let l=null;const u=[];let d;const A=e=>{e.tabId===l&&(wi.off("remove",A),a&&r({closed:!0}))};R.Pledge().then((()=>{const e=R();if("details"in t){const r={url:t.details.url};if(o=t.details.options){for(const e of c)void 0!==o[e]&&(r[e]=o[e]) ;if(o.incognito)r.incognito=!0;else{const e=n.tab;if(!e)return _.warn("mh: unknown tab ID",n);o.insert&&(r.index=e.index+1),o.setParent?r.parent=e:r.parent={windowId:e.windowId}}}vt.create(r,(async t=>{t&&(l=t.id,await(e=>el.acquire().then((async()=>{Kc[e]||(Kc[e]=!0,await $c.set(e.toString(),!0))})).always((()=>el.release())))(l),e.resolve())})),gt.lastError&&e.reject()}else(e=>el.acquire().then((()=>!!Kc[e])).always((()=>el.release())))(t.tabId).then((n=>{n&&(l=t.tabId,e.resolve())})) ;return e.promise()})).then((()=>{a&&(null===l?r({success:!1}):(d=!1,wi.on("remove",A),u.push((()=>wi.off("remove",A))),r({success:!0,tabId:l})))})),s((e=>{if(null===l||d)return;const{close:t,focus:n,name:s}=e;if(n)vt.update(l,{active:!0},(()=>{const e=gt.lastError;e&&_.warn("tab.focus",e.message)}));else if(t)vt.remove(l,(()=>{const e=gt.lastError;e?_.warn("tab.close",e.message):d=!0}));else if(void 0!==s){const e=5;let t=0;const n=()=>{if(null===l)return;const i=l,o=({tabId:o})=>{ if(o!==i)return;a();const c={method:"setForeignAttr",attr:"name",value:s};vt.sendMessage(i,c,{frameId:0},(i=>{i?r({name:s}):t++{wi.off("complete",o),wi.off("commited",o)};u.push(a)};n()}})),i((()=>{u.forEach((e=>e())),a=null}))}},s={allow:{script:"menuCommand"},exec:(e,t,n)=>{const{postMessage:r,onDisconnect:s,onMessage:i}=e;if(n.tab){_.verbose("registerMenuCommand: add "+t.menuId) ;const{name:e,uuid:o,accessKey:a,autoClose:c,menuId:l,title:u}=t,d=n.tab.id,A=e=>{r({method:"run",menuId:l,event:e.event})};mu.on("run",A,{menuId:l}),yu.set({tabId:d,name:e,title:u,uuid:o,accessKey:a,autoClose:c,menuId:l}),oi.actionPage("update"),i((e=>{if("registerMenuCommand"!==e.method)throw new Error("Unexpected message");const{name:t,uuid:n,accessKey:r,autoClose:s,menuId:i,title:o}=e;yu.set({tabId:d,name:t,title:o,uuid:n,accessKey:r,autoClose:s,menuId:i}),oi.actionPage("update")})),s((()=>{ _.verbose(`registerMenuCommand: unreg ${l}`),yu.clearById(l),oi.actionPage("update"),mu.off("run",A)}))}else _.warn("Unable to register menu cmd due to empty tabID!")}},i={allow:{script:"notification",extpage:!0},exec:(e,t,n)=>{const{postMessage:r,onMessage:s,onDisconnect:i}=e;if("canceled"in t)return void _.warn("notification: unexpected request",t);const o=t.image?t.image:_s("tampermonkey");let a,c=!1;const{highlight:l,title:u,text:d,timeout:A,silent:h,url:p,tag:f,id:m}=t,g=e=>{c||(c=!0, vt.getSelected(null,(t=>vt.create({url:e,parent:t}))))};let v,w;s((e=>{w&&a&&"canceled"in e&&!e.canceled&&g(a)})),i((()=>{!v||p||f||v(),v=void 0})),(()=>{const e=R();var t,r;return l&&n.tab?(t=n.tab.id,r=()=>e.resolve(),vt.highlight({tabs:t},r)):e.resolve(),e.promise()})().then((()=>{const e=R();return d?(a=p,v=Js(u,d,o,{timeout:A,silent:h,notificationId:m},(t=>e.resolve(t.clicked))).cancel):e.resolve(),e.promise()})).always((e=>{w=e;const t=r({clicked:w,notificationId:m});w&&t&&a&&g(a)}))}},o={ allow:{extpage:!0},exec:async(e,t)=>{const{postMessage:n,onDisconnect:r}=e;let s=e;const i=void 0===t.reload||!!t.reload;let o,a,c,{data:l,json:u,code:d,url:A,tfd:h}=t;if(A)try{s&&n({progress:qr.getMessage("Loading")}),c=await Co(A)}catch(e){return void n({error:qr.getMessage("Unable_to_load_script_from_url_0url0",A)})}if(h){let e,t;if(!(e=Cs.fromTransferableData(h))||!(t=await e.toBlob()))return void n({error:qr.getMessage("Unable_to_parse_this_")});c=await t.arrayBuffer()}if(l||c){if(c){s&&n({ progress:qr.getMessage("Decoding")});try{l=await et(c)}catch(e){}}if(l)try{a=await sd.zip.read(l).progress((e=>{s&&n({progress:e})}))}catch(e){}if(!a){if(c)try{u=await et(c,{encoding:"UTF-8"})}catch(e){}u=l}}if(u&&!d&&!a)try{a=await sd.json.read(u)}catch(e){try{d=Xe(u)}catch(e){d=u}}if(a){const e={scripts:Object.values(a.scripts).map((e=>(e=>{const t=e.meta||{},n=e.settings||{},r=e=>({url:e.meta.url,sri:e.meta.sri,ts:e.meta.ts||null,mimetype:e.meta.mimetype,modified:e.meta.modified, content:e.source});return{source:e.source,name:t.name,uuid:t.uuid,file_url:t.file_url,options:e.options,storage:e.storage||{ts:0,data:{}},lastModified:t.modified,enabled:n.enabled,position:n.position,resources:e.resources?e.resources.map(r):[],requires:e.requires?e.requires.map(r):[]}})(e))),global_settings:a.global_settings};o=Yc.importFromJson(e).then((e=>({reload:!!e.global_settings,success:!0}))).fail((()=>{n({error:qr.getMessage("Unable_to_parse_this_")})}))}else{if(!d)return void n({ error:qr.getMessage("Unable_to_parse_this_")});o=Yc.installFromSource(d,{force_url:A},{silent_fail:!0}).fail((e=>{var t;const r=((null===(t=null==e?void 0:e.messages)||void 0===t?void 0:t.errors)||[])[0]||qr.getMessage("Unable_to_parse_this_");n({error:r})})).then((e=>({installed:e?1:0,success:!0})))}o.done((e=>{i&&!e.reload?Wu.create("options.scripts").done((t=>{const r={...e,items:t};n(r)})).fail((e=>{n({error:e||qr.getMessage("An_error_occured_during_import_")})})):n(e)})),r((()=>{s=null}))}} ;return{keepAlive:{allow:{script:[],extpage:!0},exec:(e,t,n)=>{$A(n)?(Ks.emit("added",n),e.onDisconnect((()=>{Ks.emit("removed",n),gt.lastError}))):e.onMessage((()=>{}))}},tabInfo:{allow:{script:[]},exec:(e,t,n)=>{const r=n.tab;if(!r)return void _.warn("mh: unknown tab ID",n);const s=r.id;if(Ro(n)){const{info:r}=t;e.onDisconnect((()=>{i(),gt.lastError})),wi.once("reset",(()=>{i()}),{tabId:s});const i=_i.on("set",(({info:t})=>{_.verbose("mh: tabInfo got info",t,n),e.postMessage({info:t})}),{ tabId:s});if(r){for(const e of Object.values(r.map))Ro(e.sender)||(e.active=!1);_i.emit("got",{tabId:s,info:r})}else _i.emit("get",{tabId:s})}else{const r=xo(n);if(!r)return void _.error("mh: unknown frameId",n,t);const{url:i}=t;if(!i)return void _.warn("mh: missing URL for tabInfo");wi.emit("frameStart",{tabId:s,sender:r,url:i}),e.onDisconnect((()=>{_.verbose("mh: unload check url: "+i),wi.emit("frameStop",{tabId:s,sender:r,url:i}),gt.lastError}))}}},xhr:e,xhrLocking:{allow:{extpage:!0}, exec:async(e,t)=>{const{url:n}=t,{done:r}=await qA();e.postMessage({ack:!0}),e.onDisconnect((()=>{r(),gt.lastError}))}},download:t,webRequest:{allow:{script:"webRequest"},exec:(e,t,n)=>{const r=n.tab;if(!r)return _.warn("mh: unknown tab ID",n);const{postMessage:s}=e,i=r.id,o=xo(n);if(!o)return _.error("mh: unknown frameId",n,t);if(MA){if(void 0!==i&&o){const{uuid:e,rules:r}=t;Array.isArray(r)?Qh(i,o,e,r,(e=>{s(e)})):_.warn("mh: invalid webRequest rule list",n)}}else s({type:"error", message:"currently not supported in MV3",details:{}})}},addStorageListener:n,exportToJson:{allow:{extpage:!0},exec:(e,t)=>{const{postMessage:n}=e;Yc.exportToJson(t.ids,t.options).done((e=>{const t=JSON.stringify(e);ze(t,B.PARTIAL_SIZE).forEach((e=>n({partial:e}))),n({done:!0})})).fail((e=>{n({error:e||"serialization error"})}))}},openInTab:r,notification:i,registerMenuCommand:s,observeUrlChanges:{allow:{script:"window.onurlchange"},exec:(e,t,n)=>{ const{postMessage:r,onDisconnect:s}=e,{tab:i,frameId:o}=n;if(!i)return _.warn("mh: unknown tab ID",n);const a=i.id,c=e=>{e.tabId==a&&e.frameId==o&&r({url:e.url})};$u.addListener(a,c),s((()=>{$u.removeListener(a,c)}))}},observeAudioStateChanges:{allow:{script:"audio"},exec:(e,t,n)=>{const{postMessage:r,onDisconnect:s}=e,{tab:i}=n;if(!i)return _.warn("mh: unknown tab ID",n);const o=i.id,a=(e,t)=>{t.id==o&&("muted"in e&&r({muted:e.muted}),"audible"in e&&r({audible:t.audible}))};ll.addListener(a), s((()=>{ll.removeListener(a)}))}},tabWatch:{allow:{extpage:!0},exec:(e,t,n)=>{const{disconnect:r,postMessage:s,onDisconnect:i}=e,{active:o,url:a,filter:c}=t,l=n.tab,u=ll.openAndWatch({url:a,active:o,filter:c?new RegExp(c):void 0,index:((null==l?void 0:l.index)||0)+1,parent:l},(e=>{e?s({tab:e}):(d(),r())})),d=()=>{u.cancel()};i(d)}},syncInfo:{allow:{extpage:!0},exec:e=>{const{postMessage:t,onDisconnect:n}=e,r=e=>t({info:e});vi.on("syncProgressEvent",r),n((()=>{vi.off("syncProgressEvent",r)}))}}, importEx:o,backgroundControl:{allow:{script:[]},exec:async(e,t)=>{const{postMessage:n}=e;let r;wn.values.background_control?"restart"in t&&t.restart?(await N(45e3),r="still there"):r="unsupported action":r="not supported",n({error:r})}}}})(),oh=(()=>{const e=(e,t)=>{if(t.messageId){const n={messageId:t.messageId,ack:!0,method:t.method};try{e.postMessage(n)}catch(t){return _.debug("mh: Error sending port ("+e.name+") message ACK",n,t),t.message||t}}};return t=>{let n;const r=s=>{ k.ensureLate((()=>{if(n)n(s);else if(void 0!==s.method){const i=((t,n)=>{const r=t.sender;_.verbose("mh: connect.method "+n.method+" contextId "+n.id+" tabId: "+(r.tab?r.tab.id:"unknown!!!"));const s=ih[n.method];if(!s)return _.warn("mh: unknown method "+n.method),!1;if(!s.allow||!s.exec)return _.warn("mh: invalid implementation of "+n.method),!1;const i=th(r),o=i.extpage,a=i.page,c="options"==a,l=i.id_valid&&!o ;if("background"==a||s.allow.insecure||o&&s.allow.extpage||c&&s.allow.options||l&&nh(n,s.allow.script)){let i;return e(t,n),s.exec({postMessage:e=>{try{t.postMessage(e)}catch(n){return _.debug("mh: Error sending port ("+t.name+") message",e,n),n.message||n}},disconnect:()=>t.disconnect(),onMessage:n=>{if(!1===i)throw Error("port message listener registration must be done synchronously");i=r=>{e(t,r),n(r,t)}},onDisconnect:e=>t.onDisconnect.addListener(e)},n,{...r,...a?{extpage:a}:{}}),i=i||!1,i} return!1===n.topframe&&(o||c)||_.warn("mh: this context doesn't have the permission to call \""+n.method+'"'),!1})(t,s);i?n=i:t.onMessage.removeListener(r)}else _.warn("mh: invalid request",s)}))};t.onMessage.addListener(r)}})(),ah={"*://*.tampermonkey.net/*":["getVersion","openOptions"],"*://*.greasyfork.org/*":["*"],"*://*.sleazyfork.org/*":["*"],"*://*.openuserjs.org/*":["*"],"*://*.userstyles.org/*":["*"],"*://*.userscript.zone/*":["*"]},ch=(()=>{const e={exec:async(e,t,n,r)=>{ if(!e)throw Error("invalid port");const s="options.scripts.userscripts",{action:i,messageId:o}=t,a=(e,t,n)=>r({messageId:e,error:{number:t,message:n}});try{if("options"==i)r({messageId:o,allow:["options","list","get","patch"]});else if("list"==i){const e=(await Wu.create(s)).filter((e=>e.userscript)),t={messageId:o,list:e.map((e=>{const{uuid:t,namespace:n,name:r,requires:s,storage_key_count:i}=e,o=`${se(t)}`;return{namespace:n||"",name:r,path:`${o}/source`, requires:s.filter((e=>e.url)).map((e=>`${o}/external/${se(e.url)}`)),storage:i?`${o}/storage`:void 0}}))};r(t)}else if("get"==i){const{path:e,ifNotModifiedSince:n}=t,[i,c,l]=e.split("/").map((e=>re(e)));if(!["source","storage","external"].includes(c))return a(o,404,"Not found");try{let e,t;if("storage"===c)e=Po.getStorageByUid(i).ts;else if("source"===c){const{script:t,cond:n}=Po.getByUid(i);if(!t||!n)return a(o,404,"Not found");e=t.lastModified}else if(l){const t=Gc.getElement(i,l);t&&(e=t.ts)} if(!n||!e||e>n){const e=(await Wu.create(`${s}.${c}`,{uuid:i,url:l}))[0];if(void 0===e)return a(o,404,"Not found");if("string"==typeof e)t=e;else{const n={};Object.keys(e).forEach((t=>{n[t]=Nt(e[t])})),t=(e=>{const t=`__undefined__${Ve()}`;return JSON.stringify(e,((e,n)=>void 0===n?t:n),void 0).replace(new RegExp(`"${t}"`,"g"),"undefined")})(n)}}r({messageId:o,value:t,lastModified:e})}catch(e){return a(o,404,"Not found")}}else if("patch"===i){ const{path:e,value:n,lastModified:s}=t,[i,c,l]=e.split("/").map((e=>re(e)));if(!i||"string"!=typeof n)return a(o,400,"Bad Request");const{script:u,cond:d}=Po.getByUid(i);if(!u||!d)return a(o,404,"Not found");if("source"==c){if(void 0!==l)return a(o,400,"Bad Request");Yc.doSave({name:u.name,uuid:i,src:n,ask:!wn.values.editor_easySave,external:!0,save:!0,...s?{force_meta:{lastModified:s}}:{}}).done((()=>{r({messageId:o})})).fail((()=>{a(o,400,"Bad Request")}))}else if("storage"==c){ if(void 0!==l)return a(o,400,"Bad Request");const e=s||Date.now();try{const t=Po.getStorageByUid(i).data,r=Object.entries(JSON.parse(n)).reduce(((e,[t,n])=>(e[t]=Vt(n),e)),{});((t,n)=>{const r=Object.keys(n),s=Object.keys(t);r.concat(s).filter(((e,t,n)=>n.lastIndexOf(e)===t)).forEach((o=>{r.includes(o)?s.includes(o)?n[o]!==t[o]&&((t,n,r)=>{Po.setStorageByUidAndNotify(i,e,void 0,t,r)})(o,t[o],n[o]):((t,n)=>{Po.setStorageByUidAndNotify(i,e,void 0,t,n)})(o,n[o]):(t=>{ Po.setStorageByUidAndNotify(i,e,void 0,t,void 0,!0)})(o,t[o])}))})(t,r)}catch(e){return a(o,400,"Bad Request")}r({messageId:o})}else{if("external"!=c)return a(o,404,"Not found");{const e=Gc.getElement(i,l);if(!e)return a(o,404,"Not found");const t=e.data.meta||"text/javascript";await Gc.setElement(i,l,{content:n,meta:t,lastModified:s},!0),r({messageId:o})}}}else{if("put"===i||"delete"==i)return a(o,405,"Method Not Allowed");_.warn(`emh: unknown action ${i}`),e.disconnect()}}catch(e){ return a(o,500,"Internal error")}}};return{userscripts:e}})(),lh=["editor-firefox@tampermonkey.net","hohmicmmlneppdcbkhepamlgfdokipcd","lieodnapokbjkkdkhdljlllmgkmdokcm"],uh=e=>{k.late?e.onMessage.addListener((t=>{void 0!==t.method&&((e,t)=>{const{sender:n}=e,{id:r}=n;if(!lh.includes(r))return void e.disconnect();_.verbose("emh: connect.method "+t.method+" contextId "+t.id+" tabId: "+(n.tab?n.tab.id:"unknown!!!"),t);const s=ch[t.method]||{},{exec:i}=s ;if(!i)return _.warn("emh: unknown method "+t.method),!1;const o=i(e,t,n,(t=>{try{e.postMessage(t)}catch(n){_.debug(`emh: error sending message to port[${e.name}]`,t,n)}}));"function"==typeof o&&e.onDisconnect.addListener(o),_.verbose("emh: connect.method "+t.method+" end!")})(e,t)})):k.registerLateCallback((()=>{oh(e)}))};let dh;const Ah={init:()=>{mt.onMessage.addListener(rh),mt.onConnect.addListener(oh),mt.onConnectExternal.addListener(uh)},get externally_connectable_reg(){return dh||(dh=Go({ match:Object.keys(ah)})),dh},externally_connectable:ah},hh=e=>{let t,n,r;switch(e){case"raw+":r=t=n=!0;break;case"default":case"-js":r=t=!0,n=!1;break;case"js+":t=n=!0,r=!1;break;case"js":t=!0,r=n=!1;break;case"dom":n=!0,t=r=!1;break;case"raw":r=!0,n=t=!1}return{js:t,dom:n,raw:r}},ph=(e,t,n,r)=>{const s=ko(n),i=e.id+"#"+(s?"i":"n")+(r?"a":"e")+"#"+t,o=Bo.get(i);let a=o?JSON.parse(o):void 0;if(!a){const o=[],c=[],l=[],u=[],d={};if(t){const i=Yc.determineScriptsToRun({url:t,warn:MA, enabled:!r||void 0,deleted:!1});for(const t of i){if(_.verbose("check "+t.name+" for enabled:"+t.enabled),void 0!==s){const e=s?"incognito-tabs":"normal-tabs";let r,i=null;if((i=wn.values.runtime_run_in)&&i.length&&!i.includes(e)||(i=t.options.run_in||t.options.override.orig_run_in)&&i.length&&!(i.includes(e)||n.cookieStoreId&&(r=F.getIdFromStoreId(n.cookieStoreId))&&i.includes(`container-id-${r}`)))continue} (Ro(e)||!0!==t.options.noframes&&(null!==t.options.noframes||!0!==t.options.override.orig_noframes))&&(t.evilness&&t.evilness>=Math.min(kc.SEVERITY_MAX,wn.values.script_blacklist_severity)?l.push(t):t.enabled?(d[t.uuid]=t.name,Yc.isContexter(t)?u.push(t):o.push(t)):c.push(t))}}a={contexters:u,runners:o,disabled:c,evilness:l,script_map:d},t&&Bo.set(i,JSON.stringify(a))}return a},fh=e=>{const{runners:t,contexters:n}=e,{js:r,dom:s,raw:i}=hh(wn.values.sandbox_mode),o=e=>{const t=[],n=[],r=[] ;return e.forEach((e=>{let t,o;zl(e)?(t=e.script.options.sandbox,o=e.script.name):(t=e.options.sandbox,o=e.name);const a="raw"===t||null===t,c="JavaScript"===t,l="DOM"===t,u=()=>_.info(`content: script "${o}" wants to be executed inside a ${t||"raw"}-level sandbox, but this mode is currently disabled at the security settings`);l&&s?r.push(e):((c||l)&&u(),i?n.push(e):(a&&u(),s?r.push(e):_.warn(`content: script "${o}" can't be executed`)))})),{dom:r.length?r:void 0,raw:n.length?n:void 0, js:t.length?t:void 0}};return{scripts:o(t||[]),contexters:o((n||[]).map((e=>(e=>{const{uuid:t,options:n,name:r,name_i18n:s,description:i,description_i18n:o}=e;return{uuid:t,options:n,name:r,name_i18n:s,description:i,description_i18n:o}})(e))))}},mh=(e,t,n)=>{const{scripts:r,contexters:s}=fh(e),i=[{m:"native",t:[Ga.staticVars.DEFAULT,Ga.staticVars.NATIVE]},{m:"disabled",t:[Ga.staticVars.OFF]},{m:"browser",t:[Ga.staticVars.CHROME]}].filter((e=>{if(e.t.includes(wn.values.downloads_mode))return!0 })).map((e=>e.m))[0]||"disabled",o=Xl(),a=Ah.externally_connectable_reg;return{scripts:r,contexters:s,external_connect:"off"!=wn.values.external_connect&&a.rinc&&a.rinc.length?a.rinc.map((e=>Zo(e))):void 0,nonce:e.nonce,originalURL:t,injectMode:wn.values.runtime_inject_mode,contentMode:wn.values.runtime_content_mode,inIncognitoContext:ko(n)||!1,isFirstPartyIsolation:Tl.fpi,sharedBlobs:!1,sharedObjectUrls:!0,container:n.cookieStoreId?F.getIdFromStoreId(n.cookieStoreId):void 0,userAgent:o, downloadMode:i,relaxedCsp:wn.values.webrequest_fixCSP,sandboxMode:wn.values.sandbox_mode,enforce_strict_mode:"on"==wn.values.runtime_strict_mode,top_level_await:["default","on"].includes(wn.values.runtime_top_level_await),measure_scripts:wn.values.debug,logLevel:wn.values.logLevel,version:mt.manifest.version}};let gh=1;const vh=gh++,wh=gh++,_h=gh++,bh=gh++,yh=gh++,kh=gh++,Rh=gh++,xh=gh++,Eh=gh++,Ch=(js("execInfo"),{}),Sh=W({retimeout_on_get:!0,timeout:300,check_interval:120}),Mh={},Ih=(e,t)=>{ (t||["running_unique","running"].includes(wn.values.appearance_badges))&&(np.setIcon(e),np.setBadge(e))},Uh=e=>{const t=Ch[e];t&&_i.emit("set",{tabId:e,info:t})},Gh=e=>{const t=`${e}`;delete Mh[e],delete Ch[e],Sh.remove(t)},Zh=e=>{const t=Ch[e];if(t)return t;{const t={map:{},scripts:{},searched:{}};return Ch[e]=t,t}},Th=(e,t,n,r)=>Oh(e,t,n,r),Bh=(e,t)=>Oh(e,t,void 0,void 0,void 0,void 0,!1),Oh=(e,t,n,r,s,i,o)=>{const a=Zh(e) ;if(void 0!==s&&n)a.searched[n]=s;else if(void 0!==i)a.forbidden=!0;else if(t){const e=t.id;let s=a.map[e];if(void 0===s){if(!1===o)return;s=a.map[e]={active:!0,sender:t,scripts:[],urls:[]}}r?(s.scripts.push(r.uuid),a.scripts[r.uuid]=r.name):s.active=!!o,n&&!s.urls.includes(n)&&s.urls.push(n)}else _.warn("setExecInfo: sender missing");Uh(e)},Dh=(e,t)=>{const n=`${e}`,r=Sh.get(n);if(r)return r;if(!t){const e={scripts:{},objurl:{},running:0,disabled:0};return Sh.set(n,e),e}},jh=(e,t,n)=>{ let r=Mh[e];if(r||n||(r={frames:{},requests:{}},Mh[e]=r),r){const e=t.id,n=r.frames;n[e]||(n[e]={sender:t,state:vh})}return r},Lh=function(e,t,n,r){const s=Object.entries(n);if(s.length)for(const[n,i]of s)Th(e,t,r,{uuid:n,name:i});else Oh(e,t,r)},Fh=function(e,t,n,r){let s;const i=ko(r)?"incognito-tabs":"normal-tabs",o=wn.values.runtime_run_in;return o.length&&!o.includes(i)||!yl.isAllowed(n)?(_.log("This URL is filtered by the security settings:",n,"-> Do nothing!"),Hh(e,t),s={contexters:[], runners:[],disabled:[],evilness:[],script_map:{}}):s=ph(t,n,r),s.runners.forEach((n=>{n.webRequest&&n.webRequest.length&&Qh(e,t,n.uuid,n.webRequest)})),s},Ph=(e,t)=>{wn.values.userscript_search_url&&"badge"==wn.values.userscript_search_mode&&void 0===Zh(t).searched[e]&&Il(e).then((n=>{((e,t,n)=>{Oh(e,void 0,t,void 0,n)})(t,e,n.count),np.setBadge(t)}))};let Nh,Vh;const zh=e=>{const t=Zh(e.id),{scripts:n,map:r}=t,s={};for(const e of Object.keys(n)){let t=[],n=0,i=[] ;Object.values(r).forEach((({active:r,scripts:s,urls:o})=>{i=i.concat(o),r&&(t=t.concat(s.filter((t=>t==e)))),n+=s.filter((t=>t==e)).length}));const o=Ie(t).length;s[e]={count:o,all_time:n,urls:i}}return s},qh=(e,t)=>{const n={},r=Ch[e.id];let s;if(r)s=r.map;else{if(!t)return n;Oh(e.id,t,e.url),s=Zh(e.id).map}for(const{sender:t,urls:r}of Object.values(s))for(const s of r){if(_.verbose(`Found at info[${e.id}] -> ${s}`),!yl.isAllowed(s))continue ;const{runners:r,contexters:i,disabled:o,evilness:a}=ph(t,s,e,!0);[r,i,o,a].forEach((e=>{e.forEach((e=>{n[e.uuid]=e}))}))}return n},Hh=(e,t)=>{Ro(t)&&(e=>{Oh(e,void 0,void 0,void 0,void 0,!0)})(e)},Qh=(e,t,n,r,s)=>{const i=t.frameId;if(void 0===i)return;const o=[];r.forEach((e=>{const t="string"==typeof e.selector?{include:[e.selector]}:e.selector,n=["include","match","exclude"].reduce(((e,n)=>{const r=t[n];return r&&(e[n]="string"==typeof r?[r]:r),e}),{}),r=e.action;let s ;if("string"==typeof r)s="cancel"===r?{cancel:!0}:{};else{const{cancel:e,redirect:t}=r;s="string"==typeof t?{redirect:{url:t}}:{cancel:e,redirect:t}}o.push({selector:n,action:s})})),((e,n,r,s)=>{const o=jh(e,t);(o.requests[i]||(o.requests[i]={}))[r]=s})(e,0,n,{id:n+"@"+e+":"+t.id+"#"+Date.now(),rules:o,uuid:n,callback:s})},Wh=(e,t)=>{const n=Zh(e),{map:r,searched:s}=n;let i=0,o=0,a=0,c=[];for(const{active:e,scripts:n,urls:l}of Object.values(r)){for(const e of l){const t=s[e];void 0!==t&&(a=t)} i+=n.length,e&&(o+=n.length,t&&(c=c.concat(n)))}return{active:o,executed:i,searched:a,unique:c.length?Ie(c).length:0}},Xh=(e,t)=>{var n;const r=t.frameId;if(void 0!==r)return null===(n=Mh[e])||void 0===n?void 0:n.requests[r]},Yh=(e,t,n)=>{if(jh(e,t,!0)){if(n){const t=Qn(n),r=Dh(e,!0);r&&delete r.scripts[t]}const r=((e,t)=>{const n=Dh(e),r=n.objurl[t.id];return void 0!==r&&delete n.objurl[t.id],r})(e,t);r&&URL.revokeObjectURL(r)}};wi.on("active",(({tabId:e,windowId:t})=>{Nh=t,Vh=e, vt.getSelected(t,(t=>{t&&t.id==e&&t.url&&Ph(t.url,e)}))})),wi.on("reset",(({tabId:e})=>{let t;if(t=Mh[e])for(const{sender:n}of Object.values(t.frames))Yh(e,n);Gh(e)}));const Jh=(e,t,n,r)=>{if(!wn.values.enabled)return;const s=t.id,i=jh(e,t).frames[s],o=i.state||vh,a=Qn(n);let c;const l=Dh(e);return c=l.scripts[a],o{if(!wn.values.enabled)return ;const i=jh(e,t),o=t.id,a=i.frames[o];(a.state||vh)<_h&&(a.state=_h,Jh(e,t,n,{cookieStoreId:s,incognito:r}))})),wi.on("commited",(({tabId:e,sender:t,url:n})=>{if(!wn.values.enabled||!["https:","http:","file:"].some((e=>n.startsWith(e))))return;const r=jh(e,t),s=t.id,i=r.frames[s];(i.state||vh)>=wh||(i.state=wh)})),wi.on("loading",(({tabId:e,sender:t,url:n,incognito:r,cookieStoreId:s})=>{if(!wn.values.enabled||!["https:","http:","file:"].some((e=>n.startsWith(e))))return ;const i=jh(e,t),o=t.id,a=i.frames[o],{incognito:c,cookieStoreId:l}=a.incognitoInfo||{};a.incognitoInfo={incognito:c||r,cookieStoreId:l||s},(a.state||vh)>=yh||(a.state=yh)}));const Kh=(e,t,n,r,s)=>{if(!wn.values.enabled)return;const i=jh(e,t),o=t.id,a=i.frames[o],c=Qn(n),l=Dh(e);let u=l.scripts[c];if(!u&&(_.log("tv: lazy init @ events.prepare("+e+", "+o+", "+n+")"),u=l.scripts[c]=Fh(e,t,c,r),!u))return void _.warn("tv: no script run info for tab "+e+" @ "+c);const d=a.state;a.state=kh, d!=kh&&Lh(e,t,u.script_map,c);const{contexters:A,nonce:h}=u,p=s?r=>{Yh(e,t,n);const i=r||A.length?{runners:r,contexters:A,nonce:h}:void 0;s(i)}:void 0,f=function(e,t,n,r,s){const i=[];for(const e of r)i.push(Ql.bundle(e));let o;return R.when(i).then((e=>e.filter((e=>{const t=zl(e);return t&&_.log("run script "+e.script.name+" @ "+n),t})))).always((e=>{s?s(e):o=e})),o}(0,0,c,u.runners,p);return f||A.length?{runners:f,contexters:A,nonce:h}:u.runners.length||A.length?{ count:u.runners.length||A.length,nonce:h}:void 0},$h=(e,t,n,r,s)=>{const i=R.Pledge();if(!wn.values.enabled||!["https:","http:","file:"].some((e=>n.startsWith(e))))return i;const o=jh(e,t),a=t.id,c=o.frames[a];if((c.state||vh)>=Rh)return i;const l=R();return s&&(Kh(e,t,n,r,(s=>{if(!s)return l.resolve();const i=mh(s,n,r);((e,t,n)=>{const{js:r}=rA,s=t.frameId,i=R();if(void 0===s)return _.error("dc: no frameId set!"),i.resolve(),i.promise();if(xt.supported){const t=R();n?xt.executeScript({target:{ tabId:e,frameIds:[s]},injectImmediately:!0,world:"ISOLATED",func:e=>{window.tm_info=e},args:[n]}).then((()=>t.resolve())):t.resolve();const o=R();return xt.executeScript({target:{tabId:e,frameIds:[s]},injectImmediately:!0,world:"ISOLATED",files:r.map((e=>e.file))}).then((()=>o.resolve())),R.when([t.promise(),o.promise()]).then((()=>i.resolve()))}{let t;if(n){const e=JSON.stringify(n),r=String.fromCharCode(8232),s=String.fromCharCode(8233) ;t=-1!==e.search(r)||-1!==e.search(s)?`window.tm_info=JSON.parse(atob("${Ye(e)}"));`:`window.tm_info=${e};`}const o=R();return t?vt.executeScript(e,{frameId:s,code:t,runAt:"document_start"},(()=>o.resolve())):o.resolve(),R.when([o.promise(),...r.map((t=>{const n=R();return vt.executeScript(e,{frameId:s,file:t.file,runAt:"document_start"},(()=>n.resolve())),n.promise()}))]).then((()=>i.resolve()))}})(e,t,i).then((()=>l.resolve()))})),c.state=Rh),l.promise()} ;wi.on("complete",(({tabId:e,sender:t,url:n})=>{if(!wn.values.enabled||!["https:","http:","file:"].some((e=>n.startsWith(e))))return;const r=jh(e,t),s=t.id,i=r.frames[s];i.state,i.state=xh,Ro(t)&&(Vh==e&&Ph(n,e),"auto"==wn.values.scriptUrlDetection&&n.startsWith(ZA)&&TA(n,e))})),wi.on("unload",(({tabId:e,sender:t})=>{Yh(e,t);const n=jh(e,t),r=t.id;n.frames[r].state=Eh,Bh(e,t),Ih(e),delete n.frames[r]})),wi.on("remove",(({tabId:e})=>{const t=Mh[e];t&&Object.values(t.frames).forEach((t=>{ Yh(e,t.sender)})),Gh(e)})),wi.on("error",(({tabId:e,sender:t,url:n})=>{Ro(t)&&"auto"==wn.values.scriptUrlDetection&&n.startsWith(ZA)&&TA(n,e)})),wi.on("frameStart",(({tabId:e,sender:t})=>{((e,t)=>{Oh(e,t,void 0,void 0,void 0,void 0,!0)})(e,t),Ih(e)})),wi.on("frameStop",(({tabId:e,sender:t})=>{Bh(e,t),Ih(e)}));const ep=()=>{gt.lastError&>.lastError},tp={init:()=>{if(!kt.supported)return;tp.setIcon();let e=wn.values.appearance_badge_color||"#ee3131";"#"===e[0]||e.startsWith("rgb")||(e="#"+e), kt.setBadgeBackgroundColor({color:e}),e=wn.values.appearance_badge_text_color||"#ffffff","#"===e[0]||e.startsWith("rgb")||(e="#"+e),kt.setBadgeTextColor({color:e})},setIcon:e=>{if(!kt.supported)return;let t,n,r=!1;if(void 0!==e){const t=(e=>Zh(e).forbidden)(e);void 0!==t&&(r=t)}r?(t="_forbidden",n=qr.getMessage("At_least_one_part_of_this_page_is_forbidden_by_a_setting_")):t=wn.values.enabled&&void 0!==e?"":"_grey",_.debug("badge: set icon "+t);const s={path:mt.getURL("images/icon"+t+".png")},i={ title:n||mt.manifest.name};void 0!==e&&(s.tabId=e,i.tabId=e);try{kt.setIcon(s,ep),kt.setTitle(i)}catch(e){_.warn("bg: ERROR while setIcon! "+e.message)}},setBadge:e=>{if(!kt.supported)return;let t=0 ;"off"==wn.values.appearance_badges?t=0:"active"==wn.values.appearance_badges?e&&(t=Wh(e).executed?" ":null):"alltime"==wn.values.appearance_badges?e&&(t=Wh(e).executed||0):"running"==wn.values.appearance_badges?e&&(t=Wh(e).active||0):"running_unique"==wn.values.appearance_badges&&e&&(t=Wh(e,!0).unique||0);let n=t?`${t}`:"";if(wn.values.userscript_search_url&&"badge"==wn.values.userscript_search_mode){const r=Wh(e).searched||0;if(r>0){let e="" ;null==t||"string"==typeof t?n=`${r}`:(e=t>999?"":t>99||`${n}+${r}`.length>4?"+":`${r}`,n=`${n}+${e}`)}}_.debug("badge: set "+n),kt.setBadgeText({text:n,tabId:e})}},np=tp,rp=e=>(()=>{const t=R();return"activate"==e?(kt.supported&&kt.openPopup(),t.resolve()):"toggle-enable"==e?(wn.values.enabled=!wn.values.enabled,t.resolve()):vt.getSelected(null,(n=>{if(!n)return void t.reject();let r;if("open-dashboard"==e)r=mt.getURL("options.html")+"#nav=dashboard";else{const t=n.url ;t?"open-dashboard-with-running-scripts"==e?r=mt.getURL("options.html")+"#nav=dashboard&filter="+se(t):"open-new-script"==e&&(r=mt.getURL("options.html")+"#url="+Ye(t)+"&nav=new-user-script"):console.warn("cl: no URL in tab",n)}t.resolve(r?{url:r,active:!0,parent:n}:void 0)})),t.promise()})().then((e=>{e&&vt.create(e)}));self.setTimeout=H;const sp=new Date;de.down=Ga,de.dast=nn,_.debug("Starting background fred @"+KA);const ip=()=>{ const e="temporary"==wn.values.incognito_mode&&mt.inIncognitoContext;nn.setTemporary(e),e&&(wn.values.sync_enabled=!1,wn.values.scriptUpdateCheckPeriod=0,wn.values.sync_type=0,wn.values.statistics_enabled=!1)},op=de.init=async()=>{qr.init(),k.init(),GA(!0),ll.init(),Ah.init(),Gt&&function(e){if(!ft)throw new Error("commands.onCommand listener can only be registered during startup in non-persistent background pages!");I.commands.onCommand.addListener(e)}(rp), gt.setUninstallURL(`https://www.tampermonkey.net/uninstall.php?ext=${gt.short_id}`),(e=>{Hr=e})(Ol),kt.supported&&(kt.setIcon({path:mt.getURL("images/icon_grey.png")}),kt.setPopup({popup:"action.html"}),kt.setTitle({title:"Tampermonkey"})),gt.onUpdateAvailable.addListener(gi.onUpdateAvailable),gt.onInstalled.addListener((e=>{_.log("bg: onInstalled",e);const t=e.reason||"unknown";k.ensureLate((()=>{"install"==t?(T.SECURE||Po.getUidList().forEach((e=>{const t=Po.getByUid(e) ;t.script&&t.cond&&t.script.evilness!=kc.SEVERITY_FOISTED_SCRIPT&&(_.warn("content security: found unfamiliar script",t.script.name),t.script.evilness=kc.SEVERITY_FOISTED_SCRIPT,Yc.doModify(e,t.script,!1))})),gi.onInstalled()):"update"==t&&(e.previousVersion,gi.onUpdated(e.previousVersion))}))})),Bu.init();const e=mt.manifest.version;((e,t)=>{Er=`${(null==t?void 0:t.version)||""} `;const n=j.short_id;mr=(fr[n]||fr[Jn])(),me("error",(e=>{const{message:t,filename:n,lineno:r,colno:s,error:i}=e ;((e,t,n,r,s)=>{let i="";if(s)try{i=s.stack||""}catch(e){}Ur(e.toString(),Er+"bg@"+L.urls.prepareForReport(t||""),[n+":"+r,i].join(";"))})(t,n,r,s,i)}));const r=e=>{let t="";try{t=e.stack}catch(e){}Ur("CSP violation of "+e.effectiveDirective,Er+"bg@"+L.urls.prepareForReport(e.documentURI),[e.sourceFile," -> ",e.lineNumber+":"+e.columnNumber,t].join(";"))};ke?ke.addEventListener("securitypolicyviolation",(e=>r(e))):me("securitypolicyviolation",(e=>r(e))), (null==t?void 0:t.started)&&(cr=Date.now()-t.started.getTime())})(0,{version:e,started:sp}),_.log("bg: listeners registered!");{let t;const n=new Promise((e=>{t=e}));let r=10;const s=()=>{if(I&&I.storage&&I.storage.local)t();else{const t=`chrome.storage.local is not available on startup, wait ${r} ms`;_.error(t),Ur(t,e+"bg@"+mt.urls.prepareForReport(oe.href||"")),ce((()=>s()),r),r=Math.min(1e3,2*r)}};s(),await n}const t=await aa();await(async()=>{_i.on("got",(({tabId:e,info:t})=>{ t&&(Ch[e]=((e,t)=>{if(!e)return t;const{map:n,scripts:r,searched:s}=e,{map:i,scripts:o,searched:a}=t,c={map:{...n},scripts:{...r,...o},searched:{...s,...a}};for(const[e,{active:t,sender:r,scripts:s,urls:o}]of Object.entries(i)){const i=n[e];i?(i.active=t,i.urls=Ie(i.urls.concat(o)),i.scripts=Ie(i.scripts.concat(s))):c.map[e]={active:t,sender:r,scripts:s,urls:o}}return c})(Ch[e],t),Ih(e,!0))})),_i.on("get",(({tabId:e})=>Uh(e)))})(),await(()=>{const e=R(),t="0.0.0.0";let n,r ;const s=mt.manifest.version;let i,o;const a=e=>`!extdb.${e}`;let c=a;return No.init().then((()=>{let e=No.getValue(c(Vo),!0);void 0===e&&(e=No.getValue(Vo,!0),void 0===e?e="3.5":c=e=>e),i=o=e,r=No.getValue(c(qo),!0)||No.getValue(Qo,!0)||(Ce?Ce.getItem(Qo):null)||t,n=as(s,r)==as.eNEWER})).then((()=>{if("localStorage"===T.DEFAULT||!Ce)return R.Pledge(!1);const e=R(),t=No.getValue(c(qo));let n=!1 ;return Ce.getItem(c(Qo))&&!t&&(No.listValues().length?_.error("storage: unable to find version information"):n=!0),e.resolve(n),e.promise()})).then((e=>{if(!n&&e){const e=["Tampermonkey detected inconsistencies that indicate that your browser wiped the extension database!","You can continue to use Tampermonkey normally, but your settings and scripts might be lost. Click here to get more information.","https://www.tampermonkey.net/faq.php#Q207"];_.error(e.join("\n")),((e,t,n)=>{fs.push({text:e, description:t,url:n})})(...e)}})).always((()=>{let c=0;const l=()=>{if(c{c++,l()},n=d[c].schema;d[c].cond(n)?d[c].fn().done((()=>{n&&(_.info("Converted database from",o,"to",n),o=n),t()})).fail((()=>{e.reject()})):t()}},u=()=>{_.error("Incognito mode detected. Database conversion can only be done in non-incognito mode! Stopping now..."),((e,t,n)=>{const r={title:e.join("\n\n")},s=t?"_"+t:"",i=mt.getURL("images/icon"+s+".png");_.warn(e.join("\n")), kt.supported&&(kt.setIcon({path:i}),kt.setTitle(r)),n||mt.onMessage.addDynamicListener(((t,n,r)=>{const s={name:"1",id:"1",sub_menu_item:!0,pos:"left",items:[]};s.items.push({name:e[0],image:"info"}),e.length>1&&s.items.push({name:e[1]}),r({items:[s],options:{enabled:!1}})}))})(["Tampermonkey needs to convert its database but this can't be done in incogonito mode!","Please open a non-incognito mode window and/or restart your browser."],"paused")},d=[{ cond:()=>n&&as("3.6.3650",o)==as.eNEWER&&as("3.5.3650",r)==as.eNEWER,fn:async()=>{if(mt.inIncognitoContext)throw u(),new Error("can't migrate in incognito mode!");{o="3.6.3650";const e=[];[{o:"TM_config",n:zo},{o:"TM_update_check",n:Ho},{o:"TM_version"},{o:"TM_unload_ts"}].forEach((t=>{if(t.n){const n=No.getValue(t.o);void 0!==n&&e.push(No.setValue(t.n,n))}e.push(No.deleteValue(t.o))}));let t=new RegExp("@re$");const n=[];No.listValues().forEach((e=>{if(-1==e.search(t))return ;const r=e.replace(t,"");n.push(r)})),n.forEach((t=>{const n=No.getValue(t+"@st"),r=No.getValue(t),s=No.getValue(t+"@re"),i=No.getValue(t+"@source"),o=Po.getUidByName(t)||Ve();e.push(No.deleteValue(t+"@st")),e.push(No.deleteValue(t)),e.push(No.deleteValue(t+"@re")),e.push(No.deleteValue(t+"@source")),r&&s&&i?(e.push(No.setValue(Wo+o,t)),e.push(No.setValue(Xo+o,s)),e.push(No.setValue(Yo+o,n)),e.push(No.setValue(Jo+o,i)),e.push(No.setValue(Ko+o,r))):_.error("invalid script entry",{source:i,meta:r, cond:s})})),t=new RegExp("@st$"),No.listValues().forEach((n=>{-1!=n.search(t)&&e.push(No.deleteValue(n))})),await R.heal(e).done((()=>{_.info("Converted database from",r,"to",o)}))}}},{schema:"3.7.0",cond:e=>as(e,o)==as.eNEWER,fn:async()=>{if(mt.inIncognitoContext)throw u(),new Error("can't migrate in incognito mode!");{const e=[];No.listValues().forEach((t=>{if(!t.startsWith(Ko))return;const n=No.getValue(t);if(n&&n.options&&n.options.override&&!n.options.override.orig_run_at){ n.options.override.orig_run_at=n.options.run_at||"document-idle",n.options.run_at=null;const r={...n};e.push(No.setValue(t,r))}})),await R.heal(e)}}},{schema:"5465",cond:e=>as(e,o)==as.eNEWER,fn:async()=>{if(mt.inIncognitoContext)throw u(),new Error("can't migrate in incognito mode!");{const e=No.getValue(zo,!0);e&&1==e.sync_version&&(e.sync_enabled=!1,await R.heal(No.setValue(zo,e,!0)))}}},{schema:"6226",cond:e=>as(e,o)==as.eNEWER,fn:async()=>{if(mt.inIncognitoContext)throw u(), new Error("can't migrate in incognito mode!");{const e=[Vo,"#storage",zo,"#session",qo,"#laststart",Ho,"#begging"],t=[Wo,Xo,Yo,Jo,"@ext#",Ko],n="#misc_config",r=["TM_version","@state#"],s=[];let i=[];for(const o of No.listValues()){const c=No.getValue(o,!0);if(i.length>50&&(await R.heal(i),i=[]),void 0===c)_.error(`Unable to migrate key ${o} because it's empty!`);else if(o.startsWith(n)){const e=o.slice(n.length);i.push(No.setValue(`!misc.${e}`,c,!0)) }else r.some((e=>o.startsWith(e)))?(_.info(`Dropping key ${o} because it's not needed anymore!`),i.push(No.deleteValue(o))):e.includes(o)||t.some((e=>o.startsWith(e)))?i.push(No.setValue(a(o),c,!0).fail((()=>{_.error(`Unable to migrate key ${o}! A backup is available at the database root.`)})).then((()=>No.deleteValue(o).fail((()=>_.error(`Unable to delete migrated key ${o}!`)))))):s.includes(o)||_.error(`Unable to migrate unknown or already migrated key ${o}!`)}await R.heal(i)}}},{ cond:()=>n||as(o,i)==as.eNEWER,fn:()=>R.heal([No.setValue(a(qo),s,!0),No.setValue(a(Vo),o,!0)])},{cond:()=>n,fn:()=>(_.info("First run of version "+s+"!"),gi.scheduleNotification(r,r==t),R.Pledge())},{cond:()=>!0,fn:async()=>{const t=R();return e.resolve(),await null,t.resolve(),t.promise()}}];l()})),e.promise()})(),await nn.init(),await R.Pledge(),await wn.init(),await R.when((await wn.defaultScripts()).map((async e=>{await z(1e3),Yc.doSave({url:void 0,src:e.textContent,ask:!1,replace:!0, internal:!0})}))),de.cfgo=wn,ip(),(e=>{if(_.set(wn.values.logLevel),qr.setLocale(wn.values.i18n),wn.values.userscript_search_url){const e=()=>{(({url:e,mode:t})=>{Sl=yo.internal,"string"==typeof e?Rl=xl=e:(Rl=(e=>{const t=e.api||e.www;return`${e.protocol}//${t?t+".":""}${e.domain}`})(e),xl=(e=>{const t=e.www;return`${e.protocol}//${t?t+".":""}${e.domain}`})(e)),Cl=t,El=qr.getLocale()||qr.getUiLocale()})({ url:["dhdg","gcal","fire","iikm","mfdh","fcmf"].includes(gt.short_id)?sn:wn.values.userscript_search_url,mode:wn.values.userscript_search_mode})};wn.addChangeListener("userscript_search_mode",e),e()}var t,n,r,s,i,o;t=Yc.doModify,n=Po.getByUid,Zc=t,Tc=n,Ji={prefix:void 0,mozAnon:!1},void 0!==(r=Li)&&(eo=r),void 0!==(s=qA)&&($i=s),void 0!==(i=QA)&&(Ki=i),void 0!==(o=ra)&&(Yi=o),yo.init(),k.ensureLate((()=>{e&&(ar=e);const t=wn.values.statistics_enabled;null===t?oi.all("stats",{key:"stats", class:"information",title:qr.getMessage("Anonymous_statistics"),text:qr.getMessage("Please_enable_anonymous_statistics_and_help_to_improve_this_extension_"),info_url:"https://www.tampermonkey.net/privacy.php",timeout:864e5,buttons:[{text:qr.getMessage("Enable"),id:"enable_stats"},{text:qr.getMessage("No"),id:"disable_stats"}]}):Cr(!!t)})),wi.on("reset",(({tabId:e,early:t})=>{yu.clearByTabId(e),t||np.setIcon(e)}));const a=e=>{e>=0&&vt.get(e,(t=>{!gt.lastError&&t&&(np.setIcon(e),np.setBadge(e))})) };wi.on("commited",(({tabId:e})=>a(e))),wi.on("complete",(({tabId:e})=>a(e))),wi.on("reset",(({tabId:e})=>Nc.purgeAppeals(e))),wi.on("remove",(({tabId:e})=>{Nc.purgeAppeals(e),(e=>{delete Lu[e]})(e)})),fu.init(),yl.init(),kc.init(),Po.init(),Ga.init(),za.init(),GA(),Hu.init(),ju.init(),qa=ra})(!0===t),wn.addChangeListener("logLevel",(()=>{_.set(wn.values.logLevel)})),wn.addChangeListener("i18n",(()=>{qr.setLocale(wn.values.i18n)})),wn.addChangeListener("incognito_mode",(()=>{ip()})), wn.addChangeListener("statistics_enabled",(()=>{Cr(!!wn.values.statistics_enabled)})),wn.addChangeListener("context_menu_enabled",(()=>{wn.values.context_menu_enabled||Bu.update({contexters:[],commands:[]})})),wn.addChangeListener(["require_blacklist","script_blacklist_server","script_blacklist_type"],Yc.blackCheckAll),wn.addChangeListener("webrequest_modHeaders",((e,t,n,r)=>{null==r||r.done((()=>ce(Ta.reset,1)))})), wn.addChangeListener(["appearance_badge_color","appearance_badge_text_color"],np.init),wn.addChangeListener("script_include_mode",(()=>Oo.removeAll())),np.init(),await(async()=>{let e,t,n;try{const r=navigator.userAgentData&&navigator.userAgentData.getHighEntropyValues?await navigator.userAgentData.getHighEntropyValues(["fullVersionList"]):void 0;r&&(e=r.fullVersionList,t=r.mobile,n=r.platform)}catch(e){}if(!e){const r=navigator&&navigator.userAgentData;r&&(e=r.brands,t=r.mobile,n=r.platform)} const{arch:r,os:s}=await new Promise((e=>j.getPlatformInfo((t=>e(t||{}))))),{name:i,version:o}=await new Promise((e=>j.getBrowserInfo((t=>e(t||{})))));return Wl={brands:e||[{brand:i||"",version:o||""}],mobile:void 0===t?M():t,platform:(s?{mac:"macOS",win:"Windows",android:"Android",cros:"Chrome OS",linux:"Linux",openbsd:"Open/FreeBSD",fuchsia:"Fuchsia"}[s]:void 0)||n,...r?{arm64:{bitness:"64",architecture:"arm"},mips64:{bitness:"64",architecture:"mips"},"x86-32":{bitness:"32",architecture:"x86" },"x86-64":{bitness:"64",architecture:"x86"}}[r]:{architecture:r}},Wl})(),await Promise.all([gA(),YA()]),Yc.clean(),await R.Pledge(),_.log(`bg: ready! [sessionStart=${t}]`),k.setReady(),(async()=>{await(async()=>{const e=await fc.get();for(const t of Object.values(e))if("number"!=typeof t&&t.expires&&t.expires{const e=await fc.get();return Object.values(e).filter(pc).map((e=>vc(e)))})() ;for(const t of e)"actions"==t.realm?oi.actionPage("status",t):"options"==t.realm?oi.optionsPage("status",t):oi.all("status",t)})()},ap=op;{try{importScripts("/test.js")}catch(e){console.error(e)}const e=globalThis,{skipWaiting:t,clients:n}=e;try{e.oninstall=()=>t(),e.onactivate=()=>n.claim()}catch(e){console.error(e)}}ap()})()})();