// source --> https://alexi.cz/wp-content/plugins/easy-login-addon-security/assets/xoo-sel-js.js?ver=1.2.3 
window.xooElRecaptchaCallback = function(){
	window.xooElNotExecuted = 1;
}

jQuery(document).ready(function($){

	var recaptchaBy = xoo_sel_localize.recaptchaBy;


	function setFormResponseToken( $el, token ){
		if( !$el.closest('form').find('input[name="g-recaptcha-response"]').length ){
			$('<input name="g-recaptcha-response">').insertBefore($el);
		}
		var $responseInput = $el.siblings('input[name="g-recaptcha-response"]');
		$responseInput.val(token);
	}

	if( xoo_sel_localize.grForms.length ){
		
		//Load recaptcha
		window.xooElRecaptchaCallback = function(){

			$('.xoo-el-recaptcha').each( function (index, $el ){

				if( recaptchaBy === 'google' && xoo_sel_localize.recaptcha.grVersion === 'v2' ){
					grecaptcha.render( $el, xoo_sel_localize.recaptcha );
				}
				else if( recaptchaBy === 'cloudflare' ){
					turnstile.render( $el, xoo_sel_localize.recaptcha );
				}
				else if( recaptchaBy === 'friendly' ){
					new friendlyChallenge.WidgetInstance( $el, xoo_sel_localize.recaptcha );
				}

			})
		}

	
		if( window.xooElNotExecuted || recaptchaBy === 'friendly' ){
			window.xooElRecaptchaCallback();
		}
	}


	var captchaVerified = false;

	$('.xoo-el-form-container').on( 'submit', '.xoo-el-action-form', function(e){

		if( xoo_sel_localize.recaptcha.grVersion !== 'v3' || captchaVerified || !xoo_sel_localize.grForms.length || !xoo_sel_localize.grForms.includes( $(this).find('input[name="_xoo_el_form"]').val() ) ){
			return;
		}

		var $form = $(this);

		e.preventDefault();
		e.stopImmediatePropagation();

		$form.find('button[type="submit"]').addClass('xoo-el-processing');

        grecaptcha.ready( function(){
			grecaptcha.execute( xoo_sel_localize.recaptcha.sitekey, {action: 'xoo_sel_recaptcha_submit'} ).then( function(token) {
				captchaVerified = true;
			 	$form.prepend('<input type="hidden" name="g-recaptcha-response" value="' + token + '">');
                $form.submit();
			} );
        });

	} );
});
// source --> https://alexi.cz/wp-content/plugins/darkify-pro/src/assets/js/client_main.min.js?ver=1.5.4 
let has_process_run_at_least_once=!1,old_transition="",has_background_img_url=!1,darkify_disallowed_low_brightness_images_arr=0<darkify_disallowed_low_brightness_images.trim().length?darkify_disallowed_low_brightness_images.split(","):[],darkify_disallowed_grayscale_images_arr=0<darkify_disallowed_grayscale_images.trim().length?darkify_disallowed_grayscale_images.split(","):[],darken_level=parseInt(darkify_bg_image_darken_to)/100;function darkify_strip_pseudo_elements(e){return e&&e.split(",").map(e=>e.trim()).filter(e=>!/:{1,2}(?:before|after|first-line|first-letter|placeholder|selection|marker|backdrop|spelling-error|grammar-error|cue|file-selector-button|part|slotted)\b/.test(e)).join(", ")}function darkify_safe_matches(e,t){t=darkify_strip_pseudo_elements(t);if(!t)return!1;try{return e.matches(t)}catch(e){return!1}}darken_level=darken_level.toFixed(1);let DARKIFY_PSEUDO_RE=/^([\s\S]+?):{1,2}(before|after|first-line|first-letter|placeholder|selection|marker|backdrop)$/i;function darkify_parse_pseudo_selectors(e){return e?e.split(",").map(e=>e.trim()).map(e=>{e=e.match(DARKIFY_PSEUDO_RE);return e?{base:e[1].trim(),pseudo:e[2].toLowerCase()}:null}).filter(Boolean):[]}let darkify_disallowed_pseudo_selectors=darkify_parse_pseudo_selectors("undefined"!=typeof darkify_disallowed_elements_raw?darkify_disallowed_elements_raw:""),darkify_allowed_pseudo_selectors=darkify_parse_pseudo_selectors("undefined"!=typeof darkify_allowed_elements_raw?darkify_allowed_elements_raw:""),darkify_allowed_elements_dom_safe="undefined"!=typeof darkify_allowed_elements?darkify_strip_pseudo_elements(darkify_allowed_elements):"",darkify_disallowed_elements_dom_safe="undefined"!=typeof darkify_disallowed_elements?darkify_strip_pseudo_elements(darkify_disallowed_elements):"",darkify_invert_images_allowed_urls_arr=darkify_invert_images_allowed_urls?JSON.parse(darkify_invert_images_allowed_urls.replaceAll("&amp;","&").replaceAll("&quot;",'"')):[],darkify_image_replacements_arr=darkify_image_replacements?JSON.parse(darkify_image_replacements.replaceAll("&amp;","&").replaceAll("&quot;",'"')):[],darkify_video_replacements_arr=darkify_video_replacements?JSON.parse(darkify_video_replacements.replaceAll("&amp;","&").replaceAll("&quot;",'"')):[],darkify_secondary_bg_color="",darkify_observer=(darkify_init_keyboard_shortcut_listener(),darkify_init_os_mode_change_listener(),new MutationObserver(function(e){darkify_init_processes(),darkify_process_iframes()})),elements_class_changed=new MutationObserver(e=>{"loading"!==document.readyState&&e.forEach(e=>{e=e.target;if(e.classList.contains("darkify_processed")){if(e.hasAttribute("data-darkify_preserved_classes")){if(e.dataset.darkify_preserved_classes===e.classList.toString())return}else e.dataset.darkify_preserved_classes=e.classList.toString();e.dataset.darkify_preserved_classes=e.classList.toString(),elements_class_changed.disconnect(),e.classList.remove("darkify_processed"),darkify_process_element(e),document.querySelectorAll("*:not(head, title, link, meta, script, style, defs, filter)").forEach(e=>{elements_class_changed.observe(e,{attributes:!0,attributeFilter:["class"]})})}})}),dark_mode_status_changed=new MutationObserver(e=>{e.forEach(e=>{"attributes"===e.type&&"class"===e.attributeName&&document.querySelectorAll("*:not(head, title, link, meta, script, style, defs, filter)").forEach(e=>{var t;e.classList.contains("darkify_processed")&&(0<darkify_allowed_elements_raw.length&&darkify_safe_matches(e,darkify_allowed_elements_raw)&&"1"===darkify_allowed_elements_force_to_correct&&darkify_elements_force_to_correct(e),0<darkify_disallowed_elements_raw.length&&darkify_safe_matches(e,darkify_disallowed_elements_raw)&&"1"===darkify_disallowed_elements_force_to_correct&&darkify_elements_force_to_correct(e),0<darkify_allowed_elements_dom_safe.length&&!darkify_safe_matches(e,darkify_allowed_elements)||0<darkify_disallowed_elements_dom_safe.length&&darkify_safe_matches(e,darkify_disallowed_elements)||(0<darkify_image_replacements_arr.length&&darkify_replace_image(e,darkify_image_replacements_arr),"1"===darkify_enable_bg_image_darken&&darkify_darken_bg_image(e,darken_level),"1"!==darkify_enable_low_image_brightness&&"1"!==darkify_enable_image_grayscale||"img"!==e.nodeName.toLowerCase()||darkify_img_brightness_and_grayscale(e),"1"===darkify_enable_invert_images&&0<darkify_invert_images_allowed_urls_arr.length&&darkify_invert_image(e),"1"===darkify_enable_invert_inline_svg&&"svg"===e.nodeName.toLowerCase()&&darkify_invert_inline_svg(e),"1"!==darkify_enable_low_video_brightness&&"1"!==darkify_enable_video_grayscale||("video"===e.nodeName.toLowerCase()&&darkify_video_brightness_and_grayscale(e),"iframe"===e.nodeName.toLowerCase()&&null!=e.getAttribute("src")&&((t=e.getAttribute("src")).includes("youtube")||t.includes("vimeo")||t.includes("dailymotion"))&&darkify_video_brightness_and_grayscale(e)),0<darkify_video_replacements_arr.length&&("video"===e.nodeName.toLowerCase()&&darkify_replace_video(e,darkify_video_replacements_arr),"iframe"===e.nodeName.toLowerCase())&&null!=e.getAttribute("src")&&((t=e.getAttribute("src")).includes("youtube")||t.includes("vimeo")||t.includes("dailymotion"))&&darkify_replace_video(e,darkify_video_replacements_arr),e.hasAttribute("data-darkify_alpha_bg")&&darkify_fix_background_color_alpha(e)))})})});function darkify_change_state(){"1"===darkify_is_this_admin_panel?localStorage.darkify_admin_panel_last_state=document.getElementsByTagName("html")[0].classList.contains("darkify_dark_mode_enabled")?"1":"0":localStorage.darkify_last_state=document.getElementsByTagName("html")[0].classList.contains("darkify_dark_mode_enabled")?"1":"0"}function darkify_switch_trigger(){has_process_run_at_least_once||(darkify_init_processes(),darkify_init_observer());var e=document.getElementsByTagName("html")[0];e.classList.contains("darkify_dark_mode_enabled")?e.classList.remove("darkify_dark_mode_enabled"):e.classList.add("darkify_dark_mode_enabled"),darkify_change_state(),darkify_process_iframes()}function darkify_theme_select(e){if(darkify_is_block_editor_context()){has_process_run_at_least_once||(darkify_init_processes(),darkify_init_observer());let t=document.documentElement;t.classList.forEach(e=>{e.startsWith("darkify-")&&t.classList.remove(e)}),darkify_update_theme_selectors(localStorage.darkify_selected_theme=e),"1"===darkify_is_this_admin_panel&&("1"===localStorage.darkify_admin_panel_last_state?(t.classList.add("darkify_dark_mode_enabled"),t.classList.add("darkify-"+e)):t.classList.remove("darkify_dark_mode_enabled")),darkify_change_state(),darkify_process_iframes(),darkify_apply_palette(e)}}function darkify_update_theme_selectors(t){document.querySelectorAll(".darkify-theme-selector").forEach(function(e){e.value!==t&&(e.value=t)})}function darkify_is_block_editor_context(){return"undefined"!=typeof document&&document.body&&(document.body.classList.contains("block-editor-page")||null!==document.querySelector(".edit-post-visual-editor")||null!==document.querySelector(".block-editor"))}function darkify_restore_selected_theme(){var e;darkify_is_block_editor_context()&&(e=localStorage.darkify_selected_theme)&&(darkify_update_theme_selectors(e),darkify_theme_select(e))}function darkify_apply_palette(e){var t;darkify_is_block_editor_context()&&(e=(t={set1:{bg:"#0F0F0F",secondary_bg:"#171717",text_color:"#BEBEBE",link_color:"#E7E7E7",link_hover_color:"#BEBEBE",input_bg:"#2D2D2D",input_text_color:"#BEBEBE",input_placeholder_color:"#BEBEBE",border_color:"#4A4A4A",btn_text_color:"#BEBEBE",btn_bg:"#4A4A4A",btn_text_hover_color:"#BEBEBE",btn_hover_bg:"#2D2D2D"},set2:{bg:"#092635",secondary_bg:"#081E29",text_color:"#BEE0F1",link_color:"#2B97CD",link_hover_color:"#BEE0F1",input_bg:"#2D2D2D",input_text_color:"#BEE0F1",input_placeholder_color:"#BEE0F1",border_color:"#195979",btn_text_color:"#BEE0F1",btn_bg:"#195979",btn_text_hover_color:"#BEE0F1",btn_hover_bg:"#2D2D2D"},set3:{bg:"#211e3c",secondary_bg:"#302C57",text_color:"#B1BBD8",link_color:"#8071fb",link_hover_color:"#B1BBD8",input_bg:"#2A264D",input_text_color:"#B1BBD8",input_placeholder_color:"#B1BBD8",border_color:"#4E478D",btn_text_color:"#B1BBD8",btn_bg:"#4E478D",btn_text_hover_color:"#B1BBD8",btn_hover_bg:"#2A264D"},set4:{bg:"#1d253a",secondary_bg:"#2B3655",text_color:"#B1BBD8",link_color:"#638eff",link_hover_color:"#B1BBD8",input_bg:"#242F4C",input_text_color:"#B1BBD8",input_placeholder_color:"#B1BBD8",border_color:"#46598C",btn_text_color:"#B1BBD8",btn_bg:"#46598C",btn_text_hover_color:"#B1BBD8",btn_hover_bg:"#303D60"},set5:{bg:"#1b1823",secondary_bg:"#352f44",text_color:"#C6C1D5",link_color:"#b094ff",link_hover_color:"#C6C1D5",input_bg:"#403953",input_text_color:"#C6C1D5",input_placeholder_color:"#C6C1D5",border_color:"#54496f",btn_text_color:"#C6C1D5",btn_bg:"#54496f",btn_text_hover_color:"#C6C1D5",btn_hover_bg:"#403953"},set6:{bg:"#082032",secondary_bg:"#061825",text_color:"#B5D9F3",link_color:"#61bbff",link_hover_color:"#B5D9F3",input_bg:"#0E3755",input_text_color:"#B5D9F3",input_placeholder_color:"#B5D9F3",border_color:"#144E78",btn_text_color:"#B5D9F3",btn_bg:"#144E78",btn_text_hover_color:"#B5D9F3",btn_hover_bg:"#0E3755"},set7:{bg:"#07161b",secondary_bg:"#0d242e",text_color:"#C5E6F0",link_color:"#33c0ec",link_hover_color:"#C5E6F0",input_bg:"#19495A",input_text_color:"#C5E6F0",input_placeholder_color:"#C5E6F0",border_color:"#286F8D",btn_text_color:"#C5E6F0",btn_bg:"#286F8D",btn_text_hover_color:"#C5E6F0",btn_hover_bg:"#19495A"},set8:{bg:"#15274C",secondary_bg:"#112244",text_color:"#ACC1EA",link_color:"#6197ff",link_hover_color:"#ACC1EA",input_bg:"#1a2f5c",input_text_color:"#ACC1EA",input_placeholder_color:"#ACC1EA",border_color:"#244892",btn_text_color:"#ACC1EA",btn_bg:"#244892",btn_text_hover_color:"#ACC1EA",btn_hover_bg:"#1a2f5c"},set9:{bg:"#04261d",secondary_bg:"#021e16",text_color:"#C1D2BB",link_color:"#00d29a",link_hover_color:"#C1D2BB",input_bg:"#073d2f",input_text_color:"#C1D2BB",input_placeholder_color:"#C1D2BB",border_color:"#095541",btn_text_color:"#C1D2BB",btn_bg:"#095541",btn_text_hover_color:"#C1D2BB",btn_hover_bg:"#073d2f"},set10:{bg:"#171004",secondary_bg:"#211706",text_color:"#E0D2BD",link_color:"#e09525",link_hover_color:"#E0D2BD",input_bg:"#372911",input_text_color:"#E0D2BD",input_placeholder_color:"#E0D2BD",border_color:"#5D4010",btn_text_color:"#E0D2BD",btn_bg:"#5D4010",btn_text_hover_color:"#E0D2BD",btn_hover_bg:"#372911"},set11:{bg:"#19081b",secondary_bg:"#210a24",text_color:"#c09dc2",link_color:"#c832d4",link_hover_color:"#c09dc2",input_bg:"#2c082f",input_text_color:"#c09dc2",input_placeholder_color:"#c09dc2",border_color:"#440649",btn_text_color:"#c09dc2",btn_bg:"#440649",btn_text_hover_color:"#c09dc2",btn_hover_bg:"#2c082f"}})[e]||t.set1,document.documentElement.style.setProperty("--darkify_dark_mode_bg",e.bg),document.documentElement.style.setProperty("--darkify_dark_mode_secondary_bg",e.secondary_bg),document.documentElement.style.setProperty("--darkify_dark_mode_text_color",e.text_color),document.documentElement.style.setProperty("--darkify_dark_mode_link_color",e.link_color),document.documentElement.style.setProperty("--darkify_dark_mode_link_hover_color",e.link_hover_color),document.documentElement.style.setProperty("--darkify_dark_mode_input_bg",e.input_bg),document.documentElement.style.setProperty("--darkify_dark_mode_input_text_color",e.input_text_color),document.documentElement.style.setProperty("--darkify_dark_mode_input_placeholder_color",e.input_placeholder_color),document.documentElement.style.setProperty("--darkify_dark_mode_border_color",e.border_color),document.documentElement.style.setProperty("--darkify_dark_mode_btn_bg",e.btn_bg),document.documentElement.style.setProperty("--darkify_dark_mode_btn_text_color",e.btn_text_color),document.documentElement.style.setProperty("--darkify_dark_mode_btn_hover_bg",e.btn_hover_bg),document.documentElement.style.setProperty("--darkify_dark_mode_btn_text_hover_color",e.btn_text_hover_color))}function darkify_copy_root_vars_to_iframe(e){let t=e.getElementById("darkify-iframe-vars");t||((t=e.createElement("style")).id="darkify-iframe-vars",e.head.appendChild(t));let r=":root {";["--darkify_dark_mode_bg","--darkify_dark_mode_secondary_bg","--darkify_dark_mode_text_color","--darkify_dark_mode_link_color","--darkify_dark_mode_link_hover_color","--darkify_dark_mode_input_bg","--darkify_dark_mode_input_text_color","--darkify_dark_mode_input_placeholder_color","--darkify_dark_mode_border_color","--darkify_dark_mode_btn_bg","--darkify_dark_mode_btn_text_color","--darkify_dark_mode_btn_hover_bg","--darkify_dark_mode_btn_text_hover_color"].forEach(function(e){var t=document.documentElement.style.getPropertyValue(e)||getComputedStyle(document.documentElement).getPropertyValue(e);t&&t.trim()&&(r+=e+": "+t.trim()+";")}),r+="}",t.textContent=r}function darkify_inject_css_into_iframe(e){var t;e.getElementById("darkify-iframe-css")||((t=e.createElement("style")).id="darkify-iframe-css",t.textContent=`
    html.darkify_dark_mode_enabled,
    html.darkify_dark_mode_enabled body {
      background: var(--darkify_dark_mode_secondary_bg) !important;
      color: var(--darkify_dark_mode_text_color) !important;
    }

    html.darkify_dark_mode_enabled a {
      color: var(--darkify_dark_mode_link_color) !important;
    }
    html.darkify_dark_mode_enabled a:hover {
      color: var(--darkify_dark_mode_link_hover_color) !important;
    }

    html.darkify_dark_mode_enabled input,
    html.darkify_dark_mode_enabled select,
    html.darkify_dark_mode_enabled textarea {
      background: var(--darkify_dark_mode_input_bg) !important;
      color: var(--darkify_dark_mode_input_text_color) !important;
      border-color: var(--darkify_dark_mode_border_color) !important;
    }

    html.darkify_dark_mode_enabled input::placeholder,
    html.darkify_dark_mode_enabled textarea::placeholder {
      color: var(--darkify_dark_mode_input_placeholder_color) !important;
    }

    /* TinyMCE editor body */
    html.darkify_dark_mode_enabled body#tinymce,
    html.darkify_dark_mode_enabled .mce-content-body {
      background: var(--darkify_dark_mode_secondary_bg) !important;
      color: var(--darkify_dark_mode_text_color) !important;
    }
  `,e.head.appendChild(t))}function darkify_apply_dark_to_iframe(t){var e="editor-canvas"===t.name;if("1"!==darkify_is_this_admin_panel||e){e=function(){try{var e=t.contentDocument||t.contentWindow?.document;e&&e.head&&(document.documentElement.classList.contains("darkify_dark_mode_enabled")?(e.documentElement.classList.add("darkify_dark_mode_enabled"),darkify_copy_root_vars_to_iframe(e),darkify_inject_css_into_iframe(e)):e.documentElement.classList.remove("darkify_dark_mode_enabled"))}catch(e){}};try{var r=t.contentDocument||t.contentWindow?.document;r&&"complete"===r.readyState&&r.head?e():t.addEventListener("load",e,{once:!0})}catch(e){}}}function darkify_process_iframes(){var e;"1"===darkify_is_this_admin_panel?(e=document.querySelector('iframe[name="editor-canvas"]'))&&darkify_apply_dark_to_iframe(e):document.querySelectorAll("iframe").forEach(darkify_apply_dark_to_iframe)}function darkify_init_keyboard_shortcut_listener(){"1"===darkify_enable_keyboard_shortcut&&(document.onkeydown=function(e){e.ctrlKey&&e.altKey&&68===e.keyCode&&darkify_switch_trigger()})}function darkify_init_os_mode_change_listener(){"0"===darkify_is_this_admin_panel&&"1"===darkify_enable_os_aware&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",e=>{var e=e.matches?"dark":"light",t=document.getElementsByTagName("html")[0];"dark"==e?t.classList.add("darkify_dark_mode_enabled"):"light"==e&&t.classList.remove("darkify_dark_mode_enabled"),darkify_change_state()})}function darkify_init_draggable_floating_switch(){if("1"===darkify_enable_switch_dragging){let o=document.getElementById("darkify_switch_"+darkify_switch_unique_id),t=localStorage.darkify_draggable_switch_top||"not_set",r=localStorage.darkify_draggable_switch_left||"not_set",l=document.documentElement.clientHeight-o.clientHeight,s=document.documentElement.clientWidth-o.clientWidth;"not_set"!==t&&"not_set"!==r&&(o.style.bottom="unset",o.style.right="unset",o.style.top=t+"px",o.style.left=r+"px"),window.addEventListener("resize",e=>{"not_set"!==t&&"not_set"!==r&&(l=document.documentElement.clientHeight-o.clientHeight,s=document.documentElement.clientWidth-o.clientWidth,o.offsetLeft>s&&(o.style.left=s+"px"),o.offsetTop>l)&&(o.style.top=l+"px")}),o.onmousedown=function(e){(e=e||window.event).preventDefault();let t=0,r=0,a,_,d,i;t=e.clientX,r=e.clientY,document.onmouseup=function(){document.onmouseup=null,document.onmousemove=null,localStorage.darkify_draggable_switch_top=o.offsetTop,localStorage.darkify_draggable_switch_left=o.offsetLeft},document.onmousemove=function(e){(e=e||window.event).preventDefault(),a=t-e.clientX,_=r-e.clientY,t=e.clientX,r=e.clientY,d=o.offsetTop-_,i=o.offsetLeft-a,d<=l&&i<=s&&0<=d&&0<=i&&(o.style.bottom="unset",o.style.right="unset",o.style.top=d+"px",o.style.left=i+"px")}}}}function darkify_init_alternative_dark_mode_switch(){if(0<darkify_alternative_dark_mode_switch.length){var t=document.querySelectorAll(darkify_alternative_dark_mode_switch);for(let e=0;e<t.length;e++)t[e].addEventListener("click",()=>{darkify_switch_trigger()})}}function get_bg_color_to_preserve(e,t){let r=window.getComputedStyle(e,null).backgroundColor;return r=("transparent"===(r=t?r:e.dataset.darkify_preserved_bg)||"rgba(0, 0, 0, 0)"===r||"rgba(255,255,255,0)"===r)&&1===e.parentNode?.nodeType||1===e.parentNode?.nodeType&&e.parentNode?.hasAttribute("data-darkify_preserved_bg")&&window.getComputedStyle(e.parentNode,null).backgroundColor===r?get_bg_color_to_preserve(e.parentNode,!1):r}function get_txt_color_to_preserve(e,t){let r=window.getComputedStyle(e,null).color;return r=("transparent"===(r=t?r:e.dataset.darkify_preserved_color)||"rgba(0, 0, 0, 0)"===r||"rgba(255,255,255,0)"===r)&&1===e.parentNode?.nodeType||1===e.parentNode?.nodeType&&e.parentNode?.hasAttribute("data-darkify_preserved_color")&&window.getComputedStyle(e.parentNode,null).color===r?get_txt_color_to_preserve(e.parentNode,!1):r}function darkify_darken_bg_image(t,r){if(document.getElementsByTagName("html")[0].classList.contains("darkify_dark_mode_enabled")){var a=window.getComputedStyle(t,null),_=window.getComputedStyle(t,":before"),d=window.getComputedStyle(t,":after");if("none"!==a.backgroundImage&&a.backgroundImage.includes("url")&&!a.backgroundImage.includes("rgba(0, 0, 0, "+r+")")&&t.style.setProperty("background-image","linear-gradient(rgba(0, 0, 0, "+r+"), rgba(0, 0, 0, "+r+")), "+a.backgroundImage),"none"!==_.backgroundImage&&_.backgroundImage.includes("url")&&!_.backgroundImage.includes("rgba(0, 0, 0, "+r+")")){a="darkify-before-"+Math.random().toString(36).substr(2,9);t.setAttribute("data-darkify-style-id",a);let e=document.getElementById(a);e||((e=document.createElement("style")).id=a,document.head.appendChild(e)),t.dataset.darkifyOriginalBeforeBg=_.backgroundImage;a=`.darkify_dark_mode_enabled [data-darkify-style-id="${a}"]::before {background-image: linear-gradient(rgba(0, 0, 0, ${r}), rgba(0, 0, 0, ${r})), ${_.backgroundImage} !important;}`;e.textContent=a,"static"===window.getComputedStyle(t).position&&(t.style.position="relative")}if("none"!==d.backgroundImage&&d.backgroundImage.includes("url")&&!d.backgroundImage.includes("rgba(0, 0, 0, "+r+")")){_="darkify-after-"+Math.random().toString(36).substr(2,9);t.setAttribute("data-darkify-style-id",_);let e=document.getElementById(_);e||((e=document.createElement("style")).id=_,document.head.appendChild(e)),t.dataset.darkifyOriginalAfterBg=d.backgroundImage;a=`.darkify_dark_mode_enabled [data-darkify-style-id="${_}"]::after {background-image: linear-gradient(rgba(0, 0, 0, ${r}), rgba(0, 0, 0, ${r})), ${d.backgroundImage} !important;}`;e.textContent=a,"static"===window.getComputedStyle(t).position&&(t.style.position="relative")}}else"none"!==window.getComputedStyle(t,null).backgroundImage&&window.getComputedStyle(t,null).backgroundImage.includes("rgba(0, 0, 0, "+r+")")&&t.style.setProperty("background-image",window.getComputedStyle(t,null).backgroundImage.replace("linear-gradient(rgba(0, 0, 0, "+r+"), rgba(0, 0, 0, "+r+")), ",""))}function darkify_img_is_disallowed_for_brightness_and_grayscale(t,e){if("brightness"===e){if(0<darkify_disallowed_low_brightness_images_arr.length)for(let e=0;e<darkify_disallowed_low_brightness_images_arr.length;e++)if(0<darkify_disallowed_low_brightness_images_arr[e].trim().length){var r=darkify_disallowed_low_brightness_images_arr[e],r=new URL(r).pathname;if(null!=t.getAttribute("src")&&t.getAttribute("src").includes(r))return!0;if(null!=t.getAttribute("srcset")&&t.getAttribute("srcset").includes(r))return!0}}else if("grayscale"===e&&0<darkify_disallowed_grayscale_images_arr.length)for(let e=0;e<darkify_disallowed_grayscale_images_arr.length;e++)if(0<darkify_disallowed_grayscale_images_arr[e].trim().length){var a=darkify_disallowed_grayscale_images_arr[e],a=new URL(a).pathname;if(null!=t.getAttribute("src")&&t.getAttribute("src").includes(a))return!0;if(null!=t.getAttribute("srcset")&&t.getAttribute("srcset").includes(a))return!0}return!1}function darkify_img_brightness_and_grayscale(e){var t=darkify_img_is_disallowed_for_brightness_and_grayscale(e,"brightness"),r=darkify_img_is_disallowed_for_brightness_and_grayscale(e,"grayscale");document.getElementsByTagName("html")[0].classList.contains("darkify_dark_mode_enabled")?e.classList.contains("darkify_changed_brightness_and_grayscale")||(e.dataset.darkify_preserved_filter=e.style.filter,e.classList.add("darkify_changed_brightness_and_grayscale"),"1"!==darkify_enable_low_image_brightness||"1"!==darkify_enable_image_grayscale||t||r?"1"!==darkify_enable_low_image_brightness||t?"1"!==darkify_enable_image_grayscale||r||(e.style.filter="grayscale("+darkify_image_grayscale_to+"%)"):e.style.filter="brightness("+darkify_image_brightness_to+"%)":e.style.filter="brightness("+darkify_image_brightness_to+"%) grayscale("+darkify_image_grayscale_to+"%)"):e.classList.contains("darkify_changed_brightness_and_grayscale")&&(e.style.filter=e.dataset.darkify_preserved_filter,e.classList.remove("darkify_changed_brightness_and_grayscale"),delete e.dataset.darkify_preserved_filter)}function darkify_invert_image(t){if(document.getElementsByTagName("html")[0].classList.contains("darkify_dark_mode_enabled")){if(null!=t.getAttribute("src")||null!=t.getAttribute("srcset")||null!=window.getComputedStyle(t,null).backgroundImage)for(let e=0;e<darkify_invert_images_allowed_urls_arr.length;e++){var r=darkify_invert_images_allowed_urls_arr[e];if(r&&0!==r.trim().length){let e;try{e=new URL(r).pathname}catch(e){continue}null!=t.getAttribute("src")&&t.getAttribute("src").includes(e)&&(t.style.filter="invert(1)",t.classList.add("darkify_inverted_image")),null!=t.getAttribute("srcset")&&t.getAttribute("srcset").includes(e)&&(t.style.filter="invert(1)",t.classList.add("darkify_inverted_image")),null!=window.getComputedStyle(t,null).backgroundImage&&window.getComputedStyle(t,null).backgroundImage.includes(e)&&(t.style.filter="invert(1)",t.classList.add("darkify_inverted_image"))}}}else t.classList.contains("darkify_inverted_image")&&(t.style.filter=t.style.filter.replace("invert(1)",""),t.classList.remove("darkify_inverted_image"))}function darkify_replace_image(t,r){if(document.getElementsByTagName("html")[0].classList.contains("darkify_dark_mode_enabled"))for(let e=0;e<r.length;e++){var a=r[e].normal_image,a=new URL(a).pathname,_=r[e].dark_image;new URL(_).pathname;null!=t.getAttribute("src")&&t.getAttribute("src").includes(a)&&(t.src=_,t.classList.add("darkify_replaced_image")),null!=t.getAttribute("srcset")&&t.getAttribute("srcset").includes(a)&&(t.srcset=_,t.classList.add("darkify_replaced_image")),null!=window.getComputedStyle(t,null).backgroundImage&&window.getComputedStyle(t,null).backgroundImage.includes(a)&&(t.style.backgroundImage="url('"+_+"')",t.classList.add("darkify_replaced_image"))}else if(t.classList.contains("darkify_replaced_image"))for(let e=0;e<r.length;e++){var d=r[e].normal_image,i=(new URL(d).pathname,r[e].dark_image),i=new URL(i).pathname;null!=t.getAttribute("src")&&t.getAttribute("src").includes(i)&&(t.src=d,t.classList.remove("darkify_replaced_image")),null!=t.getAttribute("srcset")&&t.getAttribute("srcset").includes(i)&&(t.srcset=d,t.classList.remove("darkify_replaced_image")),null!=window.getComputedStyle(t,null).backgroundImage&&window.getComputedStyle(t,null).backgroundImage.includes(i)&&(t.style.backgroundImage="url('"+d+"')",t.classList.remove("darkify_replaced_image"))}}function darkify_invert_inline_svg(e){document.body.classList.contains("block-editor-page")||(document.getElementsByTagName("html")[0].classList.contains("darkify_dark_mode_enabled")?(e.style.filter="invert(1)",e.classList.add("darkify_inverted_inline_svg")):e.classList.contains("darkify_inverted_inline_svg")&&(e.style.filter=e.style.filter.replace("invert(1)",""),e.classList.remove("darkify_inverted_inline_svg")))}function darkify_video_brightness_and_grayscale(e){document.getElementsByTagName("html")[0].classList.contains("darkify_dark_mode_enabled")?e.classList.contains("darkify_changed_video_brightness_and_grayscale")||(e.dataset.darkify_preserved_filter=e.style.filter,e.classList.add("darkify_changed_video_brightness_and_grayscale"),"1"===darkify_enable_low_video_brightness&&"1"===darkify_enable_video_grayscale?e.style.filter="brightness("+darkify_video_brightness_to+"%) grayscale("+darkify_video_grayscale_to+"%)":"1"===darkify_enable_low_video_brightness?e.style.filter="brightness("+darkify_video_brightness_to+"%)":"1"===darkify_enable_video_grayscale&&(e.style.filter="grayscale("+darkify_video_grayscale_to+"%)")):e.classList.contains("darkify_changed_video_brightness_and_grayscale")&&(e.style.filter=e.dataset.darkify_preserved_filter,e.classList.remove("darkify_changed_video_brightness_and_grayscale"),delete e.dataset.darkify_preserved_filter)}function darkify_replace_video(t,r){if(document.getElementsByTagName("html")[0].classList.contains("darkify_dark_mode_enabled"))for(let e=0;e<r.length;e++){var a=r[e].normal_video,_=new URL(a).pathname,d=r[e].dark_video;new URL(d).pathname;if(null!=t.getAttribute("src")&&t.getAttribute("src").includes(_)&&(t.src=d,t.classList.add("darkify_replaced_video")),null!=t.querySelectorAll("source")){var i=t.querySelectorAll("source");for(let e=0;e<i.length;e++)null!=i[e].getAttribute("src")&&i[e].getAttribute("src").includes(_)&&(i[e].src=d+"?_="+Date.now(),t.classList.add("darkify_replaced_video"),t.load())}}else if(t.classList.contains("darkify_replaced_video"))for(let e=0;e<r.length;e++){var o=r[e].normal_video,l=(new URL(o).pathname,r[e].dark_video),s=new URL(l).pathname;if(null!=t.getAttribute("src")&&t.getAttribute("src").includes(s)&&(t.src=o,t.classList.remove("darkify_replaced_video")),null!=t.querySelectorAll("source")){var n=t.querySelectorAll("source");for(let e=0;e<n.length;e++)null!=n[e].getAttribute("src")&&n[e].getAttribute("src").includes(s)&&(n[e].src=o+"?_="+Date.now(),t.classList.remove("darkify_replaced_video"),t.load())}}}function darkify_fix_background_color_alpha(e){var t,r;document.getElementsByTagName("html")[0].classList.contains("darkify_dark_mode_enabled")?e.hasAttribute("data-darkify_alpha_bg")&&(t=e.dataset.darkify_alpha_bg.replace("rgba(","").replace(")","").split(",")[3].trim(),(r=window.getComputedStyle(e,null).backgroundColor).includes("rgba")||e.style.setProperty("background-color",r.replace(")",", "+t+")").replace("rgb","rgba"))):e.hasAttribute("data-darkify_alpha_bg")&&(e.style.backgroundColor="")}function darkify_elements_force_to_correct(e){document.getElementsByTagName("html")[0].classList.contains("darkify_dark_mode_enabled")&&e.hasAttribute("data-darkify_preserved_bg")&&e.hasAttribute("data-darkify_preserved_color")&&(e.style.setProperty("background-color",e.dataset.darkify_preserved_bg),e.style.setProperty("color",e.dataset.darkify_preserved_color))}function darkify_implement_secondary_bg(){let t=null,r=0;var a=document.querySelectorAll("* :not(head, title, link, meta, script, style, defs, filter)");for(let e=0;e<a.length;e++){var _,d=a[e];d.hasAttribute("data-darkify_secondary_bg_finder")&&"transparent"!==(_=d.dataset.darkify_secondary_bg_finder)&&"rgba(0, 0, 0, 0)"!==_&&(d=(d=d.getBoundingClientRect()).width*d.height)>r&&(r=d,t=_)}for(let e=0;e<a.length;e++){var i=a[e];i.hasAttribute("data-darkify_secondary_bg_finder")&&((i.classList.contains("darkify_style_all")||i.classList.contains("darkify_style_bg_txt")||i.classList.contains("darkify_style_bg_border")||i.classList.contains("darkify_style_bg"))&&t!==i.dataset.darkify_secondary_bg_finder&&i.classList.add("darkify_style_secondary_bg"),delete i.dataset.darkify_secondary_bg_finder)}darkify_secondary_bg_color=t}function darkify_process_pseudo_bg(r){var e=e=>!e||"transparent"===e||"rgba(0, 0, 0, 0)"===e||"rgba(255, 255, 255, 0)"===e,t=t=>!!darkify_disallowed_pseudo_selectors.some(e=>e.pseudo===t&&darkify_safe_matches(r,e.base))||0<darkify_allowed_pseudo_selectors.length&&!darkify_allowed_pseudo_selectors.some(e=>e.pseudo===t&&darkify_safe_matches(r,e.base)),a=window.getComputedStyle(r,"::before").backgroundColor,_=window.getComputedStyle(r,"::after").backgroundColor;e(a)||t("before")?t("before")&&r.removeAttribute("data-darkify-pseudo-before-bg"):r.setAttribute("data-darkify-pseudo-before-bg",a),e(_)||t("after")?t("after")&&r.removeAttribute("data-darkify-pseudo-after-bg"):r.setAttribute("data-darkify-pseudo-after-bg",_)}function darkify_apply_pseudo_bg_styles(){document.querySelectorAll("[data-darkify-pseudo-before-bg], [data-darkify-pseudo-after-bg]").forEach(e=>{var t=e.hasAttribute("data-darkify-pseudo-before-bg"),r=e.hasAttribute("data-darkify-pseudo-after-bg");let a=e.getAttribute("data-darkify-pseudo-bg-id"),_=(a||(a="dkf-"+Math.random().toString(36).substr(2,9),e.setAttribute("data-darkify-pseudo-bg-id",a)),document.getElementById("darkify-pseudo-bg-"+a)),d=(_||((_=document.createElement("style")).id="darkify-pseudo-bg-"+a,document.head.appendChild(_)),"");t&&(t=e.getAttribute("data-darkify-pseudo-before-bg"),t=""!==darkify_secondary_bg_color&&t!==darkify_secondary_bg_color?"--darkify_dark_mode_secondary_bg":"--darkify_dark_mode_bg",d+=`
          .darkify_dark_mode_enabled [data-darkify-pseudo-bg-id="${a}"]::before {
            background: var(${t}) !important;
            background-color: var(${t}) !important;
          }
        `),r&&(t=e.getAttribute("data-darkify-pseudo-after-bg"),r=""!==darkify_secondary_bg_color&&t!==darkify_secondary_bg_color?"--darkify_dark_mode_secondary_bg":"--darkify_dark_mode_bg",d+=`
          .darkify_dark_mode_enabled [data-darkify-pseudo-bg-id="${a}"]::after {
            background: var(${r}) !important;
            background-color: var(${r}) !important;
          }
        `),_.textContent=d})}function darkify_recheck_on_css_loaded_later(){document.querySelectorAll(".darkify_style_txt_border, .darkify_style_txt, .darkify_style_border").forEach(function(e){var t=window.getComputedStyle(e,null).backgroundColor;"rgba(0, 0, 0, 0)"!==t&&"rgba(255, 255, 255, 0)"!==t&&darkify_process_element(e)})}function darkify_check_preloading(){let e=!1;var t,r,a,_=localStorage.darkify_last_state||"not_set";return"1"===darkify_is_this_admin_panel?"1"===(localStorage.darkify_admin_panel_last_state||"not_set")&&(e=!0):"1"===_||"0"===_?"1"===_&&(e=!0):("1"===darkify_enable_default_dark_mode&&(e=!0),"1"===darkify_enable_time_based_dark&&(t=new Date,r=new Date,a=new Date,r.setHours(parseInt(darkify_time_based_dark_start.split(":")[0])),r.setMinutes(parseInt(darkify_time_based_dark_start.split(":")[1])),a.setHours(parseInt(darkify_time_based_dark_stop.split(":")[0])),a.setMinutes(parseInt(darkify_time_based_dark_stop.split(":")[1])),parseInt(darkify_time_based_dark_stop.split(":")[0])>=parseInt(darkify_time_based_dark_start.split(":")[0])?t.getTime()>r.getTime()&&t.getTime()<a.getTime()&&(e=!0):12<t.getHours()?t.getTime()>r.getTime()&&t.getTime()>a.getTime()&&(e=!0):t.getTime()<r.getTime()&&t.getTime()<a.getTime()&&(e=!0))),e="0"===darkify_is_this_admin_panel&&"1"===darkify_enable_os_aware&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches&&"1"!==_&&"0"!==_?!0:e}function darkify_process_element(t){var e,r=window.getComputedStyle(t,null),a=((t.classList.contains("darkify_style_all")||t.classList.contains("darkify_style_bg_txt")||t.classList.contains("darkify_style_bg_border")||t.classList.contains("darkify_style_txt_border")||t.classList.contains("darkify_style_bg")||t.classList.contains("darkify_style_txt")||t.classList.contains("darkify_style_border")||t.classList.contains("darkify_style_secondary_bg"))&&(t.classList.remove("darkify_style_all"),t.classList.remove("darkify_style_bg_txt"),t.classList.remove("darkify_style_bg_border"),t.classList.remove("darkify_style_txt_border"),t.classList.remove("darkify_style_bg"),t.classList.remove("darkify_style_txt"),t.classList.remove("darkify_style_border"),t.classList.remove("darkify_style_secondary_bg")),t.nodeName.toLowerCase()),_=r.backgroundColor,d=r.color,i=r.borderColor,r=r.backgroundImage;"body"!==a||"rgba(0, 0, 0, 0)"!==_&&"rgba(255, 255, 255, 0)"!==_||(t.style.setProperty("background-color","rgb(255, 255, 255)"),_=window.getComputedStyle(t,null).backgroundColor),"1"!==darkify_disallowed_elements_force_to_correct&&"1"!==darkify_allowed_elements_force_to_correct||void 0!==t.style&&(e=get_bg_color_to_preserve(t,!0),t.dataset.darkify_preserved_bg=e="rgba(0, 0, 0, 0)"!==e&&"rgba(255, 255, 255, 0)"!==e?e:"rgb(255, 255, 255)",t.dataset.darkify_preserved_color=get_txt_color_to_preserve(t,!0),0<darkify_allowed_elements_raw.length&&darkify_safe_matches(t,darkify_allowed_elements_raw)&&"1"===darkify_allowed_elements_force_to_correct&&darkify_elements_force_to_correct(t),0<darkify_disallowed_elements_raw.length)&&darkify_safe_matches(t,darkify_disallowed_elements_raw)&&"1"===darkify_disallowed_elements_force_to_correct&&darkify_elements_force_to_correct(t),0<darkify_allowed_elements_dom_safe.length&&!darkify_safe_matches(t,darkify_allowed_elements)?t.classList.add("darkify_processed"):0<darkify_disallowed_elements_dom_safe.length&&darkify_safe_matches(t,darkify_disallowed_elements)||(0<darkify_image_replacements_arr.length&&darkify_replace_image(t,darkify_image_replacements_arr),e=!1,"none"!==r&&r.includes("url")&&(e=!0,"1"===darkify_enable_bg_image_darken)&&darkify_darken_bg_image(t,darken_level),"rgba(0, 0, 0, 0)"===_||"rgba(255, 255, 255, 0)"===_||e||(t.hasAttribute("data-darkify_secondary_bg_finder")||(t.dataset.darkify_secondary_bg_finder=_),""!==darkify_secondary_bg_color&&(darkify_secondary_bg_color!==t.dataset.darkify_secondary_bg_finder&&t.classList.add("darkify_style_secondary_bg"),delete t.dataset.darkify_secondary_bg_finder)),"rgba(0, 0, 0, 0)"!==_&&"rgba(0, 0, 0, 0)"!==d&&"rgba(0, 0, 0, 0)"!==i&&"rgba(255, 255, 255, 0)"!==_&&"rgba(255, 255, 255, 0)"!==d&&"rgba(255, 255, 255, 0)"!==i&&!1===e?t.classList.add("darkify_style_all"):"rgba(0, 0, 0, 0)"!==_&&"rgba(0, 0, 0, 0)"!==d&&"rgba(255, 255, 255, 0)"!==_&&"rgba(255, 255, 255, 0)"!==d&&!1===e?t.classList.add("darkify_style_bg_txt"):"rgba(0, 0, 0, 0)"!==_&&"rgba(0, 0, 0, 0)"!==i&&"rgba(255, 255, 255, 0)"!==_&&"rgba(255, 255, 255, 0)"!==i&&!1===e?t.classList.add("darkify_style_bg_border"):"rgba(0, 0, 0, 0)"!==d&&"rgba(0, 0, 0, 0)"!==i&&"rgba(255, 255, 255, 0)"!==d&&"rgba(255, 255, 255, 0)"!==i?t.classList.add("darkify_style_txt_border"):"rgba(0, 0, 0, 0)"!==_&&"rgba(255, 255, 255, 0)"!==_&&!1===e?t.classList.add("darkify_style_bg"):"rgba(0, 0, 0, 0)"!==d&&"rgba(255, 255, 255, 0)"!==d?t.classList.add("darkify_style_txt"):"rgba(0, 0, 0, 0)"!==i&&"rgba(255, 255, 255, 0)"!==i&&t.classList.add("darkify_style_border"),"none"===r||e||t.classList.contains("darkify_style_all")||t.classList.contains("darkify_style_bg_txt")||t.classList.contains("darkify_style_bg_border")||t.classList.contains("darkify_style_bg")||t.classList.add("darkify_style_secondary_bg"),"a"===a&&t.classList.add("darkify_style_link"),"input"!==a&&"select"!==a&&"textarea"!==a||t.classList.add("darkify_style_form_element"),d=darkify_allowed_btn_class.some(e=>t.classList.contains(e)),"button"!==a&&!d&&"submit"!==t.type||(t.classList.add("darkify_style_button"),t.classList.remove("darkify_style_secondary_bg"),t.classList.remove("darkify_style_all"),t.classList.remove("darkify_style_link")),"1"!==darkify_enable_low_image_brightness&&"1"!==darkify_enable_image_grayscale||"img"!==a||darkify_img_brightness_and_grayscale(t),"1"===darkify_enable_invert_images&&0<darkify_invert_images_allowed_urls_arr.length&&darkify_invert_image(t),"1"===darkify_enable_invert_inline_svg&&"svg"===a&&darkify_invert_inline_svg(t),"1"!==darkify_enable_low_video_brightness&&"1"!==darkify_enable_video_grayscale||("video"===a&&darkify_video_brightness_and_grayscale(t),"iframe"===a&&null!==(i=t.getAttribute("src"))&&(i.includes("youtube")||i.includes("vimeo")||i.includes("dailymotion"))&&darkify_video_brightness_and_grayscale(t)),0<darkify_video_replacements_arr.length&&("video"===a&&darkify_replace_video(t,darkify_video_replacements_arr),"iframe"===a)&&null!==(r=t.getAttribute("src"))&&(r.includes("youtube")||r.includes("vimeo")||r.includes("dailymotion"))&&darkify_replace_video(t,darkify_video_replacements_arr),_.includes("rgba")&&(t.dataset.darkify_alpha_bg=_,darkify_fix_background_color_alpha(t)),darkify_process_pseudo_bg(t),setTimeout(function(){elements_class_changed.observe(t,{attributes:!0,attributeFilter:["class"]})},0),t.classList.add("darkify_processed"))}function darkify_init_processes(){has_process_run_at_least_once=!0,document.querySelectorAll("* :not(head, title, link, meta, script, style, defs, filter, .darkify_processed)").forEach(function(e){darkify_process_element(e)})}function darkify_init_observer(){darkify_observer.observe(document,{attributes:!1,childList:!0,characterData:!1,subtree:!0}),dark_mode_status_changed.observe(document.getElementsByTagName("html")[0],{attributes:!0}),"loading"!==document.readyState?(has_process_run_at_least_once||darkify_init_processes(),darkify_implement_secondary_bg(),darkify_apply_pseudo_bg_styles(),darkify_recheck_on_css_loaded_later(),darkify_restore_selected_theme()):document.addEventListener("DOMContentLoaded",function(){has_process_run_at_least_once||darkify_init_processes(),darkify_implement_secondary_bg(),darkify_apply_pseudo_bg_styles(),darkify_recheck_on_css_loaded_later(),darkify_restore_selected_theme()})}document.addEventListener("DOMContentLoaded",function(){darkify_is_block_editor_context()&&darkify_theme_select(localStorage.getItem("darkify_selected_theme")||"set1")}),darkify_check_preloading()&&(document.getElementsByTagName("html")[0].classList.add("darkify_dark_mode_enabled"),darkify_init_observer(),darkify_process_iframes()),"loading"!==document.readyState?darkify_restore_selected_theme():document.addEventListener("DOMContentLoaded",darkify_restore_selected_theme);