diff --git a/oioioi/base/static/js/darkreader.min.js b/oioioi/base/static/js/darkreader.min.js new file mode 100644 index 000000000..20c6e1b9e --- /dev/null +++ b/oioioi/base/static/js/darkreader.min.js @@ -0,0 +1,8 @@ +/** + * Minified by jsDelivr using Terser v5.37.0. + * Original file: /npm/darkreader@4.9.105/darkreader.js + * + * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files + */ +!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 t,n,r,o,s,a,i,c,l;!function(e){e.GET_DATA="ui-bg-get-data",e.GET_DEVTOOLS_DATA="ui-bg-get-devtools-data",e.SUBSCRIBE_TO_CHANGES="ui-bg-subscribe-to-changes",e.UNSUBSCRIBE_FROM_CHANGES="ui-bg-unsubscribe-from-changes",e.CHANGE_SETTINGS="ui-bg-change-settings",e.SET_THEME="ui-bg-set-theme",e.TOGGLE_ACTIVE_TAB="ui-bg-toggle-active-tab",e.MARK_NEWS_AS_READ="ui-bg-mark-news-as-read",e.MARK_NEWS_AS_DISPLAYED="ui-bg-mark-news-as-displayed",e.LOAD_CONFIG="ui-bg-load-config",e.APPLY_DEV_DYNAMIC_THEME_FIXES="ui-bg-apply-dev-dynamic-theme-fixes",e.RESET_DEV_DYNAMIC_THEME_FIXES="ui-bg-reset-dev-dynamic-theme-fixes",e.APPLY_DEV_INVERSION_FIXES="ui-bg-apply-dev-inversion-fixes",e.RESET_DEV_INVERSION_FIXES="ui-bg-reset-dev-inversion-fixes",e.APPLY_DEV_STATIC_THEMES="ui-bg-apply-dev-static-themes",e.RESET_DEV_STATIC_THEMES="ui-bg-reset-dev-static-themes",e.COLOR_SCHEME_CHANGE="ui-bg-color-scheme-change",e.HIDE_HIGHLIGHTS="ui-bg-hide-highlights"}(t||(t={})),function(e){e.CHANGES="bg-ui-changes"}(n||(n={})),function(e){e.CSS_UPDATE="debug-bg-ui-css-update",e.UPDATE="debug-bg-ui-update"}(r||(r={})),function(e){e.ADD_CSS_FILTER="bg-cs-add-css-filter",e.ADD_DYNAMIC_THEME="bg-cs-add-dynamic-theme",e.ADD_STATIC_THEME="bg-cs-add-static-theme",e.ADD_SVG_FILTER="bg-cs-add-svg-filter",e.CLEAN_UP="bg-cs-clean-up",e.FETCH_RESPONSE="bg-cs-fetch-response",e.UNSUPPORTED_SENDER="bg-cs-unsupported-sender"}(o||(o={})),function(e){e.RELOAD="debug-bg-cs-reload"}(s||(s={})),function(e){e.COLOR_SCHEME_CHANGE="cs-bg-color-scheme-change",e.DARK_THEME_DETECTED="cs-bg-dark-theme-detected",e.DARK_THEME_NOT_DETECTED="cs-bg-dark-theme-not-detected",e.FETCH="cs-bg-fetch",e.DOCUMENT_CONNECT="cs-bg-document-connect",e.DOCUMENT_FORGET="cs-bg-document-forget",e.DOCUMENT_FREEZE="cs-bg-document-freeze",e.DOCUMENT_RESUME="cs-bg-document-resume"}(a||(a={})),function(e){e.LOG="debug-cs-bg-log"}(i||(i={})),function(e){e.EXPORT_CSS_RESPONSE="cs-ui-export-css-response"}(c||(c={})),function(e){e.EXPORT_CSS="ui-cs-export-css"}(l||(l={}));const u="undefined"!=typeof navigator,d=u?navigator.userAgentData&&Array.isArray(navigator.userAgentData.brands)?navigator.userAgentData.brands.map((e=>`${e.brand.toLowerCase()} ${e.version}`)).join(" "):navigator.userAgent.toLowerCase():"some useragent",h=u?navigator.userAgentData&&"string"==typeof navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase():navigator.platform.toLowerCase():"some platform",f=d.includes("chrome")||d.includes("chromium"),m=d.includes("firefox")||d.includes("thunderbird")||d.includes("librewolf"),p=d.includes("safari")&&!f,g=h.startsWith("win"),b=h.startsWith("mac");u&&navigator.userAgentData?navigator.userAgentData.mobile:d.includes("mobile");const y="function"==typeof ShadowRoot,k="function"==typeof MediaQueryList&&"function"==typeof MediaQueryList.prototype.addEventListener,w="function"==typeof CSSLayerBlockRule;(()=>{const e=d.match(/chrom(?:e|ium)(?:\/| )([^ ]+)/);e&&e[1]&&e[1]})(),(()=>{const e=d.match(/(?:firefox|librewolf)(?:\/| )([^ ]+)/);e&&e[1]&&e[1]})();const S=(()=>{try{return document.querySelector(":defined"),!0}catch(e){return!1}})(),_=(()=>{try{if("undefined"==typeof document)return!1;const e=document.createElement("div");return!(!e||"object"!=typeof e.style)&&("string"==typeof e.style.colorScheme||(e.setAttribute("style","color-scheme: dark"),"dark"===e.style.colorScheme))}catch(e){return!1}})();async function E(e,t,n){const r=n&&e.startsWith(`${n}/`)?void 0:"omit",o=await fetch(e,{cache:"force-cache",credentials:r,referrer:n});if(m&&"text/css"===t&&e.startsWith("moz-extension://")&&e.endsWith(".css"))return o;if(t&&!o.headers.get("Content-Type").startsWith(t))throw new Error(`Mime type mismatch when loading ${e}`);if(!o.ok)throw new Error(`Unable to load ${e} ${o.status} ${o.statusText}`);return o}async function v(e,t){const n=await E(e,t);return await C(n)}async function C(e){const t=await e.blob();return await new Promise((e=>{const n=new FileReader;n.onloadend=()=>e(n.result),n.readAsDataURL(t)}))}const x=async e=>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))`.","See if using `DarkReader.setFetchMethod(window.fetch)`","before `DarkReader.enable()` works."].join(" ")));let R=x;window.chrome||(window.chrome={}),chrome.runtime||(chrome.runtime={});const $=new Set;async function A(...e){if(e[0]&&e[0].type===a.FETCH){const{id:t}=e[0];try{const{url:n,responseType:r}=e[0].data,s=await async function(e){return await R(e)}(n);let a;a="data-url"===r?await C(s):await s.text(),$.forEach((e=>e({type:o.FETCH_RESPONSE,data:a,error:null,id:t})))}catch(e){console.error(e),$.forEach((n=>n({type:o.FETCH_RESPONSE,data:null,error:e,id:t})))}}}function T(e){$.add(e)}if("function"==typeof chrome.runtime.sendMessage){const e=chrome.runtime.sendMessage;chrome.runtime.sendMessage=(...t)=>{A(...t),e.apply(chrome.runtime,t)}}else chrome.runtime.sendMessage=A;if(chrome.runtime.onMessage||(chrome.runtime.onMessage={}),"function"==typeof chrome.runtime.onMessage.addListener){const e=chrome.runtime.onMessage.addListener;chrome.runtime.onMessage.addListener=(...t)=>{T(t[0]),e.apply(chrome.runtime.onMessage,t)}}else chrome.runtime.onMessage.addListener=(...e)=>T(e[0]);var M,V;!function(e){e.cssFilter="cssFilter",e.svgFilter="svgFilter",e.staticTheme="staticTheme",e.dynamicTheme="dynamicTheme"}(M||(M={})),function(e){e.NONE="",e.TIME="time",e.SYSTEM="system",e.LOCATION="location"}(V||(V={}));const L={background:"#181a1b",text:"#e8e6e3"},D={background:"#dcdad7",text:"#181a1b"},P={mode:1,brightness:100,contrast:100,grayscale:0,sepia:0,useFont:!1,fontFamily:b?"Helvetica Neue":g?"Segoe UI":"Open Sans",textStroke:0,engine:M.dynamicTheme,stylesheet:"",darkSchemeBackgroundColor:L.background,darkSchemeTextColor:L.text,lightSchemeBackgroundColor:D.background,lightSchemeTextColor:D.text,scrollbarColor:"",selectionColor:"auto",styleSystemControls:!_,lightColorScheme:"Default",darkColorScheme:"Default",immediateModify:!1};function O(e,t,n=0){const r=[];let o;for(;o=e.exec(t);)r.push(o[n]);return r}function N(e){const t=e.length;let n=0;for(let r=0;re.indexOf(t,n):(t,n)=>I(e,t,n,o);const{length:a}=e;let i=0,c=-1;for(let e=t;eo>=e.start&&o=0;)r.push(e.substring(s,o).trim()),s=o+1;return r.push(e.substring(s).trim()),r}let j;["*.officeapps.live.com","*.sharepoint.com","docs.google.com","onedrive.live.com"].map((e=>{const t=f?M.svgFilter:M.cssFilter;return{url:[e],theme:{...P,engine:t},builtIn:!0}})),V.NONE;const q=new Map;function U(e){return j||(j=document.createElement("a")),j.href=e,j.href}function H(e,t=null){const n=`${e}${t?`;${t}`:""}`;if(q.has(n))return q.get(n);if(t){const r=new URL(e,U(t));return q.set(n,r),r}const r=new URL(U(e));return q.set(e,r),r}function G(e,t){if(t.match(/^data\\?\:/))return t;if(/^\/\//.test(t))return`${location.protocol}${t}`;const n=H(e);return H(t,n.href).href}const z=["pre","pre *","code",'[aria-hidden="true"]','[class*="fa-"]',".fa",".fab",".fad",".fal",".far",".fas",".fass",".fasr",".fat",".icofont",'[style*="font-"]','[class*="icon"]','[class*="Icon"]','[class*="symbol"]','[class*="Symbol"]',".glyphicon",'[class*="material-symbol"]','[class*="material-icon"]',"mu",'[class*="mu-"]',".typcn",'[class*="vjs-"]'];function Q(e,t){if(function(e){return null!=e.length}(e))for(let n=0,r=e.length;ne.push(t)))}function Y(e,t,n,r,o){return(e-t)*(o-r)/(n-t)+r}function J(e,t,n){return Math.min(n,Math.max(t,e))}function X(e,t){const n=[];for(let r=0,o=e.length;r[[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:()=>[[.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:e=>[[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(e){const 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:e=>[[.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:e=>[[.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]]};var te;function ne(e){const t=[];return e.mode===te.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 re(e){const t=[],n=[];let r;for(let o=0,s=e.length;oe+t))],["-",new oe(1,((e,t)=>e-t))],["*",new oe(2,((e,t)=>e*t))],["/",new oe(2,((e,t)=>e/t))]]),ae=new Map,ie=new Map;function ce(e){if(e=e.trim(),ie.has(e))return ie.get(e);e.includes("calc(")&&(e=function(e){let t=0;const n=(t,n,r)=>{e=e.substring(0,t)+r+e.substring(n)};for(;-1!==(t=e.indexOf("calc("));){const r=F(e,t);if(!r)break;let o=e.slice(r.start+1,r.end-1);const s=o.includes("%");o=o.split("%").join("");const a=Math.round(re(o));n(r.start-4,r.end,a+(s?"%":""))}return e}(e));const t=ke(e);return t?(ie.set(e,t),t):null}function le(e){if(ae.has(e))return ae.get(e);const t=ce(e);if(!t)return null;const n=de(t);return ae.set(e,n),n}function ue({h:e,s:t,l:n,a:r=1}){if(0===t){const[e,t,o]=[n,n,n].map((e=>Math.round(255*e)));return{r:e,g:o,b:t,a:r}}const o=(1-Math.abs(2*n-1))*t,s=o*(1-Math.abs(e/60%2-1)),a=n-o/2,[i,c,l]=(e<60?[o,s,0]:e<120?[s,o,0]:e<180?[0,o,s]:e<240?[0,s,o]:e<300?[s,0,o]:[o,0,s]).map((e=>Math.round(255*(e+a))));return{r:i,g:c,b:l,a:r}}function de({r:e,g:t,b:n,a:r=1}){const o=e/255,s=t/255,a=n/255,i=Math.max(o,s,a),c=Math.min(o,s,a),l=i-c,u=(i+c)/2;if(0===l)return{h:0,s:0,l:u,a:r};let d=60*(i===o?(s-a)/l%6:i===s?(a-o)/l+2:(o-s)/l+4);d<0&&(d+=360);return{h:d,s:l/(1-Math.abs(2*u-1)),l:u,a:r}}function he(e,t=0){const n=e.toFixed(t);if(0===t)return n;const r=n.indexOf(".");if(r>=0){const e=n.match(/0+$/);if(e)return e.index===r+1?n.substring(0,r):n.substring(0,e.index)}return n}function fe({r:e,g:t,b:n,a:r}){return`#${(null!=r&&r<1?[e,t,n,Math.round(255*r)]:[e,t,n]).map((e=>`${e<16?"0":""}${e.toString(16)}`)).join("")}`}function me(e){const{h:t,s:n,l:r,a:o}=e;return null!=o&&o<1?`hsla(${he(t)}, ${he(100*n)}%, ${he(100*r)}%, ${he(o,2)})`:`hsl(${he(t)}, ${he(100*n)}%, ${he(100*r)}%)`}const pe=/^rgba?\([^\(\)]+\)$/,ge=/^hsla?\([^\(\)]+\)$/,be=/^#[0-9a-f]+$/i,ye=["color","color-mix","hwb","lab","lch","oklab","oklch"];function ke(e){const t=e.trim().toLowerCase();if(t.includes("(from "))return Me(t);if(t.match(pe))return t.startsWith("rgb(#")||t.startsWith("rgba(#")?Me(t):Ee(t);if(t.match(ge))return function(e){const[t,n,r,o=1]=we(e,ve,Ce);if(null==t||null==n||null==r||null==o)return null;return ue({h:t,s:n,l:r,a:o})}(t);if(t.match(be))return function(e){const t=e.substring(1);switch(t.length){case 3:case 4:{const[e,n,r]=[0,1,2].map((e=>parseInt(`${t[e]}${t[e]}`,16)));return{r:e,g:n,b:r,a:3===t.length?1:parseInt(`${t[3]}${t[3]}`,16)/255}}case 6:case 8:{const[e,n,r]=[0,2,4].map((e=>parseInt(t.substring(e,e+2),16)));return{r:e,g:n,b:r,a:6===t.length?1:parseInt(t.substring(6,8),16)/255}}}return null}(t);if(xe.has(t))return function(e){const t=xe.get(e);return{r:t>>16&255,g:t>>8&255,b:255&t,a:1}}(t);if(Re.has(t))return function(e){const t=Re.get(e);return{r:t>>16&255,g:t>>8&255,b:255&t,a:1}}(t);if("transparent"===t)return{r:0,g:0,b:0,a:0};if(t.endsWith(")")&&ye.some((e=>t.startsWith(e)&&"("===t[e.length])))return Me(t);if(t.startsWith("light-dark(")&&t.endsWith(")")){const e=t.match(/^light-dark\(\s*([a-z]+(\(.*\))?),\s*([a-z]+(\(.*\))?)\s*\)$/);if(e){return ke(matchMedia("(prefers-color-scheme: dark)").matches?e[3]:e[1])}}return null}function we(e,t,n){const r=function(e){const t=[];let n=0,r=!1;const o=e.indexOf("(");e=e.substring(o+1,e.length-1);for(let o=0;o="0"&&s<="9"||"."===s||"+"===s||"-"===s?r=!0:!r||" "!==s&&","!==s&&"/"!==s?r||(n=o+1):(t.push(e.substring(n,o)),r=!1,n=o+1)}return r&&t.push(e.substring(n,e.length)),t}(e),o=Object.entries(n);return r.map((e=>e.trim())).map(((e,n)=>{let r;const s=o.find((([t])=>e.endsWith(t)));return r=s?parseFloat(e.substring(0,e.length-s[0].length))/s[1]*t[n]:parseFloat(e),t[n]>1?Math.round(r):r}))}const Se=[255,255,255,1],_e={"%":100};function Ee(e){const[t,n,r,o=1]=we(e,Se,_e);return null==t||null==n||null==r||null==o?null:{r:t,g:n,b:r,a:o}}const ve=[360,1,1,1],Ce={"%":100,deg:360,rad:2*Math.PI,turn:1};const xe=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})),Re=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((([e,t])=>[e.toLowerCase(),t])));function $e(e,t,n){return(.2126*e+.7152*t+.0722*n)/255}let Ae,Te;function Me(e){Te||(Ae=document.createElement("canvas"),Ae.width=1,Ae.height=1,Te=Ae.getContext("2d",{willReadFrequently:!0})),Te.fillStyle=e,Te.fillRect(0,0,1,1);const t=Te.getImageData(0,0,1,1).data;return Ee(`rgba(${t[0]}, ${t[1]}, ${t[2]}, ${(t[3]/255).toFixed(2)})`)}function Ve(e){let t,n=!1,r=null;return Object.assign(((...o)=>{t=o,r?n=!0:(e(...t),r=requestAnimationFrame((()=>{r=null,n&&(e(...t),n=!1)})))}),{cancel:()=>{cancelAnimationFrame(r),n=!1,r=null}})}const Le=new Set;function De(){if("randomUUID"in crypto){const e=crypto.randomUUID();return e.substring(0,8)+e.substring(9,13)+e.substring(14,18)+e.substring(19,23)+e.substring(24)}return"getRandomValues"in crypto?Array.from(crypto.getRandomValues(new Uint8Array(16))).map((e=>{return((t=e)<16?"0":"")+t.toString(16);var t})).join(""):Math.floor(Math.random()*2**55).toString(36)}let Pe=null,Oe=!document.hidden;const Ne={capture:!0,passive:!0};function Fe(e){const t=Boolean(Pe);Pe=()=>{document.hidden||(We(),e(),Oe=!0)},t||(document.addEventListener("visibilitychange",Pe,Ne),window.addEventListener("pageshow",Pe,Ne),window.addEventListener("focus",Pe,Ne))}function We(){document.removeEventListener("visibilitychange",Pe,Ne),window.removeEventListener("pageshow",Pe,Ne),window.removeEventListener("focus",Pe,Ne),Pe=null}function Ie(){return Oe}function Be(e){let 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 je(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function qe(e,t,n=Function.prototype){const r=Be({seconds:2}),o=Be({seconds:10});let s=e.previousSibling,a=e.parentNode;if(!a)throw new Error("Unable to watch for node position: parent element not found");if("prev-sibling"===t&&!s)throw new Error("Unable to watch for node position: there is no previous sibling");let i=0,c=null,l=null;const u=Ve((()=>{if(l)return;i++;const h=Date.now();if(null==c)c=h;else if(i>=10){if(h-c{c=null,i=0,l=null,u()}),r));c=h,i=1}if("head"===t&&s&&s.parentNode!==a&&(s=document.head.lastChild),"prev-sibling"===t){if(null==s.parentNode)return void f();s.parentNode!==a&&m(s.parentNode)}"head"!==t||a.isConnected||(a=document.head),a.insertBefore(e,s&&s.isConnected?s.nextSibling:a.firstChild),d.takeRecords(),n&&n()})),d=new MutationObserver((()=>{("head"===t&&(e.parentNode!==a||!e.parentNode.isConnected)||"prev-sibling"===t&&e.previousSibling!==s)&&u()})),h=()=>{d.observe(a,{childList:!0})},f=()=>{clearTimeout(l),d.disconnect(),u.cancel()},m=e=>{a=e,f(),h()};return h(),{run:h,stop:f,skip:()=>{d.takeRecords()}}}function Ue(e,t){if(null==e)return;const n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>null==e.shadowRoot?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT});for(let r=e.shadowRoot?n.currentNode:n.nextNode();null!=r;r=n.nextNode())r.classList.contains("surfingkeys_hints_host")||(t(r),Ue(r.shadowRoot,t))}let He=()=>"complete"===document.readyState||"interactive"===document.readyState;const Ge=new Set;function ze(e){He()?e():Ge.add(e)}function Qe(e){Ge.delete(e)}function Ke(){return"complete"===document.readyState}const Ye=new Set;function Je(e){Ke()?e():Ye.add(e)}if(!He()){const e=()=>{He()&&(Ge.forEach((e=>e())),Ge.clear(),Ke()&&(document.removeEventListener("readystatechange",e),Ye.forEach((e=>e())),Ye.clear()))};document.addEventListener("readystatechange",e)}const Xe=new Map,Ze=new WeakMap;function et(e,t){let n,r,o;if(Xe.has(e))n=Xe.get(e),r=Ze.get(n);else{let t=!1,s=!1;n=new MutationObserver((n=>{if(function(e){if(e.length>1e3)return!0;let t=0;for(let n=0;n1e3)return!0;return!1}(n))!t||He()?r.forEach((({onHugeMutations:t})=>t(e))):s||(o=()=>r.forEach((({onHugeMutations:t})=>t(e))),ze(o),s=!0),t=!0;else{const t=function(e){const t=new Set,n=new Set,r=new Set;e.forEach((e=>{Q(e.addedNodes,(e=>{e instanceof Element&&e.isConnected&&t.add(e)})),Q(e.removedNodes,(e=>{e instanceof Element&&(e.isConnected?(r.add(e),t.delete(e)):n.add(e))}))}));const o=[],s=[];return t.forEach((e=>{t.has(e.parentElement)&&o.push(e)})),n.forEach((e=>{n.has(e.parentElement)&&s.push(e)})),o.forEach((e=>t.delete(e))),s.forEach((e=>n.delete(e))),{additions:t,moves:r,deletions:n}}(n);r.forEach((({onMinorMutations:n})=>n(e,t)))}})),n.observe(e,{childList:!0,subtree:!0}),Xe.set(e,n),r=new Set,Ze.set(n,r)}return r.add(t),{disconnect(){r.delete(t),o&&Qe(o),0===r.size&&(n.disconnect(),Ze.delete(n),Xe.delete(e))}}}function tt(e,t,n){Q(e,(e=>{if(gt(e))t(e);else if(function(e){if(!e)return!1;if(dt.has(e))return!1;if(ht.has(e))return!0;if(e.href)return ht.add(e),!0;return!1}(e))try{tt(e.styleSheet.cssRules,t,n)}catch(e){n?.()}else if(bt(e)){const r=Array.from(e.media),o=r.some((e=>e.startsWith("screen")||e.startsWith("all")||e.startsWith("("))),s=r.some((e=>e.startsWith("print")||e.startsWith("speech")));!o&&s||tt(e.cssRules,t,n)}else!function(e){if(!e)return!1;if(dt.has(e))return!1;if(mt.has(e))return!0;if(e instanceof CSSSupportsRule)return mt.add(e),!0;return!1}(e)?yt(e)&&tt(e.cssRules,t,n):CSS.supports(e.conditionText)&&tt(e.cssRules,t,n)}))}const nt=["background","border","border-color","border-bottom","border-left","border-right","border-top","outline","outline-color"],rt=p?nt.map((e=>[e,new RegExp(`${e}:\\s*(.*?)\\s*;`)])):null;function ot(e,t){Q(e,(n=>{const r=e.getPropertyValue(n).trim();r&&t(n,r)}));const n=e.cssText;n.includes("var(")&&(p?rt.forEach((([e,r])=>{const o=n.match(r);if(o&&o[1]){const n=o[1].trim();t(e,n)}})):nt.forEach((n=>{const r=e.getPropertyValue(n);r&&r.includes("var(")&&t(n,r)}))),n.includes("background-color: ;")&&!e.getPropertyValue("background")&&st("background",e,t),n.includes("border-")&&n.includes("-color: ;")&&!e.getPropertyValue("border")&&st("border",e,t)}function st(e,t,n){const r=t.parentRule;if(gt(r)){const t=r.parentStyleSheet?.ownerNode?.textContent;if(t){let o=r.selectorText.replaceAll(/[\^$.*+?\(\)\[\]{}|\-\\]/g,"\\$&");o=o.replaceAll(/\s+/g,"\\s*"),o=o.replaceAll(/::/g,"::?");const s=new RegExp(`${o}\\s*{[^}]*${e}:\\s*([^;}]+)`),a=t.match(s);a&&n(e,a[1])}else"background"===e&&n("background-color","#ffffff")}}const at=/url\((('.*?')|(".*?")|([^\)]*?))\)/g,it=/@import\s*(url\()?(('.+?')|(".+?")|([^\)]*?))\)? ?(screen)?;?/gi;function ct(e){return e.trim().replace(/[\n\r\\]+/g,"").replace(/^url\((.*)\)$/,"$1").trim().replace(/^"(.*)"$/,"$1").replace(/^'(.*)'$/,"$1").replace(/(?:\\(.))/g,"$1")}function lt(e){const t=H(e);return`${t.origin}${t.pathname.replace(/\?.*$/,"").replace(/(\/)([^\/]+)$/i,"$1")}`}const ut=/@font-face\s*{[^}]*}/g;const dt=new WeakSet,ht=new WeakSet,ft=new WeakSet,mt=new WeakSet,pt=new WeakSet;function gt(e){return!!e&&(!!dt.has(e)||!!e.selectorText&&(dt.add(e),!0))}function bt(e){return!!e&&(!dt.has(e)&&(!!ft.has(e)||!!e.media&&(ft.add(e),!0)))}function yt(e){return!!e&&(!dt.has(e)&&(!!pt.has(e)||!!(w&&e instanceof CSSLayerBlockRule)&&(pt.add(e),!0)))}const kt=new WeakMap;function wt(e,t){kt.set(e,t)}const St="conic-",_t=St.length,Et="radial-",vt="linear-";const Ct="__darkreader__imageDetails_v2_list",xt="__darkreader__imageDetails_v2_",Rt="__darkreader__cssFetch_";let $t=0;const At=new Map,Tt=[];function Mt(){At.forEach(((e,t)=>{if(t&&t.startsWith("https://"))try{const n=JSON.stringify(e);sessionStorage.setItem(`${xt}${t}`,n),Tt.push(t)}catch(e){}})),At.clear(),sessionStorage.setItem(Ct,JSON.stringify(Tt))}const Vt=1e3/60;const Lt=new Map,Dt=new Map;async function Pt(e){return window.DarkReader?.Plugins?.fetch?window.DarkReader.Plugins.fetch(e):new Promise(((t,n)=>{const r=De();Lt.set(r,t),Dt.set(r,n),chrome.runtime.sendMessage({type:a.FETCH,data:e,id:r})}))}chrome.runtime.onMessage.addListener((({type:e,data:t,error:n,id:r})=>{if(e===o.FETCH_RESPONSE){const e=Lt.get(r),o=Dt.get(r);Lt.delete(r),Dt.delete(r),n?o&&o(n):e&&e(t)}}));const Ot=new class{constructor(){this.queue=[],this.timerId=null}addTask(e){this.queue.push(e),this.scheduleFrame()}stop(){null!==this.timerId&&(cancelAnimationFrame(this.timerId),this.timerId=null),this.queue=[]}scheduleFrame(){this.timerId||(this.timerId=requestAnimationFrame((()=>{this.timerId=null;const e=Date.now();let t;for(;t=this.queue.shift();)if(t(),Date.now()-e>=Vt){this.scheduleFrame();break}})))}};async function Nt(e){return new Promise((async(t,n)=>{try{const n=e.startsWith("data:")?e:await async function(e){const t=new URL(e);if(t.origin===location.origin)return await v(e);return await Pt({url:e,responseType:"data-url"})}(e),r=Zt(n)??await async function(e,t){const n=await E(e,t);return await n.blob()}(e);let o;o=n.startsWith("data:image/svg+xml")?await It(n):await async function(e){try{return await createImageBitmap(e)}catch(t){return e.type,String(t),null}}(r)??await It(n),Ot.addTask((()=>{const r=function(e){jt||function(){const e=Bt,t=Bt;jt=document.createElement("canvas"),jt.width=e,jt.height=t,qt=jt.getContext("2d",{willReadFrequently:!0}),qt.imageSmoothingEnabled=!1}();let t,n;e instanceof HTMLImageElement?(t=e.naturalWidth,n=e.naturalHeight):(t=e.width,n=e.height);if(0===t||0===n)return{isDark:!1,isLight:!1,isTransparent:!1,isLarge:!1};const r=t*n>Ut,o=t*n,s=Math.min(1,Math.sqrt(Bt/o)),a=Math.ceil(t*s),i=Math.ceil(n*s);qt.clearRect(0,0,a,i),qt.drawImage(e,0,0,t,n,0,0,a,i);const c=qt.getImageData(0,0,a,i).data,l=.05,u=.4,d=.7;let h,f,m,p,g,b,y,k,w=0,S=0,_=0;for(m=0;md&&_++);const E=a*i,v=E-w;return{isDark:S/v>=.7,isLight:_/v>=.7,isTransparent:w/E>=.1,isLarge:r}}(o);t({src:e,dataURL:r.isLarge?"":n,width:o.width,height:o.height,...r})}))}catch(e){n(e)}}))}const Ft=256;let Wt=0;async function It(e){return new Promise(((t,n)=>{const r=new Image;r.onload=()=>t(r),r.onerror=()=>n(`Unable to load image ${e}`),++Wt<=Ft||Ke()?r.src=e:Je((()=>r.src=e))}))}const Bt=1024;let jt,qt;const Ut=262144;let Ht=null,Gt=!1,zt=!1;const Qt=[];document.addEventListener("__darkreader__inlineScriptsAllowed",(()=>Gt=!0),{once:!0}),document.addEventListener("securitypolicyviolation",(function e(t){"blob"===t.blockedURI&&(Ht=!1,document.removeEventListener("securitypolicyviolation",e))}));const Kt=new Set;function Yt({dataURL:e,width:t,height:n},r){e.startsWith("data:image/svg+xml")&&(e=e.replace(/[<>&'"]/g,(e=>Jt[e]??e)));const o=[``,"",'',``,"","",``,""].join("");if(!Ht)return`data:image/svg+xml;base64,${btoa(o)}`;const s=new Uint8Array(o.length);for(let e=0;e":">","&":"&","'":"'",'"':"""};const Xt=new Map;function Zt(e){const t=e.indexOf(":"),n=e.indexOf(";",t+1),r=e.indexOf(",",n+1),o=e.substring(n+1,r).toLocaleLowerCase(),s=e.substring(t+1,n);if("base64"!==o||!s)return null;const a=atob(e.substring(r+1)),i=new Uint8Array(a.length);for(let e=0;eURL.revokeObjectURL(e))),Kt.clear(),Xt.forEach((e=>URL.revokeObjectURL(e))),Xt.clear()}let tn;const nn=new Map;function rn(e){tn=e;const t=["background","text","border"];nn.forEach((e=>{t.forEach((t=>{if(e[t]){const{variable:n,value:r}=e[t];tn?.cssRules[0].style.setProperty(n,r)}}))}))}function on(e,t){return`var(${t[e].variable}, ${t[e].value})`}function sn(){nn.clear()}function an(e){return e[1===e.mode?"darkSchemeBackgroundColor":"lightSchemeBackgroundColor"]}function cn(e){return e[1===e.mode?"darkSchemeTextColor":"lightSchemeTextColor"]}const ln=new Map;const un=["r","g","b","a"],dn=["mode","brightness","contrast","grayscale","sepia","darkSchemeBackgroundColor","darkSchemeTextColor","lightSchemeBackgroundColor","lightSchemeTextColor"];function hn(e,t,n,r,o){let s;ln.has(n)?s=ln.get(n):(s=new Map,ln.set(n,s));const a=function(e,t){let n="";return un.forEach((t=>{n+=`${e[t]};`})),dn.forEach((e=>{n+=`${t[e]};`})),n}(e,t);if(s.has(a))return s.get(a);const i=n(de(e),null==r?null:le(r),null==o?null:le(o)),{r:c,g:l,b:u,a:d}=ue(i),h=Z(t),[f,m,p]=function([e,t,n],r){const o=X(r,[[e/255],[t/255],[n/255],[1],[1]]);return[0,1,2].map((e=>J(Math.round(255*o[e][0]),0,255)))}([c,l,u],h),g=1===d?fe({r:f,g:m,b:p}):function(e){const{r:t,g:n,b:r,a:o}=e;return null!=o&&o<1?`rgba(${he(t)}, ${he(n)}, ${he(r)}, ${he(o,2)})`:`rgb(${he(t)}, ${he(n)}, ${he(r)})`}({r:f,g:m,b:p,a:d});return s.set(a,g),g}function fn(e,t,n,r){const o=function(e,t){const n=fe(t),r=nn.get(n);return r?.[e]?on(e,r):null}(e,t);if(o)return o;return function(e,t,n){const r=fe(t);let o;nn.has(r)?o=nn.get(r):(o={parsed:ce(r)},nn.set(r,o));const s=`--darkreader-${e}-${r.replace("#","")}`;return o[e]={variable:s,value:n},tn?.cssRules[0]?.style&&tn?.cssRules[0].style.setProperty(s,n),on(e,o)}(e,t,r(t,n))}function mn(e,t){const n=an(t);return hn(e,t,pn,cn(t),n)}function pn({h:e,s:t,l:n,a:r},o,s){const a=n<.5;let i;if(a)i=n<.2||t<.12;else{i=t<.24||n>.8&&(e>200&&e<280)}let c=e,l=n;i&&(a?(c=o.h,l=o.s):(c=s.h,l=s.s));return{h:c,s:l,l:Y(n,0,1,o.l,s.l),a:r}}function gn({h:e,s:t,l:n,a:r},o){const s=t<.12||n>.8&&(e>200&&e<280);if(n<.5){const a=Y(n,0,.5,0,.4);if(s){return{h:o.h,s:o.s,l:a,a:r}}return{h:e,s:t,l:a,a:r}}let a=Y(n,.5,1,.4,o.l);if(s){return{h:o.h,s:o.s,l:a,a:r}}let i=e;if(e>60&&e<180){i=e>120?Y(e,120,180,135,180):Y(e,60,120,60,105)}return i>40&&i<80&&(a*=.75),{h:i,s:t,l:a,a:r}}function bn(e,t){if(0===t.mode)return mn(e,t);const n=an(t);return hn(e,{...t,mode:0},gn,n)}function yn(e,t,n=!0){return n?fn("background",e,t,bn):bn(e,t)}const kn=.55;function wn(e){return Y(e,205,245,205,220)}function Sn({h:e,s:t,l:n,a:r},o){const s=n<.2||t<.24,a=!s&&e>205&&e<245;if(n>.5){const i=Y(n,.5,1,kn,o.l);if(s){return{h:o.h,s:o.s,l:i,a:r}}let c=e;return a&&(c=wn(e)),{h:c,s:t,l:i,a:r}}if(s){return{h:o.h,s:o.s,l:Y(n,0,.5,o.l,kn),a:r}}let i,c=e;return a?(c=wn(e),i=Y(n,0,.5,o.l,Math.min(1,.6000000000000001))):i=Y(n,0,.5,o.l,kn),{h:c,s:t,l:i,a:r}}function _n(e,t){if(0===t.mode)return mn(e,t);const n=cn(t);return hn(e,{...t,mode:0},Sn,n)}function En(e,t,n=!0){return n?fn("text",e,t,_n):_n(e,t)}function vn({h:e,s:t,l:n,a:r},o,s){let a=e,i=t;(n<.2||t<.24)&&(n<.5?(a=o.h,i=o.s):(a=s.h,i=s.s));return{h:a,s:i,l:Y(n,0,1,.5,.2),a:r}}function Cn(e,t){if(0===t.mode)return mn(e,t);const n=cn(t),r=an(t);return hn(e,{...t,mode:0},vn,n,r)}function xn(e,t,n=!0){return n?fn("border",e,t,Cn):Cn(e,t)}function Rn(e,t){return yn(e,t)}function $n(e,t){return Boolean(e&&e.getPropertyPriority(t))}function An(e,t,n,r,o,s){let a=null;if(e.startsWith("--"))a=function(e,t,n,r,o,s){return e.getModifierForVariable({varName:t,sourceValue:n,rule:r,ignoredImgSelectors:o,isCancelled:s})}(r,e,t,n,o,s);else if(t.includes("var("))a=function(e,t,n){return e.getModifierForVarDependant(t,n)}(r,e,t);else if("color-scheme"===e)a=e=>0===e.mode?"dark light":"dark";else if("scrollbar-color"===e)a=function(e){const t=e.match(/^\s*([a-z]+(\(.*\))?)\s+([a-z]+(\(.*\))?)\s*$/);if(!t)return e;const n=ce(t[1]),r=ce(t[3]);if(!n||!r)return[n,r].filter((e=>!e)),null;return e=>`${En(n,e)} ${yn(n,e)}`}(t);else if(e.includes("color")&&"-webkit-print-color-adjust"!==e||"fill"===e||"stroke"===e||"stop-color"===e)if(e.startsWith("border")&&"border-color"!==e&&"initial"===t){const r=e.substring(0,e.length-6),o=n.style.getPropertyValue(r);o.startsWith("0px")||"none"===o?(e=r,a=o):a=t}else a=function(e,t,n){if(On.has(t.toLowerCase()))return t;const r=ce(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")?e=>En(r,e):e=>yn(r,e);if(e.includes("border")||e.includes("outline"))return e=>xn(r,e);return e=>En(r,e)}(e,t,n);else"background-image"===e||"list-style-image"===e?a=Gn(t,n,o,s):e.includes("shadow")&&(a=function(e){const t=zn(e);if(!t)return null;return e=>t(e).result}(t));return a?{property:e,value:a,important:$n(n.style,e),sourceValue:t}:null}function Tn(...e){return e.filter(Boolean).join(", ")}const Mn=["calendar.google.com"];function Vn(e,t,n){const r=[];t||(r.push("html {"),r.push(` background-color: ${yn({r:255,g:255,b:255},e)} !important;`),r.push("}")),_&&1===e.mode&&(r.push("html {"),r.push(" color-scheme: dark !important;"),r.push("}"),r.push("iframe {"),r.push(" color-scheme: dark !important;"),r.push("}"));const o=Tn(t?"":"html, body",n?"input, textarea, select, button, dialog":"");return o&&(r.push(`${o} {`),r.push(` background-color: ${yn({r:255,g:255,b:255},e)};`),r.push("}")),r.push(`${Tn("html, body",n?"input, textarea, select, button":"")} {`),r.push(` border-color: ${xn({r:76,g:76,b:76},e)};`),r.push(` color: ${En({r:0,g:0,b:0},e)};`),r.push("}"),r.push("a {"),r.push(` color: ${En({r:0,g:64,b:255},e)};`),r.push("}"),r.push("table {"),r.push(` border-color: ${xn({r:128,g:128,b:128},e)};`),r.push("}"),r.push("mark {"),r.push(` color: ${En({r:0,g:0,b:0},e)};`),r.push("}"),r.push("::placeholder {"),r.push(` color: ${En({r:169,g:169,b:169},e)};`),r.push("}"),r.push("input:-webkit-autofill,"),r.push("textarea:-webkit-autofill,"),r.push("select:-webkit-autofill {"),r.push(` background-color: ${yn({r:250,g:255,b:189},e)} !important;`),r.push(` color: ${En({r:0,g:0,b:0},e)} !important;`),r.push("}"),e.scrollbarColor&&!Mn.includes(location.hostname)&&r.push(function(e){let t,n;if("auto"===e.scrollbarColor)t=yn({r:241,g:241,b:241},e),n=yn({r:176,g:176,b:176},e);else{const r=de(ce(e.scrollbarColor));t=me((e=>({...r,l:J(r.l-e,0,1)}))(.4)),n=me(r)}return["* {",` scrollbar-color: ${n} ${t};`,"}"].join("\n")}(e)),e.selectionColor&&r.push(function(e){const t=[],n=Ln(e),r=n.backgroundColorSelection,o=n.foregroundColorSelection;return["::selection","::-moz-selection"].forEach((e=>{t.push(`${e} {`),t.push(` background-color: ${r} !important;`),t.push(` color: ${o} !important;`),t.push("}")})),t.join("\n")}(e)),w&&(r.unshift("@layer {"),r.push("}")),r.join("\n")}function Ln(e){let t,n;if("auto"===e.selectionColor)t=yn({r:0,g:96,b:212},{...e,grayscale:0}),n=En({r:255,g:255,b:255},{...e,grayscale:0});else{const r=de(ce(e.selectionColor));t=e.selectionColor,n=r.l<.5?"#FFF":"#000"}return{backgroundColorSelection:t,foregroundColorSelection:n}}function Dn(e,{strict:t}){return Pn(e,{strict:t})}function Pn(e,{strict:t}){const n=[];return n.push(`html, body, ${t?"body :not(iframe)":"body > :not(iframe)"} {`),n.push(` background-color: ${yn({r:255,g:255,b:255},e)} !important;`),n.push(` border-color: ${xn({r:64,g:64,b:64},e)} !important;`),n.push(` color: ${En({r:0,g:0,b:0},e)} !important;`),n.push("}"),n.push('div[style*="background-color: rgb(135, 135, 135)"] {'),n.push(" background-color: #878787 !important;"),n.push("}"),n.join("\n")}const On=new Set(["inherit","transparent","initial","currentcolor","none","unset","auto"]);const Nn=new Map,Fn=new Map;let Wn=!1;const In=new Map,Bn=new Map,jn=new Set;let qn=null,Un=null;function Hn(e){for(const[t,n]of In)(e.querySelector(t)||e instanceof Element&&e.matches(t))&&(In.delete(t),n.forEach((e=>e())));Un||(Un=new MutationObserver((e=>{e.forEach((e=>{jn.add(e.target),qn||(qn=requestAnimationFrame((()=>{jn.forEach((e=>{Hn(e)})),jn.clear(),qn=null})))}))})),Un.observe(document.documentElement,{attributes:!0,attributeFilter:["class"],subtree:!0}))}function Gn(e,t,n,r){try{if(function(e,t){if(!e||0===t.length)return!1;if(t.some((e=>"*"===e)))return!0;const n=e.split(/,\s*/g);for(let e=0;et.startsWith(e))))return!0}else if(r.endsWith("$")){const e=r.slice(0,r.length-1);if(n.some((t=>t.endsWith(e))))return!0}else if(n.some((e=>e===r)))return!0}return!1}(t.selectorText,n))return e;const o=function(e){const t=[];let n=0,r=St.length;for(;-1!==(n=e.indexOf("gradient",r));){let o;if([vt,Et,St].find((t=>{if(n-t.length>=0&&e.substring(n-t.length,n)===t)return"repeating"===e.slice(n-t.length-10,n-t.length-1)?(o=`repeating-${t}gradient`,!0):"-webkit"===e.slice(n-t.length-8,n-t.length-1)?(o=`-webkit-${t}gradient`,!0):(o=`${t}gradient`,!0)})),!o)break;const{start:s,end:a}=F(e,n+8),i=e.substring(s+1,a-1);r=a+1+_t,t.push({typeGradient:o,match:i,offset:o.length+2,index:n-o.length+8,hasComma:!0})}return t.length&&(t[t.length-1].hasComma=!1),t}(e),s=O(at,e);if(0===s.length&&0===o.length)return e;const a=t=>{let n=0;return t.map((t=>{const r=e.indexOf(t,n);return n=r+t.length,{match:t,index:r}}))},i=o.map((e=>({type:"gradient",...e}))).concat(a(s).map((e=>({type:"url",offset:0,...e})))).sort(((e,t)=>e.index>t.index?1:-1)),c=e=>{const{typeGradient:t,match:n,hasComma:r}=e,o=/^(from|color-stop|to)\(([^\(\)]*?,\s*)?(.*?)\)$/,s=O(/([^\(\),]+(\([^\(\)]*(\([^\(\)]*\)*[^\(\)]*)?\))?([^\(\), ]|( (?!calc)))*),?/g,n,1).map((e=>{let t=ce(e=e.trim());if(t)return e=>Rn(t,e);const n=e.lastIndexOf(" ");if(t=ce(e.substring(0,n)),t)return r=>`${Rn(t,r)} ${e.substring(n+1)}`;const r=e.match(o);return r&&(t=ce(r[3]),t)?e=>`${r[1]}(${r[2]?`${r[2]}, `:""}${Rn(t,e)})`:()=>e}));return e=>`${t}(${s.map((t=>t(e))).join(", ")})${r?", ":""}`},l=e=>{Wn||(Wn=!0,function(e){try{const t=sessionStorage.getItem(Ct);if(!t)return;JSON.parse(t).forEach((t=>{const n=sessionStorage.getItem(`${xt}${t}`);if(n){const r=JSON.parse(n);e.set(t,r)}}))}catch(e){}}(Nn));let n=ct(e);const o=0===n.length,{parentStyleSheet:s}=t,a=s?.ownerNode,i=(s&&function(e){if(!e.ownerNode)return null;if(kt.has(e))return kt.get(e);let t=e.ownerNode;for(;t;){if(t instanceof ShadowRoot||t instanceof Document)return wt(e,t),t;t=t.parentNode}return null}(s))??document,c=s&&s.href?lt(s.href):a?.baseURI||location.origin;return n=G(c,n),async s=>{if(o)return"url('')";let a=t.selectorText;a&&(a.includes("::before")&&(a=a.replaceAll("::before","")),a.includes("::after")&&(a=a.replaceAll("::after","")),i.querySelector(a)||await new Promise((t=>{In.has(a)?In.get(a).push(t):(In.set(a,[t]),Bn.set(a,e))})));let c=null;if(Nn.has(n))c=Nn.get(n);else try{if(null==Ht&&Gt&&await async function(){if(Gt){if(zt)return await new Promise((e=>Qt.push(e)));zt=!0,await new Promise((e=>{document.addEventListener("__darkreader__blobURLCheckResponse",(t=>{Ht=t.detail.blobURLAllowed,e(),Qt.forEach((e=>e())),Qt.splice(0)}),{once:!0}),document.dispatchEvent(new CustomEvent("__darkreader__blobURLCheckRequest"))}))}}(),Fn.has(n)){const e=Fn.get(n);if(c=await new Promise((t=>e.push(t))),!c)return null}else Fn.set(n,[]),c=await Nt(n),Nn.set(n,c),function(e,t){e&&e.startsWith("https://")&&(At.set(e,t),clearTimeout($t),$t=setTimeout(Mt,1e3))}(n,c),Fn.get(n).forEach((e=>e(c))),Fn.delete(n);if(r())return null}catch(e){Fn.has(n)&&(Fn.get(n).forEach((e=>e(null))),Fn.delete(n))}if(c){const e=u(c,s);if(e)return e}if(n.startsWith("data:")){const e=await async function(e){if(!Ht)return null;const t=N(e);let n=Xt.get(t);if(n)return n;let r=Zt(e);if(!r){const t=await fetch(e);r=await t.blob()}return n=URL.createObjectURL(r),Xt.set(t,n),n}(n);if(e)return`url("${e}")`}return`url("${n}")`}},u=(e,t)=>{const{isDark:n,isLight:r,isTransparent:o,isLarge:s,width:a}=e;let i;e.src.startsWith("data:")||e.src;if(s&&r&&!o&&1===t.mode)i="none";else if(n&&o&&1===t.mode&&a>2){i=`url("${Yt(e,{...t,sepia:J(t.sepia+10,0,100)})}")`}else if(r&&!o&&1===t.mode){i=`url("${Yt(e,t)}")`}else if(0===t.mode&&r){i=`url("${Yt(e,{...t,brightness:J(t.brightness-10,5,200),sepia:J(t.sepia+10,0,100)})}")`}else i=null;return i},d=[];let h=0,f=!1;return i.forEach((({type:t,match:n,index:r,typeGradient:o,hasComma:s,offset:a},u)=>{const m=r,p=h,g=m+n.length+a;h=g,p!==m&&(f?d.push((()=>{let t=e.substring(p,m);return","===t[0]&&(t=t.substring(1)),t})):d.push((()=>e.substring(p,m)))),f=s||!1,"url"===t?d.push(l(n)):"gradient"===t&&d.push(c({match:n,index:r,typeGradient:o,hasComma:s||!1,offset:a})),u===i.length-1&&d.push((()=>e.substring(g)))})),e=>{const t=d.filter(Boolean).map((t=>t(e)));if(t.some((e=>e instanceof Promise)))return Promise.all(t).then((e=>e.filter(Boolean).join("")));const n=t.join("");return n.endsWith(", initial")?n.slice(0,-9):n}}catch(e){return null}}function zn(e){try{let t=0;const n=O(/(^|\s)(?!calc)([a-z]+\(.+?\)|#[0-9a-f]+|[a-z]+)(.*?(inset|outset)?($|,))/gi,e,2);let r=0;const o=n.map(((o,s)=>{const a=t,i=e.indexOf(o,t),c=i+o.length;t=c;const l=ce(o);return l?t=>`${e.substring(a,i)}${function(e,t){return yn(e,t)}(l,t)}${s===n.length-1?e.substring(c):""}`:(r++,()=>e.substring(a,c))}));return e=>{const t=o.map((t=>t(e))).join("");return{matchesLength:n.length,unparsableMatchesLength:r,result:t}}}catch(e){return null}}function Qn(){ln.clear(),Nn.clear(),en(),Fn.clear(),In.clear(),Un?.disconnect(),Un=null}const Kn=new class{constructor(){this.varTypes=new Map,this.rulesQueue=new Set,this.inlineStyleQueue=[],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}clear(){this.varTypes.clear(),this.rulesQueue.clear(),this.inlineStyleQueue.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()}isVarType(e,t){return this.varTypes.has(e)&&(this.varTypes.get(e)&t)>0}addRulesForMatching(e){this.rulesQueue.add(e)}addInlineStyleForMatching(e){this.inlineStyleQueue.push(e)}matchVariablesAndDependents(){0===this.rulesQueue.size&&0===this.inlineStyleQueue.length||(this.changedTypeVars.clear(),this.initialVarTypes=new Map(this.varTypes),this.collectRootVariables(),this.collectVariablesAndVarDep(),this.collectRootVarDependents(),this.varRefs.forEach(((e,t)=>{e.forEach((e=>{this.varTypes.has(t)&&this.resolveVariableType(e,this.varTypes.get(t))}))})),this.unknownColorVars.forEach((e=>{this.unknownBgVars.has(e)?(this.unknownColorVars.delete(e),this.unknownBgVars.delete(e),this.resolveVariableType(e,1)):this.isVarType(e,7)?this.unknownColorVars.delete(e):this.undefinedVars.add(e)})),this.unknownBgVars.forEach((e=>{null!=this.findVarRef(e,(e=>this.unknownColorVars.has(e)||this.isVarType(e,7)))?this.iterateVarRefs(e,(e=>{this.resolveVariableType(e,1)})):this.isVarType(e,9)?this.unknownBgVars.delete(e):this.undefinedVars.add(e)})),this.changedTypeVars.forEach((e=>{this.typeChangeSubscriptions.has(e)&&this.typeChangeSubscriptions.get(e).forEach((e=>{e()}))})),this.changedTypeVars.clear())}getModifierForVariable(e){return t=>{const{varName:n,sourceValue:r,rule:o,ignoredImgSelectors:s,isCancelled:a}=e,i=()=>{const e=[],i=(o,s,a)=>{if(!this.isVarType(n,o))return;const i=s(n);let c;if(sr(r))if(ar(r)){let e=pr(r,this.unstableVarValues);e||(e=1===o?"#ffffff":"#000000"),c=a(e,t)}else c=Zn(r,(e=>s(e)),(e=>a(e,t)));else c=a(r,t);e.push({property:i,value:c})};if(i(1,er,hr),i(2,tr,fr),i(4,nr,mr),this.isVarType(n,8)){const i=rr(n);let c=r;sr(r)&&(c=Zn(r,(e=>er(e)),(e=>hr(e,t))));const l=Gn(c,o,s,a);c="function"==typeof l?l(t):l,e.push({property:i,value:c})}return e},c=new Set;return{declarations:i(),onTypeChange:{addListener:e=>{const t=()=>{const t=i();e(t)};c.add(t),this.subscribeForVarTypeChange(n,t)},removeListeners:()=>{c.forEach((e=>{this.unsubscribeFromVariableTypeChanges(n,e)}))}}}}}getModifierForVarDependant(e,t){const n=t.match(/^\s*(rgb|hsl)a?\(/),r=t.match(/^rgba?\(var\(--[\-_A-Za-z0-9]+\)(\s*,?\/?\s*0?\.\d+)?\)$/);if(n&&!r){const n=e.startsWith("background"),r=cr(e);return e=>{let o=pr(t,this.unstableVarValues);o||(o=n?"#ffffff":"#000000");return(n?hr:r?fr:mr)(o,e)}}return"background-color"===e||r&&"background"===e?e=>{const r=hr(n?"255, 255, 255":"#ffffff",e);return Zn(t,(e=>er(e)),(t=>hr(t,e)),r)}:cr(e)?e=>{const r=fr(n?"0, 0, 0":"#000000",e);return Zn(t,(e=>tr(e)),(t=>fr(t,e)),r)}:"background"===e||"background-image"===e||"box-shadow"===e?n=>{const r=new Set,o=()=>{const o=Zn(t,(e=>this.isVarType(e,1)?er(e):this.isVarType(e,8)?rr(e):(r.add(e),e)),(e=>hr(e,n)));if("box-shadow"===e){const e=zn(o)(n);if(e.unparsableMatchesLength!==e.matchesLength)return e.result}return o},s=o();if(r.size>0){return s.match(/^var\(.*?, (var\(--darkreader-bg--.*\))|(#[0-9A-Fa-f]+)|([a-z]+)|(rgba?\(.+\))|(hsla?\(.+\))\)$/)?s:new Promise((e=>{for(const t of r.values()){const n=()=>{this.unsubscribeFromVariableTypeChanges(t,n);const r=o();e(r)};this.subscribeForVarTypeChange(t,n)}}))}return s}:e.startsWith("border")||e.startsWith("outline")?e=>Zn(t,(e=>nr(e)),(t=>mr(t,e))):null}subscribeForVarTypeChange(e,t){this.typeChangeSubscriptions.has(e)||this.typeChangeSubscriptions.set(e,new Set);const n=this.typeChangeSubscriptions.get(e);n.has(t)||n.add(t)}unsubscribeFromVariableTypeChanges(e,t){this.typeChangeSubscriptions.has(e)&&this.typeChangeSubscriptions.get(e).delete(t)}collectVariablesAndVarDep(){this.rulesQueue.forEach((e=>{tt(e,(e=>{e.style&&this.collectVarsFromCSSDeclarations(e.style)}))})),this.inlineStyleQueue.forEach((e=>{this.collectVarsFromCSSDeclarations(e)})),this.rulesQueue.clear(),this.inlineStyleQueue.splice(0)}collectVarsFromCSSDeclarations(e){ot(e,((e,t)=>{or(e)&&this.inspectVariable(e,t),sr(t)&&this.inspectVarDependant(e,t)}))}shouldProcessRootVariables(){return this.rulesQueue.size>0&&document.documentElement.getAttribute("style")?.includes("--")}collectRootVariables(){this.shouldProcessRootVariables()&&ot(document.documentElement.style,((e,t)=>{or(e)&&this.inspectVariable(e,t)}))}inspectVariable(e,t){if(this.unstableVarValues.set(e,t),sr(t)&&ar(t)&&(this.unknownColorVars.add(e),this.definedVars.add(e)),this.definedVars.has(e))return;this.definedVars.add(e);Boolean(t.match(lr)||t.match(ur)||ce(t))?this.unknownColorVars.add(e):(t.includes("url(")||t.includes("linear-gradient(")||t.includes("radial-gradient("))&&this.resolveVariableType(e,8)}resolveVariableType(e,t){const n=this.initialVarTypes.get(e)||0,r=(this.varTypes.get(e)||0)|t;this.varTypes.set(e,r),(r!==n||this.undefinedVars.has(e))&&(this.changedTypeVars.add(e),this.undefinedVars.delete(e)),this.unknownColorVars.delete(e),this.unknownBgVars.delete(e)}collectRootVarDependents(){this.shouldProcessRootVariables()&&ot(document.documentElement.style,((e,t)=>{sr(t)&&this.inspectVarDependant(e,t)}))}inspectVarDependant(e,t){or(e)?this.iterateVarDeps(t,(t=>{this.varRefs.has(e)||this.varRefs.set(e,new Set),this.varRefs.get(e).add(t)})):"background-color"===e||"box-shadow"===e?this.iterateVarDeps(t,(e=>this.resolveVariableType(e,1))):cr(e)?this.iterateVarDeps(t,(e=>this.resolveVariableType(e,2))):e.startsWith("border")||e.startsWith("outline")?this.iterateVarDeps(t,(e=>this.resolveVariableType(e,4))):"background"!==e&&"background-image"!==e||this.iterateVarDeps(t,(e=>{if(this.isVarType(e,9))return;const t=null!=this.findVarRef(e,(e=>this.unknownColorVars.has(e)||this.isVarType(e,7)));this.iterateVarRefs(e,(e=>{t?this.resolveVariableType(e,1):this.unknownBgVars.add(e)}))}))}iterateVarDeps(e,t){const n=new Set;!function(e,t){Zn(e,(e=>(t(e),e)))}(e,(e=>n.add(e))),n.forEach((e=>t(e)))}findVarRef(e,t,n=new Set){if(n.has(e))return null;n.add(e);if(t(e))return e;const r=this.varRefs.get(e);if(!r||0===r.size)return null;for(const e of r){const r=this.findVarRef(e,t,n);if(r)return r}return null}iterateVarRefs(e,t){this.findVarRef(e,(e=>(t(e),!1)))}setOnRootVariableChange(e){this.onRootVariableDefined=e}putRootVars(e,t){const n=e.sheet;n.cssRules.length>0&&n.deleteRule(0);const r=new Map;ot(document.documentElement.style,((e,n)=>{or(e)&&(this.isVarType(e,1)&&r.set(er(e),hr(n,t)),this.isVarType(e,2)&&r.set(tr(e),fr(n,t)),this.isVarType(e,4)&&r.set(nr(e),mr(n,t)),this.subscribeForVarTypeChange(e,this.onRootVariableDefined))}));const o=[];o.push(":root {");for(const[e,t]of r)o.push(` ${e}: ${t};`);o.push("}");const s=o.join("\n");n.insertRule(s)}};function Yn(e,t=0){const n=e.indexOf("var(",t);if(n>=0){const t=F(e,n+3);if(t)return{start:n,end:t.end}}return null}function Jn(e,t){const n=function(e){const t=[];let n,r=0;for(;n=Yn(e,r);){const{start:o,end:s}=n;t.push({start:o,end:s,value:e.substring(o,s)}),r=n.end+1}return t}(e),r=n.length;if(0===r)return e;const o=e.length,s=n.map((e=>t(e.value,n.length))),a=[];a.push(e.substring(0,n[0].start));for(let t=0;t=0?(n=e.substring(4,t).trim(),r=e.substring(t+1,e.length-1).trim()):(n=e.substring(4,e.length-1).trim(),r=""),{name:n,fallback:r}}function Zn(e,t,n,r){return Jn(e,(e=>{const{name:o,fallback:s}=Xn(e),a=t(o);if(!s)return r?`var(${a}, ${r})`:`var(${a})`;let i;return i=sr(s)?Zn(s,t,n):n?n(s):s,`var(${a}, ${i})`}))}function er(e){return`--darkreader-bg${e}`}function tr(e){return`--darkreader-text${e}`}function nr(e){return`--darkreader-border${e}`}function rr(e){return`--darkreader-bgimg${e}`}function or(e){return e.startsWith("--")}function sr(e){return e.includes("var(")}function ar(e){return e.match(/^\s*(rgb|hsl)a?\(/)||e.match(/^(((\d{1,3})|(var\([\-_A-Za-z0-9]+\))),?\s*?){3}$/)}const ir=["color","caret-color","-webkit-text-fill-color","fill","stroke"];function cr(e){return ir.includes(e)}const lr=/^(\d{1,3})\s+(\d{1,3})\s+(\d{1,3})$/,ur=/^(\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})$/;function dr(e,t,n){const{isRaw:r,color:o}=function(e){const t=e.match(lr)??e.match(ur);if(t)return{isRaw:!0,color:`rgb(${t[1]}, ${t[2]}, ${t[3]})`};return{isRaw:!1,color:e}}(e),s=ce(o);if(s){const e=n(s,t,!r);if(r){const t=ce(e);return t?`${t.r}, ${t.g}, ${t.b}`:e}return e}return o}function hr(e,t){return dr(e,t,yn)}function fr(e,t){return dr(e,t,En)}function mr(e,t){return dr(e,t,xn)}function pr(e,t,n=new Set){let r=!1;const o=Jn(e,((e,o)=>{const{name:s,fallback:a}=Xn(e),i=o>1?new Set(n):n;if(i.has(s))return r=!0,null;i.add(s);const c=t.get(s)||a;let l=null;return c&&(l=sr(c)?pr(c,t,i):c),l||(r=!0,null)}));return r?null:o}const gr=["mode","brightness","contrast","grayscale","sepia","darkSchemeBackgroundColor","darkSchemeTextColor","lightSchemeBackgroundColor","lightSchemeTextColor"];const br=function(){const e=[];let t=null;function n(){let n;for(;n=e.shift();)n();t=null}return{add:function(r){e.push(r),t||(t=requestAnimationFrame(n))},cancel:function(){e.splice(0),cancelAnimationFrame(t),t=null}}}();function yr(){let e=0;const t=new Set,n=new Map,r=new Set;let o=null,s=!1,a=!1;return{modifySheet:function(i){const c=i.sourceCSSRules,{theme:l,ignoreImageAnalysis:u,force:d,prepareSheet:h,isAsyncCancelled:m}=i;let p=0===n.size;const g=new Set(n.keys()),b=function(e){let t="";return gr.forEach((n=>{t+=`${n}:${e[n]};`})),t}(l),y=b!==o;s&&(a=!0);const k=[];if(tt(c,(e=>{const r=function(e){let t=e.cssText;return bt(e.parentRule)&&(t=`${e.parentRule.media.mediaText} { ${t} }`),N(t)}(e);let o=!1;if(g.delete(r),t.has(r)||(t.add(r),o=!0),!o)return void k.push(n.get(r));if(p=!0,"revert"===e.style.all)return;const s=[];e.style&&ot(e.style,((t,n)=>{const r=An(t,n,e,Kn,u,m);r&&s.push(r)}));let a=null;if(s.length>0){const t=e.parentRule;a={selector:e.selectorText,declarations:s,parentRule:t},k.push(a)}n.set(r,a)}),(()=>{s=!0})),g.forEach((e=>{t.delete(e),n.delete(e)})),o=b,!d&&!p&&!y)return;function w(e,t,n){const{selector:r,declarations:o}=n;let s=r;const a=f&&r.startsWith(":is(")&&(r.includes(":is()")||r.includes(":where()")||r.includes(":where(")&&r.includes(":-moz")),i=r.includes("::view-transition-");(a||i)&&(s=".darkreader-unsupported-selector");let c=`${s} {`;for(const e of o){const{property:t,value:n,important:r}=e;n&&(c+=` ${t}: ${n}${r?" !important":""};`)}c+=" }",e.insertRule(c,t)}e++;const S=new Map,_=new Map;let E=0,v=0;const C={rule:null,rules:[],isGroup:!0},x=new WeakMap;function R(e){if(null==e)return C;if(x.has(e))return x.get(e);const t={rule:e,rules:[],isGroup:!0};x.set(e,t);return R(e.parentRule).rules.push(t),t}r.forEach((e=>e())),r.clear(),k.filter((e=>e)).forEach((({selector:t,declarations:n,parentRule:o})=>{const s=R(o),a={selector:t,declarations:[],isGroup:!1},i=a.declarations;function c(t,n,r,o){const s=++E,a={property:t,value:null,important:r,asyncKey:s,sourceValue:o};i.push(a);const c=e;n.then((t=>{t&&!m()&&c===e&&(a.value=t,br.add((()=>{m()||c!==e||function(e){const{rule:t,target:n,index:r}=S.get(e);n.deleteRule(r),w(n,r,t),S.delete(e)}(s)})))}))}function u(t,n,o,s){const{declarations:a,onTypeChange:l}=n,u=++v,d=e,h=i.length;let f=[];if(0===a.length){const e={property:t,value:s,important:o,sourceValue:s,varKey:u};i.push(e),f=[e]}a.forEach((e=>{if(e.value instanceof Promise)c(e.property,e.value,o,s);else{const t={property:e.property,value:e.value,important:o,sourceValue:s,varKey:u};i.push(t),f.push(t)}})),l.addListener((t=>{if(m()||d!==e)return;const n=t.map((e=>({property:e.property,value:e.value,important:o,sourceValue:s,varKey:u}))),r=i.indexOf(f[0],h);i.splice(r,f.length,...n),f=n,function(e){const{rule:t,target:n,index:r}=_.get(e);n.deleteRule(r),w(n,r,t)}(u)})),r.add((()=>l.removeListeners()))}s.rules.push(a),n.forEach((({property:e,value:t,important:n,sourceValue:r})=>{if("function"==typeof t){const o=t(l);o instanceof Promise?c(e,o,n,r):e.startsWith("--")?u(e,o,n,r):i.push({property:e,value:o,important:n,sourceValue:r})}else i.push({property:e,value:t,important:n,sourceValue:r})}))}));const $=h();!function e(t,n,r){t.rules.forEach((t=>{if(t.isGroup){const o=function(e,t){const{rule:n}=e;if(bt(n)){const{media:e}=n,r=t.cssRules.length;return t.insertRule(`@media ${e.mediaText} {}`,r),t.cssRules[r]}if(yt(n)){const{name:e}=n,r=t.cssRules.length;return t.insertRule(`@layer ${e} {}`,r),t.cssRules[r]}return t}(t,n);e(t,o,r)}else r(t,n)}))}(C,$,((e,t)=>{const n=t.cssRules.length;e.declarations.forEach((({asyncKey:r,varKey:o})=>{null!=r&&S.set(r,{rule:e,target:t,index:n}),null!=o&&_.set(o,{rule:e,target:t,index:n})})),w(t,n,e)}))},shouldRebuildStyle:function(){return s&&!a}}}let kr=!1;document.addEventListener("__darkreader__inlineScriptsAllowed",(()=>kr=!0),{once:!0});const wr=new WeakSet,Sr=new WeakMap;function _r(e){let t=!1;function n(t,n){const r=[...e.adoptedStyleSheets],o=r.indexOf(t),s=r.indexOf(n);s>=0&&r.splice(s,1),r.splice(o+1,0,n),e.adoptedStyleSheets=r}function r(){const t=[...e.adoptedStyleSheets];for(let e=t.length-1;e>=0;e--){const n=t[e];wr.has(n)&&t.splice(e,1)}e.adoptedStyleSheets.length!==t.length&&(e.adoptedStyleSheets=t),i=new WeakSet,c=new WeakSet}const o=[];let s=0;function a(){let t=0;var n;if(n=e=>{t+=e.cssRules.length},e.adoptedStyleSheets.forEach((t=>{wr.has(t)||n(t),wt(t,e)})),1===t){const n=e.adoptedStyleSheets[0].cssRules[0];return n instanceof CSSStyleRule?n.style.length:t}return t}let i=new WeakSet,c=new WeakSet;let l=!1;function u(t){l||(l=!0,queueMicrotask((()=>{l=!1;const n=e.adoptedStyleSheets.filter((e=>!wr.has(e)));n.forEach((e=>Sr.delete(e))),t(n)})))}let d=null;function h(e){d=requestAnimationFrame((()=>{kr||(a()!==s&&u(e),h(e))}))}function f(t,n){e.addEventListener(t,n),o.push((()=>e.removeEventListener(t,n)))}return{render:function(o,l){r();for(let r=e.adoptedStyleSheets.length-1;r>=0;r--){const u=e.adoptedStyleSheets[r];if(wr.has(u))continue;i.add(u);const d=Sr.get(u);if(d){s=a(),n(u,d);continue}const h=u.cssRules,f=new CSSStyleSheet;Sr.set(u,f),tt(h,(e=>c.add(e.style)));const m=()=>{for(let e=f.cssRules.length-1;e>=0;e--)f.deleteRule(e);return f.insertRule("#__darkreader__adoptedOverride {}"),n(u,f),wr.add(f),f};yr().modifySheet({prepareSheet:m,sourceCSSRules:h,theme:o,ignoreImageAnalysis:l,force:!1,isAsyncCancelled:()=>t})}s=a()},destroy:function(){o.forEach((e=>e())),o.splice(0),t=!0,r(),d&&(cancelAnimationFrame(d),d=null)},watch:function(e){const t=()=>{kr=!0,u(e)};f("__darkreader__adoptedStyleSheetsChange",t),f("__darkreader__adoptedStyleSheetChange",t),f("__darkreader__adoptedStyleDeclarationChange",t),kr||h(e)}}}class Er{constructor(){this.cssRules=[],this.commands=[]}insertRule(e,t=0){return this.commands.push({type:"insert",index:t,cssText:e}),this.cssRules.splice(t,0,new Er),t}deleteRule(e){this.commands.push({type:"delete",index:e}),this.cssRules.splice(e,1)}replaceSync(e){if(this.commands.splice(0),this.commands.push({type:"replace",cssText:e}),""!==e)throw new Error("StyleSheetCommandBuilder.replaceSync() is not fully supported");this.cssRules.splice(0)}getDeepCSSCommands(){const e=[];return this.commands.forEach((t=>{e.push({type:t.type,cssText:"delete"!==t.type?t.cssText:"",path:"replace"===t.type?[]:[t.index]})})),this.cssRules.forEach(((e,t)=>{e.getDeepCSSCommands().forEach((e=>e.path.unshift(t)))})),e}clearDeepCSSCommands(){this.commands.splice(0),this.cssRules.forEach((e=>e.clearDeepCSSCommands()))}}const vr={"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"}},Cr={background:{customProp:"--darkreader-inline-bg",cssProp:"background",dataAttr:"data-darkreader-inline-bg"},border:{customProp:"--darkreader-inline-border-short",cssProp:"border",dataAttr:"data-darkreader-inline-border-short"},"border-bottom":{customProp:"--darkreader-inline-border-bottom-short",cssProp:"border-bottom",dataAttr:"data-darkreader-inline-border-bottom-short"},"border-left":{customProp:"--darkreader-inline-border-left-short",cssProp:"border-left",dataAttr:"data-darkreader-inline-border-left-short"},"border-right":{customProp:"--darkreader-inline-border-right-short",cssProp:"border-right",dataAttr:"data-darkreader-inline-border-right-short"},"border-top":{customProp:"--darkreader-inline-border-top-short",cssProp:"border-top",dataAttr:"data-darkreader-inline-border-top-short"}},xr=Object.values(vr),Rr={};xr.forEach((({cssProp:e,customProp:t})=>Rr[t]=e));const $r=["style","fill","stop-color","stroke","bgcolor","color","background"],Ar=$r.map((e=>`[${e}]`)).join(", ");function Tr(){return xr.concat(Object.values(Cr)).map((({dataAttr:e,customProp:t,cssProp:n})=>[`[${e}] {`,` ${n}: var(${t}) !important;`,"}"].join("\n"))).concat(["[data-darkreader-inline-invert] {"," filter: invert(100%) hue-rotate(180deg);","}"]).join("\n")}const Mr=new Map,Vr=new Map;function Lr(e,t,n){Mr.has(e)&&(Mr.get(e).disconnect(),Vr.get(e).disconnect());const r=new WeakSet;function o(e){(function(e){const t=[];return e instanceof Element&&e.matches(Ar)&&t.push(e),(e instanceof Element||y&&e instanceof ShadowRoot||e instanceof Document)&&K(t,e.querySelectorAll(Ar)),t})(e).forEach((e=>{r.has(e)||(r.add(e),t(e))})),Ue(e,(o=>{r.has(e)||(r.add(e),n(o.shadowRoot),Lr(o.shadowRoot,t,n))})),Kn.matchVariablesAndDependents()}const s=et(e,{onMinorMutations:(e,{additions:t})=>{t.forEach((e=>o(e)))},onHugeMutations:()=>{o(e)}});Mr.set(e,s);let a=0,i=null;const c=Be({seconds:10}),l=Be({seconds:2});let u=[],d=null;const h=Ve((e=>{const n=new Set;e.forEach((e=>{const r=e.target;n.has(r)||$r.includes(e.attributeName)&&(n.add(r),t(r))})),Kn.matchVariablesAndDependents()})),f=new MutationObserver((e=>{if(d)return void u.push(...e);a++;const t=Date.now();if(null==i)i=t;else if(a>=50){if(t-i{i=null,a=0,d=null;const e=u;u=[],h(e)}),l),void u.push(...e);i=t,a=1}h(e)}));f.observe(e,{attributes:!0,attributeFilter:$r.concat(xr.map((({dataAttr:e})=>e))),subtree:!0}),Vr.set(e,f)}const Dr=new WeakMap,Pr=new WeakSet,Or=new WeakMap,Nr=["brightness","contrast","grayscale","sepia","mode"];function Fr(e,t){return $r.map((t=>`${t}="${e.getAttribute(t)}"`)).concat(Nr.map((e=>`${e}="${t[e]}"`))).join(" ")}function Wr(e,t,n,r){if(Fr(e,t)===Dr.get(e))return;const o=new Set(Object.keys(vr));function s(n,s,a){const i=An(s,a,{style:e.style},Kn,r,null);if(!i)return;function c(t){const{customProp:r,dataAttr:s}=vr[n]??Cr[n];e.style.setProperty(r,t),e.hasAttribute(s)||e.setAttribute(s,""),o.delete(n)}const l="function"==typeof i.value?i.value(t):i.value;var u;"string"==typeof l?c(l):l instanceof Promise?(u=a,l.then((r=>{r&&"background"===n&&r.startsWith("var(--darkreader-bg--")&&c(r),r&&"background-image"===n&&(e!==document.documentElement&&e!==document.body||r!==u||(r="none"),c(r)),Dr.set(e,Fr(e,t))}))):"object"==typeof l&&function(t){let n=[];function r(t){n.forEach((({property:t})=>{e.style.removeProperty(t)})),t.forEach((({property:t,value:n})=>{n instanceof Promise||e.style.setProperty(t,n)})),n=t}r(t.declarations),t.onTypeChange.addListener(r)}(l)}if(n.length>0&&function(e,t){for(let n=0,r=t.length;n{e.removeAttribute(vr[t].dataAttr)}));const a=e instanceof SVGElement,i=a?e.ownerSVGElement??(e instanceof SVGSVGElement?e:null):null;if(a&&1===t.mode&&i){if(Pr.has(i))return;if(function(e){if(Or.has(e))return Or.get(e);const t=Boolean(e&&(e.getAttribute("class")?.includes("logo")||e.parentElement?.getAttribute("class")?.includes("logo")));return Or.set(e,t),t}(i)){Pr.add(i);const e=()=>{let e=i.outerHTML;e=e.replaceAll('',"");Nt(`data:image/svg+xml;base64,${btoa(e)}`).then((e=>{e.isDark&&e.isTransparent||e.isLarge&&e.isLight&&!e.isTransparent?i.setAttribute("data-darkreader-inline-invert",""):i.removeAttribute("data-darkreader-inline-invert")}))};return e(),void(He()||ze(e))}}if(e.hasAttribute("bgcolor")){let t=e.getAttribute("bgcolor");(t.match(/^[0-9a-f]{3}$/i)||t.match(/^[0-9a-f]{6}$/i))&&(t=`#${t}`),s("background-color","background-color",t)}if((e===document.documentElement||e===document.body)&&e.hasAttribute("background")){s("background-image","background-image",`url("${G(location.href,e.getAttribute("background")??"")}")`)}if(e.hasAttribute("color")&&"mask-icon"!==e.rel){let t=e.getAttribute("color");(t.match(/^[0-9a-f]{3}$/i)||t.match(/^[0-9a-f]{6}$/i))&&(t=`#${t}`),s("color","color",t)}if(a){if(e.hasAttribute("fill")){const t=32,n=e.getAttribute("fill");if("none"!==n)if(e instanceof SVGTextElement)s("fill","color",n);else{const r=()=>{const{width:r,height:o}=e.getBoundingClientRect();s("fill",r>t||o>t?"background-color":"color",n)};Ke()?r():Je(r)}}e.hasAttribute("stop-color")&&s("stop-color","background-color",e.getAttribute("stop-color"))}if(e.hasAttribute("stroke")){const t=e.getAttribute("stroke");s("stroke",e instanceof SVGLineElement||e instanceof SVGTextElement?"border-color":"color",t)}e.style&&ot(e.style,((t,n)=>{if("background-image"===t&&n.includes("url"))e!==document.documentElement&&e!==document.body||s(t,t,n);else if(vr.hasOwnProperty(t)||t.startsWith("--")&&!Rr[t])s(t,t,n);else if(Cr[t]&&n.includes("var("))s(t,t,n);else{const n=Rr[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")),e.getAttribute("style")?.includes("--")&&Kn.addInlineStyleForMatching(e.style),Q(o,(t=>{e.removeAttribute(vr[t].dataAttr)})),Dr.set(e,Fr(e,t))}const Ir="theme-color",Br=`meta[name="${Ir}"]`;let jr=null,qr=null;function Ur(e,t){jr=jr||e.content;const n=ce(jr);n&&(e.content=yn(n,t,!1))}const Hr=/\/\*[\s\S]*?\*\//g;function Gr(e){return e.replace(Hr,"")}let zr=!1;function Qr(e,t,n,r){let o=null;let s=!1;function a(){zr=!0,o?.stop(),s||(s=!0,queueMicrotask((function(){s=!1,r()||n()})))}return{start:function(){e.addEventListener("__darkreader__updateSheet",a),zr&&e.sheet||(o=function(e,t,n,r){let o=null,s=null;function a(){const e=t();return e?e.length:null}function i(){return a()!==o}function c(){o=a(),l();const t=()=>{const c=r();!c&&i()&&(o=a(),n()),c||zr&&e.sheet?l():s=requestAnimationFrame(t)};t()}function l(){s&&cancelAnimationFrame(s)}return{start:c,stop:l}}(e,t,n,r),o.start())},stop:function(){e.removeEventListener("__darkreader__updateSheet",a),o?.stop()}}}document.addEventListener("__darkreader__inlineScriptsAllowed",(()=>zr=!0),{once:!0});const Kr=["account.containerstore.com","containerstore.com","www.onet.pl"];function Yr(e){return(e instanceof HTMLStyleElement||e instanceof SVGStyleElement&&!Kr.includes(location.hostname)||e instanceof HTMLLinkElement&&Boolean(e.rel)&&e.rel.toLowerCase().includes("stylesheet")&&Boolean(e.href)&&!e.disabled&&(!m||!e.href.startsWith("moz-extension://"))&&!function(e){if(!e.href)return!1;try{return"fonts.googleapis.com"===new URL(e.href).hostname}catch(t){return e.href,!1}}(e))&&!e.classList.contains("darkreader")&&"print"!==e.media.toLowerCase()&&!e.classList.contains("stylus")}function Jr(e,t=[],n=!0){return Yr(e)?t.push(e):(e instanceof Element||y&&e instanceof ShadowRoot||e===document)&&(Q(e.querySelectorAll('style, link[rel*="stylesheet" i]:not([disabled])'),(e=>Jr(e,t,!1))),n&&Ue(e,(e=>Jr(e.shadowRoot,t,!1)))),t}const Xr=new WeakSet,Zr=new WeakSet;let eo=0;const to=new Map;function no(e,{update:t,loadingStart:n,loadingEnd:r}){const o=[];let s=e;for(;(s=s.nextElementSibling)&&s.matches(".darkreader");)o.push(s);let a=o.find((e=>e.matches(".darkreader--cors")&&!Zr.has(e)))||null,i=o.find((e=>e.matches(".darkreader--sync")&&!Xr.has(e)))||null,c=null,l=null,u=!1,d=!0;const h=()=>u,f=yr(),m=new MutationObserver((n=>{if(n.some((e=>"characterData"===e.type))&&b()){C((e.textContent??"").trim(),location.href).then(t)}else t()})),g={attributes:!0,childList:!0,subtree:!0,characterData:!0};function b(){if(!(e instanceof HTMLStyleElement))return!1;return Gr(e.textContent??"").trim().match(it)}function y(e,t){let n=!1;if(e){let r;e:for(let o=0,s=e.length;o{const o=()=>{e.removeEventListener("load",s),e.removeEventListener("error",a),to.delete(t)},s=()=>{o(),n()},a=()=>{o(),r(`Linkelement ${t} couldn't be loaded. ${e.href}`)};to.set(t,(()=>{o(),r()})),e.addEventListener("load",s,{passive:!0}),e.addEventListener("error",a,{passive:!0}),e.href||a()}))}(e,E)}catch(e){_=!0}if(u)return null;[o,s]=R()}if(o&&!y(o,!1))return o;if(t=await ro(e.href),n=lt(e.href),u)return null}else{if(!b())return null;t=e.textContent.trim(),n=lt(location.href)}var r;return await C(t,n),a?a.sheet.cssRules:null}async function C(t,n){if(t){try{const r=await oo(t,n);a?(a.textContent?.length??0){S=!1,r(),e&&t()})).catch((e=>{S=!1,r()}))),null)},render:function(n,r){const o=k();function s(){i||(i=e instanceof SVGStyleElement?document.createElementNS("http://www.w3.org/2000/svg","style"):document.createElement("style"),i.classList.add("darkreader"),i.classList.add("darkreader--sync"),i.media="screen",e.title&&(i.title=e.title),Xr.add(i)),l&&l.stop(),w(),null==i.sheet&&(i.textContent="");return function(e){if(e)for(let t=e.cssRules.length-1;t>=0;t--)e.deleteRule(t)}(i.sheet),l?l.run():l=qe(i,"prev-sibling",(()=>{x=!0,a()})),i.sheet}function a(){const e=x;x=!1,f.modifySheet({prepareSheet:s,sourceCSSRules:o,theme:n,ignoreImageAnalysis:r,force:e,isAsyncCancelled:h}),d=0===i.sheet.cssRules.length,f.shouldRebuildStyle()&&Je((()=>t()))}o&&(u=!1,a())},pause:T,destroy:function(){if(T(),je(a),je(i),r(),to.has(E)){const e=to.get(E);to.delete(E),e&&e()}},watch:function(){m.observe(e,g),e instanceof HTMLStyleElement&&A.start()},restore:function(){i&&(M++,M>10||(w(),c&&c.skip(),l&&l.skip(),d||(x=!0,t())))}}}async function ro(e){if(e.startsWith("data:"))return await(await fetch(e)).text();const t=function(e){const t=`${Rt}${e}`;try{return sessionStorage.getItem(t)??null}catch(e){}return null}(e);if(t)return t;let n;return n=new URL(e).origin===location.origin?await async function(e,t,n){const r=await E(e,t,n);return await r.text()}(e,"text/css",location.origin):await Pt({url:e,responseType:"text",mimeType:"text/css",origin:location.origin}),function(e,t){const n=`${Rt}${e}`;try{sessionStorage.setItem(n,t)}catch(e){}}(e,n),n}async function oo(e,t,n=new Map){e=Gr(e),e=function(e,t){return e.replace(at,(e=>{try{const n=ct(e);return`url('${G(t,n).replaceAll("'","\\'")}')`}catch(t){return e}}))}(e=e.replace(ut,""),t);const r=function(e,t,n=0){const r=[];let o;for(;o=e.exec(t);)r.push({text:o[n],offset:o.index});return r}(it,e);let o=null,s=!1,a=0;for(const i of r){let r;const c=o?o.offset+o.text.length:0,l=i.offset,u=e.indexOf("{",c),d=e.indexOf("}",c);if(s||u>=0&&u=0&&ddocument.removeEventListener(e,t)))}function o(e,t,r){const o=e.prototype,s=Object.getOwnPropertyDescriptor(o,t);if(!s)return;const a={...s};Object.keys(r).forEach((e=>{const t=r[e];a[e]=t(s[e])})),Object.defineProperty(o,t,a),n.push((()=>Object.defineProperty(o,t,s)))}function s(e,t,n){o(e,t,{value:n})}function a(e){return e?.classList?.contains("darkreader")}function i(e){return a(e.ownerNode)}r("__darkreader__cleanUp",(function(){n.forEach((e=>e())),n.splice(0)})),r("__darkreader__disableConflictingPlugins",(function(){window?.WPDarkMode?.deactivate&&window.WPDarkMode.deactivate()}));const c=new CustomEvent("__darkreader__updateSheet"),l=new CustomEvent("__darkreader__adoptedStyleSheetChange"),u=new CustomEvent("__darkreader__shadowDomAttaching",{bubbles:!0}),d=new WeakMap,h=new WeakMap;function f(e){const t=d.get(e);t?.forEach((e=>{e.isConnected?e.dispatchEvent(l):t.delete(e)}))}function m(e){e.ownerNode&&!i(e)&&e.ownerNode.dispatchEvent(c),d.has(e)&&f(e)}s(CSSStyleSheet,"addRule",(e=>function(t,n,r){return e.call(this,t,n,r),m(this),-1})),s(CSSStyleSheet,"insertRule",(e=>function(t,n){const r=e.call(this,t,n);return m(this),r})),s(CSSStyleSheet,"deleteRule",(e=>function(t){e.call(this,t),m(this)})),s(CSSStyleSheet,"removeRule",(e=>function(t){e.call(this,t),m(this)})),s(CSSStyleSheet,"replace",(e=>function(t){const n=e.call(this,t);return function(e,t){const{ownerNode:n}=e;n&&!i(e)&&t&&t instanceof Promise&&t.then((()=>n.dispatchEvent(c))),d.has(e)&&t&&t instanceof Promise&&t.then((()=>f(e)))}(this,n),n})),s(CSSStyleSheet,"replaceSync",(e=>function(t){e.call(this,t),m(this)})),s(Element,"attachShadow",(e=>function(t){return this.dispatchEvent(u),e.call(this,t)}));("baidu.com"===location.hostname||location.hostname.endsWith(".baidu.com"))&&s(Element,"getElementsByTagName",(e=>function(t){if("style"!==t)return e.call(this,t);const n=()=>{const n=e.call(this,t);return Object.setPrototypeOf([...n].filter((e=>e&&!a(e))),NodeList.prototype)};let r=n();return r=new Proxy(r,{get:function(e,t){return n()[Number(t)||t]}}),r}));function p(e){customElements.whenDefined(e).then((()=>{document.dispatchEvent(new CustomEvent("__darkreader__isDefined",{detail:{tag:e}}))}))}["brilliant.org","www.vy.no"].includes(location.hostname)&&o(Node,"childNodes",{get:e=>function(){const t=e.call(this);return Object.setPrototypeOf([...t].filter((e=>!a(e))),NodeList.prototype)}}),r("__darkreader__addUndefinedResolver",(e=>p(e.detail.tag))),t&&s(CustomElementRegistry,"define",(e=>function(t,n,r){p(t),e.call(this,t,n,r)}));let g=null;function b(){document.dispatchEvent(new CustomEvent("__darkreader__blobURLCheckResponse",{detail:{blobURLAllowed:g}}))}r("__darkreader__blobURLCheckRequest",(function(){if(null!=g)return void document.dispatchEvent(new CustomEvent("__darkreader__blobURLCheckResponse",{detail:{blobURLAllowed:g}}));const e='',t=new Uint8Array(114);for(let n=0;n<114;n++)t[n]=e.charCodeAt(n);const n=new Blob([t],{type:"image/svg+xml"}),r=URL.createObjectURL(n),o=new Image;o.onload=()=>{g=!0,b()},o.onerror=()=>{g=!1,b()},o.src=r})),e&&o(Document,"styleSheets",{get:e=>function(){const t=()=>{const t=[...e.call(this)].filter((e=>e.ownerNode&&!i(e)));return t.item=e=>t[e],Object.setPrototypeOf(t,StyleSheetList.prototype)};let n=t();return n=new Proxy(n,{get:function(e,n){return t()[n]}}),n}});{const e=new WeakMap,t=new WeakMap,n=new CustomEvent("__darkreader__adoptedStyleSheetsChange"),r=new WeakSet,a=new WeakMap,i=e=>!(!e||!e.cssRules)&&(!!r.has(e)||!!(e.cssRules.length>0&&e.cssRules[0].cssText.startsWith("#__darkreader__adoptedOverride"))&&(r.add(e),!0)),c=(e,t)=>e.length===t.length&&e.every(((e,n)=>e===t[n])),l=e=>{const t=a.get(e),r=(e.adoptedStyleSheets||[]).filter((e=>!i(e)));a.set(e,r),t&&c(t,r)||(r.forEach((t=>{d.has(t)||d.set(t,new Set),d.get(t).add(e);for(const e of t.cssRules){const n=e.style;n&&h.set(n,t)}})),e.dispatchEvent(n))},u=(n,r)=>{if(t.has(r))return r;if(e.has(r))return e.get(r);const o=new Proxy(r,{deleteProperty:(e,t)=>(delete e[t],!0),set:(e,t,r)=>(e[t]=r,"length"===t&&l(n),!0)});return e.set(r,o),t.set(o,r),o};[Document,ShadowRoot].forEach((e=>{o(e,"adoptedStyleSheets",{get:e=>function(){const t=e.call(this);return u(this,t)},set:e=>function(n){t.has(n)&&(n=t.get(n)),e.call(this,n),l(this)}})}));const f=new CustomEvent("__darkreader__adoptedStyleDeclarationChange");["setProperty","removeProperty"].forEach((e=>{s(CSSStyleDeclaration,e,(e=>function(...t){const n=e.apply(this,t),r=h.get(this);if(r){const e=d.get(r);e&&e.forEach((e=>{e.dispatchEvent(f)}))}return n}))}))}}const ao=new Set,io=new Map;let co;function lo(e){let t=e.tagName.toLowerCase();if(!t.includes("-")){const n=e.getAttribute("is");if(!n)return;t=n}io.has(t)||(io.set(t,new Set),async function(e){if(ao.has(e))return;return new Promise((t=>{if(window.customElements&&"function"==typeof customElements.whenDefined)customElements.whenDefined(e).then((()=>t()));else if(ho)mo.has(e)?mo.get(e).push(t):mo.set(e,[t]),document.dispatchEvent(new CustomEvent("__darkreader__addUndefinedResolver",{detail:{tag:e}}));else{const n=()=>{const r=io.get(e);r&&r.size>0&&(r.values().next().value.matches(":defined")?t():requestAnimationFrame(n))};requestAnimationFrame(n)}}))}(t).then((()=>{if(co){const e=io.get(t);io.delete(t),co(Array.from(e))}}))),io.get(t).add(e)}function uo(e){S&&Q(e.querySelectorAll(":not(:defined)"),lo)}let ho=!1;document.addEventListener("__darkreader__inlineScriptsAllowed",(()=>{ho=!0}),{once:!0,passive:!0});const fo=new Set;document.addEventListener("__darkreader__shadowDomAttaching",(e=>{const t=e.target;0===fo.size&&queueMicrotask((()=>{const e=[...fo].filter((e=>e.shadowRoot));co?.(e),fo.clear()})),fo.add(t)}));const mo=new Map;function po(e){ho=!0;const t=e.detail.tag;if(ao.add(t),mo.has(t)){const e=mo.get(t);mo.delete(t),e.forEach((e=>e()))}}const go=[];let bo,yo;function ko(e,t,n){wo();const r=new WeakMap,o=e=>(r.has(e)||r.set(e,new Set),r.get(e));e.forEach((e=>{let t=e;for(;t=t.parentNode;)if(t===document||t.nodeType===Node.DOCUMENT_FRAGMENT_NODE){o(t).add(e);break}}));const s=new WeakMap,a=new WeakMap;function i(e){s.set(e,e.previousElementSibling),a.set(e,e.nextElementSibling)}function c(e,n){const{createdStyles:r,removedStyles:c,movedStyles:l}=n;r.forEach((e=>i(e))),l.forEach((e=>i(e))),c.forEach((e=>{return t=e,s.delete(t),void a.delete(t);var t}));const u=o(e);r.forEach((e=>u.add(e))),c.forEach((e=>u.delete(e))),r.size+c.size+l.size>0&&t({created:Array.from(r),removed:Array.from(c),moved:Array.from(l),updated:[]})}function l(e,{additions:t,moves:n,deletions:r}){const o=new Set,s=new Set,a=new Set;t.forEach((e=>Jr(e).forEach((e=>o.add(e))))),r.forEach((e=>Jr(e).forEach((e=>s.add(e))))),n.forEach((e=>Jr(e).forEach((e=>a.add(e))))),c(e,{createdStyles:o,removedStyles:s,movedStyles:a}),t.forEach((e=>{m(e),uo(e)})),t.forEach((e=>{return!(!(t=e).tagName.includes("-")&&!t.getAttribute("is"))&&lo(e);var t})),t.forEach((e=>Hn(e)))}function u(e){const t=new Set(Jr(e)),n=new Set,r=new Set,i=new Set,l=o(e);t.forEach((e=>{l.has(e)||n.add(e)})),l.forEach((e=>{t.has(e)||r.add(e)})),t.forEach((e=>{var t;n.has(e)||r.has(e)||(t=e).previousElementSibling===s.get(t)&&t.nextElementSibling===a.get(t)||i.add(e)})),c(e,{createdStyles:n,removedStyles:r,movedStyles:i}),m(e),uo(e),Hn(e)}function d(e){const n=new Set,r=new Set;e.forEach((e=>{const{target:t}=e;t.isConnected&&(Yr(t)?n.add(t):t instanceof HTMLLinkElement&&t.disabled&&r.add(t))})),n.size+r.size>0&&t({updated:Array.from(n),created:[],removed:Array.from(r),moved:[]})}function h(e){if(bo.has(e))return;const t=et(e,{onMinorMutations:l,onHugeMutations:u}),n=new MutationObserver(d);n.observe(e,{attributeFilter:["rel","disabled","media","href"],subtree:!0}),go.push(t,n),bo.add(e)}function f(e){const{shadowRoot:t}=e;null==t||bo.has(t)||(h(t),n(t))}function m(e){Ue(e,f)}e.forEach(i),h(document),m(document.documentElement),co=e=>{e=e.filter((e=>!yo.has(e)));const n=[];e.forEach((e=>K(n,Jr(e.shadowRoot)))),t({created:n,updated:[],removed:[],moved:[]}),e.forEach((e=>{const{shadowRoot:t}=e;null!=t&&(f(e),m(t),uo(t))})),e.forEach((e=>yo.add(e)))},document.addEventListener("__darkreader__isDefined",po),uo(document)}function wo(){go.forEach((e=>e.disconnect())),go.splice(0,go.length),bo=new WeakSet,yo=new WeakSet,co=null,io.clear(),document.removeEventListener("__darkreader__isDefined",po)}const So=De(),_o=new Map,Eo=[],vo=new Map,Co=new WeakMap;let xo=null,Ro=null,$o=null,Ao=[],To=[];const Mo=new Map;function Vo(e,t=document.head||document){let n=t.querySelector(`.${e}`);return n?Mo.set(e,n):Mo.has(e)?n=Mo.get(e):(n=document.createElement("style"),n.classList.add("darkreader"),n.classList.add(e),n.media="screen",n.textContent="",Mo.set(e,n)),n}const Lo=new Map;function Do(e,t,n){Lo.has(t)&&Lo.get(t).stop(),Lo.set(t,qe(e,"head",n))}function Po(){const e=Vo("darkreader--fallback",document);e.textContent=Dn(xo,{strict:!0}),document.head.insertBefore(e,document.head.firstChild),Do(e,"fallback");const t=Vo("darkreader--user-agent");t.textContent=Vn(xo,$o,xo.styleSystemControls),document.head.insertBefore(t,e.nextSibling),Do(t,"user-agent");const n=Vo("darkreader--text");xo.useFont||xo.textStroke>0?n.textContent=function(e){const t=[];return t.push(`*:not(${z.join(", ")}) {`),e.useFont&&e.fontFamily&&t.push(` font-family: ${e.fontFamily} !important;`),e.textStroke>0&&(t.push(` -webkit-text-stroke: ${e.textStroke}px !important;`),t.push(` text-stroke: ${e.textStroke}px !important;`)),t.push("}"),t.join("\n")}(xo):n.textContent="",document.head.insertBefore(n,e.nextSibling),Do(n,"text");const r=Vo("darkreader--invert");Ro&&Array.isArray(Ro.invert)&&Ro.invert.length>0?r.textContent=[`${Ro.invert.join(", ")} {`,` filter: ${ne({...xo,contrast:0===xo.mode?xo.contrast:J(xo.contrast-10,0,100)})} !important;`,"}"].join("\n"):r.textContent="",document.head.insertBefore(r,n.nextSibling),Do(r,"invert");const o=Vo("darkreader--inline");o.textContent=Tr(),document.head.insertBefore(o,r.nextSibling),Do(o,"inline");const s=Vo("darkreader--override");s.textContent=Ro&&Ro.css?Wo(Ro.css):"",document.head.appendChild(s),Do(s,"override");const a=Vo("darkreader--variables"),i=xo?.selectionColor?Ln(xo):null,c=yn(ce("#ffffff"),xo),l=En(ce("#000000"),xo);a.textContent=[":root {",` --darkreader-neutral-background: ${c};`,` --darkreader-neutral-text: ${l};`,` --darkreader-selection-background: ${i?.backgroundColorSelection??"initial"};`,` --darkreader-selection-text: ${i?.foregroundColorSelection??"initial"};`,"}"].join("\n"),document.head.insertBefore(a,o.nextSibling),Do(a,"variables",(()=>rn(a.sheet))),rn(a.sheet);const u=Vo("darkreader--root-vars");document.head.insertBefore(u,a.nextSibling);const d=!(Ro&&Ro.disableStyleSheetsProxy),h=!(Ro&&Ro.disableCustomElementRegistryProxy);document.dispatchEvent(new CustomEvent("__darkreader__cleanUp"));{const e=function(e,t=document.head||document){let n=t.querySelector(`.${e}`);return n||(n=document.createElement("script"),n.classList.add("darkreader"),n.classList.add(e)),n}("darkreader--proxy");e.append(`(${so})(${d}, ${h})`),document.head.insertBefore(e,u.nextSibling),e.remove()}}const Oo=new Set;function No(e){const t=Vo("darkreader--inline",e);t.textContent=Tr(),e.insertBefore(t,e.firstChild);const n=Vo("darkreader--override",e);n.textContent=Ro&&Ro.css?Wo(Ro.css):"",e.insertBefore(n,t.nextSibling);const r=Vo("darkreader--invert",e);Ro&&Array.isArray(Ro.invert)&&Ro.invert.length>0?r.textContent=[`${Ro.invert.join(", ")} {`,` filter: ${ne({...xo,contrast:0===xo.mode?xo.contrast:J(xo.contrast-10,0,100)})} !important;`,"}"].join("\n"):r.textContent="",e.insertBefore(r,n.nextSibling),Oo.add(e)}function Fo(e){const t=null===e.firstChild;No(e),t&&function(e){new MutationObserver(((t,n)=>{n.disconnect();for(const{type:n,removedNodes:r}of t)if("childList"===n)for(const{nodeName:t,className:n}of r)if("STYLE"===t&&["darkreader darkreader--inline","darkreader darkreader--override","darkreader darkreader--invert"].includes(n))return void No(e)})).observe(e,{childList:!0})}(e)}function Wo(e){return e.replace(/\${(.+?)}/g,((e,t)=>{const n=ce(t);if(n){return $e(n.r,n.g,n.b)>.5?yn(n,xo):En(n,xo)}return t}))}function Io(){const e=Mo.get("darkreader--fallback")||document.querySelector(".darkreader--fallback");e&&(e.textContent="")}function Bo(){zo();const e=Jr(document).filter((e=>!_o.has(e))).map((e=>Uo(e)));e.map((e=>e.details({secondRound:!1}))).filter((e=>e&&e.rules.length>0)).forEach((e=>{Kn.addRulesForMatching(e.rules)})),Kn.matchVariablesAndDependents(),Kn.setOnRootVariableChange((()=>{const e=Vo("darkreader--root-vars");Kn.putRootVars(e,xo)}));const t=Vo("darkreader--root-vars");Kn.putRootVars(t,xo),_o.forEach((e=>e.render(xo,Ao))),0===qo.size&&Io(),e.forEach((e=>e.watch()));const n=function(e){const t=[];for(let n=0,r=e.length;n{Fo(e.shadowRoot);const t=e.shadowRoot.querySelectorAll(Ar);t.length>0&&K(n,t)})),n.forEach((e=>Wr(e,xo,To,Ao))),Jo(document),Kn.matchVariablesAndDependents(),m){const e=e=>{const{sheets:t}=e.detail;if(!Array.isArray(t)||0===t.length)return;t.forEach((({sheet:e})=>{const{cssRules:t}=e;Kn.addRulesForMatching(t)})),Kn.matchVariablesAndDependents();const n=[];var r,o;t.forEach((({sheetId:e,sheet:t})=>{const r=function(e){let t=vo.get(e);t||(t=function(){let e=!1;const t=new Er;return{render:function(n){yr().modifySheet({prepareSheet:()=>(t.replaceSync(""),t),sourceCSSRules:n.cssRules,theme:n.theme,ignoreImageAnalysis:n.ignoreImageAnalysis,force:!1,isAsyncCancelled:()=>e})},destroy:function(){e=!0},commands:function(){const e=t.getDeepCSSCommands();return t.clearDeepCSSCommands(),e}}}(),vo.set(e,t));return t}(t),o=t.cssRules;r.render({theme:xo,ignoreImageAnalysis:Ao,cssRules:o});const s=r.commands();n.push({sheetId:e,commands:s})})),r=function(e){if(Co.has(e))return Co.get(e);const t=Symbol();return Co.set(e,t),t}(t[0].sheet),o=()=>{document.dispatchEvent(new CustomEvent("__darkreader__adoptedStyleSheetCommands",{detail:JSON.stringify(n)}))},Le.has(r)||(Le.add(r),requestAnimationFrame((()=>{Le.delete(r),o()})))};document.addEventListener("__darkreader__adoptedStyleSheetsChange",e),as.push((()=>document.removeEventListener("__darkreader__adoptedStyleSheetsChange",e))),document.dispatchEvent(new CustomEvent("__darkreader__startAdoptedStyleSheetsWatcher"))}}let jo=0;const qo=new Set;function Uo(e){const t=++jo;const n=no(e,{update:function(){const e=n.details({secondRound:!0});e&&(Kn.addRulesForMatching(e.rules),Kn.matchVariablesAndDependents(),n.render(xo,Ao))},loadingStart:function(){if(!He()||!Ie()){qo.add(t),qo.size;const e=Vo("darkreader--fallback");e.textContent||(e.textContent=Dn(xo,{strict:!1}))}},loadingEnd:function(){qo.delete(t),qo.size,0===qo.size&&He()&&Io()}});return _o.set(e,n),n}function Ho(e){const t=_o.get(e);t&&(t.destroy(),_o.delete(e))}const Go=Ve((e=>{_o.forEach((e=>e.render(xo,Ao))),Eo.forEach((e=>e.render(xo,Ao))),e&&e()})),zo=function(){Go.cancel()};function Qo(){0!==qo.size||Io()}function Ko(){Bo(),ko(Array.from(_o.keys()),(({created:e,updated:t,removed:n,moved:r})=>{const o=n,s=e.concat(t).concat(r).filter((e=>!_o.has(e))),a=r.filter((e=>_o.has(e)));o.forEach((e=>Ho(e)));const i=s.map((e=>Uo(e)));i.map((e=>e.details({secondRound:!1}))).filter((e=>e&&e.rules.length>0)).forEach((e=>{Kn.addRulesForMatching(e.rules)})),Kn.matchVariablesAndDependents(),i.forEach((e=>e.render(xo,Ao))),i.forEach((e=>e.watch())),a.forEach((e=>_o.get(e).restore()))}),(e=>{Fo(e),Jo(e)})),function(e,t){Lr(document,e,t),Ue(document.documentElement,(n=>{Lr(n.shadowRoot,e,t)}))}((e=>{if(Wr(e,xo,To,Ao),e===document.documentElement&&(e.getAttribute("style")||"").includes("--")){Kn.matchVariablesAndDependents();const e=Vo("darkreader--root-vars");Kn.putRootVars(e,xo)}}),(e=>{Fo(e);const t=e.querySelectorAll(Ar);t.length>0&&Q(t,(e=>Wr(e,xo,To,Ao)))})),ze(Qo)}function Yo(){Po(),Ie()||xo.immediateModify?Ko():Fe(Ko),function(e){const t=document.querySelector(Br);t?Ur(t,e):(qr&&qr.disconnect(),qr=new MutationObserver((t=>{e:for(let n=0;n{Kn.addRulesForMatching(e.cssRules)}));const t=_r(e);Eo.push(t),t.render(xo,Ao),t.watch((e=>{e.forEach((e=>{Kn.addRulesForMatching(e.cssRules)})),Kn.matchVariablesAndDependents(),t.render(xo,Ao)}))}}function Xo(){_o.forEach((e=>e.pause())),Q(Lo.values(),(e=>e.stop())),Lo.clear(),wo(),Mr.forEach((e=>e.disconnect())),Vr.forEach((e=>e.disconnect())),Mr.clear(),Vr.clear(),Qe(Qo),Ye.clear()}let Zo,es=null;function ts(){const e=document.querySelector('meta[name="darkreader"]');return e?e.content!==So:(function(){const e=document.createElement("meta");e.name="darkreader",e.content=So,document.head.appendChild(e)}(),Zo=new MutationObserver((()=>{document.querySelector('meta[name="darkreader-lock"]')&&(Zo.disconnect(),is())})),Zo.observe(document.head,{childList:!0,subtree:!0}),!1)}let ns=2;let rs=null,os=null;function ss(e,t,n){xo=e,Ro=t;const r=["brightness","contrast","darkSchemeBackgroundColor","darkSchemeTextColor","grayscale","lightSchemeBackgroundColor","lightSchemeTextColor","sepia"];if(rs&&os){const e=new Set([...Object.keys(xo),...Object.keys(rs)]);let t=!0;for(const n of e)if(xo[n]!==rs[n]&&!r.includes(n)){t=!1;break}if(t&&JSON.stringify(Ro)!==JSON.stringify(os)&&(t=!1),t){const e=function(){const e=[],t=[],n=[];return nn.forEach((r=>{r.background&&e.push(r.parsed),r.border&&t.push(r.parsed),r.text&&n.push(r.parsed)})),{background:e,border:t,text:n}}();return sn(),e.background.forEach((e=>yn(e,xo))),e.text.forEach((e=>En(e,xo))),void e.border.forEach((e=>xn(e,xo)))}sn()}Ro?(Ao=Array.isArray(Ro.ignoreImageAnalysis)?Ro.ignoreImageAnalysis:[],To=Array.isArray(Ro.ignoreInlineStyle)?Ro.ignoreInlineStyle:[]):(Ao=[],To=[]),xo.immediateModify&&(He=()=>!0),$o=n;const o=()=>{const e=()=>{!function(){if(document.documentElement.hasAttribute("data-wp-dark-mode-preset")){const e=()=>{document.dispatchEvent(new CustomEvent("__darkreader__disableConflictingPlugins")),document.documentElement.classList.remove("wp-dark-mode-active"),document.documentElement.removeAttribute("data-wp-dark-mode-active")};e(),new MutationObserver((()=>{(document.documentElement.classList.contains("wp-dark-mode-active")||document.documentElement.hasAttribute("data-wp-dark-mode-active"))&&e()})).observe(document.documentElement,{attributes:!0,attributeFilter:["class","data-wp-dark-mode-active"]})}}(),document.documentElement.setAttribute("data-darkreader-mode","dynamic"),document.documentElement.setAttribute("data-darkreader-scheme",xo.mode?"dark":"dimmed"),Yo()},t=()=>{is()};null!=document.querySelector('meta[name="darkreader-lock"]')?je(document.querySelector(".darkreader--fallback")):ts()?function({success:e,failure:t}){if(--ns<=0)return void t();const n=document.head.querySelector('meta[name="darkreader"]');if(!n||n.content===So)return;const r=document.createElement("meta");r.name="darkreader-lock",document.head.append(r),queueMicrotask((()=>{r.remove(),e()}))}({success:e,failure:t}):e()};if(document.head)o();else{if(!m){const e=Vo("darkreader--fallback");document.documentElement.appendChild(e),e.textContent=Dn(xo,{strict:!0})}es?.disconnect(),es=new MutationObserver((()=>{document.head&&(es?.disconnect(),o())})),as.push((()=>{es?.disconnect(),es=null})),es.observe(document,{childList:!0,subtree:!0})}rs=xo,os=Ro}const as=[];function is(){if(document.documentElement.removeAttribute("data-darkreader-mode"),document.documentElement.removeAttribute("data-darkreader-scheme"),Kn.clear(),q.clear(),We(),zo(),Xo(),Qn(),ae.clear(),ie.clear(),tn=null,sn(),rs=null,os=null,je(document.querySelector(".darkreader--fallback")),document.head){const e=[".darkreader--user-agent",".darkreader--text",".darkreader--invert",".darkreader--inline",".darkreader--override",".darkreader--variables",".darkreader--root-vars",'meta[name="darkreader"]'];!function(){qr&&(qr.disconnect(),qr=null);const e=document.querySelector(Br);e&&jr&&(e.content=jr)}(),e.forEach((e=>je(document.head.querySelector(e)))),Mo.clear(),document.dispatchEvent(new CustomEvent("__darkreader__cleanUp")),je(document.head.querySelector(".darkreader--proxy"))}Oo.forEach((e=>{je(e.querySelector(".darkreader--inline")),je(e.querySelector(".darkreader--override"))})),Oo.clear(),Q(_o.keys(),(e=>Ho(e))),qo.clear(),to.clear(),Q(document.querySelectorAll(".darkreader"),je),Eo.forEach((e=>e.destroy())),Eo.splice(0),vo.forEach((e=>e.destroy())),vo.clear(),Zo&&Zo.disconnect(),as.forEach((e=>e())),as.splice(0)}function cs(e){if(!(e=(e=Gr(e)).trim()))return[];const t=[],n=us(e),r=ls(e,"{","}",n);let o=0;return r.forEach((n=>{const r=e.substring(o,n.start).trim(),s=e.substring(n.start+1,n.end-1);if(r.startsWith("@")){const e=r.search(/[\s\(]/),n={type:e<0?r:r.substring(0,e),query:e<0?"":r.substring(e).trim(),rules:cs(s)};t.push(n)}else{const e={selectors:ds(r),declarations:hs(s)};t.push(e)}o=n.end})),t}function ls(e,t,n,r=[]){const o=[];let s,a=0;for(;s=W(e,a,t,n,r);)o.push(s),a=s.end;return o}function us(e){const t=e.indexOf("'"){const n=e.indexOf(":");if(n>0){const r=e.indexOf("!important");t.push({property:e.substring(0,n).trim(),value:e.substring(n+1,r>0?r:e.length).trim(),important:r>0})}})),t}function fs(e){return"selectors"in e}function ms(e){return function(e){const t=[],n=" ";function r(e,t){fs(e)?s(e,t):o(e,t)}function o({type:e,query:o,rules:s},a){t.push(`${a}${e} ${o} {`),s.forEach((e=>r(e,`${a}${n}`))),t.push(`${a}}`)}function s({selectors:e,declarations:r},o){const s=e.length-1;e.forEach(((e,n)=>{t.push(`${o}${e}${n{const r=e.property,o=n.property,s=r.match(t)?.[0]??"",a=o.match(t)?.[0]??"",i=s?r.replace(t,""):r,c=a?o.replace(t,""):o;return i===c?s.localeCompare(a):i.localeCompare(c)}))}(r);a.forEach((({property:e,value:r,important:s})=>{t.push(`${o}${n}${e}: ${r}${s?" !important":""};`)})),t.push(`${o}}`)}return ps(e),e.forEach((e=>r(e,""))),t.join("\n")}(cs(e))}function ps(e){for(let t=e.length-1;t>=0;t--){const n=e[t];fs(n)?0===n.declarations.length&&e.splice(t,1):(ps(n.rules),0===n.rules.length&&e.splice(t,1))}}const gs=/url\(\"(blob\:.*?)\"\)/g;async function bs(){const e=['/*\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 t(t,n){const r=document.querySelector(t);r&&r.textContent&&(e.push(`/* ${n} */`),e.push(r.textContent),e.push(""))}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");const n=[];if(document.querySelectorAll(".darkreader--sync").forEach((e=>{Q(e.sheet.cssRules,(e=>{e&&e.cssText&&n.push(e.cssText)}))})),n.length){const t=ms(n.join("\n"));e.push("/* Modified CSS */"),e.push(await async function(e){const t=[];O(gs,e,1).forEach((e=>{const n=v(e);t.push(n)}));const n=await Promise.all(t);return e.replace(gs,(()=>`url("${n.shift()}")`))}(t)),e.push("")}return t(".darkreader--override","Override Style"),e.join("\n")}let ys=!1;const ks=(()=>{try{return window.self!==window.top}catch(e){return console.warn(e),!0}})();function ws(e={},t=null){const n={...P,...e};if(n.engine!==M.dynamicTheme)throw new Error("Theme engine is not supported.");ss(n,t,ks),ys=!0}function Ss(){is(),ys=!1}const _s="function"==typeof matchMedia?matchMedia("(prefers-color-scheme: dark)"):void 0;let Es={themeOptions:null,fixes:null};function vs(){_s?.matches?ws(Es.themeOptions,Es.fixes):Ss()}const Cs=function(e){R=e||x};e.auto=function(e={},t=null){e?(Es={themeOptions:e,fixes:t},vs(),k?_s?.addEventListener("change",vs):_s?.addListener(vs)):(k?_s?.removeEventListener("change",vs):_s?.removeListener(vs),Ss())},e.disable=Ss,e.enable=ws,e.exportGeneratedCSS=async function(){return await bs()},e.isEnabled=function(){return ys},e.setFetchMethod=Cs,Object.defineProperty(e,"__esModule",{value:!0})})); +//# sourceMappingURL=/sm/e8b7f7398a54eaa0bb0e60d115f83910b228f6ef4927a6157ee542b0e32fe9c7.map diff --git a/oioioi/base/static/scss/_footer.scss b/oioioi/base/static/scss/_footer.scss index 5a8af0a91..a94a168a1 100644 --- a/oioioi/base/static/scss/_footer.scss +++ b/oioioi/base/static/scss/_footer.scss @@ -19,3 +19,47 @@ body { height: $oioioi-footer-height; justify-content: center; } + +.footer-content { + position: absolute; + left: 50%; + transform: translateX(-50%); +} + +#dark-mode-toggle { + margin-left: auto; + position: relative; + appearance: none; + -webkit-appearance: none; + -moz-appearance: none; + width: 60px; + height: 30px; + border-radius: 30px; + background-color: #a8adad; + transition: all 0.5s ease-in; + cursor: pointer; + z-index: 1; +} + +#dark-mode-toggle::before { + content: ""; + width: 25px; + height: 25px; + border-radius: 50%; + background: #EEE; + position: absolute; + top: 50%; + left: 3px; + transform: translateY(-50%); + transition: all 0.5s ease-in; +} + +#dark-mode-toggle:checked { + background: #a8adad; +} + +#dark-mode-toggle:checked::before { + background: #333; + left: 32px; +} + diff --git a/oioioi/base/templates/base.html b/oioioi/base/templates/base.html index 01acbb34c..695bfba33 100644 --- a/oioioi/base/templates/base.html +++ b/oioioi/base/templates/base.html @@ -140,5 +140,27 @@ src="{{ mathjax_location }}MathJax.js?config=TeX-AMS-MML_HTMLorMML"> {% endblock %} + + + + diff --git a/oioioi/base/templates/ingredients/footer.html b/oioioi/base/templates/ingredients/footer.html index f424b836e..9591a4e71 100644 --- a/oioioi/base/templates/ingredients/footer.html +++ b/oioioi/base/templates/ingredients/footer.html @@ -1,15 +1,20 @@ {% load i18n all_with_prefix %} + +