/*! This minified app bundle contains open source software from several third party developers. Please review CREDITS.md in the root directory or LICENSE.md in the current directory for complete licensing, copyright and patent information. This file and the included code may not be redistributed without the attributions listed in LICENSE.md, including associate copyright notices and licensing information. */!function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(o,i,function(e){return t[e]}.bind(null,i));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=604)}({19:function(t,e){t.exports=jQuery},604:function(t,e,n){(function(t){var e,n,o,i,r=/ \d+vh/,a=/ \d+vh/g;e=t,n=ETBlockLayoutPreview.blockId,o=!1,i={vhStylesArray:[],vhStyles:"",styleId:"et-block-layout-preview-overwrite-vh-style",init:function(){if(!(this.vhStylesArray.length>0)){var t=[],n=function(t){var n=[],o=[];if("string"==typeof t.style.cssText&&e(t.style.cssText.split(";")).each(function(t,e){r.test(e)&&o.push(e.trim()+";")}),o.length>0){var i=t.selectorText+"{"+o.join(" ")+"}";n.push(i)}return n};e(document.styleSheets).each(function(o,i){try{e(i.cssRules).each(function(o,i){if(i.selectorText&&r.test(i.cssText)&&(t=t.concat(n(i))),i.media&&r.test(i.cssText)){var a=[];e(i.cssRules).each(function(t,e){a=a.concat(n(e))}),t=t.concat(["@media "+i.conditionText+" {"+a.join(" ")+"}"])}})}catch(t){}}),this.vhStylesArray=t,this.vhStyles=t.join(" "),e("<style>",{id:this.styleId}).html(this.getStyles()).appendTo("body")}},getStyles:function(){var t=this.vhStyles,n=window.top||window,o=window.top.jQuery(".edit-post-header").outerHeight(),i=(e(n).height()-o)/100;return t.replace(a,function(t){return parseInt(t)*i+"px"})},onEditorWindowResize:function(){e("style#"+i.styleId).html(i.getStyles())}},e(document).ready(function(){e("html").each(function(){"hidden"!==e(this).css("overflow")&&"scroll"!==e(this).css("overflow-y")||e(this).addClass("et-block-layout-force-overflow-auto")});var t=new CustomEvent("ETBlockLayoutPreviewReady",{detail:{blockId:ETBlockLayoutPreview.blockId}});function r(){var t=e("html").height(),i=window.top.jQuery('iframe[name="divi-layout-iframe-'+n+'"]'),r=i.closest('.wp-block[data-type="divi/layout"]');if(r.length<1&&(r=i.closest(".wp-block.is-reusable")),e("#et-boc").parents().addClass("et-pb-layout-preview-ancestor"),e("body").hasClass("et_divi_builder")&&e("#page-container .et-pb-layout-preview-ancestor").each(function(){e(this).width()!==e(this).parent().width()&&e(this).addClass("et-pb-layout-preview-width-correction")}),i.length&&(i.height(t),i.parent().css({lineHeight:1}),o&&i.closest(".et-block").css({height:""})),i.closest(".editor-inserter__menu").length>0){var a=window.top.innerWidth,s=t*(i.parent().width()/a);i.closest(".et-block").height(s)}else{var c="margin: 0 auto !important;",l=e("#page-container .et_pb_section:first").attr("data-box-shadow-offset");l&&(c+=" padding-top: "+l+" !important;");var d=e("#page-container .et_pb_section:last").attr("data-box-shadow-offset");d&&(c+=" padding-bottom: "+d+" !important;");var u="0px"===r.css("paddingRight")?0:28;e("#page-container").css({cssText:c,width:!window.ETBuilderBackend&&r.outerWidth()-u})}}function a(){r(),setTimeout(function(){o=!0,r(),o=!1},1e3)}window.top.document.dispatchEvent(t),a(),e(window).on("resize",et_pb_debounce(function(){a()},350)),i.init();var s=window.et_pb_debounce(i.onEditorWindowResize,500);window.top.addEventListener("resize",s),window.addEventListener("unload",function(){window.top.removeEventListener("resize",s)}),e("body").on("click","a",function(t){var n=e(this).attr("href").substr(0,1);if("#"!==n&&!e(this).is(".et_pb_ajax_pagination_container .wp-pagenavi a,.et_pb_ajax_pagination_container .pagination a"))return t.preventDefault(),""!==n&&(window.top.document.dispatchEvent(new CustomEvent("ETBlockLayoutExternalLinkClick",{detail:{blockId:ETBlockLayoutPreview.blockId}})),!1)}),e("body").on("submit","form",function(t){return t.preventDefault(),window.top.document.dispatchEvent(new CustomEvent("ETBlockLayoutUnwantedFormSubmission",{detail:{blockId:ETBlockLayoutPreview.blockId}})),!1})})}).call(this,n(19))}});
//# sourceMappingURL=block-layout-frontend-preview.js.map