diff --git a/dist/pagebuilder/app.js b/dist/pagebuilder/app.js index d6e91c78..9384bcb0 100644 --- a/dist/pagebuilder/app.js +++ b/dist/pagebuilder/app.js @@ -1 +1 @@ -!function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=6)}([,,,,,,function(t,e,n){t.exports=n(7)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(8),o=(n.n(i),n(9)),a=(n.n(o),n(10)),r=(n.n(a),n(11)),s=(n.n(r),n(12)),l=(n.n(s),n(13)),c=(n.n(l),n(14));n.n(c)},function(t,e){$(document).ready(function(){function t(){$(window).width()<1e3&&($("#gjs").addClass("sidebar-collapsed"),e())}function e(){window.editor.trigger("change:canvasOffset canvasScroll")}$(".gjs-editor").append($("#toggle-sidebar")),$(".gjs-pn-panels").prepend($("#sidebar-header")),$(".gjs-pn-panels").append($("#sidebar-bottom-buttons")),$("#toggle-sidebar").click(function(){$("#gjs").toggleClass("sidebar-collapsed"),e()}),t(),window.editor.on("run:open-sm",function(t){$(".gjs-trt-traits").parent().parent().css("display","none"),$(".gjs-sm-sectors").parent().parent().css("display","block"),$("#gjs-sm-advanced .gjs-sm-properties").append($(".gjs-clm-tags"))}),window.editor.on("run:open-tm",function(t){$(".gjs-sm-sectors").parent().parent().css("display","none"),$(".gjs-trt-traits").parent().parent().css("display","block")}),window.editor.on("block:drag:start",function(e){t()}),window.editor.on("rteToolbarPosUpdate",function(t){window.editor&&window.editor.getSelected()&&(window.editor.getSelected().getEl()&&setTimeout(function(){var e=$(".gjs-rte-toolbar").first();if(e.offset().top0&&e.css("top",n+"px")}},0))});var n=!1;$(document).keydown(function(t){8===t.which&&(n=!0)}).keyup(function(t){8===t.which&&(n=!1)}),$(window).on("beforeunload",function(t){n&&t.preventDefault()})}),window.addEventListener("message",function(t){"page-loaded"===t.data?($("#phpb-loading").addClass("loaded"),$(".gjs-blocks-cs").prepend($("#block-search")),window.isLoaded=!0,$(window).trigger("pagebuilder-page-loaded")):"touch-start"===t.data&&window.touchStart()},!1)},function(t,e){$(document).on("input","#block-search input",function(){var t=$(this).val().toLowerCase();$(".gjs-block-category").each(function(){var e=!1;$(this).find(".gjs-block").each(function(){$(this).data("original-html")||$(this).data("original-html",$(this).html());var n=$(this).text();if(n.toLowerCase().includes(t)){$(this).removeClass("d-none"),e=!0;var i=new RegExp("("+t+")","gi"),o=n.replace(i,"$1");$(this).find(".gjs-block-label").html($(this).data("original-html").replace(n.trim(),o))}else $(this).addClass("d-none")}),$(this).removeClass("d-none"),e||$(this).addClass("d-none")})})},function(t,e){!function(){window.customBuilderScripts={},window.editor.on("component:create",function(t){if(t.components().length){var e=t.components().models[t.components().length-1];if("script"===e.attributes.type){var n=t.attributes.attributes["block-id"];window.customBuilderScripts[n]=e.toHTML(),e.remove()}}}),window.editor.on("component:add",function(t){if(void 0!==t.attributes["run-builder-script"]){var e=customBuilderScripts;window.customBuilderScripts[t.attributes["block-id"]]=customBuilderScripts[t.attributes["run-builder-script"]],runScriptsOfComponentAndChildren(t),window.customBuilderScripts=e,delete t.attributes["run-builder-script"]}}),window.editor.on("sorter:drag:end",function(t){var e=t.modelToDrop;for(var n in e&&e.attributes&&e.attributes["block-id"]&&window.runScriptsOfComponentAndChildren(e),CKEDITOR.instances)CKEDITOR.instances[n].destroy(!0)}),window.runScriptsOfComponentAndChildren=function(t){!function(t){var e=t.attributes["block-id"];if(e&&void 0!==window.customBuilderScripts[e]){var n=t.attributes["style-identifier"],i=$("").append(window.customBuilderScripts[e]);i.find("script").prepend("let inPageBuilder = true;"),i.find("script").prepend('let blockSelector = ".'+n+'";'),i.find("script").prepend('let block = document.getElementsByClassName("'+n+'")[0];'),i.find("script").prepend("(function(){"),i.find("script").append("})();");var o=document.createElement("script");o.type="text/javascript",o.innerHTML=i.find("script").html(),window.editor.Canvas.getDocument().body.appendChild(o)}}(t),t.components().each(function(t){runScriptsOfComponentAndChildren(t)})}}()},function(t,e){!function(){function t(){!function(){for(var t in window.themeBlocks){var e=window.themeBlocks[t],n=$("").append(e.content);n.find("[phpb-blocks-container]").each(function(){""!==$(this).html()&&""===$(this).html().trim()&&$(this).html("")}),window.themeBlocks[t].content=n.html(),e.content=n.html(),editor.BlockManager.add(t,e)}}();var t=document.createElement("script");t.type="text/javascript",t.src=window.injectionScriptUrl;var n=t.outerHTML+"