jQuery((function($){var e="layerslider-blank",t=function(){var e=$("#ls-use-blank-template").prop("checked");$("#ls-page-meta-hidden")[e?"show":"hide"]()},a=function(e){$("#ls-use-blank-template").prop("checked",!!e)};wp&&wp.data&&wp.data.subscribe&&wp.data.subscribe((function(){var s=wp.data.select("core/editor")?.getEditedPostAttribute("template");a(s&&s===e),t(),n()})),$("#page_template").on("change",(function(){a($(this).val()===e),t(),n()})),$("#ls-use-blank-template").on("change",(function(){var a=$(this).is(":checked")?e:"";!function(t){wp&&wp.data&&wp.data.dispatch&&wp.data.dispatch("core/editor").editPost({template:t?e:""})}(a),function(t){jQuery("#page_template").children().prop("selected",!1).filter('[value="'+(t?e:"")+'"]').prop("selected",!0)}(a),t(),n()})),$("#ls-page-meta-box #ls-page-background").on("input change",(function(){n()}));var n=function(){var e=$("#ls-page-meta-box #ls-page-background"),t=$(".editor-styles-wrapper"),a=$("#ls-use-blank-template").prop("checked"),n=e.val();n=n&&"transparent"!==n?n:"white",t.length&&(t[a?"addClass":"removeClass"]("ls-use-background"),t[0].style.setProperty("--ls-page-background",n))};setTimeout((function(){n()}),100),setTimeout((function(){n()}),1e3),t()}));