1 line
No EOL
84 KiB
JavaScript
1 line
No EOL
84 KiB
JavaScript
!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";var u,d=function(){return(d=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function N(e,i,c,u){return new(c=c||Promise)(function(n,t){function r(e){try{a(u.next(e))}catch(e){t(e)}}function o(e){try{a(u.throw(e))}catch(e){t(e)}}function a(e){var t;e.done?n(e.value):((t=e.value)instanceof c?t:new c(function(e){e(t)})).then(r,o)}a((u=u.apply(e,i||[])).next())})}function F(r,o){var a,i,c,u={label:0,sent:function(){if(1&c[0])throw c[1];return c[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(n){return function(e){var t=[n,e];if(a)throw new TypeError("Generator is already executing.");for(;u;)try{if(a=1,i&&(c=2&t[0]?i.return:t[0]?i.throw||((c=i.return)&&c.call(i),0):i.next)&&!(c=c.call(i,t[1])).done)return c;switch(i=0,(t=c?[2&t[0],c.value]:t)[0]){case 0:case 1:c=t;break;case 4:return u.label++,{value:t[1],done:!1};case 5:u.label++,i=t[1],t=[0];continue;case 7:t=u.ops.pop(),u.trys.pop();continue;default:if(!(c=0<(c=u.trys).length&&c[c.length-1])&&(6===t[0]||2===t[0])){u=0;continue}if(3===t[0]&&(!c||t[1]>c[0]&&t[1]<c[3])){u.label=t[1];break}if(6===t[0]&&u.label<c[1]){u.label=c[1],c=t;break}if(c&&u.label<c[2]){u.label=c[2],u.ops.push(t);break}c[2]&&u.ops.pop(),u.trys.pop();continue}t=o.call(r,u)}catch(e){t=[6,e],i=0}finally{a=c=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}function q(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&r>=e.length?void 0:e)&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function j(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||0<t--)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i}function T(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||((r=r||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}(t=u=u||{}).UI_GET_DATA="ui-get-data",t.UI_SUBSCRIBE_TO_CHANGES="ui-subscribe-to-changes",t.UI_UNSUBSCRIBE_FROM_CHANGES="ui-unsubscribe-from-changes",t.UI_CHANGE_SETTINGS="ui-change-settings",t.UI_SET_THEME="ui-set-theme",t.UI_SET_SHORTCUT="ui-set-shortcut",t.UI_TOGGLE_ACTIVE_TAB="ui-toggle-active-tab",t.UI_MARK_NEWS_AS_READ="ui-mark-news-as-read",t.UI_MARK_NEWS_AS_DISPLAYED="ui-mark-news-as-displayed",t.UI_LOAD_CONFIG="ui-load-config",t.UI_APPLY_DEV_DYNAMIC_THEME_FIXES="ui-apply-dev-dynamic-theme-fixes",t.UI_RESET_DEV_DYNAMIC_THEME_FIXES="ui-reset-dev-dynamic-theme-fixes",t.UI_APPLY_DEV_INVERSION_FIXES="ui-apply-dev-inversion-fixes",t.UI_RESET_DEV_INVERSION_FIXES="ui-reset-dev-inversion-fixes",t.UI_APPLY_DEV_STATIC_THEMES="ui-apply-dev-static-themes",t.UI_RESET_DEV_STATIC_THEMES="ui-reset-dev-static-themes",t.UI_SAVE_FILE="ui-save-file",t.UI_REQUEST_EXPORT_CSS="ui-request-export-css",t.UI_COLOR_SCHEME_CHANGE="ui-color-scheme-change",t.BG_CHANGES="bg-changes",t.BG_ADD_CSS_FILTER="bg-add-css-filter",t.BG_ADD_STATIC_THEME="bg-add-static-theme",t.BG_ADD_SVG_FILTER="bg-add-svg-filter",t.BG_ADD_DYNAMIC_THEME="bg-add-dynamic-theme",t.BG_EXPORT_CSS="bg-export-css",t.BG_UNSUPPORTED_SENDER="bg-unsupported-sender",t.BG_CLEAN_UP="bg-clean-up",t.BG_RELOAD="bg-reload",t.BG_FETCH_RESPONSE="bg-fetch-response",t.BG_UI_UPDATE="bg-ui-update",t.BG_CSS_UPDATE="bg-css-update",t.CS_COLOR_SCHEME_CHANGE="cs-color-scheme-change",t.CS_FRAME_CONNECT="cs-frame-connect",t.CS_FRAME_FORGET="cs-frame-forget",t.CS_FRAME_FREEZE="cs-frame-freeze",t.CS_FRAME_RESUME="cs-frame-resume",t.CS_EXPORT_CSS_RESPONSE="cs-export-css-response",t.CS_FETCH="cs-fetch",t.CS_DARK_THEME_DETECTED="cs-dark-theme-detected",t.CS_DARK_THEME_NOT_DETECTED="cs-dark-theme-not-detected",t.CS_LOG="cs-log";var t="undefined"!=typeof navigator,n=t?navigator.userAgentData&&Array.isArray(navigator.userAgentData.brands)?navigator.userAgentData.brands.map(function(e){return"".concat(e.brand.toLowerCase()," ").concat(e.version)}).join(" "):navigator.userAgent.toLowerCase():"some useragent",r=t?(navigator.userAgentData&&"string"==typeof navigator.userAgentData.platform?navigator.userAgentData:navigator).platform.toLowerCase():"some platform",L=n.includes("chrome")||n.includes("chromium"),o=n.includes("thunderbird"),O=n.includes("firefox")||n.includes("librewolf")||o,U=(n.includes("vivaldi"),n.includes("yabrowser"),n.includes("opr")||n.includes("opera"),n.includes("edg"),n.includes("safari")&&!L),o=r.startsWith("win"),L=r.startsWith("mac"),D=(t&&navigator.userAgentData?navigator.userAgentData.mobile:n.includes("mobile"),"function"==typeof ShadowRoot),P="function"==typeof MediaQueryList&&"function"==typeof MediaQueryList.prototype.addEventListener,r=n.match(/chrom(?:e|ium)(?:\/| )([^ ]+)/);if(r&&r[1])r[1];t=n.match(/(?:firefox|librewolf)(?:\/| )([^ ]+)/);if(t&&t[1])t[1];var I=function(){try{return document.querySelector(":defined"),!0}catch(e){return!1}}(),W=function(){if("undefined"==typeof document)return!1;var e=document.createElement("div");return e.setAttribute("style","color-scheme: dark"),e.style&&"dark"===e.style.colorScheme}();function G(t,n){return N(this,void 0,void 0,function(){return F(this,function(e){switch(e.label){case 0:return[4,function(n,r,o){return N(this,void 0,void 0,function(){var t;return F(this,function(e){switch(e.label){case 0:return[4,fetch(n,{cache:"force-cache",credentials:"omit",referrer:o})];case 1:if(t=e.sent(),O&&"text/css"===r&&n.startsWith("moz-extension://")&&n.endsWith(".css"))return[2,t];if(r&&!t.headers.get("Content-Type").startsWith(r))throw new Error("Mime type mismatch when loading ".concat(n));if(t.ok)return[2,t];throw new Error("Unable to load ".concat(n," ").concat(t.status," ").concat(t.statusText))}})})}(t,n)];case 1:return[4,H(e.sent())];case 2:return[2,e.sent()]}})})}function H(t){return N(this,void 0,void 0,function(){var n;return F(this,function(e){switch(e.label){case 0:return[4,t.blob()];case 1:return n=e.sent(),[4,new Promise(function(e){var t=new FileReader;t.onloadend=function(){return e(t.result)},t.readAsDataURL(n)})];case 2:return[2,e.sent()]}})})}function $(t){return N(void 0,void 0,void 0,function(){return F(this,function(e){return[2,Promise.reject(new Error(["Embedded Dark Reader cannot access a cross-origin resource",t,"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(" ")))]})})}var z=$;window.chrome||(window.chrome={}),chrome.runtime||(chrome.runtime={});var Q,K,Y,X,Z=new Set;function J(){for(var c=[],e=0;e<arguments.length;e++)c[e]=arguments[e];return N(this,void 0,void 0,function(){var t,n,r,o,a,i;return F(this,function(e){switch(e.label){case 0:if(!c[0]||c[0].type!==u.CS_FETCH)return[3,8];t=c[0].id,e.label=1;case 1:return e.trys.push([1,7,,8]),r=c[0].data,n=r.url,r=r.responseType,[4,function(t){return N(this,void 0,void 0,function(){return F(this,function(e){switch(e.label){case 0:return[4,z(t)];case 1:return[2,e.sent()]}})})}(n)];case 2:return o=e.sent(),"data-url"!==r?[3,4]:[4,H(o)];case 3:return a=e.sent(),[3,6];case 4:return[4,o.text()];case 5:a=e.sent(),e.label=6;case 6:return Z.forEach(function(e){return e({type:u.BG_FETCH_RESPONSE,data:a,error:null,id:t})}),[3,8];case 7:return i=e.sent(),console.error(i),Z.forEach(function(e){return e({type:u.BG_FETCH_RESPONSE,data:null,error:i,id:t})}),[3,8];case 8:return[2]}})})}function ee(e){Z.add(e)}"function"==typeof chrome.runtime.sendMessage?(Q=chrome.runtime.sendMessage,chrome.runtime.sendMessage=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];J.apply(void 0,T([],j(e),!1)),Q.apply(chrome.runtime,e)}):chrome.runtime.sendMessage=J,chrome.runtime.onMessage||(chrome.runtime.onMessage={}),"function"==typeof chrome.runtime.onMessage.addListener?(K=chrome.runtime.onMessage.addListener,chrome.runtime.onMessage.addListener=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];ee(e[0]),K.apply(chrome.runtime.onMessage,e)}):chrome.runtime.onMessage.addListener=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ee(e[0])},(r=Y=Y||{}).cssFilter="cssFilter",r.svgFilter="svgFilter",r.staticTheme="staticTheme",r.dynamicTheme="dynamicTheme",(n=X=X||{}).NONE="",n.TIME="time",n.SYSTEM="system";var t={background:"#181a1b",text:"#e8e6e3"},r={background:"#dcdad7",text:"#181a1b"},te={mode:1,brightness:100,contrast:100,grayscale:0,sepia:0,useFont:!(n.LOCATION="location"),fontFamily:L?"Helvetica Neue":o?"Segoe UI":"Open Sans",textStroke:0,engine:Y.dynamicTheme,stylesheet:"",darkSchemeBackgroundColor:t.background,darkSchemeTextColor:t.text,lightSchemeBackgroundColor:r.background,lightSchemeTextColor:r.text,scrollbarColor:L?"":"auto",selectionColor:"auto",styleSystemControls:!W,lightColorScheme:"Default",darkColorScheme:"Default",immediateModify:!1};function f(e,t){var n,r;if(null!=e.length)for(var o=0,a=e.length;o<a;o++)t(e[o]);else try{for(var i=q(e),c=i.next();!c.done;c=i.next())t(c.value)}catch(e){n={error:e}}finally{try{c&&!c.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}function ne(t,e){f(e,function(e){t.push(e)})}function re(n){var r,o=!1,a=null;return Object.assign(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];r=e,a?o=!0:(n.apply(void 0,T([],j(r),!1)),a=requestAnimationFrame(function(){a=null,o&&(n.apply(void 0,T([],j(r),!1)),o=!1)}))},{cancel:function(){cancelAnimationFrame(a),o=!1,a=null}})}function oe(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 B(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function ae(t,n,r){void 0===r&&(r=Function.prototype);var o=oe({seconds:2}),a=oe({seconds:10}),i=t.previousSibling,c=t.parentNode;if(!c)throw new Error("Unable to watch for node position: parent element not found");if("prev-sibling"===n&&!i)throw new Error("Unable to watch for node position: there is no previous sibling");function u(){h.observe(c,{childList:!0})}var s=0,l=null,d=null,f=re(function(){if(!d){s++;var e=Date.now();if(null==l)l=e;else if(10<=s){if(e-l<a)return void(d=setTimeout(function(){s=0,d=l=null,f()},o));l=e,s=1}if("parent"===n&&i&&i.parentNode!==c)p();else{if("prev-sibling"===n){if(null==i.parentNode)return void p();i.parentNode!==c&&m(i.parentNode)}c.insertBefore(t,i?i.nextSibling:c.firstChild),h.takeRecords(),r&&r()}}}),h=new MutationObserver(function(){("parent"===n&&t.parentNode!==c||"prev-sibling"===n&&t.previousSibling!==i)&&f()}),p=function(){clearTimeout(d),h.disconnect(),f.cancel()},m=function(e){c=e,p(),u()};return u(),{run:u,stop:p,skip:function(){h.takeRecords()}}}function h(e,t){if(null!=e)for(var n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:function(e){return null==e.shadowRoot?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT}}),r=e.shadowRoot?n.currentNode:n.nextNode();null!=r;r=n.nextNode())r.classList.contains("surfingkeys_hints_host")||(t(r),h(r.shadowRoot,t))}X.NONE;var p=function(){return"complete"===document.readyState||"interactive"===document.readyState};var ie=new Set;function ce(e){p()?e():ie.add(e)}function ue(e){ie.delete(e)}function se(){return"complete"===document.readyState}var le,de=new Set;function fe(e){se()?e():de.add(e)}p()||(le=function(){p()&&(ie.forEach(function(e){return e()}),ie.clear(),se()&&(document.removeEventListener("readystatechange",le),de.forEach(function(e){return e()}),de.clear()))},document.addEventListener("readystatechange",le));var he,pe=new Map,me=new WeakMap;function ge(c,e){var u,s,l,d,t;return pe.has(c)?(t=pe.get(c),u=me.get(t)):(d=l=!1,(t=new MutationObserver(function(e){var t,n,r,o,a,i;!function(e){if(1e3<e.length)return 1;for(var t=0,n=0;n<e.length;n++)if(1e3<(t+=e[n].addedNodes.length))return 1}(e)?(e=e,n=new Set,r=new Set,o=new Set,e.forEach(function(e){f(e.addedNodes,function(e){e instanceof Element&&e.isConnected&&n.add(e)}),f(e.removedNodes,function(e){e instanceof Element&&(e.isConnected?(o.add(e),n.delete(e)):r.add(e))})}),a=[],i=[],n.forEach(function(e){n.has(e.parentElement)&&a.push(e)}),r.forEach(function(e){r.has(e.parentElement)&&i.push(e)}),a.forEach(function(e){return n.delete(e)}),i.forEach(function(e){return r.delete(e)}),t={additions:n,moves:o,deletions:r},u.forEach(function(e){return(0,e.onMinorMutations)(t)})):(!l||p()?u.forEach(function(e){return(0,e.onHugeMutations)(c)}):d||(ce(s=function(){return u.forEach(function(e){return(0,e.onHugeMutations)(c)})}),d=!0),l=!0)})).observe(c,{childList:!0,subtree:!0}),pe.set(c,t),u=new Set,me.set(t,u)),u.add(e),{disconnect:function(){u.delete(e),s&&ue(s),0===u.size&&(t.disconnect(),me.delete(t),pe.delete(c))}}}var ve=new Map;function be(e){return(he=he||document.createElement("a")).href=e,he.href}function ye(e,t){void 0===t&&(t=null);var n="".concat(e).concat(t?";".concat(t):"");if(ve.has(n))return ve.get(n);if(t)return t=new URL(e,be(t)),ve.set(n,t),t;n=new URL(be(e));return ve.set(e,n),n}function Se(e,t){if(t.match(/^data\\?\:/))return t;if(/^\/\//.test(t))return"".concat(location.protocol).concat(t);e=ye(e);return ye(t,e.href).href}function _e(e,r,o){f(e,function(e){if(e.selectorText)r(e);else if(e.href)try{_e(e.styleSheet.cssRules,r,o)}catch(e){o&&o()}else{var t,n;e.media?(t=(n=Array.from(e.media)).some(function(e){return e.startsWith("screen")||e.startsWith("all")||e.startsWith("(")}),n=n.some(function(e){return e.startsWith("print")||e.startsWith("speech")}),!t&&n||_e(e.cssRules,r,o)):e.conditionText&&CSS.supports(e.conditionText)&&_e(e.cssRules,r,o)}})}var ke=["background","border","border-color","border-bottom","border-left","border-right","border-top","outline","outline-color"],we=U?ke.map(function(e){return[e,new RegExp("".concat(e,":\\s*(.*?)\\s*;"))]}):null;function Ee(n,r){f(n,function(e){var t=n.getPropertyValue(e).trim();t&&r(e,t)});var o=n.cssText;o.includes("var(")&&(U?we.forEach(function(e){var e=j(e,2),t=e[0],e=e[1],e=o.match(e);e&&e[1]&&(e=e[1].trim(),r(t,e))}):ke.forEach(function(e){var t=n.getPropertyValue(e);t&&t.includes("var(")&&r(e,t)}))}var Ce=/url\((('.*?')|(".*?")|([^\)]*?))\)/g,xe=/@import\s*(url\()?(('.+?')|(".+?")|([^\)]*?))\)? ?(screen)?;?/gi;function Te(e){return e.trim().replace(/[\n\r\\]+/g,"").replace(/^url\((.*)\)$/,"$1").trim().replace(/^"(.*)"$/,"$1").replace(/^'(.*)'$/,"$1").replace(/(?:\\(.))/g,"$1")}function Re(e){e=ye(e);return"".concat(e.origin).concat(e.pathname.replace(/\?.*$/,"").replace(/(\/)([^\/]+)$/i,"$1"))}function Ve(e,n){return e.replace(Ce,function(t){var e=Te(t);try{return"url('".concat(Se(n,e),"')")}catch(e){return t}})}var Ae=/\/\*[\s\S]*?\*\//g;function Me(e){return e.replace(Ae,"")}var Le=/@font-face\s*{[^}]*}/g;function Oe(e){return e.replace(Le,"")}De.prototype.exec=function(e,t){return this.execMethod(e,t)},De.prototype.lessOrEqualThan=function(e){return this.precendce<=e.precendce};n=De;function De(e,t){this.precendce=e,this.execMethod=t}var Pe=new Map([["+",new n(1,function(e,t){return e+t})],["-",new n(1,function(e,t){return e-t})],["*",new n(2,function(e,t){return e*t})],["/",new n(2,function(e,t){return e/t})]]);function Ie(e,t,n){void 0===n&&(n=0);for(var r,o=[];r=e.exec(t);)o.push(r[n]);return o}function Ne(e,t){for(var n=e.length,r=0,o=-1,a=t=void 0===t?0:t;a<n;a++)if(0===r){if((i=e.indexOf("(",a))<0)break;r++,a=o=i}else{var i,c=e.indexOf(")",a);if(c<0)break;if((i=e.indexOf("(",a))<0||c<i){if(0===--r)return{start:o,end:c+1};a=c}else r++,a=i}return null}var Fe=new Map,je=new Map;function E(e){if(e=e.trim(),je.has(e))return je.get(e);var t=function(e){var t=e.trim().toLowerCase();if(t.match(Ge))return function(e){var e=j(ze(e,Qe,Ke),4),t=e[0],n=e[1],r=e[2],e=e[3];return{r:t,g:n,b:r,a:void 0===e?1:e}}(t);if(t.match(He))return function(e){var e=j(ze(e,Ye,Xe),4),t=e[0],n=e[1],r=e[2],e=e[3];return qe({h:t,s:n,l:r,a:void 0===e?1:e})}(t);if(t.match($e))return function(e){var t=e.substring(1);switch(t.length){case 3:case 4:var n=j([0,1,2].map(function(e){return parseInt("".concat(t[e]).concat(t[e]),16)}),3),r=n[0],o=n[1],n=n[2],a=3===t.length?1:parseInt("".concat(t[3]).concat(t[3]),16)/255;return{r:r,g:o,b:n,a:a};case 6:case 8:var i=j([0,2,4].map(function(e){return parseInt(t.substring(e,e+2),16)}),3),r=i[0],o=i[1],n=i[2],a=6===t.length?1:parseInt(t.substring(6,8),16)/255;return{r:r,g:o,b:n,a:a}}return null}(t);if(Ze.has(t))return function(e){e=Ze.get(e);return{r:e>>16&255,g:e>>8&255,b:e>>0&255,a:1}}(t);if(Je.has(t))return function(e){e=Je.get(e);return{r:e>>16&255,g:e>>8&255,b:e>>0&255,a:1}}(t);return"transparent"!==e?null:{r:0,g:0,b:0,a:0}}(e=e.includes("calc(")?function(r){var e=0;for(;-1!==(e=r.indexOf("calc("));){var t=Ne(r,e);if(!t)break;var n=r.slice(t.start+1,t.end-1),o=n.includes("%"),n=(n=n.split("%").join(""),Math.round(function(e){for(var t,n=[],r=[],o=0,a=e.length;o<a;o++){var i=e[o];if(i&&" "!==i){if(Pe.has(i)){for(var c=Pe.get(i);r.length;){var u=Pe.get(r[0]);if(!u)break;if(!c.lessOrEqualThan(u))break;n.push(r.shift())}r.unshift(i)}else!t||Pe.has(t)?n.push(i):n[n.length-1]+=i;t=i}}n.push.apply(n,T([],j(r),!1));for(var s,l=[],o=0,a=n.length;o<a;o++)(c=Pe.get(n[o]))?(s=l.splice(0,2),l.push(c.exec(s[1],s[0]))):l.unshift(parseFloat(n[o]));return l[0]}(n)));!function(e,t,n){r=r.substring(0,e)+n+r.substring(t)}(t.start-4,t.end,n+(o?"%":""))}return r}(e):e);return t&&je.set(e,t),t}function Be(e){if(Fe.has(e))return Fe.get(e);var t=E(e);if(!t)return null;t=Ue(t);return Fe.set(e,t),t}function qe(e){var t=e.h,n=e.s,r=e.l,e=e.a,e=void 0===e?1:e;if(0===n)return o=(a=j([r,r,r].map(function(e){return Math.round(255*e)}),3))[0],c=a[1],{r:o,g:a[2],b:c,a:e};var o=(1-Math.abs(2*r-1))*n,a=o*(1-Math.abs(t/60%2-1)),i=r-o/2,c=j((t<60?[o,a,0]:t<120?[a,o,0]:t<180?[0,o,a]:t<240?[0,a,o]:t<300?[a,0,o]:[o,0,a]).map(function(e){return Math.round(255*(e+i))}),3);return{r:c[0],g:c[1],b:c[2],a:e}}function Ue(e){var t=e.r,n=e.g,r=e.b,e=e.a,e=void 0===e?1:e,t=t/255,n=n/255,r=r/255,o=Math.max(t,n,r),a=Math.min(t,n,r),i=o-a,a=(o+a)/2;if(0==i)return{h:0,s:0,l:a,a:e};o=60*(o===t?(n-r)/i%6:o===n?(r-t)/i+2:(t-n)/i+4),o<0&&(o+=360),r=i/(1-Math.abs(2*a-1));return{h:o,s:r,l:a,a:e}}function m(e,t){e=e.toFixed(t=void 0===t?0:t);if(0===t)return e;t=e.indexOf(".");if(0<=t){var n=e.match(/0+$/);if(n)return n.index===t+1?e.substring(0,t):e.substring(0,n.index)}return e}function We(e){var t=e.h,n=e.s,r=e.l,e=e.a;return null!=e&&e<1?"hsla(".concat(m(t),", ").concat(m(100*n),"%, ").concat(m(100*r),"%, ").concat(m(e,2),")"):"hsl(".concat(m(t),", ").concat(m(100*n),"%, ").concat(m(100*r),"%)")}var Ge=/^rgba?\([^\(\)]+\)$/,He=/^hsla?\([^\(\)]+\)$/,$e=/^#[0-9a-f]+$/i;function ze(e,r,t){var e=function(e){var t=[],n=0,r=!1,o=e.indexOf("(");e=e.substring(o+1,e.length-1);for(var a=0;a<e.length;a++){var i=e[a];"0"<=i&&i<="9"||"."===i||"+"===i||"-"===i?r=!0:!r||" "!==i&&","!==i?r||(n=a+1):(t.push(e.substring(n,a)),r=!1,n=a+1)}return r&&t.push(e.substring(n,e.length)),t}(e),o=Object.entries(t);return e.map(function(e){return e.trim()}).map(function(t,e){var n=o.find(function(e){e=j(e,1)[0];return t.endsWith(e)}),n=n?parseFloat(t.substring(0,t.length-n[0].length))/n[1]*r[e]:parseFloat(t);return 1<r[e]?Math.round(n):n})}var Qe=[255,255,255,1],Ke={"%":100};var Ye=[360,1,1,1],Xe={"%":100,deg:360,rad:2*Math.PI,turn:1};var Ze=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})),Je=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 e=j(e,2),t=e[0],e=e[1];return[t.toLowerCase(),e]}));function s(e,t,n,r,o){return(e-t)*(o-r)/(n-t)+r}function C(e,t,n){return Math.min(n,Math.max(t,e))}function et(e,t){for(var n=[],r=0,o=e.length;r<o;r++){n[r]=[];for(var a=0,i=t[0].length;a<i;a++){for(var c=0,u=0,s=e[0].length;u<s;u++)c+=e[r][u]*t[u][a];n[r][a]=c}}return n}function tt(e){var t=nt();return 0!==e.sepia&&(t=et(t,it(e.sepia/100))),0!==e.grayscale&&(t=et(t,ct(e.grayscale/100))),100!==e.contrast&&(t=et(t,at(e.contrast/100))),100!==e.brightness&&(t=et(t,ot(e.brightness/100))),t=1===e.mode?et(t,rt()):t}var nt=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]]},rt=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]]},ot=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]]},at=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]]},it=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]]},ct=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 ut(e){return e[1===e.mode?"darkSchemeBackgroundColor":"lightSchemeBackgroundColor"]}function st(e){return e[1===e.mode?"darkSchemeTextColor":"lightSchemeTextColor"]}var lt=new Map;var dt=["r","g","b","a"],ft=["mode","brightness","contrast","grayscale","sepia","darkSchemeBackgroundColor","darkSchemeTextColor","lightSchemeBackgroundColor","lightSchemeTextColor"];function ht(e,t,n,r,o){lt.has(n)?a=lt.get(n):(a=new Map,lt.set(n,a)),i=e,c=t,u="",dt.forEach(function(e){u+="".concat(i[e],";")}),ft.forEach(function(e){u+="".concat(c[e],";")});var a,i,c,u,s=u;if(a.has(s))return a.get(s);var l,d,f,h,n=qe(n(Ue(e),null==r?null:Be(r),null==o?null:Be(o))),e=n.r,r=n.g,o=n.b,n=n.a,t=tt(t),r=j((t=t,e=j(e=[e,r,o],3),l=et(t,[[e[0]/255],[e[1]/255],[e[2]/255],[1],[1]]),[0,1,2].map(function(e){return C(Math.round(255*l[e][0]),0,255)})),3),o=r[0],t=r[1],e=r[2],o=1===n?(d=(r={r:o,g:t,b:e}).r,f=r.g,h=r.b,r=r.a,"#".concat((null!=r&&r<1?[d,f,h,Math.round(255*r)]:[d,f,h]).map(function(e){return"".concat(e<16?"0":"").concat(e.toString(16))}).join(""))):(d=(r={r:o,g:t,b:e,a:n}).r,f=r.g,h=r.b,null!=(r=r.a)&&r<1?"rgba(".concat(m(d),", ").concat(m(f),", ").concat(m(h),", ").concat(m(r,2),")"):"rgb(".concat(m(d),", ").concat(m(f),", ").concat(m(h),")"));return a.set(s,o),o}function pt(e){return e}function mt(e,t){var n=ut(t);return ht(e,t,gt,st(t),n)}function gt(e,t,n){var r=e.h,o=e.s,a=e.l,e=e.a,i=a<.5,c=r,u=a,o=((i?a<.2||o<.12:o<.24||.8<a&&(200<r&&r<280))&&(u=i?(c=t.h,t.s):(c=n.h,n.s)),s(a,0,1,t.l,n.l));return{h:c,s:u,l:o,a:e}}function vt(e,t){var n=e.h,r=e.s,o=e.l,e=e.a,a=r<.12||.8<o&&(200<n&&n<280);if(o<.5)return i=s(o,0,.5,0,.4),a?{h:t.h,s:t.s,l:i,a:e}:{h:n,s:r,l:i,a:e};var i=s(o,.5,1,.4,t.l);if(a)return{h:t.h,s:t.s,l:i,a:e};o=n;return 40<(o=60<n&&n<180?120<n?s(n,120,180,135,180):s(n,60,120,60,105):o)&&o<80&&(i*=.75),{h:o,s:r,l:i,a:e}}function g(e,t){if(0===t.mode)return mt(e,t);var n=ut(t);return ht(e,d(d({},t),{mode:0}),vt,n)}var bt;function yt(e){return s(e,205,245,205,220)}function St(e,t){var n=e.h,r=e.s,o=e.l,e=e.a,a=o<.2||r<.24,i=!a&&205<n&&n<245;if(.5<o){var c=s(o,.5,1,.55,t.l);if(a)return{h:t.h,s:t.s,l:c,a:e};return{h:i?yt(n):n,s:r,l:c,a:e}}if(a)return{h:t.h,s:t.s,l:s(o,0,.5,t.l,.55),a:e};c=n,a=i?(c=yt(n),s(o,0,.5,t.l,Math.min(1,.55+.05))):s(o,0,.5,t.l,.55);return{h:c,s:r,l:a,a:e}}function v(e,t){if(0===t.mode)return mt(e,t);var n=st(t);return ht(e,d(d({},t),{mode:0}),St,n)}function _t(e,t,n){var r=e.h,o=e.s,a=e.l,e=e.a,i=o,o=((a<.2||o<.24)&&(i=a<.5?(r=t.h,t.s):(r=n.h,n.s)),s(a,0,1,.5,.2));return{h:r,s:i,l:o,a:e}}function kt(e,t){if(0===t.mode)return mt(e,t);var n=st(t),r=ut(t);return ht(e,d(d({},t),{mode:0}),_t,n,r)}function wt(e,t){return g(e,t)}function Et(e){var t=[];return e.mode===bt.dark&&t.push("invert(100%) hue-rotate(180deg)"),100!==e.brightness&&t.push("brightness(".concat(e.brightness,"%)")),100!==e.contrast&&t.push("contrast(".concat(e.contrast,"%)")),0!==e.grayscale&&t.push("grayscale(".concat(e.grayscale,"%)")),0!==e.sepia&&t.push("sepia(".concat(e.sepia,"%)")),0===t.length?null:t.join(" ")}(o=bt=bt||{})[o.light=0]="light",o[o.dark=1]="dark";var Ct=0,xt=new Map,Tt=new Map;function Rt(r){return N(this,void 0,void 0,function(){return F(this,function(e){return[2,new Promise(function(e,t){var n=++Ct;xt.set(n,e),Tt.set(n,t),chrome.runtime.sendMessage({type:u.CS_FETCH,data:r,id:n})})]})})}function Vt(){this.queue=[],this.timerId=null,this.frameDuration=1e3/60}chrome.runtime.onMessage.addListener(function(e){var t,n=e.type,r=e.data,o=e.error,e=e.id;n===u.BG_FETCH_RESPONSE&&(n=xt.get(e),t=Tt.get(e),xt.delete(e),Tt.delete(e),o?t&&t(o):n&&n(r))}),Vt.prototype.addToQueue=function(e){this.queue.push(e),this.startQueue()},Vt.prototype.stopQueue=function(){null!==this.timerId&&(cancelAnimationFrame(this.timerId),this.timerId=null),this.queue=[]},Vt.prototype.startQueue=function(){var n=this;this.timerId||(this.timerId=requestAnimationFrame(function(){n.timerId=null;for(var e,t=Date.now();e=n.queue.shift();)if(e(),Date.now()-t>=n.frameDuration){n.startQueue();break}}))};var At=new Vt;function Mt(i){return N(this,void 0,void 0,function(){var t=this;return F(this,function(e){return[2,new Promise(function(o,a){return N(t,void 0,void 0,function(){var t,n,r;return F(this,function(e){switch(e.label){case 0:return i.startsWith("data:")?(t=i,[3,4]):[3,1];case 1:return e.trys.push([1,3,,4]),[4,function(t){return N(this,void 0,void 0,function(){return F(this,function(e){switch(e.label){case 0:return new URL(t).origin!==location.origin?[3,2]:[4,G(t)];case 1:return[2,e.sent()];case 2:return[4,Rt({url:t,responseType:"data-url"})];case 3:return[2,e.sent()]}})})}(i)];case 2:return t=e.sent(),[3,4];case 3:return r=e.sent(),a(r),[2];case 4:return e.trys.push([4,6,,7]),[4,function(r){return N(this,void 0,void 0,function(){return F(this,function(e){return[2,new Promise(function(e,t){var n=new Image;n.onload=function(){return e(n)},n.onerror=function(){return t("Unable to load image ".concat(r))},n.src=r})]})})}(t)];case 5:return n=e.sent(),At.addToQueue(function(){o(d({src:i,dataURL:t,width:n.naturalWidth,height:n.naturalHeight},function(e){Lt||!function(){var e=Dt,t=Dt;(Lt=document.createElement("canvas")).width=e,Lt.height=t,(Ot=Lt.getContext("2d")).imageSmoothingEnabled=!1}();var t=e.naturalWidth,n=e.naturalHeight;if(0===n||0===t)return"logWarn(Image is empty ".concat(e.currentSrc,")"),null;if(Pt<t*n*4)return{isDark:!1,isLight:!1,isTransparent:!1,isLarge:!1,isTooLarge:!0};var r=t*n,o=Math.min(1,Math.sqrt(Dt/r)),a=Math.ceil(t*o),i=Math.ceil(n*o);Ot.clearRect(0,0,a,i),Ot.drawImage(e,0,0,t,n,0,0,a,i);var c,u,s,l,d,f,h=Ot.getImageData(0,0,a,i).data,p=0,m=0,g=0;for(u=0;u<i;u++)for(c=0;c<a;c++)s=h[0+(f=4*(u*a+c))],l=h[1+f],d=h[2+f],h[3+f]/255<.05?p++:((f=(.2126*s+.7152*l+.0722*d)/255)<.4&&m++,.7<f&&g++);o=a*i,e=o-p;return{isDark:.7<=m/e,isLight:.7<=g/e,isTransparent:.1<=p/o,isLarge:48e4<=r,isTooLarge:!1}}(n)))}),[3,7];case 6:return r=e.sent(),a(r),[3,7];case 7:return[2]}})})})]})})}var Lt,Ot,Dt=1024;var Pt=5242880;function It(e,t){var n=e.dataURL,r=e.width,e=e.height,t=tt(t).slice(0,4).map(function(e){return e.map(function(e){return e.toFixed(3)}).join(" ")}).join(" "),t=['<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'.concat(r,'" height="').concat(e,'">'),"<defs>",'<filter id="darkreader-image-filter">','<feColorMatrix type="matrix" values="'.concat(t,'" />'),"</filter>","</defs>",'<image width="'.concat(r,'" height="').concat(e,'" filter="url(#darkreader-image-filter)" xlink:href="').concat(n,'" />'),"</svg>"].join("");return"data:image/svg+xml;base64,".concat(btoa(t))}function Nt(){At&&At.stopQueue(),Ot=Lt=null}var Ft="gradient".length,jt="conic-",Bt=jt.length,qt="radial-",Ut="linear-";function Wt(r){for(var o,a=[],i=jt.length;-1!==(o=r.indexOf("gradient",i))&&"break"!==function(){var t;if([Ut,qt,jt].find(function(e){if(0<=o-e.length&&r.substring(o-e.length,o)===e)return t=("repeating"===r.slice(o-e.length-10,o-e.length-1)?"repeating-":"-webkit"===r.slice(o-e.length-8,o-e.length-1)?"-webkit-":"").concat(e,"gradient"),!0}),!t)return"break";var e=Ne(r,o+Ft),n=e.start,e=e.end,n=r.substring(n+1,e-1);i=e+1+Bt,a.push({typeGradient:t,match:n,offset:t.length+2,index:o-t.length+Ft,hasComma:!0})}(););return a.length&&(a[a.length-1].hasComma=!1),a}function Gt(e,t){return Boolean(e&&e.getPropertyPriority(t))}function Ht(e,t,n,r,o,a){var i,c;if(e.startsWith("--")){if(i=r.getModifierForVariable({varName:e,sourceValue:t,rule:n,ignoredImgSelectors:o,isCancelled:a}))return{property:e,value:i,important:Gt(n.style,e),sourceValue:t}}else if(t.includes("var(")){if(i=r.getModifierForVarDependant(e,t))return{property:e,value:i,important:Gt(n.style,e),sourceValue:t}}else{if("color-scheme"===e)return null;if(e.includes("color")&&"-webkit-print-color-adjust"!==e||"fill"===e||"stroke"===e||"stop-color"===e){if(i=function(e,t,n){if(Yt.has(t.toLowerCase()))return t;var r=E(t);if(!r)return null;if(e.includes("background"))return n.style.webkitMaskImage&&"none"!==n.style.webkitMaskImage||n.style.webkitMask&&!n.style.webkitMask.startsWith("none")||n.style.mask&&"none"!==n.style.mask||n.style.getPropertyValue("mask-image")&&"none"!==n.style.getPropertyValue("mask-image")?function(e){return v(r,e)}:function(e){return g(r,e)};if(e.includes("border")||e.includes("outline"))return function(e){return kt(r,e)};return function(e){return v(r,e)}}(e,t,n))return{property:e,value:i,important:Gt(n.style,e),sourceValue:t}}else if("background-image"===e||"list-style-image"===e){if(i=Jt(t,n,o,a))return{property:e,value:i,important:Gt(n.style,e),sourceValue:t}}else if(e.includes("shadow"))if(i=(c=en(t))?function(e){return c(e).result}:null)return{property:e,value:i,important:Gt(n.style,e),sourceValue:t}}return null}function $t(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter(Boolean).join(", ")}function zt(e,t,n){var r,o,a,i=[],t=(t||(i.push("html {"),i.push(" background-color: ".concat(g({r:255,g:255,b:255},e)," !important;")),i.push("}")),W&&(i.push("html {"),i.push(" color-scheme: ".concat(1===e.mode?"dark":"dark light"," !important;")),i.push("}")),$t(t?"":"html, body",n?"input, textarea, select, button, dialog":""));return t&&(i.push("".concat(t," {")),i.push(" background-color: ".concat(g({r:255,g:255,b:255},e),";")),i.push("}")),i.push("".concat($t("html, body",n?"input, textarea, select, button":"")," {")),i.push(" border-color: ".concat(kt({r:76,g:76,b:76},e),";")),i.push(" color: ".concat(v({r:0,g:0,b:0},e),";")),i.push("}"),i.push("a {"),i.push(" color: ".concat(v({r:0,g:64,b:255},e),";")),i.push("}"),i.push("table {"),i.push(" border-color: ".concat(kt({r:128,g:128,b:128},e),";")),i.push("}"),i.push("::placeholder {"),i.push(" color: ".concat(v({r:169,g:169,b:169},e),";")),i.push("}"),i.push("input:-webkit-autofill,"),i.push("textarea:-webkit-autofill,"),i.push("select:-webkit-autofill {"),i.push(" background-color: ".concat(g({r:250,g:255,b:189},e)," !important;")),i.push(" color: ".concat(v({r:0,g:0,b:0},e)," !important;")),i.push("}"),e.scrollbarColor&&i.push(function(e){var t,n,r,o,a,i,c=[];{var u,s,l;"auto"===e.scrollbarColor?(t=g({r:241,g:241,b:241},e),n=v({r:96,g:96,b:96},e),r=g({r:176,g:176,b:176},e),o=g({r:144,g:144,b:144},e),a=g({r:96,g:96,b:96},e),i=g({r:255,g:255,b:255},e)):(u=Ue(E(e.scrollbarColor)),e=.5<u.l,s=function(e){return d(d({},u),{l:C(u.l+e,0,1)})},t=We((l=function(e){return d(d({},u),{l:C(u.l-e,0,1)})})(.4)),n=We((e?l:s)(.4)),r=We(u),o=We(s(.1)),a=We(s(.2)))}c.push("::-webkit-scrollbar {"),c.push(" background-color: ".concat(t,";")),c.push(" color: ".concat(n,";")),c.push("}"),c.push("::-webkit-scrollbar-thumb {"),c.push(" background-color: ".concat(r,";")),c.push("}"),c.push("::-webkit-scrollbar-thumb:hover {"),c.push(" background-color: ".concat(o,";")),c.push("}"),c.push("::-webkit-scrollbar-thumb:active {"),c.push(" background-color: ".concat(a,";")),c.push("}"),c.push("::-webkit-scrollbar-corner {"),c.push(" background-color: ".concat(i,";")),c.push("}"),O&&(c.push("* {"),c.push(" scrollbar-color: ".concat(r," ").concat(t,";")),c.push("}"));return c.join("\n")}(e)),e.selectionColor&&i.push((r=[],t=Qt(t=e),o=t.backgroundColorSelection,a=t.foregroundColorSelection,["::selection","::-moz-selection"].forEach(function(e){r.push("".concat(e," {")),r.push(" background-color: ".concat(o," !important;")),r.push(" color: ".concat(a," !important;")),r.push("}")}),r.join("\n"))),i.join("\n")}function Qt(e){var t,n;return e="auto"===e.selectionColor?(n=g({r:0,g:96,b:212},d(d({},e),{grayscale:0})),v({r:255,g:255,b:255},d(d({},e),{grayscale:0}))):(t=Ue(E(e.selectionColor)),n=e.selectionColor,t.l<.5?"#FFF":"#000"),{backgroundColorSelection:n,foregroundColorSelection:e}}function Kt(e,t){var t=t.strict,n=[],r=["microsoft.com","docs.microsoft.com"].includes(location.hostname);return n.push("html, body, ".concat(t?"body :not(iframe)".concat(r?':not(div[style^="position:absolute;top:0;left:-"]':""):"body > :not(iframe)"," {")),n.push(" background-color: ".concat(g({r:255,g:255,b:255},e)," !important;")),n.push(" border-color: ".concat(kt({r:64,g:64,b:64},e)," !important;")),n.push(" color: ".concat(v({r:0,g:0,b:0},e)," !important;")),n.push("}"),n.join("\n")}var Yt=new Set(["inherit","transparent","initial","currentcolor","none","unset"]);var Xt=new Map,x=new Map;function Zt(e,n){if(e&&0!==n.length){if(n.some(function(e){return"*"===e}))return 1;for(var r=e.split(/,\s*/g),t=0;t<n.length;t++){var o=function(e){var t=n[e];if(r.some(function(e){return e===t}))return{value:!0}}(t);if("object"==typeof o)return o.value}}}function Jt(p,m,g,v){var n,b=this;try{var e=Wt(p),t=Ie(Ce,p);if(0===t.length&&0===e.length)return p;var y=e.map(function(e){return d({type:"gradient"},e)}).concat((n=0,t.map(function(e){var t=p.indexOf(e,n);return n=t+e.length,{match:e,index:t}}).map(function(e){return d({type:"url",offset:0},e)}))).sort(function(e,t){return e.index>t.index?1:-1}),S=function(e,t){var n=e.isDark,r=e.isLight,o=e.isTransparent,a=e.isLarge,i=e.isTooLarge,c=e.width;return i?'url("'.concat(e.src,'")'):n&&o&&1===t.mode&&!a&&2<c?("Inverting dark image ".concat(e.src),i=It(e,d(d({},t),{sepia:C(t.sepia+10,0,100)})),'url("'.concat(i,'")')):r&&!o&&1===t.mode?a?"none":("Dimming light image ".concat(e.src),n=It(e,t),'url("'.concat(n,'")')):0===t.mode&&r&&!a?("Applying filter to image ".concat(e.src),c=It(e,d(d({},t),{brightness:C(t.brightness-10,5,200),sepia:C(t.sepia+10,0,100)})),'url("'.concat(c,'")')):null},_=[],k=0,w=!1;return y.forEach(function(e,t){var n,r,a,o,i=e.type,c=e.match,u=e.index,s=e.typeGradient,l=e.hasComma,e=e.offset,d=u,f=k,h=d+c.length+e;k=h,f!==d&&(w?_.push(function(){var e=p.substring(f,d);return e=","===e[0]?e.substring(1):e}):_.push(function(){return p.substring(f,d)})),w=l||!1,"url"===i?_.push(function(e){if(Zt(m.selectorText,g))return null;var o=0===(a=Te(e)).length,e=m.parentStyleSheet,a=Se(e&&e.href?Re(e.href):(null==(e=e.ownerNode)?void 0:e.baseURI)||location.origin,a),i='url("'.concat(a,'")');return function(r){return N(b,void 0,void 0,function(){var t,n;return F(this,function(e){switch(e.label){case 0:return o?[2,"url('')"]:Xt.has(a)?(t=Xt.get(a),[3,7]):[3,1];case 1:return(e.trys.push([1,6,,7]),x.has(a))?(n=x.get(a),[4,new Promise(function(e){return n.push(e)})]):[3,3];case 2:return(t=e.sent())?[3,5]:[2,null];case 3:return x.set(a,[]),[4,Mt(a)];case 4:t=e.sent(),Xt.set(a,t),x.get(a).forEach(function(e){return e(t)}),x.delete(a),e.label=5;case 5:return v()?[2,null]:[3,7];case 6:return e.sent(),x.has(a)&&(x.get(a).forEach(function(e){return e(null)}),x.delete(a)),[2,i];case 7:return[2,S(t,r)||i]}})})}}(c)):"gradient"===i&&_.push((n=(i={match:c,index:u,typeGradient:s,hasComma:l,offset:e}).typeGradient,c=i.match,r=i.hasComma,a=/^(from|color-stop|to)\(([^\(\)]*?,\s*)?(.*?)\)$/,o=Ie(/([^\(\),]+(\([^\(\)]*(\([^\(\)]*\)*[^\(\)]*)?\))?([^\(\), ]|( (?!calc)))*),?/g,c,1).map(function(t){var n=E(t=t.trim());if(n)return function(e){return wt(n,e)};var r=t.lastIndexOf(" ");if(n=E(t.substring(0,r)))return function(e){return"".concat(wt(n,e)," ").concat(t.substring(r+1))};var o=t.match(a);return o&&(n=E(o[3]))?function(e){return"".concat(o[1],"(").concat(o[2]?"".concat(o[2],", "):"").concat(wt(n,e),")")}:function(){return t}}),function(t){return"".concat(n,"(").concat(o.map(function(e){return e(t)}).join(", "),")").concat(r?", ":"")})),t===y.length-1&&_.push(function(){return p.substring(h)})}),function(t){var e=_.filter(Boolean).map(function(e){return e(t)});if(e.some(function(e){return e instanceof Promise}))return Promise.all(e).then(function(e){return e.filter(Boolean).join("")});e=e.join("");return e.endsWith(", initial")?e.slice(0,-9):e}}catch(e){return null}}function en(i){try{var c=0,u=Ie(/(^|\s)(?!calc)([a-z]+\(.+?\)|#[0-9a-f]+|[a-z]+)(.*?(inset|outset)?($|,))/gi,i,2),s=0,n=u.map(function(e,t){var n=c,r=i.indexOf(e,c),o=r+e.length,a=(c=o,E(e));return a?function(e){return"".concat(i.substring(n,r)).concat(g(a,e)).concat(t===u.length-1?i.substring(o):"")}:(s++,function(){return i.substring(n,o)})});return function(t){var e=n.map(function(e){return e(t)}).join("");return{matchesLength:u.length,unparseableMatchesLength:s,result:e}}}catch(e){return null}}function tn(){lt.clear(),Xt.clear(),Nt(),x.clear()}function a(){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}a.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()},a.prototype.isVarType=function(e,t){return this.varTypes.has(e)&&0<(this.varTypes.get(e)&t)},a.prototype.addRulesForMatching=function(e){this.rulesQueue.push(e)},a.prototype.matchVariablesAndDependants=function(){var n=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(e,t){e.forEach(function(e){n.varTypes.has(t)&&n.resolveVariableType(e,n.varTypes.get(t))})}),this.unknownColorVars.forEach(function(e){n.unknownBgVars.has(e)?(n.unknownColorVars.delete(e),n.unknownBgVars.delete(e),n.resolveVariableType(e,1)):n.isVarType(e,7)?n.unknownColorVars.delete(e):n.undefinedVars.add(e)}),this.unknownBgVars.forEach(function(e){null!=n.findVarRef(e,function(e){return n.unknownColorVars.has(e)||n.isVarType(e,6)})?n.itarateVarRefs(e,function(e){n.resolveVariableType(e,1)}):n.isVarType(e,9)?n.unknownBgVars.delete(e):n.undefinedVars.add(e)}),this.changedTypeVars.forEach(function(e){n.typeChangeSubscriptions.has(e)&&n.typeChangeSubscriptions.get(e).forEach(function(e){e()})}),this.changedTypeVars.clear()},a.prototype.getModifierForVariable=function(e){var d=this;return function(i){function n(){function e(e,t,n){var r,o;d.isVarType(c,e)&&(r=t(c),e=y(u)?dn(u)?(o=bn(u,d.unstableVarValues),n(o=o||(1===e?"#ffffff":"#000000"),i)):b(u,function(e){return t(e)},function(e){return n(e,i)}):n(u,i),a.push({property:r,value:e}))}var t,n,r,a=[];return e(1,an,mn),e(2,cn,gn),e(4,un,vn),d.isVarType(c,8)&&(t=sn(c),r="function"==typeof(n=Jt(r=y(r=u)?b(u,an,function(e){return mn(e,i)}):r,o,s,l))?n(i):n,a.push({property:t,value:r})),a}var c=e.varName,u=e.sourceValue,o=e.rule,s=e.ignoredImgSelectors,l=e.isCancelled,r=new Set;return{declarations:n(),onTypeChange:{addListener:function(t){function e(){var e=n();t(e)}r.add(e),d.subscribeForVarTypeChange(c,e)},removeListeners:function(){r.forEach(function(e){d.unsubscribeFromVariableTypeChanges(c,e)})}}}}},a.prototype.getModifierForVarDependant=function(r,i){var n,o,c=this;return i.match(/^\s*(rgb|hsl)a?\(/)?(n=r.startsWith("background"),o=fn(r),function(e){var t=bn(i,c.unstableVarValues);return(n?mn:o?gn:vn)(t=t||(n?"#ffffff":"#000000"),e)}):"background-color"===r?function(t){return b(i,an,function(e){return mn(e,t)})}:fn(r)?function(t){return b(i,cn,function(e){return gn(e,t)})}:"background"===r||"background-image"===r||"box-shadow"===r?function(n){function o(){var e=b(i,function(e){return c.isVarType(e,1)?an(e):c.isVarType(e,8)?sn(e):(a.add(e),e)},function(e){return mn(e,n)});if("box-shadow"===r){var t=en(e)(n);if(t.unparseableMatchesLength!==t.matchesLength)return t.result}return e}var a=new Set,e=o();return 0<a.size?new Promise(function(t){function n(){c.unsubscribeFromVariableTypeChanges(r,n);var e=o();t(e)}var r=a.values().next().value;c.subscribeForVarTypeChange(r,n)}):e}:r.startsWith("border")||r.startsWith("outline")?function(t){return b(i,un,function(e){return vn(e,t)})}:null},a.prototype.subscribeForVarTypeChange=function(e,t){this.typeChangeSubscriptions.has(e)||this.typeChangeSubscriptions.set(e,new Set);e=this.typeChangeSubscriptions.get(e);e.has(t)||e.add(t)},a.prototype.unsubscribeFromVariableTypeChanges=function(e,t){this.typeChangeSubscriptions.has(e)&&this.typeChangeSubscriptions.get(e).delete(t)},a.prototype.collectVariablesAndVarDep=function(e){var n=this;e.forEach(function(e){_e(e,function(e){e.style&&Ee(e.style,function(e,t){ln(e)&&n.inspectVariable(e,t),y(t)&&n.inspectVarDependant(e,t)})})})},a.prototype.collectRootVariables=function(){var n=this;Ee(document.documentElement.style,function(e,t){ln(e)&&n.inspectVariable(e,t)})},a.prototype.inspectVariable=function(e,t){this.unstableVarValues.set(e,t),y(t)&&dn(t)&&(this.unknownColorVars.add(e),this.definedVars.add(e)),this.definedVars.has(e)||(this.definedVars.add(e),E(t)?this.unknownColorVars.add(e):(t.includes("url(")||t.includes("linear-gradient(")||t.includes("radial-gradient("))&&this.resolveVariableType(e,8))},a.prototype.resolveVariableType=function(e,t){var n=this.initialVarTypes.get(e)||0,t=(this.varTypes.get(e)||0)|t;this.varTypes.set(e,t),t===n&&!this.undefinedVars.has(e)||(this.changedTypeVars.add(e),this.undefinedVars.delete(e)),this.unknownColorVars.delete(e),this.unknownBgVars.delete(e)},a.prototype.collectRootVarDependants=function(){var n=this;Ee(document.documentElement.style,function(e,t){y(t)&&n.inspectVarDependant(e,t)})},a.prototype.inspectVarDependant=function(t,e){var n=this;ln(t)?this.iterateVarDeps(e,function(e){n.varRefs.has(t)||n.varRefs.set(t,new Set),n.varRefs.get(t).add(e)}):"background-color"===t||"box-shadow"===t?this.iterateVarDeps(e,function(e){return n.resolveVariableType(e,1)}):fn(t)?this.iterateVarDeps(e,function(e){return n.resolveVariableType(e,2)}):t.startsWith("border")||t.startsWith("outline")?this.iterateVarDeps(e,function(e){return n.resolveVariableType(e,4)}):"background"!==t&&"background-image"!==t||this.iterateVarDeps(e,function(e){var t;n.isVarType(e,9)||(t=null!=n.findVarRef(e,function(e){return n.unknownColorVars.has(e)||n.isVarType(e,6)}),n.itarateVarRefs(e,function(e){t?n.resolveVariableType(e,1):n.unknownBgVars.add(e)}))})},a.prototype.iterateVarDeps=function(e,t){var n,r=new Set;n=function(e){r.add(e)},b(e,function(e){return n(e),e}),r.forEach(function(e){return t(e)})},a.prototype.findVarRef=function(e,t,n){var r,o;if((n=void 0===n?new Set:n).has(e))return null;if(n.add(e),t(e))return e;e=this.varRefs.get(e);if(!e||0===e.size)return null;try{for(var a=q(e),i=a.next();!i.done;i=a.next()){var c=i.value,u=this.findVarRef(c,t,n);if(u)return u}}catch(e){r={error:e}}finally{try{i&&!i.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return null},a.prototype.itarateVarRefs=function(e,t){this.findVarRef(e,function(e){return t(e),!1})},a.prototype.setOnRootVariableChange=function(e){this.onRootVariableDefined=e},a.prototype.putRootVars=function(e,n){var t,r=this,e=e.sheet,o=(0<e.cssRules.length&&e.deleteRule(0),new Map),a=(Ee(document.documentElement.style,function(e,t){ln(e)&&(r.isVarType(e,1)&&o.set(an(e),mn(t,n)),r.isVarType(e,2)&&o.set(cn(e),gn(t,n)),r.isVarType(e,4)&&o.set(un(e),vn(t,n)),r.subscribeForVarTypeChange(e,r.onRootVariableDefined))}),[]);a.push(":root {");try{for(var i=q(o),c=i.next();!c.done;c=i.next()){var u=j(c.value,2),s=u[0],l=u[1];a.push(" ".concat(s,": ").concat(l,";"))}}catch(e){t={error:e}}finally{try{c&&!c.done&&(d=i.return)&&d.call(i)}finally{if(t)throw t.error}}a.push("}");var d=a.join("\n");e.insertRule(d)};var R=new a;function nn(e){for(var t,n=[],r=0;t=function(e,t){if(0<=(t=e.indexOf("var(",t=void 0===t?0:t)))return(e=Ne(e,t+3))?{start:t,end:e.end}:null}(e,r);){var o=t.start,a=t.end;n.push({start:o,end:a,value:e.substring(o,a)}),r=t.end+1}return n}function rn(e,t){var n=nn(e),r=n.length;if(0===r)return e;var o=e.length,a=n.map(function(e){return t(e.value)}),i=[];i.push(e.substring(0,n[0].start));for(var c=0;c<r;c++){i.push(a[c]);var u=n[c].end,s=c<r-1?n[c+1].start:o;i.push(e.substring(u,s))}return i.join("")}function on(e){var t,n=e.indexOf(","),n=0<=n?(t=e.substring(4,n).trim(),e.substring(n+1,e.length-1).trim()):(t=e.substring(4,e.length-1).trim(),"");return{name:t,fallback:n}}function b(e,n,r){return rn(e,function(e){var e=on(e),t=e.name,e=e.fallback,t=n(t);return e?(e=y(e)?b(e,n,r):r?r(e):e,"var(".concat(t,", ").concat(e,")")):"var(".concat(t,")")})}function an(e){return"--darkreader-bg".concat(e)}function cn(e){return"--darkreader-text".concat(e)}function un(e){return"--darkreader-border".concat(e)}function sn(e){return"--darkreader-bgimg".concat(e)}function ln(e){return e.startsWith("--")}function y(e){return e.includes("var(")}function dn(e){return e.match(/^\s*(rgb|hsl)a?\(/)}function fn(e){return"color"===e||"caret-color"===e||"-webkit-text-fill-color"===e}var hn=/^\d{1,3}, ?\d{1,3}, ?\d{1,3}$/;function pn(e,t,n){e=e;var r,o=hn.test(e)?(o=e.split(","),r="rgb(",o.forEach(function(e){r+="".concat(e.trim(),", ")}),r=r.substring(0,r.length-2),{isRaw:!0,color:r+=")"}):{isRaw:!1,color:e},e=o.isRaw,a=o.color,i=E(a);return i?(n=n(i,t),e&&(i=E(n))?"".concat(i.r,", ").concat(i.g,", ").concat(i.b):n):a}function mn(e,t){return pn(e,t,g)}function gn(e,t){return pn(e,t,v)}function vn(e,t){return pn(e,t,kt)}function bn(e,n,r){void 0===r&&(r=new Set);var o=!1,e=rn(e,function(e){var e=on(e),t=e.name,e=e.fallback;if(r.has(t))return o=!0,null;r.add(t);t=n.get(t)||e,e=null;return(e=t?y(t)?bn(t,n,r):t:e)?e:(o=!0,null)});return o?null:e}var yn={"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"}},Sn=Object.values(yn),_n={},kn=(Sn.forEach(function(e){var t=e.cssProp,e=e.customProp;return _n[e]=t}),["style","fill","stop-color","stroke","bgcolor","color"]),wn=kn.map(function(e){return"[".concat(e,"]")}).join(", ");function En(){return Sn.map(function(e){var t=e.dataAttr,n=e.customProp,e=e.cssProp;return["[".concat(t,"] {")," ".concat(e,": var(").concat(n,") !important;"),"}"].join("\n")}).join("\n")}var Cn=new Map,xn=new Map;function Tn(e,r,o){Cn.has(e)&&(Cn.get(e).disconnect(),xn.get(e).disconnect());var a=new WeakSet;function t(t){var e,n;n=[],(e=t)instanceof Element&&e.matches(wn)&&n.push(e),(e instanceof Element||D&&e instanceof ShadowRoot||e instanceof Document)&&ne(n,e.querySelectorAll(wn)),n.forEach(function(e){a.has(e)||(a.add(e),r(e))}),h(t,function(e){a.has(t)||(a.add(t),o(e.shadowRoot),Tn(e.shadowRoot,r,o))})}var n=ge(e,{onMinorMutations:function(e){e.additions.forEach(t)},onHugeMutations:function(){t(e)}}),i=(Cn.set(e,n),0),c=null,u=oe({seconds:10}),s=oe({seconds:2}),l=[],d=null,f=re(function(e){e.forEach(function(e){kn.includes(e.attributeName)&&r(e.target)})}),n=new MutationObserver(function(e){if(d)l.push.apply(l,T([],j(e),!1));else{i++;var t=Date.now();if(null==c)c=t;else if(50<=i){if(t-c<u)return d=setTimeout(function(){i=0,d=c=null;var e=l;l=[],f(e)},s),void l.push.apply(l,T([],j(e),!1));c=t,i=1}f(e)}});n.observe(e,{attributes:!0,attributeFilter:kn.concat(Sn.map(function(e){return e.dataAttr})),subtree:!0}),xn.set(e,n)}var Rn=new WeakMap,Vn=["brightness","contrast","grayscale","sepia","mode"];function An(t,n){return kn.map(function(e){return"".concat(e,'="').concat(t.getAttribute(e),'"')}).concat(Vn.map(function(e){return"".concat(e,'="').concat(n[e],'"')})).join(" ")}function Mn(i,c,e,u){var s,n,t;function r(e,t,n){var r=e.startsWith("--"),o=r?{}:yn[e],a=o.customProp,o=o.dataAttr,t=Ht(t,n,{style:i.style},R,u,null);t&&("function"==typeof(n=t.value)&&(n=n(c)),r&&"object"==typeof n?n.declarations.forEach(function(e){var t=e.property,e=e.value;e instanceof Promise||i.style.setProperty(t,e)}):(i.style.setProperty(a,n),i.hasAttribute(o)||i.setAttribute(o,""),s.delete(e)))}An(i,c)!==Rn.get(i)&&(s=new Set(Object.keys(yn)),0<e.length&&function(e,t){for(var n=0,r=t.length;n<r;n++){var o=t[n];if(e.matches(o))return 1}}(i,e)?s.forEach(function(e){i.removeAttribute(yn[e].dataAttr)}):(i.hasAttribute("bgcolor")&&r("background-color","background-color",t=(t=i.getAttribute("bgcolor")).match(/^[0-9a-f]{3}$/i)||t.match(/^[0-9a-f]{6}$/i)?"#".concat(t):t),i.hasAttribute("color")&&"mask-icon"!==i.rel&&r("color","color",t=(t=i.getAttribute("color")).match(/^[0-9a-f]{3}$/i)||t.match(/^[0-9a-f]{6}$/i)?"#".concat(t):t),i instanceof SVGElement&&(i.hasAttribute("fill")&&"none"!==(n=i.getAttribute("fill"))&&(i instanceof SVGTextElement?r("fill","color",n):(e=function(){var e=i.getBoundingClientRect(),t=e.width,e=e.height;r("fill",32<t||32<e?"background-color":"color",n)},se()?e():fe(e))),i.hasAttribute("stop-color")&&r("stop-color","background-color",i.getAttribute("stop-color"))),i.hasAttribute("stroke")&&(t=i.getAttribute("stroke"),r("stroke",i instanceof SVGLineElement||i instanceof SVGTextElement?"border-color":"color",t)),i.style&&Ee(i.style,function(e,t){"background-image"===e&&t.includes("url")||(yn.hasOwnProperty(e)||e.startsWith("--")&&!_n[e]?r(e,e,t):!(t=_n[e])||i.style.getPropertyValue(t)||i.hasAttribute(t)||"background-color"===t&&i.hasAttribute("bgcolor")||i.style.setProperty(e,""))}),i.style&&i instanceof SVGTextElement&&i.style.fill&&r("fill","color",i.style.getPropertyValue("fill")),f(s,function(e){i.removeAttribute(yn[e].dataAttr)}),Rn.set(i,An(i,c))))}var Ln="theme-color",On='meta[name="'.concat(Ln,'"]'),Dn=null,i=null;function Pn(e,t){var n=E(Dn=Dn||e.content);n&&(e.content=g(n,t))}var In=["mode","brightness","contrast","grayscale","sepia","darkSchemeBackgroundColor","darkSchemeTextColor","lightSchemeBackgroundColor","lightSchemeTextColor"];Nn=[],Fn=null;var Nn,Fn,jn={add:function(e){Nn.push(e),Fn=Fn||requestAnimationFrame(Bn)},cancel:function(){Nn.splice(0),cancelAnimationFrame(Fn),Fn=null}};function Bn(){for(var e;e=Nn.shift();)e();Fn=null}function qn(){var S=0,_=new Set,k=new Map,w=new Set,E=null,C=!1,x=!1;return{modifySheet:function(e){var t,n,c,f,u,h,r,o,a=e.sourceCSSRules,i=e.theme,s=e.ignoreImageAnalysis,l=e.force,d=e.prepareSheet,p=e.isAsyncCancelled,m=0===k.size,g=new Set(k.keys());t=i,n="",In.forEach(function(e){n+="".concat(e,":").concat(t[e],";")});var v=(e=n)!==E,b=(C&&(x=!0),[]);function y(e,t,n){var r=n.selector,n=n.declarations,a="",n=(n.forEach(function(e){var t,n,r,o;a+="".concat((n=(t=e).property,r=e.value,o=e.important,t=e.sourceValue,"".concat(n,": ").concat(null==r?t:r).concat(o?" !important":"",";"))," ")}),"".concat(r," { ").concat(a," }"));e.insertRule(n,t)}_e(a,function(n){var r,e,t=n.cssText,o=!1;g.delete(t),n.parentRule instanceof CSSMediaRule&&(t+=";".concat(n.parentRule.media.mediaText)),_.has(t)||(_.add(t),o=!0),o?(m=!0,r=[],n.style&&Ee(n.style,function(e,t){e=Ht(e,t,n,R,s,p);e&&r.push(e)}),o=null,0<r.length&&(e=n.parentRule,o={selector:n.selectorText,declarations:r,parentRule:e},b.push(o)),k.set(t,o)):b.push(k.get(t))},function(){C=!0}),g.forEach(function(e){_.delete(e),k.delete(e)}),E=e,(l||m||v)&&(S++,c=new Map,f=new Map,r={rule:null,rules:[],isGroup:!(h=u=0)},o=new WeakMap,w.forEach(function(e){return e()}),w.clear(),b.filter(function(e){return e}).forEach(function(e){var t=e.selector,n=e.declarations,e=function e(t){if(null==t)return r;if(o.has(t))return o.get(t);var n={rule:t,rules:[],isGroup:!0};return o.set(t,n),e(t.parentRule).rules.push(n),n}(e.parentRule),t={selector:t,declarations:[],isGroup:!1},l=t.declarations;function d(e,t,n,r){var o=++u,a={property:e,value:null,important:n,asyncKey:o,sourceValue:r},i=(l.push(a),S);t.then(function(e){e&&!p()&&i===S&&(a.value=e,jn.add(function(){var e,t,n,r;p()||i!==S||(e=o,t=c.get(e),n=t.rule,r=t.target,t=t.index,r.deleteRule(t),y(r,t,n),c.delete(e))}))})}function a(e,t,r,o){var n=t.declarations,a=t.onTypeChange,i=++h,c=S,u=l.length,s=[];0===n.length&&(l.push(t={property:e,value:o,important:r,sourceValue:o,varKey:i}),s=[t]),n.forEach(function(e){e.value instanceof Promise?d(e.property,e.value,r,o):(e={property:e.property,value:e.value,important:r,sourceValue:o,varKey:i},l.push(e),s.push(e))}),a.addListener(function(e){var t,n;p()||c!==S||(e=e.map(function(e){return{property:e.property,value:e.value,important:r,sourceValue:o,varKey:i}}),t=l.indexOf(s[0],u),l.splice.apply(l,T([t,s.length],j(e),!1)),s=e,t=i,t=f.get(t),e=t.rule,n=t.target,t=t.index,n.deleteRule(t),y(n,t,e))}),w.add(function(){return a.removeListeners()})}e.rules.push(t),n.forEach(function(e){var t,n=e.property,r=e.value,o=e.important,e=e.sourceValue;"function"==typeof r?(t=r(i))instanceof Promise?d(n,t,o,e):n.startsWith("--")?a(n,t,o,e):l.push({property:n,value:t,important:o,sourceValue:e}):l.push({property:n,value:r,important:o,sourceValue:e})})}),a=d(),function o(e,a,i){e.rules.forEach(function(e){var t,n,r;e.isGroup?(n=a,t=(t=(t=e).rule)instanceof CSSMediaRule?(t=t.media,r=n.cssRules.length,n.insertRule("@media ".concat(t.mediaText," {}"),r),n.cssRules[r]):n,o(e,t,i)):i(e,a)})}(r,a,function(n,r){var o=r.cssRules.length;n.declarations.forEach(function(e){var t=e.asyncKey,e=e.varKey;null!=t&&c.set(t,{rule:n,target:r,index:o}),null!=e&&f.set(e,{rule:n,target:r,index:o})}),y(r,o,n)}))},shouldRebuildStyle:function(){return C&&!x}}}function Un(e){return(e instanceof HTMLStyleElement||e instanceof SVGStyleElement||e instanceof HTMLLinkElement&&e.rel&&e.rel.toLowerCase().includes("stylesheet")&&e.href&&!e.disabled&&(!O||!e.href.startsWith("moz-extension://"))&&!function(t){if(t.href)try{return"fonts.googleapis.com"===new URL(t.href).hostname}catch(e){return"Couldn't construct ".concat(t.href," as URL"),0}}(e))&&!e.classList.contains("darkreader")&&"print"!==e.media.toLowerCase()&&!e.classList.contains("stylus")}function S(e,t,n){return void 0===t&&(t=[]),void 0===n&&(n=!0),Un(e)?t.push(e):(e instanceof Element||D&&e instanceof ShadowRoot||e===document)&&(f(e.querySelectorAll('style, link[rel*="stylesheet" i]:not([disabled])'),function(e){S(e,t,!1)}),n&&h(e,function(e){return S(e.shadowRoot,t,!1)})),t}var Wn=new WeakSet,Gn=new WeakSet,Hn=!1,$n=(document.addEventListener("__darkreader__inlineScriptsAllowed",function(){Hn=!0}),0),zn=new Map;function Qn(c,e){for(var i=e.update,n=e.loadingStart,r=e.loadingEnd,t=[],o=c;(o=o.nextElementSibling)&&o.matches(".darkreader");)t.push(o);var u=t.find(function(e){return e.matches(".darkreader--cors")&&!Gn.has(e)})||null,s=t.find(function(e){return e.matches(".darkreader--sync")&&!Wn.has(e)})||null,l=null,d=null,f=!1,h=!0,p=qn(),a=new MutationObserver(function(){i()}),m={attributes:!0,childList:!0,subtree:!0,characterData:!0};function g(){return c instanceof HTMLStyleElement&&c.textContent.trim().match(xe)}function v(e,t){var n=!1;if(e)for(var r=void 0,o=0,a=e.length;o<a;o++)if((r=e[o]).href){if(!t){n=!0;break}if(r.href.startsWith("http")&&!r.href.startsWith(location.origin)){n=!0;break}}return n}function b(){if(u)return u.sheet.cssRules;if(g())return null;var e,t=x();return c instanceof HTMLLinkElement&&!((e=c.href).startsWith("data:")||(e=ye(e)).protocol===location.protocol&&(e.hostname===location.hostname&&(e.port===location.port&&e.pathname===location.pathname)))&&v(t,!1)||v(t,!0)?null:t}function y(){u?(c.nextSibling!==u&&c.parentNode.insertBefore(u,c.nextSibling),u.nextSibling!==s&&c.parentNode.insertBefore(s,u.nextSibling)):c.nextSibling!==s&&c.parentNode.insertBefore(s,c.nextSibling)}var S=!1,_=!1,k=++$n;function w(){return N(this,void 0,void 0,function(){var n,r,o,a,i;return F(this,function(e){switch(e.label){case 0:if(!(c instanceof HTMLLinkElement))return[3,7];if(a=j(C(),2),o=a[0],a=a[1],!(!o&&!a&&!U||U&&!c.sheet||(t=a)&&t.message&&t.message.includes("loading")))return[3,5];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,function(a,i){return N(this,void 0,void 0,function(){return F(this,function(e){return[2,new Promise(function(e,t){var n=function(){a.removeEventListener("load",r),a.removeEventListener("error",o),zn.delete(i)},r=function(){n(),e()},o=function(){n(),t("Linkelement ".concat(i," couldn't be loaded. ").concat(a.href))};zn.set(i,function(){n(),t()}),a.addEventListener("load",r),a.addEventListener("error",o),a.href||o()})]})})}(c,k)];case 2:return e.sent(),[3,4];case 3:return e.sent(),_=!0,[3,4];case 4:if(f)return[2,null];i=j(C(),2),o=i[0],a=i[1],e.label=5;case 5:return o&&!v(o,!1)?[2,o]:[4,Yn(c.href)];case 6:return n=e.sent(),r=Re(c.href),f?[2,null]:[3,8];case 7:if(!g())return[2,null];n=c.textContent.trim(),r=Re(location.href),e.label=8;case 8:if(!n)return[3,13];e.label=9;case 9:return e.trys.push([9,11,,12]),[4,function s(l,d,f){void 0===f&&(f=new Map);return N(this,void 0,void 0,function(){var t,n,r,o,a,i,c,u;return F(this,function(e){switch(e.label){case 0:l=Ve(l=Oe(l=Me(l)),d),t=Ie(xe,l),e.label=1;case 1:e.trys.push([1,10,11,12]),n=q(t),r=n.next(),e.label=2;case 2:return r.done?[3,9]:(o=r.value,a=Kn(o),a=Se(d,a),i=void 0,f.has(a)?(i=f.get(a),[3,7]):[3,3]);case 3:return e.trys.push([3,6,,7]),[4,Yn(a)];case 4:return i=e.sent(),f.set(a,i),[4,s(i,Re(a),f)];case 5:return i=e.sent(),[3,7];case 6:return e.sent(),i="",[3,7];case 7:l=l.split(o).join(i),e.label=8;case 8:return r=n.next(),[3,2];case 9:return[3,12];case 10:return c=e.sent(),c={error:c},[3,12];case 11:try{r&&!r.done&&(u=n.return)&&u.call(n)}finally{if(c)throw c.error}return[7];case 12:return[2,l=l.trim()]}})})}(n,r)];case 10:return i=e.sent(),u=function(e,t){if(!t)return null;var n=document.createElement("style");return n.classList.add("darkreader"),n.classList.add("darkreader--cors"),n.media="screen",n.textContent=t,e.parentNode.insertBefore(n,e.nextSibling),n.sheet.disabled=!0,Gn.add(n),n}(c,i),[3,12];case 11:return e.sent(),[3,12];case 12:if(u)return l=ae(u,"prev-sibling"),[2,u.sheet.cssRules];e.label=13;case 13:return[2,null]}var t})})}var E=!1;function C(){try{return null==c.sheet?[null,null]:[c.sheet.cssRules,null]}catch(e){return[null,e]}}function x(){var e=j(C(),2),t=e[0];return e[1]?null:t}function T(){function e(){A()!==R&&(R=A(),i()),Hn&&c.sheet?M():V=requestAnimationFrame(e)}c.addEventListener("__darkreader__updateSheet",O),Hn&&c.sheet||(R=A(),M(),e())}var R=null,V=null;function A(){var e=x();return e?e.length:null}function M(){cancelAnimationFrame(V)}var L=!1;function O(){function e(){L=!1,f||i()}Hn=!0,M(),L||(L=!0,("function"==typeof queueMicrotask?queueMicrotask:requestAnimationFrame)(e))}function D(){c.removeEventListener("__darkreader__updateSheet",O),M()}function P(){a.disconnect(),f=!0,l&&l.stop(),d&&d.stop(),D()}var I=0;return{details:function(e){var t=b();return t?{rules:t}:(e.secondRound||S||_||(S=!0,n(),w().then(function(e){S=!1,r(),e&&i()}).catch(function(e){S=!1,r()})),null)},render:function(t,n){var r=b();function o(){s||((s=c instanceof SVGStyleElement?document.createElementNS("http://www.w3.org/2000/svg","style"):document.createElement("style")).classList.add("darkreader"),s.classList.add("darkreader--sync"),s.media="screen",c.title&&(s.title=c.title),Wn.add(s)),d&&d.stop(),y(),null==s.sheet&&(s.textContent="");for(var e=s.sheet,t=e.cssRules.length-1;0<=t;t--)e.deleteRule(t);return d?d.run():d=ae(s,"prev-sibling",function(){E=!0,a()}),s.sheet}function a(){var e=E;E=!1,p.modifySheet({prepareSheet:o,sourceCSSRules:r,theme:t,ignoreImageAnalysis:n,force:e,isAsyncCancelled:function(){return f}}),h=0===s.sheet.cssRules.length,p.shouldRebuildStyle()&&fe(function(){return i()})}r&&(f=!1,a())},pause:P,destroy:function(){var e;P(),B(u),B(s),r(),zn.has(k)&&(e=zn.get(k),zn.delete(k),e&&e())},watch:function(){a.observe(c,m),c instanceof HTMLStyleElement&&T()},restore:function(){!s||10<++I||(y(),l&&l.skip(),d&&d.skip(),h||(E=!0,i()))}}}function Kn(e){return Te(e.substring(7).trim().replace(/;$/,"").replace(/screen$/,""))}function Yn(t){return N(this,void 0,void 0,function(){return F(this,function(e){switch(e.label){case 0:return t.startsWith("data:")?[4,fetch(t)]:[3,3];case 1:return[4,e.sent().text()];case 2:return[2,e.sent()];case 3:return[4,Rt({url:t,responseType:"text",mimeType:"text/css",origin:window.location.origin})];case 4:return[2,e.sent()]}})})}var Xn,Zn,Jn=[],c=new Map;function er(e){I&&f(e.querySelectorAll(":not(:defined)"),function(e){var t=e.tagName.toLowerCase();if(!t.includes("-")){var n=e.getAttribute("is");if(!n)return;t=n}c.has(t)||(c.set(t,new Set),function(r){return N(this,void 0,void 0,function(){return F(this,function(e){return[2,new Promise(function(t){var n;window.customElements&&"function"==typeof customElements.whenDefined?customElements.whenDefined(r).then(function(){return t()}):tr?(nr.set(r,t),document.dispatchEvent(new CustomEvent("__darkreader__addUndefinedResolver",{detail:{tag:r}}))):(n=function(){var e=c.get(r);e&&0<e.size&&(e.values().next().value.matches(":defined")?t():requestAnimationFrame(n))},requestAnimationFrame(n))})]})})}(t).then(function(){var e;Zn&&(e=c.get(t),c.delete(t),Zn(Array.from(e)))})),c.get(t).add(e)})}var tr=!1,nr=(document.addEventListener("__darkreader__inlineScriptsAllowed",function(){tr=!0}),new Map);function rr(e){tr=!0,nr.has(e.detail.tag)&&nr.get(e.detail.tag)()}function or(e,r,t){ar();var a=new Set(e),i=new WeakMap,c=new WeakMap;function o(e){i.set(e,e.previousElementSibling),c.set(e,e.nextElementSibling)}function u(e){var t=e.createdStyles,n=e.removedStyles,e=e.movedStyles;t.forEach(o),e.forEach(o),n.forEach(function(e){return e=e,i.delete(e),void c.delete(e)}),t.forEach(function(e){return a.add(e)}),n.forEach(function(e){return a.delete(e)}),0<t.size+n.size+e.size&&r({created:Array.from(t),removed:Array.from(n),moved:Array.from(e),updated:[]})}function s(e){var t=e.additions,n=e.moves,e=e.deletions,r=new Set,o=new Set,a=new Set;t.forEach(function(e){return S(e).forEach(function(e){return r.add(e)})}),e.forEach(function(e){return S(e).forEach(function(e){return o.add(e)})}),n.forEach(function(e){return S(e).forEach(function(e){return a.add(e)})}),u({createdStyles:r,removedStyles:o,movedStyles:a}),t.forEach(function(e){h(e,f),er(e)})}function l(e){var t=new Set(S(e)),n=new Set,r=new Set,o=new Set;t.forEach(function(e){a.has(e)||n.add(e)}),a.forEach(function(e){t.has(e)||r.add(e)}),t.forEach(function(e){var t;n.has(e)||r.has(e)||(t=e).previousElementSibling===i.get(t)&&t.nextElementSibling===c.get(t)||o.add(e)}),u({createdStyles:n,removedStyles:r,movedStyles:o}),h(e,f),er(e)}function d(e){var t=new Set,n=new Set;e.forEach(function(e){e=e.target;e.isConnected&&(Un(e)?t.add(e):e instanceof HTMLLinkElement&&e.disabled&&n.add(e))}),0<t.size+n.size&&r({updated:Array.from(t),created:[],removed:Array.from(n),moved:[]})}function n(e){var t=ge(e,{onMinorMutations:s,onHugeMutations:l}),n=new MutationObserver(d);n.observe(e,{attributes:!0,attributeFilter:["rel","disabled","media","href"],subtree:!0}),Jn.push(t,n),Xn.add(e)}function f(e){e=e.shadowRoot;null==e||Xn.has(e)||(n(e),t(e))}e.forEach(o),n(document),h(document.documentElement,f),Zn=function(e){var t=[];e.forEach(function(e){return ne(t,S(e.shadowRoot))}),r({created:t,updated:[],removed:[],moved:[]}),e.forEach(function(e){var t=e.shadowRoot;null!=t&&(f(e),h(t,f),er(t))})},document.addEventListener("__darkreader__isDefined",rr),er(document)}function ar(){Jn.forEach(function(e){return e.disconnect()}),Jn.splice(0,Jn.length),Xn=new WeakSet,Zn=null,c.clear(),document.removeEventListener("__darkreader__isDefined",rr)}var ir=new WeakMap,cr=new WeakSet;function ur(c){var r=!1;return{render:function(t,n){c.adoptedStyleSheets.forEach(function(a){var e,i;cr.has(a)||(e=a.rules,i=new CSSStyleSheet,qn().modifySheet({prepareSheet:function(){for(var e,t,n,r,o=i.cssRules.length-1;0<=o;o--)i.deleteRule(o);return e=a,t=i,n=T([],j(c.adoptedStyleSheets),!1),e=n.indexOf(e),r=n.indexOf(t),e!==r-1&&(0<=r&&n.splice(r,1),n.splice(e+1,0,t),c.adoptedStyleSheets=n),ir.set(a,i),cr.add(i),i},sourceCSSRules:e,theme:t,ignoreImageAnalysis:n,force:!1,isAsyncCancelled:function(){return r}}))})},destroy:function(){r=!0;var n=T([],j(c.adoptedStyleSheets),!1);c.adoptedStyleSheets.forEach(function(e){var t;cr.has(e)&&(0<=(t=n.indexOf(e))&&n.splice(t,1),ir.delete(e),cr.delete(e))}),c.adoptedStyleSheets=n}}}function sr(e){document.dispatchEvent(new CustomEvent("__darkreader__inlineScriptsAllowed"));function t(){Object.defineProperty(CSSStyleSheet.prototype,"addRule",r),Object.defineProperty(CSSStyleSheet.prototype,"insertRule",o),Object.defineProperty(CSSStyleSheet.prototype,"deleteRule",a),Object.defineProperty(CSSStyleSheet.prototype,"removeRule",i),document.removeEventListener("__darkreader__cleanUp",t),document.removeEventListener("__darkreader__addUndefinedResolver",n),e&&Object.defineProperty(Document.prototype,"styleSheets",c),u&&Object.defineProperty(Element.prototype,"getElementsByTagName",s)}function n(e){customElements.whenDefined(e.detail.tag).then(function(){document.dispatchEvent(new CustomEvent("__darkreader__isDefined",{detail:{tag:e.detail.tag}}))})}var r=Object.getOwnPropertyDescriptor(CSSStyleSheet.prototype,"addRule"),o=Object.getOwnPropertyDescriptor(CSSStyleSheet.prototype,"insertRule"),a=Object.getOwnPropertyDescriptor(CSSStyleSheet.prototype,"deleteRule"),i=Object.getOwnPropertyDescriptor(CSSStyleSheet.prototype,"removeRule"),c=e?Object.getOwnPropertyDescriptor(Document.prototype,"styleSheets"):null,u=["baidu.com","baike.baidu.com","ditu.baidu.com","map.baidu.com","maps.baidu.com","haokan.baidu.com","pan.baidu.com","passport.baidu.com","tieba.baidu.com","www.baidu.com"].includes(location.hostname),s=u?Object.getOwnPropertyDescriptor(Element.prototype,"getElementsByTagName"):null,l=(document.addEventListener("__darkreader__cleanUp",t),document.addEventListener("__darkreader__addUndefinedResolver",n),new Event("__darkreader__updateSheet"));function d(){function n(){var t=T([],j(c.get.call(e)),!1).filter(function(e){return!e.ownerNode.classList.contains("darkreader")});return t.item=function(e){return t[e]},Object.setPrototypeOf(t,StyleSheetList.prototype)}var e=this,t=n();return new Proxy(t,{get:function(e,t){return n()[t]}})}function f(t){var n=this;if("style"!==t)return s.value.call(this,t);function r(){var e=s.value.call(n,t);return Object.setPrototypeOf(T([],j(e),!1).filter(function(e){return!e.classList.contains("darkreader")}),NodeList.prototype)}var e=r();return new Proxy(e,{get:function(e,t){return r()[Number(t)||t]}})}Object.defineProperty(CSSStyleSheet.prototype,"addRule",Object.assign({},r,{value:function(e,t,n){return r.value.call(this,e,t,n),this.ownerNode&&!this.ownerNode.classList.contains("darkreader")&&this.ownerNode.dispatchEvent(l),-1}})),Object.defineProperty(CSSStyleSheet.prototype,"insertRule",Object.assign({},o,{value:function(e,t){return e=o.value.call(this,e,t),this.ownerNode&&!this.ownerNode.classList.contains("darkreader")&&this.ownerNode.dispatchEvent(l),e}})),Object.defineProperty(CSSStyleSheet.prototype,"deleteRule",Object.assign({},a,{value:function(e){a.value.call(this,e),this.ownerNode&&!this.ownerNode.classList.contains("darkreader")&&this.ownerNode.dispatchEvent(l)}})),Object.defineProperty(CSSStyleSheet.prototype,"removeRule",Object.assign({},i,{value:function(e){i.value.call(this,e),this.ownerNode&&!this.ownerNode.classList.contains("darkreader")&&this.ownerNode.dispatchEvent(l)}})),e&&Object.defineProperty(Document.prototype,"styleSheets",Object.assign({},c,{get:d})),u&&Object.defineProperty(Element.prototype,"getElementsByTagName",Object.assign({},s,{value:f}))}var lr="randomUUID"in crypto?(t=crypto.randomUUID()).substring(0,8)+t.substring(9,13)+t.substring(14,18)+t.substring(19,23)+t.substring(24):Array.from(crypto.getRandomValues(new Uint8Array(16))).map(function(e){return(e<16?"0":"")+e.toString(16)}).join(""),l=new Map,dr=[],_=null,k=null,fr=null,w=null,hr=null;function V(e,t){t=(t=void 0===t?document.head||document:t).querySelector(".".concat(e));return t||((t=document.createElement("style")).classList.add("darkreader"),t.classList.add(e),t.media="screen",t.textContent=""),t}var pr=new Map;function A(e,t){pr.has(t)&&pr.get(t).stop(),pr.set(t,ae(e,"parent"))}function mr(){var e,t=V("darkreader--fallback",document),n=(t.textContent=Kt(_,{strict:!0}),document.head.insertBefore(t,document.head.firstChild),A(t,"fallback"),V("darkreader--user-agent")),n=(n.textContent=zt(_,fr,_.styleSystemControls),document.head.insertBefore(n,t.nextSibling),A(n,"user-agent"),V("darkreader--text")),r=(_.useFont||0<_.textStroke?n.textContent=(r=_,(o=[]).push('*:not(pre, pre *, code, .far, .fa, .glyphicon, [class*="vjs-"], .fab, .fa-github, .fas, .material-icons, .icofont, .typcn, mu, [class*="mu-"], .glyphicon, .icon) {'),r.useFont&&r.fontFamily&&o.push(" font-family: ".concat(r.fontFamily," !important;")),0<r.textStroke&&(o.push(" -webkit-text-stroke: ".concat(r.textStroke,"px !important;")),o.push(" text-stroke: ".concat(r.textStroke,"px !important;"))),o.push("}"),o.join("\n")):n.textContent="",document.head.insertBefore(n,t.nextSibling),A(n,"text"),V("darkreader--invert")),o=(k&&Array.isArray(k.invert)&&0<k.invert.length?r.textContent=["".concat(k.invert.join(", ")," {")," filter: ".concat(Et(d(d({},_),{contrast:0===_.mode?_.contrast:C(_.contrast-10,0,100)}))," !important;"),"}"].join("\n"):r.textContent="",document.head.insertBefore(r,n.nextSibling),A(r,"invert"),V("darkreader--inline")),t=(o.textContent=En(),document.head.insertBefore(o,r.nextSibling),A(o,"inline"),V("darkreader--override")),n=(t.textContent=k&&k.css?br(k.css):"",document.head.appendChild(t),A(t,"override"),V("darkreader--variables")),t=Qt(_),a=_.darkSchemeBackgroundColor,i=_.darkSchemeTextColor,c=_.lightSchemeBackgroundColor,u=_.lightSchemeTextColor,s=_.mode,u=0===s?u:i,i=g(E(0===s?c:a),_),u=v(E(u),_),s=(n.textContent=[":root {"," --darkreader-neutral-background: ".concat(i,";")," --darkreader-neutral-text: ".concat(u,";")," --darkreader-selection-background: ".concat(t.backgroundColorSelection,";")," --darkreader-selection-text: ".concat(t.foregroundColorSelection,";"),"}"].join("\n"),document.head.insertBefore(n,o.nextSibling),A(n,"variables"),V("darkreader--root-vars")),c=(document.head.insertBefore(s,n.nextSibling),!(k&&k.disableStyleSheetsProxy)),i=(a="darkreader--proxy",(e=(e=void 0===e?document.head||document:e).querySelector(".".concat(a)))||((e=document.createElement("script")).classList.add("darkreader"),e.classList.add(a)),e);i.append("(".concat(sr,")(").concat(c,")")),document.head.insertBefore(i,s.nextSibling),i.remove()}var gr=new Set;function vr(e){var t=V("darkreader--inline",e),n=(t.textContent=En(),e.insertBefore(t,e.firstChild),V("darkreader--override",e)),t=(n.textContent=k&&k.css?br(k.css):"",e.insertBefore(n,t.nextSibling),V("darkreader--invert",e));k&&Array.isArray(k.invert)&&0<k.invert.length?t.textContent=["".concat(k.invert.join(", ")," {")," filter: ".concat(Et(d(d({},_),{contrast:0===_.mode?_.contrast:C(_.contrast-10,0,100)}))," !important;"),"}"].join("\n"):t.textContent="",e.insertBefore(t,n.nextSibling),gr.add(e)}function br(e){return e.replace(/\${(.+?)}/g,function(e,t){var n=E(t);return n?ht(n,_,pt):t})}function yr(){var e=document.querySelector(".darkreader--fallback");e&&(e.textContent="")}function Sr(){Er();var e=S(document).filter(function(e){return!l.has(e)}).map(kr),t=(e.map(function(e){return e.details({secondRound:!1})}).filter(function(e){return e&&0<e.rules.length}).forEach(function(e){R.addRulesForMatching(e.rules)}),R.matchVariablesAndDependants(),R.setOnRootVariableChange(function(){R.putRootVars(document.head.querySelector(".darkreader--root-vars"),_)}),R.putRootVars(document.head.querySelector(".darkreader--root-vars"),_),l.forEach(function(e){return e.render(_,w)}),0===M.size&&yr(),e.forEach(function(e){return e.watch()}),function(e){for(var t=[],n=0,r=e.length;n<r;n++)t.push(e[n]);return t}(document.querySelectorAll(wn)));h(document.documentElement,function(e){vr(e.shadowRoot);e=e.shadowRoot.querySelectorAll(wn);0<e.length&&ne(t,e)}),t.forEach(function(e){return Mn(e,_,hr,w)}),Lr(document)}var _r=0,M=new Set;function kr(e){var t=++_r;var n=Qn(e,{update:function(){var e=n.details({secondRound:!0});e&&(R.addRulesForMatching(e.rules),R.matchVariablesAndDependants(),n.render(_,w))},loadingStart:function(){var e;p()&&Vr||(M.add(t),"Current amount of styles loading: ".concat(M.size),(e=document.querySelector(".darkreader--fallback")).textContent||(e.textContent=Kt(_,{strict:!1})))},loadingEnd:function(){M.delete(t),"Removed loadingStyle ".concat(t,", now awaiting: ").concat(M.size),0===M.size&&p()&&yr()}});return l.set(e,n),n}function wr(e){var t=l.get(e);t&&(t.destroy(),l.delete(e))}function Er(){Cr.cancel()}var Cr=re(function(e){l.forEach(function(e){return e.render(_,w)}),dr.forEach(function(e){return e.render(_,w)}),e&&e()});function xr(){0===M.size&&yr()}var Tr,Rr=null,Vr=!document.hidden;function Ar(){document.removeEventListener("visibilitychange",Rr),Rr=null}function Mr(){function e(){Sr(),or(Array.from(l.keys()),function(e){var t=e.created,n=e.updated,r=e.removed,e=e.moved,t=t.concat(n).concat(e).filter(function(e){return!l.has(e)}),n=e.filter(function(e){return l.has(e)}),e=(r.forEach(wr),t.map(kr));e.map(function(e){return e.details({secondRound:!1})}).filter(function(e){return e&&0<e.rules.length}).forEach(function(e){R.addRulesForMatching(e.rules)}),R.matchVariablesAndDependants(),e.forEach(function(e){return e.render(_,w)}),e.forEach(function(e){return e.watch()}),n.forEach(function(e){return l.get(e).restore()})},function(e){vr(e),Lr(e)});var t=function(e){Mn(e,_,hr,w),e===document.documentElement&&(e.getAttribute("style")||"").includes("--")&&(R.matchVariablesAndDependants(),R.putRootVars(document.head.querySelector(".darkreader--root-vars"),_))},n=function(e){vr(e);e=e.querySelectorAll(wn);0<e.length&&f(e,function(e){Mn(e,_,hr,w)})};Tn(document,t,n),h(document.documentElement,function(e){Tn(e.shadowRoot,t,n)}),ce(xr)}var t,a,n;mr(),document.hidden&&!_.immediateModify?(t=e,n=Boolean(Rr),Rr=function(){document.hidden||(Ar(),t(),Vr=!0)},n||document.addEventListener("visibilitychange",Rr)):e(),a=_,(n=document.querySelector(On))?Pn(n,a):(i&&i.disconnect(),(i=new MutationObserver(function(e){e:for(var t=0;t<e.length;t++)for(var n=e[t].addedNodes,r=0;r<n.length;r++){var o=n[r];if(o instanceof HTMLMetaElement&&o.name===Ln){i.disconnect(),i=null,Pn(o,a);break e}}})).observe(document.head,{childList:!0}))}function Lr(e){try{var t;Array.isArray(e.adoptedStyleSheets)&&0<e.adoptedStyleSheets.length&&(t=ur(e),dr.push(t),t.render(_,w))}catch(e){}}function Or(){l.forEach(function(e){return e.pause()}),f(pr.values(),function(e){e.stop()}),pr.clear(),ar(),Cn.forEach(function(e){return e.disconnect()}),xn.forEach(function(e){return e.disconnect()}),Cn.clear(),xn.clear(),ue(xr),de.clear()}function Dr(){return document.querySelector('meta[name="darkreader-lock"]')||((e=document.querySelector('meta[name="darkreader"]'))?e.content!==lr:((e=document.createElement("meta")).name="darkreader",e.content=lr,document.head.appendChild(e),void(Tr=new MutationObserver(function(){document.querySelector('meta[name="darkreader-lock"]')&&(Tr.disconnect(),Ir())})).observe(document.head,{childList:!0,subtree:!0})));var e}function Pr(e,t,n){var r;_=e,hr=(k=t)?(w=Array.isArray(k.ignoreImageAnalysis)?k.ignoreImageAnalysis:[],Array.isArray(k.ignoreInlineStyle)?k.ignoreInlineStyle:[]):(w=[],[]),_.immediateModify&&(p=function(){return!0}),fr=n,document.head?Dr()||(document.documentElement.setAttribute("data-darkreader-mode","dynamic"),document.documentElement.setAttribute("data-darkreader-scheme",_.mode?"dark":"dimmed"),Mr()):(O||(e=V("darkreader--fallback"),document.documentElement.appendChild(e),e.textContent=Kt(_,{strict:!0})),(r=new MutationObserver(function(){document.head&&(r.disconnect(),(Dr()?Ir:Mr)())})).observe(document,{childList:!0,subtree:!0}))}function Ir(){var e;document.documentElement.removeAttribute("data-darkreader-mode"),document.documentElement.removeAttribute("data-darkreader-scheme"),R.clear(),ve.clear(),Ar(),Er(),Or(),tn(),Fe.clear(),je.clear(),B(document.querySelector(".darkreader--fallback")),document.head&&(i&&(i.disconnect(),i=null),(e=document.querySelector(On))&&Dn&&(e.content=Dn),B(document.head.querySelector(".darkreader--user-agent")),B(document.head.querySelector(".darkreader--text")),B(document.head.querySelector(".darkreader--invert")),B(document.head.querySelector(".darkreader--inline")),B(document.head.querySelector(".darkreader--override")),B(document.head.querySelector(".darkreader--variables")),B(document.head.querySelector(".darkreader--root-vars")),B(document.head.querySelector('meta[name="darkreader"]')),document.dispatchEvent(new CustomEvent("__darkreader__cleanUp")),B(document.head.querySelector(".darkreader--proxy"))),gr.forEach(function(e){B(e.querySelector(".darkreader--inline")),B(e.querySelector(".darkreader--override"))}),gr.clear(),f(l.keys(),function(e){wr(e)}),M.clear(),zn.clear(),f(document.querySelectorAll(".darkreader"),B),dr.forEach(function(e){e.destroy()}),dr.splice(0),Tr&&Tr.disconnect()}var Nr=/url\(\"(blob\:.*?)\"\)/g;var Fr='/*\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/main/LICENSE */\n';function jr(){return N(this,void 0,void 0,function(){function t(e,t){e=document.querySelector(e);e&&e.textContent&&(n.push("/* ".concat(t," */")),n.push(e.textContent),n.push(""))}var n,r,o,a,i;return F(this,function(e){switch(e.label){case 0:return(n=[Fr],t(".darkreader--fallback","Fallback Style"),t(".darkreader--user-agent","User-Agent Style"),t(".darkreader--text","Text Style"),t(".darkreader--invert","Invert Style"),t(".darkreader--variables","Variables Style"),r=[],document.querySelectorAll(".darkreader--sync").forEach(function(e){f(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 n(e){return 0===e?"":" ".repeat(4*e)}if(e.length<5e4)for(var r=/[^{}]+{\s*}/;r.test(e);)e=e.replace(r,"");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=[],c=0,u=o.length;c<u;c++){var s="".concat(o[c],"\n");s.includes("{")?i.push(n(a++)+t(s)):s.includes("}")?i.push(n(--a)+t(s)):i.push(n(a)+t(s))}return i.join("").trim()}(r.join("\n")),n.push("/* Modified CSS */"),i=(a=n).push,[4,function(r){return N(this,void 0,void 0,function(){var t,n;return F(this,function(e){switch(e.label){case 0:return t=[],Ie(Nr,r,1).forEach(function(e){e=G(e);t.push(e)}),[4,Promise.all(t)];case 1:return n=e.sent(),[2,r.replace(Nr,function(){return'url("'.concat(n.shift(),'")')})]}})})}(o)]):[3,2];case 1:i.apply(a,[e.sent()]),n.push(""),e.label=2;case 2:return t(".darkreader--override","Override Style"),[2,n.join("\n")]}})})}var Br=!1,qr=function(){try{return window.self!==window.top}catch(e){return console.warn(e),!0}}();function Ur(e,t){void 0===e&&(e={}),void 0===t&&(t=null);e=d(d({},te),e);if(e.engine!==Y.dynamicTheme)throw new Error("Theme engine is not supported.");Pr(e,t,qr),Br=!0}function Wr(){Ir(),Br=!1}var Gr=matchMedia("(prefers-color-scheme: dark)"),Hr={themeOptions:null,fixes:null};function $r(){Gr.matches?Ur(Hr.themeOptions,Hr.fixes):Wr()}function zr(e){z=e||$}e.auto=function(e,t){void 0===t&&(t=null),(e=void 0===e?{}:e)?(Hr={themeOptions:e,fixes:t},$r(),P?Gr.addEventListener("change",$r):Gr.addListener($r)):(P?Gr.removeEventListener("change",$r):Gr.removeListener($r),Wr())},e.disable=Wr,e.enable=Ur,e.exportGeneratedCSS=function(){return N(this,void 0,void 0,function(){return F(this,function(e){switch(e.label){case 0:return[4,jr()];case 1:return[2,e.sent()]}})})},e.isEnabled=function(){return Br},e.setFetchMethod=zr,Object.defineProperty(e,"__esModule",{value:!0})}); |