@themarioga/grid-editor 9.2.3 → 9.2.4
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 +11 -0
- package/dist/grideditor.bundle.min.js +2 -2
- package/dist/grideditor.esm.js +25 -3
- package/dist/grideditor.js +25 -3
- package/dist/grideditor.min.js +1 -1
- package/dist/grideditor.min.js.map +3 -3
- package/docs/plugins.md +13 -0
- package/package.json +1 -1
- package/src/js/grideditor.js +33 -3
package/dist/grideditor.esm.js
CHANGED
|
@@ -511,9 +511,12 @@ function modalLibrary() {
|
|
|
511
511
|
var bootstrap = GridEditor.bootstrap || window.bootstrap;
|
|
512
512
|
return bootstrap && bootstrap.Modal ? bootstrap.Modal : null;
|
|
513
513
|
}
|
|
514
|
-
function plainHtml(html) {
|
|
514
|
+
function plainHtml(html, prepare) {
|
|
515
515
|
var root = document.implementation.createHTMLDocument("").body;
|
|
516
516
|
root.innerHTML = html;
|
|
517
|
+
if (prepare && prepare(root) === false) {
|
|
518
|
+
return null;
|
|
519
|
+
}
|
|
517
520
|
var emptied = [];
|
|
518
521
|
all(root, "*").forEach(function(node) {
|
|
519
522
|
var marked = false;
|
|
@@ -2367,7 +2370,9 @@ function build(instance, baseElem, optionsOrMethod) {
|
|
|
2367
2370
|
return html;
|
|
2368
2371
|
}
|
|
2369
2372
|
function getPlainHtml(options) {
|
|
2370
|
-
return plainHtml(getHtml(options))
|
|
2373
|
+
return plainHtml(getHtml(options), function(root) {
|
|
2374
|
+
return pluginsAccept("plainMarkup", root, options);
|
|
2375
|
+
});
|
|
2371
2376
|
}
|
|
2372
2377
|
function setHtml2(html) {
|
|
2373
2378
|
if (sourceOpen) {
|
|
@@ -2457,6 +2462,13 @@ function build(instance, baseElem, optionsOrMethod) {
|
|
|
2457
2462
|
});
|
|
2458
2463
|
});
|
|
2459
2464
|
}
|
|
2465
|
+
function pluginsAccept(hook, argument, extra) {
|
|
2466
|
+
return [CONTAINERS, FEATURES, UTILITIES].every(function(registry) {
|
|
2467
|
+
return Object.keys(registry).every(function(name) {
|
|
2468
|
+
return !registry[name][hook] || registry[name][hook](argument, extra) !== false;
|
|
2469
|
+
});
|
|
2470
|
+
});
|
|
2471
|
+
}
|
|
2460
2472
|
function pluginApi() {
|
|
2461
2473
|
return {
|
|
2462
2474
|
canvas,
|
|
@@ -2511,6 +2523,16 @@ function build(instance, baseElem, optionsOrMethod) {
|
|
|
2511
2523
|
// The markup as getHtml gives it, with the canvas left editing
|
|
2512
2524
|
snapshotHtml,
|
|
2513
2525
|
setHtml: setHtml2,
|
|
2526
|
+
// The canvas out of editing and back in, as getHtml does it,
|
|
2527
|
+
// for a plugin that shows the same markup another way. Not
|
|
2528
|
+
// with the source view open, or after destroy
|
|
2529
|
+
reinit: function() {
|
|
2530
|
+
if (sourceOpen || destroyed) {
|
|
2531
|
+
return;
|
|
2532
|
+
}
|
|
2533
|
+
deinit();
|
|
2534
|
+
init();
|
|
2535
|
+
},
|
|
2514
2536
|
// A question in the editor's confirm modal
|
|
2515
2537
|
confirm: confirmWith,
|
|
2516
2538
|
// A text editor has rewritten a content area, so whatever the
|
|
@@ -5402,7 +5424,7 @@ GridEditor.t = translate;
|
|
|
5402
5424
|
GridEditor._plainHtml = plainHtml;
|
|
5403
5425
|
GridEditor.Sortable = null;
|
|
5404
5426
|
GridEditor.bootstrap = null;
|
|
5405
|
-
GridEditor.version = false ? "dev" : "9.2.
|
|
5427
|
+
GridEditor.version = false ? "dev" : "9.2.4";
|
|
5406
5428
|
GridEditor.locales = {
|
|
5407
5429
|
en: {
|
|
5408
5430
|
"tool.move": "Move",
|
package/dist/grideditor.js
CHANGED
|
@@ -512,9 +512,12 @@
|
|
|
512
512
|
var bootstrap = GridEditor.bootstrap || window.bootstrap;
|
|
513
513
|
return bootstrap && bootstrap.Modal ? bootstrap.Modal : null;
|
|
514
514
|
}
|
|
515
|
-
function plainHtml(html) {
|
|
515
|
+
function plainHtml(html, prepare) {
|
|
516
516
|
var root = document.implementation.createHTMLDocument("").body;
|
|
517
517
|
root.innerHTML = html;
|
|
518
|
+
if (prepare && prepare(root) === false) {
|
|
519
|
+
return null;
|
|
520
|
+
}
|
|
518
521
|
var emptied = [];
|
|
519
522
|
all(root, "*").forEach(function(node) {
|
|
520
523
|
var marked = false;
|
|
@@ -2368,7 +2371,9 @@
|
|
|
2368
2371
|
return html;
|
|
2369
2372
|
}
|
|
2370
2373
|
function getPlainHtml(options) {
|
|
2371
|
-
return plainHtml(getHtml(options))
|
|
2374
|
+
return plainHtml(getHtml(options), function(root) {
|
|
2375
|
+
return pluginsAccept("plainMarkup", root, options);
|
|
2376
|
+
});
|
|
2372
2377
|
}
|
|
2373
2378
|
function setHtml2(html) {
|
|
2374
2379
|
if (sourceOpen) {
|
|
@@ -2458,6 +2463,13 @@
|
|
|
2458
2463
|
});
|
|
2459
2464
|
});
|
|
2460
2465
|
}
|
|
2466
|
+
function pluginsAccept(hook, argument, extra) {
|
|
2467
|
+
return [CONTAINERS, FEATURES, UTILITIES].every(function(registry) {
|
|
2468
|
+
return Object.keys(registry).every(function(name) {
|
|
2469
|
+
return !registry[name][hook] || registry[name][hook](argument, extra) !== false;
|
|
2470
|
+
});
|
|
2471
|
+
});
|
|
2472
|
+
}
|
|
2461
2473
|
function pluginApi() {
|
|
2462
2474
|
return {
|
|
2463
2475
|
canvas,
|
|
@@ -2512,6 +2524,16 @@
|
|
|
2512
2524
|
// The markup as getHtml gives it, with the canvas left editing
|
|
2513
2525
|
snapshotHtml,
|
|
2514
2526
|
setHtml: setHtml2,
|
|
2527
|
+
// The canvas out of editing and back in, as getHtml does it,
|
|
2528
|
+
// for a plugin that shows the same markup another way. Not
|
|
2529
|
+
// with the source view open, or after destroy
|
|
2530
|
+
reinit: function() {
|
|
2531
|
+
if (sourceOpen || destroyed) {
|
|
2532
|
+
return;
|
|
2533
|
+
}
|
|
2534
|
+
deinit();
|
|
2535
|
+
init();
|
|
2536
|
+
},
|
|
2515
2537
|
// A question in the editor's confirm modal
|
|
2516
2538
|
confirm: confirmWith,
|
|
2517
2539
|
// A text editor has rewritten a content area, so whatever the
|
|
@@ -5403,7 +5425,7 @@
|
|
|
5403
5425
|
GridEditor._plainHtml = plainHtml;
|
|
5404
5426
|
GridEditor.Sortable = null;
|
|
5405
5427
|
GridEditor.bootstrap = null;
|
|
5406
|
-
GridEditor.version = false ? "dev" : "9.2.
|
|
5428
|
+
GridEditor.version = false ? "dev" : "9.2.4";
|
|
5407
5429
|
GridEditor.locales = {
|
|
5408
5430
|
en: {
|
|
5409
5431
|
"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 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.3";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 pe(a,u){if(!a)return[];var p=A(a,u);return a.nodeType===1&&a.matches(u)&&p.unshift(a),p}function Y(a,u){return a?Array.prototype.filter.call(a.children,function(p){return!u||p.matches(u)}):[]}function j(a,u){return Y(a,u)[0]||null}function W(a,u,p){var s=a&&a.nodeType===1?a.closest(u):null;return s&&p&&s!==p&&!p.contains(s)?null:s}function oe(a,u){return!!a&&a.nodeType===1&&a.matches(u)}function Me(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 ll(a){var u=document.createElement("template");return u.innerHTML=a,Array.prototype.slice.call(u.content.childNodes)}function G(a){for(var u=ll(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(d){var x=u[d];x!=null&&x!==!1&&s.setAttribute(d,x)}),p!=null&&(s.textContent=p),s}function yt(a,u){return a.innerHTML=u==null?"":String(u),a}function C(a,u){return nt(u).forEach(function(p){a.classList.add(p)}),a}function k(a,u){return nt(u).forEach(function(p){a.classList.remove(p)}),a}function P(a,u,p){return nt(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 nt(a){return String(a||"").split(/\s+/).filter(Boolean)}function rt(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 Pe(a,u){return Object.keys(u).forEach(function(p){var s=u[p];typeof s=="number"&&!sl[p]&&(s=s+"px"),a.style.setProperty(p,s==null?"":String(s))}),a}var sl={opacity:!0,"z-index":!0,"flex-grow":!0,"flex-shrink":!0,order:!0},wt={};function ul(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 _e(a){return a.style.removeProperty("display"),getComputedStyle(a).display==="none"&&(a.style.display=ul(a)),a}function de(a){return a.style.display="none",a}function Ho(a,u){return u===void 0&&(u=!ot(a)),u?_e(a):de(a)}function ot(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,d){var x=function(y){var B=W(y.target,p,a);if(B&&a.contains(B))return s.call(B,y)};return nt(u).forEach(function(y){a.addEventListener(y,x,d)}),x}function ve(a,u,p,s){return nt(u).forEach(function(d){a.addEventListener(d,p,s)}),p}function tr(a,u,p,s){nt(u).forEach(function(d){a.removeEventListener(d,p,s)})}var dl=400;function Vo(a,u,p,s){p=p===void 0?dl:p,C(a,"ge-leaving");var d=function(){k(a,"ge-leaving"),rt(a),de(a),s&&s()};if(!ot(a)||!a.animate||p<=0){window.setTimeout(d,0);return}var x=a.animate(u(getComputedStyle(a)),{duration:p,easing:"ease-in-out"}),y=!1,B=function(){y||(y=!0,d())};x.onfinish=B,x.oncancel=B}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(d){var x={opacity:d.opacity,height:d.height},y={opacity:0,height:"0px"};return s&&(x.width=d.width,y.width="0px"),[x,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:{}},fl=["appendTo","prependTo","insertAfter","insertBefore"],ml=["data-bs-target","data-bs-parent","href","aria-controls","aria-labelledby","aria-describedby","for"],gl=/^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"}],ee="all",pl="view.all",nr=[ee].concat(E.map(function(a){return a.key})),F=12,Xo=11,rr=["equal","auto"],it=["1","2","3","4","5","6","auto"];function or(a,u){return"row-cols"+(a.infix?"-"+a.infix:"")+"-"+u}function $(a){return typeof a=="number"}function Fe(a,u){return u==="equal"?a.infix?"col-"+a.infix:"col":a.colPrefix+u}function te(a){for(var u=0;u<E.length;u++)if(E[u].key===a)return E[u];return null}function Yo(a){if(a===ee)return[E[0]];var u=te(a);return u?[u]:[]}function kt(a){var u=te(a);return u?u.labelKey:pl}var ze={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={},vl=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,d=s[a.locale]||{},x=a.locale_strings||{},y=x[u];return y===void 0&&(y=d[u]),y===void 0&&(y=s.en[u]),y===void 0&&(bl("locale:"+u,'no string for "'+u+'" in any locale, showing the key'),y=u),y.replace(/\{(\w+)\}/g,function(B,q){return p&&p[q]!==void 0?p[q]:B})}function hl(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 U(a){window.console&&window.console.warn&&window.console.warn("grid-editor: "+a)}function bl(a,u){Jo[a]||(Jo[a]=!0,U(u))}function wl(a,u){return ar({locale:"en"},a,u)}function yl(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 he(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,u){var p=document.implementation.createHTMLDocument("").body;if(p.innerHTML=a,u&&u(p)===!1)return null;var s=[];return A(p,"*").forEach(function(d){var x=!1;Array.prototype.slice.call(d.attributes).forEach(function(q){q.name.indexOf("data-ge-")===0&&(d.removeAttribute(q.name),x=!0)});var y=(d.getAttribute("class")||"").split(/\s+/).filter(Boolean),B=y.filter(function(q){return q!=="column"&&q.indexOf("ge-")!==0});B.length!==y.length&&(x=!0),B.length?d.setAttribute("class",B.join(" ")):d.removeAttribute("class"),x&&d.tagName==="DIV"&&!d.attributes.length&&s.push(d)}),s.forEach(function(d){en(d)}),p.innerHTML}function O(a,u){var p=yl(a),s=nn.get(p);if(s)return Zo.has(p)||(Zo.add(p),U(wl("warning.already_editing"))),s;if(!(this instanceof O))return new O(p,u);Cl(this,p,u||{})}var Zo=new WeakSet;O.create=function(a,u){return new O(a,u)};O.get=function(a){var u=he(a);return u&&nn.get(u)||null};function Cl(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:ze.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:ze.add_column,layout_modes:nr.slice(),default_view:ee,resize:ze.resize,indent:ze.indent,source_textarea:"",edit_source:!0,locale:"en",locale_strings:{},callbacks:{},confirm_delete:!0,settings_panel:"offcanvas",sidebar:ze.sidebar,drag:ze.drag},p);if(Object.keys(ze).forEach(function(e){s[e]=Object.assign({},ze[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 d,x,y,B,q,We,ne,R=s.default_view,N=null,ie=null,be=!1,je=!1,Be=null,L=null,Tt=null,rn=function(){},on=function(){},we=[],Ot={},an=null,lr={},He=[],St=new WeakMap,sr=++vl,Ke=!1,Ue=null,ur=null;s.settings_panel==="sidebar"&&(tn?(X("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 Ve=new WeakMap,ln=new WeakMap,sn=new WeakMap,Lt=null,un=new WeakMap,Mt=new WeakMap,dr=new WeakMap,dn=new WeakSet,Ge=new AbortController;d=C(u,"ge-canvas");function X(e,t){lr[e]||(lr[e]=!0,U(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 ae(e,t,n){return Object.assign({kind:e,node:t,parent:t.parentElement,canvas:d,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});d.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 Q(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 le(e,t,n,r){var o=ti(e);return Q(function(){var i=ae(e,t,r);return D("before-add-"+o,i)?(n(),fe(),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");Re&&Re(null);var c=function(m){Re===c&&(Re=null,n(m))};Re=c,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(){c(i)},ke.shown=function(){l.focus()},r.getOrCreateInstance(o).show()}var ke={hidden:null,shown:null},Re=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,Re&&Re(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){ve(e,"show.bs.modal hide.bs.modal",function(){gn.set(e,!0)}),ve(e,"shown.bs.modal hidden.bs.modal",function(){gn.set(e,!1)})}function Ne(e,t,n,r){var o=Lt||{};Lt=null,Q(function(){var i=ae(e,t,{source:o.source||"tool"});if(D("before-delete",i)){o.before&&o.before();var l=function(){Q(function(){r(function(){t.remove(),Q(function(){fe(),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!==ee){var r=te(n),o=Gt({size:t,offset:Ut(e,r)||0});return o.refused||Qe(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],c=[],m=[];return E.slice(1).forEach(function(f){var v=Qe(e,f);v!==null&&(c.push({tier:f,size:null}),m.push({breakpoint:f.key,value:v}))}),Qe(e,l)!==t&&c.unshift({tier:l,size:t}),c.length?{writes:c,cleared:m,size:t}:null}function vn(e,t){t.writes.forEach(function(n){Vt(e,n.tier,n.size)}),Ze(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?Q(function(){var l=ae("column",e,hn({source:n,breakpoint:r,from:o,to:i.size},i.cleared));return D("before-resize",l)?(vn(e,i),ye(e),D("after-resize",l),!0):(ye(e),!1)}):!1}function gr(e,t,n){var r=R===ee,o=r?E[0]:te(R),i=mt(e);t=Math.min(Math.max(t,0),Xo);var l=r?E.slice(1).filter(function(c){return Kt(e,c)!==null}):[];return(Kt(e,o)||0)===t&&!l.length?!1:Q(function(){var c=ae("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",c)?(Un(e,o,t),l.forEach(function(m){Un(e,m,0)}),(r?E:[o]).forEach(function(m){var f=Kn(e,m);if($(f)){var v=Gt({size:f,offset:t,leading:"offset"});v.size!==f&&Vt(e,m,v.size)}}),ye(e),D("after-indent",c),!0):!1})}function wn(e){var t=e.parentElement;return{parent:t,index:Y(t).filter(function(n){return!w(n,"ge-tools-drawer")}).indexOf(e)}}function ce(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=he(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=Y(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(){ne=h("textarea",{class:"ge-html-output"}),d.parentNode.insertBefore(ne,d),yn(),ma();var e={signal:Ge.signal},t=null;if(window.addEventListener("scroll",function(){t===null&&(t=window.requestAnimationFrame(function(){t=null,!Ke&&x&&xr()}))},e),Ge.signal.addEventListener("abort",function(){t!==null&&window.cancelAnimationFrame(t)}),xt(d,"click",".ge-content",Ai,e),s.active_target){var n=null;d.addEventListener("pointerdown",function(i){n={x:i.clientX,y:i.clientY}},e),d.addEventListener("click",function(i){var l=n;n=null,w(d,"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||Z)&&!(N&&w(N,"show"))){var l=document.activeElement;l&&(oe(l,"input, textarea, select")||l.isContentEditable)||L&&re(null)}},e),d.addEventListener("focusin",function(i){var l=Bt()?wo(i.target):null;l&&re(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,c=r;r=null,!(!L||!Bt()||!l||l.nodeType!==1)&&(c&&c.nodeType===1&&(d.contains(c)||W(c,$o))||!Me(l)||d.contains(l)||W(l,$o)||d.querySelector(".ge-rte-active")||re(null))},e)}Je()==="sidebar"&&window.addEventListener("resize",mo,e);function o(i){if(d.contains(i.target)){var l=wo(i.target);if(l&&l===L&&(i.target===Tn(l)||i.target===l&&!w(l,"ge-content"))){re(null);return}re(l)}}}function li(e){!oe(e,".ge-content")||!d.contains(e)||(se("onContentReady",e),dt(e))}function yn(){x=h("div",{class:"ge-mainControls"}),ne.parentNode.insertBefore(x,ne),y=x.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"}))),we=[],B=t.appendChild(h("div",{class:"ge-addRowGroup btn-group"})),q=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 ue=st(f),bt=le("row",ue,function(){d.appendChild(ue)},{parent:d,source:"tool"});bt&&ue.scrollIntoView&&ue.scrollIntoView({behavior:"smooth"})}),B.appendChild(b),we.push({button:b,home:B,group:"rows"}),b.appendChild(G('<i class="bi bi-plus"></i>'));var _=v?ki(f):f,K='<div class="row ge-row-icon">';_.forEach(function(ue){K+='<div class="column '+Fe(E[0],ue)+'"></div>'}),K+="</div>",b.appendChild(G(K))}),t.appendChild(q),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 _=et(),K=_.appendChild(ge(F)),ue=K.appendChild(v.create({}));le(f,ue,function(){d.appendChild(_)},{parent:d,source:"tool"})}),q.appendChild(b),we.push({button:b,home:q,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 _=pi(f,v,b);v.align==="end"?n.push(_):(q.appendChild(_),we.push({button:_,home:q,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",be),o.addEventListener("click",function(){be?_n():Si(),P(o,"active btn-danger",be)}),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",je);var l=null;function c(f){var v=l,b=f.currentTarget===document.documentElement,_=f.type==="pointermove"&&i.contains(f.target);if(v&&!b&&(_||f.clientX>=v.left&&f.clientX<v.right&&f.clientY>=v.top&&f.clientY<v.bottom)){document.addEventListener("pointermove",c,{signal:Ge.signal}),document.documentElement.addEventListener("mouseleave",c,{signal:Ge.signal});return}l=null,document.removeEventListener("pointermove",c),document.documentElement.removeEventListener("mouseleave",c),je||C(d,"ge-editing")}if(i.addEventListener("mouseenter",function(){l||(l=i.getBoundingClientRect(),k(d,"ge-editing"))}),i.addEventListener("click",function(){Pt(!je)}),i.addEventListener("mouseleave",c),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(we.forEach(function(i){t.indexOf(i.group)<0&&t.push(i.group)}),t=t.filter(function(i){return we.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=x.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,we.forEach(function(l){(l.group===i?l.home:r).appendChild(l.button)}),Y(n).forEach(function(l){var c=l.getAttribute("data-ge-group")===i;P(l,"active",c),l.setAttribute("aria-selected",c?"true":"false")}),on()}}function di(e){var t="group."+e;if(hl(s,t))return g(t);var n=we.filter(function(r){return r.group===e})[0];return n.button.getAttribute("title")||e}function ci(){return we.filter(function(e){return!W(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||Ke||(Cn(),yn(),xr())}function Cn(){Tt&&Tt.abort(),Tt=null,rn=function(){},on=function(){},x.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(_){return _===B?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,c={signal:l.signal};if(n.addEventListener("click",function(){v(!w(t,"ge-open"))}),r.addEventListener("click",function(_){W(_.target,"[data-ge-toolbar]")&&v(!1)}),document.addEventListener("pointerdown",function(_){t.contains(_.target)||v(!1)},c),document.addEventListener("keydown",function(_){_.key==="Escape"&&v(!1)},c),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(_){_=_&&w(t,"ge-needed"),P(t,"ge-open",_),n.setAttribute("aria-expanded",_?"true":"false")}function b(){var _=ci();if(_.forEach(function(tt){tt.home.appendChild(tt.button),k(tt.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 K=_.length-1;K>=0&&e.scrollWidth>e.clientWidth;K--){var ue=i(_[K].home);ue.insertBefore(_[K].button,ue.firstChild)}var bt=_.filter(function(tt){return tt.button.parentNode===tt.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),c=typeof t.action=="function";return C(l,t.className||""),(typeof t.hidden=="function"?t.hidden():t.hidden)&&de(l),Jt(l,{"data-ge-toolbar":"feature","data-ge-feature":e,"data-ge-item":n}),c&&(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(c){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=le(t.kind,m,function(){d.appendChild(f)},{parent:d,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(x,"[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(d,"ge-dropping")}Pe(o,{left:m.pageX-14,top:m.pageY-14}),Ci(m.pageX,m.pageY)}function c(m){if(document.removeEventListener("pointermove",l),tr(document,"pointerup pointercancel",c),!!o){var f=yr(m.pageX,m.pageY);o.remove(),k(d,"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),ve(document,"pointerup pointercancel",c)}function yr(e,t){var n=e-window.scrollX,r=t-window.scrollY,o=document.elementFromPoint(n,r);if(!o)return null;var i=W(o,[".column",".ge-canvas"].concat(qt("regions")).join(", "));if(!i||i!==d&&!d.contains(i))return null;var l=null;return Y(i,Gn()).forEach(function(c){if(!l){var m=c.getBoundingClientRect();r<m.top+m.height/2&&(l=c)}}),{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)?oe(t.region,".row")&&(i=zt(t.region,o)):t=Cr(t.region),le(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===d?[]:Bo(e,d).reverse().concat([e]),n=t[0]||null;return{region:d,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?d:Pr(L),before:null},l=zt(i.region,e),c=l===e?null:e.parentElement;return(!ht(i.region,l)||c&&!ht(c,e))&&(i=Cr(i.region),l=e),le(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(ge(F),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 le(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<=F;t++)e.push(String(t));return{name:"col",values:e.concat(rr),appliesTo:["column"],labelKey:"utility.col_width",className:function(n,r){return Fe(te(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===ee?null:Ht(n,te(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=et();if(Array.isArray(e))return e.forEach(function(r){t.appendChild(ge(r))}),t;Object.keys(e.row_cols||{}).forEach(function(r){var o=e.row_cols[r],i=te(r);i&&it.indexOf(String(o))!==-1&&C(t,or(i,o))});for(var n=0;n<(e.columns||0);n++)t.appendChild(ge(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(x).top&&e<Qt(d).top+Ko(d)?w(y,"ge-top")&&(Pe(y,{left:Qt(y).left,width:Et(y)}),k(y,"ge-top"),C(y,"ge-fixed")):w(y,"ge-fixed")&&(Pe(y,{left:"",width:""}),k(y,"ge-fixed"),C(y,"ge-top"))}function Ai(){var e=this;if(!e.getAttribute("data-ge-content-type")&&!Ee()&&ot(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):Q(function(){var n=ae("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"),Y(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(Ee(),!!e){var o=W(e,".ge-tools-drawer");o&&C(o,"ge-picker-open"),ie=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(c){c.preventDefault(),c.stopPropagation(),Ee(),i.choose()}),ie.appendChild(l)}),Ar(r||e)}}function Ar(e){e.addEventListener("mouseleave",function(){window.setTimeout(function(){ie&&!ie.matches(":hover")&&Ee()},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&&X("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(){Ae(),fe()}function Pt(e){if(e=!!e,e!==je){je=e;var t=x?S(x,".gm-preview"):null;t&&P(t,"active btn-danger",e),P(d,"ge-editing",!e),se("onPreviewChange",e),D("preview-change",{canvas:d,previewing:e})}}function Si(){Pt(!1),Ae(),re(null),ne.style.height=.8*document.documentElement.clientHeight+"px",ne.value=d.innerHTML,_e(ne),de(d),be=!0,se("onSourceOpen",ne)}function _n(){se("onSourceClose",ne),be=!1,yt(d,ne.value),_e(d),fe(),de(ne)}function Lr(e){return!!e&&e!==d&&d.contains(e)&&Ve.has(e)}function re(e){if(e!==L){var t=L;t&&k(t,"ge-selected"),L=e,e&&w(d,"ge-editing")&&C(e,"ge-selected"),ho(),D("target-change",{canvas:d,target:e,from:t})}}function Mr(){return[".column"].concat(qt("regions")).join(", ")}function Pr(e){if(oe(e,".row, "+Mr()))return e;var t=Li(e)?Mi(e):null;return t||W(e.parentElement,Mr())||d}function Li(e){if(e.getAttribute("data-ge-container"))return!0;var t=W(e.parentElement,"[data-ge-container]",d),n=t&&T[Ce(t)];return!!n&&!!n.paneKind&&ce(e)===n.paneKind}function Mi(e){var t=!!e.getAttribute("data-ge-container"),n=t?e:W(e.parentElement,"[data-ge-container]",d),r=T[Ce(n)];return r&&r.regionOf&&r.regionOf(n,t?null:e)||null}function zt(e,t){if(oe(t,".column"))return oe(e,".row")?t:kn(t);if(oe(e,".row")){var n=ge($e(e,xe())?null:s.add_column.size);return n.appendChild(t),n}return oe(e,".column")||oe(t,".row")?t:kn(ge(F),t)}function kn(e,t){var n=et();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 fe(){V&&!Me(V.node)&&Se(),L&&!d.contains(L)&&re(null),Z&&Z.home&&!Me(Z.home)&&me(),Jn(!0),P(d,"ge-editing",!je),P(d,"ge-drag-drawer",s.drag_handle==="drawer"),Ta();var e=Qa();Za(e),tl(e),nl(),ua(),da(),Zi(),se("onInit"),ja(),Ia(),Do(R),dt(d),L&&!d.contains(L)?re(null):L&&C(L,"ge-selected"),xa()}function Ae(){Se(),_a(),k(d,"ge-editing ge-drag-drawer ge-dropping"),L&&k(L,"ge-selected"),se("onBeforeDeinit"),Ee(),En(),me(),zr(d),Xe.clear(),No(d),se("onDeinit"),Rt(d),jr(d),ea(),Ga(),Ba(),Jn(!1,d)}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,H].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(d);return{root:r,liveOf:function(o){return e.get(o)||null},copyOf:function(o){return t.get(o)||null}}}function Rr(){if(be)return ut();var e=Pi();if(e.length)return e.forEach(function(o){X("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"),rt(o)}),A(n,".ge-drop-marker").forEach(function(o){o.remove()}),zr(n),No(n);var r=null;return[T,M,H].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?(X("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),Ze(n),n.innerHTML)}function ut(e){if(e&&e.keepEditing)return Rr();Ae(),Ze(d);var t=d.innerHTML;return fe(),t}function ji(e){Ae(),Ze(e);var t=e.outerHTML;return fe(),t}function Ri(e){return ir(ut(e),function(t){return Fi("plainMarkup",t,e)})}function Ni(e){be&&(_n(),x&&A(x,".gm-edit-mode").forEach(function(t){k(t,"active btn-danger")})),Pt(!1),Ae(),yt(d,e),fe()}function Di(){se("onDestroy"),be&&_n(),Pt(!1),Ae(),L=null,tn===a&&(tn=null),fr(),uo(),Eo(),Cn(),ne.remove(),Ge.abort(),nn.delete(d),Ke=!0}function Ii(){var e=ur=Wi();Sn("grid",{},Ei()),s.row_cols!==!1&&Sn("grid",{},Ma());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)&&(H[r]=O.utilities[r](e),(H[r].families||[]).forEach(function(o){Sn(r,H[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]||H[r]||X("plugin:"+r,'the "'+r+'" plugin is not loaded: include dist/plugins/grideditor.'+r+".js after the editor")})}function se(e,t){[T,M,H].forEach(function(n){Object.keys(n).forEach(function(r){n[r][e]&&n[r][e](t)})})}function Fi(e,t,n){return[T,M,H].every(function(r){return Object.keys(r).every(function(o){return!r[o][e]||r[o][e](t,n)!==!1})})}function Wi(){return{canvas:d,settings:s,t:g,warn:U,containerId:Xr,freshNode:$i,defaultRegion:Qi,createTool:I,createMoveTool:Ie,addSettingsTool:pt,deleteNode:Ne,place:Yt,placeInTarget:wi,createPaneControls:na,makeLabelEditable:ra,labelIn:oa,unwrapLabels:ia,suspendToggles:Jr,resumeToggles:$r,emit:D,payloadFor:ae,operate:Q,kindOf:ce,view:Zn,previewing:function(){return je},viewTiers:function(){return Yo(R).map(function(e){return e.key})},breakpoints:E.map(function(e){return e.key}),getUtility:Hr,setUtility:Pn,utilityField:Ji,bareStyle:Ki,hostStyle:Kr,setHostStyle:Xi,openDialog:Co,closeDialog:me,rowFromLayout:st,nodeHtml:ji,snapshotHtml:Rr,setHtml:Ni,reinit:function(){be||Ke||(Ae(),fe())},confirm:cr,textReady:li,attachPicker:Zr,openPicker:kr,closePicker:Ee,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 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||Lr(e));return t&&re(e),t},removeNode:oi,panelOpen:function(){return V||Z||N&&w(N,"show")?!0:Je()==="inline"&&A(d,".ge-tools-drawer > .ge-details").some(ot)},contains:function(e){return!e||e.nodeType!==1?!1:d.contains(e)||x&&x.contains(e)||J&&J.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 Te={},Bi=".row, .column, .ge-content, .ge-element, [data-ge-container]",qe="data-ge-preview",On=!1;function Sn(e,t,n){var r=n.name||n.prefix;if(Te[r]){U('the "'+e+'" plugin declares the utility "'+r+'", which the "'+Te[r].plugin+'" plugin already declared: ignored');return}Te[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 Te[e]?Te[e].family:(X("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(Te).map(function(t){return Te[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 Oe(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=Oe(e,t,E[r]);if(o!==null)return{tier:E[r],value:o}}return null}function Fr(e,t,n){var r=Oe(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:Oe(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)),rt(e)}function Br(e,t,n){return n===ee?Oe(e,t,E[0]):Fr(e,t,te(n))}function Hi(e,t,n,r){if(n!==ee){var o=te(n);return Oe(e,t,o)===r?null:{writes:[{tier:o,value:r}],cleared:[]}}var i=[],l=[];return Mn(e,t).forEach(function(c){c.tier!==E[0]&&(i.push({tier:c.tier,value:null}),l.push({breakpoint:c.tier.key,value:c.value}))}),Oe(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=he(e);var r=jt(t,"getUtility");if(!r||!e)return null;var o=n===void 0?R:Qn(n);return o===null?(U("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=he(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 U("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 U("setUtility: "+JSON.stringify(n)+' is not a value of "'+t+'", which takes '+JSON.stringify(o.values)),!1;var l=ce(e);if(!Nr(o,l))return U('setUtility: "'+t+'" does not apply to a '+l),!1;if(o.write)return o.write(e,n,i,r.source||"api");var c=Hi(e,o,i,n);return c?Q(function(){var m=ae(l,e,{family:t,breakpoint:i,tiers:c.writes.map(function(f){return f.tier.key}),from:Br(e,o,i),to:n,cleared:c.cleared,source:r.source||"api"});return D("before-utility",m)?(c.writes.forEach(function(f){Wr(e,o,f.tier,f.value)}),ye(e),D("after-utility",m),!0):(ye(e),!1)}):!1}function Ki(e,t,n){var r=jt(t,"bareStyle");if(e=he(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 ye(e){var t=In(e);if(t){var n=S(t,".ge-classes");n&&(n.value=Dn(e).join(" ")),Y(t,".ge-utilities").forEach(function(r){zn(r)})}Vr(e),dt(e)}function Ui(e){return pe(e,Bi)}function dt(e){Rt(e),R!==ee&&Vi(e,te(R)),La(e),se("onRefresh",e)}function Vi(e,t){Ui(e).forEach(function(n){var r=ce(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,Sa(n,t)),Object.keys(H).forEach(function(i){var l=H[i];l.preview&&Object.assign(o,l.preview(n,r,t.key))}),Object.keys(o).length&&Gi(n,o)})}function Gi(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(qe,JSON.stringify(r))}function Rt(e){pe(e,"["+qe+"]").forEach(function(t){var n=t.style,r={};try{r=JSON.parse(t.getAttribute(qe))||{}}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(qe),Ct(t)})}function qi(e){var t=document.createElement("div"),n={};t.style.cssText=e.style.cssText;try{n=JSON.parse(e.getAttribute(qe))||{}}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=qi(e);return t===void 0?n.cssText:{value:n.getPropertyValue(t),priority:n.getPropertyPriority(t)}}function Xi(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(qe);return i&&Rt(e),n===""?e.style.removeProperty(t):e.style.setProperty(t,n,r||""),Ct(e),i&&dt(e),!0}function Yi(e){var t=ce(e),n=Dr(t).filter(function(l){return l.panel!==!1}).map(function(l){return Ur(e,l)});if(Object.keys(H).forEach(function(l){var c=H[l],m=c.panel?c.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(c){P(c,"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 Ji(e,t){var n=jt(t,"utilityField");if(!n)return null;var r=Ur(e,n);return jn(r,e),Xe.set(r,e),r}var Xe=new Map;function Vr(e){Xe.forEach(function(t,n){if(!n.isConnected){Xe.delete(n);return}e&&t!==e||W(n,".ge-utilities")||jn(n,t)})}function zn(e){var t=dr.get(e);Y(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=Te[e.getAttribute("data-ge-family")].family,r=j(e,"select"),o=n.choices?n.choices(t,ce(t)):n.values,i,l,c="";if(r.innerHTML="",R===ee){i=Oe(t,n,E[0]),l=g("utility.default");var m=Mn(t,n).filter(function(K){return K.tier!==E[0]});m.length&&(c=g("utility.varies",{breakpoints:m.map(function(K){return K.tier.key}).join(", ")}))}else{var f=te(R),v=Ir(t,n,f);i=Oe(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(K){r.appendChild(h("option",{value:K},Gr(n,K)))}),r.value=i===null?"":i;var _=j(e,".ge-utility-note");_.textContent=c,Ho(_,c!=="")}function Gr(e,t){return e.label?e.label(t):t}var T={},M={},H={},De={},qr=0;function Xr(e){return qr++,"ge-"+e+"-"+qr+"-"+Math.random().toString(36).slice(2,6)}function $i(e){var t=G(e),n={},r=function(i){return!!document.getElementById(i)||Object.keys(n).some(function(l){return n[l]===i})};if(pe(t,"[id]").forEach(function(i){var l=i.id;if(document.getElementById(l)){var c=gl.exec(l),m;if(c)do m=Xr(c[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||[])},ml);return pe(t,"*").forEach(function(i){o.forEach(function(l){var c=i.getAttribute(l);if(c!==null&&!(l==="href"&&c.charAt(0)!=="#")){var m=c.split(/(\s+)/).map(function(f){return n[f]?n[f]:f.charAt(0)==="#"&&n[f.slice(1)]?"#"+n[f.slice(1)]:f}).join("");m!==c&&i.setAttribute(l,m)}})}),t}function Qi(){var e=et();return e.appendChild(ge(F)),e}function Ce(e){return e?e.getAttribute("data-ge-container"):null}function Zi(){A(d,"[data-ge-container]").forEach(function(e){var t=Ce(e),n=T[t];if(!n){X("container:"+t,'unknown container type "'+t+'"');return}C(e,"ge-container ge-container-"+t),n.mark(e),j(e,".ge-tools-drawer")||ta(e,t,n)})}function ea(){A(d,"[data-ge-container]").forEach(function(e){var t=T[Ce(e)];t&&t.unmark(e),Yr(e)})}function Yr(e){k(e,"ge-container ge-container-"+Ce(e)),rt(e)}function Ye(e,t){var n=h("div",{class:t});return e.insertBefore(n,e.firstChild),n}function Nt(e,t){(t||[]).forEach(function(n){I(e,n.title||"",n.className||"",n.iconClass||"bi bi-wrench",n.on)})}function ta(e,t,n){var r=Ye(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),I(r,g("tool.delete_container"),"ge-delete-container","bi bi-trash",function(){Ne(t,e,g("confirm.delete_container"),function(o){_t(e,o)})}),n.addPane&&I(r,g(n.addPaneKey),"ge-add-pane","bi bi-plus-circle",function(){var o=n.addPane(e,{});o&&le(n.paneKind,o,function(){},{parent:e,source:"tool",container:e})})}function na(e,t,n,r,o){var i=Ye(e,"ge-tools-drawer ge-pane-drawer");return Ie(i),pt(i,e,s.pane_classes),Nt(i,n),I(i,g("tool.delete_pane"),"ge-delete-pane","bi bi-trash",function(){Ne(t,e,r,function(l){o(l)})}),i}var Dt=["toggle","dismiss","slide","slide-to","ride"];function Jr(e){e&&pe(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&&pe(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 ra(e){if(!dn.has(e)){var t=W(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 oa(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 ia(e){A(e,".ge-pane-label").forEach(function(t){dn.delete(t),en(t)})}function Qr(e,t){var n=ge(t);return le("column",n,function(){e.appendChild(n)},{parent:e,source:"tool"})}function aa(e,t){!s.add_column.picker||!e||Zr(e,function(){la(e,t)})}function Zr(e,t){var n=null,r=function(){window.clearTimeout(n),n=null};ve(e,"mouseenter mousedown",function(){n||ie||(n=window.setTimeout(function(){n=null,t()},s.add_column.delay))}),ve(e,"mouseleave mouseup",r)}function la(e,t){Ee();var n=Vn(t,xe()),r=W(e,".ge-tools-drawer");r&&C(r,"ge-picker-open"),ie=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:sa(o)},$(o)?o:Fe(E[0],o));P(i,"ge-size-tight",$(o)&&o>n),P(i,"ge-size-flex",!$(o)),i.addEventListener("click",function(l){l.preventDefault(),l.stopPropagation(),Ee(),Qr(t,o)}),ie.appendChild(i)}),Ar(e)}function sa(e){return e==="equal"?g("tool.column_equal"):e==="auto"?g("tool.column_auto"):g("tool.column_size",{size:e})}function Ee(){if(!ie)return!1;var e=W(ie,".ge-tools-drawer");return e&&k(e,"ge-picker-open"),ie.remove(),ie=null,!0}function ua(){A(d,".row").forEach(function(e){if(!j(e,".ge-tools-drawer")){var t=Ye(e,"ge-tools-drawer");Ie(t),pt(t,e,s.row_classes),Nt(t,s.row_tools),I(t,g("tool.delete_row"),"ge-delete-row","bi bi-trash",function(){Ne("row",e,g("confirm.delete_row"),function(n){_t(e,n)})}),I(t,g("tool.add_column"),"ge-add-column","bi bi-plus-circle",function(){Ee()||Qr(e,$e(e,xe())?null:s.add_column.size)}),aa(j(t,".ge-add-column"),e)}})}function da(){A(d,".column").forEach(function(e){if(!j(e,".ge-tools-drawer")){var t=Ye(e,"ge-tools-drawer");Ie(t),s.resize.tools!==!1&&(I(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($),ft(e),-1),"tool")}),I(t,g("tool.column_wider"),"ge-increase-col-width","bi bi-plus-lg",function(n){bn(e,n.shiftKey?ca(e):It(s.valid_col_sizes.filter($),ft(e),1),"tool")})),s.indent.tools!==!1&&(I(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")}),I(t,g("tool.indent_increase"),"ge-increase-col-offset","bi bi-text-indent-left",function(n){gr(e,n.shiftKey?fa(e):It(s.valid_col_offsets,mt(e),1),"tool")})),pt(t,e,s.col_classes),Nt(t,s.col_tools),I(t,g("tool.delete_column"),"ge-delete-column","bi bi-trash",function(){Ne("column",e,g("confirm.delete_column"),function(n){Go(e,400,n,!0)})}),I(t,g("tool.add_row"),"ge-add-row","bi bi-plus-circle",function(){var n=et();le("row",n,function(){e.appendChild(n)},{parent:e,source:"tool"})})}})}function xe(){return R===ee?E[E.length-1]:te(R)}function ct(e){var t=xe();if(Ht(e,t))return null;var n=Kn(e,t);return n===null?F:n}function ft(e){var t=ct(e);if($(t))return t;var n=Math.round(Et(e)/eo(e.parentElement)*F);return Math.min(Math.max(n,1),F)}function eo(e){var t=window.getComputedStyle(e);return e.clientWidth-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight)}function mt(e){return Ut(e,xe())||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($).reduce(function(t,n){return Math.min(t,n)},F)}function Rn(e){return e.filter($).reduce(function(t,n){return Math.max(t,n)},0)}function ca(e){var t=Vn(e.parentElement,xe(),e)-mt(e);return Math.min(Rn(s.valid_col_sizes),Math.max(t,1))}function fa(e){var t=Vn(e.parentElement,xe(),e)-ft(e);return Math.min(Rn(s.valid_col_offsets),Math.max(t,0))}function Ie(e){return s.drag_handle==="drawer"?null:I(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 ma(){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(c){return c.isConnected?!0:(o.unobserve(c),!1)});e.clear(),ga(l)}var o=new window.ResizeObserver(function(l){l.forEach(function(c){n(c.target)})}),i=new window.MutationObserver(function(l){l.forEach(function(c){var m=c.target;if(c.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}c.addedNodes.forEach(function(v){v.nodeType===1&&pe(v,Nn).forEach(function(b){C(b,"ge-drawer-fit"),o.observe(b),n(b)})})})});i.observe(d,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style"]}),Ge.signal.addEventListener("abort",function(){i.disconnect(),o.disconnect(),t!==null&&window.cancelAnimationFrame(t)})}function ga(e){var t=e.map(function(r){var o={drawer:r,tools:Y(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")||I(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 I(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){ve(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!==""&&!pa(t)})}function pa(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 va(e,t){Dn(e).forEach(function(n){k(e,n)}),t.split(/\s+/).forEach(function(n){n!==""&&C(e,n)}),rt(e)}function pt(e,t,n){var r=ha(t,n||[]);Ve.set(t,r),Je()!=="sidebar"&&I(e,g("tool.settings"),"ge-settings","bi bi-gear-fill",function(){wa(t,r,this)});var o=ce(t);return Object.keys(H).forEach(function(i){H[i].drawerTools&&H[i].drawerTools(e,t,o)}),Object.keys(M).forEach(function(i){M[i].drawerTools&&M[i].drawerTools(e,t,o)}),e.appendChild(r)}function ha(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(){va(e,this.value),ye(e)});var c=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")),ye(e)}),c.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=ba(t.node),r=Yi(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||(Z&&Z.home&&e.contains(Z.home)&&me(),t.nodes.forEach(function(n){n.remove()}),t.nodes=null,Xe.forEach(function(n,r){r.isConnected||Xe.delete(r)}))}function oo(e){return h("h6",{class:"ge-section-title"},e)}function ba(e){var t=ce(e),n=Je(),r=[];return[T,M,H].forEach(function(o){Object.keys(o).forEach(function(i){var l=o[i],c=l.panelSection?l.panelSection(e,t):null;if(!(!c||!c.body)){var m=h("div",{class:"ge-panel-section","data-ge-plugin":i});if(n==="offcanvas"||n==="modal"||n==="sidebar")m.appendChild(oo(g(c.labelKey))),m.appendChild(c.body);else{var f=g(c.labelKey),v=m.appendChild(h("button",{type:"button",class:"btn btn-sm btn-outline-secondary ge-panel-section-open"},f));de(c.body),m.appendChild(c.body),v.addEventListener("click",function(){Co(c.titleKey?g(c.titleKey,{kind:Hn(e)}):f,c.body,v)})}r.push(m)}})}),r}var io=["offcanvas","popover","modal","inline","sidebar"],z={},V=null,Wt=new WeakMap;function Je(){return io.indexOf(s.settings_panel)!==-1?s.settings_panel:(X("settings_panel",'settings_panel "'+s.settings_panel+'" is not one of '+io.join(", ")+": using offcanvas"),"offcanvas")}function In(e){return e&&Ve.get(e)||null}function ao(){var e=[d];return V&&V.mode!=="inline"&&e.push(V.details),Le&&e.push(Le.details),e}function wa(e,t,n){var r=Je();if(r==="inline"){ot(t)?(de(t),ro(t)):(Ft(t),_e(t));return}var o=V&&V.details===t;Se(),o||ya(r,e,t,n)}function ya(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),_e(n),C(t,"ge-settings-target");var l={signal:i.signal};if(document.addEventListener("keydown",function(m){m.key==="Escape"&&!Z&&Se()},l),e==="offcanvas"){var c=window.innerWidth<576;P(o,"offcanvas-end",!c),P(o,"offcanvas-bottom",c),k(o,"hiding"),o.getBoundingClientRect(),C(o,"show")}else e==="popover"?(Fn(o,r),ve(window,"scroll resize",function(){Fn(o,r)},l),window.ResizeObserver&&(V.observer=new window.ResizeObserver(function(){Fn(o,r)}),V.observer.observe(n)),ve(document,"mousedown touchstart",function(m){!Z&&!o.contains(m.target)&&!r.contains(m.target)&&Se()},l)):Wn(o,function(){V&&V.mode==="modal"&&Se()})}function Se(){me();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"?de(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&&Me(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()),de(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(Ca(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"?re(null):Se()}),z[e]=document.body.appendChild(n),n}function uo(){Se(),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,Le=null,vt=null;function Bt(){return w(d,"ge-editing")}function Ca(e){var t=h("button",{type:"button",class:"ge-sidebar-toggle","aria-controls":e.id});return t.appendChild(h("i")),t.addEventListener("click",function(){Ea(!Ue)}),t}function Ea(e){Ue=e,fo()}function fo(){var e=z.sidebar,t=z["sidebar-toggle"];if(e){var n=!Ue;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()&&!Ue&&window.innerWidth>=co)}function xa(){if(Je()==="sidebar"){var e=so("sidebar");Ue===null&&(Ue=window.innerWidth<co),e.style.removeProperty("display"),z["sidebar-toggle"].style.removeProperty("display"),ho(),fo()}}function _a(){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=Le;Le=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?Le&&Le.details===t:!Le&&vt)){vo();var n=S(e,".ge-settings-body");if(!t){var r=ka(),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}Le={node:L,details:t,home:t.parentElement,next:t.nextElementSibling},go(g("panel.title",{kind:Hn(L)})),Ft(t),n.appendChild(t),_e(t)}}}function ka(){var e=s.sidebar.empty,t=null;return typeof e=="function"?t=bo(e(a),function(n){return n.title}):e!=null&&X("sidebar.empty","sidebar.empty is a function(ge) returning { title, body }, not "+typeof e+": ignored"),[T,M,H].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=W(e,".ge-tools-drawer",d);if(t){var n=t.parentElement,r=Ve.has(n)?n:Y(n).filter(function(i){return Ve.has(i)})[0];if(r)return r}for(var o=e;o&&o!==d;o=o.parentElement)if(Ve.has(o))return o;return null}function Fn(e,t){if(Me(t)){_e(e);var n=t.getBoundingClientRect(),r=8,o=j(e,".popover-body");o.style.removeProperty("max-height");var i=Et(e),l=$t(e),c=window.innerHeight-n.bottom-2*r,m=n.top-2*r,f=l<=c||c>=m,v=f?c:m;l>v&&(Pe(o,{"max-height":Math.max(120,v-(l-$t(o)))}),l=$t(e));var b=f?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",f),P(e,"bs-popover-top",!f),Pe(e,{top:b+window.pageYOffset,left:_+window.pageXOffset}),Pe(j(e,".popover-arrow"),{left:Math.max(r,Math.min(n.left+n.width/2-_-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 J=null,Z=null;function Aa(){return J||(J=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(J,".modal-header").appendChild(h("button",{type:"button",class:"btn-close ge-dialog-close","aria-label":g("panel.close")})),S(J,".modal-footer").appendChild(h("button",{type:"button",class:"btn btn-primary ge-dialog-close"},g("panel.done"))),xt(J,"click",".ge-dialog-close",function(e){e.preventDefault(),me()}),document.body.appendChild(J))}function Co(e,t,n){me();var r=Aa(),o=new AbortController;Z={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),_e(t),At()||document.addEventListener("keydown",function(i){i.key==="Escape"&&me()},{signal:o.signal}),Object.keys(z).forEach(function(i){C(z[i],"ge-under-dialog")}),Wn(r,function(){me()})}function me(){var e=Z;e&&(Z=null,e.listening.abort(),Bn(J),Object.keys(z).forEach(function(t){k(z[t],"ge-under-dialog")}),de(e.body),e.home&&Me(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&&Me(e.opener)&&e.opener.focus&&e.opener.focus())}function Eo(){me(),J&&(yo(J),mn(J),J=null)}function Hn(e){var t=ce(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 Ta(){A(d,'.column, div[class*="col-"], div.col').forEach(function(e){C(e,"column"),!(Pa(e).length||xo(e.parentElement))&&Vt(e,E[0],F)})}function xo(e){return w(e,"row")&&E.some(function(t){return it.some(function(n){return w(e,or(t,n))})})}function $e(e,t){if(!w(e,"row"))return null;for(var n=E.indexOf(t);n>=0;n--)for(var r=0;r<it.length;r++)if(w(e,or(E[n],it[r])))return{tier:n,value:it[r]};return null}function _o(e,t){for(var n=E.indexOf(t);n>=0;n--){var r=Qe(e,E[n]);if(r!==null)return{tier:n,size:r}}return null}function Ht(e,t){var n=$e(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 Oa(e){return e.value==="auto"?0:F/parseInt(e.value,10)}function Sa(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 La(e){pe(e,".row").forEach(function(t){var n=s.row_cols===!1?null:R===ee?$e(t,E[0])||null:$e(t,te(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 Ma(){return{name:"row-cols",prefix:"row-cols",values:it,appliesTo:["row"],labelKey:"utility.row_cols"}}function Qe(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,Qe)}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 Pa(e){return E.filter(function(t){return Qe(e,t)!==null})}function Vn(e,t,n){var r=0;return Y(e,".column").forEach(function(o){if(!(n&&o===n)){var i=Ht(o,t),l=i?Oa(i):Kn(o,t);r+=($(l)?l:0)+(Ut(o,t)||0)}}),F-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||!$(t)?{size:t,offset:n,refused:!1}:(t=Math.min(Math.max(t,1),F),t+n<=F?{size:t,offset:n,refused:!1}:e.leading==="offset"?{size:F-n,offset:n,refused:!1}:{size:null,offset:n,refused:!0})}function Ze(e){pe(e,".column").forEach(function(t){Pe(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 za(){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=za(),i=0,l=t.draggable+"|"+(t.group||"");qa(),e.forEach(function(c){var m=St.get(c);if(!(m&&m.has(l))){m||St.set(c,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,_){return b.options.group.name===f.name&&t.accepts(v.el,_)}),He.push(n.create(c,Object.assign({group:f,draggable:t.draggable,handle:r?".ge-tools-drawer":".ge-tools-drawer .ge-move",filter:function(v,b){return W(v.target,o,c)?!0:!b||b.parentNode!==c},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:Ra,onEnd:Da},t.options||{})))}})}}function ja(){if(!Qo()){X("sortable_missing",g("error.sortable_missing"));return}Xt(A(d,".row"),{draggable:".column",group:"column"}),Xt([d].concat(A(d,".column")),{draggable:Gn(),group:"block",accepts:ht});var e=qt("regions");e.length&&Xt(A(d,e.join(", ")),{draggable:">"+Gn(),group:"block",accepts:ht}),se("onSortable",Xt)}function Ra(e){var t=e.item,n=wn(t),r=Lo(t),o={from:n,canceled:!1};un.set(t,o),Q(function(){var i=D("before-move",ae(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:ce(t),node:t}}function Na(e,t){var n=Y(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 Da(e){var t=e.item,n=un.get(t),r=n?n.from:wn(t);if(un.delete(t),n&&n.canceled){Na(t,r);return}var o=wn(t);if(!(o.parent===r.parent&&o.index===r.index)){var i=W(t,"[data-ge-container]"),l=T[Ce(i)];l&&l.afterPaneMove&&l.afterPaneMove(i,t,r);var c=Lo(t);Q(function(){D("after-move",ae(c.kind,c.node,{parent:o.parent,source:"dragdrop",from:r,to:o,container:i||void 0}))})}}function Ia(){s.resize.enabled&&A(d,".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"})),Fa().forEach(function(n){var r=h("span",{class:"ge-resize-handle ge-resize-"+n,"data-ge-edge":n});r.addEventListener("pointerdown",Wa),e.appendChild(r)})}})}function Fa(){return String(s.resize.handles).split(",").map(function(e){return e.trim()}).filter(function(e){return e==="e"||e==="w"})}function Wa(e){var t=e.currentTarget,n=t.parentElement,r=t.getAttribute("data-ge-edge")==="w",o=e.pageX,i=Et(n);if(e.preventDefault(),!Ha(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 c(f){n.style.width=l(f)+"px",Ka(n,l(f))}function m(f){t.removeEventListener("pointermove",c),tr(t,"pointerup pointercancel",m),k(n,"ge-resizing"),Ua(n,l(f))}t.addEventListener("pointermove",c),ve(t,"pointerup pointercancel",m)}function Ba(){Mo(d)}function Mo(e){A(e,".ge-resize-handle").forEach(function(t){t.remove()}),A(e,".ge-resize-size").forEach(function(t){t.remove()}),Ze(e)}function Po(e,t){var n=Math.round(t/eo(e.parentElement)*F),r=zo(e),o=r?ct(r):null,i=Mt.get(e),l=i?i.units:ft(e),c=r&&$(o)?l+o-gt(s.valid_col_sizes):F-mt(e);return Math.min(Math.max(n,gt(s.valid_col_sizes)),Math.max(c,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===ee?E[0].colPrefix:xe().colPrefix)+e}function Ha(e){var t=ct(e),n=Q(function(){return D("before-resize",ae("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 Ka(e,t){qn(e,jo(Po(e,t)))}function Ua(e,t){var n=Mt.get(e),r=Po(e,t);if(Mt.delete(e),qn(e,""),Ze(e),!!n&&r!==n.units){var o=pn(e,r);o&&Q(function(){vn(e,o),Va(e,r-n.units),ye(e),D("after-resize",ae("column",e,hn({source:"dragdrop",from:n.from,to:o.size},o.cleared)))})}}function Va(e,t){var n=zo(e);if(!(!n||!t)){var r=ct(n);if($(r)){var o=pn(n,r-t);o&&(vn(n,o),ye(n))}}}function Ga(){He.forEach(function(e){e.destroy()}),He=[],St=new WeakMap}function qa(){He=He.filter(function(e){return d.contains(e.el)?!0:(e.destroy(),St.delete(e.el),!1)})}function et(){return h("div",{class:"row"})}function Yt(e,t,n){var r=null;if(fl.forEach(function(c){r===null&&n&&n[c]!==void 0&&(r=c)}),r===null)return e;var o=he(n[r]);if(!o)return U(t+": "+r+" matches no element; the "+t+" is left detached"),e;var i=r==="appendTo"||r==="prependTo"?o:o.parentElement,l=function(){return le(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 Xa(e,t){var n=et();return e!==void 0&&!Array.isArray(e)&&!(e&&e.row_cols)&&(U("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(ge(r))}),Yt(n,"row",t)}function Ya(e,t){t=t||{};var n=he(t.appendTo||t.prependTo||null);e===void 0&&n&&$e(n,xe())?e=null:!$(e)&&rr.indexOf(e)===-1&&(U("createColumn: no column size given, using "+F),e=F);var r=ge(e,t.offset);return t.content!==void 0&&r.appendChild(il(t.content)),Yt(r,"column",t)}function Ja(e,t){t=t||{};var n=T[e];return n?Yt(n.create(t),e,t):(U('createContainer: no such container type "'+e+'"'),null)}function Xn(e,t,n){e=he(e),n=n||{};var r=T[Ce(e)];if(!r||Ce(e)!==t)return U("this is not a "+t+" container"),null;var o=r.addPane(e,n);return o?le(r.paneKind,o,function(){},{parent:e,source:"api",container:e}):null}function $a(e,t){e=he(e);var n=Ce(e);return!T[n]||!T[n].addPane?(U("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 ge(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||d,e)})}}function Qa(){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 Za(e){A(d,".column > .ge-content, .column > .ge-text-block > .ge-content").forEach(function(t){if(!(w(t,"ge-rte-active")||!Y(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,c=r;o.forEach(function(m){var f;if(m.block)f=m.block;else if(el(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!==c&&Zt(f,c),c=f}),l||r.remove()}})}function el(e){return e.some(function(t){return t.nodeType===1||t.nodeType===3&&/\S/.test(t.nodeValue)})}function tl(e){A(d,".column").forEach(function(t){var n=[];Y(t).forEach(function(r){oe(r,".ge-tools-drawer, .ge-resize-handle")||(oe(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 nl(){A(d,".column > .ge-content").forEach(function(e){Uo(e,h("div",{class:"ge-text-block"}))}),A(d,".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)||ol(e,n):rl(e)}})}function No(e){A(e,".ge-text-block").forEach(function(t){en(t)})}function rl(e){var t=j(e,".ge-content"),n=Ye(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)}),I(n,g("tool.delete_plain"),"ge-delete-plain","bi bi-trash",function(){Ne("plain",t,g("confirm.delete_plain"),function(r){_t(e,function(){e.remove(),r()})})})}function ol(e,t){var n=j(e,".ge-content"),r=Ye(e,"ge-tools-drawer ge-text-drawer");Ie(r),I(r,g("text.no_editor",{type:t}),"ge-text-info ge-text-missing","bi bi-exclamation-triangle"),I(r,g("tool.delete_text"),"ge-delete-text","bi bi-trash",function(){Ne("text",n,g("confirm.delete_text"),function(o){_t(e,function(){e.remove(),o()})})})}function il(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(d,"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){U("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(d),se("onViewChange",t),D("view-change",{canvas:d,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):(X("plugin:"+t,e+" needs the "+t+" plugin: include dist/plugins/grideditor."+n+".js after the editor"),null)}}function al(e){if(!s.active_target){X("active_target","setActiveTarget needs the active_target setting: without it, it does nothing");return}if(e==null){re(null);return}var t=he(e);if(!Lr(t)){var n=typeof e=="string"?e:t?"<"+t.tagName.toLowerCase()+">":String(e);U("setActiveTarget: "+n+" is not a node of the canvas with settings");return}re(t)}var er={getHtml:ut,getPlainHtml:Ri,init:function(){fn(fe)},reset:function(){fn(Sr)},deinit:Ae,destroy:Di,changeView:Io,getView:Zn,createRow:Xa,createColumn:Ya,createText:function(e,t){return De.createText?De.createText(e,t):(X("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:Ja,addTab:function(e,t){return Xn(e,"tabs",t)},addAccordionItem:function(e,t){return Xn(e,"accordion",t)},addPane:$a,setLocale:ei,getUtility:Hr,setUtility:Pn,getActiveTarget:function(){return s.active_target?L:null},setActiveTarget:al};Object.keys(er).forEach(function(e){var t=!!(qo[e]&&qo[e].value);a[e]=function(){if(Ke)return X("destroyed:"+e,g("warning.destroyed",{method:e})),e==="getHtml"?d.innerHTML:e==="getPlainHtml"?ir(d.innerHTML):t?null:a;var n=er[e].apply(a,arguments);return t?n:a}}),a.canvas=d,a.settings=Yn(),nn.set(d,a),Ii(),a.settings=Yn(),Object.keys(De).forEach(function(e){Object.prototype.hasOwnProperty.call(er,e)||e in a||(a[e]=function(){return Ke?(X("destroyed:"+e,g("warning.destroyed",{method:e})),null):De[e].apply(null,arguments)})}),ai(),fe(),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.4";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
|