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

function H(t,n){return t?.startsWith?.(n)}const{isArray:b,from:P}=Array;function W(t){return typeof t=="function"}function g(t){return t!==null&&typeof t=="object"}function q(t){return g(t)&&t===t.window}function F(t){return S(t)===9}function E(t){return S(t)>=1}function S(t){return!q(t)&&g(t)&&t.nodeType}function f(t){return typeof t=="string"}function C(t){return t===void 0}function u(t){return t&&l(t)[0]}function l(t){return E(t)?[t]:Array.from(t||[]).filter(E)}function k(t){const n=Object.create(null);return(e,...i)=>n[e]||(n[e]=t(e,...i))}function U(t,n,e){const i=O(n);C(e)||(e=!!e);for(const o of l(t))for(const r of i)o.classList.toggle(r,e)}function O(t){return t?b(t)?t.map(O).flat():String(t).split(" ").filter(Boolean):[]}function y(t,n,e){if(g(n)){for(const i in n)y(t,i,n[i]);return}if(C(e))return u(t)?.getAttribute(n);for(const i of l(t))e===null?I(i,n):i.setAttribute(n,e)}function I(t,n){l(t).forEach(e=>e.removeAttribute(n))}function J(t){return u(t)?.parentElement}function Q(t,n){return l(t).filter(e=>T(e,n))}function T(t,n){return l(t).some(e=>e.matches(n))}function V(t,n){t=u(t);const e=t?P(t.children):[];return n?Q(e,n):e}function A(t,n){return V(J(t)).indexOf(t)}function G(t,n){return u(_(t,u(n),"querySelector"))}function N(t,n){return l(_(t,u(n),"querySelectorAll"))}const K=/([!>+~-])(?=\s+[!>+~-]|\s*$)/g,X=/(\([^)]*\)|[^,])+/g,Z=k(t=>{let n=!1;if(!t||!f(t))return{};const e=[];for(let i of t.match(X))i=i.trim().replace(K,"$1 *"),n||=["!","+","~","-",">"].includes(i[0]),e.push(i);return{selector:e.join(","),selectors:e,isContextSelector:n}}),tt=/(\([^)]*\)|\S)*/,L=k(t=>{t=t.slice(1).trim();const[n]=t.match(tt);return[n,t.slice(n.length+1)]});function _(t,n=document,e){const i=Z(t);if(!i.isContextSelector)return i.selector?x(n,e,i.selector):t;t="";const o=i.selectors.length===1;for(let r of i.selectors){let s,d=n;if(r[0]==="!"&&([s,r]=L(r),d=n.parentElement?.closest(s),!r&&o)||d&&r[0]==="-"&&([s,r]=L(r),d=d.previousElementSibling,d=T(d,s)?d:null,!r&&o))return d;if(d){if(o)return r[0]==="~"||r[0]==="+"?(r=`:scope > :nth-child(${A(d)+1}) ${r}`,d=d.parentElement):r[0]===">"&&(r=`:scope ${r}`),x(d,e,r);t+=`${t?",":""}${nt(d)} ${r}`}}return F(n)||(n=n.ownerDocument),x(n,e,t)}function x(t,n,e){try{return t[n](e)}catch{return null}}function nt(t){const n=[];for(;t.parentNode;){const e=y(t,"id");if(e){n.unshift(`#${et(e)}`);break}else{let{tagName:i}=t;i!=="HTML"&&(i+=`:nth-child(${A(t)+1})`),n.unshift(i),t=t.parentNode}}return n.join(" > ")}function et(t){return f(t)?CSS.escape(t):""}function j(...t){let[n,e,i,o,r=!1]=B(t);o.length>1&&(o=rt(o)),r?.self&&(o=dt(o)),i&&(o=ot(i,o));for(const s of e)for(const d of n)d.addEventListener(s,o,r);return()=>it(n,e,o,r)}function it(...t){let[n,e,,i,o=!1]=B(t);for(const r of e)for(const s of n)s.removeEventListener(r,i,o)}function B(t){return t[0]=at(t[0]),f(t[1])&&(t[1]=t[1].split(" ")),W(t[2])&&t.splice(2,0,!1),t}function ot(t,n){return e=>{const i=t[0]===">"?N(t,e.currentTarget).reverse().find(o=>o.contains(e.target)):e.target.closest(t);i&&(e.current=i,n.call(this,e),delete e.current)}}function rt(t){return n=>b(n.detail)?t(n,...n.detail):t(n)}function dt(t){return function(n){if(n.target===n.currentTarget||n.target===n.current)return t.call(null,n)}}function z(t){return t&&"addEventListener"in t}function st(t){return z(t)?t:u(t)}function at(t){return b(t)?t.map(st).filter(Boolean):f(t)?N(t):z(t)?[t]:l(t)}const lt=v("prepend"),p=v("append"),ct=v("after");function v(t){return function(n,e){const i=l(f(e)?D(e):e);return c(n)?.[t](...i),Y(i)}}const ut=/^<(\w+)\s*\/?>(?:<\/\1>)?$/;function D(t){const n=ut.exec(t);if(n)return document.createElement(n[1]);const e=document.createElement("template");return e.innerHTML=t.trim(),Y(e.content.childNodes)}function Y(t){return t.length>1?t:t[0]}function c(t,n){return ft(t)?u(D(t)):G(t,n)}function ft(t){return f(t)&&H(t.trim(),"<")}var mt=`<svg width="20" height="20" viewBox="0 0 20 20">
    <rect width="13" height="10" fill="none" stroke="#333" x="3.5" y="8.5" />
    <path fill="none" stroke="#333" d="M6.5,8 L6.5,4.88 C6.5,3.01 8.07,1.5 10,1.5 C11.93,1.5 13.5,3.01 13.5,4.88 L13.5,8" />
</svg>
`;function pt(t,n){n===void 0&&(n={});var e=n.insertAt;if(!(typeof document>"u")){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",e==="top"&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}var ht=".tm-editor{align-items:center;background:#fff;border:1px solid #ddd;display:flex;flex-direction:column;height:400px;justify-content:center;margin-bottom:15px;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}.tm-active #editor-xtd-buttons,.tm-active #jform_articletext,.tm-active .CodeMirror,.tm-active .editor-xtd-buttons,.tm-active .label,.tm-active label,.tm-button[hidden],.tm-editor[hidden]{display:none}.tm-modal-builder{padding:0 20px;top:25%}.tm-modal-builder .modal-dialog{margin:0 auto;max-width:600px}.tm-modal-builder .modal-body{padding:20px}.tm-modal-builder .modal-body>:last-child{margin-bottom:0}";pt(ht);const M={},{top:R,Joomla:bt}=window,w=R!==window&&R.location.search.includes("p=customizer");(()=>{const t=new URLSearchParams(window.location.search);if(!t.get("id")&&!t.get("a_id"))return;const{url:n}=window.yootheme.articles??{},e=/<!--\s?{.*?}\s?-->/,i=c("#jform_articletext"),o=c(":is(#general, #adminForm #editor) :is(.editor, .js-editor-tinymce, joomla-editor-none, joomla-editor-codemirror)"),r=i?.value.match(e),s=(o||i)?.parentNode;yt(s,n),n&&!w&&xt("#general #editor-xtd-buttons, #editor #editor-xtd-buttons, #general .editor-xtd-buttons, #editor .editor-xtd-buttons",n,s),d(r),j("body","click",".tm-link",a=>{a.preventDefault(),gt(n)}),j("body","click",".tm-default",a=>{a.preventDefault(),d();const h=i.value.replace(e,"");bt.editors.instances.jform_articletext.setValue(h)});function d(a){o&&(o.hidden=!!a),i.disabled=!!a;const h=c("#articletext_clone");h&&(h.disabled=!a),U(s,"tm-active",!!a);const $=c(".tm-editor");if($&&($.hidden=!a),a){const m=i.cloneNode(!0);y(m,"class",""),ct(i,m),m.id="articletext_clone",m.disabled=!1,m.hidden=!0}}})();function gt(t){M.dialog||=p(c("body"),`<div class="modal fade tm-modal-builder" tabindex="-1" role="dialog">
        <div class="modal-dialog modal-lg" role="document">
            <div class="modal-content">
                <div class="modal-body">
                    <p>${"This article was previously edited in YOOtheme. You can continue in the Default Editor, but you will lose all formatting."}</p>
                </div>
                <div class="modal-footer">
                    <a class="btn btn-primary" href="${t}"${w?" hidden":""}>${"Edit in YOOtheme"}</a>
                    <button class="btn btn-secondary tm-default" type="button" data-dismiss="modal" data-bs-dismiss="modal">${"Continue in Default Editor"}</button>
                </div>
            </div>
        </div>
    </div>`),new window.bootstrap.Modal(M.dialog).show()}function yt(t,n){const e=p(t,'<div class="tm-editor" hidden></div>');n?p(e,`<a href="${n}" class="tm-button"${w?" hidden":""}>${"YOOtheme"}</a>
             <a href class="tm-link">&#8592; ${"Back to Default Editor"}</a>`):p(e,`<span class="tm-button tm-disabled">${mt}<span>${"YOOtheme"}</span></span>`)}function xt(t,n,e){let i=c(t);i||(i=c('<div id="editor-xtd-buttons" class="btn-toolbar pull-left mt-3">'),p(e,i));const o=c(`<a class="btn btn-primary"><span class="icon-star"></span> ${"YOOtheme"}</a>`);o.href=n,lt(i,o)}function vt(t){return t}
