MediaWiki:DarkReader.js: Difference between revisions

From Galaxypedia
imported>Smallketchup82
No edit summary
imported>Smallketchup82
No edit summary
Line 21: Line 21:
ignoreInlineStyle: ['.mediaContainer', '.mediaContainer *', '.TemplateRevision', '.TemplateRevision *', '#homeButtonNav', '#homeButtonNav *', '.mw-wiki-logo'],
ignoreInlineStyle: ['.mediaContainer', '.mediaContainer *', '.TemplateRevision', '.TemplateRevision *', '#homeButtonNav', '#homeButtonNav *', '.mw-wiki-logo'],
css: '',
css: '',
ignoreImageAnalysis: null,
ignoreImageAnalysis: true,
invert: []
invert: []
});
});
console.log("Darkreader Enabled!");
console.log("Darkreader Enabled!");

Revision as of 04:30, 31 January 2022

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).DarkReader={})}(this,(function(e){"use strict";
/*! *****************************************************************************
    Copyright (c) Microsoft Corporation.

    Permission to use, copy, modify, and/or distribute this software for any
    purpose with or without fee is hereby granted.

    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
    REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
    AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
    INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
    LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
    OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
    PERFORMANCE OF THIS SOFTWARE.
    ***************************************************************************** */var t=function(){return t=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},t.apply(this,arguments)};function r(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{s(n.next(e))}catch(e){a(e)}}function u(e){try{s(n.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,u)}s((n=n.apply(e,t||[])).next())}))}function n(e,t){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}function o(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function a(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,a=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return i}function i(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}var u="bg-fetch-response",s="cs-fetch",c="undefined"==typeof navigator?"some useragent":navigator.userAgent.toLowerCase(),l="undefined"==typeof navigator?"some platform":navigator.platform.toLowerCase(),d=c.includes("chrome")||c.includes("chromium"),f=c.includes("thunderbird"),h=c.includes("firefox")||f;c.includes("vivaldi"),c.includes("yabrowser"),c.includes("opr")||c.includes("opera"),c.includes("edg");var p=c.includes("safari")&&!d,v=l.startsWith("win"),m=l.startsWith("mac");c.includes("mobile");var g,b="function"==typeof ShadowRoot,y="function"==typeof MediaQueryList&&"function"==typeof MediaQueryList.prototype.addEventListener;(g=c.match(/chrom[e|ium]\/([^ ]+)/))&&g[1]&&g[1];var k=function(){try{return document.querySelector(":defined"),!0}catch(e){return!1}}();function S(e,t,o){return r(this,void 0,void 0,(function(){var r;return n(this,(function(n){switch(n.label){case 0:return[4,fetch(e,{cache:"force-cache",credentials:"omit",referrer:o})];case 1:if(r=n.sent(),h&&"text/css"===t&&e.startsWith("moz-extension://")&&e.endsWith(".css"))return[2,r];if(t&&!r.headers.get("Content-Type").startsWith(t))throw new Error("Mime type mismatch when loading "+e);if(!r.ok)throw new Error("Unable to load "+e+" "+r.status+" "+r.statusText);return[2,r]}}))}))}function w(e,t){return r(this,void 0,void 0,(function(){return n(this,(function(r){switch(r.label){case 0:return[4,S(e,t)];case 1:return[4,_(r.sent())];case 2:return[2,r.sent()]}}))}))}function _(e){return r(this,void 0,void 0,(function(){var t;return n(this,(function(r){switch(r.label){case 0:return[4,e.blob()];case 1:return t=r.sent(),[4,new Promise((function(e){var r=new FileReader;r.onloadend=function(){return e(r.result)},r.readAsDataURL(t)}))];case 2:return[2,r.sent()]}}))}))}globalThis.chrome&&globalThis.chrome.runtime&&globalThis.chrome.runtime.getManifest&&globalThis.chrome.runtime.getManifest().manifest_version;var E=function(e){return r(void 0,void 0,void 0,(function(){return n(this,(function(t){return[2,Promise.reject(new Error(["Embedded Dark Reader cannot access a cross-origin resource",e,"Overview your URLs and CORS policies or use","`DarkReader.setFetchMethod(fetch: (url) => Promise<Response>))`.","See if using `DarkReader.setFetchMethod(window.fetch)`","before `DarkReader.enable()` works."].join(" ")))]}))}))},x=E;function C(e){return r(this,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,x(e)];case 1:return[2,t.sent()]}}))}))}window.chrome||(window.chrome={}),chrome.runtime||(chrome.runtime={});var V=new Set;function R(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r(this,void 0,void 0,(function(){var t,r,o,a,i,c,l;return n(this,(function(n){switch(n.label){case 0:if(!e[0]||e[0].type!==s)return[3,8];t=e[0].id,n.label=1;case 1:return n.trys.push([1,7,,8]),r=e[0].data,o=r.url,a=r.responseType,[4,C(o)];case 2:return i=n.sent(),"data-url"!==a?[3,4]:[4,_(i)];case 3:return c=n.sent(),[3,6];case 4:return[4,i.text()];case 5:c=n.sent(),n.label=6;case 6:return V.forEach((function(e){return e({type:u,data:c,error:null,id:t})})),[3,8];case 7:return l=n.sent(),console.error(l),V.forEach((function(e){return e({type:u,data:null,error:l,id:t})})),[3,8];case 8:return[2]}}))}))}function T(e){V.add(e)}if("function"==typeof chrome.runtime.sendMessage){var M=chrome.runtime.sendMessage;chrome.runtime.sendMessage=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];R.apply(void 0,i([],a(e),!1)),M.apply(chrome.runtime,e)}}else chrome.runtime.sendMessage=R;if(chrome.runtime.onMessage||(chrome.runtime.onMessage={}),"function"==typeof chrome.runtime.onMessage.addListener){var L=chrome.runtime.onMessage.addListener;chrome.runtime.onMessage.addListener=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];T(e[0]),L.apply(chrome.runtime.onMessage,e)}}else chrome.runtime.onMessage.addListener=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return T(e[0])};var A="dynamicTheme",P={background:"#181a1b",text:"#e8e6e3"},O={background:"#dcdad7",text:"#181a1b"},j={mode:1,brightness:100,contrast:100,grayscale:0,sepia:0,useFont:!1,fontFamily:m?"Helvetica Neue":v?"Segoe UI":"Open Sans",textStroke:0,engine:A,stylesheet:"",darkSchemeBackgroundColor:P.background,darkSchemeTextColor:P.text,lightSchemeBackgroundColor:O.background,lightSchemeTextColor:O.text,scrollbarColor:m?"":"auto",selectionColor:"auto",styleSystemControls:!0,lightColorScheme:"Default",darkColorScheme:"Default"};function D(e,t){var r,n;if(function(e){return null!=e.length}(e))for(var a=0,i=e.length;a<i;a++)t(e[a]);else try{for(var u=o(e),s=u.next();!s.done;s=u.next()){t(s.value)}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}}function F(e,t){D(t,(function(t){return e.push(t)}))}function N(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]}function q(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]}function B(e){var t,r=!1,n=null;return Object.assign((function(){for(var o=[],u=0;u<arguments.length;u++)o[u]=arguments[u];t=o,n?r=!0:(e.apply(void 0,i([],a(t),!1)),n=requestAnimationFrame((function(){n=null,r&&(e.apply(void 0,i([],a(t),!1)),r=!1)})))}),{cancel:function(){cancelAnimationFrame(n),r=!1,n=null}})}function W(e){var t=0;return e.seconds&&(t+=1e3*e.seconds),e.minutes&&(t+=60*e.minutes*1e3),e.hours&&(t+=60*e.hours*60*1e3),e.days&&(t+=24*e.days*60*60*1e3),t}function I(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function U(e,t,r){void 0===r&&(r=Function.prototype);var n=W({seconds:2}),o=W({seconds:10}),a=e.previousSibling,i=e.parentNode;if(!i)throw new Error("Unable to watch for node position: parent element not found");if("prev-sibling"===t&&!a)throw new Error("Unable to watch for node position: there is no previous sibling");var u=0,s=null,c=null,l=B((function(){if(!c){u++;var f=Date.now();if(null==s)s=f;else if(u>=10){if(f-s<o)return q("Node position watcher paused: retry in "+n+"ms",e,a),void(c=setTimeout((function(){s=null,u=0,c=null,l()}),n));s=f,u=1}if("parent"===t&&a&&a.parentNode!==i)return q("Unable to restore node position: sibling parent changed",e,a,i),void h();if("prev-sibling"===t){if(null==a.parentNode)return q("Unable to restore node position: sibling was removed",e,a,i),void h();a.parentNode!==i&&(q("Style was moved to another parent",e,a,i),p(a.parentNode))}q("Restoring node position",e,a,i),i.insertBefore(e,a?a.nextSibling:i.firstChild),d.takeRecords(),r&&r()}})),d=new MutationObserver((function(){("parent"===t&&e.parentNode!==i||"prev-sibling"===t&&e.previousSibling!==a)&&l()})),f=function(){d.observe(i,{childList:!0})},h=function(){clearTimeout(c),d.disconnect(),l.cancel()},p=function(e){i=e,h(),f()};return f(),{run:f,stop:h,skip:function(){d.takeRecords()}}}function $(e,t){if(null!=e)for(var r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:function(e){return null==e.shadowRoot?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT}}),n=e.shadowRoot?r.currentNode:r.nextNode();null!=n;n=r.nextNode())t(n),$(n.shadowRoot,t)}function z(){return"complete"===document.readyState||"interactive"===document.readyState}var H=new Set;function G(e){H.add(e)}function Q(e){H.delete(e)}function K(){return"complete"===document.readyState}var J=new Set;function X(e){J.add(e)}if(!z()){var Y=function(){z()&&(H.forEach((function(e){return e()})),H.clear(),K()&&(document.removeEventListener("readystatechange",Y),J.forEach((function(e){return e()})),J.clear()))};document.addEventListener("readystatechange",Y)}var Z,ee=new Map,te=new WeakMap;function re(e,t){var r,n,o;if(ee.has(e))r=ee.get(e),n=te.get(r);else{var a=!1,i=!1;r=new MutationObserver((function(t){if(function(e){if(e.length>1e3)return!0;for(var t=0,r=0;r<e.length;r++)if((t+=e[r].addedNodes.length)>1e3)return!0;return!1}(t))!a||z()?n.forEach((function(t){return(0,t.onHugeMutations)(e)})):i||(G(o=function(){return n.forEach((function(t){return(0,t.onHugeMutations)(e)}))}),i=!0),a=!0;else{var r=function(e){var t=new Set,r=new Set,n=new Set;e.forEach((function(e){D(e.addedNodes,(function(e){e instanceof Element&&e.isConnected&&t.add(e)})),D(e.removedNodes,(function(e){e instanceof Element&&(e.isConnected?(n.add(e),t.delete(e)):r.add(e))}))}));var o=[],a=[];return t.forEach((function(e){t.has(e.parentElement)&&o.push(e)})),r.forEach((function(e){r.has(e.parentElement)&&a.push(e)})),o.forEach((function(e){return t.delete(e)})),a.forEach((function(e){return r.delete(e)})),{additions:t,moves:n,deletions:r}}(t);n.forEach((function(e){return(0,e.onMinorMutations)(r)}))}})),r.observe(e,{childList:!0,subtree:!0}),ee.set(e,r),n=new Set,te.set(r,n)}return n.add(t),{disconnect:function(){n.delete(t),o&&Q(o),0===n.size&&(r.disconnect(),te.delete(r),ee.delete(e))}}}var ne=new Map;function oe(e){return Z||(Z=document.createElement("a")),Z.href=e,Z.href}function ae(e,t){void 0===t&&(t=null);var r=e+(t?";"+t:"");if(ne.has(r))return ne.get(r);if(t){var n=new URL(e,oe(t));return ne.set(r,n),n}var o=new URL(oe(e));return ne.set(e,o),o}function ie(e,t){if(t.match(/^data\\?\:/))return t;if(/^\/\//.test(t))return""+location.protocol+t;var r=ae(e);return ae(t,r.href).href}function ue(e,t,r){D(e,(function(e){if(e.selectorText)t(e);else if(e.href)try{ue(e.styleSheet.cssRules,t,r)}catch(e){N("Found a non-loaded link."),r&&r()}else if(e.media){var n=Array.from(e.media),o=n.some((function(e){return e.startsWith("screen")||e.startsWith("all")||e.startsWith("(")})),a=n.some((function(e){return e.startsWith("print")||e.startsWith("speech")}));!o&&a||ue(e.cssRules,t,r)}else e.conditionText?CSS.supports(e.conditionText)&&ue(e.cssRules,t,r):q("CSSRule type not supported",e)}))}var se=["background","border","border-color","border-bottom","border-left","border-right","border-top","outline","outline-color"],ce=p?se.map((function(e){return[e,new RegExp(e+":\\s*(.*?)\\s*;")]})):null;function le(e,t){D(e,(function(r){var n=e.getPropertyValue(r).trim();n&&t(r,n)}));var r=e.cssText;r.includes("var(")&&(p?ce.forEach((function(e){var n=a(e,2),o=n[0],i=n[1],u=r.match(i);if(u&&u[1]){var s=u[1].trim();t(o,s)}})):se.forEach((function(r){var n=e.getPropertyValue(r);n&&n.includes("var(")&&t(r,n)})))}var de=/url\((('.+?')|(".+?")|([^\)]*?))\)/g,fe=/@import\s*(url\()?(('.+?')|(".+?")|([^\)]*?))\)? ?(screen)?;?/g;function he(e){return e.replace(/^url\((.*)\)$/,"$1").trim().replace(/^"(.*)"$/,"$1").replace(/^'(.*)'$/,"$1")}function pe(e){var t=ae(e);return""+t.origin+t.pathname.replace(/\?.*$/,"").replace(/(\/)([^\/]+)$/i,"$1")}var ve=/\/\*[\s\S]*?\*\//g;var me=/@font-face\s*{[^}]*}/g;function ge(e){var t=e.h,r=e.s,n=e.l,o=e.a,i=void 0===o?1:o;if(0===r){var u=a([n,n,n].map((function(e){return Math.round(255*e)})),3),s=u[0],c=u[1];return{r:s,g:u[2],b:c,a:i}}var l=(1-Math.abs(2*n-1))*r,d=l*(1-Math.abs(t/60%2-1)),f=n-l/2,h=a((t<60?[l,d,0]:t<120?[d,l,0]:t<180?[0,l,d]:t<240?[0,d,l]:t<300?[d,0,l]:[l,0,d]).map((function(e){return Math.round(255*(e+f))})),3);return{r:h[0],g:h[1],b:h[2],a:i}}function be(e){var t=e.r,r=e.g,n=e.b,o=e.a,a=void 0===o?1:o,i=t/255,u=r/255,s=n/255,c=Math.max(i,u,s),l=Math.min(i,u,s),d=c-l,f=(c+l)/2;if(0===d)return{h:0,s:0,l:f,a:a};var h=60*(c===i?(u-s)/d%6:c===u?(s-i)/d+2:(i-u)/d+4);return h<0&&(h+=360),{h:h,s:d/(1-Math.abs(2*f-1)),l:f,a:a}}function ye(e,t){void 0===t&&(t=0);var r=e.toFixed(t);if(0===t)return r;var n=r.indexOf(".");if(n>=0){var o=r.match(/0+$/);if(o)return o.index===n+1?r.substring(0,n):r.substring(0,o.index)}return r}function ke(e){var t=e.h,r=e.s,n=e.l,o=e.a;return null!=o&&o<1?"hsla("+ye(t)+", "+ye(100*r)+"%, "+ye(100*n)+"%, "+ye(o,2)+")":"hsl("+ye(t)+", "+ye(100*r)+"%, "+ye(100*n)+"%)"}var Se=/^rgba?\([^\(\)]+\)$/,we=/^hsla?\([^\(\)]+\)$/,_e=/^#[0-9a-f]+$/i;function Ee(e){var t,r,n,o,i,u=e.trim().toLowerCase();if(u.match(Se))return t=a(xe(u,Ce,Ve),4),r=t[0],n=t[1],o=t[2],i=t[3],{r:r,g:n,b:o,a:void 0===i?1:i};if(u.match(we))return function(e){var t=a(xe(e,Re,Te),4),r=t[0],n=t[1],o=t[2],i=t[3];return ge({h:r,s:n,l:o,a:void 0===i?1:i})}(u);if(u.match(_e))return function(e){var t=e.substring(1);switch(t.length){case 3:case 4:var r=a([0,1,2].map((function(e){return parseInt(""+t[e]+t[e],16)})),3);return{r:r[0],g:r[1],b:r[2],a:3===t.length?1:parseInt(""+t[3]+t[3],16)/255};case 6:case 8:var n=a([0,2,4].map((function(e){return parseInt(t.substring(e,e+2),16)})),3);return{r:n[0],g:n[1],b:n[2],a:6===t.length?1:parseInt(t.substring(6,8),16)/255}}throw new Error("Unable to parse "+e)}(u);if(Ae.has(u))return function(e){var t=Ae.get(e);return{r:t>>16&255,g:t>>8&255,b:t>>0&255,a:1}}(u);if(Pe.has(u))return function(e){var t=Pe.get(e);return{r:t>>16&255,g:t>>8&255,b:t>>0&255,a:1}}(u);if("transparent"===e)return{r:0,g:0,b:0,a:0};throw new Error("Unable to parse "+e)}function xe(e,t,r){var n=function(e){var t=[],r=0,n=!1,o=e.indexOf("(");e=e.substring(o+1,e.length-1);for(var a=0;a<e.length;a++){var i=e[a];i>="0"&&i<="9"||"."===i||"+"===i||"-"===i?n=!0:!n||" "!==i&&","!==i?n||(r=a+1):(t.push(e.substring(r,a)),n=!1,r=a+1)}return n&&t.push(e.substring(r,e.length)),t}(e),o=Object.entries(r);return n.map((function(e){return e.trim()})).map((function(e,r){var n,i=o.find((function(t){var r=a(t,1)[0];return e.endsWith(r)}));return n=i?parseFloat(e.substring(0,e.length-i[0].length))/i[1]*t[r]:parseFloat(e),t[r]>1?Math.round(n):n}))}var Ce=[255,255,255,1],Ve={"%":100};var Re=[360,1,1,1],Te={"%":100,deg:360,rad:2*Math.PI,turn:1};var Me=function(e){return e>="0"&&e<="9"};function Le(e){for(var t=0,r=function(t,r,n){e=e.substring(0,t)+n+e.substring(r)},n=function(){for(var r=0,n=1;n<4;n++){var o=e[t+n];if(" "===o)break;if(!Me(o))break;r*=10,r+=Number(o)}var a,i=(a=r,Math.floor(Math.log10(a))+1);if("%"===e[(t+=i)+1])return t++,r};0!==(t=e.indexOf("calc("));){var o=t;t+=4;var a=n();if(!a)break;if(" "!==e[t+1])break;t++;var i=e[t+1];if("+"!==i&&"-"!==i)break;if(t++," "!==e[t+1])break;t++;var u=n();if(!u)break;r(o,t+2,"+"===i?a+u+"%":a-u+"%")}return e}var Ae=new Map(Object.entries({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgrey:11119017,darkgreen:25600,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,grey:8421504,green:32768,greenyellow:11403055,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgrey:13882323,lightgreen:9498256,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074})),Pe=new Map(Object.entries({ActiveBorder:3906044,ActiveCaption:0,AppWorkspace:11184810,Background:6513614,ButtonFace:16777215,ButtonHighlight:15329769,ButtonShadow:10461343,ButtonText:0,CaptionText:0,GrayText:8355711,Highlight:11720703,HighlightText:0,InactiveBorder:16777215,InactiveCaption:16777215,InactiveCaptionText:0,InfoBackground:16514245,InfoText:0,Menu:16185078,MenuText:16777215,Scrollbar:11184810,ThreeDDarkShadow:0,ThreeDFace:12632256,ThreeDHighlight:16777215,ThreeDLightShadow:16777215,ThreeDShadow:0,Window:15527148,WindowFrame:11184810,WindowText:0,"-webkit-focus-ring-color":15046400}).map((function(e){var t=a(e,2),r=t[0],n=t[1];return[r.toLowerCase(),n]})));function Oe(e,t,r,n,o){return(e-t)*(o-n)/(r-t)+n}function je(e,t,r){return Math.min(r,Math.max(t,e))}function De(e,t){for(var r=[],n=0,o=e.length;n<o;n++){r[n]=[];for(var a=0,i=t[0].length;a<i;a++){for(var u=0,s=0,c=e[0].length;s<c;s++)u+=e[n][s]*t[s][a];r[n][a]=u}}return r}function Fe(e,t,r){void 0===r&&(r=0);for(var n,o=[];n=e.exec(t);)o.push(n[r]);return o}function Ne(e){var t=qe.identity();return 0!==e.sepia&&(t=De(t,qe.sepia(e.sepia/100))),0!==e.grayscale&&(t=De(t,qe.grayscale(e.grayscale/100))),100!==e.contrast&&(t=De(t,qe.contrast(e.contrast/100))),100!==e.brightness&&(t=De(t,qe.brightness(e.brightness/100))),1===e.mode&&(t=De(t,qe.invertNHue())),t}var qe={identity:function(){return[[1,0,0,0,0],[0,1,0,0,0],[0,0,1,0,0],[0,0,0,1,0],[0,0,0,0,1]]},invertNHue:function(){return[[.333,-.667,-.667,0,1],[-.667,.333,-.667,0,1],[-.667,-.667,.333,0,1],[0,0,0,1,0],[0,0,0,0,1]]},brightness:function(e){return[[e,0,0,0,0],[0,e,0,0,0],[0,0,e,0,0],[0,0,0,1,0],[0,0,0,0,1]]},contrast:function(e){var t=(1-e)/2;return[[e,0,0,0,t],[0,e,0,0,t],[0,0,e,0,t],[0,0,0,1,0],[0,0,0,0,1]]},sepia:function(e){return[[.393+.607*(1-e),.769-.769*(1-e),.189-.189*(1-e),0,0],[.349-.349*(1-e),.686+.314*(1-e),.168-.168*(1-e),0,0],[.272-.272*(1-e),.534-.534*(1-e),.131+.869*(1-e),0,0],[0,0,0,1,0],[0,0,0,0,1]]},grayscale:function(e){return[[.2126+.7874*(1-e),.7152-.7152*(1-e),.0722-.0722*(1-e),0,0],[.2126-.2126*(1-e),.7152+.2848*(1-e),.0722-.0722*(1-e),0,0],[.2126-.2126*(1-e),.7152-.7152*(1-e),.0722+.9278*(1-e),0,0],[0,0,0,1,0],[0,0,0,0,1]]}};function Be(e){return e[1===e.mode?"darkSchemeBackgroundColor":"lightSchemeBackgroundColor"]}function We(e){return e[1===e.mode?"darkSchemeTextColor":"lightSchemeTextColor"]}var Ie=new Map,Ue=new Map;function $e(e){if(Ue.has(e))return Ue.get(e);var t=be(Ee(e));return Ue.set(e,t),t}var ze=["r","g","b","a"],He=["mode","brightness","contrast","grayscale","sepia","darkSchemeBackgroundColor","darkSchemeTextColor","lightSchemeBackgroundColor","lightSchemeTextColor"];function Ge(e,t,r,n,o){var i;Ie.has(r)?i=Ie.get(r):(i=new Map,Ie.set(r,i));var u=function(e,t){var r="";return ze.forEach((function(t){r+=e[t]+";"})),He.forEach((function(e){r+=t[e]+";"})),r}(e,t);if(i.has(u))return i.get(u);var s=ge(r(be(e),null==n?null:$e(n),null==o?null:$e(o))),c=s.r,l=s.g,d=s.b,f=s.a,h=a(function(e,t){var r=a(e,3),n=De(t,[[r[0]/255],[r[1]/255],[r[2]/255],[1],[1]]);return[0,1,2].map((function(e){return je(Math.round(255*n[e][0]),0,255)}))}([c,l,d],Ne(t)),3),p=h[0],v=h[1],m=h[2],g=1===f?function(e){var t=e.r,r=e.g,n=e.b,o=e.a;return"#"+(null!=o&&o<1?[t,r,n,Math.round(255*o)]:[t,r,n]).map((function(e){return(e<16?"0":"")+e.toString(16)})).join("")}({r:p,g:v,b:m}):function(e){var t=e.r,r=e.g,n=e.b,o=e.a;return null!=o&&o<1?"rgba("+ye(t)+", "+ye(r)+", "+ye(n)+", "+ye(o,2)+")":"rgb("+ye(t)+", "+ye(r)+", "+ye(n)+")"}({r:p,g:v,b:m,a:f});return i.set(u,g),g}function Qe(e){return e}function Ke(e,t){var r=Be(t);return Ge(e,t,Je,We(t),r)}function Je(e,t,r){var n,o=e.h,a=e.s,i=e.l,u=e.a,s=i<.5;s?n=i<.2||a<.12:n=a<.24||i>.8&&(o>200&&o<280);var c=o,l=i;return n&&(s?(c=t.h,l=t.s):(c=r.h,l=r.s)),{h:c,s:l,l:Oe(i,0,1,t.l,r.l),a:u}}function Xe(e,t){var r=e.h,n=e.s,o=e.l,a=e.a,i=n<.12||o>.8&&(r>200&&r<280);if(o<.5){var u=Oe(o,0,.5,0,.4);return i?{h:t.h,s:t.s,l:u,a:a}:{h:r,s:n,l:u,a:a}}var s=Oe(o,.5,1,.4,t.l);if(i)return{h:t.h,s:t.s,l:s,a:a};var c=r;r>60&&r<180&&(c=r>120?Oe(r,120,180,135,180):Oe(r,60,120,60,105));return{h:c,s:n,l:s,a:a}}function Ye(e,r){if(0===r.mode)return Ke(e,r);var n=Be(r);return Ge(e,t(t({},r),{mode:0}),Xe,n)}var Ze,et=.55;function tt(e){return Oe(e,205,245,205,220)}function rt(e,t){var r=e.h,n=e.s,o=e.l,a=e.a,i=o<.2||n<.24,u=!i&&r>205&&r<245;if(o>.5){var s=Oe(o,.5,1,et,t.l);if(i)return{h:t.h,s:t.s,l:s,a:a};var c=r;return u&&(c=tt(r)),{h:c,s:n,l:s,a:a}}if(i)return{h:t.h,s:t.s,l:Oe(o,0,.5,t.l,et),a:a};var l,d=r;return u?(d=tt(r),l=Oe(o,0,.5,t.l,Math.min(1,.6000000000000001))):l=Oe(o,0,.5,t.l,et),{h:d,s:n,l:l,a:a}}function nt(e,r){if(0===r.mode)return Ke(e,r);var n=We(r);return Ge(e,t(t({},r),{mode:0}),rt,n)}function ot(e,t,r){var n=e.h,o=e.s,a=e.l,i=e.a,u=n,s=o;return(a<.2||o<.24)&&(a<.5?(u=t.h,s=t.s):(u=r.h,s=r.s)),{h:u,s:s,l:Oe(a,0,1,.5,.2),a:i}}function at(e,r){if(0===r.mode)return Ke(e,r);var n=We(r),o=Be(r);return Ge(e,t(t({},r),{mode:0}),ot,n,o)}function it(e,t){return Ye(e,t)}function ut(e){var t=[];return e.mode===Ze.dark&&t.push("invert(100%) hue-rotate(180deg)"),100!==e.brightness&&t.push("brightness("+e.brightness+"%)"),100!==e.contrast&&t.push("contrast("+e.contrast+"%)"),0!==e.grayscale&&t.push("grayscale("+e.grayscale+"%)"),0!==e.sepia&&t.push("sepia("+e.sepia+"%)"),0===t.length?null:t.join(" ")}!function(e){e[e.light=0]="light",e[e.dark=1]="dark"}(Ze||(Ze={}));var st=0,ct=new Map,lt=new Map;function dt(e){return r(this,void 0,void 0,(function(){return n(this,(function(t){return[2,new Promise((function(t,r){var n=++st;ct.set(n,t),lt.set(n,r),chrome.runtime.sendMessage({type:s,data:e,id:n})}))]}))}))}chrome.runtime.onMessage.addListener((function(e){var t=e.type,r=e.data,n=e.error,o=e.id;if(t===u){var a=ct.get(o),i=lt.get(o);ct.delete(o),lt.delete(o),n?i&&i(n):a&&a(r)}}));var ft=new(function(){function e(){this.queue=[],this.timerId=null,this.frameDuration=1e3/60}return e.prototype.addToQueue=function(e){this.queue.push(e),this.startQueue()},e.prototype.stopQueue=function(){null!==this.timerId&&(cancelAnimationFrame(this.timerId),this.timerId=null),this.queue=[]},e.prototype.startQueue=function(){var e=this;this.timerId||(this.timerId=requestAnimationFrame((function(){e.timerId=null;for(var t,r=Date.now();t=e.queue.shift();)if(t(),Date.now()-r>=e.frameDuration){e.startQueue();break}})))},e}());function ht(e){return r(this,void 0,void 0,(function(){var o=this;return n(this,(function(a){return[2,new Promise((function(a,i){return r(o,void 0,void 0,(function(){var r,o,u,s;return n(this,(function(n){switch(n.label){case 0:return e.startsWith("data:")?(r=e,[3,4]):[3,1];case 1:return n.trys.push([1,3,,4]),[4,pt(e)];case 2:return r=n.sent(),[3,4];case 3:return o=n.sent(),i(o),[2];case 4:return n.trys.push([4,6,,7]),[4,vt(r)];case 5:return u=n.sent(),ft.addToQueue((function(){a(t({src:e,dataURL:r,width:u.naturalWidth,height:u.naturalHeight},function(e){mt||(t=bt,r=bt,(mt=document.createElement("canvas")).width=t,mt.height=r,(gt=mt.getContext("2d")).imageSmoothingEnabled=!1);var t,r;var n=e.naturalWidth,o=e.naturalHeight;if(0===o||0===n)return q("logWarn(Image is empty "+e.currentSrc+")"),null;if(n*o*4>yt)return N("Skipped large image analyzing(Larger than 5mb in memory)"),{isDark:!1,isLight:!1,isTransparent:!1,isLarge:!1,isTooLarge:!0};var a=n*o,i=Math.min(1,Math.sqrt(bt/a)),u=Math.ceil(n*i),s=Math.ceil(o*i);gt.clearRect(0,0,u,s),gt.drawImage(e,0,0,n,o,0,0,u,s);var c,l,d,f,h,p,v,m=gt.getImageData(0,0,u,s).data,g=.05,b=.4,y=.7,k=0,S=0,w=0;for(d=0;d<s;d++)for(l=0;l<u;l++)f=m[(c=4*(d*u+l))+0]/255,h=m[c+1]/255,p=m[c+2]/255,m[c+3]/255<g?k++:((v=.2126*f+.7152*h+.0722*p)<b&&S++,v>y&&w++);var _=u*s,E=_-k;return{isDark:S/E>=.7,isLight:w/E>=.7,isTransparent:k/_>=.1,isLarge:a>=48e4,isTooLarge:!1}}(u)))})),[3,7];case 6:return s=n.sent(),i(s),[3,7];case 7:return[2]}}))}))}))]}))}))}function pt(e){return r(this,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return new URL(e).origin!==location.origin?[3,2]:[4,w(e)];case 1:case 3:return[2,t.sent()];case 2:return[4,dt({url:e,responseType:"data-url"})]}}))}))}function vt(e){return r(this,void 0,void 0,(function(){return n(this,(function(t){return[2,new Promise((function(t,r){var n=new Image;n.onload=function(){return t(n)},n.onerror=function(){return r("Unable to load image "+e)},n.src=e}))]}))}))}var mt,gt,bt=1024;var yt=5242880;function kt(e,t){var r=e.dataURL,n=e.width,o=e.height,a=Ne(t).slice(0,4).map((function(e){return e.map((function(e){return e.toFixed(3)})).join(" ")})).join(" "),i=['<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+n+'" height="'+o+'">',"<defs>",'<filter id="darkreader-image-filter">','<feColorMatrix type="matrix" values="'+a+'" />',"</filter>","</defs>",'<image width="'+n+'" height="'+o+'" filter="url(#darkreader-image-filter)" xlink:href="'+r+'" />',"</svg>"].join("");return"data:image/svg+xml;base64,"+btoa(i)}function St(){ft&&ft.stopQueue(),mt=null,gt=null}function wt(e,t){return Boolean(e&&e.getPropertyPriority(t))}function _t(e,t,r,n,o,a){if(e.startsWith("--")){var i=function(e,t,r,n,o,a){return e.getModifierForVariable({varName:t,sourceValue:r,rule:n,ignoredImgSelectors:o,isCancelled:a})}(n,e,t,r,o,a);if(i)return{property:e,value:i,important:wt(r.style,e),sourceValue:t}}else if(t.includes("var(")){i=function(e,t,r){return e.getModifierForVarDependant(t,r)}(n,e,t);if(i)return{property:e,value:i,important:wt(r.style,e),sourceValue:t}}else if(e.includes("color")&&"-webkit-print-color-adjust"!==e||"fill"===e||"stroke"===e||"stop-color"===e){i=function(e,t){if(Vt.has(t.toLowerCase()))return t;try{var r=Tt(t);return e.includes("background")?function(e){return Ye(r,e)}:e.includes("border")||e.includes("outline")?function(e){return at(r,e)}:function(e){return nt(r,e)}}catch(e){return q("Color parse error",e),null}}(e,t);if(i)return{property:e,value:i,important:wt(r.style,e),sourceValue:t}}else if("background-image"===e||"list-style-image"===e){if(i=Ot(t,r,o,a))return{property:e,value:i,important:wt(r.style,e),sourceValue:t}}else if(e.includes("shadow")){i=function(e){var t=jt(e);if(!t)return null;return function(e){return t(e).result}}(t);if(i)return{property:e,value:i,important:wt(r.style,e),sourceValue:t}}return null}function Et(e,r,n){var o=[];return r||(o.push("html {"),o.push("    background-color: "+Ye({r:255,g:255,b:255},e)+" !important;"),o.push("}")),o.push((r?"":"html, body, ")+(n?"input, textarea, select, button":"")+" {"),o.push("    background-color: "+Ye({r:255,g:255,b:255},e)+";"),o.push("}"),o.push("html, body, "+(n?"input, textarea, select, button":"")+" {"),o.push("    border-color: "+at({r:76,g:76,b:76},e)+";"),o.push("    color: "+nt({r:0,g:0,b:0},e)+";"),o.push("}"),o.push("a {"),o.push("    color: "+nt({r:0,g:64,b:255},e)+";"),o.push("}"),o.push("table {"),o.push("    border-color: "+at({r:128,g:128,b:128},e)+";"),o.push("}"),o.push("::placeholder {"),o.push("    color: "+nt({r:169,g:169,b:169},e)+";"),o.push("}"),o.push("input:-webkit-autofill,"),o.push("textarea:-webkit-autofill,"),o.push("select:-webkit-autofill {"),o.push("    background-color: "+Ye({r:250,g:255,b:189},e)+" !important;"),o.push("    color: "+nt({r:0,g:0,b:0},e)+" !important;"),o.push("}"),e.scrollbarColor&&o.push(function(e){var r,n,o,a,i,u,s=[];if("auto"===e.scrollbarColor)r=Ye({r:241,g:241,b:241},e),n=nt({r:96,g:96,b:96},e),o=Ye({r:176,g:176,b:176},e),a=Ye({r:144,g:144,b:144},e),i=Ye({r:96,g:96,b:96},e),u=Ye({r:255,g:255,b:255},e);else{var c=be(Ee(e.scrollbarColor)),l=c.l>.5,d=function(e){return t(t({},c),{l:je(c.l+e,0,1)})},f=function(e){return t(t({},c),{l:je(c.l-e,0,1)})};r=ke(f(.4)),n=ke(l?f(.4):d(.4)),o=ke(c),a=ke(d(.1)),i=ke(d(.2))}s.push("::-webkit-scrollbar {"),s.push("    background-color: "+r+";"),s.push("    color: "+n+";"),s.push("}"),s.push("::-webkit-scrollbar-thumb {"),s.push("    background-color: "+o+";"),s.push("}"),s.push("::-webkit-scrollbar-thumb:hover {"),s.push("    background-color: "+a+";"),s.push("}"),s.push("::-webkit-scrollbar-thumb:active {"),s.push("    background-color: "+i+";"),s.push("}"),s.push("::-webkit-scrollbar-corner {"),s.push("    background-color: "+u+";"),s.push("}"),h&&(s.push("* {"),s.push("    scrollbar-color: "+o+" "+r+";"),s.push("}"));return s.join("\n")}(e)),e.selectionColor&&o.push(function(e){var t=[],r=xt(e),n=r.backgroundColorSelection,o=r.foregroundColorSelection;return["::selection","::-moz-selection"].forEach((function(e){t.push(e+" {"),t.push("    background-color: "+n+" !important;"),t.push("    color: "+o+" !important;"),t.push("}")})),t.join("\n")}(e)),o.join("\n")}function xt(e){var r,n;if("auto"===e.selectionColor)r=Ye({r:0,g:96,b:212},t(t({},e),{grayscale:0})),n=nt({r:255,g:255,b:255},t(t({},e),{grayscale:0}));else{var o=be(Ee(e.selectionColor));r=e.selectionColor,n=o.l<.5?"#FFF":"#000"}return{backgroundColorSelection:r,foregroundColorSelection:n}}function Ct(e,t){var r=t.strict,n=[],o=location.hostname.endsWith("microsoft.com");return n.push("html, body, "+(r?"body :not(iframe)"+(o?':not(div[style^="position:absolute;top:0;left:-"]':""):"body > :not(iframe)")+" {"),n.push("    background-color: "+Ye({r:255,g:255,b:255},e)+" !important;"),n.push("    border-color: "+at({r:64,g:64,b:64},e)+" !important;"),n.push("    color: "+nt({r:0,g:0,b:0},e)+" !important;"),n.push("}"),n.join("\n")}var Vt=new Set(["inherit","transparent","initial","currentcolor","none","unset"]),Rt=new Map;function Tt(e){if(e=e.trim(),Rt.has(e))return Rt.get(e);e.includes("calc(")&&(e=Le(e));var t=Ee(e);return Rt.set(e,t),t}function Mt(e){try{return Tt(e)}catch(e){return null}}var Lt=/[\-a-z]+gradient\(([^\(\)]*(\(([^\(\)]*(\(.*?\)))*[^\(\)]*\))){0,15}[^\(\)]*\)/g,At=new Map,Pt=new Map;function Ot(e,o,a,i){var u=this;try{var s=Fe(Lt,e),c=Fe(de,e);if(0===c.length&&0===s.length)return e;var l=function(t){var r=0;return t.map((function(t){var n=e.indexOf(t,r);return r=n+t.length,{match:t,index:n}}))},d=l(c).map((function(e){return t({type:"url"},e)})).concat(l(s).map((function(e){return t({type:"gradient"},e)}))).sort((function(e,t){return e.index-t.index})),f=function(e,r){var n,o=e.isDark,a=e.isLight,i=e.isTransparent,u=e.isLarge,s=e.isTooLarge,c=e.width;if(s)n='url("'+e.src+'")';else if(o&&i&&1===r.mode&&!u&&c>2){N("Inverting dark image "+e.src),n='url("'+kt(e,t(t({},r),{sepia:je(r.sepia+10,0,100)}))+'")'}else if(a&&!i&&1===r.mode){if(u)n="none";else N("Dimming light image "+e.src),n='url("'+kt(e,r)+'")'}else if(0===r.mode&&a&&!u){N("Applying filter to image "+e.src),n='url("'+kt(e,t(t({},r),{brightness:je(r.brightness-10,5,200),sepia:je(r.sepia+10,0,100)}))+'")'}else n=null;return n},h=[],p=0;return d.forEach((function(t,s){var c=t.match,l=t.type,v=t.index,m=p,g=v+c.length;p=g,h.push((function(){return e.substring(m,v)})),h.push("url"===l?function(e){var t;if(function(e,t){if(!e||0===t.length)return!1;if(t.some((function(e){return"*"===e})))return!0;for(var r=e.split(/,\s*/g),n=function(e){var n=t[e];if(r.some((function(e){return e===n})))return{value:!0}},o=0;o<t.length;o++){var a=n(o);if("object"==typeof a)return a.value}return!1}(o.selectorText,a))return null;var s=he(e),c=o.parentStyleSheet,l=c&&c.href?pe(c.href):(null===(t=c.ownerNode)||void 0===t?void 0:t.baseURI)||location.origin,d='url("'+(s=ie(l,s))+'")';return function(e){return r(u,void 0,void 0,(function(){var t,r;return n(this,(function(n){switch(n.label){case 0:return At.has(s)?(t=At.get(s),[3,7]):[3,1];case 1:return n.trys.push([1,6,,7]),Pt.has(s)?(r=Pt.get(s),[4,new Promise((function(e){return r.push(e)}))]):[3,3];case 2:return(t=n.sent())?[3,5]:[2,null];case 3:return Pt.set(s,[]),[4,ht(s)];case 4:t=n.sent(),At.set(s,t),Pt.get(s).forEach((function(e){return e(t)})),Pt.delete(s),n.label=5;case 5:return i()?[2,null]:[3,7];case 6:return q(n.sent()),Pt.has(s)&&(Pt.get(s).forEach((function(e){return e(null)})),Pt.delete(s)),[2,d];case 7:return[2,f(t,e)||d]}}))}))}}(c):function(e){var t=e.match(/^(.*-gradient)\((.*)\)$/),r=t[1],n=t[2],o=/^(from|color-stop|to)\(([^\(\)]*?,\s*)?(.*?)\)$/,a=Fe(/([^\(\),]+(\([^\(\)]*(\([^\(\)]*\)*[^\(\)]*)?\))?[^\(\),]*),?/g,n,1).map((function(e){var t=Mt(e=e.trim());if(t)return function(e){return it(t,e)};var r=e.lastIndexOf(" ");if(t=Mt(e.substring(0,r)))return function(n){return it(t,n)+" "+e.substring(r+1)};var n=e.match(o);return n&&(t=Mt(n[3]))?function(e){return n[1]+"("+(n[2]?n[2]+", ":"")+it(t,e)+")"}:function(){return e}}));return function(e){return r+"("+a.map((function(t){return t(e)})).join(", ")+")"}}(c)),s===d.length-1&&h.push((function(){return e.substring(g)}))})),function(e){var t=h.filter(Boolean).map((function(t){return t(e)}));return t.some((function(e){return e instanceof Promise}))?Promise.all(t).then((function(e){return e.join("")})):t.join("")}}catch(t){return q("Unable to parse gradient "+e,t),null}}function jt(e){try{var t=0,r=Fe(/(^|\s)(?!calc)([a-z]+\(.+?\)|#[0-9a-f]+|[a-z]+)(.*?(inset|outset)?($|,))/gi,e,2),n=0,o=r.map((function(o,a){var i=t,u=e.indexOf(o,t),s=u+o.length;t=s;var c=Mt(o);return c?function(t){return""+e.substring(i,u)+function(e,t){return Ye(e,t)}(c,t)+(a===r.length-1?e.substring(s):"")}:(n++,function(){return e.substring(i,s)})}));return function(e){var t=o.map((function(t){return t(e)})).join("");return{matchesLength:r.length,unparseableMatchesLength:n,result:t}}}catch(t){return q("Unable to parse shadow "+e,t),null}}function Dt(){Rt.clear(),Ie.clear(),Ue.clear(),At.clear(),St(),Pt.clear()}var Ft=new(function(){function e(){this.varTypes=new Map,this.rulesQueue=[],this.definedVars=new Set,this.varRefs=new Map,this.unknownColorVars=new Set,this.unknownBgVars=new Set,this.undefinedVars=new Set,this.initialVarTypes=new Map,this.changedTypeVars=new Set,this.typeChangeSubscriptions=new Map,this.unstableVarValues=new Map}return e.prototype.clear=function(){this.varTypes.clear(),this.rulesQueue.splice(0),this.definedVars.clear(),this.varRefs.clear(),this.unknownColorVars.clear(),this.unknownBgVars.clear(),this.undefinedVars.clear(),this.initialVarTypes.clear(),this.changedTypeVars.clear(),this.typeChangeSubscriptions.clear(),this.unstableVarValues.clear()},e.prototype.isVarType=function(e,t){return this.varTypes.has(e)&&(this.varTypes.get(e)&t)>0},e.prototype.addRulesForMatching=function(e){this.rulesQueue.push(e)},e.prototype.matchVariablesAndDependants=function(){var e=this;this.changedTypeVars.clear(),this.initialVarTypes=new Map(this.varTypes),this.collectRootVariables(),this.collectVariablesAndVarDep(this.rulesQueue),this.rulesQueue.splice(0),this.collectRootVarDependants(),this.varRefs.forEach((function(t,r){t.forEach((function(t){e.varTypes.has(r)&&e.resolveVariableType(t,e.varTypes.get(r))}))})),this.unknownColorVars.forEach((function(t){e.unknownBgVars.has(t)?(e.unknownColorVars.delete(t),e.unknownBgVars.delete(t),e.resolveVariableType(t,1)):e.isVarType(t,7)?e.unknownColorVars.delete(t):e.undefinedVars.add(t)})),this.unknownBgVars.forEach((function(t){null!=e.findVarRef(t,(function(t){return e.unknownColorVars.has(t)||e.isVarType(t,6)}))?e.itarateVarRefs(t,(function(t){e.resolveVariableType(t,1)})):e.isVarType(t,9)?e.unknownBgVars.delete(t):e.undefinedVars.add(t)})),this.changedTypeVars.forEach((function(t){e.typeChangeSubscriptions.has(t)&&e.typeChangeSubscriptions.get(t).forEach((function(e){e()}))})),this.changedTypeVars.clear()},e.prototype.getModifierForVariable=function(e){var t=this;return function(r){var n=e.varName,o=e.sourceValue,a=e.rule,i=e.ignoredImgSelectors,u=e.isCancelled,s=function(){var e=[],s=function(a,i,u){if(t.isVarType(n,a)){var s,c=i(n);if(Gt(o))if(Qt(o)){var l=er(o,t.unstableVarValues);l||(l=1===a?"#ffffff":"#000000"),s=u(l,r)}else s=Wt(o,(function(e){return i(e)}),(function(e){return u(e,r)}));else s=u(o,r);e.push({property:c,value:s})}};if(s(1,It,Xt),s(2,Ut,Yt),s(4,$t,Zt),t.isVarType(n,8)){var c=zt(n),l=o;Gt(o)&&(l=Wt(o,(function(e){return It(e)}),(function(e){return Xt(e,r)})));var d=Ot(l,a,i,u);l="function"==typeof d?d(r):d,e.push({property:c,value:l})}return e},c=new Set;return{declarations:s(),onTypeChange:{addListener:function(e){var r=function(){var t=s();e(t)};c.add(r),t.subscribeForVarTypeChange(n,r)},removeListeners:function(){c.forEach((function(e){t.unsubscribeFromVariableTypeChanges(n,e)}))}}}}},e.prototype.getModifierForVarDependant=function(e,t){var r=this;if(t.match(/^\s*(rgb|hsl)a?\(/)){var n=e.startsWith("background"),o="color"===e||"caret-color"===e;return function(e){var a=er(t,r.unstableVarValues);return a||(a=n?"#ffffff":"#000000"),(n?Xt:o?Yt:Zt)(a,e)}}return"background-color"===e?function(e){return Wt(t,(function(e){return It(e)}),(function(t){return Xt(t,e)}))}:"color"===e||"caret-color"===e?function(e){return Wt(t,(function(e){return Ut(e)}),(function(t){return Yt(t,e)}))}:"background"===e||"background-image"===e||"box-shadow"===e?function(n){var o=new Set,a=function(){var a=Wt(t,(function(e){return r.isVarType(e,1)?It(e):r.isVarType(e,8)?zt(e):(o.add(e),e)}),(function(e){return Xt(e,n)}));if("box-shadow"===e){var i=jt(a)(n);if(i.unparseableMatchesLength!==i.matchesLength)return i.result}return a},i=a();return o.size>0?new Promise((function(e){var t=o.values().next().value,n=function(){r.unsubscribeFromVariableTypeChanges(t,n);var o=a();e(o)};r.subscribeForVarTypeChange(t,n)})):i}:e.startsWith("border")||e.startsWith("outline")?function(e){return Wt(t,(function(e){return $t(e)}),(function(t){return Zt(t,e)}))}:null},e.prototype.subscribeForVarTypeChange=function(e,t){this.typeChangeSubscriptions.has(e)||this.typeChangeSubscriptions.set(e,new Set);var r=this.typeChangeSubscriptions.get(e);r.has(t)||r.add(t)},e.prototype.unsubscribeFromVariableTypeChanges=function(e,t){this.typeChangeSubscriptions.has(e)&&this.typeChangeSubscriptions.get(e).delete(t)},e.prototype.collectVariablesAndVarDep=function(e){var t=this;e.forEach((function(e){ue(e,(function(e){e.style&&le(e.style,(function(e,r){Ht(e)&&t.inspectVariable(e,r),Gt(r)&&t.inspectVarDependant(e,r)}))}))}))},e.prototype.collectRootVariables=function(){var e=this;le(document.documentElement.style,(function(t,r){Ht(t)&&e.inspectVariable(t,r)}))},e.prototype.inspectVariable=function(e,t){(this.unstableVarValues.set(e,t),Gt(t)&&Qt(t)&&(this.unknownColorVars.add(e),this.definedVars.add(e)),this.definedVars.has(e))||(this.definedVars.add(e),Mt(t)?this.unknownColorVars.add(e):(t.includes("url(")||t.includes("linear-gradient(")||t.includes("radial-gradient("))&&this.resolveVariableType(e,8))},e.prototype.resolveVariableType=function(e,t){var r=this.initialVarTypes.get(e)||0,n=(this.varTypes.get(e)||0)|t;this.varTypes.set(e,n),(n!==r||this.undefinedVars.has(e))&&(this.changedTypeVars.add(e),this.undefinedVars.delete(e)),this.unknownColorVars.delete(e),this.unknownBgVars.delete(e)},e.prototype.collectRootVarDependants=function(){var e=this;le(document.documentElement.style,(function(t,r){Gt(r)&&e.inspectVarDependant(t,r)}))},e.prototype.inspectVarDependant=function(e,t){var r=this;Ht(e)?this.iterateVarDeps(t,(function(t){r.varRefs.has(e)||r.varRefs.set(e,new Set),r.varRefs.get(e).add(t)})):"background-color"===e||"box-shadow"===e?this.iterateVarDeps(t,(function(e){return r.resolveVariableType(e,1)})):"color"===e||"caret-color"===e?this.iterateVarDeps(t,(function(e){return r.resolveVariableType(e,2)})):e.startsWith("border")||e.startsWith("outline")?this.iterateVarDeps(t,(function(e){return r.resolveVariableType(e,4)})):"background"!==e&&"background-image"!==e||this.iterateVarDeps(t,(function(e){if(!r.isVarType(e,9)){var t=null!=r.findVarRef(e,(function(e){return r.unknownColorVars.has(e)||r.isVarType(e,6)}));r.itarateVarRefs(e,(function(e){t?r.resolveVariableType(e,1):r.unknownBgVars.add(e)}))}}))},e.prototype.iterateVarDeps=function(e,t){var r=new Set;!function(e,t){Wt(e,(function(e){return t(e),e}))}(e,(function(e){return r.add(e)})),r.forEach((function(e){return t(e)}))},e.prototype.findVarRef=function(e,t,r){var n,a;if(void 0===r&&(r=new Set),r.has(e))return null;if(r.add(e),t(e))return e;var i=this.varRefs.get(e);if(!i||0===i.size)return null;try{for(var u=o(i),s=u.next();!s.done;s=u.next()){var c=s.value,l=this.findVarRef(c,t,r);if(l)return l}}catch(e){n={error:e}}finally{try{s&&!s.done&&(a=u.return)&&a.call(u)}finally{if(n)throw n.error}}return null},e.prototype.itarateVarRefs=function(e,t){this.findVarRef(e,(function(e){return t(e),!1}))},e.prototype.setOnRootVariableChange=function(e){this.onRootVariableDefined=e},e.prototype.putRootVars=function(e,t){var r,n,i=this,u=e.sheet;u.cssRules.length>0&&u.deleteRule(0);var s=new Map;le(document.documentElement.style,(function(e,r){Ht(e)&&(i.isVarType(e,1)&&s.set(It(e),Xt(r,t)),i.isVarType(e,2)&&s.set(Ut(e),Yt(r,t)),i.isVarType(e,4)&&s.set($t(e),Zt(r,t)),i.subscribeForVarTypeChange(e,i.onRootVariableDefined))}));var c=[];c.push(":root {");try{for(var l=o(s),d=l.next();!d.done;d=l.next()){var f=a(d.value,2),h=f[0],p=f[1];c.push("    "+h+": "+p+";")}}catch(e){r={error:e}}finally{try{d&&!d.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}c.push("}");var v=c.join("\n");u.insertRule(v)},e}());function Nt(e,t){void 0===t&&(t=0);var r=e.indexOf("var(",t);if(r>=0){var n=function(e,t){void 0===t&&(t=0);for(var r=e.length,n=0,o=-1,a=t;a<r;a++)if(0===n){if((i=e.indexOf("(",a))<0)break;o=i,n++,a=i}else{var i,u=e.indexOf(")",a);if(u<0)break;if((i=e.indexOf("(",a))<0||u<i){if(0==--n)return{start:o,end:u+1};a=u}else n++,a=i}return null}(e,r+3);return n?{start:r,end:n.end}:null}}function qt(e,t){var r=function(e){for(var t,r=[],n=0;t=Nt(e,n);){var o=t.start,a=t.end;r.push({start:o,end:a,value:e.substring(o,a)}),n=t.end+1}return r}(e),n=r.length;if(0===n)return e;var o=e.length,a=r.map((function(e){return t(e.value)})),i=[];i.push(e.substring(0,r[0].start));for(var u=0;u<n;u++){i.push(a[u]);var s=r[u].end,c=u<n-1?r[u+1].start:o;i.push(e.substring(s,c))}return i.join("")}function Bt(e){var t,r,n=e.indexOf(",");return n>=0?(t=e.substring(4,n).trim(),r=e.substring(n+1,e.length-1).trim()):(t=e.substring(4,e.length-1).trim(),r=""),{name:t,fallback:r}}function Wt(e,t,r){return qt(e,(function(e){var n=Bt(e),o=n.name,a=n.fallback,i=t(o);return a?"var("+i+", "+(Gt(a)?Wt(a,t,r):r?r(a):a)+")":"var("+i+")"}))}function It(e){return"--darkreader-bg"+e}function Ut(e){return"--darkreader-text"+e}function $t(e){return"--darkreader-border"+e}function zt(e){return"--darkreader-bgimg"+e}function Ht(e){return e.startsWith("--")}function Gt(e){return e.includes("var(")}function Qt(e){return e.match(/^\s*(rgb|hsl)a?\(/)}var Kt=/^\d{1,3}, ?\d{1,3}, ?\d{1,3}$/;function Jt(e,t,r){var n=function(e){if(Kt.test(e)){var t=e.split(","),r="rgb(";return t.forEach((function(e){r+=e.trim()+", "})),r=r.substr(0,r.length-2),{isRaw:!0,color:r+=")"}}return{isRaw:!1,color:e}}(e),o=n.isRaw,a=n.color,i=Mt(a);if(i){var u=r(i,t);if(o){var s=Mt(u);return s?s.r+", "+s.g+", "+s.b:u}return u}return a}function Xt(e,t){return Jt(e,t,Ye)}function Yt(e,t){return Jt(e,t,nt)}function Zt(e,t){return Jt(e,t,at)}function er(e,t,r){void 0===r&&(r=new Set);var n=!1,o=qt(e,(function(e){var o=Bt(e),a=o.name,i=o.fallback;if(r.has(a))return n=!0,null;r.add(a);var u=t.get(a)||i,s=null;return u&&(s=Gt(u)?er(u,t,r):u),s||(n=!0,null)}));return n?null:o}var tr={"background-color":{customProp:"--darkreader-inline-bgcolor",cssProp:"background-color",dataAttr:"data-darkreader-inline-bgcolor"},"background-image":{customProp:"--darkreader-inline-bgimage",cssProp:"background-image",dataAttr:"data-darkreader-inline-bgimage"},"border-color":{customProp:"--darkreader-inline-border",cssProp:"border-color",dataAttr:"data-darkreader-inline-border"},"border-bottom-color":{customProp:"--darkreader-inline-border-bottom",cssProp:"border-bottom-color",dataAttr:"data-darkreader-inline-border-bottom"},"border-left-color":{customProp:"--darkreader-inline-border-left",cssProp:"border-left-color",dataAttr:"data-darkreader-inline-border-left"},"border-right-color":{customProp:"--darkreader-inline-border-right",cssProp:"border-right-color",dataAttr:"data-darkreader-inline-border-right"},"border-top-color":{customProp:"--darkreader-inline-border-top",cssProp:"border-top-color",dataAttr:"data-darkreader-inline-border-top"},"box-shadow":{customProp:"--darkreader-inline-boxshadow",cssProp:"box-shadow",dataAttr:"data-darkreader-inline-boxshadow"},color:{customProp:"--darkreader-inline-color",cssProp:"color",dataAttr:"data-darkreader-inline-color"},fill:{customProp:"--darkreader-inline-fill",cssProp:"fill",dataAttr:"data-darkreader-inline-fill"},stroke:{customProp:"--darkreader-inline-stroke",cssProp:"stroke",dataAttr:"data-darkreader-inline-stroke"},"outline-color":{customProp:"--darkreader-inline-outline",cssProp:"outline-color",dataAttr:"data-darkreader-inline-outline"},"stop-color":{customProp:"--darkreader-inline-stopcolor",cssProp:"stop-color",dataAttr:"data-darkreader-inline-stopcolor"}},rr=Object.values(tr),nr={};rr.forEach((function(e){var t=e.cssProp,r=e.customProp;return nr[r]=t}));var or=["style","fill","stop-color","stroke","bgcolor","color"],ar=or.map((function(e){return"["+e+"]"})).join(", ");function ir(){return rr.map((function(e){var t=e.dataAttr,r=e.customProp;return["["+t+"] {","  "+e.cssProp+": var("+r+") !important;","}"].join("\n")})).join("\n")}var ur=new Map,sr=new Map;function cr(e,t,r){ur.has(e)&&(ur.get(e).disconnect(),sr.get(e).disconnect());var n=new WeakSet;function o(e){(function(e){var t=[];return e instanceof Element&&e.matches(ar)&&t.push(e),(e instanceof Element||b&&e instanceof ShadowRoot||e instanceof Document)&&F(t,e.querySelectorAll(ar)),t})(e).forEach((function(e){n.has(e)||(n.add(e),t(e))})),$(e,(function(o){n.has(e)||(n.add(e),r(o.shadowRoot),cr(o.shadowRoot,t,r))}))}var u=re(e,{onMinorMutations:function(e){e.additions.forEach((function(e){return o(e)}))},onHugeMutations:function(){o(e)}});ur.set(e,u);var s=0,c=null,l=W({seconds:10}),d=W({seconds:2}),f=[],h=null,p=B((function(e){e.forEach((function(e){or.includes(e.attributeName)&&t(e.target)}))})),v=new MutationObserver((function(e){if(h)f.push.apply(f,i([],a(e),!1));else{s++;var t=Date.now();if(null==c)c=t;else if(s>=50){if(t-c<l)return h=setTimeout((function(){c=null,s=0,h=null;var e=f;f=[],p(e)}),d),void f.push.apply(f,i([],a(e),!1));c=t,s=1}p(e)}}));v.observe(e,{attributes:!0,attributeFilter:or.concat(rr.map((function(e){return e.dataAttr}))),subtree:!0}),sr.set(e,v)}var lr=new WeakMap,dr=["brightness","contrast","grayscale","sepia","mode"];function fr(e,t){return or.map((function(t){return t+'="'+e.getAttribute(t)+'"'})).concat(dr.map((function(e){return e+'="'+t[e]+'"'}))).join(" ")}function hr(e,t,r,n){if(fr(e,t)!==lr.get(e)){var o=new Set(Object.keys(tr));if(r.length>0&&function(e,t){for(var r=0,n=t.length;r<n;r++){var o=t[r];if(e.matches(o))return!0}return!1}(e,r))o.forEach((function(t){e.removeAttribute(tr[t].dataAttr)}));else{if(e.hasAttribute("bgcolor"))((u=e.getAttribute("bgcolor")).match(/^[0-9a-f]{3}$/i)||u.match(/^[0-9a-f]{6}$/i))&&(u="#"+u),s("background-color","background-color",u);if(e.hasAttribute("color")&&"mask-icon"!==e.rel)((u=e.getAttribute("color")).match(/^[0-9a-f]{3}$/i)||u.match(/^[0-9a-f]{6}$/i))&&(u="#"+u),s("color","color",u);if(e instanceof SVGElement){if(e.hasAttribute("fill")){var a=e.getAttribute("fill");if("none"!==a)if(e instanceof SVGTextElement)s("fill","color",a);else{var i=function(){var t=e.getBoundingClientRect(),r=t.width,n=t.height;s("fill",r>32||n>32?"background-color":"color",a)};K()?i():X(i)}}e.hasAttribute("stop-color")&&s("stop-color","background-color",e.getAttribute("stop-color"))}if(e.hasAttribute("stroke")){var u=e.getAttribute("stroke");s("stroke",e instanceof SVGLineElement||e instanceof SVGTextElement?"border-color":"color",u)}e.style&&le(e.style,(function(t,r){if("background-image"!==t||!r.includes("url"))if(tr.hasOwnProperty(t))s(t,t,r);else{var n=nr[t];if(n&&!e.style.getPropertyValue(n)&&!e.hasAttribute(n)){if("background-color"===n&&e.hasAttribute("bgcolor"))return;e.style.setProperty(t,"")}}})),e.style&&e instanceof SVGTextElement&&e.style.fill&&s("fill","color",e.style.getPropertyValue("fill")),D(o,(function(t){e.removeAttribute(tr[t].dataAttr)})),lr.set(e,fr(e,t))}}function s(r,a,i){var u=tr[r],s=u.customProp,c=u.dataAttr,l=_t(a,i,{},Ft,n,null);if(l){var d=l.value;"function"==typeof d&&(d=d(t)),e.style.setProperty(s,d),e.hasAttribute(c)||e.setAttribute(c,""),o.delete(r)}}}var pr="theme-color",vr='meta[name="theme-color"]',mr=null,gr=null;function br(e,t){mr=mr||e.content;try{var r=Ee(mr);e.content=Ye(r,t)}catch(e){q(e)}}var yr=["mode","brightness","contrast","grayscale","sepia","darkSchemeBackgroundColor","darkSchemeTextColor","lightSchemeBackgroundColor","lightSchemeTextColor"];var kr=function(){var e=[],t=null;function r(){for(var r;r=e.shift();)r();t=null}return{add:function(n){e.push(n),t||(t=requestAnimationFrame(r))},cancel:function(){e.splice(0),cancelAnimationFrame(t),t=null}}}();function Sr(){var e=0,t=new Set,r=new Map,n=new Set,o=null,u=!1,s=!1;return{modifySheet:function(c){var l=c.sourceCSSRules,d=c.theme,f=c.ignoreImageAnalysis,h=c.force,p=c.prepareSheet,v=c.isAsyncCancelled,m=0===r.size,g=new Set(r.keys()),b=function(e){return yr.map((function(t){return t+":"+e[t]})).join(";")}(d),y=b!==o;u&&(s=!0);var k=[];if(ue(l,(function(e){var n=e.cssText,o=!1;if(g.delete(n),e.parentRule instanceof CSSMediaRule&&(n+=";"+e.parentRule.media.mediaText),t.has(n)||(t.add(n),o=!0),o){m=!0;var a=[];e.style&&le(e.style,(function(t,r){var n=_t(t,r,e,Ft,f,v);n&&a.push(n)}));var i=null;if(a.length>0){var u=e.parentRule;i={selector:e.selectorText,declarations:a,parentRule:u},k.push(i)}r.set(n,i)}else k.push(r.get(n))}),(function(){u=!0})),g.forEach((function(e){t.delete(e),r.delete(e)})),o=b,h||m||y){e++;var S=new Map,w=new Map,_=0,E=0,x={rule:null,rules:[],isGroup:!0},C=new WeakMap;n.forEach((function(e){return e()})),n.clear(),k.filter((function(e){return e})).forEach((function(t){var r=t.selector,o=t.declarations,u=T(t.parentRule),s={selector:r,declarations:[],isGroup:!1},c=s.declarations;function l(t,r,n,o){var a=++_,i={property:t,value:null,important:n,asyncKey:a,sourceValue:o};c.push(i);var u=e;r.then((function(t){t&&!v()&&u===e&&(i.value=t,kr.add((function(){v()||u!==e||function(e){var t=S.get(e),r=t.rule,n=t.target,o=t.index;n.deleteRule(o),R(n,o,r),S.delete(e)}(a)})))}))}function f(t,r,o,u){var s=r,d=s.declarations,f=s.onTypeChange,h=++E,p=e,m=c.length,g=[];if(0===d.length){var b={property:t,value:u,important:o,sourceValue:u,varKey:h};c.push(b),g=[b]}d.forEach((function(e){if(e.value instanceof Promise)l(e.property,e.value,o,u);else{var t={property:e.property,value:e.value,important:o,sourceValue:u,varKey:h};c.push(t),g.push(t)}})),f.addListener((function(t){if(!v()&&p===e){var r=t.map((function(e){return{property:e.property,value:e.value,important:o,sourceValue:u,varKey:h}})),n=c.indexOf(g[0],m);c.splice.apply(c,i([n,g.length],a(r),!1)),g=r,function(e){var t=w.get(e),r=t.rule,n=t.target,o=t.index;n.deleteRule(o),R(n,o,r)}(h)}})),n.add((function(){return f.removeListeners()}))}u.rules.push(s),o.forEach((function(e){var t=e.property,r=e.value,n=e.important,o=e.sourceValue;if("function"==typeof r){var a=r(d);a instanceof Promise?l(t,a,n,o):t.startsWith("--")?f(t,a,n,o):c.push({property:t,value:a,important:n,sourceValue:o})}else c.push({property:t,value:r,important:n,sourceValue:o})}))}));var V=p();!function e(t,r,n){t.rules.forEach((function(t){if(t.isGroup){var o=function(e,t){var r=e.rule;if(r instanceof CSSMediaRule){var n=r.media,o=t.cssRules.length;return t.insertRule("@media "+n.mediaText+" {}",o),t.cssRules[o]}return t}(t,r);e(t,o,n)}else n(t,r)}))}(x,V,(function(e,t){var r=t.cssRules.length;e.declarations.forEach((function(n){var o=n.asyncKey,a=n.varKey;null!=o&&S.set(o,{rule:e,target:t,index:r}),null!=a&&w.set(a,{rule:e,target:t,index:r})})),R(t,r,e)}))}function R(e,t,r){var n=r.selector,o=r.declarations,a="";o.forEach((function(e){var t,r,n,o,i;a+=(r=(t=e).property,n=t.value,o=t.important,i=t.sourceValue,r+": "+(null==n?i:n)+(o?" !important":"")+"; ")}));var i=n+" { "+a+" }";e.insertRule(i,t)}function T(e){if(null==e)return x;if(C.has(e))return C.get(e);var t={rule:e,rules:[],isGroup:!0};return C.set(e,t),T(e.parentRule).rules.push(t),t}},shouldRebuildStyle:function(){return u&&!s}}}function wr(e){return(e instanceof HTMLStyleElement||e instanceof SVGStyleElement||e instanceof HTMLLinkElement&&e.rel&&e.rel.toLowerCase().includes("stylesheet")&&!e.disabled&&(!h||!e.href.startsWith("moz-extension://")))&&!e.classList.contains("darkreader")&&"print"!==e.media.toLowerCase()&&!e.classList.contains("stylus")}function _r(e,t,r){return void 0===t&&(t=[]),void 0===r&&(r=!0),wr(e)?t.push(e):(e instanceof Element||b&&e instanceof ShadowRoot||e===document)&&(D(e.querySelectorAll('style, link[rel*="stylesheet" i]:not([disabled])'),(function(e){return _r(e,t,!1)})),r&&$(e,(function(e){return _r(e.shadowRoot,t,!1)}))),t}var Er=new WeakSet,xr=new WeakSet,Cr=!1;document.addEventListener("__darkreader__inlineScriptsAllowed",(function(){Cr=!0}));var Vr=0,Rr=new Map;function Tr(e,t){for(var o=t.update,i=t.loadingStart,u=t.loadingEnd,s=[],c=e;(c=c.nextElementSibling)&&c.matches(".darkreader");)s.push(c);var l=s.find((function(e){return e.matches(".darkreader--cors")&&!xr.has(e)}))||null,h=s.find((function(e){return e.matches(".darkreader--sync")&&!Er.has(e)}))||null,v=null,m=null,g=!1,b=!0,y=Sr(),k=new MutationObserver((function(){o()})),S={attributes:!0,childList:!0,subtree:!0,characterData:!0};function w(){return e instanceof HTMLStyleElement&&e.textContent.trim().match(fe)}function _(e,t){var r=!1;if(e){var n=void 0;e:for(var o=0,a=e.length;o<a;o++)if((n=e[o]).href){if(!t){r=!0;break e}if(n.href.startsWith("http")&&!n.href.startsWith(location.origin)){r=!0;break e}}}return r}function E(){if(l)return N("[getRulesSync] Using cors-copy."),l.sheet.cssRules;if(w())return N("[getRulesSync] CSSImport detected."),null;var t=A();return e instanceof HTMLLinkElement&&!function(e){if(e.startsWith("data:"))return!0;var t=ae(e);return t.protocol===location.protocol&&t.hostname===location.hostname&&t.port===location.port&&t.pathname===location.pathname}(e.href)&&_(t,!1)?(N("[getRulesSync] CSSImportRule detected on non-local href."),null):_(t,!0)?(N("[getRulesSync] Cross-Origin CSSImportRule detected."),null):(N("[getRulesSync] Using cssRules."),!t&&q("[getRulesSync] cssRules is null, trying again."),t)}function x(){l?(e.nextSibling!==l&&e.parentNode.insertBefore(l,e.nextSibling),l.nextSibling!==h&&e.parentNode.insertBefore(h,l.nextSibling)):e.nextSibling!==h&&e.parentNode.insertBefore(h,e.nextSibling)}var C=!1,V=!1,R=++Vr;function T(){return r(this,void 0,void 0,(function(){var t,r,o,i,u,s,c;return n(this,(function(n){switch(n.label){case 0:if(!(e instanceof HTMLLinkElement))return[3,7];if(o=a(L(),2),i=o[0],(u=o[1])&&q(u),!(!i&&!u&&!p||p&&!e.sheet||(d=u,d&&d.message&&d.message.includes("loading"))))return[3,5];n.label=1;case 1:return n.trys.push([1,3,,4]),N("Linkelement "+R+" is not loaded yet and thus will be await for",e),[4,Mr(e,R)];case 2:return n.sent(),[3,4];case 3:return q(n.sent()),V=!0,[3,4];case 4:if(g)return[2,null];c=a(L(),2),i=c[0],(u=c[1])&&q(u),n.label=5;case 5:return i&&!_(i,!1)?[2,i]:[4,Lr(e.href)];case 6:return t=n.sent(),r=pe(e.href),g?[2,null]:[3,8];case 7:if(!w())return[2,null];t=e.textContent.trim(),r=pe(location.href),n.label=8;case 8:if(!t)return[3,13];n.label=9;case 9:return n.trys.push([9,11,,12]),[4,Ar(t,r)];case 10:return s=n.sent(),l=function(e,t){if(!t)return null;var r=document.createElement("style");return r.classList.add("darkreader"),r.classList.add("darkreader--cors"),r.media="screen",r.textContent=t,e.parentNode.insertBefore(r,e.nextSibling),r.sheet.disabled=!0,xr.add(r),r}(e,s),[3,12];case 11:return q(n.sent()),[3,12];case 12:if(l)return v=U(l,"prev-sibling"),[2,l.sheet.cssRules];n.label=13;case 13:return[2,null]}var d}))}))}var M=!1;function L(){try{return null==e.sheet?[null,null]:[e.sheet.cssRules,null]}catch(e){return[null,e]}}function A(){var e=a(L(),2),t=e[0],r=e[1];return r?(q(r),null):t}function P(){e.addEventListener("__darkreader__updateSheet",W),f||Cr&&e.sheet||function(){O=D(),F();var t=function(){D()!==O&&(O=D(),o()),Cr&&e.sheet?F():j=requestAnimationFrame(t)};t()}()}var O=null,j=null;function D(){var e=A();return e?e.length:null}function F(){cancelAnimationFrame(j)}var B=!1;function W(){function e(){B=!1,g||o()}Cr=!0,F(),B||(B=!0,"function"==typeof queueMicrotask?queueMicrotask(e):requestAnimationFrame(e))}function $(){e.removeEventListener("__darkreader__updateSheet",W),F()}function z(){k.disconnect(),g=!0,v&&v.stop(),m&&m.stop(),$()}var H=0;return{details:function(e){var t=E();return t?{rules:t}:e.secondRound?(q("Detected dead-lock at details(), returning early to prevent it."),null):(C||V||(C=!0,i(),T().then((function(e){C=!1,u(),e&&o()})).catch((function(e){q(e),C=!1,u()}))),null)},render:function(t,r){var n=E();function a(){return h||((h=e instanceof SVGStyleElement?document.createElementNS("http://www.w3.org/2000/svg","style"):document.createElement("style")).classList.add("darkreader"),h.classList.add("darkreader--sync"),h.media="screen",!d&&e.title&&(h.title=e.title),Er.add(h)),m&&m.stop(),x(),null==h.sheet&&(h.textContent=""),function(e){try{if(e.replaceSync)return void e.replaceSync("")}catch(e){q("Could not use fastpath for removing rules from stylesheet",e)}for(var t=e.cssRules.length-1;t>=0;t--)e.deleteRule(t)}(h.sheet),m?m.run():m=U(h,"prev-sibling",(function(){M=!0,i()})),h.sheet}function i(){var e=M;M=!1,y.modifySheet({prepareSheet:a,sourceCSSRules:n,theme:t,ignoreImageAnalysis:r,force:e,isAsyncCancelled:function(){return g}}),b=0===h.sheet.cssRules.length,y.shouldRebuildStyle()&&X((function(){return o()}))}n&&(g=!1,i())},pause:z,destroy:function(){if(z(),I(l),I(h),u(),Rr.has(R)){var e=Rr.get(R);Rr.delete(R),e&&e()}},watch:function(){k.observe(e,S),e instanceof HTMLStyleElement&&P()},restore:function(){h&&(++H>10?q("Style sheet was moved multiple times",e):(q("Restore style",h,e),x(),v&&v.skip(),m&&m.skip(),b||(M=!0,o())))}}}function Mr(e,t){return r(this,void 0,void 0,(function(){return n(this,(function(r){return[2,new Promise((function(r,n){var o=function(){e.removeEventListener("load",a),e.removeEventListener("error",i),Rr.delete(t)},a=function(){o(),N("Linkelement "+t+" has been loaded"),r()},i=function(){o(),n("Linkelement "+t+" couldn't be loaded. "+e.href)};Rr.set(t,(function(){o(),n()})),e.addEventListener("load",a),e.addEventListener("error",i),e.href||i()}))]}))}))}function Lr(e){return r(this,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return e.startsWith("data:")?[4,fetch(e)]:[3,3];case 1:return[4,t.sent().text()];case 2:case 4:return[2,t.sent()];case 3:return[4,dt({url:e,responseType:"text",mimeType:"text/css",origin:window.location.origin})]}}))}))}function Ar(e,t,a){return void 0===a&&(a=new Map),r(this,void 0,void 0,(function(){var r,i,u,s,c,l,d,f,h,p;return n(this,(function(n){switch(n.label){case 0:e=function(e,t){return e.replace(de,(function(e){var r=he(e);try{return'url("'+ie(t,r)+'")'}catch(t){return q("Not able to replace relative URL with Absolute URL, skipping"),e}}))}(e=function(e){return e.replace(me,"")}(e=e.replace(ve,"")),t),r=Fe(fe,e),n.label=1;case 1:n.trys.push([1,10,11,12]),i=o(r),u=i.next(),n.label=2;case 2:return u.done?[3,9]:(s=u.value,c=he(s.substring(7).trim().replace(/;$/,"").replace(/screen$/,"")),l=ie(t,c),d=void 0,a.has(l)?(d=a.get(l),[3,7]):[3,3]);case 3:return n.trys.push([3,6,,7]),[4,Lr(l)];case 4:return d=n.sent(),a.set(l,d),[4,Ar(d,pe(l),a)];case 5:return d=n.sent(),[3,7];case 6:return q(n.sent()),d="",[3,7];case 7:e=e.split(s).join(d),n.label=8;case 8:return u=i.next(),[3,2];case 9:return[3,12];case 10:return f=n.sent(),h={error:f},[3,12];case 11:try{u&&!u.done&&(p=i.return)&&p.call(i)}finally{if(h)throw h.error}return[7];case 12:return[2,e=e.trim()]}}))}))}var Pr,Or,jr=[],Dr=new Map;function Fr(e){k&&D(e.querySelectorAll(":not(:defined)"),(function(e){var t=e.tagName.toLowerCase();if(!t.includes("-")){var o=e.getAttribute("is");if(!o)return;t=o}Dr.has(t)||(Dr.set(t,new Set),function(e){return r(this,void 0,void 0,(function(){return n(this,(function(t){return[2,new Promise((function(t){if(window.customElements&&"function"==typeof customElements.whenDefined)customElements.whenDefined(e).then((function(){return t()}));else if(Nr)qr.set(e,t),document.dispatchEvent(new CustomEvent("__darkreader__addUndefinedResolver",{detail:{tag:e}}));else{var r=function(){var n=Dr.get(e);n&&n.size>0&&(n.values().next().value.matches(":defined")?t():requestAnimationFrame(r))};requestAnimationFrame(r)}}))]}))}))}(t).then((function(){if(Or){var e=Dr.get(t);Dr.delete(t),Or(Array.from(e))}}))),Dr.get(t).add(e)}))}var Nr=!1;document.addEventListener("__darkreader__inlineScriptsAllowed",(function(){Nr=!0}));var qr=new Map;function Br(e){(Nr=!0,qr.has(e.detail.tag))&&qr.get(e.detail.tag)()}function Wr(e,t,r){Ir();var n=new Set(e),o=new WeakMap,a=new WeakMap;function i(e){o.set(e,e.previousElementSibling),a.set(e,e.nextElementSibling)}function u(e){var r=e.createdStyles,u=e.removedStyles,s=e.movedStyles;r.forEach((function(e){return i(e)})),s.forEach((function(e){return i(e)})),u.forEach((function(e){return t=e,o.delete(t),void a.delete(t);var t})),r.forEach((function(e){return n.add(e)})),u.forEach((function(e){return n.delete(e)})),r.size+u.size+s.size>0&&t({created:Array.from(r),removed:Array.from(u),moved:Array.from(s),updated:[]})}function s(e){var t=e.additions,r=e.moves,n=e.deletions,o=new Set,a=new Set,i=new Set;t.forEach((function(e){return _r(e).forEach((function(e){return o.add(e)}))})),n.forEach((function(e){return _r(e).forEach((function(e){return a.add(e)}))})),r.forEach((function(e){return _r(e).forEach((function(e){return i.add(e)}))})),u({createdStyles:o,removedStyles:a,movedStyles:i}),t.forEach((function(e){$(e,f),Fr(e)}))}function c(e){var t=new Set(_r(e)),r=new Set,i=new Set,s=new Set;t.forEach((function(e){n.has(e)||r.add(e)})),n.forEach((function(e){t.has(e)||i.add(e)})),t.forEach((function(e){var t;r.has(e)||i.has(e)||(t=e).previousElementSibling===o.get(t)&&t.nextElementSibling===a.get(t)||s.add(e)})),u({createdStyles:r,removedStyles:i,movedStyles:s}),$(e,f),Fr(e)}function l(e){var r=new Set,n=new Set;e.forEach((function(e){var t=e.target;t.isConnected&&(wr(t)?r.add(t):t instanceof HTMLLinkElement&&t.disabled&&n.add(t))})),r.size+n.size>0&&t({updated:Array.from(r),created:[],removed:Array.from(n),moved:[]})}function d(e){var t=re(e,{onMinorMutations:s,onHugeMutations:c}),r=new MutationObserver(l);r.observe(e,{attributes:!0,attributeFilter:["rel","disabled","media"],subtree:!0}),jr.push(t,r),Pr.add(e)}function f(e){var t=e.shadowRoot;null==t||Pr.has(t)||(d(t),r(t))}e.forEach(i),d(document),$(document.documentElement,f),Or=function(e){var r=[];e.forEach((function(e){return F(r,_r(e.shadowRoot))})),t({created:r,updated:[],removed:[],moved:[]}),e.forEach((function(e){var t=e.shadowRoot;null!=t&&(f(e),$(t,f),Fr(t))}))},document.addEventListener("__darkreader__isDefined",Br),Fr(document)}function Ir(){jr.forEach((function(e){return e.disconnect()})),jr.splice(0,jr.length),Pr=new WeakSet,Or=null,Dr.clear(),document.removeEventListener("__darkreader__isDefined",Br)}var Ur=new WeakMap,$r=new WeakSet;function zr(e){var t=!1;return{render:function(r,n){e.adoptedStyleSheets.forEach((function(o){if(!$r.has(o)){var u=o.rules,s=new CSSStyleSheet;Sr().modifySheet({prepareSheet:function(){for(var t=s.cssRules.length-1;t>=0;t--)s.deleteRule(t);return function(t,r){var n=i([],a(e.adoptedStyleSheets),!1),o=n.indexOf(t),u=n.indexOf(r);o!==u-1&&(u>=0&&n.splice(u,1),n.splice(o+1,0,r),e.adoptedStyleSheets=n)}(o,s),Ur.set(o,s),$r.add(s),s},sourceCSSRules:u,theme:r,ignoreImageAnalysis:n,force:!1,isAsyncCancelled:function(){return t}})}}))},destroy:function(){t=!0;var r=i([],a(e.adoptedStyleSheets),!1);e.adoptedStyleSheets.forEach((function(e){if($r.has(e)){var t=r.indexOf(e);t>=0&&r.splice(t,1),Ur.delete(e),$r.delete(e)}})),e.adoptedStyleSheets=r}}}function Hr(e){document.dispatchEvent(new CustomEvent("__darkreader__inlineScriptsAllowed"));var t=Object.getOwnPropertyDescriptor(CSSStyleSheet.prototype,"addRule"),r=Object.getOwnPropertyDescriptor(CSSStyleSheet.prototype,"insertRule"),n=Object.getOwnPropertyDescriptor(CSSStyleSheet.prototype,"deleteRule"),o=Object.getOwnPropertyDescriptor(CSSStyleSheet.prototype,"removeRule"),u=e?Object.getOwnPropertyDescriptor(Document.prototype,"styleSheets"):null,s=location.hostname.endsWith("baidu.com"),c=s?Object.getOwnPropertyDescriptor(Element.prototype,"getElementsByTagName"):null,l=function(){Object.defineProperty(CSSStyleSheet.prototype,"addRule",t),Object.defineProperty(CSSStyleSheet.prototype,"insertRule",r),Object.defineProperty(CSSStyleSheet.prototype,"deleteRule",n),Object.defineProperty(CSSStyleSheet.prototype,"removeRule",o),document.removeEventListener("__darkreader__cleanUp",l),document.removeEventListener("__darkreader__addUndefinedResolver",d),e&&Object.defineProperty(Document.prototype,"styleSheets",u),s&&Object.defineProperty(Element.prototype,"getElementsByTagName",c)},d=function(e){customElements.whenDefined(e.detail.tag).then((function(){document.dispatchEvent(new CustomEvent("__darkreader__isDefined",{detail:{tag:e.detail.tag}}))}))};document.addEventListener("__darkreader__cleanUp",l),document.addEventListener("__darkreader__addUndefinedResolver",d);var f=new Event("__darkreader__updateSheet");Object.defineProperty(CSSStyleSheet.prototype,"addRule",Object.assign({},t,{value:function(e,r,n){return t.value.call(this,e,r,n),this.ownerNode&&!this.ownerNode.classList.contains("darkreader")&&this.ownerNode.dispatchEvent(f),-1}})),Object.defineProperty(CSSStyleSheet.prototype,"insertRule",Object.assign({},r,{value:function(e,t){var n=r.value.call(this,e,t);return this.ownerNode&&!this.ownerNode.classList.contains("darkreader")&&this.ownerNode.dispatchEvent(f),n}})),Object.defineProperty(CSSStyleSheet.prototype,"deleteRule",Object.assign({},n,{value:function(e){n.value.call(this,e),this.ownerNode&&!this.ownerNode.classList.contains("darkreader")&&this.ownerNode.dispatchEvent(f)}})),Object.defineProperty(CSSStyleSheet.prototype,"removeRule",Object.assign({},o,{value:function(e){o.value.call(this,e),this.ownerNode&&!this.ownerNode.classList.contains("darkreader")&&this.ownerNode.dispatchEvent(f)}})),e&&Object.defineProperty(Document.prototype,"styleSheets",Object.assign({},u,{get:function(){var e=i([],a(u.get.call(this)),!1).filter((function(e){return!e.ownerNode.classList.contains("darkreader")}));return Object.setPrototypeOf(e,StyleSheetList.prototype)}})),s&&Object.defineProperty(Element.prototype,"getElementsByTagName",Object.assign({},c,{value:function(e){var t=this;if("style"!==e)return c.value.call(this,e);var r=function(){var r=c.value.call(t,e);return Object.setPrototypeOf(i([],a(r),!1).filter((function(e){return!e.classList.contains("darkreader")})),NodeList.prototype)},n=r();return new Proxy(n,{get:function(e,t){return r()[Number(t)]}})}}))}var Gr=function(){if("randomUUID"in crypto){var e=crypto.randomUUID();return e.substring(0,8)+e.substring(9,13)+e.substring(14,18)+e.substring(19,23)+e.substring(24)}return Array.from(crypto.getRandomValues(new Uint8Array(16))).map((function(e){return((t=e)<16?"0":"")+t.toString(16);var t})).join("")}(),Qr=new Map,Kr=[],Jr=null,Xr=null,Yr=null,Zr=null,en=null;function tn(e,t){void 0===t&&(t=document.head||document);var r=t.querySelector("."+e);return r||((r=document.createElement("style")).classList.add("darkreader"),r.classList.add(e),r.media="screen",r.textContent=""),r}var rn=new Map;function nn(e,t){rn.has(t)&&rn.get(t).stop(),rn.set(t,U(e,"parent"))}function on(){var e=tn("darkreader--fallback",document);e.textContent=Ct(Jr,{strict:!0}),document.head.insertBefore(e,document.head.firstChild),nn(e,"fallback");var r=tn("darkreader--user-agent");r.textContent=Et(Jr,Yr,Jr.styleSystemControls),document.head.insertBefore(r,e.nextSibling),nn(r,"user-agent");var n,o,a=tn("darkreader--text");Jr.useFont||Jr.textStroke>0?a.textContent=(n=Jr,(o=[]).push('*:not(pre, pre *, code, .far, .fa, .glyphicon, [class*="vjs-"], .fab, .fa-github, .fas, .material-icons, .icofont, .typcn, mu, [class*="mu-"], .glyphicon, .icon) {'),n.useFont&&n.fontFamily&&o.push("  font-family: "+n.fontFamily+" !important;"),n.textStroke>0&&(o.push("  -webkit-text-stroke: "+n.textStroke+"px !important;"),o.push("  text-stroke: "+n.textStroke+"px !important;")),o.push("}"),o.join("\n")):a.textContent="",document.head.insertBefore(a,e.nextSibling),nn(a,"text");var i=tn("darkreader--invert");Xr&&Array.isArray(Xr.invert)&&Xr.invert.length>0?i.textContent=[Xr.invert.join(", ")+" {","    filter: "+ut(t(t({},Jr),{contrast:0===Jr.mode?Jr.contrast:je(Jr.contrast-10,0,100)}))+" !important;","}"].join("\n"):i.textContent="",document.head.insertBefore(i,a.nextSibling),nn(i,"invert");var u=tn("darkreader--inline");u.textContent=ir(),document.head.insertBefore(u,i.nextSibling),nn(u,"inline");var s=tn("darkreader--override");s.textContent=Xr&&Xr.css?sn(Xr.css):"",document.head.appendChild(s),nn(s,"override");var c=tn("darkreader--variables"),l=xt(Jr),d=Jr.darkSchemeBackgroundColor,f=Jr.darkSchemeTextColor,h=Jr.lightSchemeBackgroundColor,p=Jr.lightSchemeTextColor,v=Jr.mode,m=0===v?h:d,g=0===v?p:f;m=Ye(Ee(m),Jr),g=nt(Ee(g),Jr),c.textContent=[":root {","   --darkreader-neutral-background: "+m+";","   --darkreader-neutral-text: "+g+";","   --darkreader-selection-background: "+l.backgroundColorSelection+";","   --darkreader-selection-text: "+l.foregroundColorSelection+";","}"].join("\n"),document.head.insertBefore(c,u.nextSibling),nn(c,"variables");var b=tn("darkreader--root-vars");document.head.insertBefore(b,c.nextSibling);var y=function(e,t){void 0===t&&(t=document.head||document);var r=t.querySelector("."+e);return r||((r=document.createElement("script")).classList.add("darkreader"),r.classList.add(e)),r}("darkreader--proxy");y.append("("+Hr+")(!"+Xr.disableStyleSheetsProxy+")"),document.head.insertBefore(y,b.nextSibling),y.remove()}var an=new Set;function un(e){var r=tn("darkreader--inline",e);r.textContent=ir(),e.insertBefore(r,e.firstChild);var n=tn("darkreader--override",e);n.textContent=Xr&&Xr.css?sn(Xr.css):"",e.insertBefore(n,r.nextSibling);var o=tn("darkreader--invert",e);Xr&&Array.isArray(Xr.invert)&&Xr.invert.length>0?o.textContent=[Xr.invert.join(", ")+" {","    filter: "+ut(t(t({},Jr),{contrast:0===Jr.mode?Jr.contrast:je(Jr.contrast-10,0,100)}))+" !important;","}"].join("\n"):o.textContent="",e.insertBefore(o,n.nextSibling),an.add(e)}function sn(e){return e.replace(/\${(.+?)}/g,(function(e,t){var r=Mt(t);return r?Ge(r,Jr,Qe):(q("Couldn't parse CSSTemplate's color."),t)}))}function cn(){var e=document.querySelector(".darkreader--fallback");e&&(e.textContent="")}var ln=0,dn=new Set;function fn(e){var t=++ln;N("New manager for element, with loadingStyleID "+t,e);var r=Tr(e,{update:function(){var e=r.details({secondRound:!0});e&&(Ft.addRulesForMatching(e.rules),Ft.matchVariablesAndDependants(),r.render(Jr,Zr))},loadingStart:function(){if(!z()||!bn){dn.add(t),N("Current amount of styles loading: "+dn.size);var e=document.querySelector(".darkreader--fallback");e.textContent||(e.textContent=Ct(Jr,{strict:!1}))}},loadingEnd:function(){dn.delete(t),N("Removed loadingStyle "+t+", now awaiting: "+dn.size),N("To-do to be loaded",dn),0===dn.size&&z()&&cn()}});return Qr.set(e,r),r}function hn(e){var t=Qr.get(e);t&&(t.destroy(),Qr.delete(e))}var pn=B((function(e){Qr.forEach((function(e){return e.render(Jr,Zr)})),Kr.forEach((function(e){return e.render(Jr,Zr)})),e&&e()})),vn=function(){pn.cancel()};function mn(){0!==dn.size?q("DOM is ready, but still have styles being loaded.",dn):cn()}var gn=null,bn=!document.hidden;function yn(){document.removeEventListener("visibilitychange",gn),gn=null}function kn(){function e(){var e,t;!function(){vn();var e=_r(document).filter((function(e){return!Qr.has(e)})).map((function(e){return fn(e)}));e.map((function(e){return e.details({secondRound:!1})})).filter((function(e){return e&&e.rules.length>0})).forEach((function(e){Ft.addRulesForMatching(e.rules)})),Ft.matchVariablesAndDependants(),Ft.setOnRootVariableChange((function(){Ft.putRootVars(document.head.querySelector(".darkreader--root-vars"),Jr)})),Ft.putRootVars(document.head.querySelector(".darkreader--root-vars"),Jr),Qr.forEach((function(e){return e.render(Jr,Zr)})),0===dn.size&&cn(),e.forEach((function(e){return e.watch()}));var t=function(e){for(var t=[],r=0,n=e.length;r<n;r++)t.push(e[r]);return t}(document.querySelectorAll(ar));$(document.documentElement,(function(e){un(e.shadowRoot);var r=e.shadowRoot.querySelectorAll(ar);r.length>0&&F(t,r)})),t.forEach((function(e){return hr(e,Jr,en,Zr)})),Sn(document)}(),Wr(Array.from(Qr.keys()),(function(e){var t=e.created,r=e.updated,n=e.removed,o=e.moved,a=n,i=t.concat(r).concat(o).filter((function(e){return!Qr.has(e)})),u=o.filter((function(e){return Qr.has(e)}));N("Styles to be removed:",a),a.forEach((function(e){return hn(e)}));var s=i.map((function(e){return fn(e)}));s.map((function(e){return e.details({secondRound:!1})})).filter((function(e){return e&&e.rules.length>0})).forEach((function(e){Ft.addRulesForMatching(e.rules)})),Ft.matchVariablesAndDependants(),s.forEach((function(e){return e.render(Jr,Zr)})),s.forEach((function(e){return e.watch()})),u.forEach((function(e){return Qr.get(e).restore()}))}),(function(e){un(e),Sn(e)})),e=function(e){hr(e,Jr,en,Zr),e===document.documentElement&&e.getAttribute("style").includes("--")&&(Ft.matchVariablesAndDependants(),Ft.putRootVars(document.head.querySelector(".darkreader--root-vars"),Jr))},t=function(e){un(e);var t=e.querySelectorAll(ar);t.length>0&&D(t,(function(e){return hr(e,Jr,en,Zr)}))},cr(document,e,t),$(document.documentElement,(function(r){cr(r.shadowRoot,e,t)})),G(mn)}var t,r,n,o;on(),document.hidden?(t=e,r=Boolean(gn),gn=function(){document.hidden||(yn(),t(),bn=!0)},r||document.addEventListener("visibilitychange",gn)):e(),n=Jr,(o=document.querySelector(vr))?br(o,n):(gr&&gr.disconnect(),(gr=new MutationObserver((function(e){e:for(var t=0;t<e.length;t++)for(var r=e[t].addedNodes,o=0;o<r.length;o++){var a=r[o];if(a instanceof HTMLMetaElement&&a.name===pr){gr.disconnect(),gr=null,br(a,n);break e}}}))).observe(document.head,{childList:!0}))}function Sn(e){if(Array.isArray(e.adoptedStyleSheets)&&e.adoptedStyleSheets.length>0){var t=zr(e);Kr.push(t),t.render(Jr,Zr)}}function wn(){Qr.forEach((function(e){return e.pause()})),D(rn.values(),(function(e){return e.stop()})),rn.clear(),Ir(),ur.forEach((function(e){return e.disconnect()})),sr.forEach((function(e){return e.disconnect()})),ur.clear(),sr.clear(),Q(mn),J.clear()}function _n(){var e,t=document.querySelector('meta[name="darkreader"]');return t?t.content!==Gr:((e=document.createElement("meta")).name="darkreader",e.content=Gr,document.head.appendChild(e),!1)}function En(e,t,r){if(Jr=e,(Xr=t)?(Zr=Array.isArray(Xr.ignoreImageAnalysis)?Xr.ignoreImageAnalysis:[],en=Array.isArray(Xr.ignoreInlineStyle)?Xr.ignoreInlineStyle:[]):(Zr=[],en=[]),Yr=r,document.head){if(_n())return;document.documentElement.setAttribute("data-darkreader-mode","dynamic"),document.documentElement.setAttribute("data-darkreader-scheme",Jr.mode?"dark":"dimmed"),kn()}else{if(!h){var n=tn("darkreader--fallback");document.documentElement.appendChild(n),n.textContent=Ct(Jr,{strict:!0})}var o=new MutationObserver((function(){if(document.head){if(o.disconnect(),_n())return void xn();kn()}}));o.observe(document,{childList:!0,subtree:!0})}}function xn(){document.documentElement.removeAttribute("data-darkreader-mode"),document.documentElement.removeAttribute("data-darkreader-scheme"),Ft.clear(),ne.clear(),yn(),vn(),wn(),Dt(),I(document.querySelector(".darkreader--fallback")),document.head&&(!function(){gr&&(gr.disconnect(),gr=null);var e=document.querySelector(vr);e&&mr&&(e.content=mr)}(),I(document.head.querySelector(".darkreader--user-agent")),I(document.head.querySelector(".darkreader--text")),I(document.head.querySelector(".darkreader--invert")),I(document.head.querySelector(".darkreader--inline")),I(document.head.querySelector(".darkreader--override")),I(document.head.querySelector(".darkreader--variables")),I(document.head.querySelector(".darkreader--root-vars")),I(document.head.querySelector('meta[name="darkreader"]')),document.dispatchEvent(new CustomEvent("__darkreader__cleanUp")),I(document.head.querySelector(".darkreader--proxy"))),an.forEach((function(e){I(e.querySelector(".darkreader--inline")),I(e.querySelector(".darkreader--override"))})),an.clear(),D(Qr.keys(),(function(e){return hn(e)})),dn.clear(),Rr.clear(),D(document.querySelectorAll(".darkreader"),I),Kr.forEach((function(e){e.destroy()})),Kr.splice(0)}var Cn=/url\(\"(blob\:.*?)\"\)/g;function Vn(e){return r(this,void 0,void 0,(function(){var t,r;return n(this,(function(n){switch(n.label){case 0:return t=[],Fe(Cn,e,1).forEach((function(e){var r=w(e);t.push(r)})),[4,Promise.all(t)];case 1:return r=n.sent(),[2,e.replace(Cn,(function(){return'url("'+r.shift()+'")'}))]}}))}))}function Rn(){return r(this,void 0,void 0,(function(){function e(e,r){var n=document.querySelector(e);n&&n.textContent&&(t.push("/* "+r+" */"),t.push(n.textContent),t.push(""))}var t,r,o,a,i;return n(this,(function(n){switch(n.label){case 0:return t=['/*\n                        _______\n                       /       \\\n                      .==.    .==.\n                     ((  ))==((  ))\n                    / "=="    "=="\\\n                   /____|| || ||___\\\n       ________     ____    ________  ___    ___\n       |  ___  \\   /    \\   |  ___  \\ |  |  /  /\n       |  |  \\  \\ /  /\\  \\  |  |  \\  \\|  |_/  /\n       |  |   )  /  /__\\  \\ |  |__/  /|  ___  \\\n       |  |__/  /  ______  \\|  ____  \\|  |  \\  \\\n_______|_______/__/ ____ \\__\\__|___\\__\\__|___\\__\\____\n|  ___  \\ |  ____/ /    \\   |  ___  \\ |  ____|  ___  \\\n|  |  \\  \\|  |___ /  /\\  \\  |  |  \\  \\|  |___|  |  \\  \\\n|  |__/  /|  ____/  /__\\  \\ |  |   )  |  ____|  |__/  /\n|  ____  \\|  |__/  ______  \\|  |__/  /|  |___|  ____  \\\n|__|   \\__\\____/__/      \\__\\_______/ |______|__|   \\__\\\n                https://darkreader.org\n*/\n\n/*! Dark reader generated CSS | Licensed under MIT https://github.com/darkreader/darkreader/blob/master/LICENSE */\n'],e(".darkreader--fallback","Fallback Style"),e(".darkreader--user-agent","User-Agent Style"),e(".darkreader--text","Text Style"),e(".darkreader--invert","Invert Style"),e(".darkreader--variables","Variables Style"),r=[],document.querySelectorAll(".darkreader--sync").forEach((function(e){D(e.sheet.cssRules,(function(e){e&&e.cssText&&r.push(e.cssText)}))})),r.length?(o=function(e){function t(e){return e.replace(/^\s+/,"")}function r(e){return 0===e?"":" ".repeat(4*e)}if(e.length<5e4)for(var n=/[^{}]+{\s*}/;n.test(e);)e=e.replace(n,"");for(var o=e.replace(/\s{2,}/g," ").replace(/\{/g,"{\n").replace(/\}/g,"\n}\n").replace(/\;(?![^\(|\"]*(\)|\"))/g,";\n").replace(/\,(?![^\(|\"]*(\)|\"))/g,",\n").replace(/\n\s*\n/g,"\n").split("\n"),a=0,i=[],u=0,s=o.length;u<s;u++){var c=o[u]+"\n";c.includes("{")?i.push(r(a++)+t(c)):c.includes("}")?i.push(r(--a)+t(c)):i.push(r(a)+t(c))}return i.join("").trim()}(r.join("\n")),t.push("/* Modified CSS */"),i=(a=t).push,[4,Vn(o)]):[3,2];case 1:i.apply(a,[n.sent()]),t.push(""),n.label=2;case 2:return e(".darkreader--override","Override Style"),[2,t.join("\n")]}}))}))}var Tn=!1,Mn=function(){try{return window.self!==window.top}catch(e){return console.warn(e),!0}}();function Ln(e,r){void 0===e&&(e={}),void 0===r&&(r=null);var n=t(t({},j),e);if(n.engine!==A)throw new Error("Theme engine is not supported.");En(n,r,Mn),Tn=!0}function An(){xn(),Tn=!1}var Pn=matchMedia("(prefers-color-scheme: dark)"),On={themeOptions:null,fixes:null};function jn(){Pn.matches?Ln(On.themeOptions,On.fixes):An()}var Dn=function(e){x=e||E};e.auto=function(e,t){void 0===e&&(e={}),void 0===t&&(t=null),e?(On={themeOptions:e,fixes:t},jn(),y?Pn.addEventListener("change",jn):Pn.addListener(jn)):(y?Pn.removeEventListener("change",jn):Pn.removeListener(jn),An())},e.disable=An,e.enable=Ln,e.exportGeneratedCSS=function(){return r(this,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return[4,Rn()];case 1:return[2,e.sent()]}}))}))},e.isEnabled=function(){return Tn},e.setFetchMethod=Dn,Object.defineProperty(e,"__esModule",{value:!0})}));

DarkReader.setFetchMethod(window.fetch);
DarkReader.enable({
}, {
	url: ['*'],
	ignoreInlineStyle: ['.mediaContainer', '.mediaContainer *', '.TemplateRevision', '.TemplateRevision *', '#homeButtonNav', '#homeButtonNav *', '.mw-wiki-logo'],
	css: '',
	ignoreImageAnalysis: true,
	invert: []
});
console.log("Darkreader Enabled!");