var n;typeof browser=="undefined"&&(browser=chrome);var aa=!0;
const q=(aa=!1,chrome.runtime.getURL("").startsWith("chrome-")),x=aa||chrome.runtime.getURL("").startsWith("moz-"),ba=aa||navigator.userAgent.includes("Edg/"),ca=navigator.userAgent.includes("OPR/"),da=navigator.userAgent.includes("YaBrowser/"),ea=Boolean,A=Object.values,C=RegExp.prototype.test,fa=RegExp.prototype.exec,ha=Array.isArray,ia=Array.from,ja=Array.prototype.includes,D=Math.floor,F=Math.random,G=Object.isExtensible,ka=Function.apply.bind(Array.prototype.push),ma=Function.apply.bind(String.fromCharCode,
null),na=Function.call.bind(String.prototype.charCodeAt),oa=String.fromCharCode,pa=Function.bind.bind(function(a){return this[a]}),qa=Function.bind.bind(function(a){return a&&a[this]}),ra=["date","content-type","content-length"];function sa(a){return ma(a instanceof ArrayBuffer?new Uint8Array(a):a)}function ta(a){return G(a)?a.source.replaceAll("\\/","/"):a}function ua(a){return a.replace(/[a-z]/gi,function(b){return oa((b=na(b))+((b&31)>13?-13:13))})}const I={};I[-1]=[2,[111,112],[111]];
I[1]=[2,[115,101,116,117,124,118,119,120,121,127,131,132,123,125,133,126,129,130,134,135],[115,111,112,113,114]];I[2]=[2,[114,113,113,115,116,117,118,122,119,125,126,121,127,124,120,123,112],[111,112,114]];I[3]=[null,[113,114,115,116,117],[112]];I[4]=[2,[111,101,113,112,114,118,119,124,115,116,117,120,121,122,123],[111]];I[5]=[null,[111,112,113],[111]];I[6]=[null,[],[111]];
const va={16:1,17:2,18:4,45:8,46:16},wa={http:1,https:9,ftp:2,ftps:10,idmreg:12,idmdwnlmfv9:33},ya=C.bind(/^(?:https?|socks[45])$/),za={direct:2,auto_detect:3,system:4,pac_script:5,fixed_servers:7},Aa={"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|MPD","application/gzip":"GZ","application/javascript":"JS","application/json":"JSON","application/json+protobuf":"JSON","application/msword":"DOC|DOCX|DOT|DOTX","application/ocsp-response":"OCSP","application/octet-stream-m3u8":"M3U8","application/pdf":"PDF","application/pkix-crl":"CRL","application/torrent":"TORRENT|BTT","application/ttaf+xml":"DFXP","application/ttml+xml":"TTML|TTML2","application/vnd.apple.mpegurl":"M3U8","application/vnd.yt-ump":"UMP","application/zip":"ZIP",
"application/x-7z-compressed":"7Z","application/x-aim":"PLJ","application/x-bittorrent":"TORRENT|BTT","application/x-chrome-extension":"CRX","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|M4S",
"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|M4S","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/avif":"AVIF","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"};
var Ba,Ca,Da,Ea;const J=globalThis,Fa=x?69:66,Ga=x?220:150,Ha=browser.runtime.id,M=browser.runtime.getManifest();var Ia=M.permissions.includes("notifications")||null;const Ja={16:"images/logo16.png",32:"images/logo32.png"},Ka={16:"images/logo16x.png",32:"images/logo32x.png"},La=["127.0.0.1:1001","0.1.0.1:1001"],Ma=RegExp("(?!)"),Na=["main_frame","sub_frame"],Oa=["object","image"];var Pa=Oa.concat("xmlhttprequest","media"),N=Na.concat(Oa,"xmlhttprequest","media","other");
const O=["*://*/*"],Qa=["ftp://*/*"],Ra=O.concat(Qa,"file:///*",q?"about:blank":[]),Sa=O.concat(q?"about:blank":[]),Ta=q&&btoa(F().toString().substr(2,9)),Ua=browser.runtime.getURL("welcome.html?"+(Ta?`auth=${Ta}&`:"")),Va=browser.runtime.getURL("").slice(0,-1),Wa=location.href,Xa=ca||da,Ya=ua("KZYUggcErdhrfg|bcra|fraq|frgErdhrfgUrnqre|hcybnq|ybnqraq|erfcbafrGrkg|srgpu|urnqref|obql|grkg|wfba|trgErnqre|cvcrGuebhtu|Urnqref|npprcg|*/*|nccyvpngvba/iaq.g1p|Erfcbafr|hey|trg"),Za=ua("|Erfcbafr|hey|trg"),
$a=ua("|grr|ernq|oybo|neenlOhssre|olgrf|trgBjaCebcreglQrfpevcgbe|qrsvarCebcregl"),ab=ua("|pybar|yratgu"),bb=C.bind(/^(?:chrome|about|chrome-extension|chrome-search|ms-browser-extension|ms-appx-web|moz-extension):/),cb=C.bind(/^(?:application\/(?:json|x-javascript)|text\/(?:javascript|plain))$/),db=C.bind(/^(HTM|HTML|CGI|PHP|ASP|ASPX|JSP|JSPX)$/i),eb=C.bind(/^(MPD|M3U8|F4M)$/i),fb=C.bind(/^ftp:|^idmreg:|\bidman|\binternetdownloadmanager\b/i),gb=C.bind(/^[GPTSDVACRHX]*$/),hb=fa.bind(/^(.*?)(,\s*)?\bapplication\/vnd\.t1c\.(\w+)-([^\s,]+)(?:,\s*)?(.*)$/),
ib=fa.bind(/\.([^.\\/]*?)(?:\.[0-9.]+)?$/),jb=fa.bind(/^v(\d+)\.(\d+)(?:b(\d+))?\b/),kb=ja.bind([301,302,303,307,308]),lb=ja.bind([301,302,303]),mb=/[:,;]/,nb=/[,;]/,ob=[null,"debug.js","document.js"],pb=C.bind(RegExp("messaging host not found|no such native application|application is not installed","i"));
function qb(a,b,c,d,e,f,g,k){if(a){var h=["MSG#",a,"#",b,"#",c,"#",d];this.l=a;this.type=b;this.A=c;this.j=d;this.g=e||[];this.o=h;this.D=g;this.C=k;if(e)for(let m of e)h.push(":",m||0);if(f)for(let m in f)if(parseInt(m)&&(g=m,a=f[m],a!=null&&!this.m))switch(b=this.o,c=this.D,e=this.C,d=c&&e,e=e?"/":":",k=a instanceof String?"string":typeof a,b.push(",",g,"="),k){case "string":b.push(rb(a),":",a);break;case "number":b.push(a);break;case "boolean":b.push(a?1:0);break;case "object":if(a instanceof Array){g=
b.length;h=k=0;for(let l of a)l instanceof ArrayBuffer||l instanceof Uint8Array?(c?(l=sa(l),k+=l.length):k+=l.byteLength,++h):(l=l.toString(),k+=rb(l)),b.push(l);h&&d?(a=btoa(b.splice(g).join("")),b.push(a.length,"%",a)):b.splice(g,0,k,h?e:":")}else a instanceof ArrayBuffer||a instanceof Uint8Array?d?(a=btoa(sa(a)),b.push(a.length,"%",a)):c?(a=sa(a),b.push(a.length,":",a)):b.push(a.byteLength,e,a):a instanceof Blob&&b.push(a.size,e,a)}}else this.v=new FileReader}
function sb(){this.g=sb.prototype.B++}sb.prototype.B=1;function tb(a,b,c,d){this.id=a;this.port=b;c&&(this.h=c=c.toLowerCase(),this.i=c=="iframe");d&&(this.j=d)}tb.prototype.g=0;function P(a,b){return`${a},${b}`}function ub(a,b,c){this.id=P(b,a);this.h=c==null||c<0?null:P(b,c)}function vb(){}function wb(a,b,c){a.m?a.h(a):(b.g=c||0,b.h=0,a.v.onload=a.B.bind(a,b),xb(a,b,0,50))}
qb.prototype.B=function(a){for(var b=this.v.result;;)switch(a.h){case 0:var c=b.search(mb);if(c<=0)return this.h(this);var d=b[c],e=b.slice(0,c++).split("#",6);if(e.length!=5||e[0]!="MSG")return this.h(this);this.l=parseInt(e[1]);this.type=parseInt(e[2]);this.A=parseInt(e[3]);this.j=parseInt(e[4]);b=b.slice(c);a.g+=c;a.h=d==":"?1:d==","?2:5;break;case 1:c=b.search(nb);if(c<=0)return c?xb(this,a,b.length,100):this.h(this);d=b[c];e=this.g=b.slice(0,c++).split(":");for(var f=0;f<e.length;f++){let g=
e[f];e[f]=g.includes(".")?parseFloat(g):parseInt(g)}b=b.slice(c);a.g+=c;a.h=d==","?2:5;break;case 2:c=b.search(mb);if(c<=0)return c?xb(this,a,b.length,25):this.h(this);d=b[c];f=b.slice(0,c++).split("=",3);if(f.length!=2)return this.h(this);e=parseInt(f[0]);f=parseInt(f[1]);a.g+=c;if(d==":"){a.j=e;a.i=f;a.h=3;b=a;a=a.i;c=b.g;b=b.slice(c,c+a);b.size==a?this.v.readAsText(b):this.h(this);return}this[e]=f;b=b.slice(c);a.h=d==","?2:5;break;case 3:return this[a.j]=b,a.g+=a.i,a.h=4,xb(this,a,0,21);case 4:switch(b[0]){case ",":a.h=
2;b=b.slice(1);break;case ";":a.h=5;break;default:return this.h(this)}a.g++;break;case 5:this.m=!0;this.u(this);a.size>a.g&&(b=new qb,b.u=this.u,b.h=this.h,wb(b,a,a.g));return}};function xb(a,b,c,d){let e=b.g;c=e+c;b.size>c?a.v.readAsBinaryString(b.slice(e,c+d)):a.h(a)}
function Q(){let a=this.constructor.prototype;for(let b in a)b.startsWith("_")||b=="constructor"||(this[b]=a[b].bind(this));this.H=0;this.S=null;this.P=this.ta=0;this.hb=1;this.I=this.C=null;this.Ja=M.version||"";this.jb="";this.ua=0;this.la=!1;this.N=this.B=this.v=this.ca=null;this.Va=this.ia=!1;this.K=!x;this.kb=this.Sa=!0;this.Ta=this.u=this.R=null;this.ib=this.ka=this.ma=!1;this.gb=!0;this.oc=1;this.Fa=this.A=this.Y=null;this.Ga=1;this.lb=0;this.Ra=this.Ia=null;this.Ua=Ma;this.aa=[];this.Ca=0;
this.Wa=null;this.Ha=this.sa=!1;this.Z=this.J=null;this.va=Array(16);this.j={};this.m={};this.g={};this.D={};this.h={};this.$={};this.l={};this.i={};this.qa={};this.ha={};this.o={};this.ja={};this.ja.$b=[];this.Pa=[];R(this,!1);browser.action.onClicked.addListener(this.pb);x&&browser.contextMenus.onShown.addListener(this.Xa);x&&browser.runtime.onInstalled.addListener(this.sb);browser.contextMenus.onClicked.addListener(this.Xa);browser.runtime.onMessage.addListener(this.tb);browser.windows.onCreated.addListener(this.eb);
browser.windows.onRemoved.addListener(this.fb);browser.windows.onFocusChanged.addListener(this.Xb);q&&browser.windows.onBoundsChanged.addListener(this.Wb);browser.tabs.onActivated.addListener(this.Mb);browser.tabs.onUpdated.addListener(this.Pb);browser.tabs.onAttached.addListener(this.Nb);browser.tabs.onRemoved.addListener(this.Ob);yb(this);zb(this)}n=Q.prototype;n.sb=function(a){this.Ja=a.version=M.version;this.nc=a};
function Ab(a,b){b&&browser.storage.local.set({consent:a.Ja});a.u=null;a.Aa(5);a.K=!0;Bb(a)}n.tb=function(a,b){switch(a[0]){case 38:a[1]&&this.la&&browser.storage.local.set({silent:!0});browser.tabs.remove(b.tab.id);break;case 44:a=new URL(a[1]);a.search.startsWith("?d=")&&this.pa("idmreg:"+a.href.substr(a.protocol.length));break;case 42:Ab(this,!0);break;case 43:browser.management.uninstallSelf({showConfirmDialog:!0})}};
n.Xa=function(a,b){let c=a.menuItemId;if(c!=null)return Cb[c][4].apply(this,arguments);x&&b&&Db(this,b.id,!0,!1,!0)};n.pb=function(a){if(this.ib){if(this.u)return browser.windows.update(this.u,{focused:!0});var b=a.id,c=this.o[b];R(this,c,b,!0);this.ka&&(c?(this.ga(a.windowId),Eb(this,b)):Fb(this,b))}};function R(a,b,c,d){c?a.o[c]=!b:a.ib=b||d;Gb(b,c,d)}
function Gb(a,b,c){if(c||!b||!a){var d=a;x&&!b&&(a||c?browser.action.enable():browser.action.disable(),d=!0);c=a?Hb+Ib:b?Jb+Ib:c?Jb:Kb;var e=d?Ja:Ka,f=x&&b;browser.action.setTitle({title:a&&f?null:c,tabId:b});browser.action.setIcon({path:d&&f?null:e,tabId:b});a||browser.action.setBadgeBackgroundColor({color:"#606060"});browser.action.setBadgeText({text:a?f?null:"":"X",tabId:b})}}
function Bb(a){let b=a.j;browser.contextMenus.removeAll();for(let c=1;c<Cb.length;c++){let d=Cb[c];d[0]&&b[d[1]]&&browser.contextMenus.create({id:c.toString(),title:Lb(d[2]),contexts:d[3].split(","),documentUrlPatterns:d[5]||Ra,enabled:!0})}a.ka||(a.ka=!0,R(a,!0),a.M(1,browser.runtime.onConnect,a.Ib),q&&a.M(1,browser.proxy.settings.onChange,a.bb),q&&browser.proxy.settings.get({},a.bb),a.M(1,browser.webNavigation.onCreatedNavigationTarget,a.Gb),a.M(1,browser.webNavigation.onCommitted,a.ab),a.M(1,browser.webNavigation.onHistoryStateUpdated,
a.xb),Mb(a,!0),Nb(a,!0),browser.tabs.query({url:O},a.wa))}
function Nb(a,b){q&&(browser.downloads.setUiOptions||browser.downloads.setShelfEnabled(!b));b?(a.M(3,browser.downloads.onCreated,a.qb),q&&a.M(3,browser.downloads.onDeterminingFilename,a.rb),b=q&&!Ea?["extraHeaders"]:[],a.M(4,browser.webRequest.onBeforeRequest,a.cb,{urls:Qa,types:Na}),a.M(4,browser.webRequest.onBeforeRequest,a.cb,{urls:O,types:N},["requestBody"]),a.M(4,browser.webRequest.onBeforeSendHeaders,a.Rb,{urls:O,types:N},["requestHeaders"].concat(b)),a.M(4,browser.webRequest.onHeadersReceived,
a.Ub,{urls:O,types:N},["responseHeaders"]),a.M(4,browser.webRequest.onResponseStarted,a.Vb,{urls:O,types:N}),a.M(4,browser.webRequest.onErrorOccurred,a.Tb,{urls:O,types:N}),x||a.M(4,browser.webRequest.onCompleted,a.Sb,{urls:O,types:N}),x&&a.M(4,browser.webRequest.onBeforeRedirect,a.Qb,{urls:O,types:Na})):a.Aa(3,4)}
async function Mb(a,b){let c=await browser.declarativeNetRequest.getSessionRules(),d=[],e=0;if(b&&(b=a.j[17])){a={type:"redirect",redirect:{regexSubstitution:`chrome-extension://${Ha}/captured.html?register=1#\\0`}};for(let f of b.split("|"))b={regexFilter:Ob(f,3),resourceTypes:["main_frame"]},d.push({id:++e,condition:b,action:a})}(d.length||c.length)&&await browser.declarativeNetRequest.updateSessionRules({addRules:d,removeRuleIds:c.map(qa("id"))})}
n.bb=function(a){browser.runtime.lastError;if(a){var b=a.value;a=za[b.mode];var c,d;this.va.fill(void 0);if(a==5&&(d=b.pacScript))d.data&&d.data.length>5E4?a=4:(c=d.data)?(a=6,c=c.replace(/\blet\b/g,"var").replace(/,(?=(?:\s*\/\/.*?\n)*\s*[\]}])/g,"")):c=d.url,this.va.fill(!0);else if(a==7){b=b.rules;d=b.bypassList;c=Rb(this,b.singleProxy);if(!c){c=Rb(this,b.fallbackProxy);let e=Rb(this,b.proxyForHttp,1),f=Rb(this,b.proxyForHttps,9);b=Rb(this,b.proxyForFtp,2);e!=f||e!=b||e!=c&&c?(c=`${e??""};${f??
""};${b??""};${c??""}`,++a):c=e}d&&d.length&&(c+=";"+d.join(","))}b=a<5?a.toString():c?`${a}:${c}`:null;b!=this.J&&(this.J=b)}};function Rb(a,b,c){if(b){let d=b.scheme||"http",e=d=="https";a=a.va;c?a[c]=e:a.fill(e);if(ya(d))return`${d}://${b.host}${b.port?":":""}${b.port||""}`}}
function Sb(a,b,c,d){if(b){var e=b.type;if(e=="direct")return"0";e=="socks"&&(e="socks5");if(ya(e)){var f=`1:${e}://${b.host}:${b.port}`;e=="socks5"&&b.proxyDNS&&(f+="#");c||d||!(c=a.Z)||(c=c.substr(c.indexOf(";")+1||c.length));c&&(f+=`;${c}`);d&&f&&(a.Z=f);return f}}}n.za=function(a,b,c,d){let e=this.l;return b in e?e[b]:e[b]=new tb(b,a,c,d)};function Tb(a,b){a=a.i;let c=b.id;a[c]!==b&&(a[c]=b);x&&b.v&&(a[b.v]=b)}
function Ub(a,b,c,d,e){let f,g,k;G(b)?(f=b.frameId??0,g=b.parentFrameId,k=b.method&&b.id,c||=b.tabId,e||=b.url):f=b;let h=a.D[P(c,f)];h||(h=new ub(f,c,g),a.D[h.id]=h);k?(h.i!=k&&(h.i=k,h.u=e,h.l=!1,h.g&&(h.g=e.startsWith(b.initiator||b.originUrl))),h.v=b.method=="POST"):e&&(e.startsWith("about:blank")?f&&(h.g=!0):h.G=e);d!=null&&(h.refresh=d);return h}function Vb(a,b){return a.D[P(b.tabId,b.frameId)]}function Wb(a){let b=new sb;return a.$[b.g]=b}
function Xb(a,b){let c;b instanceof sb?c=b.g:b=a.$[c=b];delete a.$[c];return b}function Yb(a,b){for(let c of a.aa)if(c&&c[101].test(b))return c.X;return 0}
n.Ba=function(){var a=this.ta%(La.length+1);a<La.length?(a=this.S=new WebSocket(`ws://${La[a]}/?cid=${this.ca||0}&rnd=${F().toString().substr(2,9)}`,"plugin.v3.internetdownloadmanager.com"),a.onerror=Zb,a.onopen=this.Na,a.onclose=this.oa,a.onmessage=this.Lb,a.readyState==1?this.Na(1):a.readyState==3?this.oa():this.C=J.setTimeout(this.oa,1500,a)):(a=this.S=browser.runtime.connectNative("com.tonec.idm"),a.onDisconnect.addListener(this.oa),a.onMessage.addListener(this.zb),this.C=J.setTimeout(this.Na,
0,2))};n.Na=function(a){this.C&&(J.clearTimeout(this.C),this.C=null);this.H=G(a)?1:a;this.hb=1;this.la=!1;var b=browser.i18n.getUILanguage().replace("_","-");b=="sr"&&(b+="-Cyrl-CS");a=[113,93,Xa?1028:1031,0,16845059,this.ca,15,M.manifest_version];b={[112]:Ca,[113]:Ba,[125]:JSON.stringify(this.nc),[116]:b};S(this,2,5,Xa?0:1024,a,b)};
n.oa=function(a){this.C&&(J.clearTimeout(this.C),this.C=null);this.I&&(J.clearTimeout(this.I),this.I=null);var b=browser.runtime.lastError||a&&a.error,c=this.S;if(c instanceof WebSocket){if(a===c)return c.close()}else c&&pb(b&&b.message)&&(this.la=!0);this.S=null;this.H&&(this.H=0,this.qa={},Nb(this,!1),Mb(this,!1),this.Aa(1,2),this.ka=!1,this.J=this.Ra=null,R(this,!1));a=++this.ta;b=La.length+1;c=a/b;c<120&&(c==1&&$b(this),!a||a%b?this.Ba():J.setTimeout(this.Ba,5E3*c))};
n.Za=function(){let a=this.S;a instanceof WebSocket?a.close():a&&(a.disconnect(),this.oa())};n.Ma=function(a){if(this.I)a?(this.I=null,S(this,0,1,1)):J.clearTimeout(this.I);else if(a)return;this.I=J.setTimeout(this.Ma,15E3,!0)};n.Lb=function(a){let b=new qb;b.u=this.$a;b.h=this.Za;wb(b,a.data)};n.zb=function(a){let b=new qb;b.u=this.$a;b.h=this.Za;wb(b,new Blob([a]))};
function S(a,b,c,d,e,f){let g=a.P;var k=a.H;if(!k)return 0;let h=a.hb++;b=new qb(h,b,c,d,e,f,k==2,g>=99);if(k==1){k=a.S;var m=k.send;b.m||(b.o.push(";"),b.m=!0);m.call(k,new Blob(b.o))}else try{m=a.S;var l=m.postMessage;b.m||(b.o.push(";"),b.m=!0);l.call(m,b.o.join(""))}catch(t){return a.oa(),0}d&1&&(a.qa[h]=b);a.I&&a.Ma();return h}
function ac(a,b){if(b.g){var c=b.g[1],d=a.i[c];if(d)return d.h?b.i=d.port.id:null;d=a.m;for(var e in d)if(d[e].j==c)return b.i=e}c=b[6];e=b[17];d=b[50];let f=b[7];var g=a.ja;let k=a.l;a=a.g;let h,m,l;if((h=g[c])||(h=g[e]))return b.i=h.id;if(h=g[d])l=h.id;for(let t in k){g=k[t];let p=g.j;if(p){if(p==c||p==e||p==d){h=g.port;if(f){let r=a[h.tabId];r&&r.G!=f&&(h=null)}if(h)return b.i=h.id}p==f&&(m=g.port.id)}}return l?b.i=l:m?b.i=m:null}
function bc(a,b){let c=b.i;if(c)return c;if(b.g){var d=a.g[P(b.g[6],b.g[7])];d?c=d.id:(d=b.g[7])&&a.m[d]&&(c=d)}if(c||=ac(a,b))return b.i=c;d=a.m;let e=b[50],f=b[7];for(let g in d){let k=d[g];if(k.G==e)return b.i=k.id;k.G==f&&(c=k.id)}return c?b.i=c:f?browser.tabs.query({url:f}).then(g=>g?.length&&(g=a.g[g[0].id])?b.i=g.id:null,()=>null):null}
async function cc(a,b){var c=b.tabId;let d=b.da;if(d>0&&!b.i){var e=await browser.webNavigation.getFrame({frameId:d,tabId:c});e&&(e=e.parentFrameId,e>=0&&(b.i=P(c,e)))}if(d!=null&&b.m){if(e=a.D[P(c,d)]){b.j=e.i;b.o|=e.l;b.refresh|=e.refresh;b.A=e.g;let f=e.ea;f&&b.G!=f&&(b.ea=f);b.i||(b.i=e.h);(e=a.i[b.j])&&!e.port&&(e.port=b)}a.g[P(c,d)]=b;e=a.B?null:b.X;c=[11,a.P,b.id,c,d,e,b.refresh,b.o,a.j[22],a.j[23],ob[a.Va?1:null]];e&&b.o&&(a=a.aa[e],c.push(a.ac,ob[a.ob]),ka(c,a.mb.map(pa(a)).map(ta)));b.postMessage(c)}}
n.pa=async function(a,b,c,d,e,f){var g=T(a);if(g){var k=(g&32)>0,h=(g&=7)==1,m;h&&!k&&(m=await U(a));g=[g];a={[6]:dc(a,h&&this.v),[50]:b,[7]:c,[8]:d,[100]:e,[102]:f,[51]:V(m),[54]:navigator.userAgent,[121]:x?this.Z:this.J};S(this,14,1,0,g,a)}};
async function ec(a,b,c){if(b&&b.length){var d=b.map(h=>U(h[0]));if(c){var e=c.i;var f=c.S;var g=c.u;e&&!f&&d.push(U(e))}d.length&&(d=await Promise.all(d),b.forEach(h=>h[5]=V(d.shift())),d.length&&(f=V(d.shift())));c=0;var k=[0,0,0];e={[8]:4,[54]:navigator.userAgent,[7]:e,[110]:g,[111]:f,[121]:x?a.Z:a.J};b.length>1&&(k[1]=S(a,15,1,0,[b.length],e),c=16,e={});for(let h of b)k[2]++,e[6]=h[0],e[100]=h[2],e[102]=h[3],e[50]=h[4],e[51]=h[5],S(a,14,2,c,k,e)}}
n.Ea=function(a,b){if(!this.H)return fc(b.id,"cannot_contact_idm");let c=a.linkUrl,d=a.pageUrl,e=d,f=this.g[P(b.id,a.frameId)];if(a.menuItemId==5)return browser.downloads.search({query:[c]},this.nb.bind(this,c));if(a.menuItemId==2){if(c=a.frameUrl,c&&c!="about:blank"||(c=d,e=null),this.B&&f?.X)return hc(this,!0)}else if(!c){c=a.srcUrl;if(!T(c)){if(this.B&&f?.X&&a.mediaType=="video")return hc(this,!0);return}if(f&&c)return a=Wb(this),a.tabId=b.id,a.port=f,a.o=c,a.v=e,a.i=d,a.m=4,f.postMessage([18,
a.g,c])}this.pa(c,e,d,4)};n.Qa=function(a,b){if(!this.H)return fc(b.id,"cannot_contact_idm");Db(this,b.id,a.menuItemId==3)};n.nb=function(a,b){let c,d,e;for(;c=b.pop();)c.exists&&c.state=="complete"?d||(e||=c.referrer):(d||=c.referrer,browser.downloads.erase({id:c.id}));this.pa(a,d||e,null,4)};
function Db(a,b,c,d,e,f,g,k,h){if(!d||a.j[-5]){var m=a.g[b];if(m){var l=Wb(a);l.tabId=b;l.port=m;l.P=c;l.J=e;l.h=0;l.j=[];if(m=d&&!!f)l.K=!0,l.N=f,l.C=g,l.D=k,l.A=h,f.h||ic(a,f);f=l.g;(d=d&&a.j[12])?(d=d.replace(/\./g,"\\.").replace(/\*/g,".*").replace(/~/g,"(?:.*\\.)?"),d=`^(?:http|https|ftp|ftps)://(?:[^\\/]*@)?(?:${d})(?::\\d+)?(?:\\W|$)`):d="^(?:http|https|ftp|ftps)://";l.l=jc(a,b,[12,f,c,m||e,d]);l.H=0;l.l||Xb(a,l)}}}
n.Zb=function(a,b,c,d,e,f,g,k){if(a=this.$[b]){d&&(a.h+=d);g&&(a.i=g);k&&(a.u=k);if(e&&(typeof e=="string"&&(e=JSON.parse(e)),e instanceof Array)){if(f)for(let h of e)h[4]=f;ka(a.j,e)}++a.H<a.l||(a.K?(d=a.tabId,(e=this.h[a.port.g])&&e.L==d&&a.h&&(f=a.A,g=e.h,k=e.i,S(this,10,1,0,[4294967295,e.A,Math.round(a.C*f+(e.l+g)*k),Math.round(a.D*f+(e.I+g)*k),0,a.h]),this.A=d,jc(this,d,[13,!0]))):a.J?(d=a.h>0,this.gb!=d&&(this.gb=d,browser.contextMenus.update(3,{visible:d}),browser.contextMenus.refresh())):
(d=a.j,d.length?ec(this,d,a):fc(a.tabId,"cannot_find_links")),Xb(this,a))}};n.Eb=function(a,b,c,d){(a=Xb(this,b))&&this.pa(a.o,a.v,a.i,a.m,c,d)};n.qb=function(a){var b;if((b=!this.Ha&&this.j[-6])&&!(b=!this.v)){b=Date.now();var c=b>this.v;c&&(this.v=b+D(F()*120+240)*6E4);b=c}if(b&&(b=a.finalUrl||a.url,T(b,!0))){c=a.id;var d=Date.parse(a.startTime),e;for(e of A(this.i))if(b==e.url&&d>=e.aa&&d-e.aa<50)break;if(e&&(e.Da=c,a.request=e,this.o[e.tabId]))return;this.ha[c]=a;browser.downloads.pause(c,Zb)}};
n.rb=function(a,b){var c=a.id;let d=this.ha;var e=d[c];if(e){var f=this.j,g=e.request;e=a.finalUrl||(a.finalUrl=a.url);var k=g?g.ya:new URL(e),h=g?g.W:a.W=T(e,!0),m=g?g.na:a.na=W(a.filename||k.pathname);if(!((g?g.sa:a.l=this.sa)||this.ia||f[1].test(m)&&!f[9].test(k.hostname)&&!f[19].test(k.href)))return kc(this,c);a.request=g;a.bc=b;d[c]=a;if(g)return X(this,2,g,a)?a.Ka=!0:kc(this,c);if(h==1){if(!a.referrer){b=this.h;for(var l of A(this.m))if(l.G==e&&(a.referrer=l.C,(c=b[l.g])&&c.L==l.tabId))break}l=
U(e);e=e==a.url?null:U(a.url);Promise.all([l,e]).then(t=>lc(this,a,...t));return a.Ka=!0}return lc(this,a)}};function lc(a,b,c,d){var e=Date.parse(b.startTime)||Date.now();e=[b.id,0,D(e),0,b.W,2];c={[6]:dc(b.finalUrl,a.v),[4]:b.na,[103]:b.totalBytes||null,[100]:b.filename||null,[127]:b.mime||null,[8]:b.l?2048:0,[50]:b.referrer||null,[51]:V(c),[54]:navigator.userAgent,[122]:a.J};b.finalUrl!=b.url&&(c[17]=dc(b.url),c[56]=V(d));return!!S(a,13,1,129,e,c)||kc(a,b.id)}
function kc(a,b,c){let d=a.ha[b];if(d){delete a.ha[b];let e=d.request;e&&(e.Da=null,e.La&&a.O(e));if(c)return browser.downloads.cancel(b,Zb),!0;d.Ka&&(d.Ka=!1,d.bc());browser.downloads.resume(b,Zb)}}n.Hb=function(a,b,c,d,e,f){this.za(a,b,c,d);S(this,23,2,0,[b,a.tabId,a.j,a.X,a.da],{[132]:d,[133]:e,[134]:f})};
n.ba=function(a,b,c){if(a==4294967295)this.A=null,c=!0;else{let d=this.l[a];if(d){c=d.g;if(!c)return;if(b)switch(c){case 3:return;case 2:break;default:d.g=3;J.setTimeout(this.ba,1E3,a,!1,!0);return}d.g=0;c=!0}}c&&S(this,8,1,32,[a])};
n.fc=async function(a,b,c,d,e,f,g,k,h,m){let l=a.tabId,t=a.g;var p=this.h[t];let r=this.o[l];if(b){var v=Xb(this,b);if(v=v&&v.I){if(!c&&a.A){let H=this.g[a.i];if(H)return H.postMessage([15,b,null,v[6],v[17],v[50],v[31],v[133],v[134]])}var u;b={};if(!d){if(!c||e==null){if(!a.h){c=a.ra;f="iframe";g=a.G;var w=!!c}if(!w){c=l;f=g=null;var y=!0}}a=this.za(a,c,f,g);p=l==p.L&&!p.V&&(y||w||e)&&!r;!p||y||a.g||J.setTimeout(this.ga,3E3,t);var E=2;a.g=p?1:2;var K=(p?128:64)|(y?512:0);!k&&(u=this.g[l])&&(k=u.B)}k&&
(b[101]=k,b[128]=h);m&&(b[137]=m);await mc(this,v,E||1,K||0,t,l,c,b);!E||y||r||nc(this,c,e)}}else d?(this.ba(c,!0),delete this.l[c]):l!=p.L||p.V||r||(e?nc(this,c,e,!0):oc(this,c))};function pc(a,b){let c=a.h[b];if(c&&c.g){var d=c.h,e=c.i;S(a,7,2,c.V?128:c.B?256:c.j?512:0,[b,Math.round((c.l+d)*e),Math.round((c.I+d)*e),Math.round((c.width-d-c.C)*e),Math.round((c.height-d)*e)])}}
function nc(a,b,c,d){let e=a.l[b];if(e&&e.g){var f=e.port;let g,k=256;e.g==2&&(d==null&&(g=a.h[f.g])&&(d=f.tabId==g.L&&!g.V),d?(k|=128,e.g=1):k|=64);(d=e.i)&&!c&&(c=f.l);let h,m,l,t,p,r;if(c){h=c[0];m=c[1];l=c[2]||h+1;t=c[3]||m+1;p=c[4];if(c=!d&&f.l)h+=c[0],m+=c[1],l=Math.min(l+c[0],c[2]),t=Math.min(t+c[1],c[3]);if(f=a.g[f.tabId])r=f.J}S(a,9,1,k,[b,h,m,l,t,p,r])}}
n.ga=function(a){var b=this.o;let c=this.g;var d=this.h;let e=a?[d[a]]:A(d);a=[];d={};for(var f of e)!f||f.V||f.fa||b[f.L]||a.push(f.L);if(a.length)for(let g of A(this.l))g.g&&(b=g.port,f=b.tabId,a.includes(f)&&((f=b.h?b:c[f])&&f.update&&(f.update=!1,f.postMessage([14,!1])),g.h?b.h?b.postMessage([15,null,g.id]):ic(this,b,null,d):nc(this,g.id,null,!0)))};function qc(a,b){let c=a.h,d;if(b=b==null?A(c):(d=c[b])?[d]:null)for(d of b)Fb(a,d.L)}
function Fb(a,b,c,d){d=d!=0;let e=c?0:2;c=c?32:64;for(let f of A(a.l))f.g&&f.port.tabId==b&&f.g!=e&&(d||f.h)&&(f.g=e,S(a,8,1,c,[f.id]))}function oc(a,b){let c=a.l[b];c&&c.g==1&&(c.g=2,S(a,8,1,64,[b]))}function rc(a,b,c,d){var e=a.Ca;let f=(e&b)!=((c?255:128)&b);a.Ca=c?e|=b:e&=~b;f&&(c=a.j[-32],b=a.j[-33],c=a.sa=c!=0&&(e&c)==c,e=a.Ha=b!=0&&(e&b)==b,a.Wa=(c||e)&&d||null)}
n.Oa=function(a,b,c,d,e){let f=this.h[a];if(f)if(f.fa?d&&(J.clearTimeout(f.fa),f.fa=null):d||=-1,d>=0)f.o|=b,f.u|=c,d&&(f.fa=J.setTimeout(this.Oa,d,a));else{b|=f.o;c|=f.u;f.o=f.u=f.fa=null;if(b){for(let g of A(this.m))g.h&&g.g==a&&(g.update=!0);e?this.U(e):browser.windows.get(a,this.U);browser.tabs.query({windowId:a,active:!0},this.U)}if(c){if((a=this.h[a])&&!a.V&&!a.fa&&(a=a.L,!this.o[a])){b=this.l;for(let g in b)c=b[g],c.g&&c.port.tabId==a&&c.g==1&&S(this,8,1,1152,[g])}}else this.ga(a)}};
n.U=function(a,b){browser.runtime.lastError;a instanceof Array&&(a=a.shift());if(a){var c=a.windowId||a.id,d=this.h[c];if(d){var e=!a.windowId;if(e){b&&(d.i=this.Ga);var f=d.j=a.state=="minimized",g=d.B=a.state=="maximized";f||(d.width=a.width,d.height=a.height,d.m=a.left,d.v=a.top,f=d.V,a=d.V=a.state=="fullscreen",g=g&&-d.m,g>0&&g<=16&&g==-d.v&&(d.h=g),a==f||b||(a?qc(this,c):this.ga(c)))}else{if(d.J&&bb(a.url))return;a.active&&(d.L=a.id);a.width&&(d.H=a.width);a.height&&(d.D=a.height)}if(!d.j){a=
d.width;let k=d.H;g=d.height;f=d.D;let h=!x&&(k>a||f>g);if(h||!k||!f){e||h&&browser.windows.get(c,this.U);return}e=a-k;a=e/2;a>=0&&a<=16?(d.h=a,d.l=d.C=0):(a=d.h,x||ba||ca?d.l=e-a*2:d.C=e-a*2);e=g-f-a*2;e>=(d.K?20:40)&&e<=Ga&&(d.I=e);d.J=!0}b||pc(this,c);return d}}};function Eb(a,b){return a.o[b]?!0:(a=a.g[b])&&a.refresh?(a.refresh=!1,browser.tabs.reload(b),!0):!1}
n.cc=function(a,b,c,d){a.G=b;a.C=c;a.refresh&&!d&&(a.refresh=!1);a.da==null&&cc(this,a);this.ga(a.g);this.B>0&&a.h&&a.X&&(this.j[11]?.test((new URL(b)).hostname)||hc(this))};n.ec=function(a,b,c,d,e){a.B=b;a.J=e;a=[a.j,a.tabId,a.g,d,e];d={};d[110]=b;d[128]=c;S(this,21,1,0,a,d)};
n.hc=function(a,b,c,d,e){let f=a.tabId,g=this.g[P(f,c)];if(g){var k=g.l;g.ra=d;if(g.l=e){var h=a.l;h&&(e[0]+=h[0],e[1]+=h[1],e[2]=Math.min(e[2]+h[0],h[2]),e[3]=Math.min(e[3]+h[1],h[3]));if(k&&k.join()!=e.join()){k=this.g;a=P(a.tabId,"");c=a+c;for(let m in k)m.startsWith(a)&&(h=k[m],h.i==c&&g.postMessage([16,b,h.da,h.ra]))}}if(!this.o[f]){nc(this,d,e);for(let m of A(this.l))m.port==g&&m.g&&m.h&&!m.i&&g.postMessage([15,null,m.id])}}};
function ic(a,b,c,d){var e=a.g;c=[16,c];a=[b];for(let f;f=e[b.i];b=f){if(d)if(d[b.id])break;else d[b.id]=!0;a.push(f)}for(d=a.pop();b=a.pop();d=b)e=b.ra,c[2]=b.da,c[3]=e,c[4]=e?null:b.G,c[5]=e?null:b.ea,d.postMessage(c)}function jc(a,b,c){a=a.g;b=P(b,"");let d=0;for(let e in a)e.startsWith(b)&&(a[e].postMessage(c),d++);return d}
n.wa=function(a,b){let c={},d={files:["content.js"],target:c,injectImmediately:!0};b?c.frameIds=[b]:c.allFrames=!0;if(a instanceof Array)for(;b=a.shift();)b.discarded||(c.tabId=b.id,browser.scripting.executeScript(d).catch(()=>null));else if(b=a)c.tabId=b.id||b,browser.scripting.executeScript(d).catch(()=>null)};function sc(a,b,c,d){c==null&&(c=b.A==a.Y);S(a,6,2,17|(c?2048:1024)|(b.B?256:b.j?512:0),[b.A,b.g,b.width,b.height,b.m,b.v,b.i],{[117]:d})}
async function zb(a){var b=browser.windows.getAll({windowTypes:["normal","popup","app"]}),c=browser.tabs.query({active:!0});[b,c]=await Promise.all([b,c]);let d={};if(c)for(let e of c)d[e.windowId]=e;for(let e of b)b=d[e.id],c=a.U(e,!0)||a.eb(e,!0,b),sc(a,c,e.focused,e.title||b&&b.title)}async function tc(a){await uc("system.display")&&(a.lb=(await browser.system.display.getInfo(null))[0].displayZoomFactor)}
n.Ib=function(a){let b=a.sender.tab;if(b&&!(b.id<0)){a.name=a.name.split(":").shift();var c=a.id;c==null&&(c=a.id=this.oc++);var d=b.id,e=a.name=="top";a.tabId=d;a.g=b.index<0?null:b.windowId;a.m=!0;a.v=!1;a.update=e;a.h=e;a.da=e?0:a.sender.frameId;a.K=0;a.G=a.sender.url||e&&b.url||null;a.ea=null;this.m[c]=a;e&&(this.g[d]=a);a.G&&(a.X=Yb(this,(new URL(a.G)).hostname));a.onMessage.addListener(this.Jb.bind(this,a));a.onDisconnect.addListener(this.xa);cc(this,a)}};
n.xa=function(a){browser.runtime.lastError;if(a.m){a.m=!1;var b=P(a.tabId,a.da),c=this.$,d=this.l,e,f=this.ja,g=this.i,k;for(let h in c)c[h].port===a&&delete c[h];for(let h in d)if(e=d[h],e.port===a)this.ba(h),delete d[h];for(let h in f)f[h]===a&&delete f[h];for(let h in g)(k=g[h],k.port!==a||k.j)||delete g[h];this.Wa===a&&rc(this,255,!1);delete this.m[a.id];delete this.g[b];a.h&&delete this.g[a.tabId];a=this.D;for(let h in a)b==a[h].h&&delete a[h]}};
n.Jb=function(a,b){let c=b.shift();b.unshift(a);switch(c){case 21:this.cc.apply(this,b);break;case 24:this.ec.apply(this,b);break;case 22:this.hc.apply(this,b);break;case 23:this.fc.apply(this,b);break;case 41:this.Hb.apply(this,b);break;case 25:this.za.apply(this,b);break;case 26:Db(this,a.tabId,!0,!0,!1,a,b[1],b[2],b[3]);break;case 27:this.Zb.apply(this,b);break;case 28:this.ba(4294967295);break;case 29:this.Ya.apply(this,b);break;case 30:this.Ya.apply(this,b);break;case 31:this.Cb.apply(this,b);
break;case 32:this.Fb.apply(this,b);break;case 39:this.Db.apply(this,b);break;case 33:this.wb.apply(this,b);break;case 34:this.Bb.apply(this,b);break;case 35:this.Eb.apply(this,b);break;case 36:this.Yb.apply(this,b);break;case 37:this.Kb.apply(this,b);break;case 45:this.ub.apply(this,b);break;case 46:this.yb.apply(this,b)}};
n.$a=function(a){let b=a.type;var c=a.A,d=a.j,e=a.g,f;if(b==1){let m=e[0];if(f=this.qa[m])b=f.type,delete this.qa[m]}switch(b){case 3:this.ta>=0&&(this.ta=-1);var g=e[0],k=e[5],h=e[6];f=e[4];e=e[8];this.P=g;vc(this,h);wc(this,k,a);xc(this);if(f||e)e=(f?f/96:1)*(e?e/100:1),this.Ga=q&&e<1.245?1:e,zb(this),q&&this.lb&&tc(this);g<97&&this.Ma();$b(this);break;case 4:g=this.j;(k=!!(e[3]&134217728))&&(J.idm=this);this.Va=k;this.ia=!!(e[3]&2147483648);wc(this,e[2],a);xc(this);g[-6]=(d&64)>0;g[-10]=(d&1024)>
0||Xa;g[-5]=(d&32)>0;g[-1]=(d&2)>0;g[-8]=(d&256)>0||c<2;g[-9]=(d&512)>0||c<2;g[-32]=e[0];g[-33]=e[1];g[12]=a[12];g[17]=a[17];g[23]=a[23];this.P<109&&(g[23]=Ya);this.P<110&&(g[23]+=Za);this.P<112&&(g[23]+=$a);this.P<113&&(g[23]+=ab);Y(g,a,1);Y(g,a,2);Y(g,a,3);Y(g,a,4);Y(g,a,10);Y(g,a,9,2);Y(g,a,11,2);Y(g,a,20);Y(g,a,21,1);yc(g,a,19);yc(g,a,18,1,1);(this.K||this.Sa)&&Bb(this);break;case 18:f=e[0];e=e[1];d=I[e?-e:f];if(!d)break;e=this.aa[f]={};c=d[2];e.X=f;e.ac=f==1?ua("lbhghor"):null;e.ob=d[0];e.mb=
d[1];for(g in a)(g=parseInt(g))&&(g==102||g>110&&g<150)&&(e[g]=c.includes(g)?RegExp(a[g]):a[g]);for(k of c)e[h=k]||(e[h]=Ma);g=this.aa.map(qa(102)).filter(ea);this.Ua=RegExp("^https?://(?:"+g.join("|")+")","i");Y(e,a,101,2);break;case 5:zc(this,e[0],d,e[1]);break;case 6:if(d&4)break;zc(this,f.g[0],d,e[2],e[1]);break;case 8:a=e[0];e=d&32;if(a==4294967295)jc(this,this.A,[13,!1]),this.A=null;else if(a=this.l[a])a.g=e?0:2;break;case 11:e[0]==4294967295&&(Db(this,this.A,!0,!0),this.A=null);break;case 12:try{let m=
a.g[5];e=m==4?2:3;if(m==1||m==2){if(ac(this,a)){let l=a[4];if(this.j[3].test(l))m==1?e=6:m=4;else if(this.j[-1]||this.j[4].test(l))e=6;a[8]|=256}if(e==3){let l=this.h[this.Y];l&&this.o[l.L]&&(e=1)}}if(m!=4)mc(this,a,e);else{switch(a.g[4]){case 1:a[7]||(a[7]=a[50]);break;case 3:a[7]||(a[7]=a[32]),a[50]||(a[50]=a[31])}Ac(this,a)}}catch(m){mc(this,a,0)}break;case 13:a=f.g[0];g=f.g[5];e=e[1];k=e==3;if(g<=3)f.j&128?kc(this,a,k):this.O(a,k);else if(g==5)if(e){if(d=(f=this.i[a])&&f.m)e=f.url,g=f.method,
k=f.requestHeaders,(h=f.i)&&((h=Bc(h,k,!0))??(g="GET")),f.port.postMessage([19,a,d,e,g,k,h])}else Cc(this,a);break;case 20:e=a[123];g=!e;a=[a.l];k={};x&&(h=this.Z)&&(k[122]=h,e&&(g=h.substr(2).split(";",1).shift()==e));k[121]=this.J;S(this,1,2,g?2:4,a,k);break;case 24:Dc(this,a);break;case 22:Ec(e[0],e[1],a[131],a[130]);break;case 100:d&1&&S(this,100,1,0,[a.l],a);break;default:d&1&&S(this,1,2,0,[a.l])}};
async function Ec(a,b,c,d){Ia==null&&(Ia=await uc("notifications")||!1);Ia&&(browser.notifications.create(a.toString(),{type:"basic",title:d??"",message:c,iconUrl:"images/logo48.png"}),b&&J.setTimeout(browser.notifications.clear,b*1E3,a.toString()))}async function Dc(a,b){let c=await U(b[6],!!(b.j&16));b=[b.l,c?c.length:0];let d={[51]:V(c)};S(a,1,2,c?2:4,b,d)}
async function Ac(a,b){try{let g,k=b.i||b.g[2],h=b.g[8],m=a.l[h];if(m&&m.port)g=m.port;else if(k in a.m)g=a.m[k];else if(k=await bc(a,b))g=a.m[k];else{let l=await browser.windows.getLastFocused();if(l){let t=a.h[l.id];t&&(g=a.g[t.L])}}if(g){b.i=g.id;var c=a.h[g.g];if(c&&c.g){var d=a.g[g.tabId];d&&d.update&&(d.update=!1,d.postMessage([14,!0]));var e=Wb(a),f=[15,e.g,h];e.I=b;h||f.push(b[6],b[17],b[50],b[31],b[133],b[134]);g.h||ic(a,g,e.g);g.postMessage(f)}else mc(a,b,1)}else mc(a,b,0)}catch(g){mc(a,
b,0)}}async function mc(a,b,c,d,e,f,g,k){c!=-1&&(d|=c==0?4:2,k||={},k[8]=b[8],e=[b.l,c,e,g,f,-1],b.j&32&&(c==3||c==2)&&(b=await U(b[6],!!(b.j&16)))&&(e[5]=b.length,k[51]=V(b)),S(a,1,2,d,e,k))}n.Gb=function(a){Ub(this,a).j=!0;x&&browser.windows.get(a.windowId,this.U)};
n.ab=function(a,b){var c=a.tabId,d=a.frameId;let e=a.url;var f=a.transitionType,g=a.frameType,k=a.documentId;let h=a.documentLifecycle=="prerender";this.R!=c||bb(e)||(this.R=null);d&&h&&g=="outermost_frame"&&(d=a.frameId=0);f=f&&f.endsWith("_subframe");var m=!0;if(g=this.D[P(c,d)]){m=g.m;g.m=h?k:null;if(m&&m==k)return;k=g.o;m=!(e&&k&&(new URL(e)).hostname==(new URL(k)).hostname);g.o=e}else h&&(g=Ub(this,a),g.m=k);!f&&this.o[c]&&R(this,m,c);if(k=this.g[P(c,d)])if(this.A&&(a=this.h[k.g])&&a.L==this.A&&
this.ba(4294967295),b){a:{b=k.G;c=new URL(b);d=new URL(e);if(c.origin==d.origin&&c.pathname==d.pathname)switch(Yb(this,c.hostname)){case 1:if(c.pathname=="/watch"&&c.searchParams.get("v")==d.searchParams.get("v")){b=!0;break a}break;case 4:if((c.pathname.startsWith("/p/")||c.pathname.startsWith("/reel/"))&&c.searchParams.get("img_index")==d.searchParams.get("img_index")){b=!0;break a}}b=e==b}if(!b){b=this.l;var l;for(let t in b)if(l=b[t],l.port===k)k.X==2||k.X==4?oc(this,t):(this.ba(t),delete b[t]);
k.K++;k.G=e;k.h&&(k.update=!0);k.postMessage([17,!0])}}else this.xa(k,!0),f&&k.G=="about:blank"&&this.wa(c,d);else f&&e=="about:blank"?(Ub(this,a),this.wa(c,d)):g&&g.j&&(g.G||!b)?g.j=!1:x&&browser.tabs.get(c,this.U)};n.xb=function(a){return this.ab(a,!0)};
n.eb=function(a,b,c){let d=a.id;c={A:d,width:a.width,height:a.height,m:a.left,v:a.top,i:this.Ga,h:8,I:Fa,l:0,C:0,K:a.type=="popup"||a.type=="app",V:a.state=="fullscreen",B:a.state=="maximized",j:a.state=="minimized",L:c&&c.id,D:c&&c.height,H:c&&c.width,J:!x,g:null,fa:null};Object.setPrototypeOf(c,vb.prototype);this.h[d]=c;a.focused&&(this.Y=d);b?(browser.tabs.query({windowId:d,active:!0},this.U),browser.tabs.query({windowId:d,url:O},this.dc),browser.tabs.query({windowId:d,url:O},this.wa)):x&&this.Ia==
d&&(this.Ia=null,browser.tabs.query({windowId:d,active:!0},this.U));return c};n.dc=function(a){for(let b of a)Ub(this,0,b.id,!0,b.url)};n.fb=function(a){S(this,5,1,32,[a]);delete this.h[a];this.u==a&&Ab(this)};n.Xb=function(a){if(a>0){this.u&&browser.windows.update(this.u,{drawAttention:!0});let b=this.h[a];b&&(this.Y=a,b.g||sc(this,b,!0),browser.windows.onBoundsChanged||browser.windows.get(a,this.U),Eb(this,b.L))}else this.Y=null};n.Wb=function(a){this.Oa(a.id,!0,!1,-1,a)};
function zc(a,b,c,d,e){let f=a.h[b];f?(d&&(f.i=d),e&&(f.g=e),d=!!(c&128),f.V!=d&&(f.V=d)&&qc(a,b),(e||c&4096)&&pc(a,b)):a.fb(b)}n.Pb=function(a,b,c){let d=c.active;c=c.windowId;let e=d&&this.h[c];e&&(e.g||sc(this,e));b.status=="complete"&&(a=this.g[a])&&!a.v&&(a.v=!0,d&&this.ga(c))};n.Ob=function(a){let b=this.g,c=this.D,d=P(a,"");this.R==a&&(this.R=null);let e=b[a];e&&this.xa(e,!0);for(let f in b)f.startsWith(d)&&this.xa(b[f],!0);for(let f in c)f.startsWith(d)&&delete c[f];delete this.o[a]};
n.Mb=function(a){let b=a.tabId;a=a.windowId;this.Ca=0;this.A&&this.ba(4294967295);var c=this.h[a];c?(Fb(this,c.L),c.L=b,(c=this.R)&&b!=c&&(this.u?browser.windows.update(this.u,{drawAttention:!0}):this.H&&this.K&&(this.R=null,J.setTimeout(browser.tabs.remove,250,c))),browser.tabs.get(b,this.U),Eb(this,b)||this.ga(a)):x&&(this.Ia=a)};n.Nb=function(a,b){b=b.newWindowId;for(let c of A(this.m))c.tabId==a&&(c.g=b);Fb(this,a,!0)};n.Ab=function(a){this.u&&a=="idle"&&browser.windows.update(this.u,{focused:!0})};
n.Ya=function(a,b,c){if(a.h){let d=a.tabId;a=a.g;let e=this.h[a];this.A&&this.ba(4294967295);if(e&&e.L==d){let f=!1;b&&(e.H=b,f=!0);c&&(e.D=c,f=!0);Fb(this,d,!1,f);this.Oa(a,f,!1,500)}}else a.ra&&(b=this.g[a.i])&&b.postMessage([16,null,a.da,a.ra])};n.Cb=function(a,b,c){(b=va[b])&&rc(this,b,c,a)};n.Fb=function(a,b,c){b==0&&rc(this,128,c,a)};n.Db=function(a,b,c,d){this.Fa=a.id;a.H=b;a.D=c;a.I=d};n.wb=function(){rc(this,255,!1)};
n.Bb=function(a,b,c,d,e){(a=a.j)&&S(this,16,1,32|(c==null?16:0),[a,c??-1],{[110]:b,[127]:d,[115]:e})};n.Yb=function(a,b,c){if(a=this.i[b])S(this,16,1,48,[a.id,0],{[115]:c}),a.ca=!1,a.La&&this.O(a)};n.yb=function(a,b,c,d){b!=null&&(a.N=b?1:-1);c!=null&&(a.u=c?1:d?2:-1)};n.Kb=function(a,b,c,d){S(this,19,2,0,[b,c,a.tabId,a.j],d)};
n.ub=function(a,b,c){if(a=this.i[b]){if(a.m<0&&c!=null){a=new Uint8Array(c.length);for(let d=0;d<c.length;++d)a[d]=c.charCodeAt(d);c=a}S(this,16,1,48,[b,-1],{[115]:c});Cc(this,b)}};function Cc(a,b){if(b=a.i[b])b.m=null,b.u=null,b.La&&a.O(b)}
function Fc(a,b){let c=a.j;if(b.B||a.o[b.tabId]||!c[-6])return 1;if(b.l)return 6;if(b.h&&c[-1])return 1;a=b.ya;let d=b.P=W(a.pathname);return c[9].test(a.hostname)||c[19].test(a.href)?1:(b.W&7)==2&&(b.J||c[-10])?a.pathname.endsWith("/")||c[21].test(a.pathname)?1:c[1].test(d)||!c[20].test(d)?4:1:6}
function Gc(a,b){let c=!b.g;if(b.l&&c)return 3;let d=a.j;var e=d[18];let f=d[1];var g=b.ya;let k=b.P,h=b.na||(g.search?null:k),m=b.h,l=Oa.includes(b.type),t=!b.J;var p=!l&&e.exec(g.href);if(p){var r=e.jc,v=e.kc;let w=e.lc,y=e.mc;for(e=1;e<p.length;++e)if(p[e]){r=r[--e];if(r===null)break;var u=void 0;p=0;r.includes("G")&&(u=!0,p|=b.method=="GET");r.includes("P")&&(u=!0,p|=b.method=="POST");if(u&&!p)break;u=r.includes("V")|r.includes("A")|r.includes("C");r.includes("H")&&(b.Y=!0);if((u?b.Y:m?!r.includes("S"):
r.includes("X"))||t&&r.includes("D"))return 1;let E,K,H;if(p=y[e]){p=p.exec(g.href);if(!p)break;g=v[e];if(v=g.F)H=!0,K=p[v];if(v=g.T)H=!0,E=p[v]}E||=W(K)||r.includes("T")&&(H=!0,k)||w[e];if(u)return E&&(b.P=E),m||(b.h=!0),b.g=!0,6;if(c&&(E?f.test(E):!H))return b.N=16777216,4;break}}if(!c)return 6;if(h&&(l&&d[2].test(h)||m&&d[4].test(h)))return 1;if(x&&(b.J||d[-10])){if(m&&d[3].test(h))return 6;if((!m||a.ia)&&h&&f.test(h))return b.N=8,4}return 6}
function Hc(a,b){if(b.ka)return X(a,6,b),6;var c=b.statusCode;if(c!=200&&c!=206&&c!=304)return 1;var d=Z(b.o,"Content-Type"),e=Z(b.o,"Content-Disposition"),f=Ic(d).toLowerCase();let g=Ic(e).toLowerCase()=="attachment";c=b.h;var k=b.C;if(b.ja=k&&!g&&f=="text/html"){if(b.j){var h=Vb(a,b);h&&(h.l=!0);X(a,5,b)}return 1}if(c?b.B:b.g)return 1;if(a.ia&&k&&g)return 4;let m,l,t,p,r,v;var u;let w;let y,E=a.j,K=b.port,H=b.ya;var la=H.hostname;let xa=H.pathname,z=(e=Jc(e,"filename")||Jc(d,"name"))&&W(e);if(e){if(!z&&
!c)return 1;if(z&&(!c||z.length<=5)){var B=Jc(d,"charset");y=!B||B=="utf-8"||B=="utf8";B=!0}}B||(e=xa.split("/").pop(),(z=b.P||W(e))&&z.toLowerCase()==f.split("/").pop()&&(B=!0));if(!B){d=E[10].test(f);var L=Aa[f];L&&(L=L.split("|"),z&&L.includes(z)?B=!0:c&&eb(z)?B=!0:(c?d:z)||(B=!0,w=d,z=L[0]));!B&&z&&(g&&k?B=!0:d?B=w=!0:L||db(z)||(B=w=!0))}if(c){L=Yb(a,la);k=a.aa[L];d=xa+H.search;switch(L){case 0:break;case 1:if(k[111].test(d))m=B=!0,z=null;else if(k[112].test(d))l=!0;else if(k[115].test(d)&&f==
"application/json")v=!0;else if(k[113].test(d)||k[114].test(d))t=!0;break;case 2:(la=k[111].exec(d))&&(cb(f)||f=="text/html")?(f=la[1]&&k[112].exec(K?.G))&&la[1]!=f[1]||(t=!0):k[114].test(d)?r=!0:g&&b.type=="image"&&z=="MP4"&&(u=!0);break;case 3:z=="M4S"&&(B=!0);la==k[111]&&k[112].test(xa)&&cb(f)&&(t=!0);break;case 4:k[111].test(d)&&cb(f)&&(r=!0);break;case 5:k[111].test(d)&&f=="text/html"&&(r=!0);break;case 6:k[111].test(d)&&(t=!0);break;default:k[111].test(xa)&&(r=!0)}B&&(z=="M3U8"||z=="F4M"||z==
"MPD"?t=!0:z=="F4F"&&(e.endsWith("Seg1-Frag1")||e.endsWith("Seg1-Frag2")||e.includes("Seg1-Frag2_"))&&(p=!0));z=="ASF"&&((f=Z(b.o,"Content-Length"))&&parseInt(f)<=102400&&(u=!0),Z(b.o,"Server")=="DCLK-AdSvr"&&(u=!0))}if(u)return 1;B&&(c&&E[3].test(z)?m=!0:c&&E[4].test(z)?b.g=!0:!b.g&&E[1].test(z)&&(h=!0));if(m){let Pb,Qb;if(b.Y)m=!1;else if(u=E[11])u.test(H.hostname)?m=!1:(Pb=a.g[b.tabId])&&(Qb=Pb.G)&&u.test((new URL(Qb)).hostname)&&(m=!1)}if(r||v)!K||r&&K.N<0||v&&K.u<0?t=!0:l=b.ca=!0;if(t||p)!b.port||
b.method=="POST"&&!b.i?l=!1:(b.m=p?-1:1,l=!0);if(!h&&!m&&!l)return 1;B&&(b.na=z);y&&(b.S=e);b.j|=l;b.N=m||l?256:16|(c?4096:0)|(w?8388608:0);return h?4:m?2:5}
function X(a,b,c,d,e){var f=c.url,g=c.W||T(f);let k=c.requestHeaders,h=(g&7)==1;if(!d&&!k&&h)if(e===void 0){if(e=Z(k,"Cookie"),e==null)return U(f).then(y=>X(a,b,c,d,y||null))}else e=V(e);let m=d?d.id:c.id,l=c.port&&c.port.id,t=c.timeStamp,p=c.N,r=c.o,v=c.Z,u=c.A,w=0;(u?u.length-u.replaceAll(".","").length:0)==3?p|=33554432:(u?u.length-u.replaceAll(":","").length:0)>2&&(p|=4194304);g&16&&(p|=2097152);c.method=="POST"&&(p|=512);d&&(w|=129);b<4&&x&&(w|=1);c.j&&c.m&&(w|=1);c.j&&b!=5&&(w|=32);c.h&&(w|=
16);c.I&&(w|=8192);c.C&&(w|=c.D?2048:4096);g=[m,l,D(t),c.statusCode,g&7,b,c.tabId,c.frameId];f={[6]:dc(f,h&&a.v),[12]:c.statusLine,[17]:c.ea,[4]:c.na,[100]:c.S,[127]:c.qa,[129]:c.la,[2]:c.A,[122]:a.J,[8]:p,[11]:Kc(k),[13]:Kc(r),[18]:Kc(v)};c.i&&(f[14]=Bc(c.i,k));c.K&&(f[19]=Bc(c.K,v));k||(f[50]=Lc(a,c),f[51]=e,f[54]=navigator.userAgent);x&&(f[122]=Sb(a,c.proxyInfo,Z(k,"Proxy-Authorization")),f[55]=Sb(a,c.$,Z(v,"Proxy-Authorization")));if(!c.ja||!c.D)if(e=a.g[c.tabId])f[7]=e.G;return!!S(a,13,1,w,g,
f)}function Mc(a,b,c,d){if(x){if(X(a,b,c)){if(q&&!d){c.H=!0;return}return x?new Promise((e,f)=>{c.resolve=e;c.reject=f;Tb(a,c)}):a.O(c,!0)}c.g=!0}else c.ia=!0}
n.O=function(a,b,c){let d=this.i,e;if(!G(a)&&!(a=d[a]))return;let f=a.id;var g=a.statusCode>0;if(b){if(a.C||a.I)c=g||!a.requestHeaders,(g=Vb(this,a))&&g.j&&a.D?browser.tabs.remove(a.tabId):q&&c&&!a.I&&(e={redirectUrl:"javascript:void(0)"});e||={cancel:!0};a.H=!0}else c&&(e={[g?"responseHeaders":"requestHeaders"]:c});(c=a.resolve)&&b!==void 0&&(a.resolve=a.reject=null,c(e||{}));if(b=a.reject)a.resolve=a.reject=null,b();if(a.Da||a.m||a.ca)return a.La=!0,e;delete d[f];a.u&&delete d[a.u];a.v&&delete d[a.v];
return e};
n.cb=function(a){var b=a.type,c=a.tabId,d=a.frameId;if(!(c<0&&(x?a.originUrl==Wa:a.initiator==Va))){var e=a.url,f=a.method,g=T(e);if(g&&(f=="GET"||f=="POST")&&e!=this.Ra){d&&a.frameType=="outermost_frame"&&(d=a.frameId=0);var k=a.id=a.requestId,h=this.i[k],m=this.Ha,l=f=="POST",t=b=="image",p=q&&b=="other",r=!p&&c<0&&(x||d<0),v=c>0&&b.endsWith("_frame"),u=r?null:this.g[P(c,d)];if(u||v||r||p||h){x&&l&&h&&lb(h.statusCode)&&(f=a.method="GET",l=!1);v&&Ub(this,a,null,!1);if(!m&&l&&a.requestBody){l=a.requestBody;
var w=l.raw;if(w)for(let y=0;y<w.length&&(w[y].bytes||(w=null));y++);if(!(w||l.formData||q&&l.error))return}if((l=this.Fa)&&(w=u?u.id==l&&u:this.m[l])&&e==w.D){p=w.H;if(l=w.I)a.S=l,a.na=W(l);u||=w;this.Fa=null}l=new URL(e);l.hash="";a.ya=l;a.W=g;a.l=this.sa;a.B=m;a.D=v&&b=="main_frame";a.C=v;a.I=p;a.ha=r;a.h=r||Pa.includes(b);a.g=t;a.j=this.Ua.test(e);a.i=a.requestBody;a.port=u;a.J=g&8||(x?a.proxyInfo&&a.proxyInfo.type=="https":this.va[g]);c<0&&(a.tabId=null);d<0&&(a.frameId=null);if(h)a.id=h.id,
a.port=u=h.port,a.l=h.l,a.B=h.B,a.ea=h.ea||h.url,a.Z=h.Z||h.requestHeaders,a.K=h.K||h.i,x&&(a.$=h.$||h.proxyInfo);else if(x&&r)for(let y of A(this.i))if(y.ma&&!y.v&&e==y.url&&b==y.type&&f==y.method){a=y;a.v=k;break}if(a.h&&!t){b=this.ja;c=b.$b;d=c.indexOf(e);if(d>=0)c.splice(d,1);else for(;c.length>=30;)delete b[c.shift()];b[e]=u;c.push(e)}switch(a.action=Fc(this,a)){case 1:a.g=!0;case 6:Tb(this,a);break;case 4:return Mc(this,1,a)}}}}};
n.Rb=function(a){var b=this.i[a.requestId];if(b){var c=b.requestHeaders=a.requestHeaders;b.timeStamp=a.timeStamp;if(!b.H){if(b.ha&&!b.port&&(a=Z(c,"Referer")))for(var d of A(this.m))if(d.G==a){b.port=d;break}if(b.port&&b.type=="xmlhttprequest"){var e,f;d=0;for(e of c)if(e.name.toLowerCase()=="accept"&&(f=hb(e.value)))break;else d++;if(f){a=f[3];let k=f[4];var g=x;f[1]||f[5]?e.value=f[1]+(f[5]&&f[2]||"")+f[5]:c.splice(d--,1);if(a=="pxr"||a=="pfm")b.u=k,this.i[k]=b;else if(a=="int")return this.O(b,
!1,g&&c)}}x&&b.proxyInfo&&Sb(this,b.proxyInfo,Z(c,"Proxy-Authorization"),!0);if(b.method=="POST"&&(!b.i||b.i.error&&Z(c,"Content-Length")>0))return this.O(b);switch(b.action=Gc(this,b)){case 1:b.g=!0;break;case 4:return Mc(this,1,b);case 3:return Mc(this,3,b)}if(g)return{requestHeaders:c}}}else if(x&&a.tabId<0&&a.type=="xmlhttprequest"&&(x?a.originUrl==Wa:a.initiator==Va)){b=a.requestHeaders;c={};for(e=0;e<b.length;e++)f=b[e],d=f.name.toLowerCase(),d.startsWith("x-idm-")?c[d.substr(6)]=g=!0:d=="origin"&&
f.value==Va&&(c[d]=g=!0);if(g){for(g=0;g<b.length;g++)e=b[g],f=e.name.toLowerCase(),c[f]?b.splice(g--,1):f.startsWith("x-idm-")&&(e.name=e.name.substr(6));return{requestHeaders:b}}}};n.Qb=function(a){if(!a.statusCode&&a.redirectUrl==a.url){a=a.requestId;let b=this.i[a],c=b&&Vb(this,b);c&&!b.statusCode&&c.i==a&&(b.ma=!0)}};
n.Ub=function(a){let b=this.i[a.requestId];if(b){var c=b.port,d=b.type,e=b.statusLine=a.statusLine,f=b.statusCode=a.statusCode||parseInt(e.split(" ",2).pop()),g=a.responseHeaders;if(b.H||f==204&&e.includes(" IDM "))return this.O(b,!0);b.A=a.ip;b.aa=a.timeStamp;b.la=D(a.timeStamp-b.timeStamp);b.o=g;b.ka=kb(f);if(d=="image"&&(e=Z(g,"Content-Type"))&&e.toLowerCase().startsWith("image"))return this.O(b);Z(g,"Client-Protocol")=="quic"?b.W|=16:(e=Z(g,"Alternate-Protocol"))&&e.endsWith(":quic,p=0")&&Z(g,
"Transfer-Encoding")!="chunked"&&(b.W|=16);if(c&&d=="xmlhttprequest"&&!b.u&&c.u==2){d=ra.map(Z.bind(J,g));d.unshift(b.url);d=d.join("|");g=5381;e=d.length;for(f=0;f<e;f++)g=g*33+d.charCodeAt(f)>>>0;c=b.u=`${c.id}-${g}`;this.i[c]=b}switch(b.action=Hc(this,b)){case 1:return x&&this.O(b);case 4:return Mc(this,2,b,a);case 3:return Mc(this,3,b,a)}}};
n.Vb=function(a){let b=this.i[a.requestId];if(a.type.endsWith("_frame")&&(a.statusCode==200||a.statusCode==304)){let c=Vb(this,a);c&&(c.G=a.url,c.ea=c.u)}b&&(b.A||(b.A=a.ip),b.action==2?X(this,4,b):b.action==5&&X(this,5,b),x&&this.O(b))};n.Sb=function(a){(a=this.i[a.requestId])&&(x||!a.ia||a.Da?this.O(a):J.setTimeout(this.O,250,a))};n.Tb=function(a){this.O(a.requestId)};
async function yb(a){var b={url:M.homepage_url};Da&&(b.firstPartyDomain=null);var c=browser.storage.local.get(null);b=browser.cookies.getAll(b);let d=browser.extension.isAllowedIncognitoAccess();[c,b,d]=await Promise.all([c,b,d]);a.jb=c.version;a.ma=c.silent;a.N=c.lastupt;a.Ta=d;x&&(a.K=!!c.consent);a.N>Date.now()&&(a.N=null);c=c.client;let e;if(b)for(let f of b)switch(f.name){case "idmwebext_cid":e=parseInt(f.value);break;case "idmmzcc3_uri":a.Sa=f.value==Va}vc(a,null,c,e);a.Ba()}
function vc(a,b,c,d){(b||=c||d)&&b!=a.ca&&(a.ca=b,c||browser.storage.local.set({client:b}),d||browser.cookies.set({url:M.homepage_url,name:"idmwebext_cid",value:String(b),expirationDate:2147483647}))}
function $b(a){function b(m){m&&(this.R=m.id)}a.R&&(browser.tabs.remove(a.R),a.R=null);if(a.kb||!a.K){var c=!a.H,d=!a.Ta,e=!a.K,f=a.v,g=a.ua,k=a.jb,h=a.Ja;if(c){if(a.la&&a.ma)return}else a.kb=!1,h!=k&&(h&&browser.storage.local.set({version:h}),x&&browser.cookies.set({url:M.homepage_url,name:"idmmzcc3_uri",value:Va,expirationDate:2147483647})),a.ma&&(a.ma=!1,browser.storage.local.set({silent:!1}));if(k!=null&&(e=!1,a.K=!0,h!=k?g&&k&&!f&&!e:!e))return;h=Ua+"current="+escape(h);k&&(h+="&previous="+escape(k));
g&&(h+="&manager="+(g?[g>>24&255,g>>16&255,g>>8&255,g&255].join("."):""));c&&(h+="&error=1");d&&(h+="&incognito=1");f&&(h+="&update=1");e&&(h+="&consent=1");x&&(h+="&mzffox=1");ca&&(h+="&opera=1");ba&&(h+="&msedge=1");e&&!c?(browser.idle&&a.M(5,browser.idle.onStateChanged,a.Ab)&&browser.idle.setDetectionInterval(15),browser.windows.create({type:"popup",width:Math.min(Math.round(screen.availWidth*.85),1100),height:Math.min(Math.round(screen.availHeight*.85),900),url:h}).then(m=>{m&&m.id?(a.u=m.id,
a.R=m.tabs[0].id,R(a,!1,null,!0)):Ab(a)})):browser.tabs.create({url:h},b.bind(a))}}function wc(a,b,c){b==null&&(b=jb(c[13]))&&(b=b[1]<<24|b[2]<<16|b[3]<<8);a.ua=b>>>0}function xc(a){a.ua<103430656?a.v=Date.now():a.v=null;a.ua<103431424?a.B=a.N?a.N+D(F()*240+480)*6E4:Date.now():(a.B=a.N=null,browser.storage.local.remove("lastupt"))}
function hc(a,b){var c=Date.now();let d=c>a.B||b&&!a.v;d&&(browser.storage.local.set({lastupt:a.N=c}),a.B>0&&(a.B=c+D(F()*240+480)*6E4),c="idmdwnlmfv9://idmreg://"+F().toString(36).substr(2),b?a.pa(c):J.setTimeout(a.pa,D(F()*5E3+5E3),c));return d}function Lc(a,b){a=a.D;b=P(b.tabId,b.frameId);var c;do b=(c=a[b])&&c.h,c=c&&c.G,c=="about:blank"&&(c=null);while(!c&&b);return c}
function fc(a,b){b=browser.i18n.getMessage(b);browser.scripting.executeScript({target:{tabId:a},func:function(c){window.alert(c)},args:[b]},Zb)}n.M=function(a,b,c){if(b==null)return!1;let d=ia(arguments);x&&(d[2]=function(){return c.apply(null,arguments)});this.Pa.push(d);b.addListener.apply(b,d.slice(2));return!0};
n.Aa=function(){let a=arguments.length?ia(arguments):null,b=this.Pa;for(let c=0;c<b.length;c++){if(a&&!a.includes(b[c][0]))continue;let d=b.splice(c--,1).pop(),e=d.splice(0,2).pop();e.removeListener.apply(e,d)}};function Lb(a){return browser.i18n.getMessage(a)||a}function dc(a,b){let c=a.lastIndexOf("#");c>a.indexOf("?")&&a[c+1]!="!"&&(a=a.substr(0,c));!b||a.startsWith("idmdwnlmfv")||fb(a)||(a=`idmdwnlmfv9://${a}`);return a}
function T(a,b){a=a.split(":",1).shift().toLowerCase();a=wa[a]||0;return b?a&7:a}function W(a){return(a=ib(a))?a[1].toUpperCase():""}function U(a,b){a={url:a};b&&(a.session=!1);Da&&(a.firstPartyDomain=null);return browser.cookies.getAll(a).catch(()=>null)}function V(a){if(!G(a))return a;let b=[];for(let c of a)b.length&&b.push("; "),b.push(c.name,"=",c.value);return b.join("")}
function Kc(a){if(!a||!a.length)return null;let b=[];for(let c of a)b.push(c.name,": "),c.value!=null?b.push(c.value):c.binaryValue&&b.push(new Uint8Array(c.binaryValue)),b.push("\r\n");return b}function Z(a,b){if(!a)return null;b=b.toLowerCase();for(let c of a)if(c.name.toLowerCase()==b){if(c.value!=null)return c.value;if(c.binaryValue)return ma(c.binaryValue)}return null}
function Jc(a,b){if(!a)return null;let c,d;a=a.split(";");for(b=b.toLowerCase();a.length;){var e=a.shift();let g=e.indexOf("=");if(g>0){var f=e.slice(0,g).trim().toLowerCase();let k=f.endsWith("*");if(k)f=f.slice(0,-1).trimRight();else if(d)continue;if(f==b){f=e.substr(g+1).trim();e=f.length-1;if(f[0]=='"'?f[e]=='"':f[0]=="'"&&f[e]=="'")f=f.slice(1,e);if(k&&f.includes("'")){if(f=f.split("'",3),k=f.shift().toLowerCase(),f=f.pop(),((e=k=="utf-8"||k=="utf8")||!d)&&(c=Nc(f))&&(d=k,e))break}else c=Nc(f)}}else g<
0&&c==null&&e.trim().toLowerCase()==b&&(c="")}return c}function Ic(a){const b=/[;,]/;return(a&&=a.split(b,1).shift().trim())&&!a.includes("=")&&Nc(a)||""}function Nc(a){try{return a&&decodeURIComponent(a)}catch(b){return unescape(a)}}
function Bc(a,b,c){let d;var e;let f=[];if(d=a.raw)for(e of d){var g=e.bytes;if(g)f.push(c?ma(new Uint8Array(g)):g);else return null}else if(e=a.formData)if(b=ha(b)?Z(b,"Content-Type"):b,(a=Ic(b).toLowerCase())&&a!="application/x-www-form-urlencoded")if(a=="multipart/form-data"){var k=Jc(b,"boundary");k||="----WebKitFormBoundary"+F().toString(36).substr(2);for(g in e)for(let h of e[g])c&&h instanceof ArrayBuffer&&(h=ma(new Uint8Array(h))),f.push("--",k,'\r\nContent-Disposition: form-data; name="',
g,'"\r\n\r\n',h??"","\r\n");f.push("--",k,"--\r\n")}else return null;else for(k in e){g=encodeURIComponent(k).replaceAll("%20","+");for(let h of e[k])h=h instanceof ArrayBuffer?escape(ma(new Uint8Array(h))):h==null?"":encodeURIComponent(h),f.length&&f.push("&"),f.push(g,"=",h&&h.replaceAll("%20","+"))}else return null;c&&(f=f.join(""));return f.length?f:null}function rb(a){let b=a.length,c=b,d=0;for(;d<c;){let e=a.charCodeAt(d++);e>=128&&(e>=2048?(b+=2,e-55296&64512||d++):b++)}return b}
function Oc(){let a=Ha=="llbjbkhnmlidjebalopleeepgdfgcpec"&&"ngpampappnmepgilojfohadhhmbhlaek";browser.management.get(a||"llbjbkhnmlidjebalopleeepgdfgcpec",function(b){browser.runtime.lastError;b&&b.enabled&&browser.management.setEnabled(a||Ha,!1)})}
function Ob(a,b){a=a.replace(/^\|+|\|+(?=\||$)/g,"").replace(/\./g,"\\.");a=b==1?a.replace(/\?/g,"[^/\\\\]").replace(/(^|[^*])\*(?!\*)/g,"$1[^/\\\\]*").replace(/\*\*/g,".*?"):b==3?a.replace(/(?<![*?])\*(?!\*)/g,"[^/]*").replace(/\?\*/g,"\\?.*").replace(/\*\*/g,".*?"):a.replace(/\?/g,".").replace(/\*/g,".*?");b==2&&(a=a.replace(/(^|\|)([^|]+?)~/g,"$1(?:$2\\.)?").replace(/(^|\|)~/g,"$1(?:.*?\\.)?"));return"^(?:"+a+")$"}
function Y(a,b,c,d){if(b=b[c]||void 0){b=Ob(b,d);try{b=RegExp(b,d==1?"":"i")}catch(e){b=null}}a[c]=b||Ma}
function yc(a,b,c,d,e){b=b[c];let f=[],g=[],k=[],h=[];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;){var l=m.shift();f.push(gb(l)?l:null);g.push(m.shift())}b=b.replace(/(^|\|)[\w#]+!/g,"$1")}if(e){let t=b.replace(/(^|\|)(?:(?=[^|]+?<[A-Z]:.*?>)|[^|]+)/g,
"$1").split("|");m=/<([A-Z]):(.*?)>/g;l={F:"[^/\\?#&;]%%",T:"[^/\\?#&;.]%%"};for(let p,r=0;t.length;++r)if(p=t.shift()){let v={},u=["^"],w="";for(let y,E=1;y=m.exec(p);++E)v[y[1]]=E++,w=RegExp.rightContext,u.push(RegExp.leftContext,"(",y[2].replace(/\*/g,l[y[1]]||".%%?"),")");u.push(w,"$");k[r]=v;h[r]=RegExp(u.join("").replace(/\*/g,".*?").replace(/%%/g,"*"))}b=b.replace(m,"(?:$2)")}b=b.replace(/\*/g,".*?").replace(/%%/g,"*");b=d||e?RegExp("^(?:("+b.replace(/\|/g,")|(")+"))$"):RegExp("^(?:"+b+")$")}catch(t){b=
null}a[c]=b||=RegExp("(?!)");d&&(b.jc=f,b.lc=g);e&&(b.kc=k,b.mc=h)}function uc(a){return browser.runtime.lastError?null:browser.permissions.request({permissions:[a]})}function Zb(a){browser.runtime.lastError;a;!0}
const Cb=[null,[!0,-8,"menu_download_link","link,image,video",Q.prototype.Ea],[!0,-8,"menu_download_link","page,frame,editable",Q.prototype.Ea,Sa],[!0,-8,"menu_download_selected","selection",Q.prototype.Qa],[!0,-9,"menu_download_all","page,frame,editable",Q.prototype.Qa],[q,-8,"menu_download_item","link",Q.prototype.Ea,["chrome://downloads/*"]]],Hb=Lb("tooltip_title"),Jb=Lb("tooltip_disabled"),Kb=Lb("tooltip_error"),Ib="\n"+Lb("tooltip_text");
(async function(){var a=browser.runtime.getPlatformInfo();let b,c;navigator.userAgentData?b=navigator.userAgentData.getHighEntropyValues(["fullVersionList","uaFullVersion"]):b=browser.runtime.getBrowserInfo?.();c=browser.privacy?.websites?.firstPartyIsolate?.get({});var d=q&&browser.management.get("clhiejnehegdfknplplojohghjaklbae").catch(()=>null);[a,b,c,d]=await Promise.all([a,b,c,d]);if(a&&a.os!="win")return Gb(!1);ba&&Oc();a=navigator.userAgent;var e=a.match(/\s(?!(?:Chrome|Firefox|Gecko|Safari)\/)([A-Z]\w+)(?:\/(\d+(?:\.\d+){0,3}))?\b(?!.*\)\s+\S)/),
f=a.match(/\s(Chrome|Firefox)\/(\d+(?:\.\d+){0,3})\b/);a=f?f[1]:"UNKNOWN";let g=e?e[1]:a;f=f&&f[2]||"0.0";e=e&&e[2]||f;x&&(a="Mozilla");q&&navigator.brave&&(g="Brave");q&&d&&(g="Epic",Ea=!0);if(G(b)){if(d=b.uaFullVersion)e=d;if(d=b.fullVersionList)for(let k of d){if(d=k.version)switch(k.brand){case "Chromium":a="Chrome";parseInt(d)==parseInt(f)?f=d:(g="UNKNOWN",e=d);break;case g:e=d}}else if(d=b.version)if(parseInt(d)>=53&&(f=d),d=b.name)g=d}d=f.split(/\D+/);Ba=`${a}/${f}`;Ca=`${g}/${e}`;browser.webRequest.ResourceType.OBJECT_SUBREQUEST&&
(N.push("object_subrequest"),Pa.push("object_subrequest"));G(c)&&(Da=c.value);new Q})();
