/*! YOOtheme Pro v5.0.29 | https://yootheme.com */

(function(n){"use strict";function s(t,o){o===void 0&&(o={});var l=o.insertAt;if(!(typeof document>"u")){var i=document.head||document.getElementsByTagName("head")[0],e=document.createElement("style");e.type="text/css",l==="top"&&i.firstChild?i.insertBefore(e,i.firstChild):i.appendChild(e),e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}}var c=".tm-editor{align-items:center;background:#fff;border:1px solid #ddd;display:flex;flex-direction:column;height:300px;justify-content:center;margin-top:20px;text-align:center;width:100%}.tm-link{color:#888;display:inline-block;font-size:13px;margin:20px 0 0;text-decoration:none}.tm-button{-webkit-font-smoothing:antialiased;background:linear-gradient(140deg,#fe67d4,#4956e3);border-radius:2px;box-shadow:inset 0 0 1px 0 rgba(0,0,0,.5);box-sizing:border-box;color:#fff!important;display:block;font-size:18px;line-height:10px;max-width:100%;padding:20px 30px;text-align:center;text-decoration:none!important;width:280px}.tm-button.tm-disabled{background:#fafafa;color:#444!important}.tm-button.tm-disabled>*{vertical-align:middle}#page-builder-dialog{display:none}#page-builder-dialog .notification-dialog{background:#fff;box-shadow:0 3px 6px rgba(0,0,0,.3);box-sizing:border-box;left:50%;line-height:1.5;margin:0;max-height:90%;overflow-y:auto;padding:25px;position:fixed;top:50%;transform:translate(-50%,-50%);width:500px;z-index:1000005}@media only screen and (max-height:480px),screen and (max-width:450px){#page-builder-dialog .notification-dialog{height:100%;left:0;max-height:100%;top:0;transform:none;width:100%}}[hidden]{display:none!important}";s(c);function p(t,{button:o,overlay:l},i=document.body){i.insertAdjacentHTML("beforeend",`<div id="page-builder-dialog" class="notification-dialog-wrap">
            <div class="notification-dialog-background"></div>
            <div class="notification-dialog">
                <div class="page-builder-message">
                    <p>${l}</p>
                </div>
                <p>
                    <a class="button button-primary" href="${t}">${"Edit in YOOtheme"}</a>
                    <button class="button" type="button">${o}</button>
                </p>
            </div>
        </div>`);const e=i.lastElementChild;return e.querySelector(".notification-dialog-background").addEventListener("click",()=>e.style.display="none"),e}function f(t){return t}function u(t){return!!t?.match(/<!--\s?{/)}const a=n("#content"),g={overlay:"This post was previously edited in YOOtheme. You can continue in the Classic Editor, but you will lose all formatting.",button:"Continue in Classic Editor"};let d;n(document).on("click",".tm-link",t=>{t.preventDefault(),d??=n(p(n(".tm-button").attr("href"),g)),d.show()}).on("click","#page-builder-dialog button",()=>{a.html(a.html().replace(/&lt;!--\s?{.*?}\s?--&gt;/,"")),d.hide(),r()}),r(u(a.val()));function r(t){n(".tm-editor").attr("hidden",!t),n("#postdivrich").attr("hidden",!!t),n(window).resize()}})(jQuery);
