var n;String.prototype.includes||(String.prototype.includes=function(a,b){return 0<=this.indexOf(a,b)});Array.prototype.includes||(Array.prototype.includes=function(a,b){return 0<=this.indexOf(a,b)});var q=Array.prototype.includes,aa=Function.call.bind(Array.prototype.slice),ba=Function.apply.bind(Array.prototype.push),t="undefined"==typeof browser;t&&(browser=chrome);
var v=navigator.userAgent.includes("Edge/"),ca=navigator.userAgent.includes("Edg/"),x=navigator.userAgent.includes("Firefox/"),da=navigator.userAgent.includes("OPR/");navigator.userAgent.includes("YaBrowser/");
var y,ea,fa,ga,ha,ia=x?69:v?77:66,ja=x?220:150,B=["127.0.0.1:1001","0.1.0.1:1001"],ka=/(?!)/,la=/(?:chrome|about|chrome-extension|ms-browser-extension|moz-extension):/,ma=["main_frame","sub_frame"],na=["image","object"],D="main_frame sub_frame image object xmlhttprequest other".split(" "),oa=["image","object","xmlhttprequest","other"],pa=["*://*/*","ftp://*/*","file:///*"],qa=["*://*/*"],ra=["*://*/*"],sa=/\.([^.\\/]*?)(?:\.[0-9.]+)?$/,ta=/^v(\d+)\.(\d+)(?:b(\d+))?\b/,ua=/^idmreg:|\bidman|\binternetdownloadmanager\b/i,
va=/^(HTM|HTML|CGI|PHP|ASP|ASPX|JSP|JSPX)$/i,wa=browser.runtime.getURL("captured.html"),xa=browser.runtime.getURL("").slice(0,-1),ya=browser.extension.getBackgroundPage().location.href,za=!1,Aa=q.bind("origin referer dnt cookie user-agent accept-encoding sec-fetch-site sec-fetch-mode".split(" ")),Ba=q.bind([301,302,303,307,308]),Ca=q.bind([301,302,303]),Da=q.bind(["http","https","socks4","socks5"]),Ea={direct:2,auto_detect:3,system:4,pac_script:5,fixed_servers:7},Fa=[null,[115,111,112,113,114],[111,
112],[112]],Ga=[null,[-115,116,117,122,118,119,120,121],[113],[113]],Ha={16:1,17:2,18:4,45:8,46:16},Ia={http:1,https:9,ftp:2,ftps:10,idmreg:31},Ja={"text/html":"HTML|HTM","text/css":"CSS","text/javascript":"JS|JSON","text/mspg-legacyinfo":"MSI|MSP","text/plain":"TXT|VTT|SRT|M3U|PLS|M3U8|MPD|F4M|TORRENT|BTT","text/srt":"SRT","text/vtt":"VTT|SRT","text/xml":"XML|MPD|F4M|TTML|TTML2","text/x-javascript":"JS|JSON","text/x-json":"JSON","application/dash+xml":"MPD","application/f4m+xml":"F4M","application/gzip":"GZ",
"application/javascript":"JS","application/json":"JSON","application/msword":"DOC|DOCX|DOT|DOTX","application/octet-stream-m3u8":"M3U8","application/pdf":"PDF","application/torrent":"TORRENT|BTT","application/ttaf+xml":"DFXP","application/ttml+xml":"TTML|TTML2","application/vnd.apple.mpegurl":"M3U8","application/zip":"ZIP","application/x-7z-compressed":"7Z","application/x-aim":"PLJ","application/x-bittorrent":"TORRENT|BTT","application/x-compress":"Z","application/x-compress-7z":"7Z","application/x-compressed":"ARJ",
"application/x-dosexec":"EXE","application/x-gtar":"TAR","application/x-gzip":"GZ","application/x-gzip-compressed":"GZ","application/x-javascript":"JS","application/x-mpegurl":"M3U8","application/x-msdos-program":"EXE|DLL","application/x-msi":"MSI","application/x-msp":"MSP","application/x-ole-storage":"MSI|MSP","application/x-rar":"RAR","application/x-rar-compressed":"RAR","application/x-sdlc":"EXE|SDLC","application/x-shockwave-flash":"SWF","application/x-silverlight-app":"XAP","application/x-subrip":"SRT",
"application/x-tar":"TAR","application/x-zip":"ZIP","application/x-zip-compressed":"ZIP","video/3gpp":"3GP|3GPP","video/3gpp2":"3GP|3GPP","video/avi":"AVI","video/f4f":"F4F","video/f4m":"F4M","video/flv":"FLV","video/mp2t":"TS|TSV|M3U8","video/mp4":"MP4|M4V","video/mpeg":"MPG|MPEG","video/mpegurl":"M3U|M3U8","video/mpg4":"MP4|M4V","video/msvideo":"AVI","video/quicktime":"MOV|QT","video/vnd.mpeg.dash.mpd":"MPD","video/webm":"WEBM","video/x-flash-video":"FLV","video/x-flv":"FLV","video/x-mp4":"MP4|M4V",
"video/x-mpegurl":"M3U|M3U8","video/x-mpg4":"MP4|M4V","video/x-ms-asf":"ASF","video/x-ms-wmv":"WMV","video/x-msvideo":"AVI","audio/3gpp":"3GP|3GPP","audio/3gpp2":"3GP|3GPP","audio/mp2t":"TS|TSA|M3U8","audio/mp3":"MP3","audio/mp4":"M4A|MP4","audio/mp4a-latm":"M4A|MP4","audio/mpeg":"MP3","audio/mpeg4-generic":"M4A|MP4","audio/mpegurl":"M3U|M3U8","audio/webm":"WEBM","audio/wav":"WAV","audio/x-mpeg":"MP3","audio/x-mpegurl":"M3U|M3U8","audio/x-ms-wma":"WMA","audio/x-wav":"WAV","ilm/tm":"MP3","image/gif":"GIF|GFA",
"image/icon":"ICO|CUR","image/jpg":"JPG|JPEG","image/jpeg":"JPG|JPEG","image/png":"PNG|APNG","image/tiff":"TIF|TIFF","image/vnd.microsoft.icon":"ICO|CUR","image/webp":"WEBP","image/x-icon":"ICO|CUR","flv-application/octet-stream":"FLV"};
function E(a,b,c,d,e,f){if(a){var g=["MSG#",a,"#",b,"#",c,"#",d];this.u=a;this.B=b;this.D=c;this.h=d;this.b=e||[];this.o=g;if(e)for(a=0;a<e.length;a++)g.push(":",e[a]||0);if(f)for(var h in f)if(e=f[h],null!=e)if(g.push(",",h,"="),"string"==typeof e){b=a=e.length;for(c=0;c<b;)d=e.charCodeAt(c++),128<=d&&(2048<=d?(a+=2,d-55296&56320||c++):a++);g.push(a,":",e)}else e instanceof Blob?g.push(e.size,":",e):g.push(e)}else this.s=new FileReader}function Ka(){this.g=this.constructor.prototype.G++}
Ka.prototype.G=1;function La(a,b,c,d){this.id=a;this.b=b;c&&(this.f=c.toLowerCase());d&&(this.c=d)}La.prototype.a=0;function Ma(a,b,c){this.id=[a,b].toString();this.a=null==c||0>c?null:[a,c].toString()}function Na(a){a.i||(a.o.push(";"),a.i=!0);return a.o.join("")}function Oa(a){a.i||(a.o.push(";"),a.i=!0);return new Blob(a.o)}function Pa(a,b,c){a.i?a.c(a):(b.a=c||0,b.b=0,a.s.onload=a.$.bind(a,b),Qa(a,b,0,50))}
E.prototype.$=function(a){for(var b=this.s.result;;)switch(a.b){case 0:var c=b.split(",",2),d=c.shift().split(":",2),e=d.shift();if(!d.length){if(!c.length)return this.c(this);a.b=1}var f=e.length+1,d=e.split("#",6);if(5!=d.length||"MSG"!=d[0])return this.c(this);this.u=parseInt(d[1]);this.B=parseInt(d[2]);this.D=parseInt(d[3]);this.h=parseInt(d[4]);b=b.slice(f);a.a+=f;a.b++;break;case 1:d=b.split(",",2);e=d.shift();if(!d.length){d=b.split(";",2);if(2>d.length)return Qa(this,a,b.length,100);a.b=4}f=
e.length+1;this.b=d=e.split(":");for(e=0;e<d.length;e++)c=d[e],d[e]=c.includes(".")?parseFloat(c):parseInt(c);b=b.slice(f);a.a+=f;a.b++;break;case 2:c=b.split(",",2);2>c.length&&(c=b.split(";",2));var d=c.shift().split(":",2),g=d.shift(),f=g.length,e=!1;if(d.length)f++;else{if(!c.length)return Qa(this,a,b.length,25);e=!0}d=g.split("=",3);if(2!=d.length)return this.c(this);c=parseInt(d[0]);d=parseInt(d[1]);a.a+=f;a.b++;if(e){this[c]=d;b=b.slice(f);a.b++;break}a.f=c;a.c=d;b=a.c;f=a.a;a=a.slice(f,f+
b);a.size==b?this.s.readAsText(a):this.c(this);return;case 3:return this[a.f]=b,a.a+=a.c,a.b++,Qa(this,a,0,21);case 4:switch(b[0]){case ",":a.b=2;b=b.slice(1);break;case ";":a.b++;break;default:return this.c(this)}a.a++;break;case 5:this.i=!0;this.l(this);a.size>a.a&&(b=new E,b.l=this.l,b.c=this.c,Pa(b,a,a.a));return}};function Qa(a,b,c,d){var e=b.a;c=e+c;b.size>c?a.s.readAsBinaryString(b.slice(e,c+d)):a.c(a)}
function G(){if(y){var a=this.constructor.prototype,b;for(b in a)b.startsWith("_")||"constructor"==b||(this[b]=a[b].bind(this));this.Da=[];this.$=!1;this.aa=this.G=null;this.o=!1;this.L=0;this.c={};this.s={};this.a={};this.h={};this.b={};this.u={};this.g={};this.f={};this.K={};this.H={};this.I={};this.I.zb=[];this.Ka=0;this.m=this.Ja=!1;this.oa=!0;this.O=null;this.Ea=this.Ia=!1;this.ab=this.Ha=this.Za=1;this.J={};this.i=null;this.ba=1;this.B=null;this.Fa=ka;this.D=[null,{},{},{}];this.C=this.l=null;
this.W=Array(3);this.Z=0;this.Ga=null;this.ka=this.Y=!1;t&&browser.browserAction.disable();t&&pa.push("about:blank");t&&qa.push("about:blank");x&&browser.runtime.onInstalled.addListener(this.gb);browser.windows.onCreated.addListener(this.Ua);browser.windows.onRemoved.addListener(this.Va);browser.windows.onFocusChanged.addListener(this.yb);browser.tabs.onActivated.addListener(this.ob);browser.tabs.onUpdated.addListener(this.rb);browser.tabs.onRemoved.addListener(this.qb);browser.tabs.onAttached&&browser.tabs.onAttached.addListener(this.pb);
this.Ca();this.ra();Ra(this,!0)}}n=G.prototype;n.gb=function(a){var b=browser.runtime.getManifest().version;a.version=b;this.$a=a};
n.Ta=function(a){var b=a.value;a=Ea[b.mode];var c,d;this.W.fill(void 0);if(5==a&&(d=b.pacScript))d.data&&5E4<d.data.length?a=4:(c=d.data)?(a=6,c=c.replace(/\blet\b/g,"var").replace(/,(?=(?:\s*\/\/.*?\n)*\s*[\]}])/g,"")):c=d.url,this.W.fill(!0);else if(7==a){b=b.rules;d=b.bypassList;c=I(this,b.singleProxy);if(!c){c=I(this,b.fallbackProxy);var e=I(this,b.proxyForHttp,"http"),f=I(this,b.proxyForHttps,"https"),b=I(this,b.proxyForFtp,"ftp");e!=f||e!=b||e!=c&&c?(c=(e||"")+";"+(f||"")+";"+(b||"")+";"+(c||
""),++a):c=e}d&&d.length&&(c+=";"+d.join(","))}b=5>a?a.toString():c?a+":"+c:null;b!=this.l&&(this.l&&this.pa(),this.l=b)};function I(a,b,c){if(b){var d=b.scheme||"http",e="https"==d;a=a.W;c?a[c]=e:a.fill(e);if(Da(d))return d+"://"+b.host+(b.port?":"+b.port:"")}}
function Sa(a,b,c,d){if(b){var e=b.type;if("direct"==e)return"0";"socks"==e&&(e="socks5");if(Da(e)){var f="1:"+e+"://"+b.host+":"+b.port;"socks5"==e&&b.proxyDNS&&(f+="#");c||d||!(c=a.C)||(c=c.substr(c.indexOf(";")+1||c.length));c&&(f+=";"+c);d&&f&&(a.C=f);return f}}}
n.pa=function(a){if(void 0===a){if(t&&this.o){a=new XMLHttpRequest;var b=this.B||"http://"+(this.G?(new URL(this.G.url)).host:B[0])+"/status/204+IDM";a.url=b;a.timeout=1E3;a.onreadystatechange=this.pa.bind(this,a);a.open("GET",b,!0);a.send()}}else 4==a.readyState&&(this.B=204==a.status?a.url:null)};
function Ra(a,b){var c=a.c,d=a.J={};browser.contextMenus.removeAll();for(var e=0;e<Ta.length;e++){var f=Ta[e];f[0]&&(x?b||c[f[1]]:1)&&(d[e]=browser.contextMenus.create({title:Ua(f[2]),contexts:f[3].split(","),onclick:f[4].bind(a),documentUrlPatterns:f[5]||pa,enabled:!0}))}}function Va(a,b,c,d,e){a=a.g;return b in a?a[b]:a[b]=new La(b,c,d,e)}
function Wa(a,b,c,d,e){a=a.h;var f,g;J(b)?(f=b.frameId||0,g=b.parentFrameId,d||(d=b.tabId),e||b.requestId||(e=b.url)):f=b;b=[d,f].toString();d=a[b]||(a[b]=new Ma(d,f,g));null!=c&&(d.g=c);e&&"about:blank"!=e&&(d.j=e);return d}function Xa(a){var b=new Ka;return a.u[b.g]=b}function Ya(a,b){var c=b instanceof Ka&&b.g,d=c?b:a.u[b];delete a.u[c||b];return d}function Za(a,b){for(var c=a.D,d=1;d<c.length;d++){var e=c[d][101];if(e&&e.test(b))return d}return 0}
n.ra=function(){var a=this.L%(B.length+1);if(a<B.length)this.G=a=new WebSocket("ws://"+B[a]+"/?cid="+Math.random().toString().substr(2,9),"plugin.v3.internetdownloadmanager.com"),a.onopen=this.wa,a.onclose=this.R,a.onmessage=this.nb,1==a.readyState?this.wa():3==a.readyState&&this.R();else{this.aa=a=browser.runtime.connectNative("com.tonec.idm");try{a.postMessage("")}catch(b){a=null}a?(a.onDisconnect.addListener(this.R),a.onMessage.addListener(this.ib),this.wa()):this.R()}};
n.wa=function(){this.o=!0;this.Ha=1;var a={};a[112]=fa;a[113]=ea;a[114]="Chrome_RenderWidgetHostHWND";a[125]=JSON.stringify(this.$a);if(587202560<=y){var b=browser.i18n.getUILanguage().replace("_","-");"sr"==b&&(b+="-Cyrl-CS");a[116]=b}N(this,2,1,1024,[10,27,1031,0],a)};
n.R=function(){browser.runtime.lastError;this.G=this.aa=null;if(this.o){this.o=!1;this.K={};for(var a=this.Da,b=0;b<a.length;b++){var c=a.splice(b--,1).pop(),d=c.splice(0,2).pop();v&&c.splice(1);d.removeListener.apply(d,c)}this.$=!1;this.l=this.B=null;t&&browser.browserAction.disable()}a=++this.L;b=B.length+1;c=a/b;120>c&&(1==c&&this.oa&&this.qa(),!a||a%b?this.ra():window.setTimeout(this.ra,5E3*c))};n.nb=function(a){var b=new E;b.l=this.Ra;b.c=this.R;Pa(b,a.data)};
n.ib=function(a){var b=new E;b.l=this.Ra;b.c=this.R;Pa(b,new Blob([a]))};function N(a,b,c,d,e,f){if(!a.o)return!1;var g=a.Ha++;b=new E(g,b,c,d,e,f);if(c=a.G)c.send(Oa(b));else try{a.aa.postMessage(Na(b))}catch(h){return a.R(),!1}d&1&&(a.K[g]=b);return!0}
function $a(a,b){if(b.b){var c=b.b[6],d=a.f[c];if(d)return d.f?b.a=d.a.id:null}var d=b[6],e=b[17],f=b[50],g=b[7],h=a.I,k=a.g,m=a.a,l,p,r;if((l=h[d])||(l=h[e]))return b.a=l.id;if(l=h[f])r=l.id;for(c in k){var h=k[c],u=h.c;if(u){if(u==d||u==e||u==f){l=h.b;if(g){var z=m[l.tabId];z&&z.j!=g&&(l=null)}if(l)return b.a=l.id}u==g&&(p=h.b.id)}}return r?b.a=r:p?b.a=p:null}
n.Ma=function cb(b,c,d,e){if(c)return e?(c=(d=e.shift())&&this.a[d.id])?b.a=c.id:null:null;if(null!=b.a)return b.a;if(b.b){var f=b.b[7];if(f&&this.s[f])return b.a=f}if($a(this,b))return b.a;e=this.s;var g=b[50],h=b[7];for(f in e){c=e[f];if(c.j==g){b.a=f;break}null==b.a&&c.j==h&&(b.a=f)}if(null!=b.a)return b.a;h&&browser.tabs.query({url:h},cb.bind(this,b,!0,d));return null};
n.ta=function(a,b,c,d,e,f){var g=a.tabId,h=a.ea,k=a.v,m=a.c,l;if(void 0===b){f=new O(this,a,!0);if(null==k)if(a.b)browser.tabs.get(g,P(f,2)),browser.windows.getLastFocused(P(f,3));else if(k=this.a[g])a.v=k.v;null==h&&a.j?browser.webNavigation.getAllFrames({tabId:g},P(f,5)):h&&null==m&&browser.webNavigation.getFrame({frameId:h,tabId:g},P(f,4));if(Q(f))return}else if(b&&(c&&0<=c.index?a.v=c.windowId:d&&(a.v=d.id),e&&(l=e.parentFrameId),f))for(c=a.j,d=c.includes("#")&&R(c),e=f.length-1;0<=e;e--)if(k=
f[e],b=k.j,!k.Gb&&k.frameId&&(b==c||d&&b==d)){h=a.ea=k.frameId;l=k.parentFrameId;break}if(null==h)a.j||a.postMessage([11,g,null,!0]);else{f=[g,h].toString();0<=l&&(m=a.c=[g,l].toString());if(k=this.h[f])a.l=k.b,a.f=k.f,a.a=k.g,(b=k.S)&&a.j!=b&&(a.S=b),!m&&k.a&&(a.c=k.a);this.a[f]=a;g=[11,g,h,!a.j,a.a,a.f];(h=a.o)&&a.f&&(m=this.D[h],l=Ga[h],g.push(h),ba(g,l.map(db(m))));a.postMessage(g)}};
n.ha=function eb(b,c,d,e,f,g,h,k){var m=fb(b,!0);if(!m)return 0;if(1==m){if(!h)return S(b,eb.bind(this,b,c,d,e,f,g,!0)),-1;J(k)&&(k=T(k))}h=[m];var l={};l[6]=R(b,1==m);l[50]=c;l[7]=d;l[8]=e;l[100]=f;l[102]=g;l[51]=k;l[54]=navigator.userAgent;l[121]=x?this.C:this.l;N(this,14,1,0,h,l);return 3};
n.Ya=function(a,b,c,d,e){if(!d){if(!a||!a.length)return;c||(c={});var f=new O(this,a,b,c,!0);c.ca&&!c.Wa&&S(c.ca,P(f,4));for(var g=0;g<a.length;g++)S(a[g][0],P(f,5+g));if(Q(f))return}e&&(c.Wa=T(e));for(g=0;g<a.length;g++)a[g][5]=T(arguments[g+5]);var f=0,g=[a.length],h={8:4};h[54]=navigator.userAgent;h[7]=c.ca;h[110]=c.U;h[111]=c.Wa;h[121]=x?this.C:this.l;1<a.length&&(N(this,15,1,f,g,h),f=16,h={});for(var g=[0],k;k=a.shift();)h[6]=k[0],h[100]=k[2],h[102]=k[3],h[50]=k[4],h[51]=k[5],N(this,14,1,f,g,
h)};function gb(a,b,c,d,e,f,g,h){if(!d||a.c[-8]){var k=a.a[b];if(k){var m=Xa(a),l=m.g;m.tabId=b;m.C=k;m.L=c;m.m=0;m.Y=[];if(k=d&&!!e)m.ba=!0,m.ka=e,m.I=f,m.J=g,m.W=h,e.b||hb(a,e);(d=d&&a.c[12])?(d=d.replace(/\./g,"\\.").replace(/\*/g,".*").replace(/\~/g,"(?:.*\\.)?"),d="^(?:http|https|ftp|ftps)://(?:[^\\/]*@)?(?:"+d+")(?::\\d+)?(?:\\W|$)"):d="^(?:http|https|ftp|ftps)://";m.H=ib(a,b,[12,l,c,k,d]);m.Z=0;m.H||Ya(a,l)}}}
n.P=function(a,b,c){if(4294967295==a)this.i=null,c=!0;else{var d=this.g[a];if(d){c=d.a;if(!c)return;if(b)switch(c){case 3:return;case 2:break;default:d.a=3;window.setTimeout(this.P.bind(this,a,!1,!0),1E3);return}d.a=0;c=!0}}c&&N(this,8,1,32,[a])};function jb(a,b){var c=a.b[b];if(c&&c.fa){var d=c.border,e=c.scale;N(a,7,1,0,[b,Math.round((c.na+d)*e),Math.round((c.Aa+d)*e),Math.round((c.width-d-c.xa)*e),Math.round((c.height-d)*e)])}}
function kb(a,b,c,d){var e=a.g[b],f=256;2==e.a&&(d?(f|=128,e.a=1):f|=64);var g,h,k,m,l;c&&(g=c[0],h=c[1],k=c[2]||g+1,m=c[3]||h+1,l=c[4],c=e.b.i)&&(g+=c[0],h+=c[1],k=Math.min(k+c[0],c[2]),m=Math.min(m+c[1],c[3]));N(a,9,1,f,[b,g,h,k,m,l])}
n.ia=function(a){var b=this.b,c=[];if(a)(a=b[a])&&(a.M||a.N||c.push(a.w));else for(var d in b)a=b[d],a.M||a.N||c.push(a.w);if(c.length){b=[15,null,null];a={};var e=this.g;for(d in e){var f=e[d];f.a&&c.includes(f.b.tabId)&&(f.f?(f=f.b,f.b||hb(this,f,null,a),b[2]=d,f.postMessage(b)):kb(this,d,null,!0))}}};function lb(a,b){var c=a.b[b];c&&!c.N&&mb(a,c.w,void 0)}function mb(a,b,c){var d=c?0:2;c=c?32:64;var e=a.g,f;for(f in e){var g=e[f];g.a&&g.b.tabId==b&&g.a!=d&&(g.a=d,N(a,8,1,c,[f]))}}
function nb(a,b,c,d){var e=a.Z,f=(e&b)!=((c?63:32)&b);a.Z=c?e|=b:e&=~b;f&&(c=a.c[-1],b=a.c[-2],c=a.Y=0!=c&&(e&c)==c,e=a.ka=0!=b&&(e&b)==b,a.Ga=(c||e)&&d||null)}n.Ba=function(a,b,c,d){var e=this.b[a];if(e)if(d)e.N&&window.clearTimeout(e.N),e.N=window.setTimeout(this.Ba.bind(this,a,b,c),d);else if(e.N=null,b&&(browser.windows.get(a,this.V),browser.tabs.query({windowId:a,active:!0},this.V)),c){if((a=this.b[a])&&!a.N){a=a.w;b=this.g;for(var f in b)c=b[f],c.a&&c.b.tabId==a&&1==c.a&&N(this,8,1,1152,[f])}}else this.ia(a)};
n.V=function(a,b){a instanceof Array&&(a=a.shift());if(a){var c=a.windowId||a.id,d=this.b[c];if(d){if(a.windowId){if(d.va&&la.test(a.url))return;d.w=a.id;a.width&&(d.za=a.width);a.height&&(d.ya=a.height)}else{var e=b?d.scale=this.ba:d.scale,f="fullscreen"==a.state,g=!b&&f!=d.M;d.M=f;d.Pa="maximized"==a.state;d.ua="minimized"==a.state;v?(d.width=Math.round(a.width/e),d.height=Math.round(a.height/e),d.left=Math.round(a.left/e),d.top=Math.round(a.top/e)):(d.width=a.width,d.height=a.height,d.left=a.left,
d.top=a.top);g&&(f?lb(this,c):this.ia(c))}g=d.za;e=d.ya;if(g&&e){var h=d.width,f=d.height;if(!d.va&&!d.ua){if(g>h||e>f)return browser.windows.get(c,this.V);d.va=!0}g=h-g;h=g/2;0<=h&&20>=h?(d.border=h,d.na=d.xa=0):(h=d.border,x||da?d.na=g-2*h:d.xa=g-2*h);e=f-e-2*h;e<=ja&&50<=e&&(d.Aa=e)}b||jb(this,c);return d}}};
function hb(a,b,c,d){a=a.a;c=[16,c];for(var e=[b],f;f=a[b.c];b=f){if(d)if(d[b.id])break;else d[b.id]=!0;e.push(f)}for(f=e.pop();b=e.pop();f=b)d=b.cb,c[2]=d,c[3]=b.ea,c[4]=d?null:b.j,c[5]=d?null:b.S,f.postMessage(c)}function ib(a,b,c){a=a.a;b=[b,null].toString();var d=0,e;for(e in a)e.startsWith(b)&&(a[e].postMessage(c),d++);return d}
n.ma=function(a,b){var c={file:"content.js",runAt:"document_start",allFrames:!0},d;620756992<=y&&(c.matchAboutBlank=!0);654311424<=y&&!v&&b&&(c.frameId=b,x&&(c.allFrames=!1));if(a instanceof Array)for(;d=a.shift();)try{d.discarded||browser.tabs.executeScript(d.id,c,U)}catch(e){}else if(d=a)try{browser.tabs.executeScript(d.id||d,c,U)}catch(e){}};
function ob(a,b,c,d){var e=17,f=[b.v,b.fa,b.width,b.height,b.left,b.top,b.scale],g={};b.Pa&&(e|=256);b.ua&&(e|=512);null!=c&&(e|=c?2048:1024);d&&(g[117]=d);N(a,6,2,e,f,g)}n.Ca=function(a,b){if(b)for(;b.length;){var c=b.shift(),d=this.V(c,!0)||this.Ua(c,!0);ob(this,d,c.focused,c.title)}else if(!a){c=this.Ca.bind(this,!0);try{browser.windows.getAll({windowTypes:["normal","popup"]},c)}catch(e){browser.windows.getAll(c)}}};
n.sa=function(a,b){if(!this.o)return pb(b.id,"cannot_contact_idm");var c=a.linkUrl,d=a.pageUrl,e=d;if(a.menuItemId==this.J[4])return browser.downloads.search({query:[c]},this.bb.bind(this,c));if(a.menuItemId==this.J[1])c=a.frameUrl,c&&"about:blank"!=c||(c=d,e=null);else if(!c){var c=a.srcUrl,f=this.a[[b.id,a.frameId].toString()];if(f){var g=Xa(this);g.tabId=b.id;g.C=f;g.K=c;g.aa=e;g.ca=d;g.h=4;return f.postMessage([18,g.g,c])}}c&&this.ha(c,e,d,4)};
n.La=function(a,b){if(!this.o)return pb(b.id,"cannot_contact_idm");gb(this,b.id,a.menuItemId==this.J[2])};n.bb=function(a,b){for(var c,d,e;c=b.pop();)c.exists&&"complete"==c.state?d||e||(e=c.referrer):(d||(d=c.referrer),browser.downloads.erase({id:c.id}));this.ha(a,d||e,null,4)};
n.kb=function(a){var b=a.sender.tab;if(b&&!(0>b.id)){a.name=a.name.split(":").shift();var c=a.id;null==c&&(c=a.id=a.portId_||this.Za++);var d=b.id,e="top"==a.name;a.tabId=d;a.v=0>b.index?null:b.windowId;a.g=!0;a.h=!1;a.b=e;a.ea=e?0:a.sender.frameId;a.m=0;a.j=a.sender.url||e&&b.url||null;a.S=null;this.s[c]=a;e&&(this.a[d]=a);a.j&&(a.o=Za(this,(new URL(a.j)).hostname));a.onMessage.addListener(this.lb.bind(this,a));a.onDisconnect.addListener(this.ga);this.ta(a)}};
n.ga=function(a,b,c){browser.runtime.lastError;if(a.g){c||(a.g=!1);var d=this.I,e=this.g,f=this.f,g=this.u,h,k,m;for(m in d)d[m]===a&&delete d[m];for(var l in e)if(h=e[l],h.b===a)h.a&&this.P(l),delete e[l];for(l in f)(k=f[l],k.a!==a||k.c)||(delete f[l],v&&delete f[k.id]);for(l in g)g[l].C===a&&delete g[l];this.Ga===a&&nb(this,63,!1);if(!c)if(d=a.tabId,c=[d,a.ea].toString(),a.b&&delete this.a[d],delete this.a[c],delete this.s[a.id],v&&!b)browser.tabs.executeScript(a.tabId,{code:"__idm_connect__ && __idm_connect__(); true;"},
U);else for(l in a=this.h,a)c==a[l].a&&delete a[l]}};
n.lb=function(a,b){switch(b[0]){case 21:var c=b[1],d=b[2];c&&(a.j=c,null==a.ea&&this.ta(a),a.a&&!d&&(a.a=!1));break;case 22:var d=this.a,e=d[[a.tabId,b[2]]];e&&(e.cb=b[3],c=e.i=b[4],d=d[e.c])&&(d=d.i)&&(c[0]+=d[0],c[1]+=d[1],c[2]=Math.min(c[2]+d[0],d[2]),c[3]=Math.min(c[3]+d[1],d[3]));break;case 23:var c=a.v,f=a.tabId,g=b[1],d=b[2],e=b[4],h=this.b[c];if(g){if(g=Ya(this,g)){var h=f==h.w&&!h.M,k=!d||!e;k&&(d=f);if(f=b[7])g[101]||g.f&&g.U&&g.f!=g.U||(g.f=f),g.U=f;var f=Va(this,d,a,k?null:b[5],k?null:
b[6]),m=h&&!f.a;f.a=h?1:2;g instanceof E&&V(this,g,2,(h?128:64)|(k?512:0),c,d,g.f);k||(kb(this,d,e),m&&window.setTimeout(this.ia.bind(this,c),3E3))}}else b[3]?(this.P(d,!0),delete this.g[d]):e&&f==h.w&&!h.M&&kb(this,d,e,!0);break;case 24:c=b[2];(d=this.u[b[1]])&&c&&(d[101]||d.f&&d.U&&d.f!=d.U||(d.f=c),d.U=c);break;case 25:Va(this,b[1],a,b[2],b[3]);break;case 26:gb(this,a.tabId,!0,!0,a,b[1],b[2],b[3]);break;case 27:if(c=this.u[b[1]]){d=c.tabId;e=c.Y;if(g=b[4])if("string"==typeof g&&(g=JSON.parse(g)),
g instanceof Array){if(h=b[5])for(k=0;k<g.length;k++)g[k][4]=h;ba(e,g)}b[3]&&(c.m+=b[3]);b[6]&&(c.ca=b[6]);b[7]&&(c.U=b[7]);++c.Z==c.H&&(Ya(this,c),c.ba?(e=this.b[c.C.v])&&e.w==d&&c.m&&(g=c.W,h=e.border,k=e.scale,N(this,10,1,0,[4294967295,e.v,Math.round(c.I*g+(e.na+h)*k),Math.round(c.J*g+(e.Aa+h)*k),0,c.m]),this.i=d,ib(this,d,[13,!0])):e.length?this.Ya(e,c.L,c):pb(d,"cannot_find_links"))}break;case 28:this.P(4294967295);break;case 29:qb(this,a.v,a.tabId);break;case 30:qb(this,a.v,a.tabId,b[1],b[2]);
break;case 31:(c=Ha[b[1]])&&nb(this,c,b[2],a);break;case 32:0==b[1]&&nb(this,32,b[2],a);break;case 33:nb(this,63,!1);break;case 34:c=b[2];d=b[3];e=b[4];b[1]&&(g=a.l)&&(g=[g,d||0],h={},k=32,h[110]=c,h[115]=e,-2==d&&(k|=16),N(this,16,1,k,g,h));break;case 35:c=b[2];d=b[3];(e=Ya(this,b[1]))&&this.ha(e.K,e.aa,e.ca,e.h,c,d);break;case 36:e=b[1];c=b[2];if(d=this.f[e])e=[e,0],g={},g[115]=c,N(this,16,1,48,e,g),d.la=!1,d.Oa&&W(this,d);break;case 37:N(this,19,1,0,[b[1],b[2],a.tabId],b[3])}};
n.Ra=function(a){var b=a.B,c=a.D,d=a.h,e=a.b,f;if(1==b){var g=e[0];if(f=this.K[g])b=f.B,delete this.K[g]}switch(b){case 3:0<=this.L&&(this.L=-1,this.pa());d=e[0];this.Ia=9>d;this.Ea=10<=d;if(d=e[4])d/=96,t&&(d=620756992>y?1:620756992<=y&&621284967>y?d:637534208<=y&&638078312>y?d:1.24<d?d:1),this.ba=d,this.Ca();rb(this,e[5],a);this.oa&&this.qa();break;case 4:f=this.c;this.m=!!(e[3]&2147483648);rb(this,e[2],a);f[-9]=0<(d&64);f[-8]=0<(d&32);f[-4]=0<(d&2);f[-11]=0<(d&256)||2>c;f[-12]=0<(d&512)||2>c;f[-1]=
e[0];f[-2]=e[1];f[12]=a[12];f[17]=a[17];X(f,a,1);X(f,a,2);X(f,a,3);X(f,a,4);X(f,a,10);X(f,a,9,1);X(f,a,11,1);X(f,a,20,0,0,"TXT|HTM|HTML|CSS|JS|APNG|GIF|ICO|JPEG|JPG|PNG|SVG|WEBP");X(f,a,21,0,1,"/*-internal-*/**");sb(f,a,19);sb(f,a,18,1,1);Ra(this);this.$||(this.$=!0,t&&browser.browserAction.enable(),this.A(1,browser.runtime.onConnect,this.kb),this.A(1,browser.webNavigation.onCreatedNavigationTarget,this.jb),this.A(1,browser.webNavigation.onCommitted,this.Sa),this.A(1,browser.webNavigation.onHistoryStateUpdated,
this.hb),t&&this.A(1,browser.proxy.settings.onChange,this.Ta),t&&browser.proxy.settings.get({},this.Ta),t&&this.m&&this.A(2,browser.downloads.onCreated,this.eb),t&&this.m&&this.A(2,browser.downloads.onDeterminingFilename,this.fb),a=["*://*/*"],e=za?void 0:D,d=["requestHeaders","blocking"],t&&!ha&&1207959552<=y&&d.push("extraHeaders"),this.A(3,browser.webRequest.onBeforeRequest,this.tb,{urls:["*://*/*","ftp://*/*"],types:e},["requestBody","blocking"]),this.A(3,browser.webRequest.onBeforeSendHeaders,
this.ub,{urls:a,types:e},d),this.A(3,browser.webRequest.onHeadersReceived,this.wb,{urls:a,types:e},["responseHeaders","blocking"]),this.A(3,browser.webRequest.onResponseStarted,this.xb,{urls:a,types:e}),this.A(3,browser.webRequest.onErrorOccurred,this.vb,{urls:a,types:e}),(a=this.c[17])&&this.A(4,browser.webRequest.onBeforeRequest,this.sb,{urls:a.split("|"),types:ma},["blocking"]),browser.tabs.query({url:ra[0]},this.ma));break;case 18:e=e[0];if(3<e)break;f=Fa[e];var d=this.D[e],h;for(h in a)(h=parseInt(h))&&
(102==h||110<h&&150>h)&&(d[h]=f.includes(h)?RegExp(a[h]):a[h]);X(d,a,101,1);f=this.D.filter(J).map(tb(102));this.Fa=RegExp("^https?://(?:"+f.join("|")+")","i");1==e&&(d[-115]=a[115],d[122]||(d[122]="yt"));break;case 5:a=e[0];(e=this.b[a])?(d=0!=(d&128),e.M!=d&&(e.M=d)&&lb(this,a)):this.Va(a);break;case 6:if(d&4)break;a=f.b[0];e=e[1];if(d=this.b[a])d.fa=e,jb(this,a);break;case 8:a=e[0];e=d&32;if(4294967295==a)ib(this,this.i,[13,!1]),this.i=null;else if(a=this.g[a])a.a=e?0:2;break;case 11:a=e[0];4294967295==
a&&(gb(this,this.i,!0,!0),this.i=null);break;case 12:try{var k=a.b[5],m=a[4],e=4==k?2:3;if((1==k||2==k)&&$a(this,a)){if(this.c[3].test(m))1==k?e=6:k=4;else if(this.c[-4]||this.c[4].test(m))e=6;a[8]|=256}if(4==k)if(this.Ia&&!a.b[7])V(this,a,1);else{switch(a.b[4]){case 1:a[7]||(a[7]=a[50]);break;case 3:a[7]||(a[7]=a[32]),a[50]||(a[50]=a[31])}this.Xa(a)}else V(this,a,e)}catch(l){V(this,a,0)}break;case 13:a=f.b[0];d=f.b[5];e=e[1];h=3==e;if(1==d||2==d)f.h&128?ub(this,a,h):W(this,a,h);else if(5==d)if(e){if(a=
(f=this.f[a])&&f.da){h=f.method;e=f.requestHeaders;if(d=f.b)(d=vb(d,Y(e,"Content-Type")))||(h="GET");a.timeout=1E4;a.onreadystatechange=this.mb.bind(this,a,f.id);a.open(h,f.url,!0);for(f=0;f<e.length;f++)h=e[f],c=h.name,Aa(c.toLowerCase())&&(c="X-IDM-"+c),a.setRequestHeader(c,h.value);a.send(d)}}else wb(this,a);break;case 20:e=a[123];d=!e;a=[a.u,0,0,0];f={};x&&(h=this.C)&&(f[122]=h,d||(d=h.substr(2).split(";",1).shift()==e));f[121]=this.l;N(this,1,1,d?2:4,a,f);break;case 1:break;default:!f&&d&1&&
N(this,1,1,0,[a.u,0,0,0])}};n.Xa=function(a,b,c){try{if(null==a.a)if(!b){var d=new O(this,a,!0);this.Ma(a,null,d)||browser.windows.getLastFocused(P(d,2));if(Q(d))return}else if(c){var e=this.b[c.id],f=this.a[e&&e.w];f&&(a.a=f.id)}var g=this.s[a.a];if(!g)return V(this,a,0);var h;var k=a.g;k||(k=Ka.prototype.G++,a.g=k,this.u[k]=a);h=k;g.b||((f=this.a[g.tabId])&&f.postMessage([14,h]),hb(this,g,h));g.postMessage([15,h,null,a[6],a[17],a[50],a[31]])}catch(m){V(this,a,0)}};
function V(a,b,c,d,e,f,g){-1!=c&&(e=[b.u,c,e,f],f={},f[8]=b[8],g&&(f[110]=g),N(a,1,1,d|(0==c?4:2),e,f))}n.jb=function(a){Wa(this,a).c=!0};
n.Sa=function(a,b){var c=a.tabId,d=a.frameId,e=a.url,f=a.transitionType,f=f&&f.endsWith("_subframe");this.O==c&&(this.O=null);var g=this.a[[c,d]];if(g){if(this.i){var h=this.b[g.v];h&&h.w==this.i&&this.P(4294967295)}b?e!=g.j&&(this.ga(g,!1,!0),g.j=e,g.m++,g.postMessage([17,!1,g.f])):(this.ga(g,!0),f&&"about:blank"==g.j&&this.ma(c,d))}else f&&"about:blank"==e?(Wa(this,a),this.ma(c,d)):(c=this.h[[c,d]])&&c.c&&(c.c=!1)};n.hb=function(a){return this.Sa(a,!0)};
n.Ua=function(a,b){var c=a.id,d={v:c,width:a.width,height:a.height,left:a.left,top:a.top,scale:this.ba,border:8,Aa:ia,na:0,xa:0,Pa:"maximized"==a.state,ua:"minimized"==a.state,M:"fullscreen"==a.state,ya:0,za:0,w:0,va:!x,fa:null,N:null};this.b[c]=d;b&&(browser.tabs.query({windowId:c,active:!0},this.V),browser.tabs.query({windowId:c,url:ra[0]},this.Bb),browser.tabs.query({windowId:c,url:ra[0]},this.ma));return d};n.Bb=function(a){for(var b;b=a.shift();)Wa(this,0,!0,b.id,b.url)};
n.Va=function(a){N(this,5,1,32,[a]);delete this.b[a]};n.yb=function(a){if(0<a){var b=this.b[a];b&&(b.fa||ob(this,b,!0),(b=this.a[b.w])&&b.a&&(b.a=!1,browser.tabs.reload(b.tabId)),v&&this.Ba(a,!1,!0,500))}};n.rb=function(a,b,c){var d=c.windowId,e=this.b[d];e&&(e.fa||ob(this,e),e.w||this.V(c));"complete"==b.status&&(a=this.a[a])&&!a.h&&(a.h=!0,this.ia(d))};
n.qb=function(a){var b=this.a,c=this.h,d=a.toString()+",";this.O==a&&(this.O=null);(a=b[a])&&this.ga(a,!0);for(var e in b)e.startsWith(d)&&this.ga(b[e],!0);for(var f in c)f.startsWith(d)&&delete c[f]};
n.ob=function(a){this.Z=0;this.i&&this.P(4294967295);var b=a.windowId;a=a.tabId;var c,d=this.a[a];d&&(d.v||(d.v=b),(c=d.a)&&(d.a=!1));if(d=this.b[b]){var e=d.w;d.w=a;this.O==e&&(this.O=null,window.setTimeout(browser.tabs.remove.bind(browser.tabs,e),250));mb(this,e);browser.tabs.get(a,this.V);c||this.ia(b)}c&&browser.tabs.reload(a)};n.pb=function(a,b){var c=b.newWindowId,d=this.s,e;for(e in d)(e=d[e])&&e.tabId==a&&(e.v=c);mb(this,a,!0)};
function qb(a,b,c,d,e){a.i&&a.P(4294967295);var f=a.b[b];f&&f.w==c&&(d&&(f.za=d),e&&(f.ya=e),mb(a,c),a.Ba(b,d||e,!1,250))}function wb(a,b){var c=a.f[b];if(c){var d=c.da;c.la=!1;c.da=null;c.Oa&&W(a,c);d&&d.abort()}}n.mb=function(a,b){if(4==a.readyState){var c=[b,0],d={};200==a.status&&(d[115]=a.response);N(this,16,1,48,c,d);wb(this,b)}};
function xb(a,b){var c=a.c;if(!c[-9]||b.o)return 1;if(b.i)return b.h=2052,3;var d=b.C,e=b.f;if(e&&c[-4]||c[9].test(d.hostname)||c[19].test(d.href))return 1;var f=b.I=Z(d.pathname),g=c[1];if(b.u&&2==(b.g&7)){if(d.pathname.endsWith("/")||c[21].test(d.pathname)||!(g.test(f)||a.m&&!c[20].test(f)))return 1;b.h=8;return 3}var h=c[18],k=d.search?null:f,m=na.includes(b.type),l=!b.u,p=!m&&h.exec(d.href);if(p)for(var r=h.Cb,u=h.Eb,z=h.Db,A=h.Fb,h=1;h<p.length;++h)if(p[h]){var r=r[--h],w,p=0;if(e&&!r.includes("S")||
l&&r.includes("D"))return 1;r.includes("G")&&(w=!0,p|="GET"==b.method);r.includes("P")&&(w=!0,p|="POST"==b.method);if(w&&!p)break;var p=A[h],C,H,K;if(p){p=p.exec(d.href);if(!p)break;d=z[h];if(z=d.F)K=!0,H=p[z];if(z=d.T)K=!0,C=p[z]}C||(C=Z(H)||r.includes("T")&&(K=!0,f)||u[h]);if(C?!g.test(C):K)break;b.h=16777224;return 3}return k&&(m&&c[2].test(k)||e&&c[4].test(k))?1:6}
function yb(a,b){if(b.L)return a.X(6,b),6;var c=b.statusCode;if(200!=c&&206!=c)return 1;var d=Y(b.responseHeaders,"Content-Type"),e=Y(b.responseHeaders,"Content-Disposition"),f=zb(d).toLowerCase(),c="attachment"==zb(e).toLowerCase(),g=b.tabId,h=b.f,k=b.K;if(k&&!c&&"text/html"==f){if(b.c){var m=a.h[[g,b.frameId]];m&&(m.f=!0);a.X(5,b)}return 1}if(h?b.o:b.m)return 1;if(a.m&&k&&c)return b.h=16,3;var l,p,r,u,z,A,w,C,H=a.c,k=b.C,K=k.hostname,L=k.pathname,e=(d=Ab(e,"filename")||Ab(d,"name"))&&Z(d);if(d)if(e)b.G=
d,w=C=!0;else if(!h)return 1;C||(d=L.split("/").pop(),(e=b.I||Z(d))&&e.toLowerCase()==f.split("/").pop()&&(w=!0));if(!w){var F=H[10].test(f),M=Ja[f];M&&(M=M.split("|"),e&&M.includes(e)?w=!0:(h?F:e)||(e=M.shift(),w=!0));e&&!w&&(c||F||!M&&!va.test(e))&&(w=!0)}if(h){M=Za(a,K);F=a.D[M];switch(M){case 1:if(F[111].test(L))l=w=!0;else if(F[112].test(L)&&"text/xml"==f)p=!0;else if(F[115].test(L+k.search)&&"application/json"==f)z=!0;else if(F[113].test(L)&&"application/x-www-form-urlencoded"==f||F[114].test(L)&&
"video/vnd.mpeg.dash.mpd"==f)r=!0;break;case 2:(K=F[111].exec(L+k.search)||F[111].exec(L))&&"application/x-javascript"==f?(f=F[112].exec(b.a.j))&&K[1]!=f[1]||(r=!0):c&&"image"==b.type&&"MP4"==e&&(A=!0);break;case 3:"M4S"==e&&(w=!0),K==F[111]&&F[112].test(L)&&"application/json"==f&&(r=!0)}w&&("M3U8"==e||"F4M"==e||a.Ea&&"MPD"==e?r=!0:"F4F"==e&&(d.endsWith("Seg1-Frag1")||d.endsWith("Seg1-Frag2")||d.includes("Seg1-Frag2_"))&&(u=!0));"ASF"==e&&((f=Y(b.responseHeaders,"Content-Length"))&&102400>=parseInt(f)&&
(A=!0),"DCLK-AdSvr"==Y(b.responseHeaders,"Server")&&(A=!0))}if(A)return 1;w&&(h&&H[3].test(e)?l=!0:h&&H[4].test(e)?b.m=!0:!b.m&&H[1].test(e)&&(m=!0));if(l){var ab,bb;if(A=H[11])A.test(k.hostname)?l=!1:(ab=a.a[g])&&(bb=ab.j)&&A.test((new URL(bb)).hostname)&&(l=!1)}r||u?"POST"!=b.method||b.b?(p=new XMLHttpRequest,p.responseType=u?"blob":"text",b.da=p,p=!0):p=!1:z&&(p=b.la=!0);if(!m&&!l&&!p)return 1;w&&(b.s=e);C&&(b.G=d);b.c|=p;b.h=l||p?256:16|(h?4096:0)|(C||c?0:8388608);return m?4:l?2:5}
n.X=function Bb(b,c,d,e,f){var g=c.url,h=c.g,k=1==(h&7),m=c.requestHeaders;if(null==e&&k&&(f=Y(m,"Cookie"),null==f))return S(g,Bb.bind(this,b,c,d,!0)),!0;J(f)&&(f=T(f));var l=c.id,p=c.a&&c.a.id,r=c.timeStamp,u=c.h,z=c.responseHeaders;e=c.D;var A=d&&d.ip;d=0;3==Cb(A,".")?u|=33554432:2<Cb(A,":")&&(u|=4194304);h&16&&(u|=2097152);"POST"==c.method&&(u|=512);x&&4>b&&(d|=1);c.c&&c.da&&(d|=1);c.c&&5!=b&&(d|=32);c.f&&(d|=16);h=[l,p,Math.floor(r/1E3),Math.floor(r%1E3*1E3),h&7,b];l={};l[6]=R(g,k&&4>b);l[17]=
c.S;l[4]=c.s;l[100]=c.G;l[8]=u;l[122]=this.l;l[11]=Db(m);l[13]=Db(z);l[18]=Db(e);c.b&&(l[14]=vb(c.b,Y(m,"Content-Type")));c.B&&(l[19]=vb(c.B,Y(e,"Content-Type")));if(null==m){b=this.h;g=[c.tabId,c.frameId];do g=(k=b[g])&&k.a,k=k&&k.j,"about:blank"==k&&(k=null);while(!k&&g);l[50]=k;l[51]=f;l[54]=navigator.userAgent}x&&(l[122]=Sa(this,c.proxyInfo,Y(m,"Proxy-Authorization")),l[55]=Sa(this,c.H,Y(e,"Proxy-Authorization")));if(c=this.a[c.tabId])l[7]=c.j,l[110]=c.title;return N(this,13,1,d,h,l)};
n.ja=function Eb(b,c,d,e,f){if(void 0===b)c.resolve=e,c.reject=f;else return b=this.X(b,c,d),x&&b?new Promise(Eb.bind(this,void 0,c,null)):W(this,c,b)};
function W(a,b,c){var d=a.f,e,f;if(J(b))e=b.requestId;else if(!(b=d[e=b]))return;if(c){var g=0<b.statusCode,h=a.h[[b.tabId,b.frameId]],k=h&&h.c&&"main_frame"==b.type;k||0>b.tabId?(k&&browser.tabs.remove(b.tabId),f={cancel:!0}):t&&g&&587202560>y?(f=[{name:"Connection",value:"close"},{name:"Content-Type",value:"multipart/related"},{name:"Content-Length",value:"0"}],f={responseHeaders:f}):t||(x?g&&939524096>y:g)?f={redirectUrl:a.B||(h&&!h.h?wa+"?back=1":wa)}:f={cancel:!0}}(a=b.resolve)&&void 0!==c&&
(b.resolve=b.reject=null,a(f||{}));if(c=b.reject)b.resolve=b.reject=null,c();if(b.da||b.la)return b.Oa=!0,f;delete d[e];v&&delete d[b.id];return f}n.eb=function(a){var b=this.c;(this.m||a.byExtensionId)&&b[-9]&&!this.ka&&(this.H[a.id]=a,browser.downloads.pause(a.id,U))};
n.fb=function(a,b){var c=a.id,d=this.H;if(!d[c])return!1;var e=this.c,f=a.finalUrl,g=new URL(f),h=a.s=Z(a.filename||g.pathname);if(!(a.i=this.Y)&&!this.m&&(!e[1].test(h)||e[9].test(g.hostname)||e[19].test(g.href)))return ub(this,c);a.Ab=b;d[c]=a;return 1==fb(f,!0)&&(c=new O(this.Qa,a),S(f,P(c,1)),a.url!=f&&S(a.url,P(c,2)),Q(c))?a.Na=!0:this.Qa(a)};
n.Qa=function(a,b,c){var d=a.id,e=a.finalUrl,f=fb(e,!0),g=Date.now(),h=16|(a.i?2048:0),f=[d,0,Math.floor(g/1E3),Math.floor(g%1E3*1E3),f,2],g={};g[6]=R(e);g[4]=a.s;g[103]=a.totalBytes||null;g[100]=a.filename||null;g[127]=a.mime||null;g[8]=h;g[50]=a.referrer||null;g[51]=T(b);g[54]=navigator.userAgent;g[122]=this.l;a.url!=e&&(g[17]=R(a.url),g[56]=T(c));return N(this,13,1,129,f,g)||ub(this,d)};
function ub(a,b,c){var d=a.H[b];if(d){if(c)return browser.downloads.cancel(b,U),!0;d.Na&&(d.Na=!1,d.Ab());browser.downloads.resume(b,U);delete a.H[b]}return!1}n.sb=function(a){var b=new URL(a.url);if(b.search.startsWith("?d=")){var c=this.a[a.tabId];this.ha("idmreg:"+b.href.substr(b.protocol.length),null,c&&c.j);W(this,a.requestId);return{redirectUrl:wa+"?register=1"}}};
n.tb=function(a){var b=a.type,c=a.tabId,d=a.frameId;if(!za||D.includes(b)){var e=a.url,f=a.method,g=fb(e);if(g&&("GET"==f||"POST"==f)&&e!=this.B){var h=a.requestId,k=this.f[h],m=this.ka,l="POST"==f,f=0>c&&0>d,p=!f&&b.endsWith("_frame"),c=!f&&this.a[[c,d]];x&&l&&k&&Ca(k.statusCode)&&(a.method="GET",l=!1);p&&(d=Wa(this,a,!1),d.b!=h&&(d.b=h,d.i=e,d.f=!1),d.h=l);if(c||p||f||k){if(!m&&l&&a.requestBody){h=a.requestBody;if(l=h.raw)for(d=0;d<l.length&&(l[d].bytes||(l=null));d++);if(!(l||h.formData||t&&h.error))return}h=
new URL(e);h.hash="";a.C=h;a.g=g;a.i=this.Y;a.o=m;a.K=p;a.J=f;a.f=f||oa.includes(b);a.c=this.Fa.test(e);a.b=a.requestBody;a.a=c;a.u=g&8||x?a.proxyInfo&&"https"==a.proxyInfo.type:this.W[g];k&&(a.id=k.id,a.a=c=k.a,a.i=k.i,a.o=k.o,a.S=k.S||k.url,a.D=k.D||k.requestHeaders,a.B=k.B||k.b,x&&(a.H=k.H||k.proxyInfo));if(a.f&&"image"!=b){b=this.I;for(g=b.zb;30<=g.length;)delete b[g.shift()];b[e]=c;g.push(e)}switch(a.l=xb(this,a)){case 1:a.m=!0;case 6:b=this.f;g=a.requestId;b[g]!==a&&(b[g]=a,e=a.id,e||(e=a.id=
v?String(this.ab++):g),e!=g&&(b[e]=a,a=this.h[[a.tabId,a.frameId]]))&&(a.b=e);break;case 3:return this.ja(3,a)}}}}};
n.ub=function(a){var b=this.f[a.requestId];if(b){a=b.requestHeaders=a.requestHeaders;if(b.J){var c=Y(a,"Referer"),d;if(c)for(var e=Fb(this.s);(d=e.shift())&&d.j!=c;);if(d)b.a=d;else return W(this,b)}x&&b.proxyInfo&&Sa(this,b.proxyInfo,Y(a,"Proxy-Authorization"),!0);if("POST"==b.method&&(!b.b||b.b.error&&0<Y(a,"Content-Length")))return W(this,b);a:{if(x&&b.u){if(b.m||b.f){d=6;break a}d=this.c;a=b.C;if((c=b.I)&&!a.search&&d[1].test(c)){b.h=8;d=4;break a}}d=6}switch(b.l=d){case 4:return this.ja(1,b)}}else if(0>
a.tabId&&"xmlhttprequest"==a.type&&(a.initiator?a.initiator==xa:a.originUrl?a.originUrl==ya:1)){b=a.requestHeaders;d={};a=!1;for(c=0;c<b.length;c++){var e=b[c],f=e.name.toLowerCase();f.startsWith("x-idm-")?d[f.substr(6)]=a=!0:"origin"==f&&e.value==xa&&(d[f]=a=!0)}if(a){for(c=0;c<b.length;c++)e=b[c],f=e.name.toLowerCase(),d[f]?b.splice(c--,1):f.startsWith("x-idm-")&&(e.name=e.name.substr(6));return{requestHeaders:b}}}};
n.wb=function(a){var b=this.f[a.requestId];if(b){var c=b.statusLine=a.statusLine,d=b.statusCode=a.statusCode||parseInt(c.split(" ",2).pop()),e=a.responseHeaders;if(204==d&&c.includes(" IDM "))return W(this,b,!0);if("image"==b.type&&(c=Y(e,"Content-Type"))&&c.toLowerCase().startsWith("image/"))return W(this,b);"quic"==Y(e,"Client-Protocol")?b.g|=16:(c=Y(e,"Alternate-Protocol"))&&c.endsWith(":quic,p=0")&&"chunked"!=Y(e,"Transfer-Encoding")&&(b.g|=16);b.L=Ba(d);b.responseHeaders=e;switch(b.l=yb(this,
b)){case 1:return W(this,b);case 3:return this.ja(3,b,a);case 4:return this.ja(2,b,a)}if(b.la)return e.push({name:"X-IDM-Request-ID",value:b.id.toString()}),{responseHeaders:e}}};n.xb=function(a){if(a.type.endsWith("_frame")&&(200==a.statusCode||304==a.statusCode)){var b=this.h[[a.tabId,a.frameId]];b&&(b.j=a.url,b.S=b.i)}if(b=this.f[a.requestId])2==b.l?this.X(4,b,a):5==b.l&&this.X(5,b,a),W(this,b)};n.vb=function(a){W(this,a.requestId)};
n.qa=function(a,b,c,d,e){function f(a){a&&(this.O=a.id)}if(void 0===a&&(this.oa=!1,a=new O(this,!0),browser.storage.local.get("version",P(a,1)),(x?1124073472<=y:v?1073741824<=y:1)&&browser.extension.isAllowedIncognitoAccess(P(a,2)),t&&browser.management.get("jeaohhlajejodfjadcponpnjgkiikocn",P(a,3)),ca&&"ngpampappnmepgilojfohadhhmbhlaek"!=browser.runtime.id&&browser.management.get("ngpampappnmepgilojfohadhhmbhlaek",P(a,4)),Q(a)))return;a=browser.runtime.getManifest();a=a.version||"";J(b)&&(b=b.version||
"");c=null!=c&&!c;J(d)&&(d=d.enabled&&d.id);d&&browser.management.setEnabled(d,!1);J(e)&&(e=e.enabled&&e.id);e&&browser.management.setEnabled(e,!1);d=this.Ka;e=this.Ja;if(a&&a!=b&&null!=b&&(browser.storage.local.set({version:a}),!b||!d||e)){a="current="+escape(a);b&&(a+="&previous="+escape(b));d&&(a+="&manager="+(d?[d>>24&255,d>>16&255,d>>8&255,d&255].join("."):""));e&&(a+="&update=1");c&&(a+="&incognito=1");x&&(a+="&mzffox=1");da&&(a+="&opera=1");if(v||ca)a+="&msedge=1";browser.tabs.create({url:browser.runtime.getURL("welcome.html?"+
a)},f.bind(this))}};function rb(a,b,c){b||(b=(b=ta.exec(c[13]))?b[1]<<24|b[2]<<16|b[3]<<8:0);a.Ka=b;a.Ja=102825984>b}function pb(a,b){var c=browser.i18n.getMessage(b);x?browser.tabs.executeScript(a,{code:'window.alert(unescape("'+escape(c)+'")); true;'},U):window.alert(c)}n.A=function(a,b,c){var d=aa(arguments);if(x||v)d[2]=function(){return c.apply(null,arguments)};this.Da.push(d);b.addListener.apply(b,d.slice(2))};
function O(a,b){this.caller=a instanceof Function?a:arguments.callee.caller;this.f=a instanceof Function?null:a;this.b=aa(arguments,1);this.a=0;this.g=this.c=!1}function P(a,b){a.a++;return a.h.bind(a,b)}function Q(a){return a.a?a.c=!0:a.g?(a.caller.apply(a.f,a.b),!0):!1}O.prototype.h=function(a,b){browser.runtime.lastError;this.b[a]=b;0==--this.a&&(this.c?this.caller.apply(this.f,this.b):this.g=!0)};function Ua(a){return browser.i18n.getMessage(a)||a}
function R(a,b){var c=a.lastIndexOf("#");c>a.indexOf("?")&&"!"!=a[c+1]&&(a=a.substr(0,c));b&&!ua.test(a)&&(a="idmfc"+a);return a}function S(a,b){if(v&&a.startsWith("ftp:"))b([]);else{var c={url:a};ga&&(c.firstPartyDomain=null);browser.cookies.getAll(c,b)}}function T(a){var b="";if(a&&a.length)for(var c=0;c<a.length;c++)b&&(b+="; "),b+=a[c].name,b+="=",b+=a[c].value;return b}
function Db(a){if(!a||!a.length)return null;for(var b="",c=0;c<a.length;c++)b+=a[c].name,b+=": ",b+=a[c].value,b+="\n";return b}function Y(a,b){if(!a)return null;b=b.toLowerCase();for(var c=0;c<a.length;c++)if(a[c].name.toLowerCase()==b)return a[c].value;return null}
function Ab(a,b){if(!a)return null;var c,d,e=a.split(";");for(b=b.toLowerCase();e.length;){var f=e.shift(),g=f.indexOf("=");if(0<g){var h=f.substr(0,g).trim().toLowerCase(),k="*"==h[h.length-1];if(k)h=h.substr(0,h.length-1).trimRight();else if(d)continue;if(h==b){f=f.substr(g+1).trim();g=f.length-1;if('"'==f[0]?'"'==f[g]:"'"==f[0]&&"'"==f[g])f=f.substring(1,g);if(k){if(f=f.split("'",3),k=f.shift().toLowerCase(),(g="utf-8"==k||"utf8"==k)||!d)if(c=unescape(f.pop()),d=k,g)break}else c=unescape(f)}}else 0>
g&&null==c&&f.trim().toLowerCase()==b&&(c="")}return c}function zb(a){var b=/[;,]/;return a&&(a=a.split(b,1).shift().trim())&&!a.includes("=")&&unescape(a)||""}
function vb(a,b){var c=a.raw;if(c){for(var d=String.fromCharCode,e="",f=0;f<c.length;f++){var g=c[f].bytes;if(!g)return null;for(var g=new Uint8Array(g),h=g.length,k=0;k<h;k++)e+=d(g[k])}return e}c=a.formData;if(!c)return null;f=zb(b).toLowerCase();e=[];if(f&&"application/x-www-form-urlencoded"!=f)if("multipart/form-data"==f){(g=Ab(b,"boundary"))||(g="----WebKitFormBoundary"+Math.random().toString(36).substr(2));for(d in c)for(h=c[d],f=0;f<h.length;f++)e.push("--",g,'\r\nContent-Disposition: form-data; name="',
d,'"\r\n\r\n',h[f],"\r\n");e.push("--",g,"--\r\n")}else return null;else for(d in c)for(h=c[d],d=d.split(" ").map(encodeURIComponent).join("+"),f=0;f<h.length;f++)e.length&&e.push("&"),e.push(d,"=",h[f].split(" ").map(encodeURIComponent).join("+"));return e.join("")}function Z(a){return(a=sa.exec(a))?a.pop().toUpperCase():""}function fb(a,b){var c=a.split(":",1).shift().toLowerCase(),c=Ia[c]||0;return b?c&7:c}
function Gb(a,b){browser.runtime.lastError;if(void 0===a){var c=navigator.userAgent,d=c.match(/\b(?!(?:Safari|Chrome|Gecko)\/)\w+\/(\d+)(?:.(\d+))?(?:.(\d+))?(?:.(\d+))?\b(?!.*[()])/);if(c=x?d:c.match(/\bChrome\/(\d+)\.(\d+)\.(\d+)\.(\d+)\b/)){y=c[1]<<24|c[2]<<22|c[3]<<8|c[4];ea=c[0];fa=d?d[0]:c[0];browser.runtime.getBrowserInfo&&browser.runtime.getBrowserInfo(Gb);try{x&&browser.privacy.websites.firstPartyIsolate.get({},Gb)}catch(e){}if(d=browser.webRequest.ResourceType)if(d.MEDIA&&(D.push("media"),
oa.push("media")),d.OBJECT_SUBREQUEST||(za=x&&922746880>y))D.push("object_subrequest"),oa.push("object_subrequest")}t&&browser.management.get("clhiejnehegdfknplplojohghjaklbae",Gb.bind(this,{}))}else"version"in a?(c=a.version.split(/\D+/),y=c[0]<<24|c[1]<<22|c[2]<<8|c[3],ea=fa=a.name+"/"+a.version):"value"in a?ga=a.value:b&&(ha=!0)}
function X(a,b,c,d,e,f){if(b=b[c]||f)try{b=b.replace(/^\|+|\|+(?=\||$)/g,"").replace(/\./g,"\\."),b=e?b.replace(/\?/g,"[^/\\\\]").replace(/(^|[^*])\*(?!\*)/g,"$1[^/\\\\]*").replace(/\*\*/g,".*?"):b.replace(/\?/g,".").replace(/\*/g,".*?"),d&&(b=b.replace(/~/g,"(?:\\b[^.]+\\.)?")),b=RegExp("^(?:"+b+")$",e?"":"i")}catch(g){b=null}a[c]=b||ka}
function sb(a,b,c,d,e){b=b[c];var f=[],g=[],h=[],k=[];if(b)try{b=b.replace(/^\|+|\|+(?=\||$)/g,"").replace(/[.?+(){}[\]]/g,"\\$&").replace(/\*(?=[^:/|&]*:\/\/)/g,"\\w%%").replace(/(:\/\/[^:/]*?)~/g,"$1(?:\\b[^./]+\\.)?").replace(/\\\?(?=\||$)/g,"(?:$&.%%)?");if(d){for(var m=b.replace(/(^|\|)(?:([A-Z]+)?(?:#(\w+))?!)?[^|]+/g,"$1$2|$3").split("|");m.length;)f.push(m.shift()),g.push(m.shift());b=b.replace(/(^|\|)[\w#]+!/g,"$1")}if(e){for(var m=b.replace(/(^|\|)(?:(?=[^|]+?<[A-Z]:.*?>)|[^|]+)/g,"$1").split("|"),
l=/<([A-Z]):(.*?)>/g,p={F:"[^/\\?#&;]%%",T:"[^/\\?#&;.]%%"},r,u=0;m.length;++u)if(r=m.shift()){for(var z={},A=["^"],w="",C,H=1;C=l.exec(r);++H)z[C[1]]=H++,w=RegExp.rightContext,A.push(RegExp.leftContext,"(",C[2].replace(/\*/g,p[C[1]]||".%%?"),")");A.push(w,"$");h[u]=z;k[u]=RegExp(A.join("").replace(/\*/g,".*?").replace(/%%/g,"*"))}b=b.replace(l,"(?:$2)")}b=b.replace(/\*/g,".%%?").replace(/%%/g,"*");b=d||e?RegExp("^(?:("+b.replace(/\|/g,")|(")+"))$"):RegExp("^(?:"+b+")$")}catch(K){b=null}a[c]=b||(b=
/(?!)/);d&&(b.Cb=f,b.Eb=g);e&&(b.Db=h,b.Fb=k)}function Cb(a,b){var c=0;if(a)for(var d=0;0<=(d=a.indexOf(b,d));d++,c++);return c}function U(a){browser.runtime.lastError;a;!0}var db=Function.bind.bind(function(a){return this[a]}),tb=Function.bind.bind(function(a){return a[this]}),J=Object.isExtensible;try{J(null)}catch(a){J=function(b){return b instanceof Object}}var Fb=Object.values;Fb||(Fb=function(a){return Object.keys(a).map(db(a))});
String.prototype.startsWith||(String.prototype.startsWith=function(a,b){return this.substr(b||0,a.length)===a});String.prototype.endsWith||(String.prototype.endsWith=function(a,b){b=(null==b||b>this.length?this.length:b)-a.length;return 0<=b&&this.lastIndexOf(a,b)==b});Array.prototype.fill||(Array.prototype.fill=function(a){for(var b=this.length;b--;)this[b]=a;return this});
var Ta=[[!0,-11,"menu_download_link","link,image",G.prototype.sa],[!0,-11,"menu_download_link","page,frame,editable",G.prototype.sa,qa],[!0,-11,"menu_download_selected","selection",G.prototype.La],[!0,-12,"menu_download_all","page,frame,editable",G.prototype.La],[t,-11,"menu_download_item","link",G.prototype.sa,["chrome://downloads/*"]]];Gb();new G;

