@themarioga/grid-editor 9.2.1 → 9.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/dist/grideditor.bundle.min.js +2 -2
- package/dist/grideditor.esm.js +23 -6
- package/dist/grideditor.js +23 -6
- package/dist/grideditor.min.js +1 -1
- package/dist/grideditor.min.js.map +3 -3
- package/package.json +1 -1
- package/src/js/grideditor.js +23 -3
package/dist/grideditor.esm.js
CHANGED
|
@@ -1383,17 +1383,34 @@ function build(instance, baseElem, optionsOrMethod) {
|
|
|
1383
1383
|
var previewButton = create('<button type="button" class="btn btn-sm btn-primary gm-preview"><i class="bi bi-eye-fill"></i></button>');
|
|
1384
1384
|
previewButton.setAttribute("title", t("tool.preview"));
|
|
1385
1385
|
toggleClass(previewButton, "active btn-danger", previewing);
|
|
1386
|
+
var hoverRect = null;
|
|
1387
|
+
function endHover(e) {
|
|
1388
|
+
var r = hoverRect;
|
|
1389
|
+
var outOfWindow = e.currentTarget === document.documentElement;
|
|
1390
|
+
var overButton = e.type === "pointermove" && previewButton.contains(e.target);
|
|
1391
|
+
if (r && !outOfWindow && (overButton || e.clientX >= r.left && e.clientX < r.right && e.clientY >= r.top && e.clientY < r.bottom)) {
|
|
1392
|
+
document.addEventListener("pointermove", endHover, { signal: lifetime.signal });
|
|
1393
|
+
document.documentElement.addEventListener("mouseleave", endHover, { signal: lifetime.signal });
|
|
1394
|
+
return;
|
|
1395
|
+
}
|
|
1396
|
+
hoverRect = null;
|
|
1397
|
+
document.removeEventListener("pointermove", endHover);
|
|
1398
|
+
document.documentElement.removeEventListener("mouseleave", endHover);
|
|
1399
|
+
if (!previewing) {
|
|
1400
|
+
addClass(canvas, "ge-editing");
|
|
1401
|
+
}
|
|
1402
|
+
}
|
|
1386
1403
|
previewButton.addEventListener("mouseenter", function() {
|
|
1404
|
+
if (hoverRect) {
|
|
1405
|
+
return;
|
|
1406
|
+
}
|
|
1407
|
+
hoverRect = previewButton.getBoundingClientRect();
|
|
1387
1408
|
removeClass(canvas, "ge-editing");
|
|
1388
1409
|
});
|
|
1389
1410
|
previewButton.addEventListener("click", function() {
|
|
1390
1411
|
setPreview(!previewing);
|
|
1391
1412
|
});
|
|
1392
|
-
previewButton.addEventListener("mouseleave",
|
|
1393
|
-
if (!previewing) {
|
|
1394
|
-
addClass(canvas, "ge-editing");
|
|
1395
|
-
}
|
|
1396
|
-
});
|
|
1413
|
+
previewButton.addEventListener("mouseleave", endHover);
|
|
1397
1414
|
btnGroup.appendChild(previewButton);
|
|
1398
1415
|
if (endItems.length) {
|
|
1399
1416
|
var end = wrapper.appendChild(element("div", { "class": "pull-right ge-toolbar-end" }));
|
|
@@ -5385,7 +5402,7 @@ GridEditor.t = translate;
|
|
|
5385
5402
|
GridEditor._plainHtml = plainHtml;
|
|
5386
5403
|
GridEditor.Sortable = null;
|
|
5387
5404
|
GridEditor.bootstrap = null;
|
|
5388
|
-
GridEditor.version = false ? "dev" : "9.2.
|
|
5405
|
+
GridEditor.version = false ? "dev" : "9.2.2";
|
|
5389
5406
|
GridEditor.locales = {
|
|
5390
5407
|
en: {
|
|
5391
5408
|
"tool.move": "Move",
|
package/dist/grideditor.js
CHANGED
|
@@ -1384,17 +1384,34 @@
|
|
|
1384
1384
|
var previewButton = create('<button type="button" class="btn btn-sm btn-primary gm-preview"><i class="bi bi-eye-fill"></i></button>');
|
|
1385
1385
|
previewButton.setAttribute("title", t("tool.preview"));
|
|
1386
1386
|
toggleClass(previewButton, "active btn-danger", previewing);
|
|
1387
|
+
var hoverRect = null;
|
|
1388
|
+
function endHover(e) {
|
|
1389
|
+
var r = hoverRect;
|
|
1390
|
+
var outOfWindow = e.currentTarget === document.documentElement;
|
|
1391
|
+
var overButton = e.type === "pointermove" && previewButton.contains(e.target);
|
|
1392
|
+
if (r && !outOfWindow && (overButton || e.clientX >= r.left && e.clientX < r.right && e.clientY >= r.top && e.clientY < r.bottom)) {
|
|
1393
|
+
document.addEventListener("pointermove", endHover, { signal: lifetime.signal });
|
|
1394
|
+
document.documentElement.addEventListener("mouseleave", endHover, { signal: lifetime.signal });
|
|
1395
|
+
return;
|
|
1396
|
+
}
|
|
1397
|
+
hoverRect = null;
|
|
1398
|
+
document.removeEventListener("pointermove", endHover);
|
|
1399
|
+
document.documentElement.removeEventListener("mouseleave", endHover);
|
|
1400
|
+
if (!previewing) {
|
|
1401
|
+
addClass(canvas, "ge-editing");
|
|
1402
|
+
}
|
|
1403
|
+
}
|
|
1387
1404
|
previewButton.addEventListener("mouseenter", function() {
|
|
1405
|
+
if (hoverRect) {
|
|
1406
|
+
return;
|
|
1407
|
+
}
|
|
1408
|
+
hoverRect = previewButton.getBoundingClientRect();
|
|
1388
1409
|
removeClass(canvas, "ge-editing");
|
|
1389
1410
|
});
|
|
1390
1411
|
previewButton.addEventListener("click", function() {
|
|
1391
1412
|
setPreview(!previewing);
|
|
1392
1413
|
});
|
|
1393
|
-
previewButton.addEventListener("mouseleave",
|
|
1394
|
-
if (!previewing) {
|
|
1395
|
-
addClass(canvas, "ge-editing");
|
|
1396
|
-
}
|
|
1397
|
-
});
|
|
1414
|
+
previewButton.addEventListener("mouseleave", endHover);
|
|
1398
1415
|
btnGroup.appendChild(previewButton);
|
|
1399
1416
|
if (endItems.length) {
|
|
1400
1417
|
var end = wrapper.appendChild(element("div", { "class": "pull-right ge-toolbar-end" }));
|
|
@@ -5386,7 +5403,7 @@
|
|
|
5386
5403
|
GridEditor._plainHtml = plainHtml;
|
|
5387
5404
|
GridEditor.Sortable = null;
|
|
5388
5405
|
GridEditor.bootstrap = null;
|
|
5389
|
-
GridEditor.version = false ? "dev" : "9.2.
|
|
5406
|
+
GridEditor.version = false ? "dev" : "9.2.2";
|
|
5390
5407
|
GridEditor.locales = {
|
|
5391
5408
|
en: {
|
|
5392
5409
|
"tool.move": "Move",
|
package/dist/grideditor.min.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(()=>{function A(a,u){return a?Array.prototype.slice.call(a.querySelectorAll(u)):[]}function S(a,u){return a?a.querySelector(u):null}function fe(a,u){if(!a)return[];var p=A(a,u);return a.nodeType===1&&a.matches(u)&&p.unshift(a),p}function q(a,u){return a?Array.prototype.filter.call(a.children,function(p){return!u||p.matches(u)}):[]}function j(a,u){return q(a,u)[0]||null}function H(a,u,p){var s=a&&a.nodeType===1?a.closest(u):null;return s&&p&&s!==p&&!p.contains(s)?null:s}function re(a,u){return!!a&&a.nodeType===1&&a.matches(u)}function Se(a){return!!a&&document.documentElement.contains(a)}function Wo(a,u){for(var p=[],s=a.nextElementSibling;s;s=s.nextElementSibling)(!u||s.matches(u))&&p.push(s);return p}function Ho(a,u){for(var p=[],s=a.parentElement;s&&s!==u;s=s.parentElement)p.push(s);return p}function al(a){var u=document.createElement("template");return u.innerHTML=a,Array.prototype.slice.call(u.content.childNodes)}function V(a){for(var u=al(a.trim()),p=0;p<u.length;p++)if(u[p].nodeType===1)return u[p];return null}function v(a,u,p){var s=document.createElement(a);return Object.keys(u||{}).forEach(function(c){var x=u[c];x!=null&&x!==!1&&s.setAttribute(c,x)}),p!=null&&(s.textContent=p),s}function ht(a,u){return a.innerHTML=u==null?"":String(u),a}function y(a,u){return Ze(u).forEach(function(p){a.classList.add(p)}),a}function k(a,u){return Ze(u).forEach(function(p){a.classList.remove(p)}),a}function P(a,u,p){return Ze(u).forEach(function(s){p===void 0?a.classList.toggle(s):a.classList.toggle(s,!!p)}),a}function b(a,u){return!!a&&a.nodeType===1&&a.classList.contains(u)}function Ze(a){return String(a||"").split(/\s+/).filter(Boolean)}function et(a){return a.getAttribute("class")||a.removeAttribute("class"),a}function bt(a){return a.getAttribute("style")||a.removeAttribute("style"),a}function Xt(a,u){return Object.keys(u).forEach(function(p){var s=u[p];s==null?a.removeAttribute(p):a.setAttribute(p,s)}),a}function Le(a,u){return Object.keys(u).forEach(function(p){var s=u[p];typeof s=="number"&&!ll[p]&&(s=s+"px"),a.style.setProperty(p,s==null?"":String(s))}),a}var ll={opacity:!0,"z-index":!0,"flex-grow":!0,"flex-shrink":!0,order:!0},vt={};function sl(a){var u=a.nodeName;if(!vt[u]){var p=document.body.appendChild(document.createElement(u));vt[u]=getComputedStyle(p).display,p.remove(),vt[u]==="none"&&(vt[u]="block")}return vt[u]}function Ee(a){return a.style.removeProperty("display"),getComputedStyle(a).display==="none"&&(a.style.display=sl(a)),a}function se(a){return a.style.display="none",a}function Ko(a,u){return u===void 0&&(u=!tt(a)),u?Ee(a):se(a)}function tt(a){return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)}function wt(a){return a.getBoundingClientRect().width}function Yt(a){return a.getBoundingClientRect().height}function Bo(a){var u=getComputedStyle(a);return a.clientHeight-parseFloat(u.paddingTop)-parseFloat(u.paddingBottom)}function Jt(a){var u=a.getBoundingClientRect();return{top:u.top+window.pageYOffset,left:u.left+window.pageXOffset}}function $t(a,u){return u.parentNode.insertBefore(a,u.nextSibling),a}function Qt(a){for(var u=a.parentNode;a.firstChild;)u.insertBefore(a.firstChild,a);a.remove()}function Uo(a,u){return a.parentNode.insertBefore(u,a),u.appendChild(a),u}function yt(a,u,p,s,c){var x=function(w){var I=H(w.target,p,a);if(I&&a.contains(I))return s.call(I,w)};return Ze(u).forEach(function(w){a.addEventListener(w,x,c)}),x}function me(a,u,p,s){return Ze(u).forEach(function(c){a.addEventListener(c,p,s)}),p}function er(a,u,p,s){Ze(u).forEach(function(c){a.removeEventListener(c,p,s)})}var ul=400;function Vo(a,u,p,s){p=p===void 0?ul:p,y(a,"ge-leaving");var c=function(){k(a,"ge-leaving"),et(a),se(a),s&&s()};if(!tt(a)||!a.animate||p<=0){window.setTimeout(c,0);return}var x=a.animate(u(getComputedStyle(a)),{duration:p,easing:"ease-in-out"}),w=!1,I=function(){w||(w=!0,c())};x.onfinish=I,x.oncancel=I}function Ct(a,u,p){typeof u=="function"&&(p=u,u=void 0),a.style.overflow="hidden",Vo(a,function(s){return[{height:s.height,paddingTop:s.paddingTop,paddingBottom:s.paddingBottom,marginTop:s.marginTop,marginBottom:s.marginBottom},{height:"0px",paddingTop:"0px",paddingBottom:"0px",marginTop:"0px",marginBottom:"0px"}]},u,function(){a.style.removeProperty("overflow"),p&&p()})}function Go(a,u,p,s){a.style.overflow="hidden",Vo(a,function(c){var x={opacity:c.opacity,height:c.height},w={opacity:0,height:"0px"};return s&&(x.width=c.width,w.width="0px"),[x,w]},u,function(){a.style.removeProperty("overflow"),p&&p()})}var qo={getHtml:{value:!0},getPlainHtml:{value:!0},init:{},deinit:{},reset:{},destroy:{},changeView:{},getView:{value:!0},createRow:{value:!0},createColumn:{value:!0},createElement:{value:!0},createText:{value:!0},createSection:{value:!0},createContainer:{value:!0},addTab:{value:!0},addAccordionItem:{value:!0},addPane:{value:!0},setLocale:{},getUtility:{value:!0},setUtility:{value:!0},getActiveTarget:{value:!0},setActiveTarget:{}},cl=["appendTo","prependTo","insertAfter","insertBefore"],fl=["data-bs-target","data-bs-parent","href","aria-controls","aria-labelledby","aria-describedby","for"],ml=/^ge-([a-z][a-z-]*?)-\d+-[a-z0-9]+$/,C=[{key:"xs",infix:"",colPrefix:"col-",offsetPrefix:"offset-",min:0,preview:400,labelKey:"view.xs"},{key:"sm",infix:"sm",colPrefix:"col-sm-",offsetPrefix:"offset-sm-",min:576,preview:576,labelKey:"view.sm"},{key:"md",infix:"md",colPrefix:"col-md-",offsetPrefix:"offset-md-",min:768,preview:768,labelKey:"view.md"},{key:"lg",infix:"lg",colPrefix:"col-lg-",offsetPrefix:"offset-lg-",min:992,preview:992,labelKey:"view.lg"},{key:"xl",infix:"xl",colPrefix:"col-xl-",offsetPrefix:"offset-xl-",min:1200,preview:1200,labelKey:"view.xl"},{key:"xxl",infix:"xxl",colPrefix:"col-xxl-",offsetPrefix:"offset-xxl-",min:1400,preview:null,labelKey:"view.xxl"}],Z="all",gl="view.all",tr=[Z].concat(C.map(function(a){return a.key})),W=12,Xo=11,nr=["equal","auto"],nt=["1","2","3","4","5","6","auto"];function rr(a,u){return"row-cols"+(a.infix?"-"+a.infix:"")+"-"+u}function Y(a){return typeof a=="number"}function Ie(a,u){return u==="equal"?a.infix?"col-"+a.infix:"col":a.colPrefix+u}function ee(a){for(var u=0;u<C.length;u++)if(C[u].key===a)return C[u];return null}function Yo(a){if(a===Z)return[C[0]];var u=ee(a);return u?[u]:[]}function Et(a){var u=ee(a);return u?u.labelKey:gl}var Me={add_column:{size:12,picker:!0,delay:600},elements:{enabled:"auto",selector:"[data-ge-element]",auto:!1,types:[]},resize:{enabled:!0,tools:!0,handles:"e",balance:"next"},indent:{tools:!0},sidebar:{empty:null},drag:{delay:0,touch_delay:100,threshold:3,animation:150,scroll:!0}},Jo={},pl=0,en=new WeakMap,Zt=null,$o=".ge-mainControls, .ge-settings-panel, .ge-sidebar-toggle, .ge-dialog, .ge-confirm, .ge-size-picker, .modal, .modal-backdrop";function ir(a,u,p){var s=O.locales,c=s[a.locale]||{},x=a.locale_strings||{},w=x[u];return w===void 0&&(w=c[u]),w===void 0&&(w=s.en[u]),w===void 0&&(hl("locale:"+u,'no string for "'+u+'" in any locale, showing the key'),w=u),w.replace(/\{(\w+)\}/g,function(I,pe){return p&&p[pe]!==void 0?p[pe]:I})}function vl(a,u){var p=O.locales;return(a.locale_strings||{})[u]!==void 0||(p[a.locale]||{})[u]!==void 0||p.en[u]!==void 0}function K(a){window.console&&window.console.warn&&window.console.warn("grid-editor: "+a)}function hl(a,u){Jo[a]||(Jo[a]=!0,K(u))}function bl(a,u){return ir({locale:"en"},a,u)}function wl(a){if(typeof a=="string"){var u=document.querySelector(a);if(!u)throw new TypeError("grid-editor: no element matches "+JSON.stringify(a));return u}if(a&&a.nodeType===1)return a;throw new TypeError("grid-editor: the target is an element or a selector, not "+(a===null?"null":typeof a))}function ge(a){return typeof a=="string"?document.querySelector(a):a&&a.nodeType===1?a:null}function Qo(){return O.Sortable||window.Sortable||null}function xt(){var a=O.bootstrap||window.bootstrap;return a&&a.Modal?a.Modal:null}function or(a){var u=document.implementation.createHTMLDocument("").body;u.innerHTML=a;var p=[];return A(u,"*").forEach(function(s){var c=!1;Array.prototype.slice.call(s.attributes).forEach(function(I){I.name.indexOf("data-ge-")===0&&(s.removeAttribute(I.name),c=!0)});var x=(s.getAttribute("class")||"").split(/\s+/).filter(Boolean),w=x.filter(function(I){return I!=="column"&&I.indexOf("ge-")!==0});w.length!==x.length&&(c=!0),w.length?s.setAttribute("class",w.join(" ")):s.removeAttribute("class"),c&&s.tagName==="DIV"&&!s.attributes.length&&p.push(s)}),p.forEach(function(s){Qt(s)}),u.innerHTML}function O(a,u){var p=wl(a),s=en.get(p);if(s)return Zo.has(p)||(Zo.add(p),K(bl("warning.already_editing"))),s;if(!(this instanceof O))return new O(p,u);yl(this,p,u||{})}var Zo=new WeakSet;O.create=function(a,u){return new O(a,u)};O.get=function(a){var u=ge(a);return u&&en.get(u)||null};function yl(a,u,p){var s=Object.assign({new_row_layouts:[[12],[6,6],[4,4,4],[3,3,3,3],[2,2,2,2,2,2],[2,8,2],[4,8],[8,4]],row_classes:[],col_classes:[],col_tools:[],row_tools:[],drag_handle:"tool",toolbar_drag:"auto",toolbar_overflow:"menu",drawer_overflow:"menu",toolbar_groups:!1,active_target:!1,element_tools:[],element_classes:[],container_classes:[],pane_classes:[],container_tools:[],tab_tools:[],accordion_tools:[],plugins:null,row_cols:!0,utilities:{},elements:Me.elements,custom_filter:"",valid_col_sizes:[1,2,3,4,5,6,7,8,9,10,11,12,"equal","auto"],valid_col_offsets:[0,1,2,3,4,5,6,7,8,9,10,11],add_column:Me.add_column,layout_modes:tr.slice(),default_view:Z,resize:Me.resize,indent:Me.indent,source_textarea:"",edit_source:!0,locale:"en",locale_strings:{},callbacks:{},confirm_delete:!0,settings_panel:"offcanvas",sidebar:Me.sidebar,drag:Me.drag},p);if(Object.keys(Me).forEach(function(e){s[e]=Object.assign({},Me[e],s[e])}),s.settings_panel==="sidebar"){if(p&&p.active_target===!1)throw new TypeError('grid-editor: settings_panel "sidebar" needs active_target; leave it out or set it to true');s.active_target=!0}var c,x,w,I,pe,Fe,te,R=s.default_view,N=null,oe=null,xe=!1,Pe=!1,We=null,L=null,_t=null,tn=function(){},nn=function(){},ve=[],kt={},rn=null,ar={},He=[],At=new WeakMap,lr=++pl,rt=!1,Ke=null,sr=null;s.settings_panel==="sidebar"&&(Zt?(G("sidebar",'settings_panel "sidebar" is in use by another editor on the page, which has one sidebar: using offcanvas'),s.settings_panel="offcanvas"):Zt=a);var Be=new WeakMap,on=new WeakMap,an=new WeakMap,Tt=null,ln=new WeakMap,Ot=new WeakMap,ur=new WeakMap,sn=new WeakSet,St=new AbortController;c=y(u,"ge-canvas");function G(e,t){ar[e]||(ar[e]=!0,K(t))}function m(e,t){return ir(s,e,t)}function ei(e){s.locale=e,a.settings=qn(),cr(),so(),Co(),wn(),bn(),Or()}var ot=0,un=[];function ie(e,t,n){return Object.assign({kind:e,node:t,parent:t.parentElement,canvas:c,breakpoint:$n(),source:"api"},n||{})}function D(e,t){var n=[e],r=e.replace(/^(before|after)-add-.+$/,"$1-add");r!==e&&n.push(r);var o=!1;return n.forEach(function(i){var l=new CustomEvent("grideditor:"+i,{detail:t,bubbles:!0,cancelable:!0});c.dispatchEvent(l)||(o=!0)}),n.forEach(function(i){var l=s.callbacks[i.replace(/-/g,"_")];typeof l=="function"&&l(t)===!1&&(o=!0)}),!o}function J(e){ot++;try{return e()}finally{if(ot--,ot===0)for(;un.length;)un.shift()()}}function dn(e){if(ot===0){e();return}un.push(e)}function ae(e,t,n,r){var o=ti(e);return J(function(){var i=ie(e,t,r);return D("before-add-"+o,i)?(n(),he(),D("after-add-"+o,i),t):null})}function ti(e){return O.containers[e]?"container":e}function ni(e,t){if(!s.confirm_delete){t();return}dr(e,{danger:!0},function(n){n&&t()})}function dr(e,t,n){t=t||{};var r=xt();if(!r){n(window.confirm(e));return}var o=ri(),i=!1,l=S(o,".ge-confirm-ok");ze&&ze(null);var d=function(f){ze===d&&(ze=null,n(f))};ze=d,S(o,".modal-title").textContent=t.title||m("confirm.title"),S(o,".ge-confirm-cancel").textContent=t.cancel||m("confirm.cancel"),l.textContent=t.ok||m("confirm.ok"),P(l,"btn-danger",!!t.danger),P(l,"btn-primary",!t.danger),S(o,".ge-confirm-message").textContent=e,l.onclick=function(){i=!0,r.getInstance(o).hide()},_e.hidden=function(){d(i)},_e.shown=function(){l.focus()},r.getOrCreateInstance(o).show()}var _e={hidden:null,shown:null},ze=null;function ri(){if(N)return N;N=V('<div class="modal fade ge-confirm" tabindex="-1" aria-hidden="true"><div class="modal-dialog modal-dialog-centered"><div class="modal-content"><div class="modal-header"><h5 class="modal-title"></h5><button type="button" class="btn-close" data-bs-dismiss="modal"></button></div><div class="modal-body"><p class="ge-confirm-message"></p></div><div class="modal-footer"><button type="button" class="btn btn-secondary ge-confirm-cancel" data-bs-dismiss="modal"></button><button type="button" class="btn btn-danger ge-confirm-ok"></button></div></div></div></div>'),document.body.appendChild(N),S(N,".modal-title").textContent=m("confirm.title"),S(N,".btn-close").setAttribute("aria-label",m("confirm.cancel")),S(N,".ge-confirm-cancel").textContent=m("confirm.cancel"),S(N,".ge-confirm-ok").textContent=m("confirm.ok"),fr(N);var e=N;return N.addEventListener("hidden.bs.modal",function(){e===N&&_e.hidden&&_e.hidden()}),N.addEventListener("shown.bs.modal",function(){e===N&&_e.shown&&_e.shown()}),N}function cr(){N&&(_e.hidden=null,_e.shown=null,cn(N),N=null,ze&&ze(null))}function cn(e){var t=xt(),n=t?t.getInstance(e):null,r=!1,o=function(){r||(r=!0,n&&n.dispose(),e.remove())};if(!n||!fn.get(e)&&!b(e,"show")){o();return}e.addEventListener("hidden.bs.modal",o,{once:!0}),e.addEventListener("shown.bs.modal",function(){n.hide()},{once:!0}),n.hide()}var fn=new WeakMap;function fr(e){me(e,"show.bs.modal hide.bs.modal",function(){fn.set(e,!0)}),me(e,"shown.bs.modal hidden.bs.modal",function(){fn.set(e,!1)})}function je(e,t,n,r){var o=Tt||{};Tt=null,J(function(){var i=ie(e,t,{source:o.source||"tool"});if(D("before-delete",i)){o.before&&o.before();var l=function(){J(function(){r(function(){t.remove(),J(function(){he(),D("after-delete",i)})})})};o.confirm===!1?l():ni(n,l)}})}function oi(e,t){t=t||{};var n=e?kn(e):null,r=n?j(n,'[class*="ge-delete-"]'):null,o=r?an.get(r):null;if(!o)return!1;var i=!1;Tt={source:t.source,confirm:t.confirm,before:function(){i=!0,t.before&&t.before()}};try{o.call(r)}finally{Tt=null}return i}function mn(e,t,n){if(n=n||R,n!==Z){var r=ee(n),o=Ut({size:t,offset:Kt(e,r)||0});return o.refused||Ye(e,r)===o.size?null:{writes:[{tier:r,size:o.size}],cleared:null,size:o.size}}var i=C.some(function(g){return Ut({size:t,offset:Kt(e,g)||0}).refused});if(i)return null;var l=C[0],d=[],f=[];return C.slice(1).forEach(function(g){var h=Ye(e,g);h!==null&&(d.push({tier:g,size:null}),f.push({breakpoint:g.key,value:h}))}),Ye(e,l)!==t&&d.unshift({tier:l,size:t}),d.length?{writes:d,cleared:f,size:t}:null}function gn(e,t){t.writes.forEach(function(n){Bt(e,n.tier,n.size)}),Je(e)}function pn(e,t){return t&&(e.cleared=t),e}function vn(e,t,n,r){r=r||R;var o=ut(e),i=mn(e,t,r);return i?J(function(){var l=ie("column",e,pn({source:n,breakpoint:r,from:o,to:i.size},i.cleared));return D("before-resize",l)?(gn(e,i),be(e),D("after-resize",l),!0):(be(e),!1)}):!1}function mr(e,t,n){var r=R===Z,o=r?C[0]:ee(R),i=ct(e);t=Math.min(Math.max(t,0),Xo);var l=r?C.slice(1).filter(function(d){return Ht(e,d)!==null}):[];return(Ht(e,o)||0)===t&&!l.length?!1:J(function(){var d=ie("column",e,pn({source:n,from:i,to:t},r?l.map(function(f){return{breakpoint:f.key,value:Ht(e,f)}}):null));return D("before-indent",d)?(Kn(e,o,t),l.forEach(function(f){Kn(e,f,0)}),(r?C:[o]).forEach(function(f){var g=Hn(e,f);if(Y(g)){var h=Ut({size:g,offset:t,leading:"offset"});h.size!==g&&Bt(e,f,h.size)}}),be(e),D("after-indent",d),!0):!1})}function hn(e){var t=e.parentElement;return{parent:t,index:q(t).filter(function(n){return!b(n,"ge-tools-drawer")}).indexOf(e)}}function ue(e){var t=null;if(Object.keys(M).forEach(function(r){var o=M[r];!t&&o.kindOf&&(t=o.kindOf(e))}),t)return t;if(e.getAttribute("data-ge-container"))return e.getAttribute("data-ge-container");var n=null;return Object.keys(T).forEach(function(r){var o=T[r];!n&&o.paneClass&&b(e,o.paneClass)&&(n=o.paneKind)}),n||(b(e,"ge-tab")?"tab":b(e,"ge-accordion-item")?"accordion-item":b(e,"row")?"row":b(e,"column")?"column":b(e,"ge-element")?"element":(b(e,"ge-text-block")&&(e=j(e,".ge-content")||e),b(e,"ge-content")?e.getAttribute("data-ge-content-type")?"text":"plain":"node"))}if(s.source_textarea){var it=ge(s.source_textarea).value,gr=v("div");gr.innerHTML=it,it.length>0&&!gr.querySelector(".row")&&(it='<div class="row"><div class="col-lg-12">'+it+"</div></div>"),ht(u,it)}if(u.children.length&&!u.querySelector("div.row")){var ii=q(u),pr=V('<div class="row"><div class="col-lg-12"></div></div>');u.appendChild(pr),ii.forEach(function(e){pr.firstChild.appendChild(e)})}function ai(){te=v("textarea",{class:"ge-html-output"}),c.parentNode.insertBefore(te,c),bn(),fa();var e={signal:St.signal},t=null;if(window.addEventListener("scroll",function(){t===null&&(t=window.requestAnimationFrame(function(){t=null,!rt&&x&&Er()}))},e),St.signal.addEventListener("abort",function(){t!==null&&window.cancelAnimationFrame(t)}),yt(c,"click",".ge-content",Ai,e),s.active_target){var n=null;c.addEventListener("pointerdown",function(i){n={x:i.clientX,y:i.clientY}},e),c.addEventListener("click",function(i){var l=n;n=null,b(c,"ge-editing")&&(l&&Math.abs(i.clientX-l.x)+Math.abs(i.clientY-l.y)>s.drag.threshold||o(i))},e),document.addEventListener("keydown",function(i){if(!(i.key!=="Escape"||U||$)&&!(N&&b(N,"show"))){var l=document.activeElement;l&&(re(l,"input, textarea, select")||l.isContentEditable)||L&&ne(null)}},e),c.addEventListener("focusin",function(i){var l=Ft()?bo(i.target):null;l&&ne(l)},e);var r=null;document.addEventListener("pointerdown",function(i){r=i.target},{capture:!0,signal:e.signal}),document.addEventListener("click",function(i){var l=i.target,d=r;r=null,!(!L||!Ft()||!l||l.nodeType!==1)&&(d&&d.nodeType===1&&(c.contains(d)||H(d,$o))||!Se(l)||c.contains(l)||H(l,$o)||c.querySelector(".ge-rte-active")||ne(null))},e)}qe()==="sidebar"&&window.addEventListener("resize",fo,e);function o(i){if(c.contains(i.target)){var l=bo(i.target);if(l&&l===L&&(i.target===kn(l)||i.target===l&&!b(l,"ge-content"))){ne(null);return}ne(l)}}}function li(e){!re(e,".ge-content")||!c.contains(e)||(le("onContentReady",e),st(e))}function bn(){x=v("div",{class:"ge-mainControls"}),te.parentNode.insertBefore(x,te),w=x.appendChild(v("div",{class:"ge-wrapper ge-top"}));var e=s.toolbar_overflow!=="wrap",t=w;e&&(y(w,"ge-toolbar-menu"),t=w.appendChild(v("div",{class:"ge-toolbar-start"}))),ve=[],I=t.appendChild(v("div",{class:"ge-addRowGroup btn-group"})),pe=v("div",{class:"ge-addContainerGroup btn-group ms-1"}),s.new_row_layouts.forEach(function(d){var f=!Array.isArray(d),g=v("a",{class:"btn btn-sm btn-light",title:f?m("row.add_row_cols",{columns:d.columns,counts:_i(d.row_cols)}):m("row.add",{layout:d.join("-")}),"data-ge-toolbar":"row","data-ge-layout":f?JSON.stringify(d):d.join(",")});g.addEventListener("click",function(){if(L){_n(g,"tool");return}var _=at(d),Q=ae("row",_,function(){c.appendChild(_)},{parent:c,source:"tool"});Q&&_.scrollIntoView&&_.scrollIntoView({behavior:"smooth"})}),I.appendChild(g),ve.push({button:g,home:I,group:"rows"}),g.appendChild(V('<i class="bi bi-plus"></i>'));var h=f?ki(d):d,E='<div class="row ge-row-icon">';h.forEach(function(_){E+='<div class="column '+Ie(C[0],_)+'"></div>'}),E+="</div>",g.appendChild(V(E))}),t.appendChild(pe),Object.keys(T).forEach(function(d){var f=T[d],g=hr(v("a",{class:"btn btn-sm btn-light ge-add-container"}),m(f.labelKey),f.iconClass);Xt(g,{"data-ge-toolbar":"container","data-ge-container-type":d}),g.addEventListener("click",function(){if(L){_n(g,"tool");return}var h=$e(),E=h.appendChild(ce(W)),_=E.appendChild(f.create({}));ae(d,_,function(){c.appendChild(h)},{parent:c,source:"tool"})}),pe.appendChild(g),ve.push({button:g,home:pe,group:vr(f.group)||"content"})});var n=[];kt={},Object.keys(M).forEach(function(d){kt[d]=fi(M[d]),kt[d].forEach(function(f,g){var h=pi(d,f,g);f.align==="end"?n.push(h):(pe.appendChild(h),ve.push({button:h,home:pe,group:vr(f.group)||d}))})}),Fe=V('<div class="dropdown pull-right ge-layout-mode"><button type="button" class="btn btn-sm btn-primary dropdown-toggle" data-bs-toggle="dropdown"></button><div class="dropdown-menu" role="menu"></div></div>'),yt(Fe,"click","a",function(){Do(this.getAttribute("data-ge-view"))}),w.appendChild(Fe),s.layout_modes.forEach(function(d){S(Fe,".dropdown-menu").appendChild(v("a",{class:"dropdown-item","data-ge-view":d,title:m(Et(d))},m(Et(d))))}),S(Fe,"button").textContent=m(Et(R));var r=w.appendChild(v("div",{class:"btn-group pull-right"}));if(s.edit_source){var o=V('<button type="button" class="btn btn-sm btn-primary gm-edit-mode"><i class="bi bi-code-slash"></i></button>');o.setAttribute("title",m("tool.edit_source")),P(o,"active btn-danger",xe),o.addEventListener("click",function(){xe?En():Si(),P(o,"active btn-danger",xe)}),r.appendChild(o)}var i=V('<button type="button" class="btn btn-sm btn-primary gm-preview"><i class="bi bi-eye-fill"></i></button>');if(i.setAttribute("title",m("tool.preview")),P(i,"active btn-danger",Pe),i.addEventListener("mouseenter",function(){k(c,"ge-editing")}),i.addEventListener("click",function(){Lt(!Pe)}),i.addEventListener("mouseleave",function(){Pe||y(c,"ge-editing")}),r.appendChild(i),n.length){var l=w.appendChild(v("div",{class:"pull-right ge-toolbar-end"}));n.forEach(function(d){l.appendChild(d)})}s.toolbar_groups&&ui(t),e&&gi(t),hi()}var si=[{name:"rows",labelKey:"group.rows"},{name:"content",labelKey:"group.content"},{name:"elements",labelKey:"group.elements"}];function vr(e){return typeof e=="string"&&e.trim()!==""?e:null}function ui(e){var t=si.map(function(i){return i.name});if(ve.forEach(function(i){t.indexOf(i.group)<0&&t.push(i.group)}),t=t.filter(function(i){return ve.some(function(l){return l.group===i})}),t.length<2)return;var n=v("div",{class:"ge-toolbar-groups btn-group",role:"tablist","aria-label":m("group.select")});e.insertBefore(n,e.firstChild);var r=x.appendChild(v("div",{class:"ge-toolbar-stash",hidden:"hidden"}));t.forEach(function(i){var l=n.appendChild(v("button",{type:"button",class:"btn btn-sm btn-outline-secondary",role:"tab","data-ge-group":i},di(i)));l.addEventListener("click",function(){o(i)})}),o(t.indexOf(rn)>=0?rn:t[0]);function o(i){rn=i,ve.forEach(function(l){(l.group===i?l.home:r).appendChild(l.button)}),q(n).forEach(function(l){var d=l.getAttribute("data-ge-group")===i;P(l,"active",d),l.setAttribute("aria-selected",d?"true":"false")}),nn()}}function di(e){var t="group."+e;if(vl(s,t))return m(t);var n=ve.filter(function(r){return r.group===e})[0];return n.button.getAttribute("title")||e}function ci(){return ve.filter(function(e){return!H(e.button,".ge-toolbar-stash")})}function fi(e){var t=typeof e.toolbar=="function"?e.toolbar():e.toolbar;return Array.isArray(t)?t:[]}function mi(){!x||rt||(wn(),bn(),Er())}function wn(){_t&&_t.abort(),_t=null,tn=function(){},nn=function(){},x.remove()}function gi(e){var t=V('<div class="ge-toolbar-more"><button type="button" class="btn btn-sm btn-light"><i class="bi bi-three-dots"></i></button><div class="ge-toolbar-overflow"><div class="ge-addRowGroup btn-group"></div><div class="ge-addContainerGroup btn-group"></div></div></div>');e.parentNode.insertBefore(t,e.nextSibling);var n=S(t,"button"),r=S(t,".ge-toolbar-overflow"),o=A(r,".btn-group");function i(_){return _===I?o[0]:o[1]}n.setAttribute("title",m("tool.more")),n.setAttribute("aria-haspopup","true"),n.setAttribute("aria-expanded","false");var l=_t=new AbortController,d={signal:l.signal};if(n.addEventListener("click",function(){h(!b(t,"ge-open"))}),r.addEventListener("click",function(_){H(_.target,"[data-ge-toolbar]")&&h(!1)}),document.addEventListener("pointerdown",function(_){t.contains(_.target)||h(!1)},d),document.addEventListener("keydown",function(_){_.key==="Escape"&&h(!1)},d),tn=function(){h(!1)},nn=E,E(),window.ResizeObserver){var f=!1,g=new window.ResizeObserver(function(){f||(f=!0,window.requestAnimationFrame(function(){f=!1,l.signal.aborted||E()}))});g.observe(w),g.observe(e),l.signal.addEventListener("abort",function(){g.disconnect()})}function h(_){_=_&&b(t,"ge-needed"),P(t,"ge-open",_),n.setAttribute("aria-expanded",_?"true":"false")}function E(){var _=ci();if(_.forEach(function(Qe){Qe.home.appendChild(Qe.button),k(Qe.button,"ge-before-more")}),k(t,"ge-needed"),k(w,"ge-toolbar-overflowing"),e.scrollWidth<=e.clientWidth){h(!1);return}y(t,"ge-needed"),y(w,"ge-toolbar-overflowing");for(var Q=_.length-1;Q>=0&&e.scrollWidth>e.clientWidth;Q--){var Fo=i(_[Q].home);Fo.insertBefore(_[Q].button,Fo.firstChild)}var Zn=_.filter(function(Qe){return Qe.button.parentNode===Qe.home});Zn.length&&y(Zn[Zn.length-1].button,"ge-before-more")}}function hr(e,t,n){return e.setAttribute("title",t),n?(e.appendChild(v("i",{class:n})),e):(e.appendChild(V('<i class="bi bi-plus"></i>')),e.appendChild(v("span",{},t)),e)}function pi(e,t,n){var r=t.iconClass||(t.align==="end"?"bi bi-plus":null),o=typeof t.label=="function"?t.label():t.label||m(t.labelKey),i=t.align==="end"?"btn-primary":"btn-light",l=hr(v("a",{class:"btn btn-sm "+i+" ge-add-container ge-add-feature"}),o,r),d=typeof t.action=="function";return y(l,t.className||""),(typeof t.hidden=="function"?t.hidden():t.hidden)&&se(l),Xt(l,{"data-ge-toolbar":"feature","data-ge-feature":e,"data-ge-item":n}),d&&(l.setAttribute("data-ge-action",""),(typeof t.disabled=="function"?t.disabled():t.disabled)&&(y(l,"disabled"),l.setAttribute("aria-disabled","true"))),l.addEventListener("click",function(){if(d){b(l,"disabled")||t.action(l);return}if(L){_n(l,t.source||"tool");return}var f=t.create();if(f){var g=t.inColumn?yi(f):f,h=ae(t.kind,f,function(){c.appendChild(g)},{parent:c,source:t.source||"tool"});h&&t.inColumn&&g.scrollIntoView&&g.scrollIntoView({behavior:"smooth"})}}),l}function vi(){return s.toolbar_drag==="auto"?s.drag_handle==="drawer":!!s.toolbar_drag}function hi(){var e=A(x,"[data-ge-toolbar]:not([data-ge-action])");e.forEach(function(t){k(t,"ge-palette-button"),t.removeEventListener("pointerdown",br)}),vi()&&e.forEach(function(t){y(t,"ge-palette-button"),t.addEventListener("pointerdown",br)})}function br(e){var t=e.currentTarget,n=e.pageX,r=e.pageY,o=null;if(e.button)return;function i(f){return Math.abs(f.pageX-n)+Math.abs(f.pageY-r)>s.drag.threshold}function l(f){if(!o){if(!i(f))return;o=y(t.cloneNode(!0),"ge-toolbar-helper"),document.body.appendChild(o),tn(),y(c,"ge-dropping")}Le(o,{left:f.pageX-14,top:f.pageY-14}),Ci(f.pageX,f.pageY)}function d(f){if(document.removeEventListener("pointermove",l),er(document,"pointerup pointercancel",d),!!o){var g=wr(f.pageX,f.pageY);o.remove(),k(c,"ge-dropping"),yn();var h=function(E){E.target!==t&&!t.contains(E.target)||(E.preventDefault(),E.stopImmediatePropagation())};window.addEventListener("click",h,{capture:!0,once:!0}),window.setTimeout(function(){window.removeEventListener("click",h,{capture:!0})},0),g&&Cr(t,g)}}document.addEventListener("pointermove",l),me(document,"pointerup pointercancel",d)}function wr(e,t){var n=e-window.scrollX,r=t-window.scrollY,o=document.elementFromPoint(n,r);if(!o)return null;var i=H(o,[".column",".ge-canvas"].concat(Vt("regions")).join(", "));if(!i||i!==c&&!c.contains(i))return null;var l=null;return q(i,Un()).forEach(function(d){if(!l){var f=d.getBoundingClientRect();r<f.top+f.height/2&&(l=d)}}),{region:i,before:l}}function bi(e,t,n){var r=(kt[e.getAttribute("data-ge-feature")]||[])[parseInt(e.getAttribute("data-ge-item"),10)];if(!r)return null;var o=r.create();if(!o)return null;var i=o;return r.inColumn?i=Mt(t.region,o):pt(t.region,o)?re(t.region,".row")&&(i=Mt(t.region,o)):t=yr(t.region),ae(r.kind,o,function(){t.before?t.before.parentNode.insertBefore(i,t.before):t.region.appendChild(i)},{parent:t.region,source:r.source||n||"dragdrop"})}function yr(e){var t=e===c?[]:Ho(e,c).reverse().concat([e]),n=t[0]||null;return{region:c,before:n?n.nextElementSibling:null}}function wi(e,t,n,r){var o=!L&&(r||{}).fallback==="canvas";if(!L&&!o)return null;var i={region:o?c:Mr(L),before:null},l=Mt(i.region,e),d=l===e?null:e.parentElement;return(!pt(i.region,l)||d&&!pt(d,e))&&(i=yr(i.region),l=e),ae(t,e,function(){i.before?i.before.parentNode.insertBefore(l,i.before):i.region.appendChild(l)},{parent:i.region,source:n||"api"})}function yi(e){return xn(ce(W),e)}function Ci(e,t){var n=wr(e,t);if(!n)return yn();We||(We=v("div",{class:"ge-drop-marker"})),n.before?n.before.parentNode.insertBefore(We,n.before):n.region.appendChild(We)}function yn(){We&&We.remove()}function Cr(e,t,n){if(e.getAttribute("data-ge-toolbar")==="feature")return bi(e,t,n);var r=e.getAttribute("data-ge-toolbar")==="container",o=e.getAttribute("data-ge-container-type"),i=r?T[o].create({}):xi(e.getAttribute("data-ge-layout")),l=Mt(t.region,i);return ae(r?o:"row",i,function(){t.before?t.before.parentNode.insertBefore(l,t.before):t.region.appendChild(l)},{parent:t.region,source:n||"dragdrop"})}function Ei(){for(var e=[],t=1;t<=W;t++)e.push(String(t));return{name:"col",values:e.concat(nr),appliesTo:["column"],labelKey:"utility.col_width",className:function(n,r){return Ie(ee(n),Cn(r))},choices:function(){return s.valid_col_sizes.map(String)},label:function(n){return n==="equal"?m("utility.col_equal"):n==="auto"?m("utility.col_auto"):n},write:function(n,r,o,i){return vn(n,r===null?null:Cn(r),i,o)},blank:function(n,r){var o=r===Z?null:Wt(n,ee(r));return o?m("utility.col_from_row",{count:_o(o.value)}):null}}}function Cn(e){return/^\d+$/.test(String(e))?parseInt(e,10):e}function xi(e){return/^\s*\{/.test(e||"")?at(JSON.parse(e)):at((e||"").split(",").filter(function(t){return t!==""}).map(Cn))}function at(e){var t=$e();if(Array.isArray(e))return e.forEach(function(r){t.appendChild(ce(r))}),t;Object.keys(e.row_cols||{}).forEach(function(r){var o=e.row_cols[r],i=ee(r);i&&nt.indexOf(String(o))!==-1&&y(t,rr(i,o))});for(var n=0;n<(e.columns||0);n++)t.appendChild(ce(null));return t}function _i(e){return C.filter(function(t){return e&&e[t.key]!==void 0}).map(function(t){return(t.infix?t.key+": ":"")+e[t.key]}).join(", ")}function ki(e){var t=1;return Object.keys(e.row_cols||{}).forEach(function(n){var r=e.row_cols[n];r!=="auto"&&(t=Math.max(t,parseInt(r,10)||1))}),Array.apply(null,Array(Math.min(t,e.columns||t))).map(function(){return"equal"})}function Er(){var e=window.pageYOffset;e>Jt(x).top&&e<Jt(c).top+Bo(c)?b(w,"ge-top")&&(Le(w,{left:Jt(w).left,width:wt(w)}),k(w,"ge-top"),y(w,"ge-fixed")):b(w,"ge-fixed")&&(Le(w,{left:"",width:""}),k(w,"ge-fixed"),y(w,"ge-top"))}function Ai(){var e=this;if(!e.getAttribute("data-ge-content-type")&&!ye()&&tt(e)){var t=Tr();t.length&&(t.length===1?xr(e,t[0]):Ti(e,t))}}function xr(e,t){return t.available&&!t.available()?(t.missingKey&&console.error(m(t.missingKey)),!1):J(function(){var n=ie("plain",e,{source:"tool",from:"plain",to:t.type});if(!D("before-convert",n))return!1;y(e,"ge-content-type-"+t.type),e.setAttribute("data-ge-content-type",t.type);var r=e.parentElement;return b(r,"ge-text-block")&&(k(r,"ge-plain-block"),q(r,".ge-tools-drawer").forEach(function(o){o.remove()})),D("after-convert",n),t.edit(e),!0})}function Ti(e,t){var n=b(e.parentElement,"ge-text-block")?e.parentElement:null;n&&_r(j(n,".ge-tools-drawer"),t.map(function(r){return{label:r.label,title:m("tool.convert_type",{editor:r.label}),attributes:{"data-ge-content-type":r.type},choose:function(){xr(e,r)}}}),"ge-text-picker ge-convert-picker",n)}function _r(e,t,n,r){if(ye(),!!e){var o=H(e,".ge-tools-drawer");o&&y(o,"ge-picker-open"),oe=e.appendChild(y(v("div",{class:"ge-size-picker"}),n||"")),t.forEach(function(i){var l=Xt(v("a",{class:"ge-size ge-size-flex"}),i.attributes||{});l.setAttribute("title",i.title||i.label),l.textContent=i.label,l.addEventListener("click",function(d){d.preventDefault(),d.stopPropagation(),ye(),i.choose()}),oe.appendChild(l)}),kr(r||e)}}function kr(e){e.addEventListener("mouseleave",function(){window.setTimeout(function(){oe&&!oe.matches(":hover")&&ye()},400)},{once:!0})}function Ar(){var e={},t=[];return Object.keys(M).forEach(function(n){var r=M[n];r.textTypes&&(r.textTypes()||[]).forEach(function(o){if(e[o.type]){e[o.type]!==n&&G("text-type:"+o.type,'the "'+n+'" plugin declares the text type "'+o.type+'", which the "'+e[o.type]+'" plugin already declares: ignored');return}e[o.type]=n,t.push(o)})}),t}function Tr(){return Ar().filter(function(e){return e.offered!==!1})}function Oi(e){return Ar().some(function(t){return t.type===e})}function Or(){Re(),he()}function Lt(e){if(e=!!e,e!==Pe){Pe=e;var t=x?S(x,".gm-preview"):null;t&&P(t,"active btn-danger",e),P(c,"ge-editing",!e),le("onPreviewChange",e),D("preview-change",{canvas:c,previewing:e})}}function Si(){Lt(!1),Re(),ne(null),te.style.height=.8*document.documentElement.clientHeight+"px",te.value=c.innerHTML,Ee(te),se(c),xe=!0,le("onSourceOpen",te)}function En(){le("onSourceClose",te),xe=!1,ht(c,te.value),Ee(c),he(),se(te)}function Sr(e){return!!e&&e!==c&&c.contains(e)&&Be.has(e)}function ne(e){if(e!==L){var t=L;t&&k(t,"ge-selected"),L=e,e&&b(c,"ge-editing")&&y(e,"ge-selected"),vo(),D("target-change",{canvas:c,target:e,from:t})}}function Lr(){return[".column"].concat(Vt("regions")).join(", ")}function Mr(e){if(re(e,".row, "+Lr()))return e;var t=Li(e)?Mi(e):null;return t||H(e.parentElement,Lr())||c}function Li(e){if(e.getAttribute("data-ge-container"))return!0;var t=H(e.parentElement,"[data-ge-container]",c),n=t&&T[we(t)];return!!n&&!!n.paneKind&&ue(e)===n.paneKind}function Mi(e){var t=!!e.getAttribute("data-ge-container"),n=t?e:H(e.parentElement,"[data-ge-container]",c),r=T[we(n)];return r&&r.regionOf&&r.regionOf(n,t?null:e)||null}function Mt(e,t){if(re(t,".column"))return re(e,".row")?t:xn(t);if(re(e,".row")){var n=ce(Xe(e,Ce())?null:s.add_column.size);return n.appendChild(t),n}return re(e,".column")||re(t,".row")?t:xn(ce(W),t)}function xn(e,t){var n=$e();return t&&e.appendChild(t),n.appendChild(e),n}function _n(e,t){var n=Cr(e,{region:Mr(L),before:null},t);n&&n.scrollIntoView&&n.scrollIntoView({behavior:"smooth"})}function he(){U&&!Se(U.node)&&Te(),L&&!c.contains(L)&&ne(null),$&&$.home&&!Se($.home)&&de(),Xn(!0),P(c,"ge-editing",!Pe),P(c,"ge-drag-drawer",s.drag_handle==="drawer"),Aa();var e=$a();Qa(e),el(e),tl(),sa(),ua(),Qi(),le("onInit"),za(),Da(),No(R),st(c),L&&!c.contains(L)?ne(null):L&&y(L,"ge-selected"),Ea()}function Re(){Te(),xa(),k(c,"ge-editing ge-drag-drawer ge-dropping"),L&&k(L,"ge-selected"),le("onBeforeDeinit"),ye(),yn(),de(),Pr(c),Ve.clear(),Ro(c),le("onDeinit"),zt(c),zr(c),Zi(),Va(),Wa(),Xn(!1,c)}function Pr(e){A(e,".ge-tools-drawer").forEach(function(t){t.remove()})}function zr(e){A(e,"[data-ge-row-cols]").forEach(function(t){t.removeAttribute("data-ge-row-cols")})}function Pi(){var e=[];return[T,M,B].forEach(function(t){Object.keys(t).forEach(function(n){var r=t[n],o=r.unmark||r.onDeinit||r.onBeforeDeinit;o&&!r.cleanMarkup&&e.push(n)})}),e}function zi(){var e=new Map,t=new Map;function n(o){var i=o.cloneNode(o.nodeName==="TEMPLATE");if(o.nodeType!==1||(e.set(i,o),t.set(o,i),o.nodeName==="TEMPLATE"))return i;for(var l=o.firstChild;l;l=l.nextSibling)l.nodeType===1&&b(l,"ge-tools-drawer")||i.appendChild(n(l));return i}var r=n(c);return{root:r,liveOf:function(o){return e.get(o)||null},copyOf:function(o){return t.get(o)||null}}}function jr(){if(xe)return lt();var e=Pi();if(e.length)return e.forEach(function(o){G("snapshot:"+o,'the "'+o+'" plugin has no cleanMarkup, so the canvas leaves editing to be read: open texts and settings panels close')}),lt();var t=zi(),n=t.root;[n].concat(A(n,".ge-selected, .ge-settings-target, .ge-leaving")).forEach(function(o){k(o,"ge-selected ge-settings-target ge-leaving"),et(o)}),A(n,".ge-drop-marker").forEach(function(o){o.remove()}),Pr(n),Ro(n);var r=null;return[T,M,B].forEach(function(o){Object.keys(o).forEach(function(i){var l=o[i];r||!l.cleanMarkup||l.cleanMarkup(n,t.liveOf)===!1&&(r=i)})}),r?(G("snapshot-refused:"+r,'the "'+r+'" plugin cannot take its marking off a copy right now, so the canvas leaves editing to be read'),lt()):(zt(n),zr(n),A(n,"[data-ge-container]").forEach(Xr),He.forEach(function(o){var i=t.copyOf(o.el);i&&A(i,"[draggable]").forEach(function(l){l.removeAttribute("draggable")})}),Lo(n),Xn(!1,n),Je(n),n.innerHTML)}function lt(e){if(e&&e.keepEditing)return jr();Re(),Je(c);var t=c.innerHTML;return he(),t}function ji(e){Re(),Je(e);var t=e.outerHTML;return he(),t}function Ri(e){return or(lt(e))}function Ni(e){xe&&(En(),x&&A(x,".gm-edit-mode").forEach(function(t){k(t,"active btn-danger")})),Lt(!1),Re(),ht(c,e),he()}function Di(){le("onDestroy"),xe&&En(),Lt(!1),Re(),L=null,Zt===a&&(Zt=null),cr(),so(),Co(),wn(),te.remove(),St.abort(),en.delete(c),rt=!0}function Ii(){var e=sr=Fi();Tn("grid",{},Ei()),s.row_cols!==!1&&Tn("grid",{},La());var t=function(r){return!s.plugins||s.plugins.indexOf(r)!==-1},n=function(r,o){return o.always===!0||t(r)};Object.keys(O.containers).forEach(function(r){t(r)&&(T[r]=O.containers[r](e))}),Object.keys(O.features).forEach(function(r){var o=O.features[r];n(r,o)&&(M[r]=o(e))}),Object.keys(O.utilities).forEach(function(r){t(r)&&(B[r]=O.utilities[r](e),(B[r].families||[]).forEach(function(o){Tn(r,B[r],o)}))}),Object.keys(M).forEach(function(r){var o=M[r].methods||{};Object.keys(o).forEach(function(i){Ne[i]=o[i]})}),(s.plugins||[]).forEach(function(r){T[r]||M[r]||B[r]||G("plugin:"+r,'the "'+r+'" plugin is not loaded: include dist/plugins/grideditor.'+r+".js after the editor")})}function le(e,t){[T,M,B].forEach(function(n){Object.keys(n).forEach(function(r){n[r][e]&&n[r][e](t)})})}function Fi(){return{canvas:c,settings:s,t:m,warn:K,containerId:qr,freshNode:Ji,defaultRegion:$i,createTool:F,createMoveTool:De,addSettingsTool:mt,deleteNode:je,place:qt,placeInTarget:wi,createPaneControls:ta,makeLabelEditable:na,labelIn:ra,unwrapLabels:oa,suspendToggles:Yr,resumeToggles:Jr,emit:D,payloadFor:ie,operate:J,kindOf:ue,view:$n,previewing:function(){return Pe},viewTiers:function(){return Yo(R).map(function(e){return e.key})},breakpoints:C.map(function(e){return e.key}),getUtility:Hr,setUtility:Ln,utilityField:Yi,bareStyle:Ki,hostStyle:Kr,setHostStyle:qi,openDialog:yo,closeDialog:de,rowFromLayout:at,nodeHtml:ji,snapshotHtml:jr,setHtml:Ni,confirm:dr,textReady:li,attachPicker:Qr,openPicker:_r,closePicker:ye,detailsOf:function(e,t){var n=Nn(e);return n&&!(t&&t.build===!1)&&Dt(n),n},drawerOf:kn,refreshToolbar:mi,toolbarItems:function(e){return x?A(x,'[data-ge-toolbar="feature"][data-ge-feature="'+e+'"]'):[]},getActiveTarget:function(){return s.active_target?L:null},setActiveTarget:function(e){var t=!!s.active_target&&(e===null||Sr(e));return t&&ne(e),t},removeNode:oi,panelOpen:function(){return U||$||N&&b(N,"show")?!0:qe()==="inline"&&A(c,".ge-tools-drawer > .ge-details").some(tt)},contains:function(e){return!e||e.nodeType!==1?!1:c.contains(e)||x&&x.contains(e)||X&&X.contains(e)||N&&N.contains(e)?!0:Object.keys(z).some(function(t){return z[t].contains(e)})}}}function kn(e){if(b(e,"ge-content")){var t=e.parentElement;return b(t,"ge-text-block")?j(t,".ge-tools-drawer"):null}return j(e,".ge-tools-drawer")}var ke={},Wi=".row, .column, .ge-content, .ge-element, [data-ge-container]",Ue="data-ge-preview",An=!1;function Tn(e,t,n){var r=n.name||n.prefix;if(ke[r]){K('the "'+e+'" plugin declares the utility "'+r+'", which the "'+ke[r].plugin+'" plugin already declared: ignored');return}ke[r]={plugin:e,family:Object.assign({},n,{name:r,values:n.values.map(String),appliesTo:n.appliesTo||t.appliesTo||["row","column"]})}}function Pt(e,t){return ke[e]?ke[e].family:(G("utility:"+e,t+"("+JSON.stringify(e)+"): no loaded plugin declares that utility"),null)}function Rr(e,t){return t==="plain"&&(t="text"),e.appliesTo.indexOf(t)!==-1?!0:!!T[t]&&e.appliesTo.indexOf("container")!==-1}function Nr(e){return Object.keys(ke).map(function(t){return ke[t].family}).filter(function(t){return Rr(t,e)})}function On(e,t,n){return e.className?e.className(t.key,n):e.prefix+(t.infix?"-"+t.infix:"")+"-"+n}function Ae(e,t,n){for(var r=(e.getAttribute("class")||"").split(/\s+/),o=0;o<t.values.length;o++)if(r.indexOf(On(t,n,t.values[o]))!==-1)return t.values[o];return null}function Dr(e,t,n){for(var r=C.indexOf(n)-1;r>=0;r--){var o=Ae(e,t,C[r]);if(o!==null)return{tier:C[r],value:o}}return null}function Ir(e,t,n){var r=Ae(e,t,n);if(r!==null)return r;var o=Dr(e,t,n);return o?o.value:null}function Sn(e,t){return C.map(function(n){return{tier:n,value:Ae(e,t,n)}}).filter(function(n){return n.value!==null})}function Fr(e,t,n,r){t.values.forEach(function(o){k(e,On(t,n,o))}),r!==null&&y(e,On(t,n,r)),et(e)}function Wr(e,t,n){return n===Z?Ae(e,t,C[0]):Ir(e,t,ee(n))}function Hi(e,t,n,r){if(n!==Z){var o=ee(n);return Ae(e,t,o)===r?null:{writes:[{tier:o,value:r}],cleared:[]}}var i=[],l=[];return Sn(e,t).forEach(function(d){d.tier!==C[0]&&(i.push({tier:d.tier,value:null}),l.push({breakpoint:d.tier.key,value:d.value}))}),Ae(e,t,C[0])!==r&&i.unshift({tier:C[0],value:r}),i.length?{writes:i,cleared:l}:null}function Hr(e,t,n){e=ge(e);var r=Pt(t,"getUtility");if(!r||!e)return null;var o=n===void 0?R:Jn(n);return o===null?(K("getUtility("+JSON.stringify(n)+"): no such layout mode"),null):Wr(e,r,o)}function Ln(e,t,n,r){r=typeof r=="string"?{view:r}:r||{},e=ge(e);var o=Pt(t,"setUtility");if(!o||!e)return!1;var i=r.view===void 0?R:Jn(r.view);if(i===null)return K("setUtility("+JSON.stringify(r.view)+"): no such layout mode"),!1;if(n=n==null||n===""?null:String(n),n!==null&&o.values.indexOf(n)===-1)return K("setUtility: "+JSON.stringify(n)+' is not a value of "'+t+'", which takes '+JSON.stringify(o.values)),!1;var l=ue(e);if(!Rr(o,l))return K('setUtility: "'+t+'" does not apply to a '+l),!1;if(o.write)return o.write(e,n,i,r.source||"api");var d=Hi(e,o,i,n);return d?J(function(){var f=ie(l,e,{family:t,breakpoint:i,tiers:d.writes.map(function(g){return g.tier.key}),from:Wr(e,o,i),to:n,cleared:d.cleared,source:r.source||"api"});return D("before-utility",f)?(d.writes.forEach(function(g){Fr(e,o,g.tier,g.value)}),be(e),D("after-utility",f),!0):(be(e),!1)}):!1}function Ki(e,t,n){var r=Pt(t,"bareStyle");if(e=ge(e),!r||!e)return null;var o=e.getAttribute("class");C.forEach(function(l){Fr(e,r,l,null)});var i=getComputedStyle(e).getPropertyValue(n);return o===null?e.removeAttribute("class"):e.setAttribute("class",o),i}function be(e){var t=Nn(e);if(t){var n=S(t,".ge-classes");n&&(n.value=Rn(e).join(" ")),q(t,".ge-utilities").forEach(function(r){Mn(r)})}Ur(e),st(e)}function Bi(e){return fe(e,Wi)}function st(e){zt(e),R!==Z&&Ui(e,ee(R)),Sa(e),le("onRefresh",e)}function Ui(e,t){Bi(e).forEach(function(n){var r=ue(n),o={};Nr(r).forEach(function(i){!i.preview||!Sn(n,i).length||Object.assign(o,i.preview(Ir(n,i,t),n,r))}),r==="column"&&Object.assign(o,Oa(n,t)),Object.keys(B).forEach(function(i){var l=B[i];l.preview&&Object.assign(o,l.preview(n,r,t.key))}),Object.keys(o).length&&Vi(n,o)})}function Vi(e,t){var n=e.style,r={};Object.keys(t).forEach(function(o){r[o]=[n.getPropertyValue(o),n.getPropertyPriority(o)],n.setProperty(o,String(t[o]),"important")}),e.setAttribute(Ue,JSON.stringify(r))}function zt(e){fe(e,"["+Ue+"]").forEach(function(t){var n=t.style,r={};try{r=JSON.parse(t.getAttribute(Ue))||{}}catch(o){}Object.keys(r).forEach(function(o){var i=r[o];i&&i[0]?n.setProperty(o,i[0],i[1]):n.removeProperty(o)}),t.removeAttribute(Ue),bt(t)})}function Gi(e){var t=document.createElement("div"),n={};t.style.cssText=e.style.cssText;try{n=JSON.parse(e.getAttribute(Ue))||{}}catch(r){}return Object.keys(n).forEach(function(r){var o=n[r];o&&o[0]?t.style.setProperty(r,o[0],o[1]):t.style.removeProperty(r)}),t.style}function Kr(e,t){var n=Gi(e);return t===void 0?n.cssText:{value:n.getPropertyValue(t),priority:n.getPropertyPriority(t)}}function qi(e,t,n,r){if(n=n==null?"":String(n).trim(),r===void 0&&(r=Kr(e,t).priority),n!==""){var o=document.createElement("div").style;if(o.setProperty(t,n,r||""),o.getPropertyValue(t)==="")return!1}var i=e.hasAttribute(Ue);return i&&zt(e),n===""?e.style.removeProperty(t):e.style.setProperty(t,n,r||""),bt(e),i&&st(e),!0}function Xi(e){var t=ue(e),n=Nr(t).filter(function(l){return l.panel!==!1}).map(function(l){return Br(e,l)});if(Object.keys(B).forEach(function(l){var d=B[l],f=d.panel?d.panel(e,t):null;f&&n.push(f)}),!n.length)return null;var r=P(v("div",{class:"ge-utilities"}),"ge-open",An);ur.set(r,e);var o=r.appendChild(v("a",{class:"ge-utilities-toggle"}));o.addEventListener("click",function(){An=!b(r,"ge-open"),io().forEach(function(l){A(l,".ge-utilities").forEach(function(d){P(d,"ge-open",An)})})});var i=r.appendChild(v("div",{class:"ge-utilities-body"}));return n.forEach(function(l){i.appendChild(l)}),Mn(r),r}function Br(e,t){var n=v("label",{class:"ge-utility","data-ge-family":t.name});n.appendChild(v("span",{class:"ge-utility-label"},t.labelKey?m(t.labelKey):t.name));var r=n.appendChild(v("select",{class:"form-select form-select-sm"}));return r.addEventListener("change",function(){Ln(e,t.name,this.value,{source:"panel"})}),n.appendChild(v("small",{class:"ge-utility-note"})),n}function Yi(e,t){var n=Pt(t,"utilityField");if(!n)return null;var r=Br(e,n);return Pn(r,e),Ve.set(r,e),r}var Ve=new Map;function Ur(e){Ve.forEach(function(t,n){if(!n.isConnected){Ve.delete(n);return}e&&t!==e||H(n,".ge-utilities")||Pn(n,t)})}function Mn(e){var t=ur.get(e);q(e,".ge-utilities-toggle").forEach(function(n){n.textContent=m("utility.section",{view:m(Et(R))})}),A(e,".ge-utility").forEach(function(n){Pn(n,t)})}function Pn(e,t){var n=ke[e.getAttribute("data-ge-family")].family,r=j(e,"select"),o=n.choices?n.choices(t,ue(t)):n.values,i,l,d="";if(r.innerHTML="",R===Z){i=Ae(t,n,C[0]),l=m("utility.default");var f=Sn(t,n).filter(function(Q){return Q.tier!==C[0]});f.length&&(d=m("utility.varies",{breakpoints:f.map(function(Q){return Q.tier.key}).join(", ")}))}else{var g=ee(R),h=Dr(t,n,g);i=Ae(t,n,g),l=h?m("utility.inherit",{value:Vr(n,h.value),breakpoint:h.tier.key}):m("utility.default");var E=n.blank?n.blank(t,R):null;E&&i===null&&(l=E)}i!==null&&o.indexOf(i)===-1&&(o=o.concat([i])),r.appendChild(v("option",{value:""},l)),o.forEach(function(Q){r.appendChild(v("option",{value:Q},Vr(n,Q)))}),r.value=i===null?"":i;var _=j(e,".ge-utility-note");_.textContent=d,Ko(_,d!=="")}function Vr(e,t){return e.label?e.label(t):t}var T={},M={},B={},Ne={},Gr=0;function qr(e){return Gr++,"ge-"+e+"-"+Gr+"-"+Math.random().toString(36).slice(2,6)}function Ji(e){var t=V(e),n={},r=function(i){return!!document.getElementById(i)||Object.keys(n).some(function(l){return n[l]===i})};if(fe(t,"[id]").forEach(function(i){var l=i.id;if(document.getElementById(l)){var d=ml.exec(l),f;if(d)do f=qr(d[1]);while(r(f));else{for(var g=2;r(l+"-"+g);)g++;f=l+"-"+g}n[l]=f,i.id=f}}),!Object.keys(n).length)return t;var o=Object.keys(T).reduce(function(i,l){return i.concat(T[l].references||[])},fl);return fe(t,"*").forEach(function(i){o.forEach(function(l){var d=i.getAttribute(l);if(d!==null&&!(l==="href"&&d.charAt(0)!=="#")){var f=d.split(/(\s+)/).map(function(g){return n[g]?n[g]:g.charAt(0)==="#"&&n[g.slice(1)]?"#"+n[g.slice(1)]:g}).join("");f!==d&&i.setAttribute(l,f)}})}),t}function $i(){var e=$e();return e.appendChild(ce(W)),e}function we(e){return e?e.getAttribute("data-ge-container"):null}function Qi(){A(c,"[data-ge-container]").forEach(function(e){var t=we(e),n=T[t];if(!n){G("container:"+t,'unknown container type "'+t+'"');return}y(e,"ge-container ge-container-"+t),n.mark(e),j(e,".ge-tools-drawer")||ea(e,t,n)})}function Zi(){A(c,"[data-ge-container]").forEach(function(e){var t=T[we(e)];t&&t.unmark(e),Xr(e)})}function Xr(e){k(e,"ge-container ge-container-"+we(e)),et(e)}function Ge(e,t){var n=v("div",{class:t});return e.insertBefore(n,e.firstChild),n}function jt(e,t){(t||[]).forEach(function(n){F(e,n.title||"",n.className||"",n.iconClass||"bi bi-wrench",n.on)})}function ea(e,t,n){var r=Ge(e,"ge-tools-drawer ge-container-drawer");De(r),mt(r,e,s.container_classes),jt(r,s.container_tools),n.tools&&n.tools(r,e),F(r,m("tool.delete_container"),"ge-delete-container","bi bi-trash",function(){je(t,e,m("confirm.delete_container"),function(o){Ct(e,o)})}),n.addPane&&F(r,m(n.addPaneKey),"ge-add-pane","bi bi-plus-circle",function(){var o=n.addPane(e,{});o&&ae(n.paneKind,o,function(){},{parent:e,source:"tool",container:e})})}function ta(e,t,n,r,o){var i=Ge(e,"ge-tools-drawer ge-pane-drawer");return De(i),mt(i,e,s.pane_classes),jt(i,n),F(i,m("tool.delete_pane"),"ge-delete-pane","bi bi-trash",function(){je(t,e,r,function(l){o(l)})}),i}var Rt=["toggle","dismiss","slide","slide-to","ride"];function Yr(e){e&&fe(e,Rt.map(function(t){return"[data-bs-"+t+"]"}).join(", ")).forEach(function(t){Rt.forEach(function(n){var r=t.getAttribute("data-bs-"+n);r!==null&&(t.setAttribute("data-ge-bs-"+n,r),t.removeAttribute("data-bs-"+n))})})}function Jr(e){e&&fe(e,Rt.map(function(t){return"[data-ge-bs-"+t+"]"}).join(", ")).forEach(function(t){Rt.forEach(function(n){var r=t.getAttribute("data-ge-bs-"+n);r!==null&&(t.setAttribute("data-bs-"+n,r),t.removeAttribute("data-ge-bs-"+n))})})}function na(e){if(!sn.has(e)){var t=H(e,"[data-bs-toggle], [data-ge-bs-toggle]");sn.add(e),e.setAttribute("title",m("tool.rename")),e.addEventListener("dblclick",function(n){n.preventDefault(),n.stopPropagation(),Yr(t),e.setAttribute("contenteditable","true"),e.focus(),window.getSelection().selectAllChildren(e)}),e.addEventListener("keydown",function(n){e.getAttribute("contenteditable")==="true"&&n.key==="Enter"&&(n.preventDefault(),e.blur())}),e.addEventListener("blur",function(){e.removeAttribute("contenteditable"),Jr(t)})}}function ra(e){var t=j(e,".ge-pane-label");return t||(t=v("span",{class:"ge-pane-label"},e.textContent.trim()),e.innerHTML="",e.appendChild(t)),t}function oa(e){A(e,".ge-pane-label").forEach(function(t){sn.delete(t),Qt(t)})}function $r(e,t){var n=ce(t);return ae("column",n,function(){e.appendChild(n)},{parent:e,source:"tool"})}function ia(e,t){!s.add_column.picker||!e||Qr(e,function(){aa(e,t)})}function Qr(e,t){var n=null,r=function(){window.clearTimeout(n),n=null};me(e,"mouseenter mousedown",function(){n||oe||(n=window.setTimeout(function(){n=null,t()},s.add_column.delay))}),me(e,"mouseleave mouseup",r)}function aa(e,t){ye();var n=Bn(t,Ce()),r=H(e,".ge-tools-drawer");r&&y(r,"ge-picker-open"),oe=e.appendChild(v("div",{class:"ge-size-picker"})),s.valid_col_sizes.forEach(function(o){var i=v("a",{class:"ge-size","data-ge-size":o,title:la(o)},Y(o)?o:Ie(C[0],o));P(i,"ge-size-tight",Y(o)&&o>n),P(i,"ge-size-flex",!Y(o)),i.addEventListener("click",function(l){l.preventDefault(),l.stopPropagation(),ye(),$r(t,o)}),oe.appendChild(i)}),kr(e)}function la(e){return e==="equal"?m("tool.column_equal"):e==="auto"?m("tool.column_auto"):m("tool.column_size",{size:e})}function ye(){if(!oe)return!1;var e=H(oe,".ge-tools-drawer");return e&&k(e,"ge-picker-open"),oe.remove(),oe=null,!0}function sa(){A(c,".row").forEach(function(e){if(!j(e,".ge-tools-drawer")){var t=Ge(e,"ge-tools-drawer");De(t),mt(t,e,s.row_classes),jt(t,s.row_tools),F(t,m("tool.delete_row"),"ge-delete-row","bi bi-trash",function(){je("row",e,m("confirm.delete_row"),function(n){Ct(e,n)})}),F(t,m("tool.add_column"),"ge-add-column","bi bi-plus-circle",function(){ye()||$r(e,Xe(e,Ce())?null:s.add_column.size)}),ia(j(t,".ge-add-column"),e)}})}function ua(){A(c,".column").forEach(function(e){if(!j(e,".ge-tools-drawer")){var t=Ge(e,"ge-tools-drawer");De(t),s.resize.tools!==!1&&(F(t,m("tool.column_narrower"),"ge-decrease-col-width","bi bi-dash-lg",function(n){vn(e,n.shiftKey?ft(s.valid_col_sizes):Nt(s.valid_col_sizes.filter(Y),dt(e),-1),"tool")}),F(t,m("tool.column_wider"),"ge-increase-col-width","bi bi-plus-lg",function(n){vn(e,n.shiftKey?da(e):Nt(s.valid_col_sizes.filter(Y),dt(e),1),"tool")})),s.indent.tools!==!1&&(F(t,m("tool.indent_decrease"),"ge-decrease-col-offset","bi bi-text-indent-right",function(n){mr(e,n.shiftKey?ft(s.valid_col_offsets):Nt(s.valid_col_offsets,ct(e),-1),"tool")}),F(t,m("tool.indent_increase"),"ge-increase-col-offset","bi bi-text-indent-left",function(n){mr(e,n.shiftKey?ca(e):Nt(s.valid_col_offsets,ct(e),1),"tool")})),mt(t,e,s.col_classes),jt(t,s.col_tools),F(t,m("tool.delete_column"),"ge-delete-column","bi bi-trash",function(){je("column",e,m("confirm.delete_column"),function(n){Go(e,400,n,!0)})}),F(t,m("tool.add_row"),"ge-add-row","bi bi-plus-circle",function(){var n=$e();ae("row",n,function(){e.appendChild(n)},{parent:e,source:"tool"})})}})}function Ce(){return R===Z?C[C.length-1]:ee(R)}function ut(e){var t=Ce();if(Wt(e,t))return null;var n=Hn(e,t);return n===null?W:n}function dt(e){var t=ut(e);if(Y(t))return t;var n=Math.round(wt(e)/Zr(e.parentElement)*W);return Math.min(Math.max(n,1),W)}function Zr(e){var t=window.getComputedStyle(e);return e.clientWidth-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight)}function ct(e){return Kt(e,Ce())||0}function Nt(e,t,n){var r=e.indexOf(t);return r===-1?e.reduce(function(o,i){return Math.abs(i-t)<Math.abs(o-t)?i:o},e[0]):e[Math.min(Math.max(r+n,0),e.length-1)]}function ft(e){return e.filter(Y).reduce(function(t,n){return Math.min(t,n)},W)}function zn(e){return e.filter(Y).reduce(function(t,n){return Math.max(t,n)},0)}function da(e){var t=Bn(e.parentElement,Ce(),e)-ct(e);return Math.min(zn(s.valid_col_sizes),Math.max(t,1))}function ca(e){var t=Bn(e.parentElement,Ce(),e)-dt(e);return Math.min(zn(s.valid_col_offsets),Math.max(t,0))}function De(e){return s.drag_handle==="drawer"?null:F(e,m("tool.move"),"ge-move","bi bi-arrows-move")}var jn=".ge-tools-drawer:not(.ge-text-drawer):not(.ge-pane-drawer):not(.ge-code-inline)";function fa(){if(s.drawer_overflow==="wrap"||!window.ResizeObserver||!window.MutationObserver)return;var e=new Set,t=null;function n(l){e.add(l),t===null&&(t=window.requestAnimationFrame(r))}function r(){t=null;var l=Array.from(e).filter(function(d){return d.isConnected?!0:(o.unobserve(d),!1)});e.clear(),ma(l)}var o=new window.ResizeObserver(function(l){l.forEach(function(d){n(d.target)})}),i=new window.MutationObserver(function(l){l.forEach(function(d){var f=d.target;if(d.type==="attributes"){var g=f.parentNode;g&&g.nodeType===1&&g.matches(jn)&&n(g);return}if(f.nodeType===1&&f.matches(jn)){n(f);return}d.addedNodes.forEach(function(h){h.nodeType===1&&fe(h,jn).forEach(function(E){y(E,"ge-drawer-fit"),o.observe(E),n(E)})})})});i.observe(c,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style"]}),St.signal.addEventListener("abort",function(){i.disconnect(),o.disconnect(),t!==null&&window.cancelAnimationFrame(t)})}function ma(e){var t=e.map(function(r){var o={drawer:r,tools:q(r,"a").filter(function(i){return!b(i,"ge-drawer-more")}),expanded:b(r,"ge-drawer-expanded")};return k(r,"ge-drawer-overflow ge-drawer-expanded"),o.tools.forEach(function(i){k(i,"ge-tool-overflow")}),o}),n=t.filter(function(r){return r.rights=r.tools.map(function(o){var i=o.getClientRects();return i.length?i[0].right:null}),to(r,eo(r.drawer))});n.forEach(function(r){y(r.drawer,"ge-drawer-overflow")}),n.forEach(function(r){r.room=eo(r.drawer)}),n.forEach(function(r){for(var o=r.tools.length-1;o>=0&&to(r,r.room,o);o--)y(r.tools[o],"ge-tool-overflow");j(r.drawer,".ge-drawer-more")||F(r.drawer,m("tool.more"),"ge-drawer-more","bi bi-three-dots",function(){P(r.drawer,"ge-drawer-expanded")}),P(r.drawer,"ge-drawer-expanded",r.expanded)})}function eo(e){var t=window.getComputedStyle(e);return e.getBoundingClientRect().right-parseFloat(t.borderRightWidth)-parseFloat(t.paddingRight)}function to(e,t,n){n=n===void 0?e.rights.length-1:n;for(var r=0;r<=n;r++)if(e.rights[r]!==null&&e.rights[r]>t+.5)return!0;return!1}function F(e,t,n,r,o){var i=v("a",{title:t,class:n});return i.appendChild(v("i",{class:r})),e.appendChild(i),typeof o=="function"&&(i.addEventListener("click",o),an.set(i,o)),o&&typeof o=="object"&&(Object.keys(o).forEach(function(l){me(i,l,o[l])}),typeof o.click=="function"&&an.set(i,o.click)),i}function Rn(e){return(e.getAttribute("class")||"").split(/\s+/).filter(function(t){return t!==""&&!ga(t)})}function ga(e){return e==="row"||e==="column"||/^(ge-|ui-)/.test(e)||/^col(-(sm|md|lg|xl|xxl))?(-auto)?$/.test(e)?!0:C.some(function(t){return new RegExp("^("+t.colPrefix+"|"+t.offsetPrefix+")\\d+$").test(e)})}function pa(e,t){Rn(e).forEach(function(n){k(e,n)}),t.split(/\s+/).forEach(function(n){n!==""&&y(e,n)}),et(e)}function mt(e,t,n){var r=va(t,n||[]);Be.set(t,r),qe()!=="sidebar"&&F(e,m("tool.settings"),"ge-settings","bi bi-gear-fill",function(){ba(t,r,this)});var o=ue(t);return Object.keys(B).forEach(function(i){B[i].drawerTools&&B[i].drawerTools(e,t,o)}),Object.keys(M).forEach(function(i){M[i].drawerTools&&M[i].drawerTools(e,t,o)}),e.appendChild(r)}function va(e,t){var n=v("div",{class:"ge-details"});n.appendChild(ro(m("panel.section_general")));var r=n.appendChild(v("div",{class:"ge-details-general"})),o=function(g){var h=v("label",{class:"ge-field"});return h.appendChild(v("span",{class:"ge-field-label"},g)),r.appendChild(h)},i=v("input",{class:"ge-id form-control form-control-sm",placeholder:m("tool.id_placeholder"),title:m("tool.id_title")});i.value=e.getAttribute("id")||"",o(m("panel.id")).appendChild(i),i.addEventListener("change",function(){this.value===""?e.removeAttribute("id"):e.setAttribute("id",this.value)});var l=v("input",{class:"ge-classes form-control form-control-sm",placeholder:m("tool.classes_placeholder"),title:m("tool.classes_title")});l.value=Rn(e).join(" "),o(m("panel.classes")).appendChild(l),l.addEventListener("change",function(){pa(e,this.value),be(e)});var d=r.appendChild(v("div",{class:"btn-group btn-group-sm ge-presets",role:"group"}));t.forEach(function(g){var h=b(e,g.cssClass),E=v("a",{role:"button",class:"btn btn-sm btn-outline-secondary",title:g.title?g.title:m("tool.toggle_class",{label:g.label}),"aria-pressed":h?"true":"false"});E.innerHTML=g.label,P(E,"active",h),E.addEventListener("click",function(){P(E,"active"),E.setAttribute("aria-pressed",b(E,"active")?"true":"false"),P(e,g.cssClass,b(E,"active")),be(e)}),d.appendChild(E)});var f=n.appendChild(document.createComment(" ge-details-body "));return on.set(n,{node:e,anchor:f,nodes:null}),n}function Dt(e){var t=on.get(e);if(!(!t||t.nodes)){var n=ha(t.node),r=Xi(t.node);r&&n.push(r),n.forEach(function(o){e.insertBefore(o,t.anchor)}),t.nodes=n}}function no(e){var t=on.get(e);!t||!t.nodes||($&&$.home&&e.contains($.home)&&de(),t.nodes.forEach(function(n){n.remove()}),t.nodes=null,Ve.forEach(function(n,r){r.isConnected||Ve.delete(r)}))}function ro(e){return v("h6",{class:"ge-section-title"},e)}function ha(e){var t=ue(e),n=qe(),r=[];return[T,M,B].forEach(function(o){Object.keys(o).forEach(function(i){var l=o[i],d=l.panelSection?l.panelSection(e,t):null;if(!(!d||!d.body)){var f=v("div",{class:"ge-panel-section","data-ge-plugin":i});if(n==="offcanvas"||n==="modal"||n==="sidebar")f.appendChild(ro(m(d.labelKey))),f.appendChild(d.body);else{var g=m(d.labelKey),h=f.appendChild(v("button",{type:"button",class:"btn btn-sm btn-outline-secondary ge-panel-section-open"},g));se(d.body),f.appendChild(d.body),h.addEventListener("click",function(){yo(d.titleKey?m(d.titleKey,{kind:Wn(e)}):g,d.body,h)})}r.push(f)}})}),r}var oo=["offcanvas","popover","modal","inline","sidebar"],z={},U=null,It=new WeakMap;function qe(){return oo.indexOf(s.settings_panel)!==-1?s.settings_panel:(G("settings_panel",'settings_panel "'+s.settings_panel+'" is not one of '+oo.join(", ")+": using offcanvas"),"offcanvas")}function Nn(e){return e&&Be.get(e)||null}function io(){var e=[c];return U&&U.mode!=="inline"&&e.push(U.details),Oe&&e.push(Oe.details),e}function ba(e,t,n){var r=qe();if(r==="inline"){tt(t)?(se(t),no(t)):(Dt(t),Ee(t));return}var o=U&&U.details===t;Te(),o||wa(r,e,t,n)}function wa(e,t,n,r){var o=lo(e),i=new AbortController;U={mode:e,node:t,details:n,home:n.parentElement,next:n.nextElementSibling,gear:r,listening:i},S(o,".ge-settings-title").textContent=m("panel.title",{kind:Wn(t)}),Dt(n),S(o,".ge-settings-body").appendChild(n),Ee(n),y(t,"ge-settings-target");var l={signal:i.signal};if(document.addEventListener("keydown",function(f){f.key==="Escape"&&!$&&Te()},l),e==="offcanvas"){var d=window.innerWidth<576;P(o,"offcanvas-end",!d),P(o,"offcanvas-bottom",d),k(o,"hiding"),o.getBoundingClientRect(),y(o,"show")}else e==="popover"?(Dn(o,r),me(window,"scroll resize",function(){Dn(o,r)},l),window.ResizeObserver&&(U.observer=new window.ResizeObserver(function(){Dn(o,r)}),U.observer.observe(n)),me(document,"mousedown touchstart",function(f){!$&&!o.contains(f.target)&&!r.contains(f.target)&&Te()},l)):In(o,function(){U&&U.mode==="modal"&&Te()})}function Te(){de();var e=U;if(e){U=null;var t=z[e.mode];e.listening.abort(),e.observer&&e.observer.disconnect(),e.mode==="offcanvas"?(k(t,"show"),y(t,"hiding"),window.setTimeout(function(){k(t,"hiding")},300)):e.mode==="popover"?se(t):Fn(t),ao(e)}}function ao(e){no(e.details),k(e.node,"ge-settings-target"),e.details.style.removeProperty("display"),bt(e.details),e.home&&Se(e.home)?e.next&&e.next.parentElement===e.home?e.home.insertBefore(e.details,e.next):e.home.appendChild(e.details):e.details.remove()}function lo(e){if(z[e])return z[e];var t=function(){return v("button",{type:"button",class:"btn-close ge-settings-close","aria-label":m("panel.close")})},n;return e==="offcanvas"?(n=V('<div class="offcanvas offcanvas-end ge-settings-panel ge-settings-offcanvas" tabindex="-1" role="dialog"><div class="offcanvas-header"><h5 class="offcanvas-title ge-settings-title"></h5></div><div class="offcanvas-body ge-settings-body"></div></div>'),S(n,".offcanvas-header").appendChild(t())):e==="popover"?(n=V('<div class="popover bs-popover-bottom ge-settings-panel ge-settings-popover" role="dialog"><div class="popover-arrow"></div><div class="popover-header"><span class="ge-settings-title"></span></div><div class="popover-body ge-settings-body"></div></div>'),S(n,".popover-header").appendChild(t()),se(n)):e==="sidebar"?(n=V('<div class="offcanvas offcanvas-end ge-settings-panel ge-settings-sidebar" tabindex="-1" role="complementary"><div class="offcanvas-header"><h5 class="offcanvas-title ge-settings-title"></h5></div><div class="offcanvas-body ge-settings-body"></div></div>'),n.id="ge-settings-sidebar-"+lr,S(n,".offcanvas-header").appendChild(t()),z["sidebar-toggle"]=document.body.appendChild(ya(n))):(n=V('<div class="modal fade ge-settings-panel ge-settings-modal" tabindex="-1" role="dialog" aria-hidden="true"><div class="modal-dialog modal-dialog-centered modal-dialog-scrollable"><div class="modal-content"><div class="modal-header"><h5 class="modal-title ge-settings-title"></h5></div><div class="modal-body ge-settings-body"></div><div class="modal-footer"></div></div></div></div>'),S(n,".modal-header").appendChild(t()),S(n,".modal-footer").appendChild(v("button",{type:"button",class:"btn btn-primary ge-settings-close"},m("panel.done")))),yt(n,"click",".ge-settings-close",function(r){r.preventDefault(),e==="sidebar"?ne(null):Te()}),z[e]=document.body.appendChild(n),n}function so(){Te(),po(),k(document.documentElement,"ge-sidebar-open"),Object.keys(z).forEach(function(e){e==="modal"?cn(z[e]):z[e].remove()}),Object.keys(z).forEach(function(e){wo(z[e])}),z={}}var uo=576,Oe=null,gt=null;function Ft(){return b(c,"ge-editing")}function ya(e){var t=v("button",{type:"button",class:"ge-sidebar-toggle","aria-controls":e.id});return t.appendChild(v("i")),t.addEventListener("click",function(){Ca(!Ke)}),t}function Ca(e){Ke=e,co()}function co(){var e=z.sidebar,t=z["sidebar-toggle"];if(e){var n=!Ke;n&&!b(e,"show")?(k(e,"hiding"),e.getBoundingClientRect(),y(e,"show")):!n&&b(e,"show")&&(k(e,"show"),y(e,"hiding"),window.setTimeout(function(){k(e,"hiding")},300));var r=m(n?"panel.collapse":"panel.expand");t.setAttribute("aria-expanded",n?"true":"false"),t.setAttribute("aria-label",r),t.setAttribute("title",r),S(t,"i").className="bi "+(n?"bi-chevron-right":"bi-chevron-left"),fo()}}function fo(){P(document.documentElement,"ge-sidebar-open",!!z.sidebar&&Ft()&&!Ke&&window.innerWidth>=uo)}function Ea(){if(qe()==="sidebar"){var e=lo("sidebar");Ke===null&&(Ke=window.innerWidth<uo),e.style.removeProperty("display"),z["sidebar-toggle"].style.removeProperty("display"),vo(),co()}}function xa(){go();var e=z.sidebar;e&&(e.style.display="none",z["sidebar-toggle"].style.display="none",k(document.documentElement,"ge-sidebar-open"))}function mo(e){var t=z.sidebar;S(t,".ge-settings-title").textContent=e,t.setAttribute("aria-label",e)}function go(){var e=Oe;Oe=null,e&&ao(e)}function po(){go(),gt&&(gt.body.remove(),gt=null)}function vo(){var e=z.sidebar;if(!(!e||!Ft())){var t=L?Nn(L):null;if(!(t?Oe&&Oe.details===t:!Oe&>)){po();var n=S(e,".ge-settings-body");if(!t){var r=_a(),o=r?r.body:v("p",{class:"ge-sidebar-empty"},m("panel.sidebar_empty"));mo(r?r.title:m("panel.sidebar_title")),n.appendChild(o),gt={body:o};return}Oe={node:L,details:t,home:t.parentElement,next:t.nextElementSibling},mo(m("panel.title",{kind:Wn(L)})),Dt(t),n.appendChild(t),Ee(t)}}}function _a(){var e=s.sidebar.empty,t=null;return typeof e=="function"?t=ho(e(a),function(n){return n.title}):e!=null&&G("sidebar.empty","sidebar.empty is a function(ge) returning { title, body }, not "+typeof e+": ignored"),[T,M,B].forEach(function(n){Object.keys(n).forEach(function(r){var o=n[r];t||!o.sidebarEmpty||(t=ho(o.sidebarEmpty(sr),function(i){return typeof i.titleKey=="string"&&i.titleKey!==""?m(i.titleKey):""}))})}),t}function ho(e,t){if(!e||!e.body||e.body.nodeType!==1)return null;var n=t(e);return{title:typeof n=="string"&&n!==""?n:m("panel.sidebar_title"),body:e.body}}function bo(e){var t=H(e,".ge-tools-drawer",c);if(t){var n=t.parentElement,r=Be.has(n)?n:q(n).filter(function(i){return Be.has(i)})[0];if(r)return r}for(var o=e;o&&o!==c;o=o.parentElement)if(Be.has(o))return o;return null}function Dn(e,t){if(Se(t)){Ee(e);var n=t.getBoundingClientRect(),r=8,o=j(e,".popover-body");o.style.removeProperty("max-height");var i=wt(e),l=Yt(e),d=window.innerHeight-n.bottom-2*r,f=n.top-2*r,g=l<=d||d>=f,h=g?d:f;l>h&&(Le(o,{"max-height":Math.max(120,h-(l-Yt(o)))}),l=Yt(e));var E=g?n.bottom+r:n.top-r-l,_=Math.max(r,Math.min(n.left+n.width/2-24,window.innerWidth-i-r));P(e,"bs-popover-bottom",g),P(e,"bs-popover-top",!g),Le(e,{top:E+window.pageYOffset,left:_+window.pageXOffset}),Le(j(e,".popover-arrow"),{left:Math.max(r,Math.min(n.left+n.width/2-_-8,i-24))})}}function In(e,t){var n=xt(),r=It.get(e);if(r||(r={wanted:null,busy:!1,backdrop:null,dismissed:t},It.set(e,r)),r.dismissed=t,!n){r.backdrop||(r.backdrop=v("div",{class:"modal-backdrop fade show ge-settings-backdrop"}),r.backdrop.addEventListener("click",function(){r.dismissed()}),document.body.appendChild(r.backdrop)),y(e,"show"),e.style.display="block",e.removeAttribute("aria-hidden");return}var o=n.getOrCreateInstance(e);r.watched||(r.watched=!0,fr(e),e.addEventListener("hide.bs.modal",function(){r.wanted==="open"&&(r.wanted="closed",r.busy=!0)}),e.addEventListener("shown.bs.modal",function(){r.busy=!1,r.wanted==="closed"&&Fn(e)}),e.addEventListener("hidden.bs.modal",function(){r.busy=!1,r.wanted==="open"?In(e,r.dismissed):r.dismissed()})),r.wanted="open",r.busy||(r.busy=!0,o.show())}function Fn(e){var t=xt(),n=It.get(e);if(n){if(n.wanted="closed",!t){n.backdrop&&(n.backdrop.remove(),n.backdrop=null),k(e,"show"),e.style.removeProperty("display"),e.setAttribute("aria-hidden","true");return}!n.busy&&b(e,"show")&&(n.busy=!0,t.getOrCreateInstance(e).hide())}}function wo(e){var t=It.get(e);t&&t.backdrop&&(t.backdrop.remove(),t.backdrop=null)}var X=null,$=null;function ka(){return X||(X=V('<div class="modal fade ge-dialog" tabindex="-1" role="dialog" aria-hidden="true"><div class="modal-dialog modal-dialog-centered modal-dialog-scrollable"><div class="modal-content"><div class="modal-header"><h5 class="modal-title ge-dialog-title"></h5></div><div class="modal-body ge-dialog-body"></div><div class="modal-footer"></div></div></div></div>'),S(X,".modal-header").appendChild(v("button",{type:"button",class:"btn-close ge-dialog-close","aria-label":m("panel.close")})),S(X,".modal-footer").appendChild(v("button",{type:"button",class:"btn btn-primary ge-dialog-close"},m("panel.done"))),yt(X,"click",".ge-dialog-close",function(e){e.preventDefault(),de()}),document.body.appendChild(X))}function yo(e,t,n){de();var r=ka(),o=new AbortController;$={body:t,home:t.parentElement,next:t.nextElementSibling,opener:n||document.activeElement,listening:o},S(r,".ge-dialog-title").textContent=e,S(r,".ge-dialog-body").appendChild(t),Ee(t),xt()||document.addEventListener("keydown",function(i){i.key==="Escape"&&de()},{signal:o.signal}),Object.keys(z).forEach(function(i){y(z[i],"ge-under-dialog")}),In(r,function(){de()})}function de(){var e=$;e&&($=null,e.listening.abort(),Fn(X),Object.keys(z).forEach(function(t){k(z[t],"ge-under-dialog")}),se(e.body),e.home&&Se(e.home)?e.next&&e.next.parentElement===e.home?e.home.insertBefore(e.body,e.next):e.home.appendChild(e.body):e.body.remove(),e.opener&&Se(e.opener)&&e.opener.focus&&e.opener.focus())}function Co(){de(),X&&(wo(X),cn(X),X=null)}function Wn(e){var t=ue(e);if(T[t]&&T[t].labelKey)return m(T[t].labelKey);var n=Object.keys(T).filter(function(r){return T[r].paneKind===t&&T[r].paneLabelKey})[0];if(n)return m(T[n].paneLabelKey);switch(t){case"row":return m("panel.kind_row");case"column":return m("panel.kind_column");case"text":return m("panel.kind_text");case"element":return m("panel.kind_element");case"section":return m("panel.kind_section");case"tab":return m("panel.kind_tab");case"accordion-item":return m("panel.kind_accordion_item");default:return t}}function Aa(){A(c,'.column, div[class*="col-"], div.col').forEach(function(e){y(e,"column"),!(Ma(e).length||Eo(e.parentElement))&&Bt(e,C[0],W)})}function Eo(e){return b(e,"row")&&C.some(function(t){return nt.some(function(n){return b(e,rr(t,n))})})}function Xe(e,t){if(!b(e,"row"))return null;for(var n=C.indexOf(t);n>=0;n--)for(var r=0;r<nt.length;r++)if(b(e,rr(C[n],nt[r])))return{tier:n,value:nt[r]};return null}function xo(e,t){for(var n=C.indexOf(t);n>=0;n--){var r=Ye(e,C[n]);if(r!==null)return{tier:n,size:r}}return null}function Wt(e,t){var n=Xe(e.parentElement,t);if(!n)return null;var r=xo(e,t);return!r||n.tier>r.tier||n.tier===r.tier&&r.size==="equal"?n:null}function Ta(e){return e.value==="auto"?0:W/parseInt(e.value,10)}function Oa(e,t){var n=Wt(e,t);return n?{flex:"0 0 auto",width:n.value==="auto"?"auto":100/parseInt(n.value,10)+"%","max-width":"100%"}:Eo(e.parentElement)&&!xo(e,t)?{flex:"0 0 auto",width:"100%","max-width":"100%"}:{}}function Sa(e){fe(e,".row").forEach(function(t){var n=s.row_cols===!1?null:R===Z?Xe(t,C[0])||null:Xe(t,ee(R));n?t.setAttribute("data-ge-row-cols",_o(n.value)):t.removeAttribute("data-ge-row-cols")})}function _o(e){return e==="auto"?m("badge.row_cols_auto"):m("badge.row_cols",{count:e})}function La(){return{name:"row-cols",prefix:"row-cols",values:nt,appliesTo:["row"],labelKey:"utility.row_cols"}}function Ye(e,t){var n=Ao(e,t.colPrefix);return n!==null?n:b(e,Ie(t,"auto"))?"auto":b(e,Ie(t,"equal"))?"equal":null}function Ht(e,t){return Ao(e,t.offsetPrefix)}function Hn(e,t){return ko(e,t,Ye)}function Kt(e,t){return ko(e,t,Ht)}function ko(e,t,n){for(var r=C.indexOf(t);r>=0;r--){var o=n(e,C[r]);if(o!==null)return o}return null}function Ao(e,t){var n=new RegExp("(?:^|\\s)"+t+"(\\d+)(?:\\s|$)").exec(e.getAttribute("class")||"");return n?parseInt(n[1],10):null}function To(e,t,n){var r=(e.getAttribute("class")||"").split(/\s+/).filter(function(o){return o!==""&&!new RegExp("^"+t+"\\d+$").test(o)});n!==null&&r.push(t+n),e.setAttribute("class",r.join(" "))}function Bt(e,t,n){To(e,t.colPrefix,null),nr.forEach(function(r){k(e,Ie(t,r))}),n!=null&&y(e,Ie(t,n))}function Kn(e,t,n){To(e,t.offsetPrefix,n||null)}function Ma(e){return C.filter(function(t){return Ye(e,t)!==null})}function Bn(e,t,n){var r=0;return q(e,".column").forEach(function(o){if(!(n&&o===n)){var i=Wt(o,t),l=i?Ta(i):Hn(o,t);r+=(Y(l)?l:0)+(Kt(o,t)||0)}}),W-r}function Ut(e){var t=e.size===null||e.size===void 0?null:e.size,n=e.offset===null||e.offset===void 0?0:e.offset;return n=Math.min(Math.max(n,0),Xo),t===null||!Y(t)?{size:t,offset:n,refused:!1}:(t=Math.min(Math.max(t,1),W),t+n<=W?{size:t,offset:n,refused:!1}:e.leading==="offset"?{size:W-n,offset:n,refused:!1}:{size:null,offset:n,refused:!0})}function Je(e){fe(e,".column").forEach(function(t){Le(t,{width:"",height:"",left:"",top:""}),bt(t)})}function Oo(e){return"ge-"+e+"-"+lr}function Un(){return[".row",".ge-text-block",".ge-content","[data-ge-container]"].concat(Vt("blocks")).join(", ")}function Vt(e){return Object.keys(M).map(function(t){return M[t][e]||null}).filter(function(t){return t!==null})}function pt(e,t){var n=!0;return Object.keys(M).forEach(function(r){var o=M[r];n&&o.accepts&&o.accepts(e,t)===!1&&(n=!1)}),n}function Pa(){return s.drag_handle==="drawer"?".ge-tools-drawer > a:not(.ge-text-info):not(.ge-element-info), .ge-details, input, textarea, button, select, option":"input, textarea, button, select, option"}function Gt(e,t){var n=Qo();if(e=Array.isArray(e)?e:e?[e]:[],!(!e.length||!n)){var r=s.drag_handle==="drawer",o=Pa(),i=0,l=t.draggable+"|"+(t.group||"");Ga(),e.forEach(function(d){var f=At.get(d);if(!(f&&f.has(l))){f||At.set(d,f=new Set),f.add(l);var g=t.group?{name:Oo(t.group)}:{name:Oo(t.draggable+"-"+ ++i),pull:!1,put:!1};t.group&&t.accepts&&(g.put=function(h,E,_){return E.options.group.name===g.name&&t.accepts(h.el,_)}),He.push(n.create(d,Object.assign({group:g,draggable:t.draggable,handle:r?".ge-tools-drawer":".ge-tools-drawer .ge-move",filter:function(h,E){return H(h.target,o,d)?!0:!E||E.parentNode!==d},preventOnFilter:!1,forceFallback:!0,fallbackOnBody:!1,ghostClass:"ge-drag-placeholder",chosenClass:"ge-drag-chosen",dragClass:"ge-drag-helper",fallbackClass:"ge-drag-helper",animation:s.drag.animation,delay:s.drag.delay||s.drag.touch_delay,delayOnTouchOnly:!s.drag.delay,touchStartThreshold:s.drag.threshold,scroll:s.drag.scroll,onStart:ja,onEnd:Na},t.options||{})))}})}}function za(){if(!Qo()){G("sortable_missing",m("error.sortable_missing"));return}Gt(A(c,".row"),{draggable:".column",group:"column"}),Gt([c].concat(A(c,".column")),{draggable:Un(),group:"block",accepts:pt});var e=Vt("regions");e.length&&Gt(A(c,e.join(", ")),{draggable:">"+Un(),group:"block",accepts:pt}),le("onSortable",Gt)}function ja(e){var t=e.item,n=hn(t),r=So(t),o={from:n,canceled:!1};ln.set(t,o),J(function(){var i=D("before-move",ie(r.kind,r.node,{parent:n.parent,source:"dragdrop",from:n}));i||(o.canceled=!0)})}function So(e){var t=b(e,"ge-text-block")&&j(e,".ge-content")||e;return{kind:ue(t),node:t}}function Ra(e,t){var n=q(t.parent).filter(function(r){return r!==e&&!b(r,"ge-tools-drawer")});!n.length||t.index>=n.length?t.parent.appendChild(e):t.parent.insertBefore(e,n[t.index])}function Na(e){var t=e.item,n=ln.get(t),r=n?n.from:hn(t);if(ln.delete(t),n&&n.canceled){Ra(t,r);return}var o=hn(t);if(!(o.parent===r.parent&&o.index===r.index)){var i=H(t,"[data-ge-container]"),l=T[we(i)];l&&l.afterPaneMove&&l.afterPaneMove(i,t,r);var d=So(t);J(function(){D("after-move",ie(d.kind,d.node,{parent:o.parent,source:"dragdrop",from:r,to:o,container:i||void 0}))})}}function Da(){s.resize.enabled&&A(c,".column").forEach(function(e){if(!j(e,".ge-resize-handle")){var t=j(e,".ge-tools-drawer");t&&t.appendChild(v("span",{class:"ge-resize-size"})),Ia().forEach(function(n){var r=v("span",{class:"ge-resize-handle ge-resize-"+n,"data-ge-edge":n});r.addEventListener("pointerdown",Fa),e.appendChild(r)})}})}function Ia(){return String(s.resize.handles).split(",").map(function(e){return e.trim()}).filter(function(e){return e==="e"||e==="w"})}function Fa(e){var t=e.currentTarget,n=t.parentElement,r=t.getAttribute("data-ge-edge")==="w",o=e.pageX,i=wt(n);if(e.preventDefault(),!Ha(n))return;y(n,"ge-resizing"),e.pointerId!==void 0&&t.setPointerCapture&&t.setPointerCapture(e.pointerId);function l(g){var h=g.pageX-o;return Math.max(1,i+(r?-h:h))}function d(g){n.style.width=l(g)+"px",Ka(n,l(g))}function f(g){t.removeEventListener("pointermove",d),er(t,"pointerup pointercancel",f),k(n,"ge-resizing"),Ba(n,l(g))}t.addEventListener("pointermove",d),me(t,"pointerup pointercancel",f)}function Wa(){Lo(c)}function Lo(e){A(e,".ge-resize-handle").forEach(function(t){t.remove()}),A(e,".ge-resize-size").forEach(function(t){t.remove()}),Je(e)}function Mo(e,t){var n=Math.round(t/Zr(e.parentElement)*W),r=Po(e),o=r?ut(r):null,i=Ot.get(e),l=i?i.units:dt(e),d=r&&Y(o)?l+o-ft(s.valid_col_sizes):W-ct(e);return Math.min(Math.max(n,ft(s.valid_col_sizes)),Math.max(d,ft(s.valid_col_sizes)),zn(s.valid_col_sizes))}function Po(e){return s.resize.balance!=="next"?null:Wo(e,".column")[0]||null}function Vn(e,t){var n=j(e,".ge-tools-drawer"),r=n?j(n,".ge-resize-size"):null;r&&(r.textContent=t)}function zo(e){return(R===Z?C[0].colPrefix:Ce().colPrefix)+e}function Ha(e){var t=ut(e),n=J(function(){return D("before-resize",ie("column",e,{source:"dragdrop",from:t,to:null}))});if(!n)return!1;var r={from:t,units:dt(e)};return Ot.set(e,r),Vn(e,zo(r.units)),!0}function Ka(e,t){Vn(e,zo(Mo(e,t)))}function Ba(e,t){var n=Ot.get(e),r=Mo(e,t);if(Ot.delete(e),Vn(e,""),Je(e),!!n&&r!==n.units){var o=mn(e,r);o&&J(function(){gn(e,o),Ua(e,r-n.units),be(e),D("after-resize",ie("column",e,pn({source:"dragdrop",from:n.from,to:o.size},o.cleared)))})}}function Ua(e,t){var n=Po(e);if(!(!n||!t)){var r=ut(n);if(Y(r)){var o=mn(n,r-t);o&&(gn(n,o),be(n))}}}function Va(){He.forEach(function(e){e.destroy()}),He=[],At=new WeakMap}function Ga(){He=He.filter(function(e){return c.contains(e.el)?!0:(e.destroy(),At.delete(e.el),!1)})}function $e(){return v("div",{class:"row"})}function qt(e,t,n){var r=null;if(cl.forEach(function(d){r===null&&n&&n[d]!==void 0&&(r=d)}),r===null)return e;var o=ge(n[r]);if(!o)return K(t+": "+r+" matches no element; the "+t+" is left detached"),e;var i=r==="appendTo"||r==="prependTo"?o:o.parentElement,l=function(){return ae(t,e,function(){r==="appendTo"?o.appendChild(e):r==="prependTo"?o.insertBefore(e,o.firstChild):r==="insertBefore"?o.parentNode.insertBefore(e,o):$t(e,o)},{parent:i,source:n.source||"api"})};return ot>0?(dn(l),e):l()}function qa(e,t){var n=$e();return e!==void 0&&!Array.isArray(e)&&!(e&&e.row_cols)&&(K("createRow: the layout is an array of column sizes, as in [8, 4], or { row_cols, columns }. Making an empty row instead."),e=[]),e&&!Array.isArray(e)&&(n=at(e)),(Array.isArray(e)?e:[]).forEach(function(r){n.appendChild(ce(r))}),qt(n,"row",t)}function Xa(e,t){t=t||{};var n=ge(t.appendTo||t.prependTo||null);e===void 0&&n&&Xe(n,Ce())?e=null:!Y(e)&&nr.indexOf(e)===-1&&(K("createColumn: no column size given, using "+W),e=W);var r=ce(e,t.offset);return t.content!==void 0&&r.appendChild(ol(t.content)),qt(r,"column",t)}function Ya(e,t){t=t||{};var n=T[e];return n?qt(n.create(t),e,t):(K('createContainer: no such container type "'+e+'"'),null)}function Gn(e,t,n){e=ge(e),n=n||{};var r=T[we(e)];if(!r||we(e)!==t)return K("this is not a "+t+" container"),null;var o=r.addPane(e,n);return o?ae(r.paneKind,o,function(){},{parent:e,source:"api",container:e}):null}function Ja(e,t){e=ge(e);var n=we(e);return!T[n]||!T[n].addPane?(K("addPane: this is not a container with panes"),null):Gn(e,n,t)}function qn(){var e={};return Object.keys(s).forEach(function(t){var n=s[t];e[t]=Array.isArray(n)?n.slice():n}),Object.freeze(e)}function ce(e,t){var n=v("div",{class:"column"}),r=Yo(R)[0],o=Ut({size:e,offset:t||0,leading:"offset"});return Bt(n,r,o.size===null?e:o.size),Kn(n,r,o.offset),n}function Xn(e,t){if(!(!s.custom_filter||!s.custom_filter.length)){var n=typeof s.custom_filter=="string"||typeof s.custom_filter=="function"?[s.custom_filter]:s.custom_filter;Array.prototype.forEach.call(n,function(r){typeof r=="string"&&(r=window[r]),r(t||c,e)})}}function $a(){var e=[".row","[data-ge-container]"];return Object.keys(M).forEach(function(t){var n=M[t],r=typeof n.cuts=="function"?n.cuts():n.cuts;r&&e.push(r)}),e.join(", ")}function Qa(e){A(c,".column > .ge-content, .column > .ge-text-block > .ge-content").forEach(function(t){if(!(b(t,"ge-rte-active")||!q(t,e).length)){var n=t.getAttribute("data-ge-content-type"),r=b(t.parentElement,"ge-text-block")?t.parentElement:t,o=[],i=[];for(Array.prototype.slice.call(t.childNodes).forEach(function(f){f.nodeType===1&&f.matches(e)?(o.push({text:i},{block:f}),i=[]):i.push(f)}),o.push({text:i});t.firstChild;)t.removeChild(t.firstChild);var l=!1,d=r;o.forEach(function(f){var g;if(f.block)g=f.block;else if(Za(f.text))l?(g=Yn(n),f.text.forEach(function(h){g.appendChild(h)})):(f.text.forEach(function(h){t.appendChild(h)}),g=r,l=!0);else return;g!==d&&$t(g,d),d=g}),l||r.remove()}})}function Za(e){return e.some(function(t){return t.nodeType===1||t.nodeType===3&&/\S/.test(t.nodeValue)})}function el(e){A(c,".column").forEach(function(t){var n=[];q(t).forEach(function(r){re(r,".ge-tools-drawer, .ge-resize-handle")||(re(r,".ge-content, .ge-text-block")||r.matches(e)?n=jo(n):n.push(r))}),jo(n)})}function jo(e){if(e.length){var t=$t(Yn(),e[e.length-1]);e.forEach(function(n){t.appendChild(n)})}return[]}function Yn(e){var t=v("div",{class:"ge-content"});return e&&(y(t,"ge-content-type-"+e),t.setAttribute("data-ge-content-type",e)),t}function tl(){A(c,".column > .ge-content").forEach(function(e){Uo(e,v("div",{class:"ge-text-block"}))}),A(c,".ge-text-block").forEach(function(e){if(!j(e,".ge-tools-drawer")){var t=j(e,".ge-content"),n=t?t.getAttribute("data-ge-content-type"):null;n?Oi(n)||rl(e,n):nl(e)}})}function Ro(e){A(e,".ge-text-block").forEach(function(t){Qt(t)})}function nl(e){var t=j(e,".ge-content"),n=Ge(e,"ge-tools-drawer ge-text-drawer ge-plain-drawer");y(e,"ge-plain-block"),De(n),Object.keys(M).forEach(function(r){M[r].plainTools&&M[r].plainTools(n,t)}),F(n,m("tool.delete_plain"),"ge-delete-plain","bi bi-trash",function(){je("plain",t,m("confirm.delete_plain"),function(r){Ct(e,function(){e.remove(),r()})})})}function rl(e,t){var n=j(e,".ge-content"),r=Ge(e,"ge-tools-drawer ge-text-drawer");De(r),F(r,m("text.no_editor",{type:t}),"ge-text-info ge-text-missing","bi bi-exclamation-triangle"),F(r,m("tool.delete_text"),"ge-delete-text","bi bi-trash",function(){je("text",n,m("confirm.delete_text"),function(o){Ct(e,function(){e.remove(),o()})})})}function ol(e){var t=Tr(),n=Yn(t.length?t[0].type:null);return e&&e.nodeType?n.appendChild(e):ht(n,e),n}function No(e){R=e,tr.forEach(function(t){P(c,"ge-layout-"+t,t===e)}),S(Fe,"button").textContent=m(Et(e))}function Jn(e){return tr.indexOf(e)===-1?null:e}function Do(e){var t=Jn(e);if(t===null){K("changeView("+JSON.stringify(e)+"): no such layout mode");return}var n=R;No(t),t!==n&&(io().forEach(function(r){A(r,".ge-utilities").forEach(function(o){Mn(o)})}),Ur(null),st(c),le("onViewChange",t),D("view-change",{canvas:c,breakpoint:t,from:n,to:t}))}function $n(){return R}function Io(e,t,n){return function(){return Ne[e]?Ne[e].apply(null,arguments):(G("plugin:"+t,e+" needs the "+t+" plugin: include dist/plugins/grideditor."+n+".js after the editor"),null)}}function il(e){if(!s.active_target){G("active_target","setActiveTarget needs the active_target setting: without it, it does nothing");return}if(e==null){ne(null);return}var t=ge(e);if(!Sr(t)){var n=typeof e=="string"?e:t?"<"+t.tagName.toLowerCase()+">":String(e);K("setActiveTarget: "+n+" is not a node of the canvas with settings");return}ne(t)}var Qn={getHtml:lt,getPlainHtml:Ri,init:function(){dn(he)},reset:function(){dn(Or)},deinit:Re,destroy:Di,changeView:Do,getView:$n,createRow:qa,createColumn:Xa,createText:function(e,t){return Ne.createText?Ne.createText(e,t):(G("plugin:text","createText needs a text editor plugin: include dist/plugins/grideditor.tinymce.js, or another editor's, after the editor"),null)},createElement:Io("createElement","elements","elements"),createSection:Io("createSection","sections","sections"),createContainer:Ya,addTab:function(e,t){return Gn(e,"tabs",t)},addAccordionItem:function(e,t){return Gn(e,"accordion",t)},addPane:Ja,setLocale:ei,getUtility:Hr,setUtility:Ln,getActiveTarget:function(){return s.active_target?L:null},setActiveTarget:il};Object.keys(Qn).forEach(function(e){var t=!!(qo[e]&&qo[e].value);a[e]=function(){if(rt)return G("destroyed:"+e,m("warning.destroyed",{method:e})),e==="getHtml"?c.innerHTML:e==="getPlainHtml"?or(c.innerHTML):t?null:a;var n=Qn[e].apply(a,arguments);return t?n:a}}),a.canvas=c,a.settings=qn(),en.set(c,a),Ii(),a.settings=qn(),Object.keys(Ne).forEach(function(e){Object.prototype.hasOwnProperty.call(Qn,e)||e in a||(a[e]=function(){return rt?(G("destroyed:"+e,m("warning.destroyed",{method:e})),null):Ne[e].apply(null,arguments)})}),ai(),he(),O._created.forEach(function(e){e(a)})}O._created=[];O.containers={};O.features={};O.utilities={};O.texts={};O.t=ir;O._plainHtml=or;O.Sortable=null;O.bootstrap=null;O.version="9.2.1";O.locales={en:{"tool.move":"Move","tool.settings":"Settings","tool.add_row":"Add row","tool.delete_text":"Remove text","tool.delete_plain":"Remove content","tool.convert_type":"Edit as {editor} text","text.no_editor":'No text editor "{type}" is loaded: this text can be moved and deleted, not edited',"tool.add_column":`Add column
|
|
1
|
+
(()=>{function A(a,u){return a?Array.prototype.slice.call(a.querySelectorAll(u)):[]}function S(a,u){return a?a.querySelector(u):null}function me(a,u){if(!a)return[];var p=A(a,u);return a.nodeType===1&&a.matches(u)&&p.unshift(a),p}function X(a,u){return a?Array.prototype.filter.call(a.children,function(p){return!u||p.matches(u)}):[]}function j(a,u){return X(a,u)[0]||null}function B(a,u,p){var s=a&&a.nodeType===1?a.closest(u):null;return s&&p&&s!==p&&!p.contains(s)?null:s}function re(a,u){return!!a&&a.nodeType===1&&a.matches(u)}function Le(a){return!!a&&document.documentElement.contains(a)}function Wo(a,u){for(var p=[],s=a.nextElementSibling;s;s=s.nextElementSibling)(!u||s.matches(u))&&p.push(s);return p}function Bo(a,u){for(var p=[],s=a.parentElement;s&&s!==u;s=s.parentElement)p.push(s);return p}function al(a){var u=document.createElement("template");return u.innerHTML=a,Array.prototype.slice.call(u.content.childNodes)}function G(a){for(var u=al(a.trim()),p=0;p<u.length;p++)if(u[p].nodeType===1)return u[p];return null}function h(a,u,p){var s=document.createElement(a);return Object.keys(u||{}).forEach(function(c){var _=u[c];_!=null&&_!==!1&&s.setAttribute(c,_)}),p!=null&&(s.textContent=p),s}function yt(a,u){return a.innerHTML=u==null?"":String(u),a}function C(a,u){return tt(u).forEach(function(p){a.classList.add(p)}),a}function k(a,u){return tt(u).forEach(function(p){a.classList.remove(p)}),a}function P(a,u,p){return tt(u).forEach(function(s){p===void 0?a.classList.toggle(s):a.classList.toggle(s,!!p)}),a}function w(a,u){return!!a&&a.nodeType===1&&a.classList.contains(u)}function tt(a){return String(a||"").split(/\s+/).filter(Boolean)}function nt(a){return a.getAttribute("class")||a.removeAttribute("class"),a}function Ct(a){return a.getAttribute("style")||a.removeAttribute("style"),a}function Jt(a,u){return Object.keys(u).forEach(function(p){var s=u[p];s==null?a.removeAttribute(p):a.setAttribute(p,s)}),a}function Me(a,u){return Object.keys(u).forEach(function(p){var s=u[p];typeof s=="number"&&!ll[p]&&(s=s+"px"),a.style.setProperty(p,s==null?"":String(s))}),a}var ll={opacity:!0,"z-index":!0,"flex-grow":!0,"flex-shrink":!0,order:!0},wt={};function sl(a){var u=a.nodeName;if(!wt[u]){var p=document.body.appendChild(document.createElement(u));wt[u]=getComputedStyle(p).display,p.remove(),wt[u]==="none"&&(wt[u]="block")}return wt[u]}function xe(a){return a.style.removeProperty("display"),getComputedStyle(a).display==="none"&&(a.style.display=sl(a)),a}function ue(a){return a.style.display="none",a}function Ho(a,u){return u===void 0&&(u=!rt(a)),u?xe(a):ue(a)}function rt(a){return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)}function Et(a){return a.getBoundingClientRect().width}function $t(a){return a.getBoundingClientRect().height}function Ko(a){var u=getComputedStyle(a);return a.clientHeight-parseFloat(u.paddingTop)-parseFloat(u.paddingBottom)}function Qt(a){var u=a.getBoundingClientRect();return{top:u.top+window.pageYOffset,left:u.left+window.pageXOffset}}function Zt(a,u){return u.parentNode.insertBefore(a,u.nextSibling),a}function en(a){for(var u=a.parentNode;a.firstChild;)u.insertBefore(a.firstChild,a);a.remove()}function Uo(a,u){return a.parentNode.insertBefore(u,a),u.appendChild(a),u}function xt(a,u,p,s,c){var _=function(y){var I=B(y.target,p,a);if(I&&a.contains(I))return s.call(I,y)};return tt(u).forEach(function(y){a.addEventListener(y,_,c)}),_}function ge(a,u,p,s){return tt(u).forEach(function(c){a.addEventListener(c,p,s)}),p}function tr(a,u,p,s){tt(u).forEach(function(c){a.removeEventListener(c,p,s)})}var ul=400;function Vo(a,u,p,s){p=p===void 0?ul:p,C(a,"ge-leaving");var c=function(){k(a,"ge-leaving"),nt(a),ue(a),s&&s()};if(!rt(a)||!a.animate||p<=0){window.setTimeout(c,0);return}var _=a.animate(u(getComputedStyle(a)),{duration:p,easing:"ease-in-out"}),y=!1,I=function(){y||(y=!0,c())};_.onfinish=I,_.oncancel=I}function _t(a,u,p){typeof u=="function"&&(p=u,u=void 0),a.style.overflow="hidden",Vo(a,function(s){return[{height:s.height,paddingTop:s.paddingTop,paddingBottom:s.paddingBottom,marginTop:s.marginTop,marginBottom:s.marginBottom},{height:"0px",paddingTop:"0px",paddingBottom:"0px",marginTop:"0px",marginBottom:"0px"}]},u,function(){a.style.removeProperty("overflow"),p&&p()})}function Go(a,u,p,s){a.style.overflow="hidden",Vo(a,function(c){var _={opacity:c.opacity,height:c.height},y={opacity:0,height:"0px"};return s&&(_.width=c.width,y.width="0px"),[_,y]},u,function(){a.style.removeProperty("overflow"),p&&p()})}var qo={getHtml:{value:!0},getPlainHtml:{value:!0},init:{},deinit:{},reset:{},destroy:{},changeView:{},getView:{value:!0},createRow:{value:!0},createColumn:{value:!0},createElement:{value:!0},createText:{value:!0},createSection:{value:!0},createContainer:{value:!0},addTab:{value:!0},addAccordionItem:{value:!0},addPane:{value:!0},setLocale:{},getUtility:{value:!0},setUtility:{value:!0},getActiveTarget:{value:!0},setActiveTarget:{}},cl=["appendTo","prependTo","insertAfter","insertBefore"],fl=["data-bs-target","data-bs-parent","href","aria-controls","aria-labelledby","aria-describedby","for"],ml=/^ge-([a-z][a-z-]*?)-\d+-[a-z0-9]+$/,E=[{key:"xs",infix:"",colPrefix:"col-",offsetPrefix:"offset-",min:0,preview:400,labelKey:"view.xs"},{key:"sm",infix:"sm",colPrefix:"col-sm-",offsetPrefix:"offset-sm-",min:576,preview:576,labelKey:"view.sm"},{key:"md",infix:"md",colPrefix:"col-md-",offsetPrefix:"offset-md-",min:768,preview:768,labelKey:"view.md"},{key:"lg",infix:"lg",colPrefix:"col-lg-",offsetPrefix:"offset-lg-",min:992,preview:992,labelKey:"view.lg"},{key:"xl",infix:"xl",colPrefix:"col-xl-",offsetPrefix:"offset-xl-",min:1200,preview:1200,labelKey:"view.xl"},{key:"xxl",infix:"xxl",colPrefix:"col-xxl-",offsetPrefix:"offset-xxl-",min:1400,preview:null,labelKey:"view.xxl"}],Z="all",gl="view.all",nr=[Z].concat(E.map(function(a){return a.key})),W=12,Xo=11,rr=["equal","auto"],ot=["1","2","3","4","5","6","auto"];function or(a,u){return"row-cols"+(a.infix?"-"+a.infix:"")+"-"+u}function J(a){return typeof a=="number"}function Fe(a,u){return u==="equal"?a.infix?"col-"+a.infix:"col":a.colPrefix+u}function ee(a){for(var u=0;u<E.length;u++)if(E[u].key===a)return E[u];return null}function Yo(a){if(a===Z)return[E[0]];var u=ee(a);return u?[u]:[]}function kt(a){var u=ee(a);return u?u.labelKey:gl}var Pe={add_column:{size:12,picker:!0,delay:600},elements:{enabled:"auto",selector:"[data-ge-element]",auto:!1,types:[]},resize:{enabled:!0,tools:!0,handles:"e",balance:"next"},indent:{tools:!0},sidebar:{empty:null},drag:{delay:0,touch_delay:100,threshold:3,animation:150,scroll:!0}},Jo={},pl=0,nn=new WeakMap,tn=null,$o=".ge-mainControls, .ge-settings-panel, .ge-sidebar-toggle, .ge-dialog, .ge-confirm, .ge-size-picker, .modal, .modal-backdrop";function ar(a,u,p){var s=O.locales,c=s[a.locale]||{},_=a.locale_strings||{},y=_[u];return y===void 0&&(y=c[u]),y===void 0&&(y=s.en[u]),y===void 0&&(hl("locale:"+u,'no string for "'+u+'" in any locale, showing the key'),y=u),y.replace(/\{(\w+)\}/g,function(I,ve){return p&&p[ve]!==void 0?p[ve]:I})}function vl(a,u){var p=O.locales;return(a.locale_strings||{})[u]!==void 0||(p[a.locale]||{})[u]!==void 0||p.en[u]!==void 0}function K(a){window.console&&window.console.warn&&window.console.warn("grid-editor: "+a)}function hl(a,u){Jo[a]||(Jo[a]=!0,K(u))}function bl(a,u){return ar({locale:"en"},a,u)}function wl(a){if(typeof a=="string"){var u=document.querySelector(a);if(!u)throw new TypeError("grid-editor: no element matches "+JSON.stringify(a));return u}if(a&&a.nodeType===1)return a;throw new TypeError("grid-editor: the target is an element or a selector, not "+(a===null?"null":typeof a))}function pe(a){return typeof a=="string"?document.querySelector(a):a&&a.nodeType===1?a:null}function Qo(){return O.Sortable||window.Sortable||null}function At(){var a=O.bootstrap||window.bootstrap;return a&&a.Modal?a.Modal:null}function ir(a){var u=document.implementation.createHTMLDocument("").body;u.innerHTML=a;var p=[];return A(u,"*").forEach(function(s){var c=!1;Array.prototype.slice.call(s.attributes).forEach(function(I){I.name.indexOf("data-ge-")===0&&(s.removeAttribute(I.name),c=!0)});var _=(s.getAttribute("class")||"").split(/\s+/).filter(Boolean),y=_.filter(function(I){return I!=="column"&&I.indexOf("ge-")!==0});y.length!==_.length&&(c=!0),y.length?s.setAttribute("class",y.join(" ")):s.removeAttribute("class"),c&&s.tagName==="DIV"&&!s.attributes.length&&p.push(s)}),p.forEach(function(s){en(s)}),u.innerHTML}function O(a,u){var p=wl(a),s=nn.get(p);if(s)return Zo.has(p)||(Zo.add(p),K(bl("warning.already_editing"))),s;if(!(this instanceof O))return new O(p,u);yl(this,p,u||{})}var Zo=new WeakSet;O.create=function(a,u){return new O(a,u)};O.get=function(a){var u=pe(a);return u&&nn.get(u)||null};function yl(a,u,p){var s=Object.assign({new_row_layouts:[[12],[6,6],[4,4,4],[3,3,3,3],[2,2,2,2,2,2],[2,8,2],[4,8],[8,4]],row_classes:[],col_classes:[],col_tools:[],row_tools:[],drag_handle:"tool",toolbar_drag:"auto",toolbar_overflow:"menu",drawer_overflow:"menu",toolbar_groups:!1,active_target:!1,element_tools:[],element_classes:[],container_classes:[],pane_classes:[],container_tools:[],tab_tools:[],accordion_tools:[],plugins:null,row_cols:!0,utilities:{},elements:Pe.elements,custom_filter:"",valid_col_sizes:[1,2,3,4,5,6,7,8,9,10,11,12,"equal","auto"],valid_col_offsets:[0,1,2,3,4,5,6,7,8,9,10,11],add_column:Pe.add_column,layout_modes:nr.slice(),default_view:Z,resize:Pe.resize,indent:Pe.indent,source_textarea:"",edit_source:!0,locale:"en",locale_strings:{},callbacks:{},confirm_delete:!0,settings_panel:"offcanvas",sidebar:Pe.sidebar,drag:Pe.drag},p);if(Object.keys(Pe).forEach(function(e){s[e]=Object.assign({},Pe[e],s[e])}),s.settings_panel==="sidebar"){if(p&&p.active_target===!1)throw new TypeError('grid-editor: settings_panel "sidebar" needs active_target; leave it out or set it to true');s.active_target=!0}var c,_,y,I,ve,We,te,R=s.default_view,N=null,oe=null,_e=!1,ze=!1,Be=null,L=null,Tt=null,rn=function(){},on=function(){},he=[],Ot={},an=null,lr={},He=[],St=new WeakMap,sr=++pl,it=!1,Ke=null,ur=null;s.settings_panel==="sidebar"&&(tn?(q("sidebar",'settings_panel "sidebar" is in use by another editor on the page, which has one sidebar: using offcanvas'),s.settings_panel="offcanvas"):tn=a);var Ue=new WeakMap,ln=new WeakMap,sn=new WeakMap,Lt=null,un=new WeakMap,Mt=new WeakMap,dr=new WeakMap,dn=new WeakSet,Ve=new AbortController;c=C(u,"ge-canvas");function q(e,t){lr[e]||(lr[e]=!0,K(t))}function g(e,t){return ar(s,e,t)}function ei(e){s.locale=e,a.settings=Yn(),fr(),uo(),Eo(),Cn(),yn(),Sr()}var at=0,cn=[];function ie(e,t,n){return Object.assign({kind:e,node:t,parent:t.parentElement,canvas:c,breakpoint:Zn(),source:"api"},n||{})}function D(e,t){var n=[e],r=e.replace(/^(before|after)-add-.+$/,"$1-add");r!==e&&n.push(r);var o=!1;return n.forEach(function(i){var l=new CustomEvent("grideditor:"+i,{detail:t,bubbles:!0,cancelable:!0});c.dispatchEvent(l)||(o=!0)}),n.forEach(function(i){var l=s.callbacks[i.replace(/-/g,"_")];typeof l=="function"&&l(t)===!1&&(o=!0)}),!o}function $(e){at++;try{return e()}finally{if(at--,at===0)for(;cn.length;)cn.shift()()}}function fn(e){if(at===0){e();return}cn.push(e)}function ae(e,t,n,r){var o=ti(e);return $(function(){var i=ie(e,t,r);return D("before-add-"+o,i)?(n(),be(),D("after-add-"+o,i),t):null})}function ti(e){return O.containers[e]?"container":e}function ni(e,t){if(!s.confirm_delete){t();return}cr(e,{danger:!0},function(n){n&&t()})}function cr(e,t,n){t=t||{};var r=At();if(!r){n(window.confirm(e));return}var o=ri(),i=!1,l=S(o,".ge-confirm-ok");je&&je(null);var d=function(m){je===d&&(je=null,n(m))};je=d,S(o,".modal-title").textContent=t.title||g("confirm.title"),S(o,".ge-confirm-cancel").textContent=t.cancel||g("confirm.cancel"),l.textContent=t.ok||g("confirm.ok"),P(l,"btn-danger",!!t.danger),P(l,"btn-primary",!t.danger),S(o,".ge-confirm-message").textContent=e,l.onclick=function(){i=!0,r.getInstance(o).hide()},ke.hidden=function(){d(i)},ke.shown=function(){l.focus()},r.getOrCreateInstance(o).show()}var ke={hidden:null,shown:null},je=null;function ri(){if(N)return N;N=G('<div class="modal fade ge-confirm" tabindex="-1" aria-hidden="true"><div class="modal-dialog modal-dialog-centered"><div class="modal-content"><div class="modal-header"><h5 class="modal-title"></h5><button type="button" class="btn-close" data-bs-dismiss="modal"></button></div><div class="modal-body"><p class="ge-confirm-message"></p></div><div class="modal-footer"><button type="button" class="btn btn-secondary ge-confirm-cancel" data-bs-dismiss="modal"></button><button type="button" class="btn btn-danger ge-confirm-ok"></button></div></div></div></div>'),document.body.appendChild(N),S(N,".modal-title").textContent=g("confirm.title"),S(N,".btn-close").setAttribute("aria-label",g("confirm.cancel")),S(N,".ge-confirm-cancel").textContent=g("confirm.cancel"),S(N,".ge-confirm-ok").textContent=g("confirm.ok"),mr(N);var e=N;return N.addEventListener("hidden.bs.modal",function(){e===N&&ke.hidden&&ke.hidden()}),N.addEventListener("shown.bs.modal",function(){e===N&&ke.shown&&ke.shown()}),N}function fr(){N&&(ke.hidden=null,ke.shown=null,mn(N),N=null,je&&je(null))}function mn(e){var t=At(),n=t?t.getInstance(e):null,r=!1,o=function(){r||(r=!0,n&&n.dispose(),e.remove())};if(!n||!gn.get(e)&&!w(e,"show")){o();return}e.addEventListener("hidden.bs.modal",o,{once:!0}),e.addEventListener("shown.bs.modal",function(){n.hide()},{once:!0}),n.hide()}var gn=new WeakMap;function mr(e){ge(e,"show.bs.modal hide.bs.modal",function(){gn.set(e,!0)}),ge(e,"shown.bs.modal hidden.bs.modal",function(){gn.set(e,!1)})}function Re(e,t,n,r){var o=Lt||{};Lt=null,$(function(){var i=ie(e,t,{source:o.source||"tool"});if(D("before-delete",i)){o.before&&o.before();var l=function(){$(function(){r(function(){t.remove(),$(function(){be(),D("after-delete",i)})})})};o.confirm===!1?l():ni(n,l)}})}function oi(e,t){t=t||{};var n=e?Tn(e):null,r=n?j(n,'[class*="ge-delete-"]'):null,o=r?sn.get(r):null;if(!o)return!1;var i=!1;Lt={source:t.source,confirm:t.confirm,before:function(){i=!0,t.before&&t.before()}};try{o.call(r)}finally{Lt=null}return i}function pn(e,t,n){if(n=n||R,n!==Z){var r=ee(n),o=Gt({size:t,offset:Ut(e,r)||0});return o.refused||$e(e,r)===o.size?null:{writes:[{tier:r,size:o.size}],cleared:null,size:o.size}}var i=E.some(function(f){return Gt({size:t,offset:Ut(e,f)||0}).refused});if(i)return null;var l=E[0],d=[],m=[];return E.slice(1).forEach(function(f){var v=$e(e,f);v!==null&&(d.push({tier:f,size:null}),m.push({breakpoint:f.key,value:v}))}),$e(e,l)!==t&&d.unshift({tier:l,size:t}),d.length?{writes:d,cleared:m,size:t}:null}function vn(e,t){t.writes.forEach(function(n){Vt(e,n.tier,n.size)}),Qe(e)}function hn(e,t){return t&&(e.cleared=t),e}function bn(e,t,n,r){r=r||R;var o=ct(e),i=pn(e,t,r);return i?$(function(){var l=ie("column",e,hn({source:n,breakpoint:r,from:o,to:i.size},i.cleared));return D("before-resize",l)?(vn(e,i),we(e),D("after-resize",l),!0):(we(e),!1)}):!1}function gr(e,t,n){var r=R===Z,o=r?E[0]:ee(R),i=mt(e);t=Math.min(Math.max(t,0),Xo);var l=r?E.slice(1).filter(function(d){return Kt(e,d)!==null}):[];return(Kt(e,o)||0)===t&&!l.length?!1:$(function(){var d=ie("column",e,hn({source:n,from:i,to:t},r?l.map(function(m){return{breakpoint:m.key,value:Kt(e,m)}}):null));return D("before-indent",d)?(Un(e,o,t),l.forEach(function(m){Un(e,m,0)}),(r?E:[o]).forEach(function(m){var f=Kn(e,m);if(J(f)){var v=Gt({size:f,offset:t,leading:"offset"});v.size!==f&&Vt(e,m,v.size)}}),we(e),D("after-indent",d),!0):!1})}function wn(e){var t=e.parentElement;return{parent:t,index:X(t).filter(function(n){return!w(n,"ge-tools-drawer")}).indexOf(e)}}function de(e){var t=null;if(Object.keys(M).forEach(function(r){var o=M[r];!t&&o.kindOf&&(t=o.kindOf(e))}),t)return t;if(e.getAttribute("data-ge-container"))return e.getAttribute("data-ge-container");var n=null;return Object.keys(T).forEach(function(r){var o=T[r];!n&&o.paneClass&&w(e,o.paneClass)&&(n=o.paneKind)}),n||(w(e,"ge-tab")?"tab":w(e,"ge-accordion-item")?"accordion-item":w(e,"row")?"row":w(e,"column")?"column":w(e,"ge-element")?"element":(w(e,"ge-text-block")&&(e=j(e,".ge-content")||e),w(e,"ge-content")?e.getAttribute("data-ge-content-type")?"text":"plain":"node"))}if(s.source_textarea){var lt=pe(s.source_textarea).value,pr=h("div");pr.innerHTML=lt,lt.length>0&&!pr.querySelector(".row")&&(lt='<div class="row"><div class="col-lg-12">'+lt+"</div></div>"),yt(u,lt)}if(u.children.length&&!u.querySelector("div.row")){var ii=X(u),vr=G('<div class="row"><div class="col-lg-12"></div></div>');u.appendChild(vr),ii.forEach(function(e){vr.firstChild.appendChild(e)})}function ai(){te=h("textarea",{class:"ge-html-output"}),c.parentNode.insertBefore(te,c),yn(),fa();var e={signal:Ve.signal},t=null;if(window.addEventListener("scroll",function(){t===null&&(t=window.requestAnimationFrame(function(){t=null,!it&&_&&xr()}))},e),Ve.signal.addEventListener("abort",function(){t!==null&&window.cancelAnimationFrame(t)}),xt(c,"click",".ge-content",Ai,e),s.active_target){var n=null;c.addEventListener("pointerdown",function(i){n={x:i.clientX,y:i.clientY}},e),c.addEventListener("click",function(i){var l=n;n=null,w(c,"ge-editing")&&(l&&Math.abs(i.clientX-l.x)+Math.abs(i.clientY-l.y)>s.drag.threshold||o(i))},e),document.addEventListener("keydown",function(i){if(!(i.key!=="Escape"||V||Q)&&!(N&&w(N,"show"))){var l=document.activeElement;l&&(re(l,"input, textarea, select")||l.isContentEditable)||L&&ne(null)}},e),c.addEventListener("focusin",function(i){var l=Bt()?wo(i.target):null;l&&ne(l)},e);var r=null;document.addEventListener("pointerdown",function(i){r=i.target},{capture:!0,signal:e.signal}),document.addEventListener("click",function(i){var l=i.target,d=r;r=null,!(!L||!Bt()||!l||l.nodeType!==1)&&(d&&d.nodeType===1&&(c.contains(d)||B(d,$o))||!Le(l)||c.contains(l)||B(l,$o)||c.querySelector(".ge-rte-active")||ne(null))},e)}Ye()==="sidebar"&&window.addEventListener("resize",mo,e);function o(i){if(c.contains(i.target)){var l=wo(i.target);if(l&&l===L&&(i.target===Tn(l)||i.target===l&&!w(l,"ge-content"))){ne(null);return}ne(l)}}}function li(e){!re(e,".ge-content")||!c.contains(e)||(le("onContentReady",e),dt(e))}function yn(){_=h("div",{class:"ge-mainControls"}),te.parentNode.insertBefore(_,te),y=_.appendChild(h("div",{class:"ge-wrapper ge-top"}));var e=s.toolbar_overflow!=="wrap",t=y;e&&(C(y,"ge-toolbar-menu"),t=y.appendChild(h("div",{class:"ge-toolbar-start"}))),he=[],I=t.appendChild(h("div",{class:"ge-addRowGroup btn-group"})),ve=h("div",{class:"ge-addContainerGroup btn-group ms-1"}),s.new_row_layouts.forEach(function(f){var v=!Array.isArray(f),b=h("a",{class:"btn btn-sm btn-light",title:v?g("row.add_row_cols",{columns:f.columns,counts:_i(f.row_cols)}):g("row.add",{layout:f.join("-")}),"data-ge-toolbar":"row","data-ge-layout":v?JSON.stringify(f):f.join(",")});b.addEventListener("click",function(){if(L){An(b,"tool");return}var se=st(f),bt=ae("row",se,function(){c.appendChild(se)},{parent:c,source:"tool"});bt&&se.scrollIntoView&&se.scrollIntoView({behavior:"smooth"})}),I.appendChild(b),he.push({button:b,home:I,group:"rows"}),b.appendChild(G('<i class="bi bi-plus"></i>'));var x=v?ki(f):f,H='<div class="row ge-row-icon">';x.forEach(function(se){H+='<div class="column '+Fe(E[0],se)+'"></div>'}),H+="</div>",b.appendChild(G(H))}),t.appendChild(ve),Object.keys(T).forEach(function(f){var v=T[f],b=br(h("a",{class:"btn btn-sm btn-light ge-add-container"}),g(v.labelKey),v.iconClass);Jt(b,{"data-ge-toolbar":"container","data-ge-container-type":f}),b.addEventListener("click",function(){if(L){An(b,"tool");return}var x=Ze(),H=x.appendChild(fe(W)),se=H.appendChild(v.create({}));ae(f,se,function(){c.appendChild(x)},{parent:c,source:"tool"})}),ve.appendChild(b),he.push({button:b,home:ve,group:hr(v.group)||"content"})});var n=[];Ot={},Object.keys(M).forEach(function(f){Ot[f]=fi(M[f]),Ot[f].forEach(function(v,b){var x=pi(f,v,b);v.align==="end"?n.push(x):(ve.appendChild(x),he.push({button:x,home:ve,group:hr(v.group)||f}))})}),We=G('<div class="dropdown pull-right ge-layout-mode"><button type="button" class="btn btn-sm btn-primary dropdown-toggle" data-bs-toggle="dropdown"></button><div class="dropdown-menu" role="menu"></div></div>'),xt(We,"click","a",function(){Io(this.getAttribute("data-ge-view"))}),y.appendChild(We),s.layout_modes.forEach(function(f){S(We,".dropdown-menu").appendChild(h("a",{class:"dropdown-item","data-ge-view":f,title:g(kt(f))},g(kt(f))))}),S(We,"button").textContent=g(kt(R));var r=y.appendChild(h("div",{class:"btn-group pull-right"}));if(s.edit_source){var o=G('<button type="button" class="btn btn-sm btn-primary gm-edit-mode"><i class="bi bi-code-slash"></i></button>');o.setAttribute("title",g("tool.edit_source")),P(o,"active btn-danger",_e),o.addEventListener("click",function(){_e?_n():Si(),P(o,"active btn-danger",_e)}),r.appendChild(o)}var i=G('<button type="button" class="btn btn-sm btn-primary gm-preview"><i class="bi bi-eye-fill"></i></button>');i.setAttribute("title",g("tool.preview")),P(i,"active btn-danger",ze);var l=null;function d(f){var v=l,b=f.currentTarget===document.documentElement,x=f.type==="pointermove"&&i.contains(f.target);if(v&&!b&&(x||f.clientX>=v.left&&f.clientX<v.right&&f.clientY>=v.top&&f.clientY<v.bottom)){document.addEventListener("pointermove",d,{signal:Ve.signal}),document.documentElement.addEventListener("mouseleave",d,{signal:Ve.signal});return}l=null,document.removeEventListener("pointermove",d),document.documentElement.removeEventListener("mouseleave",d),ze||C(c,"ge-editing")}if(i.addEventListener("mouseenter",function(){l||(l=i.getBoundingClientRect(),k(c,"ge-editing"))}),i.addEventListener("click",function(){Pt(!ze)}),i.addEventListener("mouseleave",d),r.appendChild(i),n.length){var m=y.appendChild(h("div",{class:"pull-right ge-toolbar-end"}));n.forEach(function(f){m.appendChild(f)})}s.toolbar_groups&&ui(t),e&&gi(t),hi()}var si=[{name:"rows",labelKey:"group.rows"},{name:"content",labelKey:"group.content"},{name:"elements",labelKey:"group.elements"}];function hr(e){return typeof e=="string"&&e.trim()!==""?e:null}function ui(e){var t=si.map(function(i){return i.name});if(he.forEach(function(i){t.indexOf(i.group)<0&&t.push(i.group)}),t=t.filter(function(i){return he.some(function(l){return l.group===i})}),t.length<2)return;var n=h("div",{class:"ge-toolbar-groups btn-group",role:"tablist","aria-label":g("group.select")});e.insertBefore(n,e.firstChild);var r=_.appendChild(h("div",{class:"ge-toolbar-stash",hidden:"hidden"}));t.forEach(function(i){var l=n.appendChild(h("button",{type:"button",class:"btn btn-sm btn-outline-secondary",role:"tab","data-ge-group":i},di(i)));l.addEventListener("click",function(){o(i)})}),o(t.indexOf(an)>=0?an:t[0]);function o(i){an=i,he.forEach(function(l){(l.group===i?l.home:r).appendChild(l.button)}),X(n).forEach(function(l){var d=l.getAttribute("data-ge-group")===i;P(l,"active",d),l.setAttribute("aria-selected",d?"true":"false")}),on()}}function di(e){var t="group."+e;if(vl(s,t))return g(t);var n=he.filter(function(r){return r.group===e})[0];return n.button.getAttribute("title")||e}function ci(){return he.filter(function(e){return!B(e.button,".ge-toolbar-stash")})}function fi(e){var t=typeof e.toolbar=="function"?e.toolbar():e.toolbar;return Array.isArray(t)?t:[]}function mi(){!_||it||(Cn(),yn(),xr())}function Cn(){Tt&&Tt.abort(),Tt=null,rn=function(){},on=function(){},_.remove()}function gi(e){var t=G('<div class="ge-toolbar-more"><button type="button" class="btn btn-sm btn-light"><i class="bi bi-three-dots"></i></button><div class="ge-toolbar-overflow"><div class="ge-addRowGroup btn-group"></div><div class="ge-addContainerGroup btn-group"></div></div></div>');e.parentNode.insertBefore(t,e.nextSibling);var n=S(t,"button"),r=S(t,".ge-toolbar-overflow"),o=A(r,".btn-group");function i(x){return x===I?o[0]:o[1]}n.setAttribute("title",g("tool.more")),n.setAttribute("aria-haspopup","true"),n.setAttribute("aria-expanded","false");var l=Tt=new AbortController,d={signal:l.signal};if(n.addEventListener("click",function(){v(!w(t,"ge-open"))}),r.addEventListener("click",function(x){B(x.target,"[data-ge-toolbar]")&&v(!1)}),document.addEventListener("pointerdown",function(x){t.contains(x.target)||v(!1)},d),document.addEventListener("keydown",function(x){x.key==="Escape"&&v(!1)},d),rn=function(){v(!1)},on=b,b(),window.ResizeObserver){var m=!1,f=new window.ResizeObserver(function(){m||(m=!0,window.requestAnimationFrame(function(){m=!1,l.signal.aborted||b()}))});f.observe(y),f.observe(e),l.signal.addEventListener("abort",function(){f.disconnect()})}function v(x){x=x&&w(t,"ge-needed"),P(t,"ge-open",x),n.setAttribute("aria-expanded",x?"true":"false")}function b(){var x=ci();if(x.forEach(function(et){et.home.appendChild(et.button),k(et.button,"ge-before-more")}),k(t,"ge-needed"),k(y,"ge-toolbar-overflowing"),e.scrollWidth<=e.clientWidth){v(!1);return}C(t,"ge-needed"),C(y,"ge-toolbar-overflowing");for(var H=x.length-1;H>=0&&e.scrollWidth>e.clientWidth;H--){var se=i(x[H].home);se.insertBefore(x[H].button,se.firstChild)}var bt=x.filter(function(et){return et.button.parentNode===et.home});bt.length&&C(bt[bt.length-1].button,"ge-before-more")}}function br(e,t,n){return e.setAttribute("title",t),n?(e.appendChild(h("i",{class:n})),e):(e.appendChild(G('<i class="bi bi-plus"></i>')),e.appendChild(h("span",{},t)),e)}function pi(e,t,n){var r=t.iconClass||(t.align==="end"?"bi bi-plus":null),o=typeof t.label=="function"?t.label():t.label||g(t.labelKey),i=t.align==="end"?"btn-primary":"btn-light",l=br(h("a",{class:"btn btn-sm "+i+" ge-add-container ge-add-feature"}),o,r),d=typeof t.action=="function";return C(l,t.className||""),(typeof t.hidden=="function"?t.hidden():t.hidden)&&ue(l),Jt(l,{"data-ge-toolbar":"feature","data-ge-feature":e,"data-ge-item":n}),d&&(l.setAttribute("data-ge-action",""),(typeof t.disabled=="function"?t.disabled():t.disabled)&&(C(l,"disabled"),l.setAttribute("aria-disabled","true"))),l.addEventListener("click",function(){if(d){w(l,"disabled")||t.action(l);return}if(L){An(l,t.source||"tool");return}var m=t.create();if(m){var f=t.inColumn?yi(m):m,v=ae(t.kind,m,function(){c.appendChild(f)},{parent:c,source:t.source||"tool"});v&&t.inColumn&&f.scrollIntoView&&f.scrollIntoView({behavior:"smooth"})}}),l}function vi(){return s.toolbar_drag==="auto"?s.drag_handle==="drawer":!!s.toolbar_drag}function hi(){var e=A(_,"[data-ge-toolbar]:not([data-ge-action])");e.forEach(function(t){k(t,"ge-palette-button"),t.removeEventListener("pointerdown",wr)}),vi()&&e.forEach(function(t){C(t,"ge-palette-button"),t.addEventListener("pointerdown",wr)})}function wr(e){var t=e.currentTarget,n=e.pageX,r=e.pageY,o=null;if(e.button)return;function i(m){return Math.abs(m.pageX-n)+Math.abs(m.pageY-r)>s.drag.threshold}function l(m){if(!o){if(!i(m))return;o=C(t.cloneNode(!0),"ge-toolbar-helper"),document.body.appendChild(o),rn(),C(c,"ge-dropping")}Me(o,{left:m.pageX-14,top:m.pageY-14}),Ci(m.pageX,m.pageY)}function d(m){if(document.removeEventListener("pointermove",l),tr(document,"pointerup pointercancel",d),!!o){var f=yr(m.pageX,m.pageY);o.remove(),k(c,"ge-dropping"),En();var v=function(b){b.target!==t&&!t.contains(b.target)||(b.preventDefault(),b.stopImmediatePropagation())};window.addEventListener("click",v,{capture:!0,once:!0}),window.setTimeout(function(){window.removeEventListener("click",v,{capture:!0})},0),f&&Er(t,f)}}document.addEventListener("pointermove",l),ge(document,"pointerup pointercancel",d)}function yr(e,t){var n=e-window.scrollX,r=t-window.scrollY,o=document.elementFromPoint(n,r);if(!o)return null;var i=B(o,[".column",".ge-canvas"].concat(qt("regions")).join(", "));if(!i||i!==c&&!c.contains(i))return null;var l=null;return X(i,Gn()).forEach(function(d){if(!l){var m=d.getBoundingClientRect();r<m.top+m.height/2&&(l=d)}}),{region:i,before:l}}function bi(e,t,n){var r=(Ot[e.getAttribute("data-ge-feature")]||[])[parseInt(e.getAttribute("data-ge-item"),10)];if(!r)return null;var o=r.create();if(!o)return null;var i=o;return r.inColumn?i=zt(t.region,o):ht(t.region,o)?re(t.region,".row")&&(i=zt(t.region,o)):t=Cr(t.region),ae(r.kind,o,function(){t.before?t.before.parentNode.insertBefore(i,t.before):t.region.appendChild(i)},{parent:t.region,source:r.source||n||"dragdrop"})}function Cr(e){var t=e===c?[]:Bo(e,c).reverse().concat([e]),n=t[0]||null;return{region:c,before:n?n.nextElementSibling:null}}function wi(e,t,n,r){var o=!L&&(r||{}).fallback==="canvas";if(!L&&!o)return null;var i={region:o?c:Pr(L),before:null},l=zt(i.region,e),d=l===e?null:e.parentElement;return(!ht(i.region,l)||d&&!ht(d,e))&&(i=Cr(i.region),l=e),ae(t,e,function(){i.before?i.before.parentNode.insertBefore(l,i.before):i.region.appendChild(l)},{parent:i.region,source:n||"api"})}function yi(e){return kn(fe(W),e)}function Ci(e,t){var n=yr(e,t);if(!n)return En();Be||(Be=h("div",{class:"ge-drop-marker"})),n.before?n.before.parentNode.insertBefore(Be,n.before):n.region.appendChild(Be)}function En(){Be&&Be.remove()}function Er(e,t,n){if(e.getAttribute("data-ge-toolbar")==="feature")return bi(e,t,n);var r=e.getAttribute("data-ge-toolbar")==="container",o=e.getAttribute("data-ge-container-type"),i=r?T[o].create({}):xi(e.getAttribute("data-ge-layout")),l=zt(t.region,i);return ae(r?o:"row",i,function(){t.before?t.before.parentNode.insertBefore(l,t.before):t.region.appendChild(l)},{parent:t.region,source:n||"dragdrop"})}function Ei(){for(var e=[],t=1;t<=W;t++)e.push(String(t));return{name:"col",values:e.concat(rr),appliesTo:["column"],labelKey:"utility.col_width",className:function(n,r){return Fe(ee(n),xn(r))},choices:function(){return s.valid_col_sizes.map(String)},label:function(n){return n==="equal"?g("utility.col_equal"):n==="auto"?g("utility.col_auto"):n},write:function(n,r,o,i){return bn(n,r===null?null:xn(r),i,o)},blank:function(n,r){var o=r===Z?null:Ht(n,ee(r));return o?g("utility.col_from_row",{count:ko(o.value)}):null}}}function xn(e){return/^\d+$/.test(String(e))?parseInt(e,10):e}function xi(e){return/^\s*\{/.test(e||"")?st(JSON.parse(e)):st((e||"").split(",").filter(function(t){return t!==""}).map(xn))}function st(e){var t=Ze();if(Array.isArray(e))return e.forEach(function(r){t.appendChild(fe(r))}),t;Object.keys(e.row_cols||{}).forEach(function(r){var o=e.row_cols[r],i=ee(r);i&&ot.indexOf(String(o))!==-1&&C(t,or(i,o))});for(var n=0;n<(e.columns||0);n++)t.appendChild(fe(null));return t}function _i(e){return E.filter(function(t){return e&&e[t.key]!==void 0}).map(function(t){return(t.infix?t.key+": ":"")+e[t.key]}).join(", ")}function ki(e){var t=1;return Object.keys(e.row_cols||{}).forEach(function(n){var r=e.row_cols[n];r!=="auto"&&(t=Math.max(t,parseInt(r,10)||1))}),Array.apply(null,Array(Math.min(t,e.columns||t))).map(function(){return"equal"})}function xr(){var e=window.pageYOffset;e>Qt(_).top&&e<Qt(c).top+Ko(c)?w(y,"ge-top")&&(Me(y,{left:Qt(y).left,width:Et(y)}),k(y,"ge-top"),C(y,"ge-fixed")):w(y,"ge-fixed")&&(Me(y,{left:"",width:""}),k(y,"ge-fixed"),C(y,"ge-top"))}function Ai(){var e=this;if(!e.getAttribute("data-ge-content-type")&&!Ce()&&rt(e)){var t=Or();t.length&&(t.length===1?_r(e,t[0]):Ti(e,t))}}function _r(e,t){return t.available&&!t.available()?(t.missingKey&&console.error(g(t.missingKey)),!1):$(function(){var n=ie("plain",e,{source:"tool",from:"plain",to:t.type});if(!D("before-convert",n))return!1;C(e,"ge-content-type-"+t.type),e.setAttribute("data-ge-content-type",t.type);var r=e.parentElement;return w(r,"ge-text-block")&&(k(r,"ge-plain-block"),X(r,".ge-tools-drawer").forEach(function(o){o.remove()})),D("after-convert",n),t.edit(e),!0})}function Ti(e,t){var n=w(e.parentElement,"ge-text-block")?e.parentElement:null;n&&kr(j(n,".ge-tools-drawer"),t.map(function(r){return{label:r.label,title:g("tool.convert_type",{editor:r.label}),attributes:{"data-ge-content-type":r.type},choose:function(){_r(e,r)}}}),"ge-text-picker ge-convert-picker",n)}function kr(e,t,n,r){if(Ce(),!!e){var o=B(e,".ge-tools-drawer");o&&C(o,"ge-picker-open"),oe=e.appendChild(C(h("div",{class:"ge-size-picker"}),n||"")),t.forEach(function(i){var l=Jt(h("a",{class:"ge-size ge-size-flex"}),i.attributes||{});l.setAttribute("title",i.title||i.label),l.textContent=i.label,l.addEventListener("click",function(d){d.preventDefault(),d.stopPropagation(),Ce(),i.choose()}),oe.appendChild(l)}),Ar(r||e)}}function Ar(e){e.addEventListener("mouseleave",function(){window.setTimeout(function(){oe&&!oe.matches(":hover")&&Ce()},400)},{once:!0})}function Tr(){var e={},t=[];return Object.keys(M).forEach(function(n){var r=M[n];r.textTypes&&(r.textTypes()||[]).forEach(function(o){if(e[o.type]){e[o.type]!==n&&q("text-type:"+o.type,'the "'+n+'" plugin declares the text type "'+o.type+'", which the "'+e[o.type]+'" plugin already declares: ignored');return}e[o.type]=n,t.push(o)})}),t}function Or(){return Tr().filter(function(e){return e.offered!==!1})}function Oi(e){return Tr().some(function(t){return t.type===e})}function Sr(){Ne(),be()}function Pt(e){if(e=!!e,e!==ze){ze=e;var t=_?S(_,".gm-preview"):null;t&&P(t,"active btn-danger",e),P(c,"ge-editing",!e),le("onPreviewChange",e),D("preview-change",{canvas:c,previewing:e})}}function Si(){Pt(!1),Ne(),ne(null),te.style.height=.8*document.documentElement.clientHeight+"px",te.value=c.innerHTML,xe(te),ue(c),_e=!0,le("onSourceOpen",te)}function _n(){le("onSourceClose",te),_e=!1,yt(c,te.value),xe(c),be(),ue(te)}function Lr(e){return!!e&&e!==c&&c.contains(e)&&Ue.has(e)}function ne(e){if(e!==L){var t=L;t&&k(t,"ge-selected"),L=e,e&&w(c,"ge-editing")&&C(e,"ge-selected"),ho(),D("target-change",{canvas:c,target:e,from:t})}}function Mr(){return[".column"].concat(qt("regions")).join(", ")}function Pr(e){if(re(e,".row, "+Mr()))return e;var t=Li(e)?Mi(e):null;return t||B(e.parentElement,Mr())||c}function Li(e){if(e.getAttribute("data-ge-container"))return!0;var t=B(e.parentElement,"[data-ge-container]",c),n=t&&T[ye(t)];return!!n&&!!n.paneKind&&de(e)===n.paneKind}function Mi(e){var t=!!e.getAttribute("data-ge-container"),n=t?e:B(e.parentElement,"[data-ge-container]",c),r=T[ye(n)];return r&&r.regionOf&&r.regionOf(n,t?null:e)||null}function zt(e,t){if(re(t,".column"))return re(e,".row")?t:kn(t);if(re(e,".row")){var n=fe(Je(e,Ee())?null:s.add_column.size);return n.appendChild(t),n}return re(e,".column")||re(t,".row")?t:kn(fe(W),t)}function kn(e,t){var n=Ze();return t&&e.appendChild(t),n.appendChild(e),n}function An(e,t){var n=Er(e,{region:Pr(L),before:null},t);n&&n.scrollIntoView&&n.scrollIntoView({behavior:"smooth"})}function be(){V&&!Le(V.node)&&Oe(),L&&!c.contains(L)&&ne(null),Q&&Q.home&&!Le(Q.home)&&ce(),Jn(!0),P(c,"ge-editing",!ze),P(c,"ge-drag-drawer",s.drag_handle==="drawer"),Aa();var e=$a();Qa(e),el(e),tl(),sa(),ua(),Qi(),le("onInit"),za(),Da(),Do(R),dt(c),L&&!c.contains(L)?ne(null):L&&C(L,"ge-selected"),Ea()}function Ne(){Oe(),xa(),k(c,"ge-editing ge-drag-drawer ge-dropping"),L&&k(L,"ge-selected"),le("onBeforeDeinit"),Ce(),En(),ce(),zr(c),qe.clear(),No(c),le("onDeinit"),Rt(c),jr(c),Zi(),Va(),Wa(),Jn(!1,c)}function zr(e){A(e,".ge-tools-drawer").forEach(function(t){t.remove()})}function jr(e){A(e,"[data-ge-row-cols]").forEach(function(t){t.removeAttribute("data-ge-row-cols")})}function Pi(){var e=[];return[T,M,U].forEach(function(t){Object.keys(t).forEach(function(n){var r=t[n],o=r.unmark||r.onDeinit||r.onBeforeDeinit;o&&!r.cleanMarkup&&e.push(n)})}),e}function zi(){var e=new Map,t=new Map;function n(o){var i=o.cloneNode(o.nodeName==="TEMPLATE");if(o.nodeType!==1||(e.set(i,o),t.set(o,i),o.nodeName==="TEMPLATE"))return i;for(var l=o.firstChild;l;l=l.nextSibling)l.nodeType===1&&w(l,"ge-tools-drawer")||i.appendChild(n(l));return i}var r=n(c);return{root:r,liveOf:function(o){return e.get(o)||null},copyOf:function(o){return t.get(o)||null}}}function Rr(){if(_e)return ut();var e=Pi();if(e.length)return e.forEach(function(o){q("snapshot:"+o,'the "'+o+'" plugin has no cleanMarkup, so the canvas leaves editing to be read: open texts and settings panels close')}),ut();var t=zi(),n=t.root;[n].concat(A(n,".ge-selected, .ge-settings-target, .ge-leaving")).forEach(function(o){k(o,"ge-selected ge-settings-target ge-leaving"),nt(o)}),A(n,".ge-drop-marker").forEach(function(o){o.remove()}),zr(n),No(n);var r=null;return[T,M,U].forEach(function(o){Object.keys(o).forEach(function(i){var l=o[i];r||!l.cleanMarkup||l.cleanMarkup(n,t.liveOf)===!1&&(r=i)})}),r?(q("snapshot-refused:"+r,'the "'+r+'" plugin cannot take its marking off a copy right now, so the canvas leaves editing to be read'),ut()):(Rt(n),jr(n),A(n,"[data-ge-container]").forEach(Yr),He.forEach(function(o){var i=t.copyOf(o.el);i&&A(i,"[draggable]").forEach(function(l){l.removeAttribute("draggable")})}),Mo(n),Jn(!1,n),Qe(n),n.innerHTML)}function ut(e){if(e&&e.keepEditing)return Rr();Ne(),Qe(c);var t=c.innerHTML;return be(),t}function ji(e){Ne(),Qe(e);var t=e.outerHTML;return be(),t}function Ri(e){return ir(ut(e))}function Ni(e){_e&&(_n(),_&&A(_,".gm-edit-mode").forEach(function(t){k(t,"active btn-danger")})),Pt(!1),Ne(),yt(c,e),be()}function Di(){le("onDestroy"),_e&&_n(),Pt(!1),Ne(),L=null,tn===a&&(tn=null),fr(),uo(),Eo(),Cn(),te.remove(),Ve.abort(),nn.delete(c),it=!0}function Ii(){var e=ur=Fi();Sn("grid",{},Ei()),s.row_cols!==!1&&Sn("grid",{},La());var t=function(r){return!s.plugins||s.plugins.indexOf(r)!==-1},n=function(r,o){return o.always===!0||t(r)};Object.keys(O.containers).forEach(function(r){t(r)&&(T[r]=O.containers[r](e))}),Object.keys(O.features).forEach(function(r){var o=O.features[r];n(r,o)&&(M[r]=o(e))}),Object.keys(O.utilities).forEach(function(r){t(r)&&(U[r]=O.utilities[r](e),(U[r].families||[]).forEach(function(o){Sn(r,U[r],o)}))}),Object.keys(M).forEach(function(r){var o=M[r].methods||{};Object.keys(o).forEach(function(i){De[i]=o[i]})}),(s.plugins||[]).forEach(function(r){T[r]||M[r]||U[r]||q("plugin:"+r,'the "'+r+'" plugin is not loaded: include dist/plugins/grideditor.'+r+".js after the editor")})}function le(e,t){[T,M,U].forEach(function(n){Object.keys(n).forEach(function(r){n[r][e]&&n[r][e](t)})})}function Fi(){return{canvas:c,settings:s,t:g,warn:K,containerId:Xr,freshNode:Ji,defaultRegion:$i,createTool:F,createMoveTool:Ie,addSettingsTool:pt,deleteNode:Re,place:Yt,placeInTarget:wi,createPaneControls:ta,makeLabelEditable:na,labelIn:ra,unwrapLabels:oa,suspendToggles:Jr,resumeToggles:$r,emit:D,payloadFor:ie,operate:$,kindOf:de,view:Zn,previewing:function(){return ze},viewTiers:function(){return Yo(R).map(function(e){return e.key})},breakpoints:E.map(function(e){return e.key}),getUtility:Hr,setUtility:Pn,utilityField:Yi,bareStyle:Hi,hostStyle:Kr,setHostStyle:qi,openDialog:Co,closeDialog:ce,rowFromLayout:st,nodeHtml:ji,snapshotHtml:Rr,setHtml:Ni,confirm:cr,textReady:li,attachPicker:Zr,openPicker:kr,closePicker:Ce,detailsOf:function(e,t){var n=In(e);return n&&!(t&&t.build===!1)&&Ft(n),n},drawerOf:Tn,refreshToolbar:mi,toolbarItems:function(e){return _?A(_,'[data-ge-toolbar="feature"][data-ge-feature="'+e+'"]'):[]},getActiveTarget:function(){return s.active_target?L:null},setActiveTarget:function(e){var t=!!s.active_target&&(e===null||Lr(e));return t&&ne(e),t},removeNode:oi,panelOpen:function(){return V||Q||N&&w(N,"show")?!0:Ye()==="inline"&&A(c,".ge-tools-drawer > .ge-details").some(rt)},contains:function(e){return!e||e.nodeType!==1?!1:c.contains(e)||_&&_.contains(e)||Y&&Y.contains(e)||N&&N.contains(e)?!0:Object.keys(z).some(function(t){return z[t].contains(e)})}}}function Tn(e){if(w(e,"ge-content")){var t=e.parentElement;return w(t,"ge-text-block")?j(t,".ge-tools-drawer"):null}return j(e,".ge-tools-drawer")}var Ae={},Wi=".row, .column, .ge-content, .ge-element, [data-ge-container]",Ge="data-ge-preview",On=!1;function Sn(e,t,n){var r=n.name||n.prefix;if(Ae[r]){K('the "'+e+'" plugin declares the utility "'+r+'", which the "'+Ae[r].plugin+'" plugin already declared: ignored');return}Ae[r]={plugin:e,family:Object.assign({},n,{name:r,values:n.values.map(String),appliesTo:n.appliesTo||t.appliesTo||["row","column"]})}}function jt(e,t){return Ae[e]?Ae[e].family:(q("utility:"+e,t+"("+JSON.stringify(e)+"): no loaded plugin declares that utility"),null)}function Nr(e,t){return t==="plain"&&(t="text"),e.appliesTo.indexOf(t)!==-1?!0:!!T[t]&&e.appliesTo.indexOf("container")!==-1}function Dr(e){return Object.keys(Ae).map(function(t){return Ae[t].family}).filter(function(t){return Nr(t,e)})}function Ln(e,t,n){return e.className?e.className(t.key,n):e.prefix+(t.infix?"-"+t.infix:"")+"-"+n}function Te(e,t,n){for(var r=(e.getAttribute("class")||"").split(/\s+/),o=0;o<t.values.length;o++)if(r.indexOf(Ln(t,n,t.values[o]))!==-1)return t.values[o];return null}function Ir(e,t,n){for(var r=E.indexOf(n)-1;r>=0;r--){var o=Te(e,t,E[r]);if(o!==null)return{tier:E[r],value:o}}return null}function Fr(e,t,n){var r=Te(e,t,n);if(r!==null)return r;var o=Ir(e,t,n);return o?o.value:null}function Mn(e,t){return E.map(function(n){return{tier:n,value:Te(e,t,n)}}).filter(function(n){return n.value!==null})}function Wr(e,t,n,r){t.values.forEach(function(o){k(e,Ln(t,n,o))}),r!==null&&C(e,Ln(t,n,r)),nt(e)}function Br(e,t,n){return n===Z?Te(e,t,E[0]):Fr(e,t,ee(n))}function Bi(e,t,n,r){if(n!==Z){var o=ee(n);return Te(e,t,o)===r?null:{writes:[{tier:o,value:r}],cleared:[]}}var i=[],l=[];return Mn(e,t).forEach(function(d){d.tier!==E[0]&&(i.push({tier:d.tier,value:null}),l.push({breakpoint:d.tier.key,value:d.value}))}),Te(e,t,E[0])!==r&&i.unshift({tier:E[0],value:r}),i.length?{writes:i,cleared:l}:null}function Hr(e,t,n){e=pe(e);var r=jt(t,"getUtility");if(!r||!e)return null;var o=n===void 0?R:Qn(n);return o===null?(K("getUtility("+JSON.stringify(n)+"): no such layout mode"),null):Br(e,r,o)}function Pn(e,t,n,r){r=typeof r=="string"?{view:r}:r||{},e=pe(e);var o=jt(t,"setUtility");if(!o||!e)return!1;var i=r.view===void 0?R:Qn(r.view);if(i===null)return K("setUtility("+JSON.stringify(r.view)+"): no such layout mode"),!1;if(n=n==null||n===""?null:String(n),n!==null&&o.values.indexOf(n)===-1)return K("setUtility: "+JSON.stringify(n)+' is not a value of "'+t+'", which takes '+JSON.stringify(o.values)),!1;var l=de(e);if(!Nr(o,l))return K('setUtility: "'+t+'" does not apply to a '+l),!1;if(o.write)return o.write(e,n,i,r.source||"api");var d=Bi(e,o,i,n);return d?$(function(){var m=ie(l,e,{family:t,breakpoint:i,tiers:d.writes.map(function(f){return f.tier.key}),from:Br(e,o,i),to:n,cleared:d.cleared,source:r.source||"api"});return D("before-utility",m)?(d.writes.forEach(function(f){Wr(e,o,f.tier,f.value)}),we(e),D("after-utility",m),!0):(we(e),!1)}):!1}function Hi(e,t,n){var r=jt(t,"bareStyle");if(e=pe(e),!r||!e)return null;var o=e.getAttribute("class");E.forEach(function(l){Wr(e,r,l,null)});var i=getComputedStyle(e).getPropertyValue(n);return o===null?e.removeAttribute("class"):e.setAttribute("class",o),i}function we(e){var t=In(e);if(t){var n=S(t,".ge-classes");n&&(n.value=Dn(e).join(" ")),X(t,".ge-utilities").forEach(function(r){zn(r)})}Vr(e),dt(e)}function Ki(e){return me(e,Wi)}function dt(e){Rt(e),R!==Z&&Ui(e,ee(R)),Sa(e),le("onRefresh",e)}function Ui(e,t){Ki(e).forEach(function(n){var r=de(n),o={};Dr(r).forEach(function(i){!i.preview||!Mn(n,i).length||Object.assign(o,i.preview(Fr(n,i,t),n,r))}),r==="column"&&Object.assign(o,Oa(n,t)),Object.keys(U).forEach(function(i){var l=U[i];l.preview&&Object.assign(o,l.preview(n,r,t.key))}),Object.keys(o).length&&Vi(n,o)})}function Vi(e,t){var n=e.style,r={};Object.keys(t).forEach(function(o){r[o]=[n.getPropertyValue(o),n.getPropertyPriority(o)],n.setProperty(o,String(t[o]),"important")}),e.setAttribute(Ge,JSON.stringify(r))}function Rt(e){me(e,"["+Ge+"]").forEach(function(t){var n=t.style,r={};try{r=JSON.parse(t.getAttribute(Ge))||{}}catch(o){}Object.keys(r).forEach(function(o){var i=r[o];i&&i[0]?n.setProperty(o,i[0],i[1]):n.removeProperty(o)}),t.removeAttribute(Ge),Ct(t)})}function Gi(e){var t=document.createElement("div"),n={};t.style.cssText=e.style.cssText;try{n=JSON.parse(e.getAttribute(Ge))||{}}catch(r){}return Object.keys(n).forEach(function(r){var o=n[r];o&&o[0]?t.style.setProperty(r,o[0],o[1]):t.style.removeProperty(r)}),t.style}function Kr(e,t){var n=Gi(e);return t===void 0?n.cssText:{value:n.getPropertyValue(t),priority:n.getPropertyPriority(t)}}function qi(e,t,n,r){if(n=n==null?"":String(n).trim(),r===void 0&&(r=Kr(e,t).priority),n!==""){var o=document.createElement("div").style;if(o.setProperty(t,n,r||""),o.getPropertyValue(t)==="")return!1}var i=e.hasAttribute(Ge);return i&&Rt(e),n===""?e.style.removeProperty(t):e.style.setProperty(t,n,r||""),Ct(e),i&&dt(e),!0}function Xi(e){var t=de(e),n=Dr(t).filter(function(l){return l.panel!==!1}).map(function(l){return Ur(e,l)});if(Object.keys(U).forEach(function(l){var d=U[l],m=d.panel?d.panel(e,t):null;m&&n.push(m)}),!n.length)return null;var r=P(h("div",{class:"ge-utilities"}),"ge-open",On);dr.set(r,e);var o=r.appendChild(h("a",{class:"ge-utilities-toggle"}));o.addEventListener("click",function(){On=!w(r,"ge-open"),ao().forEach(function(l){A(l,".ge-utilities").forEach(function(d){P(d,"ge-open",On)})})});var i=r.appendChild(h("div",{class:"ge-utilities-body"}));return n.forEach(function(l){i.appendChild(l)}),zn(r),r}function Ur(e,t){var n=h("label",{class:"ge-utility","data-ge-family":t.name});n.appendChild(h("span",{class:"ge-utility-label"},t.labelKey?g(t.labelKey):t.name));var r=n.appendChild(h("select",{class:"form-select form-select-sm"}));return r.addEventListener("change",function(){Pn(e,t.name,this.value,{source:"panel"})}),n.appendChild(h("small",{class:"ge-utility-note"})),n}function Yi(e,t){var n=jt(t,"utilityField");if(!n)return null;var r=Ur(e,n);return jn(r,e),qe.set(r,e),r}var qe=new Map;function Vr(e){qe.forEach(function(t,n){if(!n.isConnected){qe.delete(n);return}e&&t!==e||B(n,".ge-utilities")||jn(n,t)})}function zn(e){var t=dr.get(e);X(e,".ge-utilities-toggle").forEach(function(n){n.textContent=g("utility.section",{view:g(kt(R))})}),A(e,".ge-utility").forEach(function(n){jn(n,t)})}function jn(e,t){var n=Ae[e.getAttribute("data-ge-family")].family,r=j(e,"select"),o=n.choices?n.choices(t,de(t)):n.values,i,l,d="";if(r.innerHTML="",R===Z){i=Te(t,n,E[0]),l=g("utility.default");var m=Mn(t,n).filter(function(H){return H.tier!==E[0]});m.length&&(d=g("utility.varies",{breakpoints:m.map(function(H){return H.tier.key}).join(", ")}))}else{var f=ee(R),v=Ir(t,n,f);i=Te(t,n,f),l=v?g("utility.inherit",{value:Gr(n,v.value),breakpoint:v.tier.key}):g("utility.default");var b=n.blank?n.blank(t,R):null;b&&i===null&&(l=b)}i!==null&&o.indexOf(i)===-1&&(o=o.concat([i])),r.appendChild(h("option",{value:""},l)),o.forEach(function(H){r.appendChild(h("option",{value:H},Gr(n,H)))}),r.value=i===null?"":i;var x=j(e,".ge-utility-note");x.textContent=d,Ho(x,d!=="")}function Gr(e,t){return e.label?e.label(t):t}var T={},M={},U={},De={},qr=0;function Xr(e){return qr++,"ge-"+e+"-"+qr+"-"+Math.random().toString(36).slice(2,6)}function Ji(e){var t=G(e),n={},r=function(i){return!!document.getElementById(i)||Object.keys(n).some(function(l){return n[l]===i})};if(me(t,"[id]").forEach(function(i){var l=i.id;if(document.getElementById(l)){var d=ml.exec(l),m;if(d)do m=Xr(d[1]);while(r(m));else{for(var f=2;r(l+"-"+f);)f++;m=l+"-"+f}n[l]=m,i.id=m}}),!Object.keys(n).length)return t;var o=Object.keys(T).reduce(function(i,l){return i.concat(T[l].references||[])},fl);return me(t,"*").forEach(function(i){o.forEach(function(l){var d=i.getAttribute(l);if(d!==null&&!(l==="href"&&d.charAt(0)!=="#")){var m=d.split(/(\s+)/).map(function(f){return n[f]?n[f]:f.charAt(0)==="#"&&n[f.slice(1)]?"#"+n[f.slice(1)]:f}).join("");m!==d&&i.setAttribute(l,m)}})}),t}function $i(){var e=Ze();return e.appendChild(fe(W)),e}function ye(e){return e?e.getAttribute("data-ge-container"):null}function Qi(){A(c,"[data-ge-container]").forEach(function(e){var t=ye(e),n=T[t];if(!n){q("container:"+t,'unknown container type "'+t+'"');return}C(e,"ge-container ge-container-"+t),n.mark(e),j(e,".ge-tools-drawer")||ea(e,t,n)})}function Zi(){A(c,"[data-ge-container]").forEach(function(e){var t=T[ye(e)];t&&t.unmark(e),Yr(e)})}function Yr(e){k(e,"ge-container ge-container-"+ye(e)),nt(e)}function Xe(e,t){var n=h("div",{class:t});return e.insertBefore(n,e.firstChild),n}function Nt(e,t){(t||[]).forEach(function(n){F(e,n.title||"",n.className||"",n.iconClass||"bi bi-wrench",n.on)})}function ea(e,t,n){var r=Xe(e,"ge-tools-drawer ge-container-drawer");Ie(r),pt(r,e,s.container_classes),Nt(r,s.container_tools),n.tools&&n.tools(r,e),F(r,g("tool.delete_container"),"ge-delete-container","bi bi-trash",function(){Re(t,e,g("confirm.delete_container"),function(o){_t(e,o)})}),n.addPane&&F(r,g(n.addPaneKey),"ge-add-pane","bi bi-plus-circle",function(){var o=n.addPane(e,{});o&&ae(n.paneKind,o,function(){},{parent:e,source:"tool",container:e})})}function ta(e,t,n,r,o){var i=Xe(e,"ge-tools-drawer ge-pane-drawer");return Ie(i),pt(i,e,s.pane_classes),Nt(i,n),F(i,g("tool.delete_pane"),"ge-delete-pane","bi bi-trash",function(){Re(t,e,r,function(l){o(l)})}),i}var Dt=["toggle","dismiss","slide","slide-to","ride"];function Jr(e){e&&me(e,Dt.map(function(t){return"[data-bs-"+t+"]"}).join(", ")).forEach(function(t){Dt.forEach(function(n){var r=t.getAttribute("data-bs-"+n);r!==null&&(t.setAttribute("data-ge-bs-"+n,r),t.removeAttribute("data-bs-"+n))})})}function $r(e){e&&me(e,Dt.map(function(t){return"[data-ge-bs-"+t+"]"}).join(", ")).forEach(function(t){Dt.forEach(function(n){var r=t.getAttribute("data-ge-bs-"+n);r!==null&&(t.setAttribute("data-bs-"+n,r),t.removeAttribute("data-ge-bs-"+n))})})}function na(e){if(!dn.has(e)){var t=B(e,"[data-bs-toggle], [data-ge-bs-toggle]");dn.add(e),e.setAttribute("title",g("tool.rename")),e.addEventListener("dblclick",function(n){n.preventDefault(),n.stopPropagation(),Jr(t),e.setAttribute("contenteditable","true"),e.focus(),window.getSelection().selectAllChildren(e)}),e.addEventListener("keydown",function(n){e.getAttribute("contenteditable")==="true"&&n.key==="Enter"&&(n.preventDefault(),e.blur())}),e.addEventListener("blur",function(){e.removeAttribute("contenteditable"),$r(t)})}}function ra(e){var t=j(e,".ge-pane-label");return t||(t=h("span",{class:"ge-pane-label"},e.textContent.trim()),e.innerHTML="",e.appendChild(t)),t}function oa(e){A(e,".ge-pane-label").forEach(function(t){dn.delete(t),en(t)})}function Qr(e,t){var n=fe(t);return ae("column",n,function(){e.appendChild(n)},{parent:e,source:"tool"})}function ia(e,t){!s.add_column.picker||!e||Zr(e,function(){aa(e,t)})}function Zr(e,t){var n=null,r=function(){window.clearTimeout(n),n=null};ge(e,"mouseenter mousedown",function(){n||oe||(n=window.setTimeout(function(){n=null,t()},s.add_column.delay))}),ge(e,"mouseleave mouseup",r)}function aa(e,t){Ce();var n=Vn(t,Ee()),r=B(e,".ge-tools-drawer");r&&C(r,"ge-picker-open"),oe=e.appendChild(h("div",{class:"ge-size-picker"})),s.valid_col_sizes.forEach(function(o){var i=h("a",{class:"ge-size","data-ge-size":o,title:la(o)},J(o)?o:Fe(E[0],o));P(i,"ge-size-tight",J(o)&&o>n),P(i,"ge-size-flex",!J(o)),i.addEventListener("click",function(l){l.preventDefault(),l.stopPropagation(),Ce(),Qr(t,o)}),oe.appendChild(i)}),Ar(e)}function la(e){return e==="equal"?g("tool.column_equal"):e==="auto"?g("tool.column_auto"):g("tool.column_size",{size:e})}function Ce(){if(!oe)return!1;var e=B(oe,".ge-tools-drawer");return e&&k(e,"ge-picker-open"),oe.remove(),oe=null,!0}function sa(){A(c,".row").forEach(function(e){if(!j(e,".ge-tools-drawer")){var t=Xe(e,"ge-tools-drawer");Ie(t),pt(t,e,s.row_classes),Nt(t,s.row_tools),F(t,g("tool.delete_row"),"ge-delete-row","bi bi-trash",function(){Re("row",e,g("confirm.delete_row"),function(n){_t(e,n)})}),F(t,g("tool.add_column"),"ge-add-column","bi bi-plus-circle",function(){Ce()||Qr(e,Je(e,Ee())?null:s.add_column.size)}),ia(j(t,".ge-add-column"),e)}})}function ua(){A(c,".column").forEach(function(e){if(!j(e,".ge-tools-drawer")){var t=Xe(e,"ge-tools-drawer");Ie(t),s.resize.tools!==!1&&(F(t,g("tool.column_narrower"),"ge-decrease-col-width","bi bi-dash-lg",function(n){bn(e,n.shiftKey?gt(s.valid_col_sizes):It(s.valid_col_sizes.filter(J),ft(e),-1),"tool")}),F(t,g("tool.column_wider"),"ge-increase-col-width","bi bi-plus-lg",function(n){bn(e,n.shiftKey?da(e):It(s.valid_col_sizes.filter(J),ft(e),1),"tool")})),s.indent.tools!==!1&&(F(t,g("tool.indent_decrease"),"ge-decrease-col-offset","bi bi-text-indent-right",function(n){gr(e,n.shiftKey?gt(s.valid_col_offsets):It(s.valid_col_offsets,mt(e),-1),"tool")}),F(t,g("tool.indent_increase"),"ge-increase-col-offset","bi bi-text-indent-left",function(n){gr(e,n.shiftKey?ca(e):It(s.valid_col_offsets,mt(e),1),"tool")})),pt(t,e,s.col_classes),Nt(t,s.col_tools),F(t,g("tool.delete_column"),"ge-delete-column","bi bi-trash",function(){Re("column",e,g("confirm.delete_column"),function(n){Go(e,400,n,!0)})}),F(t,g("tool.add_row"),"ge-add-row","bi bi-plus-circle",function(){var n=Ze();ae("row",n,function(){e.appendChild(n)},{parent:e,source:"tool"})})}})}function Ee(){return R===Z?E[E.length-1]:ee(R)}function ct(e){var t=Ee();if(Ht(e,t))return null;var n=Kn(e,t);return n===null?W:n}function ft(e){var t=ct(e);if(J(t))return t;var n=Math.round(Et(e)/eo(e.parentElement)*W);return Math.min(Math.max(n,1),W)}function eo(e){var t=window.getComputedStyle(e);return e.clientWidth-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight)}function mt(e){return Ut(e,Ee())||0}function It(e,t,n){var r=e.indexOf(t);return r===-1?e.reduce(function(o,i){return Math.abs(i-t)<Math.abs(o-t)?i:o},e[0]):e[Math.min(Math.max(r+n,0),e.length-1)]}function gt(e){return e.filter(J).reduce(function(t,n){return Math.min(t,n)},W)}function Rn(e){return e.filter(J).reduce(function(t,n){return Math.max(t,n)},0)}function da(e){var t=Vn(e.parentElement,Ee(),e)-mt(e);return Math.min(Rn(s.valid_col_sizes),Math.max(t,1))}function ca(e){var t=Vn(e.parentElement,Ee(),e)-ft(e);return Math.min(Rn(s.valid_col_offsets),Math.max(t,0))}function Ie(e){return s.drag_handle==="drawer"?null:F(e,g("tool.move"),"ge-move","bi bi-arrows-move")}var Nn=".ge-tools-drawer:not(.ge-text-drawer):not(.ge-pane-drawer):not(.ge-code-inline)";function fa(){if(s.drawer_overflow==="wrap"||!window.ResizeObserver||!window.MutationObserver)return;var e=new Set,t=null;function n(l){e.add(l),t===null&&(t=window.requestAnimationFrame(r))}function r(){t=null;var l=Array.from(e).filter(function(d){return d.isConnected?!0:(o.unobserve(d),!1)});e.clear(),ma(l)}var o=new window.ResizeObserver(function(l){l.forEach(function(d){n(d.target)})}),i=new window.MutationObserver(function(l){l.forEach(function(d){var m=d.target;if(d.type==="attributes"){var f=m.parentNode;f&&f.nodeType===1&&f.matches(Nn)&&n(f);return}if(m.nodeType===1&&m.matches(Nn)){n(m);return}d.addedNodes.forEach(function(v){v.nodeType===1&&me(v,Nn).forEach(function(b){C(b,"ge-drawer-fit"),o.observe(b),n(b)})})})});i.observe(c,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style"]}),Ve.signal.addEventListener("abort",function(){i.disconnect(),o.disconnect(),t!==null&&window.cancelAnimationFrame(t)})}function ma(e){var t=e.map(function(r){var o={drawer:r,tools:X(r,"a").filter(function(i){return!w(i,"ge-drawer-more")}),expanded:w(r,"ge-drawer-expanded")};return k(r,"ge-drawer-overflow ge-drawer-expanded"),o.tools.forEach(function(i){k(i,"ge-tool-overflow")}),o}),n=t.filter(function(r){return r.rights=r.tools.map(function(o){var i=o.getClientRects();return i.length?i[0].right:null}),no(r,to(r.drawer))});n.forEach(function(r){C(r.drawer,"ge-drawer-overflow")}),n.forEach(function(r){r.room=to(r.drawer)}),n.forEach(function(r){for(var o=r.tools.length-1;o>=0&&no(r,r.room,o);o--)C(r.tools[o],"ge-tool-overflow");j(r.drawer,".ge-drawer-more")||F(r.drawer,g("tool.more"),"ge-drawer-more","bi bi-three-dots",function(){P(r.drawer,"ge-drawer-expanded")}),P(r.drawer,"ge-drawer-expanded",r.expanded)})}function to(e){var t=window.getComputedStyle(e);return e.getBoundingClientRect().right-parseFloat(t.borderRightWidth)-parseFloat(t.paddingRight)}function no(e,t,n){n=n===void 0?e.rights.length-1:n;for(var r=0;r<=n;r++)if(e.rights[r]!==null&&e.rights[r]>t+.5)return!0;return!1}function F(e,t,n,r,o){var i=h("a",{title:t,class:n});return i.appendChild(h("i",{class:r})),e.appendChild(i),typeof o=="function"&&(i.addEventListener("click",o),sn.set(i,o)),o&&typeof o=="object"&&(Object.keys(o).forEach(function(l){ge(i,l,o[l])}),typeof o.click=="function"&&sn.set(i,o.click)),i}function Dn(e){return(e.getAttribute("class")||"").split(/\s+/).filter(function(t){return t!==""&&!ga(t)})}function ga(e){return e==="row"||e==="column"||/^(ge-|ui-)/.test(e)||/^col(-(sm|md|lg|xl|xxl))?(-auto)?$/.test(e)?!0:E.some(function(t){return new RegExp("^("+t.colPrefix+"|"+t.offsetPrefix+")\\d+$").test(e)})}function pa(e,t){Dn(e).forEach(function(n){k(e,n)}),t.split(/\s+/).forEach(function(n){n!==""&&C(e,n)}),nt(e)}function pt(e,t,n){var r=va(t,n||[]);Ue.set(t,r),Ye()!=="sidebar"&&F(e,g("tool.settings"),"ge-settings","bi bi-gear-fill",function(){ba(t,r,this)});var o=de(t);return Object.keys(U).forEach(function(i){U[i].drawerTools&&U[i].drawerTools(e,t,o)}),Object.keys(M).forEach(function(i){M[i].drawerTools&&M[i].drawerTools(e,t,o)}),e.appendChild(r)}function va(e,t){var n=h("div",{class:"ge-details"});n.appendChild(oo(g("panel.section_general")));var r=n.appendChild(h("div",{class:"ge-details-general"})),o=function(f){var v=h("label",{class:"ge-field"});return v.appendChild(h("span",{class:"ge-field-label"},f)),r.appendChild(v)},i=h("input",{class:"ge-id form-control form-control-sm",placeholder:g("tool.id_placeholder"),title:g("tool.id_title")});i.value=e.getAttribute("id")||"",o(g("panel.id")).appendChild(i),i.addEventListener("change",function(){this.value===""?e.removeAttribute("id"):e.setAttribute("id",this.value)});var l=h("input",{class:"ge-classes form-control form-control-sm",placeholder:g("tool.classes_placeholder"),title:g("tool.classes_title")});l.value=Dn(e).join(" "),o(g("panel.classes")).appendChild(l),l.addEventListener("change",function(){pa(e,this.value),we(e)});var d=r.appendChild(h("div",{class:"btn-group btn-group-sm ge-presets",role:"group"}));t.forEach(function(f){var v=w(e,f.cssClass),b=h("a",{role:"button",class:"btn btn-sm btn-outline-secondary",title:f.title?f.title:g("tool.toggle_class",{label:f.label}),"aria-pressed":v?"true":"false"});b.innerHTML=f.label,P(b,"active",v),b.addEventListener("click",function(){P(b,"active"),b.setAttribute("aria-pressed",w(b,"active")?"true":"false"),P(e,f.cssClass,w(b,"active")),we(e)}),d.appendChild(b)});var m=n.appendChild(document.createComment(" ge-details-body "));return ln.set(n,{node:e,anchor:m,nodes:null}),n}function Ft(e){var t=ln.get(e);if(!(!t||t.nodes)){var n=ha(t.node),r=Xi(t.node);r&&n.push(r),n.forEach(function(o){e.insertBefore(o,t.anchor)}),t.nodes=n}}function ro(e){var t=ln.get(e);!t||!t.nodes||(Q&&Q.home&&e.contains(Q.home)&&ce(),t.nodes.forEach(function(n){n.remove()}),t.nodes=null,qe.forEach(function(n,r){r.isConnected||qe.delete(r)}))}function oo(e){return h("h6",{class:"ge-section-title"},e)}function ha(e){var t=de(e),n=Ye(),r=[];return[T,M,U].forEach(function(o){Object.keys(o).forEach(function(i){var l=o[i],d=l.panelSection?l.panelSection(e,t):null;if(!(!d||!d.body)){var m=h("div",{class:"ge-panel-section","data-ge-plugin":i});if(n==="offcanvas"||n==="modal"||n==="sidebar")m.appendChild(oo(g(d.labelKey))),m.appendChild(d.body);else{var f=g(d.labelKey),v=m.appendChild(h("button",{type:"button",class:"btn btn-sm btn-outline-secondary ge-panel-section-open"},f));ue(d.body),m.appendChild(d.body),v.addEventListener("click",function(){Co(d.titleKey?g(d.titleKey,{kind:Hn(e)}):f,d.body,v)})}r.push(m)}})}),r}var io=["offcanvas","popover","modal","inline","sidebar"],z={},V=null,Wt=new WeakMap;function Ye(){return io.indexOf(s.settings_panel)!==-1?s.settings_panel:(q("settings_panel",'settings_panel "'+s.settings_panel+'" is not one of '+io.join(", ")+": using offcanvas"),"offcanvas")}function In(e){return e&&Ue.get(e)||null}function ao(){var e=[c];return V&&V.mode!=="inline"&&e.push(V.details),Se&&e.push(Se.details),e}function ba(e,t,n){var r=Ye();if(r==="inline"){rt(t)?(ue(t),ro(t)):(Ft(t),xe(t));return}var o=V&&V.details===t;Oe(),o||wa(r,e,t,n)}function wa(e,t,n,r){var o=so(e),i=new AbortController;V={mode:e,node:t,details:n,home:n.parentElement,next:n.nextElementSibling,gear:r,listening:i},S(o,".ge-settings-title").textContent=g("panel.title",{kind:Hn(t)}),Ft(n),S(o,".ge-settings-body").appendChild(n),xe(n),C(t,"ge-settings-target");var l={signal:i.signal};if(document.addEventListener("keydown",function(m){m.key==="Escape"&&!Q&&Oe()},l),e==="offcanvas"){var d=window.innerWidth<576;P(o,"offcanvas-end",!d),P(o,"offcanvas-bottom",d),k(o,"hiding"),o.getBoundingClientRect(),C(o,"show")}else e==="popover"?(Fn(o,r),ge(window,"scroll resize",function(){Fn(o,r)},l),window.ResizeObserver&&(V.observer=new window.ResizeObserver(function(){Fn(o,r)}),V.observer.observe(n)),ge(document,"mousedown touchstart",function(m){!Q&&!o.contains(m.target)&&!r.contains(m.target)&&Oe()},l)):Wn(o,function(){V&&V.mode==="modal"&&Oe()})}function Oe(){ce();var e=V;if(e){V=null;var t=z[e.mode];e.listening.abort(),e.observer&&e.observer.disconnect(),e.mode==="offcanvas"?(k(t,"show"),C(t,"hiding"),window.setTimeout(function(){k(t,"hiding")},300)):e.mode==="popover"?ue(t):Bn(t),lo(e)}}function lo(e){ro(e.details),k(e.node,"ge-settings-target"),e.details.style.removeProperty("display"),Ct(e.details),e.home&&Le(e.home)?e.next&&e.next.parentElement===e.home?e.home.insertBefore(e.details,e.next):e.home.appendChild(e.details):e.details.remove()}function so(e){if(z[e])return z[e];var t=function(){return h("button",{type:"button",class:"btn-close ge-settings-close","aria-label":g("panel.close")})},n;return e==="offcanvas"?(n=G('<div class="offcanvas offcanvas-end ge-settings-panel ge-settings-offcanvas" tabindex="-1" role="dialog"><div class="offcanvas-header"><h5 class="offcanvas-title ge-settings-title"></h5></div><div class="offcanvas-body ge-settings-body"></div></div>'),S(n,".offcanvas-header").appendChild(t())):e==="popover"?(n=G('<div class="popover bs-popover-bottom ge-settings-panel ge-settings-popover" role="dialog"><div class="popover-arrow"></div><div class="popover-header"><span class="ge-settings-title"></span></div><div class="popover-body ge-settings-body"></div></div>'),S(n,".popover-header").appendChild(t()),ue(n)):e==="sidebar"?(n=G('<div class="offcanvas offcanvas-end ge-settings-panel ge-settings-sidebar" tabindex="-1" role="complementary"><div class="offcanvas-header"><h5 class="offcanvas-title ge-settings-title"></h5></div><div class="offcanvas-body ge-settings-body"></div></div>'),n.id="ge-settings-sidebar-"+sr,S(n,".offcanvas-header").appendChild(t()),z["sidebar-toggle"]=document.body.appendChild(ya(n))):(n=G('<div class="modal fade ge-settings-panel ge-settings-modal" tabindex="-1" role="dialog" aria-hidden="true"><div class="modal-dialog modal-dialog-centered modal-dialog-scrollable"><div class="modal-content"><div class="modal-header"><h5 class="modal-title ge-settings-title"></h5></div><div class="modal-body ge-settings-body"></div><div class="modal-footer"></div></div></div></div>'),S(n,".modal-header").appendChild(t()),S(n,".modal-footer").appendChild(h("button",{type:"button",class:"btn btn-primary ge-settings-close"},g("panel.done")))),xt(n,"click",".ge-settings-close",function(r){r.preventDefault(),e==="sidebar"?ne(null):Oe()}),z[e]=document.body.appendChild(n),n}function uo(){Oe(),vo(),k(document.documentElement,"ge-sidebar-open"),Object.keys(z).forEach(function(e){e==="modal"?mn(z[e]):z[e].remove()}),Object.keys(z).forEach(function(e){yo(z[e])}),z={}}var co=576,Se=null,vt=null;function Bt(){return w(c,"ge-editing")}function ya(e){var t=h("button",{type:"button",class:"ge-sidebar-toggle","aria-controls":e.id});return t.appendChild(h("i")),t.addEventListener("click",function(){Ca(!Ke)}),t}function Ca(e){Ke=e,fo()}function fo(){var e=z.sidebar,t=z["sidebar-toggle"];if(e){var n=!Ke;n&&!w(e,"show")?(k(e,"hiding"),e.getBoundingClientRect(),C(e,"show")):!n&&w(e,"show")&&(k(e,"show"),C(e,"hiding"),window.setTimeout(function(){k(e,"hiding")},300));var r=g(n?"panel.collapse":"panel.expand");t.setAttribute("aria-expanded",n?"true":"false"),t.setAttribute("aria-label",r),t.setAttribute("title",r),S(t,"i").className="bi "+(n?"bi-chevron-right":"bi-chevron-left"),mo()}}function mo(){P(document.documentElement,"ge-sidebar-open",!!z.sidebar&&Bt()&&!Ke&&window.innerWidth>=co)}function Ea(){if(Ye()==="sidebar"){var e=so("sidebar");Ke===null&&(Ke=window.innerWidth<co),e.style.removeProperty("display"),z["sidebar-toggle"].style.removeProperty("display"),ho(),fo()}}function xa(){po();var e=z.sidebar;e&&(e.style.display="none",z["sidebar-toggle"].style.display="none",k(document.documentElement,"ge-sidebar-open"))}function go(e){var t=z.sidebar;S(t,".ge-settings-title").textContent=e,t.setAttribute("aria-label",e)}function po(){var e=Se;Se=null,e&&lo(e)}function vo(){po(),vt&&(vt.body.remove(),vt=null)}function ho(){var e=z.sidebar;if(!(!e||!Bt())){var t=L?In(L):null;if(!(t?Se&&Se.details===t:!Se&&vt)){vo();var n=S(e,".ge-settings-body");if(!t){var r=_a(),o=r?r.body:h("p",{class:"ge-sidebar-empty"},g("panel.sidebar_empty"));go(r?r.title:g("panel.sidebar_title")),n.appendChild(o),vt={body:o};return}Se={node:L,details:t,home:t.parentElement,next:t.nextElementSibling},go(g("panel.title",{kind:Hn(L)})),Ft(t),n.appendChild(t),xe(t)}}}function _a(){var e=s.sidebar.empty,t=null;return typeof e=="function"?t=bo(e(a),function(n){return n.title}):e!=null&&q("sidebar.empty","sidebar.empty is a function(ge) returning { title, body }, not "+typeof e+": ignored"),[T,M,U].forEach(function(n){Object.keys(n).forEach(function(r){var o=n[r];t||!o.sidebarEmpty||(t=bo(o.sidebarEmpty(ur),function(i){return typeof i.titleKey=="string"&&i.titleKey!==""?g(i.titleKey):""}))})}),t}function bo(e,t){if(!e||!e.body||e.body.nodeType!==1)return null;var n=t(e);return{title:typeof n=="string"&&n!==""?n:g("panel.sidebar_title"),body:e.body}}function wo(e){var t=B(e,".ge-tools-drawer",c);if(t){var n=t.parentElement,r=Ue.has(n)?n:X(n).filter(function(i){return Ue.has(i)})[0];if(r)return r}for(var o=e;o&&o!==c;o=o.parentElement)if(Ue.has(o))return o;return null}function Fn(e,t){if(Le(t)){xe(e);var n=t.getBoundingClientRect(),r=8,o=j(e,".popover-body");o.style.removeProperty("max-height");var i=Et(e),l=$t(e),d=window.innerHeight-n.bottom-2*r,m=n.top-2*r,f=l<=d||d>=m,v=f?d:m;l>v&&(Me(o,{"max-height":Math.max(120,v-(l-$t(o)))}),l=$t(e));var b=f?n.bottom+r:n.top-r-l,x=Math.max(r,Math.min(n.left+n.width/2-24,window.innerWidth-i-r));P(e,"bs-popover-bottom",f),P(e,"bs-popover-top",!f),Me(e,{top:b+window.pageYOffset,left:x+window.pageXOffset}),Me(j(e,".popover-arrow"),{left:Math.max(r,Math.min(n.left+n.width/2-x-8,i-24))})}}function Wn(e,t){var n=At(),r=Wt.get(e);if(r||(r={wanted:null,busy:!1,backdrop:null,dismissed:t},Wt.set(e,r)),r.dismissed=t,!n){r.backdrop||(r.backdrop=h("div",{class:"modal-backdrop fade show ge-settings-backdrop"}),r.backdrop.addEventListener("click",function(){r.dismissed()}),document.body.appendChild(r.backdrop)),C(e,"show"),e.style.display="block",e.removeAttribute("aria-hidden");return}var o=n.getOrCreateInstance(e);r.watched||(r.watched=!0,mr(e),e.addEventListener("hide.bs.modal",function(){r.wanted==="open"&&(r.wanted="closed",r.busy=!0)}),e.addEventListener("shown.bs.modal",function(){r.busy=!1,r.wanted==="closed"&&Bn(e)}),e.addEventListener("hidden.bs.modal",function(){r.busy=!1,r.wanted==="open"?Wn(e,r.dismissed):r.dismissed()})),r.wanted="open",r.busy||(r.busy=!0,o.show())}function Bn(e){var t=At(),n=Wt.get(e);if(n){if(n.wanted="closed",!t){n.backdrop&&(n.backdrop.remove(),n.backdrop=null),k(e,"show"),e.style.removeProperty("display"),e.setAttribute("aria-hidden","true");return}!n.busy&&w(e,"show")&&(n.busy=!0,t.getOrCreateInstance(e).hide())}}function yo(e){var t=Wt.get(e);t&&t.backdrop&&(t.backdrop.remove(),t.backdrop=null)}var Y=null,Q=null;function ka(){return Y||(Y=G('<div class="modal fade ge-dialog" tabindex="-1" role="dialog" aria-hidden="true"><div class="modal-dialog modal-dialog-centered modal-dialog-scrollable"><div class="modal-content"><div class="modal-header"><h5 class="modal-title ge-dialog-title"></h5></div><div class="modal-body ge-dialog-body"></div><div class="modal-footer"></div></div></div></div>'),S(Y,".modal-header").appendChild(h("button",{type:"button",class:"btn-close ge-dialog-close","aria-label":g("panel.close")})),S(Y,".modal-footer").appendChild(h("button",{type:"button",class:"btn btn-primary ge-dialog-close"},g("panel.done"))),xt(Y,"click",".ge-dialog-close",function(e){e.preventDefault(),ce()}),document.body.appendChild(Y))}function Co(e,t,n){ce();var r=ka(),o=new AbortController;Q={body:t,home:t.parentElement,next:t.nextElementSibling,opener:n||document.activeElement,listening:o},S(r,".ge-dialog-title").textContent=e,S(r,".ge-dialog-body").appendChild(t),xe(t),At()||document.addEventListener("keydown",function(i){i.key==="Escape"&&ce()},{signal:o.signal}),Object.keys(z).forEach(function(i){C(z[i],"ge-under-dialog")}),Wn(r,function(){ce()})}function ce(){var e=Q;e&&(Q=null,e.listening.abort(),Bn(Y),Object.keys(z).forEach(function(t){k(z[t],"ge-under-dialog")}),ue(e.body),e.home&&Le(e.home)?e.next&&e.next.parentElement===e.home?e.home.insertBefore(e.body,e.next):e.home.appendChild(e.body):e.body.remove(),e.opener&&Le(e.opener)&&e.opener.focus&&e.opener.focus())}function Eo(){ce(),Y&&(yo(Y),mn(Y),Y=null)}function Hn(e){var t=de(e);if(T[t]&&T[t].labelKey)return g(T[t].labelKey);var n=Object.keys(T).filter(function(r){return T[r].paneKind===t&&T[r].paneLabelKey})[0];if(n)return g(T[n].paneLabelKey);switch(t){case"row":return g("panel.kind_row");case"column":return g("panel.kind_column");case"text":return g("panel.kind_text");case"element":return g("panel.kind_element");case"section":return g("panel.kind_section");case"tab":return g("panel.kind_tab");case"accordion-item":return g("panel.kind_accordion_item");default:return t}}function Aa(){A(c,'.column, div[class*="col-"], div.col').forEach(function(e){C(e,"column"),!(Ma(e).length||xo(e.parentElement))&&Vt(e,E[0],W)})}function xo(e){return w(e,"row")&&E.some(function(t){return ot.some(function(n){return w(e,or(t,n))})})}function Je(e,t){if(!w(e,"row"))return null;for(var n=E.indexOf(t);n>=0;n--)for(var r=0;r<ot.length;r++)if(w(e,or(E[n],ot[r])))return{tier:n,value:ot[r]};return null}function _o(e,t){for(var n=E.indexOf(t);n>=0;n--){var r=$e(e,E[n]);if(r!==null)return{tier:n,size:r}}return null}function Ht(e,t){var n=Je(e.parentElement,t);if(!n)return null;var r=_o(e,t);return!r||n.tier>r.tier||n.tier===r.tier&&r.size==="equal"?n:null}function Ta(e){return e.value==="auto"?0:W/parseInt(e.value,10)}function Oa(e,t){var n=Ht(e,t);return n?{flex:"0 0 auto",width:n.value==="auto"?"auto":100/parseInt(n.value,10)+"%","max-width":"100%"}:xo(e.parentElement)&&!_o(e,t)?{flex:"0 0 auto",width:"100%","max-width":"100%"}:{}}function Sa(e){me(e,".row").forEach(function(t){var n=s.row_cols===!1?null:R===Z?Je(t,E[0])||null:Je(t,ee(R));n?t.setAttribute("data-ge-row-cols",ko(n.value)):t.removeAttribute("data-ge-row-cols")})}function ko(e){return e==="auto"?g("badge.row_cols_auto"):g("badge.row_cols",{count:e})}function La(){return{name:"row-cols",prefix:"row-cols",values:ot,appliesTo:["row"],labelKey:"utility.row_cols"}}function $e(e,t){var n=To(e,t.colPrefix);return n!==null?n:w(e,Fe(t,"auto"))?"auto":w(e,Fe(t,"equal"))?"equal":null}function Kt(e,t){return To(e,t.offsetPrefix)}function Kn(e,t){return Ao(e,t,$e)}function Ut(e,t){return Ao(e,t,Kt)}function Ao(e,t,n){for(var r=E.indexOf(t);r>=0;r--){var o=n(e,E[r]);if(o!==null)return o}return null}function To(e,t){var n=new RegExp("(?:^|\\s)"+t+"(\\d+)(?:\\s|$)").exec(e.getAttribute("class")||"");return n?parseInt(n[1],10):null}function Oo(e,t,n){var r=(e.getAttribute("class")||"").split(/\s+/).filter(function(o){return o!==""&&!new RegExp("^"+t+"\\d+$").test(o)});n!==null&&r.push(t+n),e.setAttribute("class",r.join(" "))}function Vt(e,t,n){Oo(e,t.colPrefix,null),rr.forEach(function(r){k(e,Fe(t,r))}),n!=null&&C(e,Fe(t,n))}function Un(e,t,n){Oo(e,t.offsetPrefix,n||null)}function Ma(e){return E.filter(function(t){return $e(e,t)!==null})}function Vn(e,t,n){var r=0;return X(e,".column").forEach(function(o){if(!(n&&o===n)){var i=Ht(o,t),l=i?Ta(i):Kn(o,t);r+=(J(l)?l:0)+(Ut(o,t)||0)}}),W-r}function Gt(e){var t=e.size===null||e.size===void 0?null:e.size,n=e.offset===null||e.offset===void 0?0:e.offset;return n=Math.min(Math.max(n,0),Xo),t===null||!J(t)?{size:t,offset:n,refused:!1}:(t=Math.min(Math.max(t,1),W),t+n<=W?{size:t,offset:n,refused:!1}:e.leading==="offset"?{size:W-n,offset:n,refused:!1}:{size:null,offset:n,refused:!0})}function Qe(e){me(e,".column").forEach(function(t){Me(t,{width:"",height:"",left:"",top:""}),Ct(t)})}function So(e){return"ge-"+e+"-"+sr}function Gn(){return[".row",".ge-text-block",".ge-content","[data-ge-container]"].concat(qt("blocks")).join(", ")}function qt(e){return Object.keys(M).map(function(t){return M[t][e]||null}).filter(function(t){return t!==null})}function ht(e,t){var n=!0;return Object.keys(M).forEach(function(r){var o=M[r];n&&o.accepts&&o.accepts(e,t)===!1&&(n=!1)}),n}function Pa(){return s.drag_handle==="drawer"?".ge-tools-drawer > a:not(.ge-text-info):not(.ge-element-info), .ge-details, input, textarea, button, select, option":"input, textarea, button, select, option"}function Xt(e,t){var n=Qo();if(e=Array.isArray(e)?e:e?[e]:[],!(!e.length||!n)){var r=s.drag_handle==="drawer",o=Pa(),i=0,l=t.draggable+"|"+(t.group||"");Ga(),e.forEach(function(d){var m=St.get(d);if(!(m&&m.has(l))){m||St.set(d,m=new Set),m.add(l);var f=t.group?{name:So(t.group)}:{name:So(t.draggable+"-"+ ++i),pull:!1,put:!1};t.group&&t.accepts&&(f.put=function(v,b,x){return b.options.group.name===f.name&&t.accepts(v.el,x)}),He.push(n.create(d,Object.assign({group:f,draggable:t.draggable,handle:r?".ge-tools-drawer":".ge-tools-drawer .ge-move",filter:function(v,b){return B(v.target,o,d)?!0:!b||b.parentNode!==d},preventOnFilter:!1,forceFallback:!0,fallbackOnBody:!1,ghostClass:"ge-drag-placeholder",chosenClass:"ge-drag-chosen",dragClass:"ge-drag-helper",fallbackClass:"ge-drag-helper",animation:s.drag.animation,delay:s.drag.delay||s.drag.touch_delay,delayOnTouchOnly:!s.drag.delay,touchStartThreshold:s.drag.threshold,scroll:s.drag.scroll,onStart:ja,onEnd:Na},t.options||{})))}})}}function za(){if(!Qo()){q("sortable_missing",g("error.sortable_missing"));return}Xt(A(c,".row"),{draggable:".column",group:"column"}),Xt([c].concat(A(c,".column")),{draggable:Gn(),group:"block",accepts:ht});var e=qt("regions");e.length&&Xt(A(c,e.join(", ")),{draggable:">"+Gn(),group:"block",accepts:ht}),le("onSortable",Xt)}function ja(e){var t=e.item,n=wn(t),r=Lo(t),o={from:n,canceled:!1};un.set(t,o),$(function(){var i=D("before-move",ie(r.kind,r.node,{parent:n.parent,source:"dragdrop",from:n}));i||(o.canceled=!0)})}function Lo(e){var t=w(e,"ge-text-block")&&j(e,".ge-content")||e;return{kind:de(t),node:t}}function Ra(e,t){var n=X(t.parent).filter(function(r){return r!==e&&!w(r,"ge-tools-drawer")});!n.length||t.index>=n.length?t.parent.appendChild(e):t.parent.insertBefore(e,n[t.index])}function Na(e){var t=e.item,n=un.get(t),r=n?n.from:wn(t);if(un.delete(t),n&&n.canceled){Ra(t,r);return}var o=wn(t);if(!(o.parent===r.parent&&o.index===r.index)){var i=B(t,"[data-ge-container]"),l=T[ye(i)];l&&l.afterPaneMove&&l.afterPaneMove(i,t,r);var d=Lo(t);$(function(){D("after-move",ie(d.kind,d.node,{parent:o.parent,source:"dragdrop",from:r,to:o,container:i||void 0}))})}}function Da(){s.resize.enabled&&A(c,".column").forEach(function(e){if(!j(e,".ge-resize-handle")){var t=j(e,".ge-tools-drawer");t&&t.appendChild(h("span",{class:"ge-resize-size"})),Ia().forEach(function(n){var r=h("span",{class:"ge-resize-handle ge-resize-"+n,"data-ge-edge":n});r.addEventListener("pointerdown",Fa),e.appendChild(r)})}})}function Ia(){return String(s.resize.handles).split(",").map(function(e){return e.trim()}).filter(function(e){return e==="e"||e==="w"})}function Fa(e){var t=e.currentTarget,n=t.parentElement,r=t.getAttribute("data-ge-edge")==="w",o=e.pageX,i=Et(n);if(e.preventDefault(),!Ba(n))return;C(n,"ge-resizing"),e.pointerId!==void 0&&t.setPointerCapture&&t.setPointerCapture(e.pointerId);function l(f){var v=f.pageX-o;return Math.max(1,i+(r?-v:v))}function d(f){n.style.width=l(f)+"px",Ha(n,l(f))}function m(f){t.removeEventListener("pointermove",d),tr(t,"pointerup pointercancel",m),k(n,"ge-resizing"),Ka(n,l(f))}t.addEventListener("pointermove",d),ge(t,"pointerup pointercancel",m)}function Wa(){Mo(c)}function Mo(e){A(e,".ge-resize-handle").forEach(function(t){t.remove()}),A(e,".ge-resize-size").forEach(function(t){t.remove()}),Qe(e)}function Po(e,t){var n=Math.round(t/eo(e.parentElement)*W),r=zo(e),o=r?ct(r):null,i=Mt.get(e),l=i?i.units:ft(e),d=r&&J(o)?l+o-gt(s.valid_col_sizes):W-mt(e);return Math.min(Math.max(n,gt(s.valid_col_sizes)),Math.max(d,gt(s.valid_col_sizes)),Rn(s.valid_col_sizes))}function zo(e){return s.resize.balance!=="next"?null:Wo(e,".column")[0]||null}function qn(e,t){var n=j(e,".ge-tools-drawer"),r=n?j(n,".ge-resize-size"):null;r&&(r.textContent=t)}function jo(e){return(R===Z?E[0].colPrefix:Ee().colPrefix)+e}function Ba(e){var t=ct(e),n=$(function(){return D("before-resize",ie("column",e,{source:"dragdrop",from:t,to:null}))});if(!n)return!1;var r={from:t,units:ft(e)};return Mt.set(e,r),qn(e,jo(r.units)),!0}function Ha(e,t){qn(e,jo(Po(e,t)))}function Ka(e,t){var n=Mt.get(e),r=Po(e,t);if(Mt.delete(e),qn(e,""),Qe(e),!!n&&r!==n.units){var o=pn(e,r);o&&$(function(){vn(e,o),Ua(e,r-n.units),we(e),D("after-resize",ie("column",e,hn({source:"dragdrop",from:n.from,to:o.size},o.cleared)))})}}function Ua(e,t){var n=zo(e);if(!(!n||!t)){var r=ct(n);if(J(r)){var o=pn(n,r-t);o&&(vn(n,o),we(n))}}}function Va(){He.forEach(function(e){e.destroy()}),He=[],St=new WeakMap}function Ga(){He=He.filter(function(e){return c.contains(e.el)?!0:(e.destroy(),St.delete(e.el),!1)})}function Ze(){return h("div",{class:"row"})}function Yt(e,t,n){var r=null;if(cl.forEach(function(d){r===null&&n&&n[d]!==void 0&&(r=d)}),r===null)return e;var o=pe(n[r]);if(!o)return K(t+": "+r+" matches no element; the "+t+" is left detached"),e;var i=r==="appendTo"||r==="prependTo"?o:o.parentElement,l=function(){return ae(t,e,function(){r==="appendTo"?o.appendChild(e):r==="prependTo"?o.insertBefore(e,o.firstChild):r==="insertBefore"?o.parentNode.insertBefore(e,o):Zt(e,o)},{parent:i,source:n.source||"api"})};return at>0?(fn(l),e):l()}function qa(e,t){var n=Ze();return e!==void 0&&!Array.isArray(e)&&!(e&&e.row_cols)&&(K("createRow: the layout is an array of column sizes, as in [8, 4], or { row_cols, columns }. Making an empty row instead."),e=[]),e&&!Array.isArray(e)&&(n=st(e)),(Array.isArray(e)?e:[]).forEach(function(r){n.appendChild(fe(r))}),Yt(n,"row",t)}function Xa(e,t){t=t||{};var n=pe(t.appendTo||t.prependTo||null);e===void 0&&n&&Je(n,Ee())?e=null:!J(e)&&rr.indexOf(e)===-1&&(K("createColumn: no column size given, using "+W),e=W);var r=fe(e,t.offset);return t.content!==void 0&&r.appendChild(ol(t.content)),Yt(r,"column",t)}function Ya(e,t){t=t||{};var n=T[e];return n?Yt(n.create(t),e,t):(K('createContainer: no such container type "'+e+'"'),null)}function Xn(e,t,n){e=pe(e),n=n||{};var r=T[ye(e)];if(!r||ye(e)!==t)return K("this is not a "+t+" container"),null;var o=r.addPane(e,n);return o?ae(r.paneKind,o,function(){},{parent:e,source:"api",container:e}):null}function Ja(e,t){e=pe(e);var n=ye(e);return!T[n]||!T[n].addPane?(K("addPane: this is not a container with panes"),null):Xn(e,n,t)}function Yn(){var e={};return Object.keys(s).forEach(function(t){var n=s[t];e[t]=Array.isArray(n)?n.slice():n}),Object.freeze(e)}function fe(e,t){var n=h("div",{class:"column"}),r=Yo(R)[0],o=Gt({size:e,offset:t||0,leading:"offset"});return Vt(n,r,o.size===null?e:o.size),Un(n,r,o.offset),n}function Jn(e,t){if(!(!s.custom_filter||!s.custom_filter.length)){var n=typeof s.custom_filter=="string"||typeof s.custom_filter=="function"?[s.custom_filter]:s.custom_filter;Array.prototype.forEach.call(n,function(r){typeof r=="string"&&(r=window[r]),r(t||c,e)})}}function $a(){var e=[".row","[data-ge-container]"];return Object.keys(M).forEach(function(t){var n=M[t],r=typeof n.cuts=="function"?n.cuts():n.cuts;r&&e.push(r)}),e.join(", ")}function Qa(e){A(c,".column > .ge-content, .column > .ge-text-block > .ge-content").forEach(function(t){if(!(w(t,"ge-rte-active")||!X(t,e).length)){var n=t.getAttribute("data-ge-content-type"),r=w(t.parentElement,"ge-text-block")?t.parentElement:t,o=[],i=[];for(Array.prototype.slice.call(t.childNodes).forEach(function(m){m.nodeType===1&&m.matches(e)?(o.push({text:i},{block:m}),i=[]):i.push(m)}),o.push({text:i});t.firstChild;)t.removeChild(t.firstChild);var l=!1,d=r;o.forEach(function(m){var f;if(m.block)f=m.block;else if(Za(m.text))l?(f=$n(n),m.text.forEach(function(v){f.appendChild(v)})):(m.text.forEach(function(v){t.appendChild(v)}),f=r,l=!0);else return;f!==d&&Zt(f,d),d=f}),l||r.remove()}})}function Za(e){return e.some(function(t){return t.nodeType===1||t.nodeType===3&&/\S/.test(t.nodeValue)})}function el(e){A(c,".column").forEach(function(t){var n=[];X(t).forEach(function(r){re(r,".ge-tools-drawer, .ge-resize-handle")||(re(r,".ge-content, .ge-text-block")||r.matches(e)?n=Ro(n):n.push(r))}),Ro(n)})}function Ro(e){if(e.length){var t=Zt($n(),e[e.length-1]);e.forEach(function(n){t.appendChild(n)})}return[]}function $n(e){var t=h("div",{class:"ge-content"});return e&&(C(t,"ge-content-type-"+e),t.setAttribute("data-ge-content-type",e)),t}function tl(){A(c,".column > .ge-content").forEach(function(e){Uo(e,h("div",{class:"ge-text-block"}))}),A(c,".ge-text-block").forEach(function(e){if(!j(e,".ge-tools-drawer")){var t=j(e,".ge-content"),n=t?t.getAttribute("data-ge-content-type"):null;n?Oi(n)||rl(e,n):nl(e)}})}function No(e){A(e,".ge-text-block").forEach(function(t){en(t)})}function nl(e){var t=j(e,".ge-content"),n=Xe(e,"ge-tools-drawer ge-text-drawer ge-plain-drawer");C(e,"ge-plain-block"),Ie(n),Object.keys(M).forEach(function(r){M[r].plainTools&&M[r].plainTools(n,t)}),F(n,g("tool.delete_plain"),"ge-delete-plain","bi bi-trash",function(){Re("plain",t,g("confirm.delete_plain"),function(r){_t(e,function(){e.remove(),r()})})})}function rl(e,t){var n=j(e,".ge-content"),r=Xe(e,"ge-tools-drawer ge-text-drawer");Ie(r),F(r,g("text.no_editor",{type:t}),"ge-text-info ge-text-missing","bi bi-exclamation-triangle"),F(r,g("tool.delete_text"),"ge-delete-text","bi bi-trash",function(){Re("text",n,g("confirm.delete_text"),function(o){_t(e,function(){e.remove(),o()})})})}function ol(e){var t=Or(),n=$n(t.length?t[0].type:null);return e&&e.nodeType?n.appendChild(e):yt(n,e),n}function Do(e){R=e,nr.forEach(function(t){P(c,"ge-layout-"+t,t===e)}),S(We,"button").textContent=g(kt(e))}function Qn(e){return nr.indexOf(e)===-1?null:e}function Io(e){var t=Qn(e);if(t===null){K("changeView("+JSON.stringify(e)+"): no such layout mode");return}var n=R;Do(t),t!==n&&(ao().forEach(function(r){A(r,".ge-utilities").forEach(function(o){zn(o)})}),Vr(null),dt(c),le("onViewChange",t),D("view-change",{canvas:c,breakpoint:t,from:n,to:t}))}function Zn(){return R}function Fo(e,t,n){return function(){return De[e]?De[e].apply(null,arguments):(q("plugin:"+t,e+" needs the "+t+" plugin: include dist/plugins/grideditor."+n+".js after the editor"),null)}}function il(e){if(!s.active_target){q("active_target","setActiveTarget needs the active_target setting: without it, it does nothing");return}if(e==null){ne(null);return}var t=pe(e);if(!Lr(t)){var n=typeof e=="string"?e:t?"<"+t.tagName.toLowerCase()+">":String(e);K("setActiveTarget: "+n+" is not a node of the canvas with settings");return}ne(t)}var er={getHtml:ut,getPlainHtml:Ri,init:function(){fn(be)},reset:function(){fn(Sr)},deinit:Ne,destroy:Di,changeView:Io,getView:Zn,createRow:qa,createColumn:Xa,createText:function(e,t){return De.createText?De.createText(e,t):(q("plugin:text","createText needs a text editor plugin: include dist/plugins/grideditor.tinymce.js, or another editor's, after the editor"),null)},createElement:Fo("createElement","elements","elements"),createSection:Fo("createSection","sections","sections"),createContainer:Ya,addTab:function(e,t){return Xn(e,"tabs",t)},addAccordionItem:function(e,t){return Xn(e,"accordion",t)},addPane:Ja,setLocale:ei,getUtility:Hr,setUtility:Pn,getActiveTarget:function(){return s.active_target?L:null},setActiveTarget:il};Object.keys(er).forEach(function(e){var t=!!(qo[e]&&qo[e].value);a[e]=function(){if(it)return q("destroyed:"+e,g("warning.destroyed",{method:e})),e==="getHtml"?c.innerHTML:e==="getPlainHtml"?ir(c.innerHTML):t?null:a;var n=er[e].apply(a,arguments);return t?n:a}}),a.canvas=c,a.settings=Yn(),nn.set(c,a),Ii(),a.settings=Yn(),Object.keys(De).forEach(function(e){Object.prototype.hasOwnProperty.call(er,e)||e in a||(a[e]=function(){return it?(q("destroyed:"+e,g("warning.destroyed",{method:e})),null):De[e].apply(null,arguments)})}),ai(),be(),O._created.forEach(function(e){e(a)})}O._created=[];O.containers={};O.features={};O.utilities={};O.texts={};O.t=ar;O._plainHtml=ir;O.Sortable=null;O.bootstrap=null;O.version="9.2.2";O.locales={en:{"tool.move":"Move","tool.settings":"Settings","tool.add_row":"Add row","tool.delete_text":"Remove text","tool.delete_plain":"Remove content","tool.convert_type":"Edit as {editor} text","text.no_editor":'No text editor "{type}" is loaded: this text can be moved and deleted, not edited',"tool.add_column":`Add column
|
|
2
2
|
(hold to choose the width)`,"tool.column_size":"{size} of 12","tool.column_equal":"Equal: shares what the row has left","tool.column_auto":"Auto: as wide as its content","tool.delete_row":"Remove row","tool.delete_column":"Remove col","tool.delete_container":"Remove container","tool.delete_pane":"Remove pane","tool.rename":"Double click to rename","tool.column_narrower":`Make column narrower
|
|
3
3
|
(hold shift for min)`,"tool.column_wider":`Make column wider
|
|
4
4
|
(hold shift for max)`,"tool.indent_decrease":`Decrease indent
|