diff --git a/plugi-core/build.js b/plugi-core/build.js index 1acec92..252f1f1 100644 --- a/plugi-core/build.js +++ b/plugi-core/build.js @@ -43,6 +43,17 @@ function cleanObsoleteArtifacts() { path.join(DIST_PB_DIR, 'app.css.map'), path.join(DIST_PB_DIR, 'app.js'), path.join(DIST_PB_DIR, 'app.js.map'), + path.join(DIST_PB_DIR, 'ckeditor-full-all-v4.14.0.min.js'), + path.join(DIST_PB_DIR, 'grapesjs-plugin-ckeditor-v0.0.10.min.js'), + path.join(DIST_PB_DIR, 'bootstrap-select-v1.13.12.min.css'), + path.join(DIST_PB_DIR, 'bootstrap-select-v1.13.12.min.js'), + path.join(DIST_PB_DIR, 'bootstrap-v4.3.1.min.css'), + path.join(DIST_PB_DIR, 'bootstrap-v4.3.1.min.js'), + path.join(DIST_PB_DIR, 'jquery-3.4.1.min.js'), + path.join(DIST_PB_DIR, 'popper-v1.12.9.min.js'), + path.join(DIST_PB_DIR, 'toastr-v2.1.3.min.css'), + path.join(DIST_PB_DIR, 'toastr-v2.1.3.min.js'), + path.join(DIST_PB_DIR, 'underscore-v1.9.1.min.js'), ]; for (const file of obsoleteFiles) { diff --git a/plugi-core/dist/PageBuilderBody.js b/plugi-core/dist/PageBuilderBody.js index f691c2a..cc9f35b 100644 --- a/plugi-core/dist/PageBuilderBody.js +++ b/plugi-core/dist/PageBuilderBody.js @@ -1,2 +1,44 @@ -(function(){$(`.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`),t()}),e(),window.editor.on(`run:open-sm`,function(e){$(`.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(e){$(`.gjs-sm-sectors`).parent().parent().css(`display`,`none`),$(`.gjs-trt-traits`).parent().parent().css(`display`,`block`)}),window.editor.on(`block:drag:start`,function(t){e()}),window.editor.on(`rteToolbarPosUpdate`,function(e){window.editor&&window.editor.getSelected()&&window.editor.getSelected().getEl()&&setTimeout(function(){let t=$(`.gjs-rte-toolbar`).first();if(t.offset().top0&&t.css(`top`,n+`px`)}},0)});function e(){$(window).width()<1e3&&($(`#gjs`).addClass(`sidebar-collapsed`),t())}function t(){window.editor.trigger(`change:canvasOffset canvasScroll`)}let n=!1;$(document).keydown(function(e){e.which===8&&(n=!0)}).keyup(function(e){e.which===8&&(n=!1)}),$(window).on(`beforeunload`,function(e){n&&e.preventDefault()});function r(){$(`.gjs-blocks-cs`).prepend($(`#block-search`))}window.addEventListener(`message`,i,!1);function i(e){e.data===`page-loaded`?($(`#phpb-loading`).addClass(`loaded`),r(),window.isLoaded=!0,$(window).trigger(`pagebuilder-page-loaded`)):e.data===`touch-start`&&window.touchStart()}$(document).on(`input`,`#block-search input`,function(){let e=$(this).val().toLowerCase();$(`.gjs-block-category`).each(function(){let t=!1;$(this).find(`.gjs-block`).each(function(){$(this).data(`original-html`)||$(this).data(`original-html`,$(this).html());let n=$(this).text();if(n.toLowerCase().includes(e)){$(this).removeClass(`d-none`),t=!0;let r=RegExp(`(`+e+`)`,`gi`),i=n.replace(r,`$1`);$(this).find(`.gjs-block-label`).html($(this).data(`original-html`).replace(n.trim(),i))}else $(this).addClass(`d-none`)}),$(this).removeClass(`d-none`),t||$(this).addClass(`d-none`)})}),window.customBuilderScripts={},window.editor.on(`component:create`,e=>{if(e.components().length){let t=e.components().models[e.components().length-1];if(t.attributes.type===`script`){let n=e.attributes.attributes[`block-id`];n===void 0&&(n=e.attributes.attributes.id);let r=t,i=!1;for(;r.parent();)if(r=r.parent(),r.attributes.attributes[`phpb-content-container`]){i=!0;break}i&&(window.customBuilderScripts[n]=t.toHTML(),t.remove())}}}),window.editor.on(`component:add`,function(e){if(e.attributes[`run-builder-script`]!==void 0){let t=customBuilderScripts;window.customBuilderScripts[e.attributes[`block-id`]]=customBuilderScripts[e.attributes[`run-builder-script`]],runScriptsOfComponentAndChildren(e),window.customBuilderScripts=t,delete e.attributes[`run-builder-script`]}}),window.editor.on(`sorter:drag:end`,function(e){let t=e.modelToDrop;t&&t.attributes&&(t.attributes[`block-id`]||t.attributes.id)&&window.runScriptsOfComponentAndChildren(t);for(let e in CKEDITOR.instances)CKEDITOR.instances[e].destroy(!0)}),window.runScriptsOfComponentAndChildren=function(e){a(e),e.components().each(function(e){runScriptsOfComponentAndChildren(e)})};function a(e){let t=e.attributes[`block-id`];if(t===void 0&&(t=e.attributes.attributes.id),t&&window.customBuilderScripts[t]!==void 0){let n=e.attributes[`style-identifier`],r=$(``).append(window.customBuilderScripts[t]);r.find(`script`).prepend(`let inPageBuilder = true;`),r.find(`script`).prepend(`let blockSelector = ".`+n+`";`),r.find(`script`).prepend(`let block = document.getElementsByClassName("`+n+`")[0];`),r.find(`script`).prepend(`(function(){`),r.find(`script`).append(`})();`);let i=document.createElement(`script`);i.type=`text/javascript`,i.innerHTML=r.find(`script`).html(),window.editor.Canvas.getDocument().body.appendChild(i)}}function o(){c();let e=document.createElement(`script`);e.type=`text/javascript`,e.src=window.injectionScriptUrl;let t=e.outerHTML+`';\n window.initialComponents = window.initialComponents.replace('', fullScript + '');\n\n $.each(window.languages, (languageCode, languageTranslation) => {\n if (window.pageBlocks[languageCode] === null) {\n window.pageBlocks[languageCode] = {};\n }\n });\n\n activateLanguage(window.currentLanguage);\n }\n\n /**\n * GrapesJS wraps each external script with a start[number]Start() method,\n * which needs to be called on switching language.\n */\n function startFirstScript() {\n let scriptTags = document.querySelectorAll(\"script\");\n for (let i = 0; i < scriptTags.length; i++) {\n let node = scriptTags[i];\n if (node.innerHTML.startsWith('var script')) {\n let beforeEquals = node.innerHTML.split('=')[0];\n let scriptNumber = parseInt(beforeEquals.replace('var script', ''));\n if (Number.isInteger(scriptNumber)) {\n let startScriptMethodName = 'script' + scriptNumber + 'Start';\n if (typeof window[startScriptMethodName] === 'function') {\n if (scriptNumber !== 0) {\n window[startScriptMethodName]();\n }\n return false;\n }\n }\n }\n }\n }\n\n /**\n * Add all theme blocks to GrapesJS blocks manager.\n */\n function addThemeBlocks() {\n for (let blockSlug in window.themeBlocks) {\n let block = window.themeBlocks[blockSlug];\n\n // remove whitespace from phpb-block-container elements, otherwise these components will become type=text,\n // resulting in components dropped inside the container jumping to the dropped position - 1\n let $blockHtml = $(\"\").append(block.content);\n $blockHtml.find(\"[phpb-blocks-container]\").each(function() {\n if ($(this).html() !== '' && $(this).html().trim() === '') {\n $(this).html('');\n }\n });\n window.themeBlocks[blockSlug].content = $blockHtml.html();\n block.content = $blockHtml.html();\n\n editor.BlockManager.add(blockSlug, block);\n }\n }\n\n /**\n * Switch pagebuilder to another language variant on changing the language selector.\n */\n $(\"#language-selector select\").on(\"change\", function() {\n let selectedLanguage = $(this).find(\"option:selected\").val();\n\n window.switchLanguage(selectedLanguage, function() {\n activateLanguage(selectedLanguage);\n });\n });\n\n /**\n * Activate the given language variant in the pagebuilder.\n *\n * @param newLanguage\n */\n window.activateLanguage = function(newLanguage) {\n window.currentLanguage = newLanguage;\n\n // reset GrapesJS editor before loading the new language variant\n window.editor.select();\n window.editor.DomComponents.clear();\n window.editor.DomComponents.componentsById = [];\n window.editor.UndoManager.clear();\n\n // remove any script tags from previous languages\n window.editor.Canvas.getDocument().querySelectorAll(\"script\").forEach(function(node) {\n node.remove();\n });\n\n // load initial non-editable layout components\n window.editor.setComponents(window.initialComponents);\n denyAccessToLayoutElements(editor.getWrapper());\n window.editor.getWrapper().find(\"[phpb-content-container]\").forEach((container, index) => {\n container.set('custom-name', window.translations['page-content']);\n\n // reload components of this content container (adding all root phpb-block elements)\n container.components(window.contentContainerComponents[index]);\n\n // replace phpb-block elements with the server-side rendered version of each block\n replacePlaceholdersForRenderedBlocks(container);\n\n // apply the stored block settings to the server-side rendered html\n applyBlockAttributesToComponents(container);\n });\n };\n\n $(window).on('pagebuilder-page-loaded', function(event) {\n window.editor.getWrapper().find(\"[phpb-content-container]\").forEach(container => {\n restrictEditAccess(container);\n window.runScriptsOfComponentAndChildren(container);\n });\n window.setWaiting(false);\n\n setTimeout(function() {\n window.changesOffset = window.editor.getModel().get('changesCount');\n window.afterInitialRendering = true;\n }, 250);\n });\n\n /**\n * Replace phpb-block elements with the server-side rendered version of each block.\n *\n * @param component\n */\n function replacePlaceholdersForRenderedBlocks(component) {\n let newComponent = component;\n\n // if we encounter a pagebuilder block, replace it with the server-side rendered html\n if (component.get('tagName') === 'phpb-block') {\n let id = component.attributes.attributes.id;\n if (window.pageBlocks[window.currentLanguage][id] !== undefined && window.pageBlocks[window.currentLanguage][id]['html'] !== undefined) {\n newComponent = component.replaceWith(window.pageBlocks[window.currentLanguage][id]['html']);\n window.pageBlocks[window.currentLanguage][id]['html'] = '';\n }\n }\n\n // replace placeholders inside child components\n newComponent.get('components').each(childComponent => replacePlaceholdersForRenderedBlocks(childComponent));\n }\n\n /**\n * Function for denying edit access to this component and all children that belong to the layout.\n *\n * @param component\n */\n function denyAccessToLayoutElements(component) {\n if ('phpb-content-container' in component.attributes.attributes) return;\n\n disableAllEditFunctionality(component);\n\n // apply restrictions to child components\n component.get('components').each(component => denyAccessToLayoutElements(component));\n }\n\n\n /**\n * Component select handler.\n */\n window.editor.on('component:selected', function(component) {\n // if the component has settings, activate settings panel in pagebuilder sidebar\n if (componentHasBlockSettings(component)) {\n $(\".gjs-pn-buttons .gjs-pn-btn:nth-of-type(2)\").click();\n }\n else if (component.get('type') === '' && componentHasBackground(component)) {\n // on selecting a default component without settings, with editable background, show background styling\n $(\".gjs-pn-buttons .gjs-pn-btn:nth-of-type(3)\").click();\n if ($(\"#gjs-sm-position\").hasClass(\"gjs-sm-open\")) {\n $(\"#gjs-sm-position\").find(\".gjs-sm-title\").click();\n }\n if (! $(\"#gjs-sm-background\").hasClass(\"gjs-sm-open\")) {\n $(\"#gjs-sm-background\").find(\".gjs-sm-title\").click();\n }\n }\n\n // if component has no settings, add no settings text to settings panel in sidebar\n if (! componentHasBlockSettings(component)) {\n setTimeout(function() {\n $(\".gjs-trt-traits\").html('

' + window.translations['trait-manager']['no-settings'] + '

');\n }, 0);\n }\n\n // only show the toolbar buttons that are applicable\n setTimeout(function() {\n if (! component.attributes.removable) {\n $(\".gjs-toolbar .fa-trash-o.gjs-toolbar-item\").hide();\n }\n if (! component.attributes.copyable) {\n $(\".gjs-toolbar .fa-clone.gjs-toolbar-item\").hide();\n }\n if (! component.attributes.draggable) {\n $(\".gjs-toolbar .fa-arrows.gjs-toolbar-item\").hide();\n }\n if (! component.attributes.removable && ! component.attributes.copyable && ! component.attributes.draggable) {\n window.editor.select(component.parent());\n }\n\n let blockSlug = component.attributes['block-slug'];\n if (blockSlug) {\n let labelHtml = window.themeBlocks[blockSlug]['label'];\n let labelTextParts = labelHtml.split(\"\");\n if (labelTextParts.length > 1) {\n $(\".gjs-toolbar\").attr('title', \"Bloknaam: \" + labelTextParts[1]);\n }\n }\n }, 0);\n });\n\n\n /**\n * Component clone handler.\n */\n window.editor.on('component:clone', function(component) {\n // if the clone is performed by the user, do not copy the block id and style identifier\n if (! isCloningFromScript) {\n let originalComponent = window.editor.getWrapper().find('.' + component.attributes['style-identifier'])[0];\n\n if (component.attributes['style-identifier'] !== undefined && component.attributes['style-identifier'] !== '') {\n component.removeClass(component.attributes['style-identifier']);\n delete component.attributes['style-identifier'];\n addUniqueClass(component);\n }\n component.attributes['block-id'] = component.attributes['block-slug'];\n\n // pass a reference of the scripts of the original component to run on the cloned component\n if (originalComponent && window.customBuilderScripts[originalComponent.attributes['block-id']] !== undefined) {\n component.attributes['run-builder-script'] = originalComponent.attributes['block-id'];\n }\n }\n });\n\n\n /**\n * Return whether the given component contains a CSS background, that should be editable.\n *\n * @param component\n * @returns {boolean}\n */\n function componentHasBackground(component) {\n let hasBackground = false;\n\n let componentElement = component.getEl();\n if (componentElement && componentElement.style) {\n let componentStyle = window.getComputedStyle(componentElement);\n\n ['background', 'background-image', 'background-color'].forEach(property => {\n let value = componentStyle.getPropertyValue(property);\n if (value !== undefined && value !== '' && ! value.includes('none') && ! value.includes('rgba(0, 0, 0, 0)')) {\n hasBackground = true;\n }\n });\n }\n\n return hasBackground;\n }\n\n /**\n * Return whether the given component has settings defined in its block config file.\n *\n * @param component\n * @returns {boolean}\n */\n function componentHasBlockSettings(component) {\n return component.attributes.traits.length > 0;\n }\n\n /**\n * On dropping a component on the canvas, apply attributes of the container phpb-block element with configuration passed\n * from the server and restrict edit access to editable components.\n */\n window.editor.on('block:drag:stop', function(droppedComponent) {\n // ensure component drop was successful\n if (! droppedComponent || ! droppedComponent.attributes || ! droppedComponent.attributes.attributes) return;\n\n let draggedBlockId = generateId();\n droppedComponent.attributes.attributes['dropped-component-id'] = draggedBlockId;\n\n let parent = droppedComponent.parent();\n applyBlockAttributesToComponents(droppedComponent);\n\n // at this point droppedComponent is replaced in the DOM by the actual component (without the phpb-block element),\n // so we need to find the dropped component again in the context of its parent\n parent.components().each(function(child) {\n if (child.attributes['dropped-component-id'] === draggedBlockId) {\n delete child.attributes['dropped-component-id'];\n droppedComponent = child;\n }\n });\n restrictEditAccess(droppedComponent);\n\n window.runScriptsOfComponentAndChildren(droppedComponent);\n });\n\n /**\n * Apply the block attributes which are stored in elements to the top-level html element inside the block.\n * If the block starts with multiple top-level html elements, add a div element wrapping the block's top-level elements.\n *\n * @param component\n */\n function applyBlockAttributesToComponents(component) {\n if (component.attributes.tagName === 'phpb-block') {\n let container = component.parent();\n let clone = cloneComponent(component);\n\n // since component is a that should be removed and replaced by its children,\n // the component's parent's child that has the id of the component needs to be replaced\n let blockRootComponent;\n if (component.attributes.attributes['is-html'] === 'false') {\n container.components().each(function(componentSibling) {\n if (componentSibling.cid === component.cid) {\n // replace the by the actual component\n // the component is wrapped with a wrapper element to allow block styling (via a unique .style-identifier selector)\n let wrapperElement = ('wrapper' in component.attributes.attributes) ? component.attributes.attributes['wrapper'] : 'div';\n blockRootComponent = component.replaceWith({tagName: wrapperElement});\n blockRootComponent.attributes['is-style-wrapper'] = true;\n clone.components().each(function(componentChild) {\n blockRootComponent.append(cloneComponent(componentChild));\n });\n }\n });\n } else {\n container.components().each(function(componentSibling) {\n if (componentSibling.cid === component.cid) {\n // if the has one direct child, replace it by its only child\n // else, replace it by a wrapper div to allow block styling (via a unique .style-identifier selector)\n if (clone.components().length === 1) {\n let firstChild = cloneComponent(clone.components().models[0]);\n blockRootComponent = component.replaceWith(firstChild);\n } else {\n blockRootComponent = component.replaceWith({tagName: 'div'});\n blockRootComponent.attributes['is-style-wrapper'] = true;\n clone.components().each(function(componentChild) {\n blockRootComponent.append(cloneComponent(componentChild));\n });\n }\n }\n });\n }\n component.remove();\n\n copyAttributes(clone, blockRootComponent, true, false);\n // add all settings of this component to the settings panel in the sidebar\n addSettingsToSidebar(blockRootComponent);\n // recursive call to find and replace elements of nested blocks (loaded via shortcodes)\n applyBlockAttributesToComponents(blockRootComponent);\n } else {\n component.components().each(function(childComponent) {\n // recursive call to find and replace elements of nested blocks (loaded via shortcodes)\n applyBlockAttributesToComponents(childComponent);\n });\n }\n }\n\n /**\n * Get the current setting values for the given component.\n *\n * @param component\n */\n function getCurrentSettingValues(component) {\n // Block settings are stored in window.pageBlocks in a structure starting with each root block (the first ancestor that does not have a dynamic parent itself).\n // So, we need to find the root of the given component and store all block ids along the way, in order to traverse the pageBlocks structure to the settings of the given component.\n // These block ids are only unique in the context of their parent (we can have multiple instances of the same nested block structure), so we call them relative IDs.\n let relativeIds = [];\n\n // get the root component of the given component (its first ancestor that does not have a dynamic parent itself or the block that is inside a blocks container)\n let rootComponent = component;\n let hasDynamicAncestor = false;\n while (rootComponent.parent() &&\n rootComponent.parent().attributes.attributes['phpb-blocks-container'] === undefined &&\n rootComponent.parent().attributes['is-html'] !== 'true' &&\n rootComponent.parent().attributes.attributes['phpb-content-container'] === undefined\n ) {\n if (rootComponent.parent().attributes['is-html'] === 'false') {\n hasDynamicAncestor = true;\n }\n if (rootComponent.attributes['block-id'] !== undefined) {\n relativeIds.push(rootComponent.attributes['block-id']);\n }\n rootComponent = rootComponent.parent();\n }\n\n let rootId = component.attributes['block-id'];\n if (hasDynamicAncestor) {\n rootId = rootComponent.attributes['block-id'];\n } else {\n relativeIds = [];\n }\n\n // get the component settings by traversing the pageBlocks structure\n let settings = window.pageBlocks[window.currentLanguage][rootId];\n relativeIds.reverse().forEach(function(relativeId) {\n if (settings === undefined || settings.blocks === undefined || settings.blocks[relativeId] === undefined) {\n settings = {};\n } else {\n settings = settings.blocks[relativeId];\n }\n });\n\n // return the values stored in the current component's settings structure\n let settingsValues = {};\n if (settings !== undefined && settings.settings !== undefined && settings.settings.attributes !== undefined) {\n settingsValues = settings.settings.attributes;\n }\n return settingsValues;\n }\n\n /**\n * Add all settings from the block's config file to the given component,\n * to allow them to be changed in the settings side panel.\n *\n * @param component\n */\n function addSettingsToSidebar(component) {\n if (window.blockSettings[component.attributes['block-slug']] === undefined) {\n return;\n }\n component.attributes.settings = {};\n\n let settingValues = getCurrentSettingValues(component);\n\n // set style identifier class to the block wrapper, if an identifier has been stored during earlier getDataInStorageFormat calls\n if (settingValues['style-identifier'] !== undefined) {\n component.addClass(settingValues['style-identifier']);\n }\n\n // for each setting add a trait to the settings sidebar panel with the earlier stored or default value\n component.attributes['is-updating'] = true;\n let settings = window.blockSettings[component.attributes['block-slug']];\n settings.forEach(function(setting) {\n let trait = component.addTrait(setting);\n if (settingValues[setting['name']] !== undefined) {\n trait[0].setTargetValue(settingValues[setting['name']]);\n } else if (setting['default-value'] !== undefined) {\n trait[0].setTargetValue(setting['default-value']);\n }\n });\n component.attributes['is-updating'] = false;\n }\n\n /**\n * On updating an attribute (block setting from the settings side panel), refresh dynamic block via Ajax.\n */\n window.editor.on('component:update', function(component) {\n if (window.isLoaded !== true ||\n component.attributes['block-slug'] === undefined ||\n component.attributes['is-updating'] ||\n component.changed['attributes'] === undefined ||\n $(\".gjs-frame\").contents().find(\"#\" + component.ccid).length === 0\n ) {\n return;\n }\n // dynamic pagebuilder blocks can depend on data passed by dynamic parent blocks,\n // so we need to update the closest parent which does not have a dynamic parent itself or the block that is inside a blocks container.\n // also keep track of all intermediate block ids, for re-selecting the currently selected component.\n let relativeIds = [];\n let ancestorToUpdate = component;\n let hasDynamicAncestor = false;\n while (ancestorToUpdate.parent() &&\n ancestorToUpdate.parent().attributes.attributes['phpb-blocks-container'] === undefined &&\n ancestorToUpdate.parent().attributes['is-html'] !== 'true' &&\n ancestorToUpdate.parent().attributes.attributes['phpb-content-container'] === undefined\n ) {\n if (ancestorToUpdate.parent().attributes['is-html'] === 'false') {\n hasDynamicAncestor = true;\n }\n if (ancestorToUpdate.attributes['block-id'] !== undefined) {\n relativeIds.push(ancestorToUpdate.attributes['block-id']);\n }\n ancestorToUpdate = ancestorToUpdate.parent();\n }\n\n if (hasDynamicAncestor) {\n component = ancestorToUpdate;\n } else {\n relativeIds = [];\n }\n\n component.attributes['is-updating'] = true;\n $(\".gjs-frame\").contents().find(\"#\" + component.ccid).addClass('gjs-freezed');\n\n let container = window.editor.getWrapper().find(\"#\" + component.ccid)[0].parent();\n let data = window.getComponentDataInStorageFormat(component);\n // refresh component contents with updated version requested via ajax call\n $.ajax({\n type: \"POST\",\n url: window.renderBlockUrl,\n data: {\n data: JSON.stringify(data),\n language: window.currentLanguage\n },\n success: function(blockHtml) {\n let blockId = $(blockHtml).attr('block-id');\n\n // set the block settings for the updated component to the new values\n window.pageBlocks[window.currentLanguage][blockId] = (data.blocks[blockId] === undefined) ? {} : data.blocks[blockId];\n\n // replace old component for the rendered html returned by the server\n component.replaceWith(blockHtml);\n replacePlaceholdersForRenderedBlocks(container);\n applyBlockAttributesToComponents(container);\n restrictEditAccess(container, false, false);\n\n // run builder scripts of the replaced component and all its children\n let replacedComponent = findChildViaBlockIdsPath(container, [blockId]);\n runScriptsOfComponentAndChildren(replacedComponent);\n\n // select the component that was selected before the ajax call\n relativeIds.push(blockId);\n let componentToSelect = findChildViaBlockIdsPath(container, relativeIds.reverse());\n window.editor.select(componentToSelect);\n },\n error: function() {\n $(\".gjs-frame\").contents().find(\"#\" + component.ccid).removeClass('gjs-freezed');\n component.attributes['is-updating'] = false;\n window.toastr.error(window.translations['toastr-component-update-failed']);\n }\n });\n });\n\n /**\n * Traverse the children of the given component via the given path of block IDs\n * and return the component with the last ID from the list.\n *\n * @param component\n * @param blockIds\n * @returns {null|*}\n */\n function findChildViaBlockIdsPath(component, blockIds) {\n // foobar\n if (blockIds.length === 0) {\n return component;\n }\n\n let result = null;\n\n component.forEachChild(function(child) {\n if (child.attributes['block-id'] === blockIds[0]) {\n result = findChildViaBlockIdsPath(child, blockIds.slice(1));\n return false;\n }\n });\n\n component.forEachChild(function(child) {\n let childResult = findChildViaBlockIdsPath(child, blockIds);\n if (childResult !== null) {\n result = childResult;\n return false;\n }\n });\n\n return result;\n }\n\n /**\n * Clone the given component (while preserving all attributes, like IDs).\n *\n * @param component\n */\n let isCloningFromScript = false;\n window.cloneComponent = function(component) {\n isCloningFromScript = true;\n\n let clone = component.clone();\n deepCopyAttributes(component, clone);\n\n isCloningFromScript = false;\n return clone;\n };\n\n /**\n * Apply the attributes of the given component and its children to each corresponding component of the given clone.\n *\n * @param component\n * @param clone\n */\n function deepCopyAttributes(component, clone) {\n // apply all attributes from component to clone\n copyAttributes(component, clone, false, true);\n // apply attributes from component's children to clone's children\n for (let index = 0; index < component.components().length; index++) {\n let componentChild = component.components().models[index];\n let cloneChild = clone.components().models[index];\n deepCopyAttributes(componentChild, cloneChild);\n }\n }\n\n /**\n * Apply the attributes of the given component to the given target component.\n *\n * @param component\n * @param targetComponent\n * @param copyGrapesAttributes whether all GrapesJS component attributes (like permissions) should be copied\n * @param copyHtmlElementAttributes whether the html element attributes should be copied\n */\n function copyAttributes(component, targetComponent, copyGrapesAttributes, copyHtmlElementAttributes) {\n let componentAttributes = component.attributes.attributes;\n for (let attribute in componentAttributes) {\n if (copyHtmlElementAttributes) {\n targetComponent.attributes.attributes[attribute] = componentAttributes[attribute];\n }\n if (copyGrapesAttributes) {\n targetComponent.attributes[attribute] = componentAttributes[attribute];\n }\n }\n }\n\n /**\n * Function for only allowing edit access on whitelisted components.\n *\n * @param component\n * @param directlyInsideDynamicBlock\n * @param allowEditableComponents\n */\n function restrictEditAccess(component, directlyInsideDynamicBlock = false, allowEditableComponents = true) {\n disableAllEditFunctionality(component);\n\n if (component.attributes.attributes['phpb-content-container'] !== undefined) {\n // the content container of the current page can receive other components\n component.set({\n droppable: true,\n hoverable: true,\n });\n } else if (component.attributes['block-slug'] !== undefined) {\n // change visibility of child elements that depend on whether this block is editable\n component.find('[phpb-hide-if-not-editable]').forEach((element) => {\n if (allowEditableComponents || window.afterInitialRendering) {\n element.addClass('editable');\n } else {\n element.removeClass('editable');\n }\n });\n\n // we just entered a new block, set default permissions\n let permissions = {\n selectable: true,\n hoverable: true,\n };\n if (! directlyInsideDynamicBlock) {\n // the block we entered is not located directly inside a dynamic block, hence this block can be removed, dragged, configured and styled\n permissions = {\n removable: true,\n draggable: true,\n copyable: true,\n selectable: true,\n hoverable: true,\n stylable: true,\n };\n // for styling this particular block, the block needs to have a unique class\n addUniqueClass(component);\n }\n if (component.attributes['is-html'] === 'true') {\n // the block we just entered is an html block,\n // the next layer of child blocks are not directly inside a dynamic block\n directlyInsideDynamicBlock = false;\n // in an html block, editing elements (based on their html tag) is allowed\n allowEditableComponents = true;\n } else {\n // the block we just entered is dynamic,\n // the next layer of child blocks are directly inside a dynamic block\n directlyInsideDynamicBlock = true;\n // in a dynamic block, editing elements (based on their html tag) is not allowed\n allowEditableComponents = false;\n // dynamic blocks do not have text-editable components, so remove text cursors\n component.getEl().setAttribute('data-cursor', 'default');\n }\n component.set(permissions);\n }\n\n // for raw content components, set editable to true and ignore processing editability for any child component\n if (component.attributes.attributes['data-raw-content'] !== undefined) {\n component.set({editable: true});\n return;\n }\n\n // set editable access based on tags, styling or html class attribute\n if (allowEditableComponents) {\n allowEditBasedOnComponentAttributes(component);\n\n // if the component is made text-editable, re-add the raw html contents\n // to ensure the text editor does not deal with elements with attributes added by GrapesJS\n if (component.attributes['made-text-editable'] === 'true') {\n component.attributes.attributes['data-raw-content'] = 'true';\n\n // refresh the current component in order to switch its component type to raw-content.\n // this disables GrapesJS parsing of any child elements, avoiding that any GrapesJS specific html attributes are added\n let newComponent = component.replaceWith(component.toHTML());\n // copy important attributes from the original component to the refreshed component\n ['block-id', 'block-slug', 'is-html', 'style-identifier'].forEach(attribute => {\n newComponent.attributes[attribute] = component.attributes[attribute];\n });\n // apply block/component edit restrictions to the new raw-content type version of the component\n restrictEditAccess(newComponent);\n return;\n }\n }\n\n // apply edit restrictions to child components\n component.get('components').each(component => restrictEditAccess(component, directlyInsideDynamicBlock, allowEditableComponents));\n }\n\n /**\n * Set the given component's editability based on which tag the component represents,\n * which attributes are set or which styling is applied.\n *\n * @param component\n * @returns {boolean}\n */\n function allowEditBasedOnComponentAttributes(component) {\n let htmlTag = component.get('tagName');\n\n let textEditableTags = [\n //'div','span', // needed for editable bootstrap alert, but cannot be used since divs (block containers) then cannot be removed\n 'h1','h2','h3','h4','h5','h6','h7',\n 'p','small','b','strong','i','em','label','button',\n 'ol', 'ul','li','table'\n ];\n let otherEditableTags = [\n 'img'\n ];\n\n let settings = {};\n if ('phpb-blocks-container' in component.attributes.attributes) {\n settings.hoverable = true;\n settings.selectable = true;\n settings.droppable = true;\n }\n\n if (textEditableTags.includes(htmlTag) || 'phpb-editable' in component.attributes.attributes) {\n settings.editable = true;\n component.attributes['made-text-editable'] = 'true';\n } else if (otherEditableTags.includes(htmlTag)) {\n settings.editable = true;\n }\n\n if (componentHasBackground(component)) {\n settings.hoverable = true;\n settings.selectable = true;\n settings.stylable = true;\n }\n\n if (htmlTag === 'a') {\n settings.hoverable = true;\n settings.selectable = true;\n settings.stylable = true;\n settings.removable = true;\n }\n\n if (! $.isEmptyObject(settings)) {\n component.set(settings);\n if (settings.stylable !== undefined && settings.stylable) {\n addUniqueClass(component);\n }\n }\n }\n\n /**\n * Add a unique class to this component to ensure style only applies to this component instance.\n *\n * @param component\n */\n function addUniqueClass(component) {\n // get component identifier class if one is already added to the component's html when saving the pagebuilder previously\n let componentIdentifier = false;\n component.getClasses().forEach(componentClass => {\n if (componentClass.startsWith('ID') && componentClass.length >= 16) {\n componentIdentifier = componentClass;\n }\n });\n\n if (component.attributes['style-identifier'] === undefined) {\n component.attributes['style-identifier'] = componentIdentifier ? componentIdentifier : generateId();\n }\n component.addClass(component.attributes['style-identifier']);\n }\n\n /**\n * Disable all edit functionality on the given component.\n *\n * @param component\n */\n function disableAllEditFunctionality(component) {\n component.set({\n removable: false,\n draggable: false,\n droppable: false,\n badgable: false,\n stylable: false,\n highlightable: false,\n copyable: false,\n resizable: false,\n editable: false,\n layerable: false,\n selectable: false,\n hoverable: false\n });\n }\n\n /**\n * Generate a unique id string.\n *\n * Based on: https://gist.github.com/gordonbrander/2230317\n */\n let counter = 0;\n function generateId() {\n return 'ID' + (Date.now().toString(36)\n + Math.random().toString(36).substr(2, 5) + counter++).toUpperCase();\n }\n\n /**\n * Wait for GrapesJS to be fully loaded before trying to load the components in the page builder.\n */\n function waitForGrapesToLoad() {\n if (window.grapesJSLoaded) {\n afterGrapesJSLoaded();\n } else {\n setTimeout(waitForGrapesToLoad, 100);\n }\n }\n waitForGrapesToLoad();\n\n\n","\n\n window.pageData = {};\n\n window.changesOffset = 0;\n window.onbeforeunload = confirmExit;\n function confirmExit() {\n let changesCount = window.editor.getModel().get('changesCount') - window.changesOffset;\n if (changesCount > 0) {\n return \"Are you sure? There are unsaved changes.\";\n }\n }\n\n /**\n * Save page on clicking save button.\n */\n $(\"#save-page\").click(function() {\n saveAllTranslationsToServer();\n });\n\n /**\n * Save page on Ctrl + S.\n */\n $(document).bind(\"keydown\", function(e){\n if(e.ctrlKey && e.which === 83) {\n // text-editor updates are not applied until focus is lost, so force GrapesJS update\n window.editor.store();\n\n saveAllTranslationsToServer();\n e.preventDefault();\n return false;\n }\n });\n\n /**\n * Switch the pagebuilder to the given language.\n * This stores the all data of the current language locally for later use and renders the given language variant on the server.\n *\n * @param newLanguage\n * @param callback\n */\n window.switchLanguage = function(newLanguage, callback) {\n window.setWaiting(true);\n\n saveCurrentTranslationLocally(function() {\n applyChangesFromCurrentLanguageToNewLanguage(newLanguage);\n\n let data = window.pageData;\n data.blocks = {[newLanguage]: window.pageBlocks[newLanguage]};\n\n // render the language variant server-side\n $.ajax({\n type: \"POST\",\n url: window.renderLanguageVariantUrl,\n data: {\n data: JSON.stringify(data),\n language: newLanguage\n },\n success: function(response) {\n response = JSON.parse(response);\n window.pageBlocks[newLanguage] = response.dynamicBlocks ? response.dynamicBlocks : {};\n callback();\n window.setWaiting(false);\n },\n error: function(error) {\n callback();\n console.log(error);\n let errorMessage = error.statusText + ' ' + error.status;\n errorMessage = error.responseJSON.message ? (errorMessage + ': \"' + error.responseJSON.message + '\"') : errorMessage;\n window.toastr.error(errorMessage);\n window.toastr.error(window.translations['toastr-switching-language-failed']);\n }\n });\n });\n };\n\n /**\n * Copy new blocks of the current language to the new language or remove old blocks from the new language.\n *\n * @param newLanguage\n */\n function applyChangesFromCurrentLanguageToNewLanguage(newLanguage) {\n let newLanguageBlocks = window.pageBlocks[newLanguage];\n let currentLanguageBlocks = window.pageBlocks[window.currentLanguage];\n\n if (newLanguageBlocks === undefined) {\n newLanguageBlocks = currentLanguageBlocks;\n } else {\n updateNestedBlocks(currentLanguageBlocks, newLanguageBlocks);\n\n // copy missing blocks from the current language to the target language\n for (let blockId in currentLanguageBlocks) {\n if (newLanguageBlocks[blockId] === undefined) {\n newLanguageBlocks[blockId] = currentLanguageBlocks[blockId];\n }\n }\n }\n\n // copy the content of blocks containers of the current language to the blocks containers of the new language\n for (let blockId in currentLanguageBlocks) {\n let $currentLanguageBlockHtmlDom = $(\"\" + currentLanguageBlocks[blockId]['html'] + \"\");\n let $newLanguageBlockHtmlDom = $(\"\" + newLanguageBlocks[blockId]['html'] + \"\");\n $currentLanguageBlockHtmlDom.find(\"[phpb-blocks-container]\").each(function(index) {\n let currentLanguageBlockContainerHtml = $(this).html();\n $newLanguageBlockHtmlDom.find(\"[phpb-blocks-container]\").eq(index).html(currentLanguageBlockContainerHtml);\n });\n newLanguageBlocks[blockId]['html'] = $newLanguageBlockHtmlDom.html();\n }\n\n window.pageBlocks[newLanguage] = newLanguageBlocks;\n }\n\n /**\n * Replace phpb-blocks-container html snippets if a block of the current language already exists in the target language.\n * This ensures all child blocks are present for all languages and they remain in the same order\n */\n function updateNestedBlocks(currentLanguageBlocks, newLanguageBlocks) {\n for (let blockId in currentLanguageBlocks) {\n // skip if the parent block does not yet exist in the target language\n if (newLanguageBlocks[blockId] === undefined) {\n continue;\n }\n\n for (let subBlockId in currentLanguageBlocks[blockId].blocks) {\n let updatedSubBlock = currentLanguageBlocks[blockId].blocks[subBlockId];\n let oldSubBlock = newLanguageBlocks[blockId].blocks[subBlockId];\n if (! updatedSubBlock || ! oldSubBlock) {\n continue;\n }\n\n let updatedSubBlockMatches = updatedSubBlock.html.match(/phpb-blocks-container(.*)>(.*)(.*) {\n let data = getContainerContentInStorageFormat(container);\n\n window.pageData['css'] = mergeCss(existingCss, data.css);\n window.pageData['style'] = data.style;\n window.pageData['html'][index] = data.html;\n window.pageData['components'][index] = data.components;\n\n window.pageBlocks[window.currentLanguage] = {...window.pageBlocks[window.currentLanguage], ...data.blocks};\n window.contentContainerComponents[index] = data.components;\n });\n\n if (callback) {\n callback();\n }\n }, 200);\n }\n\n /**\n * Add all selectors from existingCss that are missing in newCss.\n * Backwards compatibility fix: losing CSS due to having different block style identifiers for different languages.\n */\n function mergeCss(existingCss, newCss) {\n if (! existingCss) {\n return newCss;\n }\n let pageBlocksString = JSON.stringify(window.pageBlocks);\n let regex = \"\\\\.ID(.*?){(.*?)}\"\n let matches = existingCss.match(new RegExp(regex, 'g'));\n if (! matches) {\n return newCss;\n }\n matches.forEach(function(css) {\n let selector = css.split('{')[0];\n let pageBlocksStringSelector = selector.replace('.', ' ').trim();\n if (newCss.indexOf(selector) === -1 && pageBlocksString.indexOf(pageBlocksStringSelector) >= 0) {\n newCss += css;\n }\n });\n return newCss;\n }\n\n /**\n * Remove the style selectors that are no longer present among the current page blocks.\n */\n function removeOldStyleSelectors(styleComponents) {\n let pageBlocksString = JSON.stringify(window.pageBlocks);\n\n let updatedStyleComponents = [];\n styleComponents.forEach(styleComponent => {\n if (styleComponent.attributes.selectors.models.length) {\n let selector = styleComponent.attributes.selectors.models[0].id;\n if (pageBlocksString.includes(selector)) {\n updatedStyleComponents.push(styleComponent);\n }\n }\n });\n return updatedStyleComponents;\n }\n\n /**\n * Save the data of all translation variants on the server.\n */\n function saveAllTranslationsToServer() {\n toggleSaving();\n\n saveCurrentTranslationLocally(function() {\n\n // update all language variants with the latest data of the current language we just saved locally\n $.each(window.languages, (languageCode, languageTranslation) => {\n if (languageCode !== window.currentLanguage) {\n applyChangesFromCurrentLanguageToNewLanguage(languageCode);\n }\n });\n\n let data = window.pageData;\n data.style = removeOldStyleSelectors(data.style);\n data.blocks = window.pageBlocks;\n\n $.ajax({\n type: \"POST\",\n url: $(\"#save-page\").data('url'),\n data: {\n data: JSON.stringify(data)\n },\n success: function() {\n toggleSaving();\n window.toastr.success(window.translations['toastr-changes-saved']);\n\n setTimeout(function() {\n window.changesOffset = window.editor.getModel().get('changesCount');\n }, 250);\n },\n error: function(error) {\n toggleSaving();\n console.log(error);\n let errorMessage = error.statusText + ' ' + error.status;\n errorMessage = error.responseJSON.message ? (errorMessage + ': \"' + error.responseJSON.message + '\"') : errorMessage;\n window.toastr.error(errorMessage);\n window.toastr.error(window.translations['toastr-saving-failed']);\n }\n });\n });\n }\n\n /**\n * Get the given component in storage format (in context of its container with all siblings removed).\n *\n * @param component\n */\n window.getComponentDataInStorageFormat = function(component) {\n // clone component's parent, enabling us to temporarily remove all component's siblings without updating the pagebuilder\n let container = window.cloneComponent(component.parent());\n\n\n console.log({\n container: container,\n componentParent: component.parent(),\n })\n // remove all component's siblings since we only want to return the given component in storage format\n\n // container.get('components').reset();\n // container.append(component);\n const componentId = component.attributes['block-id']\n console.log(component.attributes['block-id'])\n container.components().forEach(c => {\n console.log({c})\n // console.log(c?.attributes['block-id'])\n // console.log(c?.attributes['block-id'] !== componentId)\n if(c?.attributes['block-id'] !== componentId) {\n c?.remove()\n }\n })\n\n console.log({\n containerL: container.get('components').length,\n componentParentL: component.parent().get('components').length,\n })\n return getContainerContentInStorageFormat(container);\n };\n\n /**\n * Get the given container in storage format.\n *\n * @param container\n */\n function getContainerContentInStorageFormat(container) {\n // remove all existing references while cloning GrapesJS components,\n // this prevents GrapesJS from changing our IDs due to ID collisions\n let componentReferences = window.editor.DomComponents.componentsById;\n window.editor.DomComponents.componentsById = [];\n\n // we need to clone the container, since we will be replacing components with placeholders and we don't want to update the page builder\n container = window.cloneComponent(container);\n // replace each pagebuilder block for a shortcode and phpb-block element and return an array of all page blocks data\n let blocksData = replaceDynamicBlocksWithPlaceholders(container).blocks;\n\n let html = window.html_beautify(getContainerHtml(container));\n let css = window.editor.getCss();\n let style = window.editor.getStyle();\n let components = JSON.parse(JSON.stringify(container.get('components')));\n\n // switch back to original GrapesJS component references\n window.editor.DomComponents.componentsById = componentReferences;\n\n return {\n html: html,\n css: css,\n components: components,\n blocks: blocksData,\n style: style,\n }\n }\n\n /**\n * Return the html representation of the contents of the given container.\n *\n * @param container\n */\n function getContainerHtml(container) {\n let html = '';\n container.get('components').forEach(component => html += component.toHTML());\n let htmlDom = $(\"\" + html + \"\");\n // replace phpb-block elements with shortcode\n htmlDom.find('phpb-block').each(function() {\n $(this).replaceWith('[block slug=\"' + $(this).attr('slug') + '\" id=\"' + $(this).attr('id') + '\"]');\n });\n return htmlDom.html();\n }\n\n /**\n * Return the html representation of the given component.\n *\n * @param component\n */\n function getComponentHtml(component) {\n let htmlDom = $(\"\" + component.toHTML() + \"\");\n // replace phpb-block elements with shortcode\n htmlDom.find('phpb-block').each(function() {\n $(this).replaceWith('[block slug=\"' + $(this).attr('slug') + '\" id=\"' + $(this).attr('id') + '\"]');\n });\n return htmlDom.html();\n }\n\n /**\n * Replace all blocks with is-html === false with a component that contains all block attributes.\n *\n * @param component\n * @param parentIsDynamic\n * @param parentIsHtmlInsideDynamic\n */\n function replaceDynamicBlocksWithPlaceholders(component, parentIsDynamic = false, parentIsHtmlInsideDynamic = false) {\n // data structure to be filled with the data of nested blocks via recursive calls\n let data = {\n current_block: {settings: {}, blocks: {}, html: \"\", is_html: false},\n blocks: {}\n };\n\n // update variables for passing context to the recursive calls on child components\n let newParentIsDynamic = parentIsDynamic;\n let newParentIsHtmlInsideDynamic = parentIsHtmlInsideDynamic;\n if (component.attributes['block-id'] !== undefined) {\n if (component.attributes['is-html'] === 'false') {\n newParentIsDynamic = true;\n newParentIsHtmlInsideDynamic = false;\n } else if (parentIsDynamic) {\n newParentIsDynamic = false;\n newParentIsHtmlInsideDynamic = true;\n }\n }\n\n // depth-first recursive call for replacing nested blocks (the deepest blocks are handled first)\n component.get('components').forEach(function(childComponent) {\n let childData = replaceDynamicBlocksWithPlaceholders(childComponent, newParentIsDynamic, newParentIsHtmlInsideDynamic);\n\n // update data object with child data\n for (let key in childData.current_block.blocks) { data.current_block.blocks[key] = childData.current_block.blocks[key]; }\n for (let key in childData.blocks) { data.blocks[key] = childData.blocks[key]; }\n });\n\n // if the method is called with a cloned container (which does not have a parent), this top-level component does not need any changes\n if (! component.parent()) {\n return data;\n }\n\n // if the component is not a block, no replacements need to be done\n if (component.attributes['block-id'] === undefined) {\n return data;\n }\n\n // do the actual replacement of this component with a placeholder component\n if (component.attributes['is-html'] === 'true') {\n if (parentIsDynamic) {\n // the full html content of html blocks directly inside a dynamic block should be stored in parent context using its block-id,\n // this is important because a dynamic block defines block ids and this can collide with block ids hardcoded in other dynamic blocks\n data.current_block['blocks'][component.attributes['block-id']] = {settings: {}, blocks: {}, html: window.html_beautify(getComponentHtml(component)), is_html: true};\n } else {\n // html blocks outside direct context of dynamic blocks should be stored as a block itself\n\n // store the block's style-identifier\n // this will be used as class in a wrapper around the dynamic block to give the block its styling\n if (component.attributes['style-identifier'] !== undefined) {\n data.current_block['settings']['attributes'] = {'style-identifier': component.attributes['style-identifier']};\n }\n\n // replace this html component by a shortcode with a unique id\n let instanceId = component.attributes['block-id'];\n if (! component.attributes['block-id'].startsWith('ID')) {\n instanceId = generateId();\n }\n\n component.replaceWith({\n tagName: 'phpb-block',\n attributes: {\n slug: component.attributes['block-slug'],\n id: instanceId\n }\n });\n\n // store the block data globally in the blocks array\n data.blocks[instanceId] = {settings: data.current_block['settings'], blocks: {}, html: window.html_beautify(getComponentHtml(component)), is_html: true};\n data.current_block = {settings: {}, blocks: {}, html: \"\", is_html: false};\n }\n } else {\n // store the attributes set to this block using traits in the settings side panel\n let attributes = {};\n component.get('traits').each(function(trait) {\n attributes[trait.get('name')] = trait.getTargetValue();\n });\n data.current_block['settings']['attributes'] = attributes;\n\n // store the block's style-identifier\n // this will be used as class in a wrapper around the dynamic block to give the block its styling\n if (component.attributes['style-identifier'] !== undefined) {\n data.current_block['settings']['attributes']['style-identifier'] = component.attributes['style-identifier'];\n }\n\n // replace this dynamic component by a shortcode with a unique id\n let instanceId = component.attributes['block-id'];\n if (! component.attributes['block-id'].startsWith('ID')) {\n instanceId = generateId();\n }\n component.replaceWith({\n tagName: 'phpb-block',\n attributes: {\n slug: component.attributes['block-slug'],\n id: instanceId\n }\n });\n\n // store data.current_block data inside data.blocks with the unique id we just generated\n if (parentIsDynamic) {\n // inside a dynamic block, the block data is passed to the context of its parent block (so current_block is used)\n let currentBlockForParent = {settings: {}, blocks: {}, html: \"\", is_html: false};\n currentBlockForParent['blocks'][component.attributes['block-id']] = data.current_block;\n data.current_block = currentBlockForParent;\n } else {\n // outside dynamic blocks, the block data is globally stored in the blocks array\n data.blocks[instanceId] = data.current_block;\n data.current_block = {settings: {}, blocks: {}, html: \"\", is_html: false};\n }\n }\n\n return data;\n }\n\n /**\n * Generate a unique id string.\n *\n * Based on: https://gist.github.com/gordonbrander/2230317\n */\n let counter = 0;\n function generateId() {\n return 'ID' + (Date.now().toString(36)\n + Math.random().toString(36).substr(2, 5) + counter++).toUpperCase();\n }\n\n /**\n * Set the page builder waiting status.\n */\n window.setWaiting = function(value) {\n let wrapper = window.editor.DomComponents.getWrapper();\n if (value) {\n wrapper.addClass(\"gjs-waiting\");\n } else {\n wrapper.removeClass(\"gjs-waiting\");\n }\n };\n\n /**\n * Toggle the save button waiting status.\n */\n function toggleSaving() {\n let button = $(\"#save-page\");\n button.blur();\n\n if (button.hasClass('waiting')) {\n button.attr(\"disabled\", false);\n button.removeClass('waiting');\n button.find('.spinner-border').addClass('d-none');\n } else {\n button.attr(\"disabled\", true);\n button.addClass('waiting');\n button.find('.spinner-border').removeClass('d-none');\n }\n }\n\n\n","\n\n window.CKEDITOR.on('instanceReady', function (event) {\n event.editor.on('paste', function (event) {\n let result = event.data.dataValue;\n\n // remove all not allowed tags\n result = result.replace(/<(?!\\/?(?:a|table|tr|td|th|thead|tbody|tfoot|caption|col|colgroup|p|ul|ol|li|br|strong|em|b|i|u|strike|sub|sup|h1|h2|h3|h4|h5|h6|blockquote|pre|hr)\\b)[^>]+>/gm, '');\n\n // remove all attributes of the allowed tags except from anchor\n result = result.replace(/<(a|table|tr|td|th|thead|tbody|tfoot|caption|col|colgroup|p|ul|ol|li|br|strong|em|b|i|u|strike|sub|sup|h1|h2|h3|h4|h5|h6|blockquote|pre|hr)\\b[^>]*>/gm, function(match, tag) {\n // for anchor tags remove all attributes except href\n if (tag === 'a') {\n let href = match.match(/href=\"([^\"]*)\"/);\n if (! href) {\n return match;\n }\n return '';\n }\n\n // allow styling on some tags\n if ('|table|tr|td|th|thead|tbody|tfoot|'.includes('|' + tag + '|')) {\n let style = match.match(/style=\"([^\"]*)\"/);\n if (! style) {\n return match;\n }\n return '<' + tag + ' style=\"' + style[1] + '\">';\n }\n\n return '<' + tag + '>';\n });\n\n event.data.dataValue = result;\n });\n });\n\n window.CKEDITOR.on('dialogDefinition', function(event) {\n let dialogName = event.data.name;\n let dialogDefinition = event.data.definition;\n if (dialogName === 'link') {\n let infoTab = dialogDefinition.getContents('info');\n\n dialogDefinition.onLoad = function() {\n let dialog = CKEDITOR.dialog.getCurrent();\n dialog.getContentElement('info', 'linkType').getElement().hide();\n dialog.getContentElement('info', 'protocol').getElement().hide();\n dialog.getContentElement('info', 'url').getElement().hide();\n };\n\n infoTab.add({\n type: 'select',\n id: 'linktype-selector',\n label: 'Linktype',\n 'default': '',\n items: [\n [window.translations['page'], \"page\"],\n [\"URL\", \"url\"]\n ],\n onChange: function(obj) {\n let dialog = CKEDITOR.dialog.getCurrent();\n if (obj.data.value === 'page') {\n dialog.getContentElement('info', 'page-selector').getElement().show();\n dialog.getContentElement('info', 'url-field').getElement().hide();\n } else {\n dialog.getContentElement('info', 'page-selector').getElement().hide();\n dialog.getContentElement('info', 'url-field').getElement().show();\n dialog.getContentElement('info', 'url-field').setValue('');\n }\n },\n setup: function(data) {\n if (data.type === undefined) {\n this.setValue('page');\n } else if (data.type === 'url' && data.url.url.startsWith('[page id=')) {\n this.setValue('page');\n } else {\n this.setValue(data.type);\n }\n }\n });\n\n infoTab.add({\n type: 'select',\n id: 'page-selector',\n label: window.translations['page'],\n 'default': '',\n items: window.pages,\n onChange: function() {\n let dialog = CKEDITOR.dialog.getCurrent();\n let page = '[page id=' + this.getValue() + ']';\n dialog.setValueOf('info', 'url', page);\n dialog.setValueOf('info', 'protocol', '');\n },\n setup: function(dialog) {\n this.allowOnChange = false;\n let pageId = '';\n if (dialog.url) {\n pageId = dialog.url.url.substr(9, dialog.url.url.length - 10);\n }\n this.setValue(pageId);\n this.allowOnChange = true;\n }\n });\n\n infoTab.add({\n type: 'text',\n id: 'url-field',\n label: 'URL',\n 'default': '',\n onChange: function() {\n let dialog = CKEDITOR.dialog.getCurrent();\n let url = this.getValue();\n dialog.setValueOf('info', 'url', url);\n },\n setup: function(dialog) {\n this.allowOnChange = false;\n let url = '';\n if (dialog.url) {\n url = dialog.url.url;\n }\n this.setValue(url);\n this.allowOnChange = true;\n }\n });\n }\n });\n\n\n","\n\n window.touchStart = function() {\n $(\"#gjs\").addClass('sidebar-collapsed');\n }\n\n"],"mappings":"C,WAEI,EAAE,aAAa,CAAC,CAAC,OAAO,EAAE,iBAAiB,CAAC,EAC5C,EAAE,gBAAgB,CAAC,CAAC,QAAQ,EAAE,iBAAiB,CAAC,EAChD,EAAE,gBAAgB,CAAC,CAAC,OAAO,EAAE,yBAAyB,CAAC,EAEvD,EAAE,iBAAiB,CAAC,CAAC,MAAM,UAAW,CAClC,EAAE,MAAM,CAAC,CAAC,YAAY,mBAAmB,EACzCE,EAAoB,CACxB,CAAC,EACDC,EAAoB,EAEpB,OAAO,OAAO,GAAG,cAAe,SAASC,EAAQ,CAC7C,EAAE,iBAAiB,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,UAAW,MAAM,EAC5D,EAAE,iBAAiB,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,UAAW,OAAO,EAE7D,EAAE,qCAAqC,CAAC,CAAC,OAAO,EAAE,eAAe,CAAC,CACtE,CAAC,EACD,OAAO,OAAO,GAAG,cAAe,SAASA,EAAQ,CAC7C,EAAE,iBAAiB,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,UAAW,MAAM,EAC5D,EAAE,iBAAiB,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,UAAW,OAAO,CACjE,CAAC,EAED,OAAO,OAAO,GAAG,mBAAoB,SAASC,EAAO,CACjDF,EAAoB,CACxB,CAAC,EAED,OAAO,OAAO,GAAG,sBAAuB,SAASG,EAAiB,CACxD,OAAO,QAAY,OAAO,OAAO,YAAY,GACxB,OAAO,OAAO,YAAY,CAAC,CAAC,MAC9B,GAEzB,WAAW,UAAW,CAClB,IAAIC,EAAW,EA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AK,OAAS,OAASA,EAAK,IAAI,IAAI,WAAW,WAAW,EADjE,KAAK,SAAS,MAAM,EAIpB,KAAK,SAASA,EAAK,IAAI,CAE/B,CACJ,CAAC,EAED6F,EAAQ,IAAI,CACR,KAAM,SACN,GAAI,gBACJ,MAAO,OAAO,aAAaG,KAC3BD,QAAW,GACX,MAAO,OAAO,MACd,SAAU,UAAW,CACjB,IAAID,EAAS,SAAS,OAAO,WAAW,EACpCI,EAAO,YAAc,KAAK,SAAS,EAAI,IAC3CJ,EAAO,WAAW,OAAQ,MAAOI,CAAI,EACrCJ,EAAO,WAAW,OAAQ,WAAY,EAAE,CAC5C,EACA,MAAO,SAASA,EAAQ,CACpB,KAAK,cAAgB,GACrB,IAAIK,EAAS,GACTL,EAAO,MACPK,EAASL,EAAO,IAAI,IAAI,OAAO,EAAGA,EAAO,IAAI,IAAI,OAAS,EAAE,GAEhE,KAAK,SAASK,CAAM,EACpB,KAAK,cAAgB,EACzB,CACJ,CAAC,EAEDN,EAAQ,IAAI,CACR,KAAM,OACN,GAAI,YACJ,MAAO,MACPE,QAAW,GACX,SAAU,UAAW,CACjB,IAAID,EAAS,SAAS,OAAO,WAAW,EACpCM,EAAM,KAAK,SAAS,EACxBN,EAAO,WAAW,OAAQ,MAAOM,CAAG,CACxC,EACA,MAAO,SAASN,EAAQ,CACpB,KAAK,cAAgB,GACrB,IAAIM,EAAM,GACNN,EAAO,MACPM,EAAMN,EAAO,IAAI,KAErB,KAAK,SAASM,CAAG,EACjB,KAAK,cAAgB,EACzB,CACJ,CAAC,CACL,CACJ,CAAC,EC1HD,OAAO,WAAa,UAAW,CAC3B,EAAE,MAAM,CAAC,CAAC,SAAS,mBAAmB,CAC1C,C"} \ No newline at end of file +{"version":3,"file":"PageBuilderBody.js","names":["generateId","counter","toastContainer","getToastContainer","showToast","message","type","duration","container","alert","icon","span","msg","editorEl","toggleSidebarBtn","sidebarHeader","sidebarBottomButtons","panelsEl","gjsEl","triggerEditorResize","autoCollapseSidebar","editor","traits","sectors","advancedProps","clmTags","block","toolbarPosition","toolbar","newTop","backspaceIsPressed","event","addBlockSearch","blocksCs","blockSearch","onMessage","loadingEl","input","term","category","atLeastOneMatch","label","labelEl","regEx","highlightedText","component","lastChild","blockId","\"id\"","rootComponent","insideEditablePartOfPage","originalCustomBuilderScripts","runComponentScript","child","styleIdentifier","tempDiv","parsedScript","wrapped","scriptTag","canvasDoc","afterGrapesJSLoaded","addThemeBlocks","fullScript","startFirstScript","languageCode","scriptTags","i","node","beforeEquals","scriptNumber","startScriptMethodName","blockSlug","cont","select","selectedLanguage","newLanguage","denyAccessToLayoutElements","index","replacePlaceholdersForRenderedBlocks","applyBlockAttributesToComponents","restrictEditAccess","id","\"html\"","replaced","comp","childComponent","disableAllEditFunctionality","componentHasBlockSettings","btn","componentHasBackground","pos","title","bg","trash","clone","arrows","labelTextParts","\"label\"","isCloningFromScript","originalComponent","addUniqueClass","hasBackground","componentElement","componentStyle","property","value","droppedComponent","draggedBlockId","generateId$1","parent","blockRootComponent","componentSibling","wrapperElement","\"wrapper\"","rep","componentChild","firstChild","copyAttributes","addSettingsToSidebar","getCurrentSettingValues","relativeIds","hasDynamicAncestor","rootId","settings","relativeId","settingsValues","settingValues","setting","trait","\"name\"","frame","frameDoc","frameEl","\"attributes\"","ancestorToUpdate","data","formData","response","blockHtml","parsedDiv","firstEl","replacedComponent","findChildViaBlockIdsPath","componentToSelect","blockIds","result","childResult","deepCopyAttributes","targetComponent","copyGrapesAttributes","copyHtmlElementAttributes","componentAttributes","attribute","directlyInsideDynamicBlock","allowEditableComponents","element","permissions","allowEditBasedOnComponentAttributes","newComponent","htmlTag","textEditableTags","otherEditableTags","componentIdentifier","componentClass","counter$1","waitForGrapesToLoad","confirmExit","savePageBtn","saveAllTranslationsToServer","callback","saveCurrentTranslationLocally","applyChangesFromCurrentLanguageToNewLanguage","errData","errorMessage","responseText","parsed","error","newLanguageBlocks","currentLanguageBlocks","updateNestedBlocks","currentBlockHtml","newBlockHtml","currDiv","newDiv","currContainers","newContainers","subBlockId","updatedSubBlock","oldSubBlock","updatedSubBlockMatches","oldSubBlockMatches","existingCss","\"css\"","getContainerContentInStorageFormat","mergeCss","\"style\"","\"components\"","newCss","pageBlocksString","matches","css","selector","pageBlocksStringSelector","removeOldStyleSelectors","styleComponents","updatedStyleComponents","styleComponent","toggleSaving","saveBtn","saveUrl","componentId","c","componentReferences","blocksData","replaceDynamicBlocksWithPlaceholders","html","getContainerHtml","style","components","div","el","slug","getComponentHtml","parentIsDynamic","parentIsHtmlInsideDynamic","newParentIsDynamic","newParentIsHtmlInsideDynamic","childData","key","\"blocks\"","\"settings\"","instanceId","generateId","attributes","currentBlockForParent","counter","wrapper","button","spinner","sanitizeHtml","match","tag","attrs","hrefMatch","targetMatch","styleMatch","setupPasteSanitizer","handlePaste","ev","rte","clipboardData","text","cleanHtml","escaped","rteConfig","registerToolbarActions","\"link\"","r","openLinkModal","sel","savedRange","currentAnchor","initialType","initialPageId","initialUrl","initialTargetBlank","href","pages","translations","typeGroup","\"page\"","pageGroup","pageOptionsHtml","item","urlGroup","radio","targetGroup","buttonsGroup","cancelBtn","\"cancel\"","unlinkBtn","\"unlink\"","applyBtn","\"apply\"","selectedType","pageSelect","urlInput","targetBlank","currentSel","selectedText","targetAttr","textToInsert","isInitialized","initRteLinkManager"],"sources":["../src/Modules/GrapesJS/resources/assets/js/toast.js","../src/Modules/GrapesJS/resources/assets/js/pagebuilder.js","../src/Modules/GrapesJS/resources/assets/js/block-search.js","../src/Modules/GrapesJS/resources/assets/js/run-builder-scripts.js","../src/Modules/GrapesJS/resources/assets/js/manage-editable-components.js","../src/Modules/GrapesJS/resources/assets/js/save-page.js","../src/Modules/GrapesJS/resources/assets/js/rte-link-manager.js","../src/Modules/GrapesJS/resources/assets/js/responsive.js"],"sourcesContent":["let toastContainer = null;\n\nfunction getToastContainer() {\n if (!toastContainer || !document.body.contains(toastContainer)) {\n toastContainer = document.createElement('div');\n toastContainer.className = 'toast toast-top toast-end';\n toastContainer.style.cssText = 'position:fixed; top:20px; right:20px; z-index:999999; display:flex; flex-direction:column; gap:10px; pointer-events:none;';\n document.body.appendChild(toastContainer);\n }\n return toastContainer;\n}\n\nexport function showToast(message, type = 'info', duration = 3500) {\n if (!message) return;\n const container = getToastContainer();\n const alert = document.createElement('div');\n alert.className = `alert alert-${type}`;\n alert.style.cssText = `\n pointer-events: auto;\n min-width: 250px;\n max-width: 400px;\n padding: 12px 16px;\n border-radius: 6px;\n box-shadow: 0 4px 12px rgba(0,0,0,0.25);\n color: #fff;\n font-size: 14px;\n font-family: inherit;\n display: flex;\n align-items: center;\n gap: 8px;\n background-color: ${type === 'success' ? '#10b981' : type === 'error' ? '#ef4444' : '#3b82f6'};\n transition: opacity 0.3s ease, transform 0.3s ease;\n opacity: 0;\n transform: translateY(-10px);\n `;\n\n const icon = document.createElement('i');\n icon.className = type === 'success' ? 'fa fa-check-circle' : type === 'error' ? 'fa fa-exclamation-circle' : 'fa fa-info-circle';\n alert.appendChild(icon);\n\n const span = document.createElement('span');\n span.innerText = message;\n span.style.flex = '1';\n alert.appendChild(span);\n\n container.appendChild(alert);\n\n // animate in\n requestAnimationFrame(() => {\n alert.style.opacity = '1';\n alert.style.transform = 'translateY(0)';\n });\n\n setTimeout(() => {\n alert.style.opacity = '0';\n alert.style.transform = 'translateY(-10px)';\n setTimeout(() => {\n if (alert.parentNode) {\n alert.parentNode.removeChild(alert);\n }\n }, 300);\n }, duration);\n}\n\nwindow.toastr = {\n success(msg, duration = 3000) {\n showToast(msg, 'success', duration);\n },\n error(msg, duration = 4000) {\n showToast(msg, 'error', duration);\n },\n info(msg, duration = 3000) {\n showToast(msg, 'info', duration);\n }\n};\n","\n\n const editorEl = document.querySelector('.gjs-editor');\nconst toggleSidebarBtn = document.getElementById('toggle-sidebar');\nconst sidebarHeader = document.getElementById('sidebar-header');\nconst sidebarBottomButtons = document.getElementById('sidebar-bottom-buttons');\nconst panelsEl = document.querySelector('.gjs-pn-panels');\nconst gjsEl = document.getElementById('gjs');\n\nif (editorEl && toggleSidebarBtn) {\n editorEl.appendChild(toggleSidebarBtn);\n}\nif (panelsEl) {\n if (sidebarHeader) panelsEl.prepend(sidebarHeader);\n if (sidebarBottomButtons) panelsEl.appendChild(sidebarBottomButtons);\n}\n\nif (toggleSidebarBtn) {\n toggleSidebarBtn.addEventListener('click', function() {\n if (gjsEl) gjsEl.classList.toggle('sidebar-collapsed');\n triggerEditorResize();\n });\n}\nautoCollapseSidebar();\n\nif (window.editor) {\n window.editor.on('run:open-sm', function(editor) {\n const traits = document.querySelector('.gjs-trt-traits');\n if (traits && traits.parentElement && traits.parentElement.parentElement) {\n traits.parentElement.parentElement.style.display = 'none';\n }\n const sectors = document.querySelector('.gjs-sm-sectors');\n if (sectors && sectors.parentElement && sectors.parentElement.parentElement) {\n sectors.parentElement.parentElement.style.display = 'block';\n }\n // move element classes editor to advanced section\n const advancedProps = document.querySelector('#gjs-sm-advanced .gjs-sm-properties');\n const clmTags = document.querySelector('.gjs-clm-tags');\n if (advancedProps && clmTags) {\n advancedProps.appendChild(clmTags);\n }\n });\n\n window.editor.on('run:open-tm', function(editor) {\n const sectors = document.querySelector('.gjs-sm-sectors');\n if (sectors && sectors.parentElement && sectors.parentElement.parentElement) {\n sectors.parentElement.parentElement.style.display = 'none';\n }\n const traits = document.querySelector('.gjs-trt-traits');\n if (traits && traits.parentElement && traits.parentElement.parentElement) {\n traits.parentElement.parentElement.style.display = 'block';\n }\n });\n\n window.editor.on('block:drag:start', function(block) {\n autoCollapseSidebar();\n });\n\n window.editor.on('rteToolbarPosUpdate', function(toolbarPosition) {\n if (! window.editor || ! window.editor.getSelected()) return;\n let selectedDomComponent = window.editor.getSelected().getEl();\n if (! selectedDomComponent) return;\n\n setTimeout(function() {\n let toolbar = document.querySelector('.gjs-rte-toolbar');\n if (!toolbar) return;\n const rect = toolbar.getBoundingClientRect();\n let toolbarInUpperHalf = (rect.top + window.scrollY) < (toolbarPosition.elementTop + (0.5 * toolbarPosition.elementHeight));\n if (toolbarInUpperHalf) {\n let newTop = toolbarPosition.elementTop - toolbar.offsetHeight;\n if (newTop > 0) {\n toolbar.style.top = newTop + 'px';\n }\n }\n }, 0);\n });\n}\n\nfunction autoCollapseSidebar() {\n if (window.innerWidth < 1000) {\n if (gjsEl) gjsEl.classList.add('sidebar-collapsed');\n triggerEditorResize();\n }\n}\n\nfunction triggerEditorResize() {\n if (window.editor && window.editor.trigger) {\n window.editor.trigger('change:canvasOffset canvasScroll');\n }\n}\n\n// prevent exiting page builder with backspace button\nlet backspaceIsPressed = false;\ndocument.addEventListener('keydown', function(event) {\n if (event.key === 'Backspace' || event.which === 8) backspaceIsPressed = true;\n});\ndocument.addEventListener('keyup', function(event) {\n if (event.key === 'Backspace' || event.which === 8) backspaceIsPressed = false;\n});\nwindow.addEventListener('beforeunload', function(event) {\n if (backspaceIsPressed) event.preventDefault();\n});\n\nfunction addBlockSearch() {\n const blocksCs = document.querySelector('.gjs-blocks-cs');\n const blockSearch = document.getElementById('block-search');\n if (blocksCs && blockSearch) {\n blocksCs.prepend(blockSearch);\n }\n}\n\n// listen to messages from iframe\nwindow.addEventListener(\"message\", onMessage, false);\n\nfunction onMessage(event) {\n // if the page is loaded, remove loading element\n if (event.data === 'page-loaded') {\n const loadingEl = document.getElementById('phpb-loading');\n if (loadingEl) loadingEl.classList.add('loaded');\n addBlockSearch();\n window.isLoaded = true;\n window.dispatchEvent(new CustomEvent('pagebuilder-page-loaded'));\n } else if (event.data === 'touch-start') {\n if (window.touchStart) window.touchStart();\n }\n}\n","\ndocument.addEventListener(\"input\", function(e) {\n const input = e.target.closest(\"#block-search input\");\n if (!input) return;\n\n let term = input.value.toLowerCase().trim();\n\n document.querySelectorAll(\".gjs-block-category\").forEach(category => {\n let atLeastOneMatch = false;\n\n category.querySelectorAll(\".gjs-block\").forEach(block => {\n if (!block.dataset.originalHtml) {\n block.dataset.originalHtml = block.innerHTML;\n }\n\n let label = block.textContent || \"\";\n if (!term || label.toLowerCase().includes(term)) {\n block.classList.remove(\"d-none\");\n atLeastOneMatch = true;\n\n const labelEl = block.querySelector(\".gjs-block-label\");\n if (labelEl) {\n if (term) {\n let regEx = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&') + ')', \"gi\");\n let highlightedText = label.replace(regEx, '$1');\n labelEl.innerHTML = block.dataset.originalHtml.replace(label.trim(), highlightedText);\n } else {\n block.innerHTML = block.dataset.originalHtml;\n }\n }\n } else {\n block.classList.add(\"d-none\");\n }\n });\n\n if (atLeastOneMatch) {\n category.classList.remove(\"d-none\");\n } else {\n category.classList.add(\"d-none\");\n }\n });\n});\n","\n\n window.customBuilderScripts = {};\n\n /**\n * On instantiating the component model, before it is mounted in the canvas.\n */\n window.editor.on('component:create', component => {\n // extract the script tag of the given component (if it has one)\n if (component.components().length) {\n let lastChild = component.components().models[component.components().length - 1];\n if (lastChild.attributes.type === 'script') {\n let blockId = component.attributes.attributes['block-id'];\n if (blockId === undefined) {\n blockId = component.attributes.attributes['id'];\n }\n\n let rootComponent = lastChild;\n let insideEditablePartOfPage = false;\n while (rootComponent.parent()) {\n rootComponent = rootComponent.parent();\n if (rootComponent.attributes.attributes['phpb-content-container']) {\n insideEditablePartOfPage = true;\n break;\n }\n }\n\n if (insideEditablePartOfPage) {\n window.customBuilderScripts[blockId] = lastChild.toHTML();\n lastChild.remove();\n }\n }\n }\n });\n\n /**\n * After mounting the component in the canvas.\n */\n window.editor.on('component:add', function (component) {\n // run the script that was set when creating this component\n if (component.attributes['run-builder-script'] !== undefined) {\n let originalCustomBuilderScripts = customBuilderScripts;\n\n window.customBuilderScripts[component.attributes['block-id']] = customBuilderScripts[component.attributes['run-builder-script']];\n runScriptsOfComponentAndChildren(component);\n\n window.customBuilderScripts = originalCustomBuilderScripts;\n delete component.attributes['run-builder-script'];\n }\n });\n\n /**\n * On ending a component order drag, re-run builder scripts on newly added HTMl.\n */\n window.editor.on('sorter:drag:end', function(event) {\n let component = event.modelToDrop;\n if (component && component.attributes && (component.attributes['block-id'] || component.attributes['id'])) {\n window.runScriptsOfComponentAndChildren(component);\n }\n });\n\n /**\n * Run the custom builder scripts of the given component and of all child components.\n *\n * @param component\n */\n window.runScriptsOfComponentAndChildren = function(component) {\n runComponentScript(component);\n component.components().each(function(child) {\n runScriptsOfComponentAndChildren(child);\n });\n }\n\n /**\n * Run the custom builder scripts of the given component.\n *\n * @param component\n */\n function runComponentScript(component) {\n let blockId = component.attributes['block-id'];\n if (blockId === undefined) {\n blockId = component.attributes.attributes['id'];\n }\n if (blockId && window.customBuilderScripts[blockId] !== undefined) {\n let styleIdentifier = component.attributes[\"style-identifier\"];\n let tempDiv = document.createElement(\"div\");\n tempDiv.innerHTML = window.customBuilderScripts[blockId];\n let parsedScript = tempDiv.querySelector('script');\n if (parsedScript) {\n let scriptContent = parsedScript.innerHTML;\n let wrapped = `(function(){\\nlet block = document.getElementsByClassName(\"${styleIdentifier}\")[0];\\nlet blockSelector = \".${styleIdentifier}\";\\nlet inPageBuilder = true;\\n${scriptContent}\\n})();`;\n let scriptTag = document.createElement(\"script\");\n scriptTag.type = \"text/javascript\";\n scriptTag.textContent = wrapped;\n let canvasDoc = window.editor.Canvas.getDocument();\n if (canvasDoc && canvasDoc.body) {\n canvasDoc.body.appendChild(scriptTag);\n }\n }\n }\n }\n\n\n","\n\n /**\n * After loading GrapesJS, add all theme blocks and activate the editable blocks in the main language.\n */\n function afterGrapesJSLoaded() {\n addThemeBlocks();\n\n // add page injection script with page-loaded event to the end of the body tag of initialComponents,\n // which contains the html structure of the used layout file. And add script that starts all external scripts\n let scriptTag = document.createElement(\"script\");\n scriptTag.type = \"text/javascript\";\n scriptTag.src = window.injectionScriptUrl;\n let fullScript = scriptTag.outerHTML + '';\n window.initialComponents = window.initialComponents.replace('', fullScript + '');\n\n Object.keys(window.languages || {}).forEach(languageCode => {\n if (window.pageBlocks[languageCode] === null) {\n window.pageBlocks[languageCode] = {};\n }\n });\n\n activateLanguage(window.currentLanguage);\n }\n\n /**\n * GrapesJS wraps each external script with a start[number]Start() method,\n * which needs to be called on switching language.\n */\n function startFirstScript() {\n let scriptTags = document.querySelectorAll(\"script\");\n for (let i = 0; i < scriptTags.length; i++) {\n let node = scriptTags[i];\n if (node.innerHTML.startsWith('var script')) {\n let beforeEquals = node.innerHTML.split('=')[0];\n let scriptNumber = parseInt(beforeEquals.replace('var script', ''));\n if (Number.isInteger(scriptNumber)) {\n let startScriptMethodName = 'script' + scriptNumber + 'Start';\n if (typeof window[startScriptMethodName] === 'function') {\n if (scriptNumber !== 0) {\n window[startScriptMethodName]();\n }\n return false;\n }\n }\n }\n }\n }\n\n /**\n * Add all theme blocks to GrapesJS blocks manager.\n */\n function addThemeBlocks() {\n for (let blockSlug in window.themeBlocks) {\n let block = window.themeBlocks[blockSlug];\n\n // remove whitespace from phpb-block-container elements, otherwise these components will become type=text,\n // resulting in components dropped inside the container jumping to the dropped position - 1\n let tempDiv = document.createElement(\"div\");\n tempDiv.innerHTML = block.content;\n tempDiv.querySelectorAll(\"[phpb-blocks-container]\").forEach(cont => {\n if (cont.innerHTML !== '' && cont.innerHTML.trim() === '') {\n cont.innerHTML = '';\n }\n });\n window.themeBlocks[blockSlug].content = tempDiv.innerHTML;\n block.content = tempDiv.innerHTML;\n\n editor.BlockManager.add(blockSlug, block);\n }\n }\n\n /**\n * Switch pagebuilder to another language variant on changing the language selector.\n */\n document.addEventListener(\"change\", function(e) {\n const select = e.target.closest(\"#language-selector select\");\n if (!select) return;\n let selectedLanguage = select.value;\n\n window.switchLanguage(selectedLanguage, function() {\n activateLanguage(selectedLanguage);\n });\n });\n\n /**\n * Activate the given language variant in the pagebuilder.\n *\n * @param newLanguage\n */\n window.activateLanguage = function(newLanguage) {\n window.currentLanguage = newLanguage;\n\n // reset GrapesJS editor before loading the new language variant\n window.editor.select();\n window.editor.DomComponents.clear();\n window.editor.DomComponents.componentsById = [];\n window.editor.UndoManager.clear();\n\n // remove any script tags from previous languages\n window.editor.Canvas.getDocument().querySelectorAll(\"script\").forEach(function(node) {\n node.remove();\n });\n\n // load initial non-editable layout components\n window.editor.setComponents(window.initialComponents);\n denyAccessToLayoutElements(editor.getWrapper());\n window.editor.getWrapper().find(\"[phpb-content-container]\").forEach((container, index) => {\n container.set('custom-name', window.translations['page-content']);\n\n // reload components of this content container (adding all root phpb-block elements)\n container.components(window.contentContainerComponents[index]);\n\n // replace phpb-block elements with the server-side rendered version of each block\n replacePlaceholdersForRenderedBlocks(container);\n\n // apply the stored block settings to the server-side rendered html\n applyBlockAttributesToComponents(container);\n });\n };\n\n window.addEventListener('pagebuilder-page-loaded', function(event) {\n window.editor.getWrapper().find(\"[phpb-content-container]\").forEach(container => {\n restrictEditAccess(container);\n window.runScriptsOfComponentAndChildren(container);\n });\n window.setWaiting(false);\n\n setTimeout(function() {\n window.changesOffset = window.editor.getModel().get('changesCount');\n window.afterInitialRendering = true;\n }, 250);\n });\n\n /**\n * Replace phpb-block elements with the server-side rendered version of each block.\n *\n * @param component\n */\n function replacePlaceholdersForRenderedBlocks(component) {\n if (!component) return;\n\n // if we encounter a pagebuilder block, replace it with the server-side rendered html\n if (component.get && component.get('tagName') === 'phpb-block') {\n let id = component.attributes && component.attributes.attributes ? component.attributes.attributes.id : null;\n if (id && window.pageBlocks[window.currentLanguage] && window.pageBlocks[window.currentLanguage][id] !== undefined && window.pageBlocks[window.currentLanguage][id]['html'] !== undefined) {\n let replaced = component.replaceWith(window.pageBlocks[window.currentLanguage][id]['html']);\n window.pageBlocks[window.currentLanguage][id]['html'] = '';\n let replacedComponents = Array.isArray(replaced) ? replaced : [replaced];\n replacedComponents.forEach(comp => {\n if (comp && comp.get && comp.get('components')) {\n comp.get('components').each(childComponent => replacePlaceholdersForRenderedBlocks(childComponent));\n }\n });\n return;\n }\n }\n\n // replace placeholders inside child components\n if (component.get && component.get('components')) {\n component.get('components').each(childComponent => replacePlaceholdersForRenderedBlocks(childComponent));\n }\n }\n\n /**\n * Function for denying edit access to this component and all children that belong to the layout.\n *\n * @param component\n */\n function denyAccessToLayoutElements(component) {\n if ('phpb-content-container' in component.attributes.attributes) return;\n\n disableAllEditFunctionality(component);\n\n // apply restrictions to child components\n component.get('components').each(component => denyAccessToLayoutElements(component));\n }\n\n\n /**\n * Component select handler.\n */\n window.editor.on('component:selected', function(component) {\n // if the component has settings, activate settings panel in pagebuilder sidebar\n if (componentHasBlockSettings(component)) {\n const btn = document.querySelector(\".gjs-pn-buttons .gjs-pn-btn:nth-of-type(2)\");\n if (btn) btn.click();\n }\n else if (component.get('type') === '' && componentHasBackground(component)) {\n // on selecting a default component without settings, with editable background, show background styling\n const btn = document.querySelector(\".gjs-pn-buttons .gjs-pn-btn:nth-of-type(3)\");\n if (btn) btn.click();\n const pos = document.getElementById(\"gjs-sm-position\");\n if (pos && pos.classList.contains(\"gjs-sm-open\")) {\n const title = pos.querySelector(\".gjs-sm-title\");\n if (title) title.click();\n }\n const bg = document.getElementById(\"gjs-sm-background\");\n if (bg && !bg.classList.contains(\"gjs-sm-open\")) {\n const title = bg.querySelector(\".gjs-sm-title\");\n if (title) title.click();\n }\n }\n\n // if component has no settings, add no settings text to settings panel in sidebar\n if (! componentHasBlockSettings(component)) {\n setTimeout(function() {\n const traits = document.querySelector(\".gjs-trt-traits\");\n if (traits) {\n traits.innerHTML = '

' + window.translations['trait-manager']['no-settings'] + '

';\n }\n }, 0);\n }\n\n // only show the toolbar buttons that are applicable\n setTimeout(function() {\n const trash = document.querySelector(\".gjs-toolbar .fa-trash-o.gjs-toolbar-item\");\n if (trash && !component.attributes.removable) trash.style.display = 'none';\n\n const clone = document.querySelector(\".gjs-toolbar .fa-clone.gjs-toolbar-item\");\n if (clone && !component.attributes.copyable) clone.style.display = 'none';\n\n const arrows = document.querySelector(\".gjs-toolbar .fa-arrows.gjs-toolbar-item\");\n if (arrows && !component.attributes.draggable) arrows.style.display = 'none';\n\n if (! component.attributes.removable && ! component.attributes.copyable && ! component.attributes.draggable) {\n window.editor.select(component.parent());\n }\n\n let blockSlug = component.attributes['block-slug'];\n if (blockSlug) {\n let labelHtml = window.themeBlocks[blockSlug]['label'];\n let labelTextParts = labelHtml.split(\"\");\n if (labelTextParts.length > 1) {\n const toolbar = document.querySelector(\".gjs-toolbar\");\n if (toolbar) toolbar.setAttribute('title', \"Bloknaam: \" + labelTextParts[1]);\n }\n }\n }, 0);\n });\n\n\n /**\n * Component clone handler.\n */\n window.editor.on('component:clone', function(component) {\n // if the clone is performed by the user, do not copy the block id and style identifier\n if (! isCloningFromScript) {\n let originalComponent = window.editor.getWrapper().find('.' + component.attributes['style-identifier'])[0];\n\n if (component.attributes['style-identifier'] !== undefined && component.attributes['style-identifier'] !== '') {\n component.removeClass(component.attributes['style-identifier']);\n delete component.attributes['style-identifier'];\n addUniqueClass(component);\n }\n component.attributes['block-id'] = component.attributes['block-slug'];\n\n // pass a reference of the scripts of the original component to run on the cloned component\n if (originalComponent && window.customBuilderScripts[originalComponent.attributes['block-id']] !== undefined) {\n component.attributes['run-builder-script'] = originalComponent.attributes['block-id'];\n }\n }\n });\n\n\n /**\n * Return whether the given component contains a CSS background, that should be editable.\n *\n * @param component\n * @returns {boolean}\n */\n function componentHasBackground(component) {\n let hasBackground = false;\n\n let componentElement = component.getEl();\n if (componentElement && componentElement.style) {\n let componentStyle = window.getComputedStyle(componentElement);\n\n ['background', 'background-image', 'background-color'].forEach(property => {\n let value = componentStyle.getPropertyValue(property);\n if (value !== undefined && value !== '' && ! value.includes('none') && ! value.includes('rgba(0, 0, 0, 0)')) {\n hasBackground = true;\n }\n });\n }\n\n return hasBackground;\n }\n\n /**\n * Return whether the given component has settings defined in its block config file.\n *\n * @param component\n * @returns {boolean}\n */\n function componentHasBlockSettings(component) {\n return component.attributes.traits.length > 0;\n }\n\n /**\n * On dropping a component on the canvas, apply attributes of the container phpb-block element with configuration passed\n * from the server and restrict edit access to editable components.\n */\n window.editor.on('block:drag:stop', function(droppedComponent) {\n // ensure component drop was successful\n if (! droppedComponent || ! droppedComponent.attributes || ! droppedComponent.attributes.attributes) return;\n\n let draggedBlockId = generateId();\n droppedComponent.attributes.attributes['dropped-component-id'] = draggedBlockId;\n\n let parent = droppedComponent.parent();\n applyBlockAttributesToComponents(droppedComponent);\n\n // at this point droppedComponent is replaced in the DOM by the actual component (without the phpb-block element),\n // so we need to find the dropped component again in the context of its parent\n parent.components().each(function(child) {\n if (child.attributes['dropped-component-id'] === draggedBlockId) {\n delete child.attributes['dropped-component-id'];\n droppedComponent = child;\n }\n });\n restrictEditAccess(droppedComponent);\n\n window.runScriptsOfComponentAndChildren(droppedComponent);\n });\n\n /**\n * Apply the block attributes which are stored in elements to the top-level html element inside the block.\n * If the block starts with multiple top-level html elements, add a div element wrapping the block's top-level elements.\n *\n * @param component\n */\n function applyBlockAttributesToComponents(component) {\n if (component.attributes.tagName === 'phpb-block') {\n let container = component.parent();\n let clone = cloneComponent(component);\n\n // since component is a that should be removed and replaced by its children,\n // the component's parent's child that has the id of the component needs to be replaced\n let blockRootComponent;\n if (component.attributes.attributes['is-html'] === 'false') {\n container.components().each(function(componentSibling) {\n if (componentSibling.cid === component.cid) {\n // replace the by the actual component\n // the component is wrapped with a wrapper element to allow block styling (via a unique .style-identifier selector)\n let wrapperElement = ('wrapper' in component.attributes.attributes) ? component.attributes.attributes['wrapper'] : 'div';\n let rep = component.replaceWith({tagName: wrapperElement});\n blockRootComponent = Array.isArray(rep) ? rep[0] : rep;\n blockRootComponent.attributes['is-style-wrapper'] = true;\n clone.components().each(function(componentChild) {\n blockRootComponent.append(cloneComponent(componentChild));\n });\n }\n });\n } else {\n container.components().each(function(componentSibling) {\n if (componentSibling.cid === component.cid) {\n // if the has one direct child, replace it by its only child\n // else, replace it by a wrapper div to allow block styling (via a unique .style-identifier selector)\n if (clone.components().length === 1) {\n let firstChild = cloneComponent(clone.components().models[0]);\n let rep = component.replaceWith(firstChild);\n blockRootComponent = Array.isArray(rep) ? rep[0] : rep;\n } else {\n let rep = component.replaceWith({tagName: 'div'});\n blockRootComponent = Array.isArray(rep) ? rep[0] : rep;\n blockRootComponent.attributes['is-style-wrapper'] = true;\n clone.components().each(function(componentChild) {\n blockRootComponent.append(cloneComponent(componentChild));\n });\n }\n }\n });\n }\n component.remove();\n\n copyAttributes(clone, blockRootComponent, true, false);\n // add all settings of this component to the settings panel in the sidebar\n addSettingsToSidebar(blockRootComponent);\n // recursive call to find and replace elements of nested blocks (loaded via shortcodes)\n applyBlockAttributesToComponents(blockRootComponent);\n } else {\n component.components().each(function(childComponent) {\n // recursive call to find and replace elements of nested blocks (loaded via shortcodes)\n applyBlockAttributesToComponents(childComponent);\n });\n }\n }\n\n /**\n * Get the current setting values for the given component.\n *\n * @param component\n */\n function getCurrentSettingValues(component) {\n // Block settings are stored in window.pageBlocks in a structure starting with each root block (the first ancestor that does not have a dynamic parent itself).\n // So, we need to find the root of the given component and store all block ids along the way, in order to traverse the pageBlocks structure to the settings of the given component.\n // These block ids are only unique in the context of their parent (we can have multiple instances of the same nested block structure), so we call them relative IDs.\n let relativeIds = [];\n\n // get the root component of the given component (its first ancestor that does not have a dynamic parent itself or the block that is inside a blocks container)\n let rootComponent = component;\n let hasDynamicAncestor = false;\n while (rootComponent.parent() &&\n rootComponent.parent().attributes.attributes['phpb-blocks-container'] === undefined &&\n rootComponent.parent().attributes['is-html'] !== 'true' &&\n rootComponent.parent().attributes.attributes['phpb-content-container'] === undefined\n ) {\n if (rootComponent.parent().attributes['is-html'] === 'false') {\n hasDynamicAncestor = true;\n }\n if (rootComponent.attributes['block-id'] !== undefined) {\n relativeIds.push(rootComponent.attributes['block-id']);\n }\n rootComponent = rootComponent.parent();\n }\n\n let rootId = component.attributes['block-id'];\n if (hasDynamicAncestor) {\n rootId = rootComponent.attributes['block-id'];\n } else {\n relativeIds = [];\n }\n\n // get the component settings by traversing the pageBlocks structure\n let settings = window.pageBlocks[window.currentLanguage][rootId];\n relativeIds.reverse().forEach(function(relativeId) {\n if (settings === undefined || settings.blocks === undefined || settings.blocks[relativeId] === undefined) {\n settings = {};\n } else {\n settings = settings.blocks[relativeId];\n }\n });\n\n // return the values stored in the current component's settings structure\n let settingsValues = {};\n if (settings !== undefined && settings.settings !== undefined && settings.settings.attributes !== undefined) {\n settingsValues = settings.settings.attributes;\n }\n return settingsValues;\n }\n\n /**\n * Add all settings from the block's config file to the given component,\n * to allow them to be changed in the settings side panel.\n *\n * @param component\n */\n function addSettingsToSidebar(component) {\n if (window.blockSettings[component.attributes['block-slug']] === undefined) {\n return;\n }\n component.attributes.settings = {};\n\n let settingValues = getCurrentSettingValues(component);\n\n // set style identifier class to the block wrapper, if an identifier has been stored during earlier getDataInStorageFormat calls\n if (settingValues['style-identifier'] !== undefined) {\n component.addClass(settingValues['style-identifier']);\n }\n\n // for each setting add a trait to the settings sidebar panel with the earlier stored or default value\n component.attributes['is-updating'] = true;\n let settings = window.blockSettings[component.attributes['block-slug']];\n settings.forEach(function(setting) {\n let trait = component.addTrait(setting);\n if (settingValues[setting['name']] !== undefined) {\n trait[0].setTargetValue(settingValues[setting['name']]);\n } else if (setting['default-value'] !== undefined) {\n trait[0].setTargetValue(setting['default-value']);\n }\n });\n component.attributes['is-updating'] = false;\n }\n\n /**\n * On updating an attribute (block setting from the settings side panel), refresh dynamic block via Ajax.\n */\n window.editor.on('component:update', async function(component) {\n const frame = document.querySelector(\".gjs-frame\");\n const frameDoc = frame && (frame.contentDocument || (frame.contentWindow && frame.contentWindow.document));\n const frameEl = frameDoc ? frameDoc.getElementById(component.ccid) : null;\n\n if (window.isLoaded !== true ||\n component.attributes['block-slug'] === undefined ||\n component.attributes['is-updating'] ||\n component.changed['attributes'] === undefined ||\n !frameEl\n ) {\n return;\n }\n // dynamic pagebuilder blocks can depend on data passed by dynamic parent blocks,\n // so we need to update the closest parent which does not have a dynamic parent itself or the block that is inside a blocks container.\n // also keep track of all intermediate block ids, for re-selecting the currently selected component.\n let relativeIds = [];\n let ancestorToUpdate = component;\n let hasDynamicAncestor = false;\n while (ancestorToUpdate.parent() &&\n ancestorToUpdate.parent().attributes.attributes['phpb-blocks-container'] === undefined &&\n ancestorToUpdate.parent().attributes['is-html'] !== 'true' &&\n ancestorToUpdate.parent().attributes.attributes['phpb-content-container'] === undefined\n ) {\n if (ancestorToUpdate.parent().attributes['is-html'] === 'false') {\n hasDynamicAncestor = true;\n }\n if (ancestorToUpdate.attributes['block-id'] !== undefined) {\n relativeIds.push(ancestorToUpdate.attributes['block-id']);\n }\n ancestorToUpdate = ancestorToUpdate.parent();\n }\n\n if (hasDynamicAncestor) {\n component = ancestorToUpdate;\n } else {\n relativeIds = [];\n }\n\n component.attributes['is-updating'] = true;\n if (frameEl) frameEl.classList.add('gjs-freezed');\n\n let container = window.editor.getWrapper().find(\"#\" + component.ccid)[0].parent();\n let data = window.getComponentDataInStorageFormat(component);\n\n // refresh component contents with updated version requested via fetch call\n try {\n const formData = new URLSearchParams();\n formData.append('data', JSON.stringify(data));\n formData.append('language', window.currentLanguage);\n\n const response = await fetch(window.renderBlockUrl, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded',\n 'X-Requested-With': 'XMLHttpRequest'\n },\n body: formData\n });\n\n if (!response.ok) {\n if (frameEl) frameEl.classList.remove('gjs-freezed');\n component.attributes['is-updating'] = false;\n window.toastr.error(window.translations['toastr-component-update-failed']);\n return;\n }\n\n const blockHtml = await response.text();\n let parsedDiv = document.createElement('div');\n parsedDiv.innerHTML = blockHtml;\n let firstEl = parsedDiv.firstElementChild;\n let blockId = firstEl ? firstEl.getAttribute('block-id') : null;\n\n // set the block settings for the updated component to the new values\n window.pageBlocks[window.currentLanguage][blockId] = (data.blocks[blockId] === undefined) ? {} : data.blocks[blockId];\n\n // replace old component for the rendered html returned by the server\n component.replaceWith(blockHtml);\n replacePlaceholdersForRenderedBlocks(container);\n applyBlockAttributesToComponents(container);\n restrictEditAccess(container, false, false);\n\n // run builder scripts of the replaced component and all its children\n let replacedComponent = findChildViaBlockIdsPath(container, [blockId]);\n runScriptsOfComponentAndChildren(replacedComponent);\n\n // select the component that was selected before the ajax call\n relativeIds.push(blockId);\n let componentToSelect = findChildViaBlockIdsPath(container, relativeIds.reverse());\n window.editor.select(componentToSelect);\n } catch (error) {\n if (frameEl) frameEl.classList.remove('gjs-freezed');\n component.attributes['is-updating'] = false;\n window.toastr.error(window.translations['toastr-component-update-failed']);\n }\n });\n\n /**\n * Traverse the children of the given component via the given path of block IDs\n * and return the component with the last ID from the list.\n *\n * @param component\n * @param blockIds\n * @returns {null|*}\n */\n function findChildViaBlockIdsPath(component, blockIds) {\n // foobar\n if (blockIds.length === 0) {\n return component;\n }\n\n let result = null;\n\n component.forEachChild(function(child) {\n if (child.attributes['block-id'] === blockIds[0]) {\n result = findChildViaBlockIdsPath(child, blockIds.slice(1));\n return false;\n }\n });\n\n component.forEachChild(function(child) {\n let childResult = findChildViaBlockIdsPath(child, blockIds);\n if (childResult !== null) {\n result = childResult;\n return false;\n }\n });\n\n return result;\n }\n\n /**\n * Clone the given component (while preserving all attributes, like IDs).\n *\n * @param component\n */\n let isCloningFromScript = false;\n window.cloneComponent = function(component) {\n isCloningFromScript = true;\n\n let clone = component.clone();\n deepCopyAttributes(component, clone);\n\n isCloningFromScript = false;\n return clone;\n };\n\n /**\n * Apply the attributes of the given component and its children to each corresponding component of the given clone.\n *\n * @param component\n * @param clone\n */\n function deepCopyAttributes(component, clone) {\n // apply all attributes from component to clone\n copyAttributes(component, clone, false, true);\n // apply attributes from component's children to clone's children\n for (let index = 0; index < component.components().length; index++) {\n let componentChild = component.components().models[index];\n let cloneChild = clone.components().models[index];\n deepCopyAttributes(componentChild, cloneChild);\n }\n }\n\n /**\n * Apply the attributes of the given component to the given target component.\n *\n * @param component\n * @param targetComponent\n * @param copyGrapesAttributes whether all GrapesJS component attributes (like permissions) should be copied\n * @param copyHtmlElementAttributes whether the html element attributes should be copied\n */\n function copyAttributes(component, targetComponent, copyGrapesAttributes, copyHtmlElementAttributes) {\n let componentAttributes = component.attributes.attributes;\n for (let attribute in componentAttributes) {\n if (copyHtmlElementAttributes) {\n targetComponent.attributes.attributes[attribute] = componentAttributes[attribute];\n }\n if (copyGrapesAttributes) {\n targetComponent.attributes[attribute] = componentAttributes[attribute];\n }\n }\n }\n\n /**\n * Function for only allowing edit access on whitelisted components.\n *\n * @param component\n * @param directlyInsideDynamicBlock\n * @param allowEditableComponents\n */\n function restrictEditAccess(component, directlyInsideDynamicBlock = false, allowEditableComponents = true) {\n disableAllEditFunctionality(component);\n\n if (component.attributes.attributes['phpb-content-container'] !== undefined) {\n // the content container of the current page can receive other components\n component.set({\n droppable: true,\n hoverable: true,\n });\n } else if (component.attributes['block-slug'] !== undefined) {\n // change visibility of child elements that depend on whether this block is editable\n component.find('[phpb-hide-if-not-editable]').forEach((element) => {\n if (allowEditableComponents || window.afterInitialRendering) {\n element.addClass('editable');\n } else {\n element.removeClass('editable');\n }\n });\n\n // we just entered a new block, set default permissions\n let permissions = {\n selectable: true,\n hoverable: true,\n };\n if (! directlyInsideDynamicBlock) {\n // the block we entered is not located directly inside a dynamic block, hence this block can be removed, dragged, configured and styled\n permissions = {\n removable: true,\n draggable: true,\n copyable: true,\n selectable: true,\n hoverable: true,\n stylable: true,\n };\n // for styling this particular block, the block needs to have a unique class\n addUniqueClass(component);\n }\n if (component.attributes['is-html'] === 'true') {\n // the block we just entered is an html block,\n // the next layer of child blocks are not directly inside a dynamic block\n directlyInsideDynamicBlock = false;\n // in an html block, editing elements (based on their html tag) is allowed\n allowEditableComponents = true;\n } else {\n // the block we just entered is dynamic,\n // the next layer of child blocks are directly inside a dynamic block\n directlyInsideDynamicBlock = true;\n // in a dynamic block, editing elements (based on their html tag) is not allowed\n allowEditableComponents = false;\n // dynamic blocks do not have text-editable components, so remove text cursors\n component.getEl().setAttribute('data-cursor', 'default');\n }\n component.set(permissions);\n }\n\n // for raw content components, set editable to true and ignore processing editability for any child component\n if (component.attributes.attributes['data-raw-content'] !== undefined) {\n component.set({editable: true});\n return;\n }\n\n // set editable access based on tags, styling or html class attribute\n if (allowEditableComponents) {\n allowEditBasedOnComponentAttributes(component);\n\n // if the component is made text-editable, re-add the raw html contents\n // to ensure the text editor does not deal with elements with attributes added by GrapesJS\n if (component.attributes['made-text-editable'] === 'true') {\n component.attributes.attributes['data-raw-content'] = 'true';\n\n // refresh the current component in order to switch its component type to raw-content.\n // this disables GrapesJS parsing of any child elements, avoiding that any GrapesJS specific html attributes are added\n let replaced = component.replaceWith(component.toHTML());\n let newComponent = Array.isArray(replaced) ? replaced[0] : replaced;\n if (newComponent) {\n // copy important attributes from the original component to the refreshed component\n ['block-id', 'block-slug', 'is-html', 'style-identifier'].forEach(attribute => {\n newComponent.attributes[attribute] = component.attributes[attribute];\n });\n // apply block/component edit restrictions to the new raw-content type version of the component\n restrictEditAccess(newComponent);\n }\n return;\n }\n }\n\n // apply edit restrictions to child components\n component.get('components').each(component => restrictEditAccess(component, directlyInsideDynamicBlock, allowEditableComponents));\n }\n\n /**\n * Set the given component's editability based on which tag the component represents,\n * which attributes are set or which styling is applied.\n *\n * @param component\n * @returns {boolean}\n */\n function allowEditBasedOnComponentAttributes(component) {\n let htmlTag = component.get('tagName');\n\n let textEditableTags = [\n //'div','span', // needed for editable bootstrap alert, but cannot be used since divs (block containers) then cannot be removed\n 'h1','h2','h3','h4','h5','h6','h7',\n 'p','small','b','strong','i','em','label','button',\n 'ol', 'ul','li','table'\n ];\n let otherEditableTags = [\n 'img'\n ];\n\n let settings = {};\n if ('phpb-blocks-container' in component.attributes.attributes) {\n settings.hoverable = true;\n settings.selectable = true;\n settings.droppable = true;\n }\n\n if (textEditableTags.includes(htmlTag) || 'phpb-editable' in component.attributes.attributes) {\n settings.editable = true;\n component.attributes['made-text-editable'] = 'true';\n } else if (otherEditableTags.includes(htmlTag)) {\n settings.editable = true;\n }\n\n if (componentHasBackground(component)) {\n settings.hoverable = true;\n settings.selectable = true;\n settings.stylable = true;\n }\n\n if (htmlTag === 'a') {\n settings.hoverable = true;\n settings.selectable = true;\n settings.stylable = true;\n settings.removable = true;\n }\n\n if (Object.keys(settings).length > 0) {\n component.set(settings);\n if (settings.stylable !== undefined && settings.stylable) {\n addUniqueClass(component);\n }\n }\n }\n\n /**\n * Add a unique class to this component to ensure style only applies to this component instance.\n *\n * @param component\n */\n function addUniqueClass(component) {\n // get component identifier class if one is already added to the component's html when saving the pagebuilder previously\n let componentIdentifier = false;\n component.getClasses().forEach(componentClass => {\n if (componentClass.startsWith('ID') && componentClass.length >= 16) {\n componentIdentifier = componentClass;\n }\n });\n\n if (component.attributes['style-identifier'] === undefined) {\n component.attributes['style-identifier'] = componentIdentifier ? componentIdentifier : generateId();\n }\n component.addClass(component.attributes['style-identifier']);\n }\n\n /**\n * Disable all edit functionality on the given component.\n *\n * @param component\n */\n function disableAllEditFunctionality(component) {\n component.set({\n removable: false,\n draggable: false,\n droppable: false,\n badgable: false,\n stylable: false,\n highlightable: false,\n copyable: false,\n resizable: false,\n editable: false,\n layerable: false,\n selectable: false,\n hoverable: false\n });\n }\n\n /**\n * Generate a unique id string.\n *\n * Based on: https://gist.github.com/gordonbrander/2230317\n */\n let counter = 0;\n function generateId() {\n return 'ID' + (Date.now().toString(36)\n + Math.random().toString(36).substr(2, 5) + counter++).toUpperCase();\n }\n\n /**\n * Wait for GrapesJS to be fully loaded before trying to load the components in the page builder.\n */\n function waitForGrapesToLoad() {\n if (window.grapesJSLoaded) {\n afterGrapesJSLoaded();\n } else {\n setTimeout(waitForGrapesToLoad, 100);\n }\n }\n waitForGrapesToLoad();\n\n\n","\n\n window.pageData = {};\n\n window.changesOffset = 0;\n window.onbeforeunload = confirmExit;\n function confirmExit() {\n let changesCount = window.editor.getModel().get('changesCount') - window.changesOffset;\n if (changesCount > 0) {\n return \"Are you sure? There are unsaved changes.\";\n }\n }\n\n /**\n * Save page on clicking save button.\n */\n const savePageBtn = document.getElementById(\"save-page\");\n if (savePageBtn) {\n savePageBtn.addEventListener('click', function() {\n saveAllTranslationsToServer();\n });\n }\n\n /**\n * Save page on Ctrl + S.\n */\n document.addEventListener(\"keydown\", function(e) {\n if (e.ctrlKey && (e.key === 's' || e.key === 'S' || e.which === 83)) {\n // text-editor updates are not applied until focus is lost, so force GrapesJS update\n window.editor.store();\n\n saveAllTranslationsToServer();\n e.preventDefault();\n return false;\n }\n });\n\n /**\n * Switch the pagebuilder to the given language.\n * This stores the all data of the current language locally for later use and renders the given language variant on the server.\n *\n * @param newLanguage\n * @param callback\n */\n window.switchLanguage = function(newLanguage, callback) {\n window.setWaiting(true);\n\n saveCurrentTranslationLocally(async function() {\n applyChangesFromCurrentLanguageToNewLanguage(newLanguage);\n\n let data = window.pageData;\n data.blocks = {[newLanguage]: window.pageBlocks[newLanguage]};\n\n const formData = new URLSearchParams();\n formData.append('data', JSON.stringify(data));\n formData.append('language', newLanguage);\n\n // render the language variant server-side\n try {\n const response = await fetch(window.renderLanguageVariantUrl, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded',\n 'X-Requested-With': 'XMLHttpRequest'\n },\n body: formData\n });\n\n if (!response.ok) {\n let errData = {};\n try { errData = await response.json(); } catch(e) {}\n let errorMessage = response.statusText + ' ' + response.status;\n errorMessage = errData.message ? (errorMessage + ': \"' + errData.message + '\"') : errorMessage;\n window.toastr.error(errorMessage);\n window.toastr.error(window.translations['toastr-switching-language-failed']);\n callback();\n window.setWaiting(false);\n return;\n }\n\n const responseText = await response.text();\n let parsed = JSON.parse(responseText);\n window.pageBlocks[newLanguage] = parsed.dynamicBlocks ? parsed.dynamicBlocks : {};\n callback();\n window.setWaiting(false);\n } catch (error) {\n callback();\n console.error(error);\n window.toastr.error(error.message || 'Error');\n window.toastr.error(window.translations['toastr-switching-language-failed']);\n window.setWaiting(false);\n }\n });\n };\n\n /**\n * Copy new blocks of the current language to the new language or remove old blocks from the new language.\n *\n * @param newLanguage\n */\n function applyChangesFromCurrentLanguageToNewLanguage(newLanguage) {\n let newLanguageBlocks = window.pageBlocks[newLanguage];\n let currentLanguageBlocks = window.pageBlocks[window.currentLanguage];\n\n if (newLanguageBlocks === undefined) {\n newLanguageBlocks = currentLanguageBlocks;\n } else {\n updateNestedBlocks(currentLanguageBlocks, newLanguageBlocks);\n\n // copy missing blocks from the current language to the target language\n for (let blockId in currentLanguageBlocks) {\n if (newLanguageBlocks[blockId] === undefined) {\n newLanguageBlocks[blockId] = currentLanguageBlocks[blockId];\n }\n }\n }\n\n // copy the content of blocks containers of the current language to the blocks containers of the new language\n for (let blockId in currentLanguageBlocks) {\n let currentBlockHtml = (currentLanguageBlocks[blockId] && currentLanguageBlocks[blockId]['html']) || '';\n let newBlockHtml = (newLanguageBlocks[blockId] && newLanguageBlocks[blockId]['html']) || '';\n\n let currDiv = document.createElement(\"div\");\n currDiv.innerHTML = currentBlockHtml;\n let newDiv = document.createElement(\"div\");\n newDiv.innerHTML = newBlockHtml;\n\n let currContainers = currDiv.querySelectorAll(\"[phpb-blocks-container]\");\n let newContainers = newDiv.querySelectorAll(\"[phpb-blocks-container]\");\n\n currContainers.forEach((cont, index) => {\n if (newContainers[index]) {\n newContainers[index].innerHTML = cont.innerHTML;\n }\n });\n newLanguageBlocks[blockId]['html'] = newDiv.innerHTML;\n }\n\n window.pageBlocks[newLanguage] = newLanguageBlocks;\n }\n\n /**\n * Replace phpb-blocks-container html snippets if a block of the current language already exists in the target language.\n * This ensures all child blocks are present for all languages and they remain in the same order\n */\n function updateNestedBlocks(currentLanguageBlocks, newLanguageBlocks) {\n for (let blockId in currentLanguageBlocks) {\n // skip if the parent block does not yet exist in the target language\n if (newLanguageBlocks[blockId] === undefined) {\n continue;\n }\n\n for (let subBlockId in currentLanguageBlocks[blockId].blocks) {\n let updatedSubBlock = currentLanguageBlocks[blockId].blocks[subBlockId];\n let oldSubBlock = newLanguageBlocks[blockId].blocks[subBlockId];\n if (! updatedSubBlock || ! oldSubBlock) {\n continue;\n }\n\n let updatedSubBlockMatches = updatedSubBlock.html.match(/phpb-blocks-container(.*)>(.*)(.*) {\n let data = getContainerContentInStorageFormat(container);\n\n window.pageData['css'] = mergeCss(existingCss, data.css);\n window.pageData['style'] = data.style;\n window.pageData['html'][index] = data.html;\n window.pageData['components'][index] = data.components;\n\n window.pageBlocks[window.currentLanguage] = {...window.pageBlocks[window.currentLanguage], ...data.blocks};\n window.contentContainerComponents[index] = data.components;\n });\n\n if (callback) {\n callback();\n }\n }, 200);\n }\n\n /**\n * Add all selectors from existingCss that are missing in newCss.\n * Backwards compatibility fix: losing CSS due to having different block style identifiers for different languages.\n */\n function mergeCss(existingCss, newCss) {\n if (! existingCss) {\n return newCss;\n }\n let pageBlocksString = JSON.stringify(window.pageBlocks);\n let regex = \"\\\\.ID(.*?){(.*?)}\"\n let matches = existingCss.match(new RegExp(regex, 'g'));\n if (! matches) {\n return newCss;\n }\n matches.forEach(function(css) {\n let selector = css.split('{')[0];\n let pageBlocksStringSelector = selector.replace('.', ' ').trim();\n if (newCss.indexOf(selector) === -1 && pageBlocksString.indexOf(pageBlocksStringSelector) >= 0) {\n newCss += css;\n }\n });\n return newCss;\n }\n\n /**\n * Remove the style selectors that are no longer present among the current page blocks.\n */\n function removeOldStyleSelectors(styleComponents) {\n let pageBlocksString = JSON.stringify(window.pageBlocks);\n\n let updatedStyleComponents = [];\n styleComponents.forEach(styleComponent => {\n if (styleComponent.attributes.selectors.models.length) {\n let selector = styleComponent.attributes.selectors.models[0].id;\n if (pageBlocksString.includes(selector)) {\n updatedStyleComponents.push(styleComponent);\n }\n }\n });\n return updatedStyleComponents;\n }\n\n /**\n * Save the data of all translation variants on the server.\n */\n function saveAllTranslationsToServer() {\n toggleSaving();\n\n saveCurrentTranslationLocally(async function() {\n\n // update all language variants with the latest data of the current language we just saved locally\n Object.keys(window.languages || {}).forEach(languageCode => {\n if (languageCode !== window.currentLanguage) {\n applyChangesFromCurrentLanguageToNewLanguage(languageCode);\n }\n });\n\n let data = window.pageData;\n data.style = removeOldStyleSelectors(data.style);\n data.blocks = window.pageBlocks;\n\n const saveBtn = document.getElementById(\"save-page\");\n const saveUrl = saveBtn ? (saveBtn.dataset.url || saveBtn.getAttribute('data-url')) : '';\n\n const formData = new URLSearchParams();\n formData.append('data', JSON.stringify(data));\n\n try {\n const response = await fetch(saveUrl, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded',\n 'X-Requested-With': 'XMLHttpRequest'\n },\n body: formData\n });\n\n toggleSaving();\n\n if (!response.ok) {\n let errData = {};\n try { errData = await response.json(); } catch(e) {}\n let errorMessage = response.statusText + ' ' + response.status;\n errorMessage = errData.message ? (errorMessage + ': \"' + errData.message + '\"') : errorMessage;\n window.toastr.error(errorMessage);\n window.toastr.error(window.translations['toastr-saving-failed']);\n return;\n }\n\n window.toastr.success(window.translations['toastr-changes-saved']);\n\n setTimeout(function() {\n window.changesOffset = window.editor.getModel().get('changesCount');\n }, 250);\n } catch(error) {\n toggleSaving();\n console.error(error);\n window.toastr.error(error.message || 'Error');\n window.toastr.error(window.translations['toastr-saving-failed']);\n }\n });\n }\n\n /**\n * Get the given component in storage format (in context of its container with all siblings removed).\n *\n * @param component\n */\n window.getComponentDataInStorageFormat = function(component) {\n // clone component's parent, enabling us to temporarily remove all component's siblings without updating the pagebuilder\n let container = window.cloneComponent(component.parent());\n\n\n console.log({\n container: container,\n componentParent: component.parent(),\n })\n // remove all component's siblings since we only want to return the given component in storage format\n\n // container.get('components').reset();\n // container.append(component);\n const componentId = component.attributes['block-id']\n console.log(component.attributes['block-id'])\n container.components().forEach(c => {\n console.log({c})\n // console.log(c?.attributes['block-id'])\n // console.log(c?.attributes['block-id'] !== componentId)\n if(c?.attributes['block-id'] !== componentId) {\n c?.remove()\n }\n })\n\n console.log({\n containerL: container.get('components').length,\n componentParentL: component.parent().get('components').length,\n })\n return getContainerContentInStorageFormat(container);\n };\n\n /**\n * Get the given container in storage format.\n *\n * @param container\n */\n function getContainerContentInStorageFormat(container) {\n // remove all existing references while cloning GrapesJS components,\n // this prevents GrapesJS from changing our IDs due to ID collisions\n let componentReferences = window.editor.DomComponents.componentsById;\n window.editor.DomComponents.componentsById = [];\n\n // we need to clone the container, since we will be replacing components with placeholders and we don't want to update the page builder\n container = window.cloneComponent(container);\n // replace each pagebuilder block for a shortcode and phpb-block element and return an array of all page blocks data\n let blocksData = replaceDynamicBlocksWithPlaceholders(container).blocks;\n\n let html = window.html_beautify(getContainerHtml(container));\n let css = window.editor.getCss();\n let style = window.editor.getStyle();\n let components = JSON.parse(JSON.stringify(container.get('components')));\n\n // switch back to original GrapesJS component references\n window.editor.DomComponents.componentsById = componentReferences;\n\n return {\n html: html,\n css: css,\n components: components,\n blocks: blocksData,\n style: style,\n }\n }\n\n /**\n * Return the html representation of the contents of the given container.\n *\n * @param container\n */\n function getContainerHtml(container) {\n let html = '';\n container.get('components').forEach(component => html += component.toHTML());\n let div = document.createElement(\"div\");\n div.innerHTML = html;\n // replace phpb-block elements with shortcode\n div.querySelectorAll('phpb-block').forEach(el => {\n let slug = el.getAttribute('slug') || '';\n let id = el.getAttribute('id') || '';\n el.replaceWith('[block slug=\"' + slug + '\" id=\"' + id + '\"]');\n });\n return div.innerHTML;\n }\n\n /**\n * Return the html representation of the given component.\n *\n * @param component\n */\n function getComponentHtml(component) {\n let div = document.createElement(\"div\");\n div.innerHTML = component.toHTML();\n // replace phpb-block elements with shortcode\n div.querySelectorAll('phpb-block').forEach(el => {\n let slug = el.getAttribute('slug') || '';\n let id = el.getAttribute('id') || '';\n el.replaceWith('[block slug=\"' + slug + '\" id=\"' + id + '\"]');\n });\n return div.innerHTML;\n }\n\n /**\n * Replace all blocks with is-html === false with a component that contains all block attributes.\n *\n * @param component\n * @param parentIsDynamic\n * @param parentIsHtmlInsideDynamic\n */\n function replaceDynamicBlocksWithPlaceholders(component, parentIsDynamic = false, parentIsHtmlInsideDynamic = false) {\n // data structure to be filled with the data of nested blocks via recursive calls\n let data = {\n current_block: {settings: {}, blocks: {}, html: \"\", is_html: false},\n blocks: {}\n };\n\n // update variables for passing context to the recursive calls on child components\n let newParentIsDynamic = parentIsDynamic;\n let newParentIsHtmlInsideDynamic = parentIsHtmlInsideDynamic;\n if (component.attributes['block-id'] !== undefined) {\n if (component.attributes['is-html'] === 'false') {\n newParentIsDynamic = true;\n newParentIsHtmlInsideDynamic = false;\n } else if (parentIsDynamic) {\n newParentIsDynamic = false;\n newParentIsHtmlInsideDynamic = true;\n }\n }\n\n // depth-first recursive call for replacing nested blocks (the deepest blocks are handled first)\n component.get('components').forEach(function(childComponent) {\n let childData = replaceDynamicBlocksWithPlaceholders(childComponent, newParentIsDynamic, newParentIsHtmlInsideDynamic);\n\n // update data object with child data\n for (let key in childData.current_block.blocks) { data.current_block.blocks[key] = childData.current_block.blocks[key]; }\n for (let key in childData.blocks) { data.blocks[key] = childData.blocks[key]; }\n });\n\n // if the method is called with a cloned container (which does not have a parent), this top-level component does not need any changes\n if (! component.parent()) {\n return data;\n }\n\n // if the component is not a block, no replacements need to be done\n if (component.attributes['block-id'] === undefined) {\n return data;\n }\n\n // do the actual replacement of this component with a placeholder component\n if (component.attributes['is-html'] === 'true') {\n if (parentIsDynamic) {\n // the full html content of html blocks directly inside a dynamic block should be stored in parent context using its block-id,\n // this is important because a dynamic block defines block ids and this can collide with block ids hardcoded in other dynamic blocks\n data.current_block['blocks'][component.attributes['block-id']] = {settings: {}, blocks: {}, html: window.html_beautify(getComponentHtml(component)), is_html: true};\n } else {\n // html blocks outside direct context of dynamic blocks should be stored as a block itself\n\n // store the block's style-identifier\n // this will be used as class in a wrapper around the dynamic block to give the block its styling\n if (component.attributes['style-identifier'] !== undefined) {\n data.current_block['settings']['attributes'] = {'style-identifier': component.attributes['style-identifier']};\n }\n\n // replace this html component by a shortcode with a unique id\n let instanceId = component.attributes['block-id'];\n if (! component.attributes['block-id'].startsWith('ID')) {\n instanceId = generateId();\n }\n\n component.replaceWith({\n tagName: 'phpb-block',\n attributes: {\n slug: component.attributes['block-slug'],\n id: instanceId\n }\n });\n\n // store the block data globally in the blocks array\n data.blocks[instanceId] = {settings: data.current_block['settings'], blocks: {}, html: window.html_beautify(getComponentHtml(component)), is_html: true};\n data.current_block = {settings: {}, blocks: {}, html: \"\", is_html: false};\n }\n } else {\n // store the attributes set to this block using traits in the settings side panel\n let attributes = {};\n component.get('traits').each(function(trait) {\n attributes[trait.get('name')] = trait.getTargetValue();\n });\n data.current_block['settings']['attributes'] = attributes;\n\n // store the block's style-identifier\n // this will be used as class in a wrapper around the dynamic block to give the block its styling\n if (component.attributes['style-identifier'] !== undefined) {\n data.current_block['settings']['attributes']['style-identifier'] = component.attributes['style-identifier'];\n }\n\n // replace this dynamic component by a shortcode with a unique id\n let instanceId = component.attributes['block-id'];\n if (! component.attributes['block-id'].startsWith('ID')) {\n instanceId = generateId();\n }\n component.replaceWith({\n tagName: 'phpb-block',\n attributes: {\n slug: component.attributes['block-slug'],\n id: instanceId\n }\n });\n\n // store data.current_block data inside data.blocks with the unique id we just generated\n if (parentIsDynamic) {\n // inside a dynamic block, the block data is passed to the context of its parent block (so current_block is used)\n let currentBlockForParent = {settings: {}, blocks: {}, html: \"\", is_html: false};\n currentBlockForParent['blocks'][component.attributes['block-id']] = data.current_block;\n data.current_block = currentBlockForParent;\n } else {\n // outside dynamic blocks, the block data is globally stored in the blocks array\n data.blocks[instanceId] = data.current_block;\n data.current_block = {settings: {}, blocks: {}, html: \"\", is_html: false};\n }\n }\n\n return data;\n }\n\n /**\n * Generate a unique id string.\n *\n * Based on: https://gist.github.com/gordonbrander/2230317\n */\n let counter = 0;\n function generateId() {\n return 'ID' + (Date.now().toString(36)\n + Math.random().toString(36).substr(2, 5) + counter++).toUpperCase();\n }\n\n /**\n * Set the page builder waiting status.\n */\n window.setWaiting = function(value) {\n let wrapper = window.editor.DomComponents.getWrapper();\n if (value) {\n wrapper.addClass(\"gjs-waiting\");\n } else {\n wrapper.removeClass(\"gjs-waiting\");\n }\n };\n\n /**\n * Toggle the save button waiting status.\n */\n function toggleSaving() {\n let button = document.getElementById(\"save-page\");\n if (!button) return;\n button.blur();\n\n let spinner = button.querySelector('.spinner-border') || button.querySelector('.loading');\n\n if (button.classList.contains('waiting')) {\n button.removeAttribute(\"disabled\");\n button.classList.remove('waiting');\n if (spinner) spinner.classList.add('d-none');\n } else {\n button.setAttribute(\"disabled\", \"true\");\n button.classList.add('waiting');\n if (spinner) spinner.classList.remove('d-none');\n }\n }\n\n\n","export function sanitizeHtml(html) {\n if (!html) return '';\n // remove all not allowed tags\n let result = html.replace(/<(?!\\/?(?:a|table|tr|td|th|thead|tbody|tfoot|caption|col|colgroup|p|ul|ol|li|br|strong|em|b|i|u|strike|s|sub|sup|h1|h2|h3|h4|h5|h6|blockquote|pre|hr|span)\\b)[^>]+>/gim, '');\n\n // remove disallowed attributes from allowed tags, keeping href on anchor and style on table elements\n result = result.replace(/<(a|table|tr|td|th|thead|tbody|tfoot|caption|col|colgroup|p|ul|ol|li|br|strong|em|b|i|u|strike|s|sub|sup|h1|h2|h3|h4|h5|h6|blockquote|pre|hr|span)\\b([^>]*)>/gim, function(match, tag, attrs) {\n tag = tag.toLowerCase();\n if (tag === 'a') {\n const hrefMatch = attrs.match(/href=\"([^\"]*)\"/i) || attrs.match(/href='([^']*)'/i);\n const targetMatch = attrs.match(/target=\"([^\"]*)\"/i) || attrs.match(/target='([^']*)'/i);\n const href = hrefMatch ? ` href=\"${hrefMatch[1]}\"` : '';\n const target = targetMatch && targetMatch[1] === '_blank' ? ' target=\"_blank\"' : '';\n return ``;\n }\n if ('|table|tr|td|th|thead|tbody|tfoot|'.includes('|' + tag + '|')) {\n const styleMatch = attrs.match(/style=\"([^\"]*)\"/i) || attrs.match(/style='([^']*)'/i);\n return styleMatch ? `<${tag} style=\"${styleMatch[1]}\">` : `<${tag}>`;\n }\n return `<${tag}>`;\n });\n\n return result;\n}\n\nfunction setupPasteSanitizer(editor) {\n const handlePaste = ({ ev, rte }) => {\n ev.preventDefault();\n const clipboardData = ev.clipboardData || window.clipboardData;\n if (!clipboardData) return;\n\n const html = clipboardData.getData('text/html');\n const text = clipboardData.getData('text/plain');\n\n if (html) {\n const cleanHtml = sanitizeHtml(html);\n rte.insertHTML(cleanHtml);\n } else if (text) {\n const escaped = text\n .replace(/&/g, '&')\n .replace(//g, '>')\n .replace(/(?:\\r\\n|\\r|\\n)/g, '
');\n rte.insertHTML(escaped);\n }\n };\n\n if (editor.RichTextEditor) {\n const rteConfig = editor.RichTextEditor.getConfig();\n rteConfig.onPaste = handlePaste;\n }\n}\n\nfunction registerToolbarActions(editor) {\n const rte = editor.RichTextEditor;\n if (!rte) return;\n\n // Custom Link action\n if (rte.get('link')) {\n rte.remove('link');\n }\n rte.add('link', {\n icon: '',\n attributes: { title: (window.translations && window.translations['link']) || 'Link' },\n result: r => openLinkModal(editor, r)\n });\n\n if (!rte.get('unorderedList')) {\n rte.add('unorderedList', {\n icon: '',\n attributes: { title: 'Bulleted List' },\n result: r => r.exec('insertUnorderedList')\n });\n }\n\n if (!rte.get('orderedList')) {\n rte.add('orderedList', {\n icon: '',\n attributes: { title: 'Numbered List' },\n result: r => r.exec('insertOrderedList')\n });\n }\n\n if (!rte.get('justifyLeft')) {\n rte.add('justifyLeft', {\n icon: '',\n attributes: { title: 'Align Left' },\n result: r => r.exec('justifyLeft')\n });\n }\n\n if (!rte.get('justifyCenter')) {\n rte.add('justifyCenter', {\n icon: '',\n attributes: { title: 'Align Center' },\n result: r => r.exec('justifyCenter')\n });\n }\n\n if (!rte.get('justifyRight')) {\n rte.add('justifyRight', {\n icon: '',\n attributes: { title: 'Align Right' },\n result: r => r.exec('justifyRight')\n });\n }\n}\n\nfunction openLinkModal(editor, rte) {\n const sel = rte.selection();\n let savedRange = null;\n let currentAnchor = null;\n\n if (sel && sel.rangeCount > 0) {\n savedRange = sel.getRangeAt(0).cloneRange();\n let node = sel.anchorNode;\n if (node) {\n if (node.nodeType === Node.TEXT_NODE) node = node.parentNode;\n currentAnchor = node.closest ? node.closest('a') : null;\n }\n }\n\n let initialType = 'page';\n let initialPageId = '';\n let initialUrl = '';\n let initialTargetBlank = false;\n\n if (currentAnchor) {\n const href = currentAnchor.getAttribute('href') || '';\n if (currentAnchor.getAttribute('target') === '_blank') {\n initialTargetBlank = true;\n }\n if (href.startsWith('[page id=')) {\n initialType = 'page';\n initialPageId = href.substring(9, href.length - 1);\n } else {\n initialType = 'url';\n initialUrl = href;\n }\n }\n\n const pages = window.pages || [];\n const translations = window.translations || {};\n\n const container = document.createElement('div');\n container.className = 'gjs-link-modal-form';\n container.style.padding = '10px 0';\n\n // Type selector: Internal Page vs External URL\n const typeGroup = document.createElement('div');\n typeGroup.style.marginBottom = '12px';\n typeGroup.innerHTML = `\n \n
\n \n \n
\n `;\n container.appendChild(typeGroup);\n\n // Page selection container\n const pageGroup = document.createElement('div');\n pageGroup.style.marginBottom = '12px';\n pageGroup.style.display = initialType === 'page' ? 'block' : 'none';\n\n let pageOptionsHtml = '';\n pages.forEach(item => {\n const title = Array.isArray(item) ? item[0] : (item.title || item.name);\n const id = Array.isArray(item) ? item[1] : item.id;\n const isSelected = String(id) === String(initialPageId) ? 'selected' : '';\n pageOptionsHtml += ``;\n });\n\n pageGroup.innerHTML = `\n \n \n `;\n container.appendChild(pageGroup);\n\n // URL input container\n const urlGroup = document.createElement('div');\n urlGroup.style.marginBottom = '12px';\n urlGroup.style.display = initialType === 'url' ? 'block' : 'none';\n urlGroup.innerHTML = `\n \n \n `;\n container.appendChild(urlGroup);\n\n // Toggle between page and URL\n const radios = typeGroup.querySelectorAll('input[type=\"radio\"]');\n radios.forEach(radio => {\n radio.addEventListener('change', () => {\n if (radio.value === 'page') {\n pageGroup.style.display = 'block';\n urlGroup.style.display = 'none';\n } else {\n pageGroup.style.display = 'none';\n urlGroup.style.display = 'block';\n }\n });\n });\n\n // Target blank checkbox\n const targetGroup = document.createElement('div');\n targetGroup.style.marginBottom = '16px';\n targetGroup.innerHTML = `\n \n `;\n container.appendChild(targetGroup);\n\n // Buttons\n const buttonsGroup = document.createElement('div');\n buttonsGroup.style.display = 'flex';\n buttonsGroup.style.gap = '8px';\n buttonsGroup.style.justifyContent = 'flex-end';\n\n const cancelBtn = document.createElement('button');\n cancelBtn.type = 'button';\n cancelBtn.className = 'btn';\n cancelBtn.innerText = translations['cancel'] || 'Cancel';\n cancelBtn.addEventListener('click', () => editor.Modal.close());\n buttonsGroup.appendChild(cancelBtn);\n\n if (currentAnchor) {\n const unlinkBtn = document.createElement('button');\n unlinkBtn.type = 'button';\n unlinkBtn.className = 'btn btn-danger';\n unlinkBtn.style.color = '#e53e3e';\n unlinkBtn.innerText = translations['unlink'] || 'Remove Link';\n unlinkBtn.addEventListener('click', () => {\n const parent = currentAnchor.parentNode;\n while (currentAnchor.firstChild) {\n parent.insertBefore(currentAnchor.firstChild, currentAnchor);\n }\n parent.removeChild(currentAnchor);\n editor.Modal.close();\n });\n buttonsGroup.appendChild(unlinkBtn);\n }\n\n const applyBtn = document.createElement('button');\n applyBtn.type = 'button';\n applyBtn.className = 'btn btn-primary';\n applyBtn.style.backgroundColor = '#3b82f6';\n applyBtn.style.color = '#fff';\n applyBtn.innerText = translations['apply'] || 'Apply';\n applyBtn.addEventListener('click', () => {\n const selectedType = typeGroup.querySelector('input[type=\"radio\"]:checked').value;\n const pageSelect = pageGroup.querySelector('select');\n const urlInput = urlGroup.querySelector('input');\n const targetBlank = targetGroup.querySelector('input').checked;\n\n let href = '';\n if (selectedType === 'page') {\n if (pageSelect.value) {\n href = `[page id=${pageSelect.value}]`;\n }\n } else {\n href = urlInput.value.trim();\n }\n\n if (!href) {\n editor.Modal.close();\n return;\n }\n\n if (savedRange && rte.doc) {\n const win = rte.doc.defaultView || window;\n const currentSel = win.getSelection();\n if (currentSel) {\n currentSel.removeAllRanges();\n currentSel.addRange(savedRange);\n }\n }\n\n if (currentAnchor) {\n currentAnchor.setAttribute('href', href);\n if (targetBlank) {\n currentAnchor.setAttribute('target', '_blank');\n } else {\n currentAnchor.removeAttribute('target');\n }\n } else {\n const selectedText = savedRange ? savedRange.toString() : '';\n const targetAttr = targetBlank ? ' target=\"_blank\"' : '';\n const textToInsert = selectedText || href;\n rte.insertHTML(`
${textToInsert}`);\n }\n\n editor.Modal.close();\n });\n buttonsGroup.appendChild(applyBtn);\n\n container.appendChild(buttonsGroup);\n\n editor.Modal.open({\n title: translations['link'] || 'Link',\n content: container\n });\n}\n\nlet isInitialized = false;\nexport function initRteLinkManager(editor) {\n if (!editor || !editor.RichTextEditor || isInitialized) return;\n isInitialized = true;\n setupPasteSanitizer(editor);\n registerToolbarActions(editor);\n}\n\nif (typeof window !== 'undefined') {\n if (window.editor) {\n initRteLinkManager(window.editor);\n } else {\n window.addEventListener('load', () => {\n if (window.editor) initRteLinkManager(window.editor);\n });\n }\n}\n","\n\n window.touchStart = function() {\n const gjsEl = document.getElementById('gjs');\n if (gjsEl) gjsEl.classList.add('sidebar-collapsed');\n};\n\n"],"mappings":"C,WAAA,IAAIE,EAAiB,KAErB,SAASC,GAAoB,CAOzB,OANKD,GAAmB,SAAS,KAAK,SAASA,CAAc,IACzDA,EAAiB,SAAS,cAAc,KAAK,EAC7CA,EAAe,UAAY,4BAC3BA,EAAe,MAAM,QAAU,4HAC/B,SAAS,KAAK,YAAYA,CAAc,GAErCA,CACX,CAEA,SAAgBE,EAAUC,EAASC,EAAO,OAAQC,EAAW,KAAM,CAC/D,GAAI,CAACF,EAAS,OACd,IAAMG,EAAYL,EAAkB,EAC9BM,EAAQ,SAAS,cAAc,KAAK,EAC1CA,EAAM,UAAY,eAAeH,IACjCG,EAAM,MAAM,QAAU;;;;;;;;;;;;;4BAaEH,IAAS,UAAY,UAAYA,IAAS,QAAU,UAAY,UAAU;;;;MAMlG,IAAMI,EAAO,SAAS,cAAc,GAAG,EACvCA,EAAK,UAAYJ,IAAS,UAAY,qBAAuBA,IAAS,QAAU,2BAA6B,oBAC7GG,EAAM,YAAYC,CAAI,EAEtB,IAAMC,EAAO,SAAS,cAAc,MAAM,EAC1CA,EAAK,UAAYN,EACjBM,EAAK,MAAM,KAAO,IAClBF,EAAM,YAAYE,CAAI,E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B,EAAI,WAAW,YAAYiB,EAAK,GAAGwB,EAAW,GAAGC,EAAa,KAAK,CACvE,CAEA9Q,EAAO,MAAM,MAAM,CAhBnB,CAiBJ,CAAC,EACDgQ,EAAa,YAAYK,CAAQ,EAEjClR,EAAU,YAAY6Q,CAAY,EAElChQ,EAAO,MAAM,KAAK,CACd,MAAOuP,EAAaZ,MAAW,OAC/B,QAASxP,CACb,CAAC,CACL,CAEA,IAAI4R,EAAgB,GACpB,SAAgBC,EAAmBhR,EAAQ,CAClCA,GAAWA,EAAO,gBAAkB+Q,KACzCA,EAAgB,GAChB9C,GAAoBjO,CAAM,EAC1B0O,GAAuB1O,CAAM,EACjC,CAEI,OAAO,OAAW,MACd,OAAO,OACPgR,EAAmB,OAAO,MAAM,EAEhC,OAAO,iBAAiB,WAAc,CAC9B,OAAO,QAAQA,EAAmB,OAAO,MAAM,CACvD,CAAC,GCrUL,OAAO,WAAa,UAAW,CAC/B,IAAMnR,EAAQ,SAAS,eAAe,KAAK,EACvCA,GAAOA,EAAM,UAAU,IAAI,mBAAmB,CACtD,C"} \ No newline at end of file diff --git a/plugi-core/dist/PageBuilderHead.css b/plugi-core/dist/PageBuilderHead.css index 7e32507..475d1e2 100644 --- a/plugi-core/dist/PageBuilderHead.css +++ b/plugi-core/dist/PageBuilderHead.css @@ -1,4 +1,4 @@ -.CodeMirror{font-family:monospace;height:300px;color:black;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:black}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0 !important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor .CodeMirror-line::selection,.cm-fat-cursor .CodeMirror-line>span::selection,.cm-fat-cursor .CodeMirror-line>span>span::selection{background:transparent}.cm-fat-cursor .CodeMirror-line::-moz-selection,.cm-fat-cursor .CodeMirror-line>span::-moz-selection,.cm-fat-cursor .CodeMirror-line>span>span::-moz-selection{background:transparent}.cm-fat-cursor{caret-color:transparent}@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:0;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:blue}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:red}.cm-invalidchar{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255, 150, 0, 0.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:white}.CodeMirror-scroll{overflow:scroll !important;margin-bottom:-50px;margin-right:-50px;padding-bottom:50px;height:100%;outline:none;position:relative;z-index:0}.CodeMirror-sizer{position:relative;border-right:50px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none;outline:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-50px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none !important;border:none !important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre.CodeMirror-line,.CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255, 255, 0, 0.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:""}span.CodeMirror-selectedtext{background:none}.cm-s-hopscotch.CodeMirror{background:#322931;color:#d5d3d5}.cm-s-hopscotch div.CodeMirror-selected{background:#433b42 !important}.cm-s-hopscotch .CodeMirror-gutters{background:#322931;border-right:0px}.cm-s-hopscotch .CodeMirror-linenumber{color:#797379}.cm-s-hopscotch .CodeMirror-cursor{border-left:1px solid #989498 !important}.cm-s-hopscotch span.cm-comment{color:#b33508}.cm-s-hopscotch span.cm-atom{color:#c85e7c}.cm-s-hopscotch span.cm-number{color:#c85e7c}.cm-s-hopscotch span.cm-property,.cm-s-hopscotch span.cm-attribute{color:#8fc13e}.cm-s-hopscotch span.cm-keyword{color:#dd464c}.cm-s-hopscotch span.cm-string{color:#fdcc59}.cm-s-hopscotch span.cm-variable{color:#8fc13e}.cm-s-hopscotch span.cm-variable-2{color:#1290bf}.cm-s-hopscotch span.cm-def{color:#fd8b19}.cm-s-hopscotch span.cm-error{background:#dd464c;color:#989498}.cm-s-hopscotch span.cm-bracket{color:#d5d3d5}.cm-s-hopscotch span.cm-tag{color:#dd464c}.cm-s-hopscotch span.cm-link{color:#c85e7c}.cm-s-hopscotch .CodeMirror-matchingbracket{text-decoration:underline;color:white !important}.cm-s-hopscotch .CodeMirror-activeline-background{background:#302020}.sp-container{position:absolute;top:0;left:0;display:inline-block;z-index:9999994;overflow:hidden}.sp-container.sp-flat{position:relative}.sp-container,.sp-container *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.sp-top{position:relative;width:100%;display:inline-block}.sp-top-inner{position:absolute;top:0;left:0;bottom:0;right:0}.sp-color{position:absolute;top:0;left:0;bottom:0;right:20%}.sp-hue{position:absolute;top:0;right:0;bottom:0;left:84%;height:100%}.sp-clear-enabled .sp-hue{top:33px;height:77.5%}.sp-fill{padding-top:80%}.sp-sat,.sp-val{position:absolute;top:0;left:0;right:0;bottom:0}.sp-alpha-enabled .sp-top{margin-bottom:18px}.sp-alpha-enabled .sp-alpha{display:block}.sp-alpha-handle{position:absolute;top:-4px;bottom:-4px;width:6px;left:50%;cursor:pointer;border:1px solid #000;background:#fff;opacity:.8}.sp-alpha{display:none;position:absolute;bottom:-14px;right:0;left:0;height:8px}.sp-alpha-inner{border:solid 1px #333}.sp-clear{display:none}.sp-clear.sp-clear-display{background-position:center}.sp-clear-enabled .sp-clear{display:block;position:absolute;top:0px;right:0;bottom:0;left:84%;height:28px}.sp-container,.sp-replacer,.sp-preview,.sp-dragger,.sp-slider,.sp-alpha,.sp-clear,.sp-alpha-handle,.sp-container.sp-dragging .sp-input,.sp-container button{-webkit-user-select:none;-moz-user-select:-moz-none;-o-user-select:none;user-select:none}.sp-container.sp-input-disabled .sp-input-container{display:none}.sp-container.sp-buttons-disabled .sp-button-container{display:none}.sp-container.sp-palette-buttons-disabled .sp-palette-button-container{display:none}.sp-palette-only .sp-picker-container{display:none}.sp-palette-disabled .sp-palette-container{display:none}.sp-initial-disabled .sp-initial{display:none}.sp-sat{background-image:-webkit-gradient(linear, 0 0, 100% 0, from(#FFF), to(rgba(204, 154, 129, 0)));background-image:-webkit-linear-gradient(left, #FFF, rgba(204, 154, 129, 0));background-image:-moz-linear-gradient(left, #fff, rgba(204, 154, 129, 0));background-image:-o-linear-gradient(left, #fff, rgba(204, 154, 129, 0));background-image:-ms-linear-gradient(left, #fff, rgba(204, 154, 129, 0));background-image:linear-gradient(to right, #fff, rgba(204, 154, 129, 0));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr=#FFFFFFFF, endColorstr=#00CC9A81)";filter:progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr="#FFFFFFFF", endColorstr="#00CC9A81")}.sp-val{background-image:-webkit-gradient(linear, 0 100%, 0 0, from(#000000), to(rgba(204, 154, 129, 0)));background-image:-webkit-linear-gradient(bottom, #000000, rgba(204, 154, 129, 0));background-image:-moz-linear-gradient(bottom, #000, rgba(204, 154, 129, 0));background-image:-o-linear-gradient(bottom, #000, rgba(204, 154, 129, 0));background-image:-ms-linear-gradient(bottom, #000, rgba(204, 154, 129, 0));background-image:linear-gradient(to top, #000, rgba(204, 154, 129, 0));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#00CC9A81, endColorstr=#FF000000)";filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#00CC9A81", endColorstr="#FF000000")}.sp-hue{background:-moz-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);background:-ms-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);background:-o-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);background:-webkit-gradient(linear, left top, left bottom, from(#ff0000), color-stop(0.17, #ffff00), color-stop(0.33, #00ff00), color-stop(0.5, #00ffff), color-stop(0.67, #0000ff), color-stop(0.83, #ff00ff), to(#ff0000));background:-webkit-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);background:linear-gradient(to bottom, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%)}.sp-1{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ff0000", endColorstr="#ffff00")}.sp-2{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ffff00", endColorstr="#00ff00")}.sp-3{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#00ff00", endColorstr="#00ffff")}.sp-4{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#00ffff", endColorstr="#0000ff")}.sp-5{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#0000ff", endColorstr="#ff00ff")}.sp-6{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ff00ff", endColorstr="#ff0000")}.sp-hidden{display:none !important}.sp-cf:before,.sp-cf:after{content:"";display:table}.sp-cf:after{clear:both}@media(max-device-width: 480px){.sp-color{right:40%}.sp-hue{left:63%}.sp-fill{padding-top:60%}}.sp-dragger{border-radius:5px;height:5px;width:5px;border:1px solid #fff;background:#000;cursor:pointer;position:absolute;top:0;left:0}.sp-slider{position:absolute;top:0;cursor:pointer;height:3px;left:-1px;right:-1px;border:1px solid #000;background:#fff;opacity:.8}.sp-container{border-radius:0;background-color:#ececec;border:solid 1px #f0c49b;padding:0}.sp-container,.sp-container button,.sp-container input,.sp-color,.sp-hue,.sp-clear{font:normal 12px "Lucida Grande","Lucida Sans Unicode","Lucida Sans",Geneva,Verdana,sans-serif;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.sp-top{margin-bottom:3px}.sp-color,.sp-hue,.sp-clear{border:solid 1px #666}.sp-input-container{float:right;width:100px;margin-bottom:4px}.sp-initial-disabled .sp-input-container{width:100%}.sp-input{font-size:12px !important;border:1px inset;padding:4px 5px;margin:0;width:100%;background:rgba(0,0,0,0);border-radius:3px;color:#222}.sp-input:focus{border:1px solid orange}.sp-input.sp-validation-error{border:1px solid red;background:#fdd}.sp-picker-container,.sp-palette-container{float:left;position:relative;padding:10px;padding-bottom:300px;margin-bottom:-290px}.sp-picker-container{width:172px;border-left:solid 1px #fff}.sp-palette-container{border-right:solid 1px #ccc}.sp-palette-only .sp-palette-container{border:0}.sp-palette .sp-thumb-el{display:block;position:relative;float:left;width:24px;height:15px;margin:3px;cursor:pointer;border:solid 2px rgba(0,0,0,0)}.sp-palette .sp-thumb-el:hover,.sp-palette .sp-thumb-el.sp-thumb-active{border-color:orange}.sp-thumb-el{position:relative}.sp-initial{float:left;border:solid 1px #333}.sp-initial span{width:30px;height:25px;border:none;display:block;float:left;margin:0}.sp-initial .sp-clear-display{background-position:center}.sp-palette-button-container,.sp-button-container{float:right}.sp-replacer{margin:0;overflow:hidden;cursor:pointer;padding:4px;display:inline-block;border:solid 1px #91765d;background:#eee;color:#333;vertical-align:middle}.sp-replacer:hover,.sp-replacer.sp-active{border-color:#f0c49b;color:#111}.sp-replacer.sp-disabled{cursor:default;border-color:silver;color:silver}.sp-dd{padding:2px 0;height:16px;line-height:16px;float:left;font-size:10px}.sp-preview{position:relative;width:25px;height:20px;border:solid 1px #222;margin-right:5px;float:left;z-index:0}.sp-palette{max-width:220px}.sp-palette .sp-thumb-el{width:16px;height:16px;margin:2px 1px;border:solid 1px #d0d0d0}.sp-container{padding-bottom:0}.sp-container button{background-color:#eee;background-image:-webkit-linear-gradient(top, #eeeeee, #cccccc);background-image:-moz-linear-gradient(top, #eeeeee, #cccccc);background-image:-ms-linear-gradient(top, #eeeeee, #cccccc);background-image:-o-linear-gradient(top, #eeeeee, #cccccc);background-image:linear-gradient(to bottom, #eeeeee, #cccccc);border:1px solid #ccc;border-bottom:1px solid #bbb;border-radius:3px;color:#333;font-size:14px;line-height:1;padding:5px 4px;text-align:center;text-shadow:0 1px 0 #eee;vertical-align:middle}.sp-container button:hover{background-color:#ddd;background-image:-webkit-linear-gradient(top, #dddddd, #bbbbbb);background-image:-moz-linear-gradient(top, #dddddd, #bbbbbb);background-image:-ms-linear-gradient(top, #dddddd, #bbbbbb);background-image:-o-linear-gradient(top, #dddddd, #bbbbbb);background-image:linear-gradient(to bottom, #dddddd, #bbbbbb);border:1px solid #bbb;border-bottom:1px solid #999;cursor:pointer;text-shadow:0 1px 0 #ddd}.sp-container button:active{border:1px solid #aaa;border-bottom:1px solid #888;-webkit-box-shadow:inset 0 0 5px 2px #aaa,0 1px 0 0 #eee;-moz-box-shadow:inset 0 0 5px 2px #aaa,0 1px 0 0 #eee;-ms-box-shadow:inset 0 0 5px 2px #aaa,0 1px 0 0 #eee;-o-box-shadow:inset 0 0 5px 2px #aaa,0 1px 0 0 #eee;box-shadow:inset 0 0 5px 2px #aaa,0 1px 0 0 #eee}.sp-cancel{font-size:11px;color:#d93f3f !important;margin:0;padding:2px;margin-right:5px;vertical-align:middle;text-decoration:none}.sp-cancel:hover{color:#d93f3f !important;text-decoration:underline}.sp-palette span:hover,.sp-palette span.sp-thumb-active{border-color:#000}.sp-preview,.sp-alpha,.sp-thumb-el{position:relative;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}.sp-preview-inner,.sp-alpha-inner,.sp-thumb-inner{display:block;position:absolute;top:0;left:0;bottom:0;right:0}.sp-palette .sp-thumb-inner{background-position:50% 50%;background-repeat:no-repeat}.sp-palette .sp-thumb-light.sp-thumb-active .sp-thumb-inner{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIVJREFUeNpiYBhsgJFMffxAXABlN5JruT4Q3wfi/0DsT64h8UD8HmpIPCWG/KemIfOJCUB+Aoacx6EGBZyHBqI+WsDCwuQ9mhxeg2A210Ntfo8klk9sOMijaURm7yc1UP2RNCMbKE9ODK1HM6iegYLkfx8pligC9lCD7KmRof0ZhjQACDAAceovrtpVBRkAAAAASUVORK5CYII=)}.sp-palette .sp-thumb-dark.sp-thumb-active .sp-thumb-inner{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAMdJREFUOE+tkgsNwzAMRMugEAahEAahEAZhEAqlEAZhEAohEAYh81X2dIm8fKpEspLGvudPOsUYpxE2BIJCroJmEW9qJ+MKaBFhEMNabSy9oIcIPwrB+afvAUFoK4H0tMaQ3XtlrggDhOVVMuT4E5MMG0FBbCEYzjYT7OxLEvIHQLY2zWwQ3D+9luyOQTfKDiFD3iUIfPk8VqrKjgAiSfGFPecrg6HN6m/iBcwiDAo7WiBeawa+Kwh7tZoSCGLMqwlSAzVDhoK+6vH4G0P5wdkAAAAASUVORK5CYII=)}.sp-clear-display{background-repeat:no-repeat;background-position:center;background-image:url(data:image/gif;base64,R0lGODlhFAAUAPcAAAAAAJmZmZ2dnZ6enqKioqOjo6SkpKWlpaampqenp6ioqKmpqaqqqqurq/Hx8fLy8vT09PX19ff39/j4+Pn5+fr6+vv7+wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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Mico9cqR6tKfY7GeBCuVwlipDNmefAtTrkSzB1RaIAoXodsABiZAEFB06gIBWC1mLVgBa0AAOw==)}.gjs-is__grab,.gjs-is__grab *{cursor:grab !important}.gjs-is__grabbing,.gjs-is__grabbing *{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;cursor:grabbing !important}.gjs-one-bg{background-color:#444}.gjs-one-color{color:#444}.gjs-one-color-h:hover{color:#444}.gjs-two-bg{background-color:#ddd}.gjs-two-color{color:#ddd}.gjs-two-color-h:hover{color:#ddd}.gjs-three-bg{background-color:#804f7b}.gjs-three-color{color:#804f7b}.gjs-three-color-h:hover{color:#804f7b}.gjs-four-bg{background-color:#d278c9}.gjs-four-color{color:#d278c9}.gjs-four-color-h:hover{color:#d278c9}.gjs-danger-bg{background-color:#dd3636}.gjs-danger-color{color:#dd3636}.gjs-danger-color-h:hover{color:#dd3636}.gjs-bg-main,.gjs-sm-colorp-c,.gjs-off-prv{background-color:#444}.gjs-color-main,.gjs-sm-stack #gjs-sm-add,.gjs-off-prv{color:#ddd;fill:#ddd}.gjs-color-active{color:#f8f8f8;fill:#f8f8f8}.gjs-color-warn{color:#ffca6f;fill:#ffca6f}.gjs-color-hl{color:#71b7f1;fill:#71b7f1}.gjs-invis-invis,.gjs-clm-tags #gjs-clm-new,.gjs-no-app{background-color:rgba(0,0,0,0);border:none;color:inherit}.gjs-no-app{height:10px}.gjs-test::btn{color:"#fff"}.opac50{opacity:.5;filter:alpha(opacity=50)}.gjs-checker-bg,.gjs-field-colorp-c,.checker-bg,.gjs-sm-layer-preview{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==")}.gjs-no-user-select,.gjs-rte-toolbar,.gjs-layer-name,.gjs-grabbing,.gjs-grabbing *{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-no-pointer-events,.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el,.gjs-resizer-c{pointer-events:none}.gjs-bdrag{pointer-events:none !important;position:absolute !important;z-index:10 !important;width:auto}.gjs-drag-helper{background-color:#3b97e3 !important;pointer-events:none !important;position:absolute !important;z-index:10 !important;transform:scale(0.3) !important;transform-origin:top left !important;-webkit-transform-origin:top left !important;margin:15px !important;transition:none !important;outline:none !important}.gjs-grabbing,.gjs-grabbing *{cursor:grabbing !important;cursor:-webkit-grabbing !important}.gjs-grabbing{overflow:hidden}.gjs-off-prv{position:relative;z-index:10;padding:5px;cursor:pointer}.gjs-editor-cont ::-webkit-scrollbar-track{background:rgba(0,0,0,.1)}.gjs-editor-cont ::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,.2)}.gjs-editor-cont ::-webkit-scrollbar{width:8px}.clear{clear:both}.no-select,.gjs-clm-tags #gjs-clm-close,.gjs-category-title,.gjs-layer-title,.gjs-block-category .gjs-title,.gjs-sm-sector-title,.gjs-com-no-select,.gjs-com-no-select img{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-no-touch-actions{touch-action:none}.gjs-disabled{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;opacity:.5;filter:alpha(opacity=50)}.gjs-editor{font-family:Helvetica,sans-serif;font-size:.75rem;position:relative;box-sizing:border-box;height:100%}.gjs-freezed,.gjs-freezed{opacity:.5;filter:alpha(opacity=50);pointer-events:none}.gjs-traits-label{border-bottom:1px solid rgba(0,0,0,.2);font-weight:lighter;margin-bottom:5px;padding:10px;text-align:left}.gjs-label-wrp{width:30%;min-width:30%}.gjs-field-wrp{flex-grow:1}.gjs-trt-header{font-weight:lighter;padding:10px}.gjs-trt-trait{display:flex;justify-content:flex-start;padding:5px 10px;font-weight:lighter;align-items:center;text-align:left}.gjs-trt-traits{font-size:.75rem}.gjs-trt-trait .gjs-label{text-align:left;text-overflow:ellipsis;overflow:hidden}.gjs-guide-info{position:absolute}.gjs-guide-info__content{position:absolute;height:100%;display:flex;width:100%;padding:5px}.gjs-guide-info__line{position:relative;margin:auto}.gjs-guide-info__line::before,.gjs-guide-info__line::after{content:"";display:block;position:absolute;background-color:inherit}.gjs-guide-info__y{padding:0 5px}.gjs-guide-info__y .gjs-guide-info__content{justify-content:center}.gjs-guide-info__y .gjs-guide-info__line{width:100%;height:1px}.gjs-guide-info__y .gjs-guide-info__line::before,.gjs-guide-info__y .gjs-guide-info__line::after{width:1px;height:10px;top:0;bottom:0;left:0;margin:auto}.gjs-guide-info__y .gjs-guide-info__line::after{left:auto;right:0}.gjs-guide-info__x{padding:5px 0}.gjs-guide-info__x .gjs-guide-info__content{align-items:center}.gjs-guide-info__x .gjs-guide-info__line{height:100%;width:1px}.gjs-guide-info__x .gjs-guide-info__line::before,.gjs-guide-info__x .gjs-guide-info__line::after{width:10px;height:1px;left:0;right:0;top:0;margin:auto;transform:translateX(-50%)}.gjs-guide-info__x .gjs-guide-info__line::after{top:auto;bottom:0}.gjs-badge{white-space:nowrap}.gjs-badge__icon{vertical-align:middle;display:inline-block;width:15px;height:15px}.gjs-badge__icon svg{fill:currentColor}.gjs-badge__name{display:inline-block;vertical-align:middle}.gjs-frame-wrapper{position:absolute;width:100%;height:100%;left:0;right:0;margin:auto}.gjs-frame-wrapper--anim{transition:width .35s ease,height .35s ease}.gjs-frame-wrapper__top{transform:translateY(-100%) translateX(-50%);display:flex;padding:5px 0;position:absolute;width:100%;left:50%;top:0}.gjs-frame-wrapper__top-r{margin-left:auto}.gjs-frame-wrapper__left{position:absolute;left:0;transform:translateX(-100%) translateY(-50%);height:100%;top:50%}.gjs-frame-wrapper__bottom{position:absolute;bottom:0;transform:translateY(100%) translateX(-50%);width:100%;left:50%}.gjs-frame-wrapper__right{position:absolute;right:0;transform:translateX(100%) translateY(-50%);height:100%;top:50%}.gjs-frame-wrapper__icon{width:24px;cursor:pointer}.gjs-frame-wrapper__icon>svg{fill:currentColor}.gjs-padding-v-top,.gjs-fixedpadding-v-top{width:100%;top:0;left:0}.gjs-padding-v-right,.gjs-fixedpadding-v-right{right:0}.gjs-padding-v-bottom,.gjs-fixedpadding-v-bottom{width:100%;left:0;bottom:0}.gjs-padding-v-left,.gjs-fixedpadding-v-left{left:0}.gjs-cv-canvas{background-color:rgba(0,0,0,.15);box-sizing:border-box;width:85%;height:calc(100% - 40px);bottom:0;overflow:hidden;z-index:1;position:absolute;left:0;top:40px}.gjs-cv-canvas.gjs-cui{width:100%;height:100%;top:0}.gjs-cv-canvas.gjs-is__grab .gjs-cv-canvas__frames,.gjs-cv-canvas.gjs-is__grabbing .gjs-cv-canvas__frames{pointer-events:none}.gjs-cv-canvas__frames{position:absolute;top:0;left:0;width:100%;height:100%}.gjs-cv-canvas .gjs-ghost{display:none;pointer-events:none;background-color:#5b5b5b;border:2px dashed #ccc;position:absolute;z-index:10;opacity:.55;filter:alpha(opacity=55)}.gjs-cv-canvas .gjs-highlighter,.gjs-cv-canvas .gjs-highlighter-sel{position:absolute;outline:1px solid #3b97e3;outline-offset:-1px;pointer-events:none;width:100%;height:100%}.gjs-cv-canvas .gjs-highlighter-warning{outline:3px solid #ffca6f}.gjs-cv-canvas .gjs-highlighter-sel{outline:2px solid #3b97e3;outline-offset:-2px}.gjs-cv-canvas #gjs-tools,.gjs-cv-canvas .gjs-tools{width:100%;height:100%;position:absolute;top:0;left:0;outline:none;z-index:1}.gjs-cv-canvas *{box-sizing:border-box}.gjs-frame{outline:medium none;height:100%;width:100%;border:none;margin:auto;display:block;transition:width .35s ease,height .35s ease;position:absolute;top:0;bottom:0;left:0;right:0}.gjs-toolbar{position:absolute;background-color:#3b97e3;white-space:nowrap;color:#fff;z-index:10;top:0;left:0}.gjs-toolbar-item{width:26px;padding:5px;cursor:pointer;display:inline-block}.gjs-toolbar-item svg{fill:currentColor;vertical-align:middle}.gjs-resizer-c{position:absolute;left:0;top:0;width:100%;height:100%;z-index:9}.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.1;filter:alpha(opacity=10);position:absolute;background-color:#ff0}.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.2;filter:alpha(opacity=20)}.gjs-padding-v-el,.gjs-fixedpadding-v-el{background-color:navy}.gjs-resizer-h{pointer-events:all;position:absolute;border:3px solid #3b97e3;width:10px;height:10px;background-color:#fff;margin:-5px}.gjs-resizer-h-tl{top:0;left:0;cursor:nwse-resize}.gjs-resizer-h-tr{top:0;right:0;cursor:nesw-resize}.gjs-resizer-h-tc{top:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-cl{left:0;margin:auto -5px;top:0;bottom:0;cursor:ew-resize}.gjs-resizer-h-cr{margin:auto -5px;top:0;bottom:0;right:0;cursor:ew-resize}.gjs-resizer-h-bl{bottom:0;left:0;cursor:nesw-resize}.gjs-resizer-h-bc{bottom:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-br{bottom:0;right:0;cursor:nwse-resize}.gjs-pn-panel .gjs-resizer-h{background-color:rgba(0,0,0,.2);border:none;opacity:0;transition:opacity .25s}.gjs-pn-panel .gjs-resizer-h:hover{opacity:1}.gjs-pn-panel .gjs-resizer-h-tc,.gjs-pn-panel .gjs-resizer-h-bc{margin:0 auto;width:100%}.gjs-pn-panel .gjs-resizer-h-cr,.gjs-pn-panel .gjs-resizer-h-cl{margin:auto 0;height:100%}.gjs-resizing .gjs-highlighter,.gjs-resizing .gjs-badge{display:none !important}.gjs-resizing-tl *{cursor:nwse-resize !important}.gjs-resizing-tr *{cursor:nesw-resize !important}.gjs-resizing-tc *{cursor:ns-resize !important}.gjs-resizing-cl *{cursor:ew-resize !important}.gjs-resizing-cr *{cursor:ew-resize !important}.gjs-resizing-bl *{cursor:nesw-resize !important}.gjs-resizing-bc *{cursor:ns-resize !important}.gjs-resizing-br *{cursor:nwse-resize !important}.btn-cl,.gjs-am-close,.gjs-mdl-btn-close{opacity:.3;filter:alpha(opacity=30);font-size:25px;cursor:pointer}.btn-cl:hover,.gjs-am-close:hover,.gjs-mdl-btn-close:hover{opacity:.7;filter:alpha(opacity=70)}.no-dots,.ui-resizable-handle{border:none !important;margin:0 !important;outline:none !important}.gjs-com-dashed *{outline:1px dashed #888;outline-offset:-2px;box-sizing:border-box}.gjs-com-badge,.gjs-badge{pointer-events:none;background-color:#3b97e3;color:#fff;padding:2px 5px;position:absolute;z-index:1;font-size:12px;outline:none;display:none}.gjs-badge-warning{background-color:#ffca6f}.gjs-placeholder,.gjs-com-placeholder,.gjs-placeholder{position:absolute;z-index:10;pointer-events:none;display:none}.gjs-placeholder,.gjs-placeholder{border-style:solid !important;outline:none;box-sizing:border-box;transition:top .2s,left .2s,width .2s,height .2s}.gjs-placeholder.horizontal,.gjs-com-placeholder.horizontal,.gjs-placeholder.horizontal{border-color:rgba(0,0,0,0) #62c462;border-width:3px 5px;margin:-3px 0 0}.gjs-placeholder.vertical,.gjs-com-placeholder.vertical,.gjs-placeholder.vertical{border-color:#62c462 rgba(0,0,0,0);border-width:5px 3px;margin:0 0 0 -3px}.gjs-placeholder-int,.gjs-com-placeholder-int,.gjs-placeholder-int{background-color:#62c462;box-shadow:0 0 3px rgba(0,0,0,.2);height:100%;width:100%;pointer-events:none;padding:1.5px;outline:none}.gjs-pn-panel{display:inline-block;position:absolute;box-sizing:border-box;text-align:center;padding:5px;z-index:3}.gjs-pn-panel .icon-undo,.gjs-pn-panel .icon-redo{font-size:20px;height:30px;width:25px}.gjs-pn-commands{width:85%;left:0;top:0;box-shadow:0 0 5px rgba(0,0,0,.2)}.gjs-pn-options{right:15%;top:0}.gjs-pn-views{border-bottom:2px solid rgba(0,0,0,.2);right:0;width:15%;z-index:4}.gjs-pn-views-container{height:100%;padding:42px 0 0;right:0;width:15%;overflow:auto;box-shadow:0 0 5px rgba(0,0,0,.2)}.gjs-pn-buttons{align-items:center;display:flex;justify-content:space-between}.gjs-pn-btn{box-sizing:border-box;min-height:30px;min-width:30px;line-height:21px;background-color:rgba(0,0,0,0);border:none;font-size:18px;margin-right:5px;border-radius:2px;padding:4px;position:relative;cursor:pointer}.gjs-pn-btn.gjs-pn-active{background-color:rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.25) inset}.gjs-pn-btn svg{fill:currentColor}.gjs-label{line-height:18px}.gjs-fields{display:flex}.gjs-select{padding:0;width:100%}.gjs-select select{padding-right:10px}.gjs-select:-moz-focusring,.gjs-select select:-moz-focusring{color:rgba(0,0,0,0);text-shadow:0 0 0 rgba(255,255,255,.7)}.gjs-input:focus,.gjs-button:focus,.gjs-btn-prim:focus,.gjs-select:focus,.gjs-select select:focus{outline:none}.gjs-field input,.gjs-field select,.gjs-field textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;color:inherit;border:none;background-color:rgba(0,0,0,0);box-sizing:border-box;width:100%;position:relative;padding:5px;z-index:1}.gjs-field input:focus,.gjs-field select:focus,.gjs-field textarea:focus{outline:none}.gjs-field input[type=number]{-moz-appearance:textfield}.gjs-field input[type=number]::-webkit-outer-spin-button,.gjs-field input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.gjs-field-range{flex:9 1 auto}.gjs-field-integer input{padding-right:30px}.gjs-select option,.gjs-field-select option,.gjs-clm-select option,.gjs-sm-select option,.gjs-fields option,.gjs-sm-unit option{background-color:#444;color:#ddd}.gjs-field{background-color:rgba(0,0,0,.2);border:none;box-shadow:none;border-radius:2px;box-sizing:border-box;padding:0;position:relative}.gjs-field textarea{resize:vertical}.gjs-field .gjs-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;z-index:0}.gjs-field .gjs-d-s-arrow{bottom:0;top:0;margin:auto;right:5px;border-top:4px solid rgba(255,255,255,.7);position:absolute;height:0;width:0;border-left:3px solid rgba(0,0,0,0);border-right:4px solid rgba(0,0,0,0);cursor:pointer}.gjs-field-arrows{position:absolute;cursor:ns-resize;margin:auto;height:20px;width:9px;z-index:10;bottom:0;right:3px;top:0}.gjs-field-color,.gjs-field-radio{width:100%}.gjs-field-color input{padding-right:22px;box-sizing:border-box}.gjs-field-colorp{border-left:1px solid rgba(0,0,0,.2);box-sizing:border-box;height:100%;padding:2px;position:absolute;right:0;top:0;width:22px;z-index:10}.gjs-field-colorp .gjs-checker-bg,.gjs-field-colorp .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-field-colorp-c{height:100%;position:relative;width:100%}.gjs-field-color-picker{background-color:#ddd;cursor:pointer;height:100%;width:100%;box-shadow:0 0 1px rgba(0,0,0,.2);border-radius:1px;position:absolute;top:0}.gjs-field-checkbox{padding:0;width:17px;height:17px;display:block;cursor:pointer}.gjs-field-checkbox input{display:none}.gjs-field-checkbox input:checked+.gjs-chk-icon{border-color:rgba(255,255,255,.5);border-width:0 2px 2px 0;border-style:solid}.gjs-radio-item{flex:1 1 auto;text-align:center;border-left:1px solid rgba(0,0,0,.2)}.gjs-radio-item:first-child{border:none}.gjs-radio-item:hover{background:rgba(0,0,0,.2)}.gjs-radio-item input{display:none}.gjs-radio-item input:checked+.gjs-radio-item-label{background-color:rgba(255,255,255,.2)}.gjs-radio-items{display:flex}.gjs-radio-item-label{cursor:pointer;display:block;padding:5px}.gjs-field-units{position:absolute;margin:auto;right:10px;bottom:0;top:0}.gjs-field-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,.7);cursor:pointer}.gjs-input-unit{text-align:center}.gjs-field-arrow-u,.gjs-field-arrow-d{position:absolute;height:0;width:0;border-left:3px solid rgba(0,0,0,0);border-right:4px solid rgba(0,0,0,0);border-top:4px solid rgba(255,255,255,.7);bottom:4px;cursor:pointer}.gjs-field-arrow-u{border-bottom:4px solid rgba(255,255,255,.7);border-top:none;top:4px}.gjs-field-select{padding:0}.gjs-field-range{background-color:rgba(0,0,0,0);border:none;box-shadow:none;padding:0}.gjs-field-range input{margin:0;height:100%}.gjs-field-range input:focus{outline:none}.gjs-field-range input::-webkit-slider-thumb{-webkit-appearance:none;margin-top:-4px;height:10px;width:10px;border:1px solid rgba(0,0,0,.2);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,.2);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-ms-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,.2);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-track{background-color:rgba(0,0,0,.2);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-webkit-slider-runnable-track{background-color:rgba(0,0,0,.2);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-ms-track{background-color:rgba(0,0,0,.2);border-radius:1px;margin-top:3px;height:3px}.gjs-btn-prim{color:inherit;background-color:rgba(255,255,255,.1);border-radius:2px;padding:3px 6px;padding:5px;cursor:pointer;border:none}.gjs-btn-prim:active{background-color:rgba(255,255,255,.1)}.gjs-btn--full{width:100%}.gjs-chk-icon{-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);transform:rotate(45deg);box-sizing:border-box;display:block;height:14px;margin:0 5px;width:6px}.gjs-add-trasp{background:none;border:none;color:#ddd;cursor:pointer;font-size:1em;border-radius:2px;opacity:.75;filter:alpha(opacity=75)}.gjs-add-trasp:hover{opacity:1;filter:alpha(opacity=100)}.gjs-add-trasp:active{background-color:rgba(0,0,0,.2)}.gjs-devices-c{display:flex;align-items:center;padding:2px 3px 3px 3px}.gjs-devices-c .gjs-device-label{flex-grow:2;text-align:left;margin-right:10px}.gjs-devices-c .gjs-select{flex-grow:20}.gjs-devices-c .gjs-add-trasp{flex-grow:1;margin-left:5px}.gjs-category-open,.gjs-block-category.gjs-open,.gjs-sm-sector.gjs-sm-open{border-bottom:1px solid rgba(0,0,0,.25)}.gjs-category-title,.gjs-layer-title,.gjs-block-category .gjs-title,.gjs-sm-sector-title{font-weight:lighter;background-color:rgba(0,0,0,.1);letter-spacing:1px;padding:9px 10px 9px 20px;border-bottom:1px solid rgba(0,0,0,.25);text-align:left;position:relative;cursor:pointer}.gjs-sm-clear{cursor:pointer;width:14px;min-width:14px;height:14px;margin-left:3px}.gjs-sm-header{font-weight:lighter;padding:10px}.gjs-sm-sector{clear:both;font-weight:lighter;text-align:left}.gjs-sm-sector-title{display:flex;align-items:center}.gjs-sm-sector-caret{width:17px;height:17px;min-width:17px;transform:rotate(-90deg)}.gjs-sm-sector-label{margin-left:5px}.gjs-sm-sector.gjs-sm-open .gjs-sm-sector-caret{transform:none}.gjs-sm-properties{font-size:.75rem;padding:10px 5px;display:flex;flex-wrap:wrap;align-items:flex-end;box-sizing:border-box;width:100%}.gjs-sm-label{margin:5px 5px 3px 0;display:flex;align-items:center}.gjs-sm-close-btn,.gjs-sm-preview-file-close{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.7;filter:alpha(opacity=70)}.gjs-sm-close-btn:hover,.gjs-sm-preview-file-close:hover{opacity:.9;filter:alpha(opacity=90)}.gjs-sm-field,.gjs-clm-select,.gjs-clm-field{width:100%;position:relative}.gjs-sm-field input,.gjs-clm-select input,.gjs-clm-field input,.gjs-sm-field select,.gjs-clm-select select,.gjs-clm-field select{background-color:rgba(0,0,0,0);color:rgba(255,255,255,.7);border:none;width:100%}.gjs-sm-field input,.gjs-clm-select input,.gjs-clm-field input{box-sizing:border-box}.gjs-sm-field select,.gjs-clm-select select,.gjs-clm-field select{position:relative;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none}.gjs-sm-field select::-ms-expand,.gjs-clm-select select::-ms-expand,.gjs-clm-field select::-ms-expand{display:none}.gjs-sm-field select:-moz-focusring,.gjs-clm-select select:-moz-focusring,.gjs-clm-field select:-moz-focusring{color:rgba(0,0,0,0);text-shadow:0 0 0 rgba(255,255,255,.7)}.gjs-sm-field input:focus,.gjs-clm-select input:focus,.gjs-clm-field input:focus,.gjs-sm-field select:focus,.gjs-clm-select select:focus,.gjs-clm-field select:focus{outline:none}.gjs-sm-field .gjs-sm-unit,.gjs-clm-select .gjs-sm-unit,.gjs-clm-field .gjs-sm-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,.7);cursor:pointer}.gjs-sm-field .gjs-clm-sel-arrow,.gjs-clm-select .gjs-clm-sel-arrow,.gjs-clm-field .gjs-clm-sel-arrow,.gjs-sm-field .gjs-sm-int-arrows,.gjs-clm-select .gjs-sm-int-arrows,.gjs-clm-field .gjs-sm-int-arrows,.gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-select .gjs-sm-sel-arrow,.gjs-clm-field .gjs-sm-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;cursor:ns-resize}.gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-select .gjs-sm-sel-arrow,.gjs-clm-field .gjs-sm-sel-arrow{cursor:pointer}.gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-select .gjs-clm-d-s-arrow,.gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-select .gjs-sm-d-arrow,.gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-select .gjs-sm-d-s-arrow,.gjs-clm-field .gjs-sm-d-s-arrow,.gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-select .gjs-sm-u-arrow,.gjs-clm-field .gjs-sm-u-arrow{position:absolute;height:0;width:0;border-left:3px solid rgba(0,0,0,0);border-right:4px solid rgba(0,0,0,0);cursor:pointer}.gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-select .gjs-sm-u-arrow,.gjs-clm-field .gjs-sm-u-arrow{border-bottom:4px solid rgba(255,255,255,.7);top:4px}.gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-select .gjs-clm-d-s-arrow,.gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-select .gjs-sm-d-arrow,.gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-select .gjs-sm-d-s-arrow,.gjs-clm-field .gjs-sm-d-s-arrow{border-top:4px solid rgba(255,255,255,.7);bottom:4px}.gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-select .gjs-clm-d-s-arrow,.gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-select .gjs-sm-d-s-arrow,.gjs-clm-field .gjs-sm-d-s-arrow{bottom:7px}.gjs-sm-field.gjs-sm-color,.gjs-sm-color.gjs-clm-field,.gjs-sm-field.gjs-sm-input,.gjs-sm-input.gjs-clm-field,.gjs-sm-field.gjs-sm-integer,.gjs-sm-integer.gjs-clm-field,.gjs-sm-field.gjs-sm-list,.gjs-sm-list.gjs-clm-field,.gjs-sm-field.gjs-sm-select,.gjs-clm-select,.gjs-sm-select.gjs-clm-field{background-color:rgba(0,0,0,.2);border:1px solid rgba(0,0,0,.1);box-shadow:1px 1px 0 rgba(255,255,255,.1);color:rgba(255,255,255,.7);border-radius:2px;box-sizing:border-box;padding:0 5px}.gjs-sm-field.gjs-sm-composite,.gjs-sm-composite.gjs-clm-select,.gjs-sm-composite.gjs-clm-field{border-radius:2px}.gjs-sm-field.gjs-sm-select,.gjs-clm-select,.gjs-sm-select.gjs-clm-field{padding:0}.gjs-sm-field.gjs-sm-select select,.gjs-clm-select select,.gjs-sm-select.gjs-clm-field select{height:20px}.gjs-sm-field.gjs-sm-select option,.gjs-clm-select option,.gjs-sm-select.gjs-clm-field option{padding:3px 0}.gjs-sm-field.gjs-sm-composite,.gjs-sm-composite.gjs-clm-select,.gjs-sm-composite.gjs-clm-field{background-color:rgba(0,0,0,.1);border:1px solid rgba(0,0,0,.25)}.gjs-sm-field.gjs-sm-list,.gjs-sm-list.gjs-clm-select,.gjs-sm-list.gjs-clm-field{width:auto;padding:0;overflow:hidden;float:left}.gjs-sm-field.gjs-sm-list input,.gjs-sm-list.gjs-clm-select input,.gjs-sm-list.gjs-clm-field input{display:none}.gjs-sm-field.gjs-sm-list label,.gjs-sm-list.gjs-clm-select label,.gjs-sm-list.gjs-clm-field label{cursor:pointer;padding:5px;display:block}.gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-sm-list.gjs-clm-select .gjs-sm-radio:checked+label,.gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label{background-color:rgba(255,255,255,.2)}.gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-sm-list.gjs-clm-select .gjs-sm-icon,.gjs-sm-list.gjs-clm-field .gjs-sm-icon{background-repeat:no-repeat;background-position:center;text-shadow:none;line-height:normal}.gjs-sm-field.gjs-sm-integer select,.gjs-sm-integer.gjs-clm-select select,.gjs-sm-integer.gjs-clm-field select{width:auto;padding:0}.gjs-sm-list .gjs-sm-el{float:left;border-left:1px solid rgba(0,0,0,.2)}.gjs-sm-list .gjs-sm-el:first-child{border:none}.gjs-sm-list .gjs-sm-el:hover{background:rgba(0,0,0,.2)}.gjs-sm-slider .gjs-field-integer{flex:1 1 65px}.gjs-sm-property{box-sizing:border-box;float:left;width:50%;margin-bottom:5px;padding:0 5px}.gjs-sm-property--full,.gjs-sm-property.gjs-sm-composite,.gjs-sm-property.gjs-sm-file,.gjs-sm-property.gjs-sm-list,.gjs-sm-property.gjs-sm-stack,.gjs-sm-property.gjs-sm-slider,.gjs-sm-property.gjs-sm-color{width:100%}.gjs-sm-property .gjs-sm-btn{background-color:rgba(33,33,33,.2);border-radius:2px;box-shadow:1px 1px 0 rgba(5,5,5,.2),1px 1px 0 rgba(43,43,43,.2) inset;padding:5px;position:relative;text-align:center;height:auto;width:100%;cursor:pointer;color:#ddd;box-sizing:border-box;text-shadow:-1px -1px 0 rgba(0,0,0,.2);border:none;opacity:.85;filter:alpha(opacity=85)}.gjs-sm-property .gjs-sm-btn-c{box-sizing:border-box;float:left;width:100%}.gjs-sm-property__text-shadow .gjs-sm-layer-preview-cnt::after{color:#000;content:"T";font-weight:900;line-height:17px;padding:0 4px}.gjs-sm-preview-file{background-color:rgba(255,255,255,.05);border-radius:2px;margin-top:5px;position:relative;overflow:hidden;border:1px solid rgba(252,252,252,.05);padding:3px 20px}.gjs-sm-preview-file-cnt{background-size:auto 100%;background-repeat:no-repeat;background-position:center center;height:50px}.gjs-sm-preview-file-close{top:-5px;width:14px;height:14px}.gjs-sm-layers{margin-top:5px;padding:1px 3px;min-height:30px}.gjs-sm-layer{background-color:rgba(255,255,255,.055);border-radius:2px;margin:2px 0;padding:7px;position:relative}.gjs-sm-layer.gjs-sm-active{background-color:rgba(255,255,255,.12)}.gjs-sm-layer .gjs-sm-label-wrp{display:flex;align-items:center}.gjs-sm-layer #gjs-sm-move{height:14px;width:14px;min-width:14px;cursor:grab}.gjs-sm-layer #gjs-sm-label{flex-grow:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin:0 5px}.gjs-sm-layer-preview{height:15px;width:15px;min-width:15px;margin-right:5px;border-radius:2px}.gjs-sm-layer-preview-cnt{border-radius:2px;background-color:#fff;height:100%;width:100%;background-size:cover !important}.gjs-sm-layer #gjs-sm-close-layer{display:block;cursor:pointer;height:14px;width:14px;min-width:14px;opacity:.5;filter:alpha(opacity=50)}.gjs-sm-layer #gjs-sm-close-layer:hover{opacity:.8;filter:alpha(opacity=80)}.gjs-sm-stack .gjs-sm-properties{padding:5px 0 0}.gjs-sm-stack #gjs-sm-add{background:none;border:none;cursor:pointer;outline:none;position:absolute;right:0;top:-17px;opacity:.75;padding:0;width:18px;height:18px}.gjs-sm-stack #gjs-sm-add:hover{opacity:1;filter:alpha(opacity=100)}.gjs-sm-colorp-c{height:100%;width:20px;position:absolute;right:0;top:0;box-sizing:border-box;border-radius:2px;padding:2px}.gjs-sm-colorp-c .gjs-checker-bg,.gjs-sm-colorp-c .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-sm-color-picker{background-color:#ddd;cursor:pointer;height:16px;width:100%;margin-top:-16px;box-shadow:0 0 1px rgba(0,0,0,.2);border-radius:1px}.gjs-sm-btn-upload #gjs-sm-upload{left:0;top:0;position:absolute;width:100%;opacity:0;cursor:pointer}.gjs-sm-btn-upload #gjs-sm-label{padding:2px 0}.gjs-sm-layer>#gjs-sm-move{opacity:.7;filter:alpha(opacity=70);cursor:move;font-size:12px;float:left;margin:0 5px 0 0}.gjs-sm-layer>#gjs-sm-move:hover{opacity:.9;filter:alpha(opacity=90)}.gjs-blocks-c{display:flex;flex-wrap:wrap;justify-content:flex-start}.gjs-block-categories{display:flex;flex-direction:column}.gjs-block-category{width:100%}.gjs-block-category .gjs-caret-icon{margin-right:5px}.gjs-block{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;width:45%;min-width:45px;padding:1em;box-sizing:border-box;min-height:90px;cursor:all-scroll;font-size:11px;font-weight:lighter;text-align:center;display:flex;flex-direction:column;justify-content:space-between;border:1px solid rgba(0,0,0,.2);border-radius:3px;margin:10px 2.5% 5px;box-shadow:0 1px 0 0 rgba(0,0,0,.15);transition:all .2s ease 0s;transition-property:box-shadow,color}.gjs-block:hover{box-shadow:0 3px 4px 0 rgba(0,0,0,.15)}.gjs-block svg{fill:currentColor}.gjs-block__media{margin-bottom:10px;pointer-events:none}.gjs-block-svg{width:54px;fill:currentColor}.gjs-block-svg-path{fill:currentColor}.gjs-block.fa{font-size:2em;line-height:2em;padding:11px}.gjs-block-label{line-height:normal;font-size:.65rem;font-weight:normal;font-family:Helvetica,sans-serif;overflow:hidden;text-overflow:ellipsis;pointer-events:none}.gjs-block.gjs-bdrag{width:auto;padding:0}.gjs-selected-parent{border:1px solid #ffca6f}.gjs-opac50{opacity:.5;filter:alpha(opacity=50)}.gjs-layer{font-weight:lighter;text-align:left;position:relative;background-color:rgba(0,0,0,.1);font-size:.75rem;display:grid}.gjs-layer-hidden{opacity:.55;filter:alpha(opacity=55)}.gjs-layer-count{position:absolute;right:27px;top:9px}.gjs-layer-vis{left:0;top:0;padding:7px 5px 7px 10px;position:absolute;box-sizing:content-box;cursor:pointer;width:13px;z-index:1}.gjs-layer-vis-off{display:none}.gjs-layer-vis.gjs-layer-off .gjs-layer-vis-on{display:none}.gjs-layer-vis.gjs-layer-off .gjs-layer-vis-off{display:block}.gjs-layer-caret{width:15px;padding:2px;cursor:pointer;position:absolute;box-sizing:content-box;left:-15px;top:0;transform:rotate(90deg);opacity:.7;filter:alpha(opacity=70)}.gjs-layer-caret:hover{opacity:1;filter:alpha(opacity=100)}.gjs-layer-caret.gjs-layer-open{transform:rotate(180deg)}.gjs-layer-title{padding:3px 10px 5px 30px;display:flex;align-items:center}.gjs-layer-title-inn{align-items:center;position:relative;display:flex;width:100%}.gjs-layer__icon{display:block;width:100%;max-width:15px;max-height:15px;padding-left:5px}.gjs-layer__icon svg{fill:currentColor}.gjs-layer-name{padding:5px 0;display:inline-block;box-sizing:content-box;overflow:hidden;white-space:nowrap;margin:0 30px 0 5px;max-width:170px}.gjs-layer-name--no-edit{text-overflow:ellipsis}.gjs-layer>.gjs-layer-children{display:none}.gjs-layer.open>.gjs-layer-children{display:block}.gjs-layer-no-chld>.gjs-layer-title-inn>.gjs-layer-caret{display:none}.gjs-layer-move{padding:9px 7px;position:absolute;width:13px;box-sizing:content-box;cursor:move;right:0;top:0}.gjs-layer.gjs-hovered .gjs-layer-title{background-color:rgba(255,255,255,.015)}.gjs-layer.gjs-selected .gjs-layer-title{background-color:rgba(255,255,255,.1)}.gjs-layers{position:relative;height:100%}.gjs-layers #gjs-placeholder{width:100%;position:absolute}.gjs-layers #gjs-placeholder #gjs-plh-int{height:100%;padding:1px}.gjs-layers #gjs-placeholder #gjs-plh-int.gjs-insert{background-color:#62c462}#gjs-clm-add-tag,.gjs-clm-tags-btn{background-color:rgba(255,255,255,.15);border-radius:2px;padding:3px;margin-right:3px;border:1px solid rgba(0,0,0,.15);width:24px;height:24px;box-sizing:border-box;cursor:pointer}.gjs-clm-tags-btn svg{fill:currentColor;display:block}.gjs-clm-header{display:flex;align-items:center;margin:7px 0}.gjs-clm-header-status{flex-shrink:1;margin-left:auto}.gjs-clm-tag{display:flex;overflow:hidden;align-items:center;border-radius:3px;margin:0 3px 3px 0;padding:5px;cursor:default}.gjs-clm-tag-status,.gjs-clm-tag-close{width:12px;height:12px;flex-shrink:1}.gjs-clm-tag-status svg,.gjs-clm-tag-close svg{vertical-align:middle;fill:currentColor}.gjs-clm-sels-info{margin:7px 0;text-align:left}.gjs-clm-sel-id{font-size:.9em;opacity:.5;filter:alpha(opacity=50)}.gjs-clm-label-sel{float:left;padding-right:5px}.gjs-clm-tags{font-size:.75rem;padding:10px 5px}.gjs-clm-tags #gjs-clm-sel{padding:7px 0;float:left}.gjs-clm-tags #gjs-clm-sel{font-style:italic;margin-left:5px}.gjs-clm-tags #gjs-clm-tags-field{clear:both;padding:5px;margin-bottom:5px;display:flex;flex-wrap:wrap}.gjs-clm-tags #gjs-clm-tags-c{display:flex;flex-wrap:wrap;vertical-align:top;overflow:hidden}.gjs-clm-tags #gjs-clm-new{color:#ddd;padding:5px 6px;display:none}.gjs-clm-tags #gjs-clm-close{opacity:.85;filter:alpha(opacity=85);font-size:20px;line-height:0;cursor:pointer;color:rgba(255,255,255,.9)}.gjs-clm-tags #gjs-clm-close:hover{opacity:1;filter:alpha(opacity=100)}.gjs-clm-tags #gjs-clm-checkbox{color:rgba(255,255,255,.9);vertical-align:middle;cursor:pointer;font-size:9px}.gjs-clm-tags #gjs-clm-tag-label{flex-grow:1;text-overflow:ellipsis;overflow:hidden;padding:0 3px;cursor:text}.gjs-mdl-container{font-family:Helvetica,sans-serif;overflow-y:auto;position:fixed;background-color:rgba(0,0,0,.5);display:flex;top:0;left:0;right:0;bottom:0;z-index:100}.gjs-mdl-dialog{text-shadow:-1px -1px 0 rgba(0,0,0,.05);animation:gjs-slide-down .215s;margin:auto;max-width:850px;width:90%;border-radius:3px;font-weight:lighter;position:relative;z-index:2}.gjs-mdl-title{font-size:1rem}.gjs-mdl-btn-close{position:absolute;right:15px;top:5px}.gjs-mdl-active .gjs-mdl-dialog{animation:gjs-mdl-slide-down .216s}.gjs-mdl-header,.gjs-mdl-content{padding:10px 15px;clear:both}.gjs-mdl-header{position:relative;border-bottom:1px solid rgba(0,0,0,.2);padding:15px 15px 7px}.gjs-export-dl::after{content:"";clear:both;display:block;margin-bottom:10px}.gjs-dropzone{display:none;opacity:0;position:absolute;top:0;left:0;z-index:11;width:100%;height:100%;transition:opacity .25s;pointer-events:none}.gjs-dropzone-active .gjs-dropzone{display:block;opacity:1}.gjs-am-assets{height:290px;overflow:auto;clear:both;display:flex;flex-wrap:wrap;align-items:flex-start;align-content:flex-start}.gjs-am-assets-header{padding:5px}.gjs-am-add-asset .gjs-am-add-field{width:70%;float:left}.gjs-am-add-asset button{width:25%;float:right}.gjs-am-preview-cont{position:relative;height:70px;width:30%;background-color:#444;border-radius:2px;float:left;overflow:hidden}.gjs-am-preview{position:absolute;background-position:center center;background-size:cover;background-repeat:no-repeat;height:100%;width:100%;z-index:1}.gjs-am-preview-bg{opacity:.5;filter:alpha(opacity=50);position:absolute;height:100%;width:100%;z-index:0}.gjs-am-dimensions{opacity:.5;filter:alpha(opacity=50);font-size:10px}.gjs-am-meta{width:70%;float:left;font-size:12px;padding:5px 0 0 5px;box-sizing:border-box}.gjs-am-meta>div{margin-bottom:5px}.gjs-am-close{cursor:pointer;position:absolute;right:5px;top:0;display:none}.gjs-am-asset{border-bottom:1px solid rgba(0,0,0,.2);padding:5px;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.gjs-am-asset:hover .gjs-am-close{display:block}.gjs-am-highlight{background-color:rgba(255,255,255,.1)}.gjs-am-assets-cont{background-color:rgba(0,0,0,.1);border-radius:3px;box-sizing:border-box;padding:10px;width:45%;float:right;height:325px;overflow:hidden}.gjs-am-file-uploader{width:55%;float:left}.gjs-am-file-uploader>form{background-color:rgba(0,0,0,.1);border:2px dashed;border-radius:3px;position:relative;text-align:center;margin-bottom:15px}.gjs-am-file-uploader>form.gjs-am-hover{border:2px solid #62c462;color:#75cb75}.gjs-am-file-uploader>form.gjs-am-disabled{border-color:red}.gjs-am-file-uploader>form #gjs-am-uploadFile{opacity:0;filter:alpha(opacity=0);padding:150px 10px;width:100%;box-sizing:border-box}.gjs-am-file-uploader #gjs-am-title{position:absolute;padding:150px 10px;width:100%}.gjs-cm-editor-c{float:left;box-sizing:border-box;width:50%}.gjs-cm-editor-c .CodeMirror{height:450px}.gjs-cm-editor{font-size:12px}.gjs-cm-editor#gjs-cm-htmlmixed{padding-right:10px;border-right:1px solid rgba(0,0,0,.2)}.gjs-cm-editor#gjs-cm-htmlmixed #gjs-cm-title{color:#a97d44}.gjs-cm-editor#gjs-cm-css{padding-left:10px}.gjs-cm-editor#gjs-cm-css #gjs-cm-title{color:#ddca7e}.gjs-cm-editor #gjs-cm-title{background-color:rgba(0,0,0,.2);font-size:12px;padding:5px 10px 3px;text-align:right}.gjs-rte-toolbar{position:absolute;z-index:10}.gjs-rte-toolbar-ui{border:1px solid rgba(0,0,0,.2);border-radius:3px}.gjs-rte-actionbar{display:flex}.gjs-rte-action{display:flex;align-items:center;justify-content:center;padding:5px;width:25px;border-right:1px solid rgba(0,0,0,.2);text-align:center;cursor:pointer;outline:none}.gjs-rte-action:last-child{border-right:none}.gjs-rte-action:hover{background-color:rgba(255,255,255,.1)}.gjs-rte-active{background-color:rgba(255,255,255,.1)}.gjs-rte-disabled{color:rgba(255,255,255,.1);cursor:not-allowed}.gjs-rte-disabled:hover{background-color:unset}.gjs-editor-cont .sp-hue,.gjs-editor-cont .sp-slider{cursor:row-resize}.gjs-editor-cont .sp-color,.gjs-editor-cont .sp-dragger{cursor:crosshair}.gjs-editor-cont .sp-alpha-inner,.gjs-editor-cont .sp-alpha-handle{cursor:col-resize}.gjs-editor-cont .sp-hue{left:90%}.gjs-editor-cont .sp-color{right:15%}.gjs-editor-cont .sp-container{border:1px solid rgba(0,0,0,.2);box-shadow:0 0 7px rgba(0,0,0,.2);border-radius:3px}.gjs-editor-cont .sp-picker-container{border:none}.gjs-editor-cont .colpick_dark .colpick_color{outline:1px solid rgba(0,0,0,.2)}.gjs-editor-cont .sp-cancel,.gjs-editor-cont .sp-cancel:hover{bottom:-8px;color:#777 !important;font-size:25px;left:0;position:absolute;text-decoration:none}.gjs-editor-cont .sp-alpha-handle{background-color:#ccc;border:1px solid #555;width:4px}.gjs-editor-cont .sp-color,.gjs-editor-cont .sp-hue{border:1px solid #333}.gjs-editor-cont .sp-slider{background-color:#ccc;border:1px solid #555;height:3px;left:-4px;width:22px}.gjs-editor-cont .sp-dragger{background:rgba(0,0,0,0);box-shadow:0 0 0 1px #111}.gjs-editor-cont .sp-button-container{float:none;width:100%;position:relative;text-align:right}.gjs-editor-cont .sp-container button,.gjs-editor-cont .sp-container button:hover,.gjs-editor-cont .sp-container button:active{background:rgba(0,0,0,.2);border-color:rgba(0,0,0,.2);color:#ddd;text-shadow:none;box-shadow:none;padding:3px 5px}.gjs-editor-cont .sp-palette-container{border:none;float:none;margin:0;padding:5px 10px 0}.gjs-editor-cont .sp-palette .sp-thumb-el,.gjs-editor-cont .sp-palette .sp-thumb-el:hover{border:1px solid rgba(0,0,0,.9)}.gjs-editor-cont .sp-palette .sp-thumb-el:hover,.gjs-editor-cont .sp-palette .sp-thumb-el.sp-thumb-active{border-color:rgba(0,0,0,.9)}.gjs-hidden{display:none}@keyframes gjs-slide-down{0%{transform:translate(0, -3rem);opacity:0}100%{transform:translate(0, 0);opacity:1}}@keyframes gjs-slide-up{0%{transform:translate(0, 0);opacity:1}100%{transform:translate(0, -3rem);opacity:0}}.cm-s-hopscotch span.cm-error{color:#fff} +.CodeMirror{font-family:monospace;height:300px;color:black;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:black}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0 !important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor-mark{background-color:rgba(20, 255, 20, 0.5);-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}.cm-animate-fat-cursor{width:auto;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:0;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:blue}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:red}.cm-invalidchar{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255, 150, 0, 0.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:white}.CodeMirror-scroll{overflow:scroll !important;margin-bottom:-50px;margin-right:-50px;padding-bottom:50px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:50px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none;outline:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-50px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none !important;border:none !important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre.CodeMirror-line,.CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255, 255, 0, 0.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:""}span.CodeMirror-selectedtext{background:none}.cm-s-hopscotch.CodeMirror{background:#322931;color:#d5d3d5}.cm-s-hopscotch div.CodeMirror-selected{background:#433b42 !important}.cm-s-hopscotch .CodeMirror-gutters{background:#322931;border-right:0px}.cm-s-hopscotch .CodeMirror-linenumber{color:#797379}.cm-s-hopscotch .CodeMirror-cursor{border-left:1px solid #989498 !important}.cm-s-hopscotch span.cm-comment{color:#b33508}.cm-s-hopscotch span.cm-atom{color:#c85e7c}.cm-s-hopscotch span.cm-number{color:#c85e7c}.cm-s-hopscotch span.cm-property,.cm-s-hopscotch span.cm-attribute{color:#8fc13e}.cm-s-hopscotch span.cm-keyword{color:#dd464c}.cm-s-hopscotch span.cm-string{color:#fdcc59}.cm-s-hopscotch span.cm-variable{color:#8fc13e}.cm-s-hopscotch span.cm-variable-2{color:#1290bf}.cm-s-hopscotch span.cm-def{color:#fd8b19}.cm-s-hopscotch span.cm-error{background:#dd464c;color:#989498}.cm-s-hopscotch span.cm-bracket{color:#d5d3d5}.cm-s-hopscotch span.cm-tag{color:#dd464c}.cm-s-hopscotch span.cm-link{color:#c85e7c}.cm-s-hopscotch .CodeMirror-matchingbracket{text-decoration:underline;color:white !important}.cm-s-hopscotch .CodeMirror-activeline-background{background:#302020}.gjs-is__grab,.gjs-is__grab *{cursor:grab !important}.gjs-is__grabbing,.gjs-is__grabbing *{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;cursor:grabbing !important}:root{--gjs-main-color: #444;--gjs-primary-color: #444;--gjs-secondary-color: #ddd;--gjs-tertiary-color: #804f7b;--gjs-quaternary-color: #d278c9;--gjs-font-color: #ddd;--gjs-font-color-active: #f8f8f8;--gjs-main-dark-color: rgba(0, 0, 0, 0.2);--gjs-secondary-dark-color: rgba(0, 0, 0, 0.1);--gjs-main-light-color: rgba(255, 255, 255, 0.1);--gjs-secondary-light-color: rgba(255, 255, 255, 0.7);--gjs-soft-light-color: rgba(255, 255, 255, 0.015);--gjs-color-blue: #3b97e3;--gjs-color-red: #dd3636;--gjs-color-yellow: #ffca6f;--gjs-color-green: #62c462;--gjs-left-width: 15%;--gjs-color-highlight: #71b7f1;--gjs-color-warn: #ffca6f;--gjs-handle-margin: -5px;--gjs-light-border: rgba(255, 255, 255, 0.05);--gjs-arrow-color: rgba(255, 255, 255, 0.7);--gjs-dark-text-shadow: rgba(0, 0, 0, 0.2);--gjs-color-input-padding: 22px;--gjs-input-padding: 5px;--gjs-padding-elem-classmanager: 5px 6px;--gjs-upload-padding: 150px 10px;--gjs-animation-duration: 0.2s;--gjs-main-font: Helvetica, sans-serif;--gjs-font-size: 0.75rem;--gjs-placeholder-background-color: var(--gjs-color-green);--gjs-canvas-top: 40px;--gjs-flex-item-gap: 5px}.gjs-bg-main,.gjs-off-prv,.gjs-sm-colorp-c{background-color:var(--gjs-main-color)}.gjs-color-main,.gjs-off-prv,.gjs-sm-stack #gjs-sm-add{color:var(--gjs-font-color);fill:var(--gjs-font-color)}.gjs-color-active{color:var(--gjs-font-color-active);fill:var(--gjs-font-color-active)}.gjs-color-warn{color:var(--gjs-color-warn);fill:var(--gjs-color-warn)}.gjs-color-hl{color:var(--gjs-color-highlight);fill:var(--gjs-color-highlight)}.gjs-invis-invis,.gjs-clm-tags #gjs-clm-new,.gjs-no-app{background-color:rgba(0,0,0,0);border:none;color:inherit}.gjs-no-app{height:10px}.opac50{opacity:.5;filter:alpha(opacity=50)}.gjs-checker-bg,.gjs-field-colorp-c,.checker-bg,.gjs-sm-layer-preview{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==")}.gjs-no-user-select,.gjs-grabbing,.gjs-grabbing *,.gjs-rte-toolbar,.gjs-layer-name{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-no-pointer-events,.gjs-resizer-c,.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{pointer-events:none}.no-select,.gjs-clm-tags #gjs-clm-close,.gjs-com-no-select,.gjs-com-no-select img,.gjs-category-title,.gjs-layer-title,.gjs-block-category .gjs-title,.gjs-sm-sector-title,.gjs-trait-category .gjs-title{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.clear{clear:both}.gjs-category-open,.gjs-block-category.gjs-open,.gjs-sm-sector.gjs-sm-open,.gjs-trait-category.gjs-open{border-bottom:1px solid rgba(0,0,0,.25)}.gjs-category-title,.gjs-layer-title,.gjs-block-category .gjs-title,.gjs-sm-sector-title,.gjs-trait-category .gjs-title{font-weight:lighter;background-color:var(--gjs-secondary-dark-color);letter-spacing:1px;padding:9px 10px 9px 20px;border-bottom:1px solid rgba(0,0,0,.25);text-align:left;position:relative;cursor:pointer}.btn-cl,.gjs-am-close,.gjs-mdl-btn-close{opacity:.3;filter:alpha(opacity=30);font-size:25px;cursor:pointer}.btn-cl:hover,.gjs-am-close:hover,.gjs-mdl-btn-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-traits-label{border-bottom:1px solid var(--gjs-main-dark-color);font-weight:lighter;margin-bottom:5px;padding:10px;text-align:left}.gjs-label-wrp{width:30%;min-width:30%}.gjs-field-wrp{flex-grow:1}.gjs-traits-c,.gjs-traits-cs{display:flex;flex-direction:column}.gjs-trait-categories{display:flex;flex-direction:column}.gjs-trait-category{width:100%}.gjs-trait-category .gjs-caret-icon{margin-right:5px}.gjs-trt-header{font-weight:lighter;padding:10px}.gjs-trt-trait{display:flex;justify-content:flex-start;padding:5px 10px;font-weight:lighter;align-items:center;text-align:left;gap:5px}.gjs-trt-traits{font-size:var(--gjs-font-size)}.gjs-trt-trait .gjs-label{text-align:left;text-overflow:ellipsis;overflow:hidden}.gjs-guide-info{position:absolute}.gjs-guide-info__content{position:absolute;height:100%;display:flex;width:100%;padding:5px}.gjs-guide-info__line{position:relative;margin:auto}.gjs-guide-info__line::before,.gjs-guide-info__line::after{content:"";display:block;position:absolute;background-color:inherit}.gjs-guide-info__y{padding:0 5px}.gjs-guide-info__y .gjs-guide-info__content{justify-content:center}.gjs-guide-info__y .gjs-guide-info__line{width:100%;height:1px}.gjs-guide-info__y .gjs-guide-info__line::before,.gjs-guide-info__y .gjs-guide-info__line::after{width:1px;height:10px;top:0;bottom:0;left:0;margin:auto}.gjs-guide-info__y .gjs-guide-info__line::after{left:auto;right:0}.gjs-guide-info__x{padding:5px 0}.gjs-guide-info__x .gjs-guide-info__content{align-items:center}.gjs-guide-info__x .gjs-guide-info__line{height:100%;width:1px}.gjs-guide-info__x .gjs-guide-info__line::before,.gjs-guide-info__x .gjs-guide-info__line::after{width:10px;height:1px;left:0;right:0;top:0;margin:auto;transform:translateX(-50%)}.gjs-guide-info__x .gjs-guide-info__line::after{top:auto;bottom:0}.gjs-badge{white-space:nowrap}.gjs-badge__icon{vertical-align:middle;display:inline-block;width:15px;height:15px}.gjs-badge__icon svg{fill:currentColor}.gjs-badge__name{display:inline-block;vertical-align:middle}.gjs-frame-wrapper{position:absolute;width:100%;height:100%;left:0;right:0;margin:auto}.gjs-frame-wrapper--anim{transition:width .35s ease,height .35s ease}.gjs-frame-wrapper__top{transform:translateY(-100%) translateX(-50%);display:flex;padding:5px 0;position:absolute;width:100%;left:50%;top:0}.gjs-frame-wrapper__top-r{margin-left:auto}.gjs-frame-wrapper__left{position:absolute;left:0;transform:translateX(-100%) translateY(-50%);height:100%;top:50%}.gjs-frame-wrapper__bottom{position:absolute;bottom:0;transform:translateY(100%) translateX(-50%);width:100%;left:50%}.gjs-frame-wrapper__right{position:absolute;right:0;transform:translateX(100%) translateY(-50%);height:100%;top:50%}.gjs-frame-wrapper__icon{width:24px;cursor:pointer}.gjs-frame-wrapper__icon>svg{fill:currentColor}.gjs-padding-v-top,.gjs-fixedpadding-v-top{width:100%;top:0;left:0}.gjs-padding-v-right,.gjs-fixedpadding-v-right{right:0}.gjs-padding-v-bottom,.gjs-fixedpadding-v-bottom{width:100%;left:0;bottom:0}.gjs-padding-v-left,.gjs-fixedpadding-v-left{left:0}.gjs-cv-canvas{box-sizing:border-box;width:calc(100% - var(--gjs-left-width));height:calc(100% - var(--gjs-canvas-top));bottom:0;overflow:hidden;z-index:1;position:absolute;left:0;top:var(--gjs-canvas-top)}.gjs-cv-canvas-bg{background-color:rgba(0,0,0,.15)}.gjs-cv-canvas.gjs-cui{width:100%;height:100%;top:0}.gjs-cv-canvas.gjs-is__grab .gjs-cv-canvas__frames,.gjs-cv-canvas.gjs-is__grabbing .gjs-cv-canvas__frames{pointer-events:none}.gjs-cv-canvas__frames{position:absolute;top:0;left:0;width:100%;height:100%}.gjs-cv-canvas__spots{position:absolute;pointer-events:none;z-index:1}.gjs-cv-canvas .gjs-ghost{display:none;pointer-events:none;background-color:#5b5b5b;border:2px dashed #ccc;position:absolute;z-index:10;opacity:.55;filter:alpha(opacity=55)}.gjs-cv-canvas .gjs-highlighter,.gjs-cv-canvas .gjs-highlighter-sel{position:absolute;outline:1px solid var(--gjs-color-blue);outline-offset:-1px;pointer-events:none;width:100%;height:100%}.gjs-cv-canvas .gjs-highlighter-warning{outline:3px solid var(--gjs-color-yellow)}.gjs-cv-canvas .gjs-highlighter-sel{outline:2px solid var(--gjs-color-blue);outline-offset:-2px}.gjs-cv-canvas #gjs-tools,.gjs-cv-canvas .gjs-tools{width:100%;height:100%;position:absolute;top:0;left:0;outline:none;z-index:1}.gjs-cv-canvas #gjs-tools{z-index:2}.gjs-cv-canvas *{box-sizing:border-box}.gjs-frame{outline:medium none;height:100%;width:100%;border:none;margin:auto;display:block;transition:width .35s ease,height .35s ease;position:absolute;top:0;bottom:0;left:0;right:0}.gjs-toolbar{position:absolute;background-color:var(--gjs-color-blue);white-space:nowrap;color:#fff;z-index:10;top:0;left:0}.gjs-toolbar-item{width:26px;padding:5px;cursor:pointer;display:inline-block}.gjs-toolbar-item svg{fill:currentColor;vertical-align:middle}.gjs-resizer-c{position:absolute;left:0;top:0;width:100%;height:100%;z-index:9}.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.1;filter:alpha(opacity=10);position:absolute;background-color:#ff0}.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.2;filter:alpha(opacity=20)}.gjs-padding-v-el,.gjs-fixedpadding-v-el{background-color:navy}.gjs-resizer-h{pointer-events:all;position:absolute;border:3px solid var(--gjs-color-blue);width:10px;height:10px;background-color:#fff;margin:var(--gjs-handle-margin)}.gjs-resizer-h-tl{top:0;left:0;cursor:nwse-resize}.gjs-resizer-h-tr{top:0;right:0;cursor:nesw-resize}.gjs-resizer-h-tc{top:0;margin:var(--gjs-handle-margin) auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-cl{left:0;margin:auto var(--gjs-handle-margin);top:0;bottom:0;cursor:ew-resize}.gjs-resizer-h-cr{margin:auto var(--gjs-handle-margin);top:0;bottom:0;right:0;cursor:ew-resize}.gjs-resizer-h-bl{bottom:0;left:0;cursor:nesw-resize}.gjs-resizer-h-bc{bottom:0;margin:var(--gjs-handle-margin) auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-br{bottom:0;right:0;cursor:nwse-resize}.gjs-pn-panel .gjs-resizer-h{background-color:rgba(0,0,0,.2);border:none;opacity:0;transition:opacity .25s}.gjs-pn-panel .gjs-resizer-h:hover{opacity:1}.gjs-pn-panel .gjs-resizer-h-tc,.gjs-pn-panel .gjs-resizer-h-bc{margin:0 auto;width:100%}.gjs-pn-panel .gjs-resizer-h-cr,.gjs-pn-panel .gjs-resizer-h-cl{margin:auto 0;height:100%}.gjs-resizing .gjs-highlighter,.gjs-resizing .gjs-badge{display:none !important}.gjs-resizing-tl *{cursor:nwse-resize !important}.gjs-resizing-tr *{cursor:nesw-resize !important}.gjs-resizing-tc *{cursor:ns-resize !important}.gjs-resizing-cl *{cursor:ew-resize !important}.gjs-resizing-cr *{cursor:ew-resize !important}.gjs-resizing-bl *{cursor:nesw-resize !important}.gjs-resizing-bc *{cursor:ns-resize !important}.gjs-resizing-br *{cursor:nwse-resize !important}.no-dots,.ui-resizable-handle{border:none !important;margin:0 !important;outline:none !important}.gjs-com-dashed *{outline:1px dashed #888;outline-offset:-2px;box-sizing:border-box}.gjs-com-badge,.gjs-badge{pointer-events:none;background-color:var(--gjs-color-blue);color:#fff;padding:2px 5px;position:absolute;z-index:1;font-size:12px;outline:none;display:none}.gjs-badge-warning{background-color:var(--gjs-color-yellow)}.gjs-placeholder,.gjs-com-placeholder,.gjs-placeholder{position:absolute;z-index:10;pointer-events:none;display:none}.gjs-placeholder,.gjs-placeholder{border-style:solid !important;outline:none;box-sizing:border-box;transition:top var(--gjs-animation-duration),left var(--gjs-animation-duration),width var(--gjs-animation-duration),height var(--gjs-animation-duration)}.gjs-placeholder.horizontal,.gjs-com-placeholder.horizontal,.gjs-placeholder.horizontal{border-color:rgba(0,0,0,0) var(--gjs-placeholder-background-color);border-width:3px 5px;margin:-3px 0 0}.gjs-placeholder.vertical,.gjs-com-placeholder.vertical,.gjs-placeholder.vertical{border-color:var(--gjs-placeholder-background-color) rgba(0,0,0,0);border-width:5px 3px;margin:0 0 0 -3px}.gjs-placeholder-int,.gjs-com-placeholder-int,.gjs-placeholder-int{background-color:var(--gjs-placeholder-background-color);box-shadow:0 0 3px rgba(0,0,0,.2);height:100%;width:100%;pointer-events:none;padding:1.5px;outline:none}.gjs-pn-panel{display:inline-block;position:absolute;box-sizing:border-box;text-align:center;padding:5px;z-index:3}.gjs-pn-panel .icon-undo,.gjs-pn-panel .icon-redo{font-size:20px;height:30px;width:25px}.gjs-pn-commands{width:calc(100% - var(--gjs-left-width));left:0;top:0;box-shadow:0 0 5px var(--gjs-main-dark-color)}.gjs-pn-options{right:var(--gjs-left-width);top:0}.gjs-pn-views{border-bottom:2px solid var(--gjs-main-dark-color);right:0;width:var(--gjs-left-width);z-index:4}.gjs-pn-views-container{height:100%;padding:42px 0 0;right:0;width:var(--gjs-left-width);overflow:auto;box-shadow:0 0 5px var(--gjs-main-dark-color)}.gjs-pn-buttons{align-items:center;display:flex;justify-content:space-between}.gjs-pn-btn{box-sizing:border-box;min-height:30px;min-width:30px;line-height:21px;background-color:rgba(0,0,0,0);border:none;font-size:18px;margin-right:5px;border-radius:2px;padding:4px;position:relative;cursor:pointer}.gjs-pn-btn.gjs-pn-active{background-color:rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.25) inset}.gjs-pn-btn svg{fill:currentColor}.gjs-label{line-height:18px}.gjs-fields{display:flex}.gjs-select{padding:0;width:100%}.gjs-select select{padding-right:10px}.gjs-select:-moz-focusring,.gjs-select select:-moz-focusring{color:rgba(0,0,0,0);text-shadow:0 0 0 var(--gjs-secondary-light-color)}.gjs-input:focus,.gjs-button:focus,.gjs-btn-prim:focus,.gjs-select:focus,.gjs-select select:focus{outline:none}.gjs-field input,.gjs-field select,.gjs-field textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;color:inherit;border:none;background-color:rgba(0,0,0,0);box-sizing:border-box;width:100%;position:relative;padding:var(--gjs-input-padding);z-index:1}.gjs-field input:focus,.gjs-field select:focus,.gjs-field textarea:focus{outline:none}.gjs-field input[type=number]{-moz-appearance:textfield}.gjs-field input[type=number]::-webkit-outer-spin-button,.gjs-field input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.gjs-field-range{flex:9 1 auto}.gjs-field-integer input{padding-right:30px}.gjs-select option,.gjs-field-select option,.gjs-clm-select option,.gjs-sm-select option,.gjs-fields option,.gjs-sm-unit option{background-color:var(--gjs-main-color);color:var(--gjs-font-color)}.gjs-field{background-color:var(--gjs-main-dark-color);border:none;box-shadow:none;border-radius:2px;box-sizing:border-box;padding:0;position:relative}.gjs-field textarea{resize:vertical}.gjs-field .gjs-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;z-index:0}.gjs-field .gjs-d-s-arrow{bottom:0;top:0;margin:auto;right:var(--gjs-input-padding);border-top:4px solid var(--gjs-arrow-color);position:absolute;height:0;width:0;border-left:3px solid rgba(0,0,0,0);border-right:4px solid rgba(0,0,0,0);cursor:pointer}.gjs-field-arrows{position:absolute;cursor:ns-resize;margin:auto;height:20px;width:9px;z-index:10;bottom:0;right:calc(var(--gjs-input-padding) - 2px);top:0}.gjs-field-color,.gjs-field-radio{width:100%}.gjs-field-color input{padding-right:var(--gjs-color-input-padding);box-sizing:border-box}.gjs-field-colorp{border-left:1px solid var(--gjs-main-dark-color);box-sizing:border-box;height:100%;padding:2px;position:absolute;right:0;top:0;width:var(--gjs-color-input-padding);z-index:10}.gjs-field-colorp .gjs-checker-bg,.gjs-field-colorp .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-field-colorp-c{height:100%;position:relative;width:100%}.gjs-field-color-picker{background-color:var(--gjs-font-color);cursor:pointer;height:100%;width:100%;box-shadow:0 0 1px var(--gjs-main-dark-color);border-radius:1px;position:absolute;top:0}.gjs-field-checkbox{padding:0;width:17px;height:17px;display:block;cursor:pointer}.gjs-field-checkbox input{display:none}.gjs-field-checkbox input:checked+.gjs-chk-icon{border-color:hsla(0,0%,100%,.5);border-width:0 2px 2px 0;border-style:solid}.gjs-radio-item{flex:1 1 auto;text-align:center;border-left:1px solid var(--gjs-dark-text-shadow)}.gjs-radio-item:first-child{border:none}.gjs-radio-item:hover{background:var(--gjs-main-dark-color)}.gjs-radio-item input{display:none}.gjs-radio-item input:checked+.gjs-radio-item-label{background-color:hsla(0,0%,100%,.2)}.gjs-radio-items{display:flex}.gjs-radio-item-label{cursor:pointer;display:block;padding:var(--gjs-input-padding)}.gjs-field-units{position:absolute;margin:auto;right:10px;bottom:0;top:0}.gjs-field-unit{position:absolute;right:10px;top:3px;font-size:10px;color:var(--gjs-arrow-color);cursor:pointer}.gjs-input-unit{text-align:center}.gjs-field-arrow-u,.gjs-field-arrow-d{position:absolute;height:0;width:0;border-left:3px solid rgba(0,0,0,0);border-right:4px solid rgba(0,0,0,0);border-top:4px solid var(--gjs-arrow-color);bottom:4px;cursor:pointer}.gjs-field-arrow-u{border-bottom:4px solid var(--gjs-arrow-color);border-top:none;top:4px}.gjs-field-select{padding:0}.gjs-field-range{background-color:rgba(0,0,0,0);border:none;box-shadow:none;padding:0}.gjs-field-range input{margin:0;height:100%}.gjs-field-range input:focus{outline:none}.gjs-field-range input::-webkit-slider-thumb{-webkit-appearance:none;margin-top:-4px;height:10px;width:10px;border:1px solid var(--gjs-main-dark-color);border-radius:100%;background-color:var(--gjs-font-color);cursor:pointer}.gjs-field-range input::-moz-range-thumb{height:10px;width:10px;border:1px solid var(--gjs-main-dark-color);border-radius:100%;background-color:var(--gjs-font-color);cursor:pointer}.gjs-field-range input::-ms-thumb{height:10px;width:10px;border:1px solid var(--gjs-main-dark-color);border-radius:100%;background-color:var(--gjs-font-color);cursor:pointer}.gjs-field-range input::-moz-range-track{background-color:var(--gjs-main-dark-color);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-webkit-slider-runnable-track{background-color:var(--gjs-main-dark-color);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-ms-track{background-color:var(--gjs-main-dark-color);border-radius:1px;margin-top:3px;height:3px}.gjs-btn-prim{color:inherit;background-color:var(--gjs-main-light-color);border-radius:2px;padding:3px 6px;padding:var(--gjs-input-padding);cursor:pointer;border:none}.gjs-btn-prim:active{background-color:var(--gjs-main-light-color)}.gjs-btn--full{width:100%}.gjs-chk-icon{-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);transform:rotate(45deg);box-sizing:border-box;display:block;height:14px;margin:0 5px;width:6px}.gjs-add-trasp{background:none;border:none;color:var(--gjs-font-color);cursor:pointer;font-size:1em;border-radius:2px;opacity:.75;filter:alpha(opacity=75)}.gjs-add-trasp:hover{opacity:1;filter:alpha(opacity=100)}.gjs-add-trasp:active{background-color:rgba(0,0,0,.2)}.gjs-devices-c{display:flex;align-items:center;padding:2px 3px 3px 3px}.gjs-devices-c .gjs-device-label{flex-grow:2;text-align:left;margin-right:10px}.gjs-devices-c .gjs-select{flex-grow:20}.gjs-devices-c .gjs-add-trasp{flex-grow:1;margin-left:5px}.gjs-sm-clear{cursor:pointer;width:14px;min-width:14px;height:14px;margin-left:3px}.gjs-sm-header{font-weight:lighter;padding:10px}.gjs-sm-sector{clear:both;font-weight:lighter;text-align:left}.gjs-sm-sector-title{display:flex;align-items:center}.gjs-sm-sector-caret{width:17px;height:17px;min-width:17px;transform:rotate(-90deg)}.gjs-sm-sector-label{margin-left:5px}.gjs-sm-sector.gjs-sm-open .gjs-sm-sector-caret{transform:none}.gjs-sm-properties{font-size:var(--gjs-font-size);padding:10px 5px;display:flex;flex-wrap:wrap;align-items:flex-end;box-sizing:border-box;width:100%}.gjs-sm-label{margin:5px 5px 3px 0;display:flex;align-items:center}.gjs-sm-close-btn,.gjs-sm-preview-file-close{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.7;filter:alpha(opacity=70)}.gjs-sm-close-btn:hover,.gjs-sm-preview-file-close:hover{opacity:.9;filter:alpha(opacity=90)}.gjs-sm-field,.gjs-clm-field,.gjs-clm-select{width:100%;position:relative}.gjs-sm-field input,.gjs-clm-field input,.gjs-clm-select input,.gjs-sm-field select,.gjs-clm-field select,.gjs-clm-select select{background-color:rgba(0,0,0,0);color:hsla(0,0%,100%,.7);border:none;width:100%}.gjs-sm-field input,.gjs-clm-field input,.gjs-clm-select input{box-sizing:border-box}.gjs-sm-field select,.gjs-clm-field select,.gjs-clm-select select{position:relative;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none}.gjs-sm-field select::-ms-expand,.gjs-clm-field select::-ms-expand,.gjs-clm-select select::-ms-expand{display:none}.gjs-sm-field select:-moz-focusring,.gjs-clm-field select:-moz-focusring,.gjs-clm-select select:-moz-focusring{color:rgba(0,0,0,0);text-shadow:0 0 0 var(--gjs-secondary-light-color)}.gjs-sm-field input:focus,.gjs-clm-field input:focus,.gjs-clm-select input:focus,.gjs-sm-field select:focus,.gjs-clm-field select:focus,.gjs-clm-select select:focus{outline:none}.gjs-sm-field .gjs-sm-unit,.gjs-clm-field .gjs-sm-unit,.gjs-clm-select .gjs-sm-unit{position:absolute;right:10px;top:3px;font-size:10px;color:var(--gjs-secondary-light-color);cursor:pointer}.gjs-sm-field .gjs-clm-sel-arrow,.gjs-clm-field .gjs-clm-sel-arrow,.gjs-clm-select .gjs-clm-sel-arrow,.gjs-sm-field .gjs-sm-int-arrows,.gjs-clm-field .gjs-sm-int-arrows,.gjs-clm-select .gjs-sm-int-arrows,.gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-select .gjs-sm-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;cursor:ns-resize}.gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-select .gjs-sm-sel-arrow{cursor:pointer}.gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-select .gjs-clm-d-s-arrow,.gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-select .gjs-sm-d-arrow,.gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-select .gjs-sm-d-s-arrow,.gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-select .gjs-sm-u-arrow{position:absolute;height:0;width:0;border-left:3px solid rgba(0,0,0,0);border-right:4px solid rgba(0,0,0,0);cursor:pointer}.gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-select .gjs-sm-u-arrow{border-bottom:4px solid var(--gjs-secondary-light-color);top:4px}.gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-select .gjs-clm-d-s-arrow,.gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-select .gjs-sm-d-arrow,.gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-select .gjs-sm-d-s-arrow{border-top:4px solid var(--gjs-secondary-light-color);bottom:4px}.gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-select .gjs-clm-d-s-arrow,.gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-select .gjs-sm-d-s-arrow{bottom:7px}.gjs-sm-field.gjs-sm-color,.gjs-sm-color.gjs-clm-field,.gjs-sm-field.gjs-sm-input,.gjs-sm-input.gjs-clm-field,.gjs-sm-field.gjs-sm-integer,.gjs-sm-integer.gjs-clm-field,.gjs-sm-field.gjs-sm-list,.gjs-sm-list.gjs-clm-field,.gjs-sm-field.gjs-sm-select,.gjs-sm-select.gjs-clm-field,.gjs-clm-select{background-color:var(--gjs-main-dark-color);border:1px solid rgba(0,0,0,.1);box-shadow:1px 1px 0 var(--gjs-main-light-color);color:var(--gjs-secondary-light-color);border-radius:2px;box-sizing:border-box;padding:0 5px}.gjs-sm-field.gjs-sm-composite,.gjs-sm-composite.gjs-clm-field,.gjs-sm-composite.gjs-clm-select{border-radius:2px}.gjs-sm-field.gjs-sm-select,.gjs-sm-select.gjs-clm-field,.gjs-clm-select{padding:0}.gjs-sm-field.gjs-sm-select select,.gjs-sm-select.gjs-clm-field select,.gjs-clm-select select{height:20px}.gjs-sm-field.gjs-sm-select option,.gjs-sm-select.gjs-clm-field option,.gjs-clm-select option{padding:3px 0}.gjs-sm-field.gjs-sm-composite,.gjs-sm-composite.gjs-clm-field,.gjs-sm-composite.gjs-clm-select{background-color:var(--gjs-secondary-dark-color);border:1px solid rgba(0,0,0,.25)}.gjs-sm-field.gjs-sm-list,.gjs-sm-list.gjs-clm-field,.gjs-sm-list.gjs-clm-select{width:auto;padding:0;overflow:hidden;float:left}.gjs-sm-field.gjs-sm-list input,.gjs-sm-list.gjs-clm-field input,.gjs-sm-list.gjs-clm-select input{display:none}.gjs-sm-field.gjs-sm-list label,.gjs-sm-list.gjs-clm-field label,.gjs-sm-list.gjs-clm-select label{cursor:pointer;padding:5px;display:block}.gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label,.gjs-sm-list.gjs-clm-select .gjs-sm-radio:checked+label{background-color:hsla(0,0%,100%,.2)}.gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-sm-list.gjs-clm-field .gjs-sm-icon,.gjs-sm-list.gjs-clm-select .gjs-sm-icon{background-repeat:no-repeat;background-position:center;text-shadow:none;line-height:normal}.gjs-sm-field.gjs-sm-integer select,.gjs-sm-integer.gjs-clm-field select,.gjs-sm-integer.gjs-clm-select select{width:auto;padding:0}.gjs-sm-list .gjs-sm-el{float:left;border-left:1px solid var(--gjs-main-dark-color)}.gjs-sm-list .gjs-sm-el:first-child{border:none}.gjs-sm-list .gjs-sm-el:hover{background:var(--gjs-main-dark-color)}.gjs-sm-slider .gjs-field-integer{flex:1 1 65px}.gjs-sm-property{box-sizing:border-box;float:left;width:50%;margin-bottom:5px;padding:0 5px}.gjs-sm-property--full,.gjs-sm-property.gjs-sm-composite,.gjs-sm-property.gjs-sm-file,.gjs-sm-property.gjs-sm-list,.gjs-sm-property.gjs-sm-stack,.gjs-sm-property.gjs-sm-slider,.gjs-sm-property.gjs-sm-color{width:100%}.gjs-sm-property .gjs-sm-btn{background-color:color-mix(in srgb, var(--gjs-main-dark-color), white 13%);border-radius:2px;box-shadow:1px 1px 0 color-mix(in srgb, var(--gjs-main-dark-color), white 2%),1px 1px 0 color-mix(in srgb, var(--gjs-main-dark-color), white 17%) inset;padding:5px;position:relative;text-align:center;height:auto;width:100%;cursor:pointer;color:var(--gjs-font-color);box-sizing:border-box;text-shadow:-1px -1px 0 var(--gjs-main-dark-color);border:none;opacity:.85;filter:alpha(opacity=85)}.gjs-sm-property .gjs-sm-btn-c{box-sizing:border-box;float:left;width:100%}.gjs-sm-property__text-shadow .gjs-sm-layer-preview-cnt::after{color:#000;content:"T";font-weight:900;line-height:17px;padding:0 4px}.gjs-sm-preview-file{background-color:var(--gjs-light-border);border-radius:2px;margin-top:5px;position:relative;overflow:hidden;border:1px solid color-mix(in srgb, var(--gjs-light-border), black 1%);padding:3px 20px}.gjs-sm-preview-file-cnt{background-size:auto 100%;background-repeat:no-repeat;background-position:center center;height:50px}.gjs-sm-preview-file-close{top:-5px;width:14px;height:14px}.gjs-sm-layers{margin-top:5px;padding:1px 3px;min-height:30px}.gjs-sm-layer{background-color:hsla(0,0%,100%,.055);border-radius:2px;margin:2px 0;padding:7px;position:relative}.gjs-sm-layer.gjs-sm-active{background-color:hsla(0,0%,100%,.12)}.gjs-sm-layer .gjs-sm-label-wrp{display:flex;align-items:center}.gjs-sm-layer #gjs-sm-move{height:14px;width:14px;min-width:14px;cursor:grab}.gjs-sm-layer #gjs-sm-label{flex-grow:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin:0 5px}.gjs-sm-layer-preview{height:15px;width:15px;min-width:15px;margin-right:5px;border-radius:2px}.gjs-sm-layer-preview-cnt{border-radius:2px;background-color:#fff;height:100%;width:100%;background-size:cover !important}.gjs-sm-layer #gjs-sm-close-layer{display:block;cursor:pointer;height:14px;width:14px;min-width:14px;opacity:.5;filter:alpha(opacity=50)}.gjs-sm-layer #gjs-sm-close-layer:hover{opacity:.8;filter:alpha(opacity=80)}.gjs-sm-stack .gjs-sm-properties{padding:5px 0 0}.gjs-sm-property__border-radius .gjs-sm-property__border-bottom-right-radius{order:4}.gjs-sm-stack #gjs-sm-add{background:none;border:none;cursor:pointer;outline:none;position:absolute;right:0;top:-17px;opacity:.75;padding:0;width:18px;height:18px}.gjs-sm-stack #gjs-sm-add:hover{opacity:1;filter:alpha(opacity=100)}.gjs-sm-colorp-c{height:100%;width:20px;position:absolute;right:0;top:0;box-sizing:border-box;border-radius:2px;padding:2px}.gjs-sm-colorp-c .gjs-field-colorp-c,.gjs-sm-colorp-c .gjs-checker-bg{height:100%;width:100%;border-radius:1px}.gjs-sm-color-picker{background-color:var(--gjs-font-color);cursor:pointer;height:16px;width:100%;margin-top:-16px;box-shadow:0 0 1px var(--gjs-main-dark-color);border-radius:1px}.gjs-sm-btn-upload #gjs-sm-upload{left:0;top:0;position:absolute;width:100%;opacity:0;cursor:pointer}.gjs-sm-btn-upload #gjs-sm-label{padding:2px 0}.gjs-sm-layer>#gjs-sm-move{opacity:.7;filter:alpha(opacity=70);cursor:move;font-size:12px;float:left;margin:0 5px 0 0}.gjs-sm-layer>#gjs-sm-move:hover{opacity:.9;filter:alpha(opacity=90)}.gjs-blocks-c{display:flex;flex-wrap:wrap;justify-content:flex-start}.gjs-block-categories{display:flex;flex-direction:column}.gjs-block-category{width:100%}.gjs-block-category .gjs-caret-icon{margin-right:5px}.gjs-block{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;width:45%;min-width:45px;padding:1em;box-sizing:border-box;min-height:90px;cursor:all-scroll;font-size:11px;font-weight:lighter;text-align:center;display:flex;flex-direction:column;justify-content:space-between;border:1px solid rgba(0,0,0,.2);border-radius:3px;margin:10px 2.5% 5px;box-shadow:0 1px 0 0 rgba(0,0,0,.15);transition:all .2s ease 0s;transition-property:box-shadow,color}.gjs-block:hover{box-shadow:0 3px 4px 0 rgba(0,0,0,.15)}.gjs-block svg{fill:currentColor}.gjs-block__media{margin-bottom:10px;pointer-events:none}.gjs-block-svg{width:54px;fill:currentColor}.gjs-block-svg-path{fill:currentColor}.gjs-block.fa{font-size:2em;line-height:2em;padding:11px}.gjs-block-label{line-height:normal;font-size:.65rem;font-weight:normal;font-family:Helvetica,sans-serif;overflow:hidden;text-overflow:ellipsis;pointer-events:none}.gjs-block.gjs-bdrag{width:auto;padding:0}.gjs-selected-parent{border:1px solid var(--gjs-color-yellow)}.gjs-opac50{opacity:.5;filter:alpha(opacity=50)}.gjs-layer{font-weight:lighter;text-align:left;position:relative;font-size:var(--gjs-font-size);display:grid}.gjs-layer-item{display:flex;align-items:center;justify-content:space-between;padding:5px 10px;border-bottom:1px solid var(--gjs-main-dark-color);background-color:var(--gjs-secondary-dark-color);gap:var(--gjs-flex-item-gap);cursor:pointer}.gjs-layer-item-left,.gjs-layer-item-right{display:flex;align-items:center;gap:var(--gjs-flex-item-gap)}.gjs-layer-item-left{width:100%}.gjs-layer-hidden{opacity:.55;filter:alpha(opacity=55)}.gjs-layer-vis{box-sizing:content-box;cursor:pointer;z-index:1}.gjs-layer-vis-on,.gjs-layer-vis-off{display:flex;width:13px;height:13px}.gjs-layer-vis-off{display:none}.gjs-layer-vis.gjs-layer-off .gjs-layer-vis-on{display:none}.gjs-layer-vis.gjs-layer-off .gjs-layer-vis-off{display:flex}.gjs-layer-caret{width:15px;height:15px;cursor:pointer;box-sizing:content-box;transform:rotate(90deg);display:flex;opacity:.7;filter:alpha(opacity=70)}.gjs-layer-caret:hover{opacity:1;filter:alpha(opacity=100)}.gjs-layer.open>.gjs-layer-item .gjs-layer-caret{transform:rotate(180deg)}.gjs-layer-title{padding:0;display:flex;align-items:center;background-color:rgba(0,0,0,0) !important;border-bottom:none}.gjs-layer-title-inn{align-items:center;position:relative;display:flex;gap:var(--gjs-flex-item-gap)}.gjs-layer-title-c{width:100%}.gjs-layer__icon{display:block;width:100%;max-width:15px;max-height:15px;padding-left:5px}.gjs-layer__icon svg{fill:currentColor}.gjs-layer-name{display:inline-block;box-sizing:content-box;overflow:hidden;white-space:nowrap;max-width:170px;height:auto}.gjs-layer-name--no-edit{text-overflow:ellipsis}.gjs-layer>.gjs-layer-children{display:none}.gjs-layer.open>.gjs-layer-children{display:block}.gjs-layer-no-chld>.gjs-layer-title-inn>.gjs-layer-caret{visibility:hidden}.gjs-layer-move{display:flex;width:13px;height:13px;box-sizing:content-box;cursor:move}.gjs-layer.gjs-hovered .gjs-layer-item{background-color:var(--gjs-soft-light-color)}.gjs-layer.gjs-selected .gjs-layer-item{background-color:var(--gjs-main-light-color)}.gjs-layers{position:relative;height:100%}.gjs-layers #gjs-placeholder{width:100%;position:absolute}.gjs-layers #gjs-placeholder #gjs-plh-int{height:100%;padding:1px}.gjs-layers #gjs-placeholder #gjs-plh-int.gjs-insert{background-color:var(--gjs-color-green)}#gjs-clm-add-tag,.gjs-clm-tags-btn{background-color:hsla(0,0%,100%,.15);border-radius:2px;padding:3px;margin-right:3px;border:1px solid rgba(0,0,0,.15);width:24px;height:24px;box-sizing:border-box;cursor:pointer}.gjs-clm-tags-btn svg{fill:currentColor;display:block}.gjs-clm-header{display:flex;align-items:center;margin:7px 0}.gjs-clm-header-status{flex-shrink:1;margin-left:auto}.gjs-clm-tag{display:flex;overflow:hidden;align-items:center;border-radius:3px;margin:0 3px 3px 0;padding:5px;cursor:default}.gjs-clm-tag-status,.gjs-clm-tag-close{width:12px;height:12px;flex-shrink:1}.gjs-clm-tag-status svg,.gjs-clm-tag-close svg{vertical-align:middle;fill:currentColor}.gjs-clm-sels-info{margin:7px 0;text-align:left}.gjs-clm-sel-id{font-size:.9em;opacity:.5;filter:alpha(opacity=50)}.gjs-clm-label-sel{float:left;padding-right:5px}.gjs-clm-tags{font-size:var(--gjs-font-size);padding:10px 5px}.gjs-clm-tags #gjs-clm-sel{padding:7px 0;float:left}.gjs-clm-tags #gjs-clm-sel{font-style:italic;margin-left:5px}.gjs-clm-tags #gjs-clm-tags-field{clear:both;padding:5px;margin-bottom:5px;display:flex;flex-wrap:wrap}.gjs-clm-tags #gjs-clm-tags-c{display:flex;flex-wrap:wrap;vertical-align:top;overflow:hidden}.gjs-clm-tags #gjs-clm-new{color:var(--gjs-font-color);padding:var(--gjs-padding-elem-classmanager);display:none}.gjs-clm-tags #gjs-clm-close{opacity:.85;filter:alpha(opacity=85);font-size:20px;line-height:0;cursor:pointer;color:hsla(0,0%,100%,.9)}.gjs-clm-tags #gjs-clm-close:hover{opacity:1;filter:alpha(opacity=100)}.gjs-clm-tags #gjs-clm-checkbox{color:hsla(0,0%,100%,.9);vertical-align:middle;cursor:pointer;font-size:9px}.gjs-clm-tags #gjs-clm-tag-label{flex-grow:1;text-overflow:ellipsis;overflow:hidden;padding:0 3px;cursor:text}.gjs-mdl-container{font-family:var(--gjs-main-font);overflow-y:auto;position:fixed;background-color:rgba(0,0,0,.5);display:flex;top:0;left:0;right:0;bottom:0;z-index:100}.gjs-mdl-dialog{text-shadow:-1px -1px 0 rgba(0,0,0,.05);animation:gjs-slide-down .215s;margin:auto;max-width:850px;width:90%;border-radius:3px;font-weight:lighter;position:relative;z-index:2}.gjs-mdl-title{font-size:1rem}.gjs-mdl-btn-close{position:absolute;right:15px;top:5px}.gjs-mdl-active .gjs-mdl-dialog{animation:gjs-mdl-slide-down .216s}.gjs-mdl-header,.gjs-mdl-content{padding:10px 15px;clear:both}.gjs-mdl-header{position:relative;border-bottom:1px solid var(--gjs-main-dark-color);padding:15px 15px 7px}.gjs-export-dl::after{content:"";clear:both;display:block;margin-bottom:10px}.gjs-dropzone{display:none;opacity:0;position:absolute;top:0;left:0;z-index:11;width:100%;height:100%;transition:opacity .25s;pointer-events:none}.gjs-dropzone-active .gjs-dropzone{display:block;opacity:1}.gjs-am-assets{height:290px;overflow:auto;clear:both;display:flex;flex-wrap:wrap;align-items:flex-start;align-content:flex-start}.gjs-am-assets-header{padding:5px}.gjs-am-add-asset .gjs-am-add-field{width:70%;float:left}.gjs-am-add-asset button{width:25%;float:right}.gjs-am-preview-cont{position:relative;height:70px;width:30%;background-color:var(--gjs-main-color);border-radius:2px;float:left;overflow:hidden}.gjs-am-preview{position:absolute;background-position:center center;background-size:cover;background-repeat:no-repeat;height:100%;width:100%;z-index:1}.gjs-am-preview-bg{opacity:.5;filter:alpha(opacity=50);position:absolute;height:100%;width:100%;z-index:0}.gjs-am-dimensions{opacity:.5;filter:alpha(opacity=50);font-size:10px}.gjs-am-meta{width:70%;float:left;font-size:12px;padding:5px 0 0 5px;box-sizing:border-box}.gjs-am-meta>div{margin-bottom:5px}.gjs-am-close{cursor:pointer;position:absolute;right:5px;top:0;display:none}.gjs-am-asset{border-bottom:1px solid color-mix(in srgb, var(--gjs-main-dark-color), black 3%);padding:5px;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.gjs-am-asset:hover .gjs-am-close{display:block}.gjs-am-highlight{background-color:var(--gjs-main-light-color)}.gjs-am-assets-cont{background-color:var(--gjs-secondary-dark-color);border-radius:3px;box-sizing:border-box;padding:10px;width:45%;float:right;height:325px;overflow:hidden}.gjs-am-file-uploader{width:55%;float:left}.gjs-am-file-uploader>form{background-color:var(--gjs-secondary-dark-color);border:2px dashed;border-radius:3px;position:relative;text-align:center;margin-bottom:15px}.gjs-am-file-uploader>form.gjs-am-hover{border:2px solid var(--gjs-color-green);color:color-mix(in srgb, var(--gjs-color-green), white 5%)}.gjs-am-file-uploader>form.gjs-am-disabled{border-color:red}.gjs-am-file-uploader>form #gjs-am-uploadFile{opacity:0;filter:alpha(opacity=0);padding:var(--gjs-upload-padding);width:100%;box-sizing:border-box}.gjs-am-file-uploader #gjs-am-title{position:absolute;padding:var(--gjs-upload-padding);width:100%}.gjs-cm-editor-c{float:left;box-sizing:border-box;width:50%}.gjs-cm-editor-c .CodeMirror{height:450px}.gjs-cm-editor{font-size:12px}.gjs-cm-editor#gjs-cm-htmlmixed{padding-right:10px;border-right:1px solid var(--gjs-main-dark-color)}.gjs-cm-editor#gjs-cm-htmlmixed #gjs-cm-title{color:#a97d44}.gjs-cm-editor#gjs-cm-css{padding-left:10px}.gjs-cm-editor#gjs-cm-css #gjs-cm-title{color:#ddca7e}.gjs-cm-editor #gjs-cm-title{background-color:var(--gjs-main-dark-color);font-size:12px;padding:5px 10px 3px;text-align:right}.gjs-rte-toolbar{position:absolute;z-index:10}.gjs-rte-toolbar-ui{border:1px solid var(--gjs-main-dark-color);border-radius:3px}.gjs-rte-actionbar{display:flex}.gjs-rte-action{display:flex;align-items:center;justify-content:center;padding:5px;width:25px;border-right:1px solid var(--gjs-main-dark-color);text-align:center;cursor:pointer;outline:none}.gjs-rte-action:last-child{border-right:none}.gjs-rte-action:hover{background-color:var(--gjs-main-light-color)}.gjs-rte-active{background-color:var(--gjs-main-light-color)}.gjs-rte-disabled{color:var(--gjs-main-light-color);cursor:not-allowed}.gjs-rte-disabled:hover{background-color:unset}.sp-container{position:absolute;top:0;left:0;display:inline-block;z-index:9999994;overflow:hidden}.sp-container.sp-flat{position:relative}.sp-container,.sp-container *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.sp-top{position:relative;width:100%;display:inline-block}.sp-top-inner{position:absolute;top:0;left:0;bottom:0;right:0}.sp-color{position:absolute;top:0;left:0;bottom:0;right:20%}.sp-hue{position:absolute;top:0;right:0;bottom:0;left:84%;height:100%}.sp-clear-enabled .sp-hue{top:33px;height:77.5%}.sp-fill{padding-top:80%}.sp-sat,.sp-val{position:absolute;top:0;left:0;right:0;bottom:0}.sp-alpha-enabled .sp-top{margin-bottom:18px}.sp-alpha-enabled .sp-alpha{display:block}.sp-alpha-handle{position:absolute;top:-4px;bottom:-4px;width:6px;left:50%;cursor:pointer;border:1px solid #000;background:#fff;opacity:.8}.sp-alpha{display:none;position:absolute;bottom:-14px;right:0;left:0;height:8px}.sp-alpha-inner{border:solid 1px #333}.sp-clear{display:none}.sp-clear.sp-clear-display{background-position:center}.sp-clear-enabled .sp-clear{display:block;position:absolute;top:0px;right:0;bottom:0;left:84%;height:28px}.sp-container,.sp-replacer,.sp-preview,.sp-dragger,.sp-slider,.sp-alpha,.sp-clear,.sp-alpha-handle,.sp-container.sp-dragging .sp-input,.sp-container button{-webkit-user-select:none;-moz-user-select:-moz-none;-o-user-select:none;user-select:none}.sp-container.sp-input-disabled .sp-input-container{display:none}.sp-container.sp-buttons-disabled .sp-button-container{display:none}.sp-container.sp-palette-buttons-disabled .sp-palette-button-container{display:none}.sp-palette-only .sp-picker-container{display:none}.sp-palette-disabled .sp-palette-container{display:none}.sp-initial-disabled .sp-initial{display:none}.sp-sat{background-image:-webkit-gradient(linear, 0 0, 100% 0, from(#fff), to(rgba(204, 154, 129, 0)));background-image:-webkit-linear-gradient(left, #fff, rgba(204, 154, 129, 0));background-image:-moz-linear-gradient(left, #fff, rgba(204, 154, 129, 0));background-image:-o-linear-gradient(left, #fff, rgba(204, 154, 129, 0));background-image:-ms-linear-gradient(left, #fff, rgba(204, 154, 129, 0));background-image:linear-gradient(to right, #fff, rgba(204, 154, 129, 0));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr=#FFFFFFFF, endColorstr=#00CC9A81)";filter:progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr="#FFFFFFFF", endColorstr="#00CC9A81")}.sp-val{background-image:-webkit-gradient(linear, 0 100%, 0 0, from(#000000), to(rgba(204, 154, 129, 0)));background-image:-webkit-linear-gradient(bottom, #000000, rgba(204, 154, 129, 0));background-image:-moz-linear-gradient(bottom, #000, rgba(204, 154, 129, 0));background-image:-o-linear-gradient(bottom, #000, rgba(204, 154, 129, 0));background-image:-ms-linear-gradient(bottom, #000, rgba(204, 154, 129, 0));background-image:linear-gradient(to top, #000, rgba(204, 154, 129, 0));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#00CC9A81, endColorstr=#FF000000)";filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#00CC9A81", endColorstr="#FF000000")}.sp-hue{background:-moz-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);background:-ms-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);background:-o-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);background:-webkit-gradient(linear, left top, left bottom, from(#ff0000), color-stop(0.17, #ffff00), color-stop(0.33, #00ff00), color-stop(0.5, #00ffff), color-stop(0.67, #0000ff), color-stop(0.83, #ff00ff), to(#ff0000));background:-webkit-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);background:linear-gradient(to bottom, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%)}.sp-1{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ff0000", endColorstr="#ffff00")}.sp-2{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ffff00", endColorstr="#00ff00")}.sp-3{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#00ff00", endColorstr="#00ffff")}.sp-4{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#00ffff", endColorstr="#0000ff")}.sp-5{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#0000ff", endColorstr="#ff00ff")}.sp-6{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ff00ff", endColorstr="#ff0000")}.sp-hidden{display:none !important}.sp-cf:before,.sp-cf:after{content:"";display:table}.sp-cf:after{clear:both}@media(max-device-width: 480px){.sp-color{right:40%}.sp-hue{left:63%}.sp-fill{padding-top:60%}}.sp-dragger{border-radius:5px;height:5px;width:5px;border:1px solid #fff;background:#000;cursor:pointer;position:absolute;top:0;left:0}.sp-slider{position:absolute;top:0;cursor:pointer;height:3px;left:-1px;right:-1px;border:1px solid #000;background:#fff;opacity:.8}.sp-container{border-radius:0;background-color:#ececec;border:solid 1px #f0c49b;padding:0}.sp-container,.sp-container button,.sp-container input,.sp-color,.sp-hue,.sp-clear{font:normal 12px "Lucida Grande","Lucida Sans Unicode","Lucida Sans",Geneva,Verdana,sans-serif;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.sp-top{margin-bottom:3px}.sp-color,.sp-hue,.sp-clear{border:solid 1px #666}.sp-input-container{float:right;width:100px;margin-bottom:4px}.sp-initial-disabled .sp-input-container{width:100%}.sp-input{font-size:12px !important;border:1px inset;padding:4px 5px;margin:0;width:100%;background:rgba(0,0,0,0);border-radius:3px;color:#222}.sp-input:focus{border:1px solid orange}.sp-input.sp-validation-error{border:1px solid red;background:#fdd}.sp-picker-container,.sp-palette-container{float:left;position:relative;padding:10px;padding-bottom:300px;margin-bottom:-290px}.sp-picker-container{width:172px;border-left:solid 1px #fff}.sp-palette-container{border-right:solid 1px #ccc}.sp-palette-only .sp-palette-container{border:0}.sp-palette .sp-thumb-el{display:block;position:relative;float:left;width:24px;height:15px;margin:3px;cursor:pointer;border:solid 2px rgba(0,0,0,0)}.sp-palette .sp-thumb-el:hover,.sp-palette .sp-thumb-el.sp-thumb-active{border-color:orange}.sp-thumb-el{position:relative}.sp-initial{float:left;border:solid 1px #333}.sp-initial span{width:30px;height:25px;border:none;display:block;float:left;margin:0}.sp-initial .sp-clear-display{background-position:center}.sp-palette-button-container,.sp-button-container{float:right}.sp-replacer{margin:0;overflow:hidden;cursor:pointer;padding:4px;display:inline-block;border:solid 1px #91765d;background:#eee;color:#333;vertical-align:middle}.sp-replacer:hover,.sp-replacer.sp-active{border-color:#f0c49b;color:#111}.sp-replacer.sp-disabled{cursor:default;border-color:silver;color:silver}.sp-dd{padding:2px 0;height:16px;line-height:16px;float:left;font-size:10px}.sp-preview{position:relative;width:25px;height:20px;border:solid 1px #222;margin-right:5px;float:left;z-index:0}.sp-palette{max-width:220px}.sp-palette .sp-thumb-el{width:16px;height:16px;margin:2px 1px;border:solid 1px #d0d0d0}.sp-container{padding-bottom:0}.sp-container button{background-color:#eee;background-image:-webkit-linear-gradient(top, #eeeeee, #cccccc);background-image:-moz-linear-gradient(top, #eeeeee, #cccccc);background-image:-ms-linear-gradient(top, #eeeeee, #cccccc);background-image:-o-linear-gradient(top, #eeeeee, #cccccc);background-image:linear-gradient(to bottom, #eeeeee, #cccccc);border:1px solid #ccc;border-bottom:1px solid #bbb;border-radius:3px;color:#333;font-size:14px;line-height:1;padding:5px 4px;text-align:center;text-shadow:0 1px 0 #eee;vertical-align:middle}.sp-container button:hover{background-color:#ddd;background-image:-webkit-linear-gradient(top, #dddddd, #bbbbbb);background-image:-moz-linear-gradient(top, #dddddd, #bbbbbb);background-image:-ms-linear-gradient(top, #dddddd, #bbbbbb);background-image:-o-linear-gradient(top, #dddddd, #bbbbbb);background-image:linear-gradient(to bottom, #dddddd, #bbbbbb);border:1px solid #bbb;border-bottom:1px solid #999;cursor:pointer;text-shadow:0 1px 0 #ddd}.sp-container button:active{border:1px solid #aaa;border-bottom:1px solid #888;-webkit-box-shadow:inset 0 0 5px 2px #aaa,0 1px 0 0 #eee;-moz-box-shadow:inset 0 0 5px 2px #aaa,0 1px 0 0 #eee;-ms-box-shadow:inset 0 0 5px 2px #aaa,0 1px 0 0 #eee;-o-box-shadow:inset 0 0 5px 2px #aaa,0 1px 0 0 #eee;box-shadow:inset 0 0 5px 2px #aaa,0 1px 0 0 #eee}.sp-cancel{font-size:11px;color:#d93f3f !important;margin:0;padding:2px;margin-right:5px;vertical-align:middle;text-decoration:none}.sp-cancel:hover{color:#d93f3f !important;text-decoration:underline}.sp-palette span:hover,.sp-palette span.sp-thumb-active{border-color:#000}.sp-preview,.sp-alpha,.sp-thumb-el{position:relative;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}.sp-preview-inner,.sp-alpha-inner,.sp-thumb-inner{display:block;position:absolute;top:0;left:0;bottom:0;right:0}.sp-palette .sp-thumb-inner{background-position:50% 50%;background-repeat:no-repeat}.sp-palette .sp-thumb-light.sp-thumb-active .sp-thumb-inner{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIVJREFUeNpiYBhsgJFMffxAXABlN5JruT4Q3wfi/0DsT64h8UD8HmpIPCWG/KemIfOJCUB+Aoacx6EGBZyHBqI+WsDCwuQ9mhxeg2A210Ntfo8klk9sOMijaURm7yc1UP2RNCMbKE9ODK1HM6iegYLkfx8pligC9lCD7KmRof0ZhjQACDAAceovrtpVBRkAAAAASUVORK5CYII=)}.sp-palette .sp-thumb-dark.sp-thumb-active .sp-thumb-inner{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAMdJREFUOE+tkgsNwzAMRMugEAahEAahEAZhEAqlEAZhEAohEAYh81X2dIm8fKpEspLGvudPOsUYpxE2BIJCroJmEW9qJ+MKaBFhEMNabSy9oIcIPwrB+afvAUFoK4H0tMaQ3XtlrggDhOVVMuT4E5MMG0FBbCEYzjYT7OxLEvIHQLY2zWwQ3D+9luyOQTfKDiFD3iUIfPk8VqrKjgAiSfGFPecrg6HN6m/iBcwiDAo7WiBeawa+Kwh7tZoSCGLMqwlSAzVDhoK+6vH4G0P5wdkAAAAASUVORK5CYII=)}.sp-clear-display{background-repeat:no-repeat;background-position:center;background-image:url(data:image/gif;base64,R0lGODlhFAAUAPcAAAAAAJmZmZ2dnZ6enqKioqOjo6SkpKWlpaampqenp6ioqKmpqaqqqqurq/Hx8fLy8vT09PX19ff39/j4+Pn5+fr6+vv7+wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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}.gjs-editor-sp .sp-hue,.gjs-editor-sp .sp-slider{cursor:row-resize}.gjs-editor-sp .sp-color,.gjs-editor-sp .sp-dragger{cursor:crosshair}.gjs-editor-sp .sp-alpha-inner,.gjs-editor-sp .sp-alpha-handle{cursor:col-resize}.gjs-editor-sp .sp-hue{left:90%}.gjs-editor-sp .sp-color{right:15%}.gjs-editor-sp .sp-picker-container{border:none}.gjs-editor-sp .colpick_dark .colpick_color{outline:1px solid var(--gjs-main-dark-color)}.gjs-editor-sp .sp-cancel,.gjs-editor-sp .sp-cancel:hover{bottom:-8px;color:#777 !important;font-size:25px;left:0;position:absolute;text-decoration:none}.gjs-editor-sp .sp-alpha-handle{background-color:#ccc;border:1px solid #555;width:4px}.gjs-editor-sp .sp-color,.gjs-editor-sp .sp-hue{border:1px solid #333}.gjs-editor-sp .sp-slider{background-color:#ccc;border:1px solid #555;height:3px;left:-4px;width:22px}.gjs-editor-sp .sp-dragger{background:rgba(0,0,0,0);box-shadow:0 0 0 1px #111}.gjs-editor-sp .sp-button-container{float:none;width:100%;position:relative;text-align:right}.gjs-editor-sp .sp-button-container .sp-choose,.gjs-editor-sp .sp-button-container .sp-choose:hover,.gjs-editor-sp .sp-button-container .sp-choose:active{background:var(--gjs-main-dark-color);border-color:var(--gjs-main-dark-color);color:var(--gjs-font-color);text-shadow:none;box-shadow:none;padding:3px 5px}.gjs-editor-sp .sp-palette-container{border:none;float:none;margin:0;padding:5px 10px 0}.gjs-editor-sp .sp-palette .sp-thumb-el,.gjs-editor-sp .sp-palette .sp-thumb-el:hover{border:1px solid rgba(0,0,0,.9)}.gjs-editor-sp .sp-palette .sp-thumb-el:hover,.gjs-editor-sp .sp-palette .sp-thumb-el.sp-thumb-active{border-color:rgba(0,0,0,.9)}.gjs-one-bg{background-color:var(--gjs-primary-color)}.gjs-one-color{color:var(--gjs-primary-color)}.gjs-one-color-h:hover{color:var(--gjs-primary-color)}.gjs-two-bg{background-color:var(--gjs-secondary-color)}.gjs-two-color{color:var(--gjs-secondary-color)}.gjs-two-color-h:hover{color:var(--gjs-secondary-color)}.gjs-three-bg{background-color:var(--gjs-tertiary-color)}.gjs-three-color{color:var(--gjs-tertiary-color)}.gjs-three-color-h:hover{color:var(--gjs-tertiary-color)}.gjs-four-bg{background-color:var(--gjs-quaternary-color)}.gjs-four-color{color:var(--gjs-quaternary-color)}.gjs-four-color-h:hover{color:var(--gjs-quaternary-color)}.gjs-danger-bg{background-color:var(--gjs-color-red)}.gjs-danger-color{color:var(--gjs-color-red)}.gjs-danger-color-h:hover{color:var(--gjs-color-red)}.gjs-bdrag{pointer-events:none !important;position:absolute !important;z-index:10 !important;width:auto}.gjs-drag-helper{background-color:var(--gjs-color-blue) !important;pointer-events:none !important;position:absolute !important;z-index:10 !important;transform:scale(0.3) !important;transform-origin:top left !important;-webkit-transform-origin:top left !important;margin:15px !important;transition:none !important;outline:none !important}.gjs-grabbing,.gjs-grabbing *{cursor:grabbing !important;cursor:-webkit-grabbing !important}.gjs-grabbing{overflow:hidden}.gjs-off-prv{position:relative;z-index:10;padding:5px;cursor:pointer}.gjs-editor-cont ::-webkit-scrollbar-track{background:var(--gjs-secondary-dark-color)}.gjs-editor-cont ::-webkit-scrollbar-thumb{background-color:hsla(0,0%,100%,.2)}.gjs-editor-cont ::-webkit-scrollbar{width:8px}.gjs-no-touch-actions{touch-action:none}.gjs-disabled{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;opacity:.5;filter:alpha(opacity=50)}.gjs-editor{font-family:var(--gjs-main-font);font-size:var(--gjs-font-size);position:relative;box-sizing:border-box;height:100%}.gjs-freezed,.gjs-freezed{opacity:.5;filter:alpha(opacity=50);pointer-events:none}.gjs-hidden{display:none}@keyframes gjs-slide-down{0%{transform:translate(0, -3rem);opacity:0}100%{transform:translate(0, 0);opacity:1}}@keyframes gjs-slide-up{0%{transform:translate(0, 0);opacity:1}100%{transform:translate(0, -3rem);opacity:0}}.cm-s-hopscotch span.cm-error{color:#fff} -html,body,#gjs{height:100% !important;margin:0;overflow:hidden}*{-webkit-box-shadow:none !important;-moz-box-shadow:none !important;box-shadow:none !important}.form-control,.form-control:focus{color:#e1e1e1}.cursor-pointer{cursor:pointer}.gjs-editor{font-size:.9rem}.toast{opacity:1 !important;border:none;right:15px;box-shadow:none}.toast.toast-success{background:#2dc837}#phpb-loading{position:absolute;height:100%;width:100%;background-color:#fff;z-index:10000;transition:opacity .3s,visibility .3s}#phpb-loading.loaded{visibility:hidden;opacity:0}#phpb-loading .circle{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:150px;height:150px}#phpb-loading .circle .text{font-size:20px;margin:0 -30px;margin-top:20px;text-align:center;color:#0091d1}#phpb-loading .loader{width:calc(100% - 0px);height:calc(100% - 0px);border:8px solid #0091d1;border-top:8px solid #004a6c;border-radius:50%;animation:rotate 5s linear infinite}@keyframes rotate{100%{transform:rotate(360deg)}}.btn.focus,.btn:focus{box-shadow:none}.gjs-cv-canvas{height:100%;top:0;width:calc(100% - 325px)}.gjs-toolbar{z-index:100 !important}.gjs-pn-panel{padding:0}.gjs-pn-panel .gjs-pn-buttons{justify-content:center}.gjs-pn-commands,.gjs-pn-options,.gjs-pn-devices-c{display:none}.gjs-devices-c{padding:0}.gjs-one-bg{background-color:#313844;border-bottom:none;color:#c4c7ce}.gjs-two-color{color:#e1e1e1}.gjs-four-color{color:#e1e1e1}.gjs-four-color-h:hover{color:#e1e1e1}.gjs-pn-commands{width:100%;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}::-webkit-scrollbar{width:7px;height:7px}::-webkit-scrollbar-track{background:#313844 !important}::-webkit-scrollbar-thumb{background-color:#a5acb9 !important;border-radius:3px}::-webkit-scrollbar-thumb:hover{background-color:#0091d1 !important}.gjs-pn-views{top:40px}.gjs-pn-views .gjs-pn-btn{width:33.33%;margin-right:0;padding:16px 15px 16px 15px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;background:#3a3f4a;color:#e3e3e3;border-bottom:1px solid #3a3f4a;font-size:16px}.gjs-pn-views .gjs-pn-btn.gjs-pn-active{padding:15px;background-color:#515664;border-bottom-left-radius:unset;border-bottom-right-radius:unset;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;color:#fff;border-bottom:3px solid #0091d1}.gjs-pn-options{right:0}.gjs-pn-views,.gjs-pn-views-container{left:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;width:325px;padding-bottom:0;margin-bottom:0;margin-left:0;margin-right:0;padding-left:0;padding-right:0}.gjs-pn-views-container{padding-top:89px;background:#22272e;height:calc(100% - 40px);overflow:hidden}.gjs-pn-views-container>div:first-of-type{margin-top:44px}.gjs-pn-views-container>div{height:100%;overflow-y:auto}.gjs-pn-views-container>div>div{background:#22272e;border:none}.gjs-cv-canvas,.gjs-pn-devices-c{left:325px}.gjs-pn-panel #gjs-sm-caret{padding-right:0 !important}.gjs-pn-panel .fa-caret-down{margin-right:5px !important}.gjs-pn-panel .fa-caret-right{margin-right:8px !important}.gjs-three-bg{background-color:#0091d1}.gjs-clm-tags #gjs-clm-close,.gjs-clm-tags #gjs-clm-checkbox{color:#fff}.gjs-field{background-color:#22272e;border-radius:0;padding:2px}.gjs-field input,.gjs-field select,.gjs-field textarea{padding:5px}.gjs-field .gjs-d-s-arrow{border-top:4px solid #646464}#sidebar-header{position:absolute;box-shadow:none;width:325px;padding-bottom:0;margin-bottom:0;margin-left:0;margin-right:0;padding-left:0;padding-right:0;background:#22272e;height:40px;z-index:100}#sidebar-header #language-selector{float:right}#sidebar-header #language-selector .dropdown-item.active,#sidebar-header #language-selector .dropdown-item:active{background:#22272e !important}#sidebar-header #language-selector .dropdown-menu.show{padding:0}#sidebar-header #language-selector .dropdown-toggle{margin-top:2px;color:#fff !important;background:none !important;border:none;box-shadow:none;outline:none !important}#sidebar-header #language-selector .flag-icon{background-size:contain;background-position:50%;background-repeat:no-repeat;position:relative;display:inline-block;width:1.33333333em;height:12px;line-height:1em}#toggle-sidebar{position:absolute;left:0;top:0;z-index:100;color:#c4c7ce;background:#22272e;border-radius:0;transition-duration:unset}#block-search{position:fixed;background:#22272e;border-color:#3a3f4a;border-radius:0;width:325px;margin-top:-44px}#block-search i.fa-search{position:absolute;top:14px;left:9px;font-size:15px;color:#515664}#block-search input{background:#181b1e;padding:22px 20px 22px 30px;border-radius:0;border:none}#block-search input::placeholder{color:#515664}.gjs-block{border:none;box-shadow:none;padding-bottom:8px;margin:5px;width:calc(50% - 10px)}.gjs-block.fa{padding:8px}.gjs-block:hover{color:#0091d1 !important}.gjs-block .block-thumb{height:70px;overflow:hidden;margin-bottom:5px;opacity:.8}.gjs-block .block-thumb img{width:100%}.gjs-blocks-c{background:#22272e;padding:4px}.gjs-block-categories{background:#22272e;padding-bottom:45px}.gjs-block-label{font-size:.8rem;height:100%;display:grid}.gjs-block-label b{display:contents;font-weight:800}.gjs-block-category{background:#5a6371}.gjs-block-category.gjs-open{border-bottom:none !important;margin-bottom:10px}.gjs-blocks-cs{border-bottom:none !important}.gjs-layer .gjs-layer-title{background:#5a6371 !important}.gjs-layer.gjs-selected .gjs-layer-title{background-color:#0091d1 !important}.gjs-layer.gjs-hovered .gjs-layer-title{background-color:rgba(0,145,209,.4392156863) !important}.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-layer-title{background:#424853 !important;border-bottom:2px solid #363d48 !important;letter-spacing:0;font-size:16px;font-weight:normal}.gjs-sm-sector.gjs-sm-open .gjs-sm-title,.gjs-clm-tags.gjs-open .gjs-sm-title,.gjs-block-category.gjs-open .gjs-title{background:#545d6c !important}.gjs-layer-name{padding-top:2px;padding-bottom:13px}.gjs-layer-count{display:none}.gjs-layer-vis{padding-top:11px}.gjs-sm-sector.gjs-sm-open{border-bottom:1px solid rgba(0,0,0,.1)}.gjs-trt-trait{display:block}.gjs-trt-header{font-weight:normal}.gjs-trt-trait .gjs-label,.gjs-trt-trait .gjs-field{width:100%}.gjs-field-checkbox{height:17px !important;width:17px !important}.gjs-traits-label{font-weight:normal;font-size:16px;border-bottom:none}.gjs-sm-sector #gjs-sm-caret,.gjs-clm-tags #gjs-sm-caret{font-size:initial}.gjs-trt-traits .gjs-label-wrp{width:100%}.gjs-trt-traits p.no-settings{padding-top:10px;padding-bottom:10px}.gjs-trt-trait__wrp:first-of-type{padding-top:8px}.gjs-trt-trait__wrp:last-of-type{padding-bottom:8px}.gjs-trt-trait{padding-bottom:10px}.gjs-trt-trait .gjs-field-image{background:none;padding:0}.gjs-trt-trait .gjs-field-image .image__preview-container{text-align:center}.gjs-trt-trait .gjs-field-image .image__preview-container .image__remove-button{position:absolute;right:0;top:0;border-radius:0;background-color:#e9eef2;border-color:#e9eef2;color:#515664;padding:2px 6px}.gjs-trt-trait .gjs-field-image .image__preview-container img{max-width:100%;max-height:150px}#sidebar-bottom-buttons{position:absolute;left:0;bottom:0;height:40px;width:325px;margin:0;padding:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;background:#474c57;border-top:none}#sidebar-bottom-buttons button,#sidebar-bottom-buttons a{float:right;height:100%;width:33.33%;border-left:1px solid #343944;border-radius:0;color:#e3e3e3;font-size:15px;padding:8px 0}#sidebar-bottom-buttons button:hover,#sidebar-bottom-buttons a:hover{background:#017eb5;color:#fff}#sidebar-bottom-buttons button:last-child,#sidebar-bottom-buttons a:last-child{border-left:none}#sidebar-bottom-buttons button.waiting{background:#0091d1;color:#fff !important}#sidebar-bottom-buttons button.waiting i.fa{display:none}#sidebar-bottom-buttons #go-back:hover{background:#b03541}#sidebar-bottom-buttons #save-page:hover{background:#419147}.gjs-field{background-color:#22272e}.gjs-field select option{background-color:#fff;color:#000}.gjs-input-unit{color:#e1e1e1}.gjs-field-arrows{color:#e1e1e1}.gjs-sm-field select.gjs-input-unit{color:#e1e1e1}.gjs-sm-field select.gjs-input-unit option{background-color:#22272e;color:#fff}.gjs-field-arrow-d{border-top:4px solid #e1e1e1}.gjs-field-arrow-u{border-bottom:4px solid #e1e1e1}.gjs-field-radio{padding:0 !important}.gjs-radio-item .gjs-radio-item-label{padding-top:10px;margin-bottom:0;padding-bottom:10px;width:100%}.gjs-radio-item input:checked+.gjs-radio-item-label{background-color:#545d6c}.gjs-sm-header,.gjs-trt-header{font-weight:normal;color:#8c909d}.gjs-clm-tags{width:100%;padding-top:0;padding-bottom:0}.gjs-clm-tags #gjs-clm-status-c,.gjs-clm-tags #gjs-clm-sel-help{display:none}.gjs-clm-tags #gjs-clm-new{color:#e1e1e1}.gjs-clm-tags #gjs-clm-add-tag{background-color:#0091d1;border:none;box-shadow:1px 1px 0 rgba(255,255,255,.2) inset;color:#fff}.gjs-clm-tags #gjs-clm-add-tag:hover{background-color:#004a6c}.gjs-sm-sectors .gjs-four-color,.gjs-sm-sectors .gjs-color-warn{color:#e1e1e1}.gjs-sm-sectors .gjs-sm-field.gjs-sm-composite{background-color:rgba(195,226,236,.14);border:1px solid rgba(121,147,155,.14)}.gjs-sm-sectors .gjs-sm-layers{background-color:#3a3f4a}.gjs-sm-sectors .gjs-sm-layers .gjs-sm-btn{background:#fff;color:#000;text-shadow:none}.gjs-sm-sectors .gjs-sm-layers .gjs-field{padding:0;background-color:#3a3f4a}.gjs-sm-sectors .gjs-sm-layers .gjs-field select{color:#fff;background:#424853}.gjs-sm-sectors .gjs-sm-stack #gjs-sm-add{color:#fff}.gjs-sm-sectors .gjs-sm-stack #gjs-sm-add:hover{color:#aaa}.gjs-am-assets-header{display:none}.gjs-am-assets-cont{background:none;padding-top:0}.gjs-am-assets{height:325px}.gjs-am-asset{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.gjs-btn-prim{display:inline-block;margin-top:10px;padding:.375rem .75rem;font-weight:400;text-align:center;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-size:1rem;line-height:1.5;border-radius:.25rem;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;color:#fff;border:1px solid #0091d1;background-color:#0091d1}.gjs-am-add-asset button{float:left;width:auto}.gjs-am-add-asset .gjs-am-add-field{width:100%}.gjs-am-file-uploader>form{background-color:rgba(195,226,236,.14);border:2px dashed #bdc2c8}.gjs-am-file-uploader #gjs-am-title{color:#7e8793;text-shadow:none}.cke_dialog_body .cke_dialog_ui_vbox_child{padding:0}.cke_dialog_body input.cke_dialog_ui_input_text,.cke_dialog_body input.cke_dialog_ui_input_password,.cke_dialog_body input.cke_dialog_ui_input_tel,.cke_dialog_body textarea.cke_dialog_ui_input_textarea,.cke_dialog_body div.cke_dialog_ui_input_select{margin-bottom:10px}.cke_dialog_body .cke_dialog_ui_input_select{width:100% !important}.sidebar-collapsed .gjs-cv-canvas{width:calc(100% - 0px)}.sidebar-collapsed .gjs-pn-panels{display:none}.sidebar-collapsed .gjs-cv-canvas,.sidebar-collapsed .gjs-pn-devices-c{left:0}.sidebar-collapsed #toggle-sidebar{padding:14px 18px;font-size:18px;-webkit-box-shadow:3px 7px 11px -4px rgba(0,0,0,.03);-moz-box-shadow:3px 7px 11px -4px rgba(0,0,0,.03);box-shadow:2px 3px 10px 2px rgba(0,0,0,.3);border-bottom-right-radius:4px} +html,body,#gjs{height:100% !important;margin:0;overflow:hidden}*{-webkit-box-shadow:none !important;-moz-box-shadow:none !important;box-shadow:none !important}.form-control,.form-control:focus{color:#e1e1e1}.cursor-pointer{cursor:pointer}.gjs-editor{font-size:.9rem}.toast{opacity:1 !important;border:none;right:15px;box-shadow:none}.toast.toast-success{background:#2dc837}#phpb-loading{position:absolute;height:100%;width:100%;background-color:#fff;z-index:10000;transition:opacity .3s,visibility .3s}#phpb-loading.loaded{visibility:hidden;opacity:0}#phpb-loading .circle{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:150px;height:150px}#phpb-loading .circle .text{font-size:20px;margin:0 -30px;margin-top:20px;text-align:center;color:#0091d1}#phpb-loading .loader{width:calc(100% - 0px);height:calc(100% - 0px);border:8px solid #0091d1;border-top:8px solid #004a6c;border-radius:50%;animation:rotate 5s linear infinite}@keyframes rotate{100%{transform:rotate(360deg)}}.btn.focus,.btn:focus{box-shadow:none}.gjs-cv-canvas{height:100%;top:0;width:calc(100% - 325px)}.gjs-toolbar{z-index:100 !important}.gjs-pn-panel{padding:0}.gjs-pn-panel .gjs-pn-buttons{justify-content:center}.gjs-pn-commands,.gjs-pn-options,.gjs-pn-devices-c{display:none}.gjs-devices-c{padding:0}.gjs-one-bg{background-color:#313844;border-bottom:none;color:#c4c7ce}.gjs-two-color{color:#e1e1e1}.gjs-four-color{color:#e1e1e1}.gjs-four-color-h:hover{color:#e1e1e1}.gjs-pn-commands{width:100%;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}::-webkit-scrollbar{width:7px;height:7px}::-webkit-scrollbar-track{background:#313844 !important}::-webkit-scrollbar-thumb{background-color:#a5acb9 !important;border-radius:3px}::-webkit-scrollbar-thumb:hover{background-color:#0091d1 !important}.gjs-pn-views{top:40px}.gjs-pn-views .gjs-pn-btn{width:33.33%;margin-right:0;padding:16px 15px 16px 15px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;background:#3a3f4a;color:#e3e3e3;border-bottom:1px solid #3a3f4a;font-size:16px}.gjs-pn-views .gjs-pn-btn.gjs-pn-active{padding:15px;background-color:#515664;border-bottom-left-radius:unset;border-bottom-right-radius:unset;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;color:#fff;border-bottom:3px solid #0091d1}.gjs-pn-options{right:0}.gjs-pn-views,.gjs-pn-views-container{left:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;width:325px;padding-bottom:0;margin-bottom:0;margin-left:0;margin-right:0;padding-left:0;padding-right:0}.gjs-pn-views-container{padding-top:89px;background:#22272e;height:calc(100% - 40px);overflow:hidden}.gjs-pn-views-container>div:first-of-type{margin-top:44px}.gjs-pn-views-container>div{height:100%;overflow-y:auto}.gjs-pn-views-container>div>div{background:#22272e;border:none}.gjs-cv-canvas,.gjs-pn-devices-c{left:325px}.gjs-pn-panel #gjs-sm-caret{padding-right:0 !important}.gjs-pn-panel .fa-caret-down{margin-right:5px !important}.gjs-pn-panel .fa-caret-right{margin-right:8px !important}.gjs-three-bg{background-color:#0091d1}.gjs-clm-tags #gjs-clm-close,.gjs-clm-tags #gjs-clm-checkbox{color:#fff}.gjs-field{background-color:#22272e;border-radius:0;padding:2px}.gjs-field input,.gjs-field select,.gjs-field textarea{padding:5px}.gjs-field .gjs-d-s-arrow{border-top:4px solid #646464}#sidebar-header{position:absolute;box-shadow:none;width:325px;padding:0 10px;background:#22272e;height:40px;z-index:100;display:flex;align-items:center}#sidebar-header #language-selector{margin-left:auto}#sidebar-header #language-selector select{background:#2e323b;color:#e3e3e3;border:1px solid #474c57;border-radius:4px;padding:4px 8px;font-size:12px;outline:none;cursor:pointer}#sidebar-header #language-selector select:focus{border-color:#3b82f6}#toggle-sidebar{position:absolute;left:0;top:0;z-index:100;color:#c4c7ce;background:#22272e;border-radius:0;border:none;cursor:pointer;height:40px;width:40px;display:flex;align-items:center;justify-content:center}#block-search{position:fixed;background:#22272e;border-color:#3a3f4a;border-radius:0;width:325px;margin-top:-44px}#block-search i.fa-search{position:absolute;top:14px;left:9px;font-size:15px;color:#515664}#block-search input{background:#181b1e;padding:22px 20px 22px 30px;border-radius:0;border:none}#block-search input::placeholder{color:#515664}.gjs-block{border:none;box-shadow:none;padding-bottom:8px;margin:5px;width:calc(50% - 10px)}.gjs-block.fa{padding:8px}.gjs-block:hover{color:#0091d1 !important}.gjs-block .block-thumb{height:70px;overflow:hidden;margin-bottom:5px;opacity:.8}.gjs-block .block-thumb img{width:100%}.gjs-blocks-c{background:#22272e;padding:4px}.gjs-block-categories{background:#22272e;padding-bottom:45px}.gjs-block-label{font-size:.8rem;height:100%;display:grid}.gjs-block-label b{display:contents;font-weight:800}.gjs-block-category{background:#5a6371}.gjs-block-category.gjs-open{border-bottom:none !important;margin-bottom:10px}.gjs-blocks-cs{border-bottom:none !important}.gjs-layer .gjs-layer-title{background:#5a6371 !important}.gjs-layer.gjs-selected .gjs-layer-title{background-color:#0091d1 !important}.gjs-layer.gjs-hovered .gjs-layer-title{background-color:rgba(0,145,209,.4392156863) !important}.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-layer-title{background:#424853 !important;border-bottom:2px solid #363d48 !important;letter-spacing:0;font-size:16px;font-weight:normal}.gjs-sm-sector.gjs-sm-open .gjs-sm-title,.gjs-clm-tags.gjs-open .gjs-sm-title,.gjs-block-category.gjs-open .gjs-title{background:#545d6c !important}.gjs-layer-name{padding-top:2px;padding-bottom:13px}.gjs-layer-count{display:none}.gjs-layer-vis{padding-top:11px}.gjs-sm-sector.gjs-sm-open{border-bottom:1px solid rgba(0,0,0,.1)}.gjs-trt-trait{display:block}.gjs-trt-header{font-weight:normal}.gjs-trt-trait .gjs-label,.gjs-trt-trait .gjs-field{width:100%}.gjs-field-checkbox{height:17px !important;width:17px !important}.gjs-traits-label{font-weight:normal;font-size:16px;border-bottom:none}.gjs-sm-sector #gjs-sm-caret,.gjs-clm-tags #gjs-sm-caret{font-size:initial}.gjs-trt-traits .gjs-label-wrp{width:100%}.gjs-trt-traits p.no-settings{padding-top:10px;padding-bottom:10px}.gjs-trt-trait__wrp:first-of-type{padding-top:8px}.gjs-trt-trait__wrp:last-of-type{padding-bottom:8px}.gjs-trt-trait{padding-bottom:10px}.gjs-trt-trait .gjs-field-image{background:none;padding:0}.gjs-trt-trait .gjs-field-image .image__preview-container{text-align:center}.gjs-trt-trait .gjs-field-image .image__preview-container .image__remove-button{position:absolute;right:0;top:0;border-radius:0;background-color:#e9eef2;border-color:#e9eef2;color:#515664;padding:2px 6px}.gjs-trt-trait .gjs-field-image .image__preview-container img{max-width:100%;max-height:150px}#sidebar-bottom-buttons{position:absolute;left:0;bottom:0;height:40px;width:325px;margin:0;padding:0;background:#474c57;border-top:none;display:flex}#sidebar-bottom-buttons button,#sidebar-bottom-buttons a{flex:1;display:inline-flex;align-items:center;justify-content:center;height:100%;border-left:1px solid #343944;border-radius:0;color:#e3e3e3;font-size:13px;padding:0 4px;text-decoration:none;border:none;border-left:1px solid #343944}#sidebar-bottom-buttons button:hover,#sidebar-bottom-buttons a:hover{background:#017eb5;color:#fff}#sidebar-bottom-buttons button:first-child,#sidebar-bottom-buttons a:first-child{border-left:none}#sidebar-bottom-buttons button.waiting{background:#0091d1;color:#fff !important}#sidebar-bottom-buttons button.waiting i.fa-save{display:none}#sidebar-bottom-buttons #go-back:hover{background:#b03541}#sidebar-bottom-buttons #save-page:hover{background:#419147}.gjs-field{background-color:#22272e}.gjs-field select option{background-color:#fff;color:#000}.gjs-input-unit{color:#e1e1e1}.gjs-field-arrows{color:#e1e1e1}.gjs-sm-field select.gjs-input-unit{color:#e1e1e1}.gjs-sm-field select.gjs-input-unit option{background-color:#22272e;color:#fff}.gjs-field-arrow-d{border-top:4px solid #e1e1e1}.gjs-field-arrow-u{border-bottom:4px solid #e1e1e1}.gjs-field-radio{padding:0 !important}.gjs-radio-item .gjs-radio-item-label{padding-top:10px;margin-bottom:0;padding-bottom:10px;width:100%}.gjs-radio-item input:checked+.gjs-radio-item-label{background-color:#545d6c}.gjs-sm-header,.gjs-trt-header{font-weight:normal;color:#8c909d}.gjs-clm-tags{width:100%;padding-top:0;padding-bottom:0}.gjs-clm-tags #gjs-clm-status-c,.gjs-clm-tags #gjs-clm-sel-help{display:none}.gjs-clm-tags #gjs-clm-new{color:#e1e1e1}.gjs-clm-tags #gjs-clm-add-tag{background-color:#0091d1;border:none;box-shadow:1px 1px 0 rgba(255,255,255,.2) inset;color:#fff}.gjs-clm-tags #gjs-clm-add-tag:hover{background-color:#004a6c}.gjs-sm-sectors .gjs-four-color,.gjs-sm-sectors .gjs-color-warn{color:#e1e1e1}.gjs-sm-sectors .gjs-sm-field.gjs-sm-composite{background-color:rgba(195,226,236,.14);border:1px solid rgba(121,147,155,.14)}.gjs-sm-sectors .gjs-sm-layers{background-color:#3a3f4a}.gjs-sm-sectors .gjs-sm-layers .gjs-sm-btn{background:#fff;color:#000;text-shadow:none}.gjs-sm-sectors .gjs-sm-layers .gjs-field{padding:0;background-color:#3a3f4a}.gjs-sm-sectors .gjs-sm-layers .gjs-field select{color:#fff;background:#424853}.gjs-sm-sectors .gjs-sm-stack #gjs-sm-add{color:#fff}.gjs-sm-sectors .gjs-sm-stack #gjs-sm-add:hover{color:#aaa}.gjs-am-assets-header{display:none}.gjs-am-assets-cont{background:none;padding-top:0}.gjs-am-assets{height:325px}.gjs-am-asset{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.gjs-btn-prim{display:inline-block;margin-top:10px;padding:.375rem .75rem;font-weight:400;text-align:center;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-size:1rem;line-height:1.5;border-radius:.25rem;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;color:#fff;border:1px solid #0091d1;background-color:#0091d1}.gjs-am-add-asset button{float:left;width:auto}.gjs-am-add-asset .gjs-am-add-field{width:100%}.gjs-am-file-uploader>form{background-color:rgba(195,226,236,.14);border:2px dashed #bdc2c8}.gjs-am-file-uploader #gjs-am-title{color:#7e8793;text-shadow:none}.gjs-link-modal-form{color:#d1d5db;font-size:14px}.gjs-link-modal-form .gjs-field{background-color:#2e323b;border:1px solid #474c57;color:#fff;padding:8px 12px;border-radius:4px;outline:none;font-size:14px}.gjs-link-modal-form .gjs-field:focus{border-color:#3b82f6}.gjs-link-modal-form select.gjs-field{appearance:none;background-image:url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a0aec0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");background-repeat:no-repeat;background-position:right 10px center;background-size:16px;padding-right:32px}.gjs-link-modal-form .btn{padding:6px 14px;border-radius:4px;font-size:13px;cursor:pointer;border:none;transition:background-color .15s ease-in-out}.sidebar-collapsed .gjs-cv-canvas{width:calc(100% - 0px)}.sidebar-collapsed .gjs-pn-panels{display:none}.sidebar-collapsed .gjs-cv-canvas,.sidebar-collapsed .gjs-pn-devices-c{left:0}.sidebar-collapsed #toggle-sidebar{padding:14px 18px;font-size:18px;-webkit-box-shadow:3px 7px 11px -4px rgba(0,0,0,.03);-moz-box-shadow:3px 7px 11px -4px rgba(0,0,0,.03);box-shadow:2px 3px 10px 2px rgba(0,0,0,.3);border-bottom-right-radius:4px} /*# sourceMappingURL=PageBuilderHead.css.map */ \ No newline at end of file diff --git a/plugi-core/dist/PageBuilderHead.css.map b/plugi-core/dist/PageBuilderHead.css.map index 58187e7..e5e3fbd 100644 --- a/plugi-core/dist/PageBuilderHead.css.map +++ b/plugi-core/dist/PageBuilderHead.css.map @@ -1 +1 @@ -{"version":3,"sourceRoot":"","sources":["file:///Users/paulspenke/Repositories/Plugi/plugi/plugi-core/src/Modules/GrapesJS/resources/assets/sass/pagebuilder.scss","file:///Users/paulspenke/Repositories/Plugi/plugi/plugi-core/src/Modules/GrapesJS/resources/assets/sass/fields.scss","file:///Users/paulspenke/Repositories/Plugi/plugi/plugi-core/src/Modules/GrapesJS/resources/assets/sass/style-manager.scss","file:///Users/paulspenke/Repositories/Plugi/plugi/plugi-core/src/Modules/GrapesJS/resources/assets/sass/asset-manager.scss","file:///Users/paulspenke/Repositories/Plugi/plugi/plugi-core/src/Modules/GrapesJS/resources/assets/sass/ckeditor.scss","file:///Users/paulspenke/Repositories/Plugi/plugi/plugi-core/src/Modules/GrapesJS/resources/assets/sass/mobile-mode.scss"],"names":[],"mappings":"AAMA,eACE,uBACA,SACA,gBAGF,EACE,mCACA,gCACA,2BAGF,kCACE,cAGF,gBACE,eAGF,YACE,gBAGF,OACE,qBACA,YACA,WACA,gBAEA,qBACE,mBAIJ,cACE,kBACA,YACA,WACA,sBACA,cACA,sCAEA,qBACE,kBACA,UAGF,sBACE,kBACA,QACA,SACA,gCACA,YACA,aAEA,4BACE,eACA,eACA,gBACA,kBACA,cAGJ,sBACE,uBACA,wBACA,yBACA,6BACA,kBACA,oCAEF,kBACE,+BAIJ,sBACE,gBAGF,eACE,YACA,MACA,yBAEF,aACE,uBAGF,cACE,UAEA,8BACE,uBAGJ,mDAGE,aAEF,eACE,UAEF,YACE,yBACA,mBACA,cAEF,eACE,cAEF,gBACE,cAEF,wBACE,cAEF,iBACE,WACA,wBACA,qBACA,gBAEF,oBACE,UACA,WAEF,0BACE,8BAEF,0BACE,oCACA,kBAEA,gCACE,oCAMJ,cACE,SAEA,0BACE,aACA,eACA,4BACA,wBACA,qBACA,gBACA,mBACA,cACA,gCACA,eAEA,wCACE,aACA,yBACA,gCACA,iCACA,wBACA,qBACA,gBACA,WACA,gCAIN,gBACE,QAEF,sCAEE,OACA,wBACA,qBACA,gBACA,MA1Lc,MA2Ld,iBACA,gBACA,cACA,eACA,eACA,gBAEF,wBACE,iBACA,mBACA,yBACA,gBAEA,0CACE,gBAGF,4BACE,YACA,gBAGF,gCACE,mBACA,YAGJ,iCAEE,KAxNc,MA2Nd,4BACE,2BAEF,6BACE,4BAEF,8BACE,4BAOJ,cACE,yBAGA,6DAEE,WAGJ,WACE,yBACA,gBACA,YAEA,uDAGE,YAGF,0BACE,6BAOJ,gBACE,kBACA,gBACA,MAxQc,MAyQd,iBACA,gBACA,cACA,eACA,eACA,gBACA,mBACA,YACA,YAEA,mCACE,YAEA,kHAEE,8BAEF,uDACE,UAEF,oDACE,eACA,sBACA,2BACA,YACA,gBACA,wBAEF,8CACE,wBACA,wBACA,4BACA,kBACA,qBACA,mBACA,YACA,gBAIN,gBACE,kBACA,OACA,MACA,YACA,cACA,mBACA,gBACA,0BAMF,cACE,eACA,mBACA,qBACA,gBACA,YACA,iBAEA,0BACE,kBACA,SACA,SACA,eACA,cAGF,oBACE,mBACA,4BACA,gBACA,YAEA,iCACE,cAKN,WACE,YACA,gBACA,mBACA,WACA,uBAEA,cACE,YAGF,iBACE,yBAGF,wBACE,YACA,gBACA,kBACA,WAEA,4BACE,WAIN,cACE,mBACA,YAEF,sBACE,mBACA,oBAEF,iBACE,gBACA,YACA,aAEA,mBACE,iBACA,gBAGJ,oBACE,mBAEF,6BACE,8BACA,mBAEF,eACE,8BAMF,4BACE,8BAEF,yCACE,oCAEF,wCACE,wDAEF,6HAKE,8BACA,2CACA,iBACA,eACA,mBAEF,sHAGE,8BAEF,gBACE,gBACA,oBAEF,iBACE,aAEF,eACE,iBAMF,2BACE,uCAMF,eACE,cAEF,gBACE,mBAEF,oDAEE,WAEF,oBACE,uBACA,sBAEF,kBACE,mBACA,eACA,mBAEF,yDAEE,kBAEF,+BACE,WAEF,8BACE,iBACA,oBAEF,kCACE,gBAEF,iCACE,mBAEF,eACE,oBAEF,gCACE,gBACA,UAEA,0DACE,kBAEA,gFACE,kBACA,QACA,MACA,gBACA,yBACA,qBACA,cACA,gBAGF,8DACE,eACA,iBAQN,wBACE,kBACA,OACA,SACA,OAzgB8B,KA0gB9B,MA3gBc,MA4gBd,SACA,UACA,wBACA,qBACA,gBACA,mBACA,gBAEA,yDAEE,YACA,YACA,aACA,8BACA,gBACA,cACA,eACA,cAEA,qEACE,mBACA,WAEF,+EACE,iBAIJ,uCACE,mBACA,sBAEA,4CACE,aAIJ,uCACE,mBAEF,yCACE,mBCrjBJ,WACE,yBAGA,yBACE,sBACA,WAGJ,gBACE,cAEF,kBACE,cAEF,oCACE,cAEA,2CACE,yBACA,WAGJ,mBACE,6BAEF,mBACE,gCAGF,iBACE,qBAEF,sCACE,iBACA,gBACA,oBACA,WAEF,oDACE,yBCxCF,+BACE,mBACA,cAGF,cACE,WACA,cACA,iBAEA,gEAEE,aAEF,2BACE,cAEF,+BACE,yBACA,YACA,gDACA,WAEA,qCACE,yBAMJ,gEAEE,cAGF,+CACE,uCACA,uCAGF,+BACE,yBAEA,2CACE,gBACA,WACA,iBAGF,0CACE,UACA,yBAEA,iDACE,WACA,mBAKN,0CACE,WAEA,gDACE,WChEN,sBACE,aAEF,oBACE,gBACA,cAEF,eACE,aAEF,cACE,2BACA,yBACA,sBACA,qBACA,iBAGF,cACE,qBACA,gBACA,uBACA,gBACA,kBACA,sBACA,yBACA,sBACA,qBACA,iBACA,eACA,gBACA,qBACA,8HACA,WACA,yBACA,yBAIA,yBACE,WACA,WAEF,oCACE,WAKF,2BACE,uCACA,0BAEF,oCACE,cACA,iBCtDF,2CACE,UAEF,0PAKE,mBAGF,6CACE,sBCZF,kCACE,uBAGF,kCACE,aAEF,uEACE,OAGF,mCACE,kBACA,eACA,qDACA,kDACA,2CACA"} \ No newline at end of file +{"version":3,"sourceRoot":"","sources":["file:///Users/paulspenke/Repositories/Plugi/plugi/plugi-core/src/Modules/GrapesJS/resources/assets/sass/pagebuilder.scss","file:///Users/paulspenke/Repositories/Plugi/plugi/plugi-core/src/Modules/GrapesJS/resources/assets/sass/fields.scss","file:///Users/paulspenke/Repositories/Plugi/plugi/plugi-core/src/Modules/GrapesJS/resources/assets/sass/style-manager.scss","file:///Users/paulspenke/Repositories/Plugi/plugi/plugi-core/src/Modules/GrapesJS/resources/assets/sass/asset-manager.scss","file:///Users/paulspenke/Repositories/Plugi/plugi/plugi-core/src/Modules/GrapesJS/resources/assets/sass/mobile-mode.scss"],"names":[],"mappings":"AAMA,eACE,uBACA,SACA,gBAGF,EACE,mCACA,gCACA,2BAGF,kCACE,cAGF,gBACE,eAGF,YACE,gBAGF,OACE,qBACA,YACA,WACA,gBAEA,qBACE,mBAIJ,cACE,kBACA,YACA,WACA,sBACA,cACA,sCAEA,qBACE,kBACA,UAGF,sBACE,kBACA,QACA,SACA,gCACA,YACA,aAEA,4BACE,eACA,eACA,gBACA,kBACA,cAGJ,sBACE,uBACA,wBACA,yBACA,6BACA,kBACA,oCAEF,kBACE,+BAIJ,sBACE,gBAGF,eACE,YACA,MACA,yBAEF,aACE,uBAGF,cACE,UAEA,8BACE,uBAGJ,mDAGE,aAEF,eACE,UAEF,YACE,yBACA,mBACA,cAEF,eACE,cAEF,gBACE,cAEF,wBACE,cAEF,iBACE,WACA,wBACA,qBACA,gBAEF,oBACE,UACA,WAEF,0BACE,8BAEF,0BACE,oCACA,kBAEA,gCACE,oCAMJ,cACE,SAEA,0BACE,aACA,eACA,4BACA,wBACA,qBACA,gBACA,mBACA,cACA,gCACA,eAEA,wCACE,aACA,yBACA,gCACA,iCACA,wBACA,qBACA,gBACA,WACA,gCAIN,gBACE,QAEF,sCAEE,OACA,wBACA,qBACA,gBACA,MA1Lc,MA2Ld,iBACA,gBACA,cACA,eACA,eACA,gBAEF,wBACE,iBACA,mBACA,yBACA,gBAEA,0CACE,gBAGF,4BACE,YACA,gBAGF,gCACE,mBACA,YAGJ,iCAEE,KAxNc,MA2Nd,4BACE,2BAEF,6BACE,4BAEF,8BACE,4BAOJ,cACE,yBAGA,6DAEE,WAGJ,WACE,yBACA,gBACA,YAEA,uDAGE,YAGF,0BACE,6BAOJ,gBACE,kBACA,gBACA,MAxQc,MAyQd,eACA,mBACA,YACA,YACA,aACA,mBAEA,mCACE,iBAEA,0CACE,mBACA,cACA,yBACA,kBACA,gBACA,eACA,aACA,eAEA,gDACE,qBAKR,gBACE,kBACA,OACA,MACA,YACA,cACA,mBACA,gBACA,YACA,eACA,YACA,WACA,aACA,mBACA,uBAMF,cACE,eACA,mBACA,qBACA,gBACA,YACA,iBAEA,0BACE,kBACA,SACA,SACA,eACA,cAGF,oBACE,mBACA,4BACA,gBACA,YAEA,iCACE,cAKN,WACE,YACA,gBACA,mBACA,WACA,uBAEA,cACE,YAGF,iBACE,yBAGF,wBACE,YACA,gBACA,kBACA,WAEA,4BACE,WAIN,cACE,mBACA,YAEF,sBACE,mBACA,oBAEF,iBACE,gBACA,YACA,aAEA,mBACE,iBACA,gBAGJ,oBACE,mBAEF,6BACE,8BACA,mBAEF,eACE,8BAMF,4BACE,8BAEF,yCACE,oCAEF,wCACE,wDAEF,6HAKE,8BACA,2CACA,iBACA,eACA,mBAEF,sHAGE,8BAEF,gBACE,gBACA,oBAEF,iBACE,aAEF,eACE,iBAMF,2BACE,uCAMF,eACE,cAEF,gBACE,mBAEF,oDAEE,WAEF,oBACE,uBACA,sBAEF,kBACE,mBACA,eACA,mBAEF,yDAEE,kBAEF,+BACE,WAEF,8BACE,iBACA,oBAEF,kCACE,gBAEF,iCACE,mBAEF,eACE,oBAEF,gCACE,gBACA,UAEA,0DACE,kBAEA,gFACE,kBACA,QACA,MACA,gBACA,yBACA,qBACA,cACA,gBAGF,8DACE,eACA,iBAQN,wBACE,kBACA,OACA,SACA,OAjgB8B,KAkgB9B,MAngBc,MAogBd,SACA,UACA,mBACA,gBACA,aAEA,yDAEE,OACA,oBACA,mBACA,uBACA,YACA,8BACA,gBACA,cACA,eACA,cACA,qBACA,YACA,8BAEA,qEACE,mBACA,WAEF,iFACE,iBAIJ,uCACE,mBACA,sBAEA,iDACE,aAIJ,uCACE,mBAEF,yCACE,mBChjBJ,WACE,yBAGA,yBACE,sBACA,WAGJ,gBACE,cAEF,kBACE,cAEF,oCACE,cAEA,2CACE,yBACA,WAGJ,mBACE,6BAEF,mBACE,gCAGF,iBACE,qBAEF,sCACE,iBACA,gBACA,oBACA,WAEF,oDACE,yBCxCF,+BACE,mBACA,cAGF,cACE,WACA,cACA,iBAEA,gEAEE,aAEF,2BACE,cAEF,+BACE,yBACA,YACA,gDACA,WAEA,qCACE,yBAMJ,gEAEE,cAGF,+CACE,uCACA,uCAGF,+BACE,yBAEA,2CACE,gBACA,WACA,iBAGF,0CACE,UACA,yBAEA,iDACE,WACA,mBAKN,0CACE,WAEA,gDACE,WChEN,sBACE,aAEF,oBACE,gBACA,cAEF,eACE,aAEF,cACE,2BACA,yBACA,sBACA,qBACA,iBAGF,cACE,qBACA,gBACA,uBACA,gBACA,kBACA,sBACA,yBACA,sBACA,qBACA,iBACA,eACA,gBACA,qBACA,8HACA,WACA,yBACA,yBAIA,yBACE,WACA,WAEF,oCACE,WAKF,2BACE,uCACA,0BAEF,oCACE,cACA,iBHigBJ,qBACE,cACA,eAEA,gCACE,yBACA,yBACA,WACA,iBACA,kBACA,aACA,eAEA,sCACE,qBAIJ,sCACE,gBACA,wRACA,4BACA,sCACA,qBACA,mBAGF,0BACE,iBACA,kBACA,eACA,eACA,YACA,6CIxlBF,kCACE,uBAGF,kCACE,aAEF,uEACE,OAGF,mCACE,kBACA,eACA,qDACA,kDACA,2CACA"} \ No newline at end of file diff --git a/plugi-core/dist/PageBuilderHead.js b/plugi-core/dist/PageBuilderHead.js index 2d2cf21..8dc838d 100644 --- a/plugi-core/dist/PageBuilderHead.js +++ b/plugi-core/dist/PageBuilderHead.js @@ -1,3 +1,3 @@ -/*! grapesjs - 0.21.2 */ -!function(t,e){'object'==typeof exports&&'object'==typeof module?module.exports=e():'function'==typeof define&&define.amd?define([],e):'object'==typeof exports?exports["grapesjs"]=e():t["grapesjs"]=e()}('undefined'!=typeof globalThis?globalThis:'undefined'!=typeof window?window:this,(()=>(()=>{var t={410:(t,e,n)=>{var o,r,i;1&&(r=[n(50),n(316)],void 0===(i='function'==typeof(o=function(t,e){var n=Array.prototype.slice;function o(t,e,n){return n.length<=4?t.call(e,n[0],n[1],n[2],n[3]):t.apply(e,n)}function r(t,e){return n.call(t,e)}function i(e,n){return null!=e&&(t.isArray(n)||(n=r(arguments,1)),t.all(n,(function(t){return t in e})))}var s=function(){var e=!1,n=-1;function o(){n++,e=!0,t.defer((function(){e=!1}))}return function(){return e||o(),n}}();function a(){this.registeredObjects=[],this.cidIndexes=[]}function l(e,n,o,r){for(var i,s=0,a=n.length;st.maximumStackLength&&(t.shift(),t.pointer--)}}}a.prototype={isRegistered:function(e){return e&&e.cid?this.registeredObjects[e.cid]:t.contains(this.registeredObjects,e)},register:function(t){return!this.isRegistered(t)&&(t&&t.cid?(this.registeredObjects[t.cid]=t,this.cidIndexes.push(t.cid)):this.registeredObjects.push(t),!0)},unregister:function(e){if(this.isRegistered(e)){if(e&&e.cid)delete this.registeredObjects[e.cid],this.cidIndexes.splice(t.indexOf(this.cidIndexes,e.cid),1);else{var n=t.indexOf(this.registeredObjects,e);this.registeredObjects.splice(n,1)}return!0}return!1},get:function(){return t.map(this.cidIndexes,(function(t){return this.registeredObjects[t]}),this).concat(this.registeredObjects)}};var f={add:{undo:function(t,e,n,o){t.remove(n,o)},redo:function(t,e,n,o){o.index&&(o.at=o.index),t.add(n,o)},on:function(e,n,o){return{object:n,before:void 0,after:e,options:t.clone(o)}}},remove:{undo:function(t,e,n,o){"index"in o&&(o.at=o.index),t.add(e,o)},redo:function(t,e,n,o){t.remove(e,o)},on:function(e,n,o){return{object:n,before:e,after:void 0,options:t.clone(o)}}},change:{undo:function(e,n,o,r){t.isEmpty(n)?t.each(t.keys(o),e.unset,e):(e.set(n),r&&r.unsetData&&r.unsetData.before&&r.unsetData.before.length&&t.each(r.unsetData.before,e.unset,e))},redo:function(e,n,o,r){t.isEmpty(o)?t.each(t.keys(n),e.unset,e):(e.set(o),r&&r.unsetData&&r.unsetData.after&&r.unsetData.after.length&&t.each(r.unsetData.after,e.unset,e))},on:function(e,n){var o=e.changedAttributes(),r=t.keys(o),i=t.pick(e.previousAttributes(),r),s=t.keys(i),a=(n||(n={})).unsetData={after:[],before:[]};return r.length!=s.length&&(r.length>s.length?t.each(r,(function(t){t in i||a.before.push(t)}),this):t.each(s,(function(t){t in o||a.after.push(t)}))),{object:e,before:i,after:o,options:t.clone(n)}}},reset:{undo:function(t,e,n){t.reset(e)},redo:function(t,e,n){t.reset(n)},on:function(e,n){return{object:e,before:n.previousModels,after:t.clone(e.models)}}}};function h(){}function g(e,n,o,r){if("object"==typeof n)return t.each(n,(function(t,n){2===e?g(e,t,o,r):g(e,n,t,o)}));switch(e){case 0:i(o,"undo","redo","on")&&t.all(t.pick(o,"undo","redo","on"),t.isFunction)&&(r[n]=o);break;case 1:r[n]&&t.isObject(o)&&(r[n]=t.extend({},r[n],o));break;case 2:delete r[n]}return this}h.prototype=f;var v=e.Model.extend({defaults:{type:null,object:null,before:null,after:null,magicFusionIndex:null},undo:function(t){c("undo",this.attributes)},redo:function(t){c("redo",this.attributes)}}),y=e.Collection.extend({model:v,pointer:-1,track:!1,isCurrentlyUndoRedoing:!1,maximumStackLength:1/0,setMaxLength:function(t){this.maximumStackLength=t}}),m=e.Model.extend({defaults:{maximumStackLength:1/0,track:!1},initialize:function(e){this.stack=new y,this.objectRegistry=new a,this.undoTypes=new h,this.stack.setMaxLength(this.get("maximumStackLength")),this.on("change:maximumStackLength",(function(t,e){this.stack.setMaxLength(e)}),this),e&&e.track&&this.startTracking(),e&&e.register&&(t.isArray(e.register)||t.isArguments(e.register)?o(this.register,this,e.register):this.register(e.register))},startTracking:function(){this.set("track",!0),this.stack.track=!0},stopTracking:function(){this.set("track",!1),this.stack.track=!1},isTracking:function(){return this.get("track")},_addToStack:function(t){d(this.stack,t,r(arguments,1),this.undoTypes)},register:function(){l("on",arguments,this._addToStack,this)},unregister:function(){l("off",arguments,this._addToStack,this)},unregisterAll:function(){o(this.unregister,this,this.objectRegistry.get())},undo:function(t){u("undo",this,this.stack,t)},undoAll:function(){u("undo",this,this.stack,!1,!0)},redo:function(t){u("redo",this,this.stack,t)},redoAll:function(){u("redo",this,this.stack,!1,!0)},isAvailable:function(t){var e=this.stack,n=e.length;switch(t){case"undo":return n>0&&e.pointer>-1;case"redo":return n>0&&e.pointer{var o,r;!function(i){var s='object'==typeof self&&self.self===self&&self||'object'==typeof n.g&&n.g.global===n.g&&n.g;if(1)o=[n(50),n(895),e],r=function(t,e,n){s.Backbone=function(t,e,n,o){var r=t.Backbone,i=Array.prototype.slice;e.VERSION='1.4.1',e.$=o,e.noConflict=function(){return t.Backbone=r,this},e.emulateHTTP=!1,e.emulateJSON=!1;var s,a=e.Events={},l=/\s+/,c=function(t,e,o,r,i){var s,a=0;if(o&&'object'==typeof o){void 0!==r&&'context'in i&&void 0===i.context&&(i.context=r);for(s=n.keys(o);athis.length&&(r=this.length),r<0&&(r+=this.length+1);var i,s,a=[],l=[],c=[],u=[],p={},d=e.add,f=e.merge,h=e.remove,g=!1,v=this.comparator&&null==r&&!1!==e.sort,y=n.isString(this.comparator)?this.comparator:null;for(s=0;s7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=('/'+this.root+'/').replace(W,'/'),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var e=this.root.slice(0,-1)||'/';return this.location.replace(e+'#'+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement('iframe'),this.iframe.src='javascript:0',this.iframe.style.display='none',this.iframe.tabIndex=-1;var o=document.body,r=o.insertBefore(this.iframe,o.firstChild).contentWindow;r.document.open(),r.document.close(),r.location.hash='#'+this.fragment}var i=window.addEventListener||function(t,e){return attachEvent('on'+t,e)};if(this._usePushState?i('popstate',this.checkUrl,!1):this._useHashChange&&!this.iframe?i('hashchange',this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var t=window.removeEventListener||function(t,e){return detachEvent('on'+t,e)};this._usePushState?t('popstate',this.checkUrl,!1):this._useHashChange&&!this.iframe&&t('hashchange',this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),B.started=!1},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();if(e===this.fragment&&this.iframe&&(e=this.getHash(this.iframe.contentWindow)),e===this.fragment)return!1;this.iframe&&this.navigate(e),this.loadUrl()},loadUrl:function(t){return!!this.matchRoot()&&(t=this.fragment=this.getFragment(t),n.some(this.handlers,(function(e){if(e.route.test(t))return e.callback(t),!0})))},navigate:function(t,e){if(!B.started)return!1;e&&!0!==e||(e={trigger:!!e}),t=this.getFragment(t||'');var n=this.root;''!==t&&'?'!==t.charAt(0)||(n=n.slice(0,-1)||'/');var o=n+t;t=t.replace($,'');var r=this.decodeFragment(t);if(this.fragment!==r){if(this.fragment=r,this._usePushState)this.history[e.replace?'replaceState':'pushState']({},document.title,o);else{if(!this._wantsHashChange)return this.location.assign(o);if(this._updateHash(this.location,t,e.replace),this.iframe&&t!==this.getHash(this.iframe.contentWindow)){var i=this.iframe.contentWindow;e.replace||(i.document.open(),i.document.close()),this._updateHash(i.location,t,e.replace)}}return e.trigger?this.loadUrl(t):void 0}},_updateHash:function(t,e,n){if(n){var o=t.href.replace(/(javascript:|#).*$/,'');t.replace(o+'#'+e)}else t.hash='#'+e}}),e.history=new B;var q=function(t,e){var o,r=this;return o=t&&n.has(t,'constructor')?t.constructor:function(){return r.apply(this,arguments)},n.extend(o,r,e),o.prototype=n.create(r.prototype,t),o.prototype.constructor=o,o.__super__=r.prototype,o};y.extend=m.extend=F.extend=k.extend=B.extend=q;var G=function(){throw new Error('A "url" property or function must be specified')},K=function(t,e){var n=e.error;e.error=function(o){n&&n.call(e.context,t,o,e),t.trigger('error',t,o,e)}};return e}(s,n,t,e)}.apply(e,o),void 0===r||(t.exports=r);else;}()},210:(t,e,n)=>{1&&function(t){t.extendMode("css",{commentStart:"/*",commentEnd:"*/",newlineAfterToken:function(t,e){return/^[;{}]$/.test(e)}}),t.extendMode("javascript",{commentStart:"/*",commentEnd:"*/",newlineAfterToken:function(t,e,n,o){return this.jsonMode?/^[\[,{]$/.test(e)||/^}/.test(n):(";"!=e||!o.lexical||")"!=o.lexical.type)&&/^[;{}]$/.test(e)&&!/^;/.test(n)}});var e=/^(a|abbr|acronym|area|base|bdo|big|br|button|caption|cite|code|col|colgroup|dd|del|dfn|em|frame|hr|iframe|img|input|ins|kbd|label|legend|link|map|object|optgroup|option|param|q|samp|script|select|small|span|strong|sub|sup|textarea|tt|var)$/;t.extendMode("xml",{commentStart:"\x3c!--",commentEnd:"--\x3e",newlineAfterToken:function(t,n,o,r){var i=!1;return"html"==this.configuration&&(i=!!r.context&&e.test(r.context.tagName)),!i&&("tag"==t&&/>$/.test(n)&&r.context||/^-1&&a>-1&&a>s&&(t=t.substr(0,s)+t.substring(s+i.commentStart.length,a)+t.substr(a+i.commentEnd.length)),r.replaceRange(t,n,o)}}))})),t.defineExtension("autoIndentRange",(function(t,e){var n=this;this.operation((function(){for(var o=t.line;o<=e.line;o++)n.indentLine(o,"smart")}))})),t.defineExtension("autoFormatRange",(function(e,n){var o=this,r=o.getMode(),i=o.getRange(e,n).split("\n"),s=t.copyState(r,o.getTokenAt(e).state),a=o.getOption("tabSize"),l="",c=0,u=0===e.ch;function p(){l+="\n",u=!0,++c}for(var d=0;d2),y=/Android/.test(t),m=v||y||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),b=v||/Mac/.test(e),_=/\bCrOS\b/.test(t),w=/win/i.test(e),x=d&&t.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(d=!1,l=!0);var C=b&&(c||d&&(null==x||x<12.11)),S=n||s&&a>=9;function O(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}var T,k=function(t,e){var n=t.className,o=O(e).exec(n);if(o){var r=n.slice(o.index+o[0].length);t.className=n.slice(0,o.index)+(r?o[1]+r:"")}};function P(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function E(t,e){return P(t).appendChild(e)}function A(t,e,n,o){var r=document.createElement(t);if(n&&(r.className=n),o&&(r.style.cssText=o),"string"==typeof e)r.appendChild(document.createTextNode(e));else if(e)for(var i=0;i=e)return s+(e-i);s+=a-i,s+=n-s%n,i=a+1}}v?I=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:s&&(I=function(t){try{t.select()}catch(t){}});var H=function(){this.id=null,this.f=null,this.time=0,this.handler=F(this.onTimeout,this)};function z(t,e){for(var n=0;n=e)return o+Math.min(s,e-r);if(r+=i-o,o=i+1,(r+=n-r%n)>=e)return o}}var K=[""];function Y(t){for(;K.length<=t;)K.push(X(K)+" ");return K[t]}function X(t){return t[t.length-1]}function J(t,e){for(var n=[],o=0;o"€"&&(t.toUpperCase()!=t.toLowerCase()||et.test(t))}function ot(t,e){return e?!!(e.source.indexOf("\\w")>-1&&nt(t))||e.test(t):nt(t)}function rt(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}var it=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function st(t){return t.charCodeAt(0)>=768&&it.test(t)}function at(t,e,n){for(;(n<0?e>0:en?-1:1;;){if(e==n)return e;var r=(e+n)/2,i=o<0?Math.ceil(r):Math.floor(r);if(i==e)return t(i)?e:n;t(i)?n=i:e=i+o}}function ct(t,e,n,o){if(!t)return o(e,n,"ltr",0);for(var r=!1,i=0;ie||e==n&&s.to==e)&&(o(Math.max(s.from,e),Math.min(s.to,n),1==s.level?"rtl":"ltr",i),r=!0)}r||o(e,n,"ltr")}var ut=null;function pt(t,e,n){var o;ut=null;for(var r=0;re)return r;i.to==e&&(i.from!=i.to&&"before"==n?o=r:ut=r),i.from==e&&(i.from!=i.to&&"before"!=n?o=r:ut=r)}return null!=o?o:ut}var dt=function(){var t="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",e="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(n){return n<=247?t.charAt(n):1424<=n&&n<=1524?"R":1536<=n&&n<=1785?e.charAt(n-1536):1774<=n&&n<=2220?"r":8192<=n&&n<=8203?"w":8204==n?"b":"L"}var o=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,r=/[stwN]/,i=/[LRr]/,s=/[Lb1n]/,a=/[1n]/;function l(t,e,n){this.level=t,this.from=e,this.to=n}return function(t,e){var c="ltr"==e?"L":"R";if(0==t.length||"ltr"==e&&!o.test(t))return!1;for(var u=t.length,p=[],d=0;d-1&&(o[e]=r.slice(0,i).concat(r.slice(i+1)))}}}function mt(t,e){var n=vt(t,e);if(n.length)for(var o=Array.prototype.slice.call(arguments,2),r=0;r0}function xt(t){t.prototype.on=function(t,e){gt(this,t,e)},t.prototype.off=function(t,e){yt(this,t,e)}}function Ct(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function St(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function Ot(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function Tt(t){Ct(t),St(t)}function kt(t){return t.target||t.srcElement}function Pt(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),b&&t.ctrlKey&&1==e&&(e=3),e}var Et,At,jt=function(){if(s&&a<9)return!1;var t=A('div');return"draggable"in t||"dragDrop"in t}();function Mt(t){if(null==Et){var e=A("span","​");E(t,A("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(Et=e.offsetWidth<=1&&e.offsetHeight>2&&!(s&&a<8))}var n=Et?A("span","​"):A("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Lt(t){if(null!=At)return At;var e=E(t,document.createTextNode("AخA")),n=T(e,0,1).getBoundingClientRect(),o=T(e,1,2).getBoundingClientRect();return P(t),!(!n||n.left==n.right)&&(At=o.right-n.right<3)}var Dt,Nt=3!="\n\nb".split(/\n/).length?function(t){for(var e=0,n=[],o=t.length;e<=o;){var r=t.indexOf("\n",e);-1==r&&(r=t.length);var i=t.slice(e,"\r"==t.charAt(r-1)?r-1:r),s=i.indexOf("\r");-1!=s?(n.push(i.slice(0,s)),e+=s+1):(n.push(i),e=r+1)}return n}:function(t){return t.split(/\r\n?|\n/)},It=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch(t){return!1}}:function(t){var e;try{e=t.ownerDocument.selection.createRange()}catch(t){}return!(!e||e.parentElement()!=t)&&0!=e.compareEndPoints("StartToEnd",e)},Ft="oncopy"in(Dt=A("div"))||(Dt.setAttribute("oncopy","return;"),"function"==typeof Dt.oncopy),Vt=null;function Rt(t){if(null!=Vt)return Vt;var e=E(t,A("span","x")),n=e.getBoundingClientRect(),o=T(e,0,1).getBoundingClientRect();return Vt=Math.abs(n.left-o.left)>1}var Ht={},zt={};function Bt(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),Ht[t]=e}function Ut(t,e){zt[t]=e}function Wt(t){if("string"==typeof t&&zt.hasOwnProperty(t))t=zt[t];else if(t&&"string"==typeof t.name&&zt.hasOwnProperty(t.name)){var e=zt[t.name];"string"==typeof e&&(e={name:e}),(t=tt(e,t)).name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return Wt("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return Wt("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function $t(t,e){e=Wt(e);var n=Ht[e.name];if(!n)return $t(t,"text/plain");var o=n(t,e);if(qt.hasOwnProperty(e.name)){var r=qt[e.name];for(var i in r)r.hasOwnProperty(i)&&(o.hasOwnProperty(i)&&(o["_"+i]=o[i]),o[i]=r[i])}if(o.name=e.name,e.helperType&&(o.helperType=e.helperType),e.modeProps)for(var s in e.modeProps)o[s]=e.modeProps[s];return o}var qt={};function Gt(t,e){V(e,qt.hasOwnProperty(t)?qt[t]:qt[t]={})}function Kt(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var n={};for(var o in e){var r=e[o];r instanceof Array&&(r=r.concat([])),n[o]=r}return n}function Yt(t,e){for(var n;t.innerMode&&(n=t.innerMode(e))&&n.mode!=t;)e=n.state,t=n.mode;return n||{mode:t,state:e}}function Xt(t,e,n){return!t.startState||t.startState(e,n)}var Jt=function(t,e,n){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Zt(t,e){if((e-=t.first)<0||e>=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");for(var n=t;!n.lines;)for(var o=0;;++o){var r=n.children[o],i=r.chunkSize();if(e=t.first&&en?se(n,Zt(t,n).text.length):he(e,Zt(t,e.line).text.length)}function he(t,e){var n=t.ch;return null==n||n>e?se(t.line,e):n<0?se(t.line,0):t}function ge(t,e){for(var n=[],o=0;o=this.string.length},Jt.prototype.sol=function(){return this.pos==this.lineStart},Jt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Jt.prototype.next=function(){if(this.pose},Jt.prototype.eatSpace=function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},Jt.prototype.skipToEnd=function(){this.pos=this.string.length},Jt.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},Jt.prototype.backUp=function(t){this.pos-=t},Jt.prototype.column=function(){return this.lastColumnPos0?null:(o&&!1!==e&&(this.pos+=o[0].length),o)}var r=function(t){return n?t.toLowerCase():t};if(r(this.string.substr(this.pos,t.length))==r(t))return!1!==e&&(this.pos+=t.length),!0},Jt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Jt.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},Jt.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)},Jt.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};var ve=function(t,e){this.state=t,this.lookAhead=e},ye=function(t,e,n,o){this.state=e,this.doc=t,this.line=n,this.maxLookAhead=o||0,this.baseTokens=null,this.baseTokenPos=1};function me(t,e,n,o){var r=[t.state.modeGen],i={};ke(t,e.text,t.doc.mode,n,(function(t,e){return r.push(t,e)}),i,o);for(var s=n.state,a=function(o){n.baseTokens=r;var a=t.state.overlays[o],l=1,c=0;n.state=!0,ke(t,e.text,a.mode,n,(function(t,e){for(var n=l;ct&&r.splice(l,1,t,r[l+1],o),l+=2,c=Math.min(t,o)}if(e)if(a.opaque)r.splice(n,l-n,t,"overlay "+e),l=n+2;else for(;nt.options.maxHighlightLength&&Kt(t.doc.mode,o.state),i=me(t,e,o);r&&(o.state=r),e.stateAfter=o.save(!r),e.styles=i.styles,i.classes?e.styleClasses=i.classes:e.styleClasses&&(e.styleClasses=null),n===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))}return e.styles}function _e(t,e,n){var o=t.doc,r=t.display;if(!o.mode.startState)return new ye(o,!0,e);var i=Pe(t,e,n),s=i>o.first&&Zt(o,i-1).stateAfter,a=s?ye.fromSaved(o,s,i):new ye(o,Xt(o.mode),i);return o.iter(i,e,(function(n){we(t,n.text,a);var o=a.line;n.stateAfter=o==e-1||o%5==0||o>=r.viewFrom&&oe.start)return i}throw new Error("Mode "+t.name+" failed to advance stream.")}ye.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},ye.prototype.baseToken=function(t){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=t;)this.baseTokenPos+=2;var e=this.baseTokens[this.baseTokenPos+1];return{type:e&&e.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-t}},ye.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ye.fromSaved=function(t,e,n){return e instanceof ve?new ye(t,Kt(t.mode,e.state),n,e.lookAhead):new ye(t,Kt(t.mode,e),n)},ye.prototype.save=function(t){var e=!1!==t?Kt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ve(e,this.maxLookAhead):e};var Se=function(t,e,n){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=n};function Oe(t,e,n,o){var r,i,s=t.doc,a=s.mode,l=Zt(s,(e=fe(s,e)).line),c=_e(t,e.line,n),u=new Jt(l.text,t.options.tabSize,c);for(o&&(i=[]);(o||u.post.options.maxHighlightLength?(a=!1,s&&we(t,e,o,p.pos),p.pos=e.length,l=null):l=Te(Ce(n,p,o.state,d),i),d){var f=d[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!a||u!=l){for(;cs;--a){if(a<=i.first)return i.first;var l=Zt(i,a-1),c=l.stateAfter;if(c&&(!n||a+(c instanceof ve?c.lookAhead:0)<=i.modeFrontier))return a;var u=R(l.text,null,t.options.tabSize);(null==r||o>u)&&(r=a-1,o=u)}return r}function Ee(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontiern;o--){var r=Zt(t,o).stateAfter;if(r&&(!(r instanceof ve)||o+r.lookAhead=e:i.to>e);(o||(o=[])).push(new De(s,i.from,a?null:i.to))}}return o}function Re(t,e,n){var o;if(t)for(var r=0;r=e:i.to>e)||i.from==e&&"bookmark"==s.type&&(!n||i.marker.insertLeft)){var a=null==i.from||(s.inclusiveLeft?i.from<=e:i.from0&&a)for(var b=0;b0)){var u=[l,1],p=ae(c.from,a.from),d=ae(c.to,a.to);(p<0||!s.inclusiveLeft&&!p)&&u.push({from:c.from,to:a.from}),(d>0||!s.inclusiveRight&&!d)&&u.push({from:a.to,to:c.to}),r.splice.apply(r,u),l+=u.length-3}}return r}function Ue(t){var e=t.markedSpans;if(e){for(var n=0;ne)&&(!n||Ge(n,i.marker)<0)&&(n=i.marker)}return n}function Ze(t,e,n,o,r){var i=Zt(t,e),s=je&&i.markedSpans;if(s)for(var a=0;a=0&&p<=0||u<=0&&p>=0)&&(u<=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?ae(c.to,n)>=0:ae(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?ae(c.from,o)<=0:ae(c.from,o)<0)))return!0}}}function Qe(t){for(var e;e=Ye(t);)t=e.find(-1,!0).line;return t}function tn(t){for(var e;e=Xe(t);)t=e.find(1,!0).line;return t}function en(t){for(var e,n;e=Xe(t);)t=e.find(1,!0).line,(n||(n=[])).push(t);return n}function nn(t,e){var n=Zt(t,e),o=Qe(n);return n==o?e:ne(o)}function on(t,e){if(e>t.lastLine())return e;var n,o=Zt(t,e);if(!rn(t,o))return e;for(;n=Xe(o);)o=n.find(1,!0).line;return ne(o)+1}function rn(t,e){var n=je&&e.markedSpans;if(n)for(var o=void 0,r=0;re.maxLineLength&&(e.maxLineLength=n,e.maxLine=t)}))}var un=function(t,e,n){this.text=t,We(this,e),this.height=n?n(this):1};function pn(t,e,n,o){t.text=e,t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null),null!=t.order&&(t.order=null),Ue(t),We(t,n);var r=o?o(t):1;r!=t.height&&ee(t,r)}function dn(t){t.parent=null,Ue(t)}un.prototype.lineNo=function(){return ne(this)},xt(un);var fn={},hn={};function gn(t,e){if(!t||/^\s*$/.test(t))return null;var n=e.addModeClass?hn:fn;return n[t]||(n[t]=t.replace(/\S+/g,"cm-$&"))}function vn(t,e){var n=j("span",null,null,l?"padding-right: .1px":null),o={pre:j("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:t.getOption("lineWrapping")};e.measure={};for(var r=0;r<=(e.rest?e.rest.length:0);r++){var i=r?e.rest[r-1]:e.line,s=void 0;o.pos=0,o.addToken=mn,Lt(t.display.measure)&&(s=ft(i,t.doc.direction))&&(o.addToken=_n(o.addToken,s)),o.map=[],xn(i,o,be(t,i,e!=t.display.externalMeasured&&ne(i))),i.styleClasses&&(i.styleClasses.bgClass&&(o.bgClass=N(i.styleClasses.bgClass,o.bgClass||"")),i.styleClasses.textClass&&(o.textClass=N(i.styleClasses.textClass,o.textClass||""))),0==o.map.length&&o.map.push(0,0,o.content.appendChild(Mt(t.display.measure))),0==r?(e.measure.map=o.map,e.measure.cache={}):((e.measure.maps||(e.measure.maps=[])).push(o.map),(e.measure.caches||(e.measure.caches=[])).push({}))}if(l){var a=o.content.lastChild;(/\bcm-tab\b/.test(a.className)||a.querySelector&&a.querySelector(".cm-tab"))&&(o.content.className="cm-tab-wrap-hack")}return mt(t,"renderLine",t,e.line,o.pre),o.pre.className&&(o.textClass=N(o.pre.className,o.textClass||"")),o}function yn(t){var e=A("span","•","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e}function mn(t,e,n,o,r,i,l){if(e){var c,u=t.splitSpaces?bn(e,t.trailingSpace):e,p=t.cm.state.specialChars,d=!1;if(p.test(e)){c=document.createDocumentFragment();for(var f=0;1;){p.lastIndex=f;var h=p.exec(e),g=h?h.index-f:e.length-f;if(g){var v=document.createTextNode(u.slice(f,f+g));s&&a<9?c.appendChild(A("span",[v])):c.appendChild(v),t.map.push(t.pos,t.pos+g,v),t.col+=g,t.pos+=g}if(!h)break;f+=g+1;var y=void 0;if("\t"==h[0]){var m=t.cm.options.tabSize,b=m-t.col%m;(y=c.appendChild(A("span",Y(b),"cm-tab"))).setAttribute("role","presentation"),y.setAttribute("cm-text","\t"),t.col+=b}else"\r"==h[0]||"\n"==h[0]?((y=c.appendChild(A("span","\r"==h[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",h[0]),t.col+=1):((y=t.cm.options.specialCharPlaceholder(h[0])).setAttribute("cm-text",h[0]),s&&a<9?c.appendChild(A("span",[y])):c.appendChild(y),t.col+=1);t.map.push(t.pos,t.pos+1,y),t.pos++}}else t.col+=e.length,c=document.createTextNode(u),t.map.push(t.pos,t.pos+e.length,c),s&&a<9&&(d=!0),t.pos+=e.length;if(t.trailingSpace=32==u.charCodeAt(e.length-1),n||o||r||d||i||l){var _=n||"";o&&(_+=o),r&&(_+=r);var w=A("span",[c],_,i);if(l)for(var x in l)l.hasOwnProperty(x)&&"style"!=x&&"class"!=x&&w.setAttribute(x,l[x]);return t.content.appendChild(w)}t.content.appendChild(c)}}function bn(t,e){if(t.length>1&&!/ /.test(t))return t;for(var n=e,o="",r=0;rc&&p.from<=c);d++);if(p.to>=u)return t(n,o,r,i,s,a,l);t(n,o.slice(0,p.to-c),r,i,null,a,l),i=null,o=o.slice(p.to-c),c=p.to}}}function wn(t,e,n,o){var r=!o&&n.widgetNode;r&&t.map.push(t.pos,t.pos+e,r),!o&&t.cm.display.input.needsContentAttribute&&(r||(r=t.content.appendChild(document.createElement("span"))),r.setAttribute("cm-marker",n.id)),r&&(t.cm.display.input.setUneditable(r),t.content.appendChild(r)),t.pos+=e,t.trailingSpace=!1}function xn(t,e,n){var o=t.markedSpans,r=t.text,i=0;if(o)for(var s,a,l,c,u,p,d,f=r.length,h=0,g=1,v="",y=0;;){if(y==h){l=c=u=a="",d=null,p=null,y=1/0;for(var m=[],b=void 0,_=0;_h||x.collapsed&&w.to==h&&w.from==h)){if(null!=w.to&&w.to!=h&&y>w.to&&(y=w.to,c=""),x.className&&(l+=" "+x.className),x.css&&(a=(a?a+";":"")+x.css),x.startStyle&&w.from==h&&(u+=" "+x.startStyle),x.endStyle&&w.to==y&&(b||(b=[])).push(x.endStyle,w.to),x.title&&((d||(d={})).title=x.title),x.attributes)for(var C in x.attributes)(d||(d={}))[C]=x.attributes[C];x.collapsed&&(!p||Ge(p.marker,x)<0)&&(p=w)}else w.from>h&&y>w.from&&(y=w.from)}if(b)for(var S=0;S=f)break;for(var T=Math.min(f,y);1;){if(v){var k=h+v.length;if(!p){var P=k>T?v.slice(0,T-h):v;e.addToken(e,P,s?s+l:l,u,h+P.length==y?c:"",a,d)}if(k>=T){v=v.slice(T-h),h=T;break}h=k,u=""}v=r.slice(i,i=n[g++]),s=gn(n[g++],e.cm.options)}}else for(var E=1;E2&&i.push((l.bottom+c.top)/2-n.top)}}i.push(n.bottom-n.top)}}function Qn(t,e,n){if(t.line==e)return{map:t.measure.map,cache:t.measure.cache};if(t.rest){for(var o=0;on)return{map:t.measure.maps[r],cache:t.measure.caches[r],before:!0}}}function to(t,e){var n=ne(e=Qe(e)),o=t.display.externalMeasured=new Cn(t.doc,e,n);o.lineN=n;var r=o.built=vn(t,o);return o.text=r.pre,E(t.display.lineMeasure,r.pre),o}function eo(t,e,n,o){return ro(t,oo(t,e),n,o)}function no(t,e){if(e>=t.display.viewFrom&&e=n.lineN&&ee)&&(r=(i=l-a)-1,e>=l&&(s="right")),null!=r){if(o=t[c+2],a==l&&n==(o.insertLeft?"left":"right")&&(s=n),"left"==n&&0==r)for(;c&&t[c-2]==t[c-3]&&t[c-1].insertLeft;)o=t[(c-=3)+2],s="left";if("right"==n&&r==l-a)for(;c=0&&(n=t[r]).left==n.right;r--);return n}function co(t,e,n,o){var r,i=ao(e.map,n,o),l=i.node,c=i.start,u=i.end,p=i.collapse;if(3==l.nodeType){for(var d=0;d<4;d++){for(;c&&st(e.line.text.charAt(i.coverStart+c));)--c;for(;i.coverStart+u0&&(p=o="right"),r=t.options.lineWrapping&&(f=l.getClientRects()).length>1?f["right"==o?f.length-1:0]:l.getBoundingClientRect()}if(s&&a<9&&!c&&(!r||!r.left&&!r.right)){var h=l.parentNode.getClientRects()[0];r=h?{left:h.left,right:h.left+Mo(t.display),top:h.top,bottom:h.bottom}:so}for(var g=r.top-e.rect.top,v=r.bottom-e.rect.top,y=(g+v)/2,m=e.view.measure.heights,b=0;b=o.text.length?(l=o.text.length,c="before"):l<=0&&(l=0,c="after"),!a)return s("before"==c?l-1:l,"before"==c);function u(t,e,n){return s(n?t-1:t,1==a[e].level!=n)}var p=pt(a,l,c),d=ut,f=u(l,p,"before"==c);return null!=d&&(f.other=u(l,d,"before"!=c)),f}function xo(t,e){var n=0;e=fe(t.doc,e),t.options.lineWrapping||(n=Mo(t.display)*e.ch);var o=Zt(t.doc,e.line),r=an(o)+qn(t.display);return{left:n,right:n,top:r,bottom:r+o.height}}function Co(t,e,n,o,r){var i=se(t,e,n);return i.xRel=r,o&&(i.outside=o),i}function So(t,e,n){var o=t.doc;if((n+=t.display.viewOffset)<0)return Co(o.first,0,null,-1,-1);var r=oe(o,n),i=o.first+o.size-1;if(r>i)return Co(o.first+o.size-1,Zt(o,i).text.length,null,1,1);e<0&&(e=0);for(var s=Zt(o,r);;){var a=Po(t,s,r,e,n),l=Je(s,a.ch+(a.xRel>0||a.outside>0?1:0));if(!l)return a;var c=l.find(1);if(c.line==r)return c;s=Zt(o,r=c.line)}}function Oo(t,e,n,o){o-=yo(e);var r=e.text.length,i=lt((function(e){return ro(t,n,e-1).bottom<=o}),r,0);return{begin:i,end:r=lt((function(e){return ro(t,n,e).top>o}),i,r)}}function To(t,e,n,o){return n||(n=oo(t,e)),Oo(t,e,n,mo(t,e,ro(t,n,o),"line").top)}function ko(t,e,n,o){return!(t.bottom<=n)&&(t.top>n||(o?t.left:t.right)>e)}function Po(t,e,n,o,r){r-=an(e);var i=oo(t,e),s=yo(e),a=0,l=e.text.length,c=!0,u=ft(e,t.doc.direction);if(u){var p=(t.options.lineWrapping?Ao:Eo)(t,e,n,i,u,o,r);a=(c=1!=p.level)?p.from:p.to-1,l=c?p.to:p.from-1}var d,f,h=null,g=null,v=lt((function(e){var n=ro(t,i,e);return n.top+=s,n.bottom+=s,!!ko(n,o,r,!1)&&(n.top<=r&&n.left<=o&&(h=e,g=n),!0)}),a,l),y=!1;if(g){var m=o-g.left=_.bottom?1:0}return Co(n,v=at(e.text,v,1),f,y,o-d)}function Eo(t,e,n,o,r,i,s){var a=lt((function(a){var l=r[a],c=1!=l.level;return ko(wo(t,se(n,c?l.to:l.from,c?"before":"after"),"line",e,o),i,s,!0)}),0,r.length-1),l=r[a];if(a>0){var c=1!=l.level,u=wo(t,se(n,c?l.from:l.to,c?"after":"before"),"line",e,o);ko(u,i,s,!0)&&u.top>s&&(l=r[a-1])}return l}function Ao(t,e,n,o,r,i,s){var a=Oo(t,e,o,s),l=a.begin,c=a.end;/\s/.test(e.text.charAt(c-1))&&c--;for(var u=null,p=null,d=0;d=c||f.to<=l)){var h=ro(t,o,1!=f.level?Math.min(c,f.to)-1:Math.max(l,f.from)).right,g=hg)&&(u=f,p=g)}}return u||(u=r[r.length-1]),u.fromc&&(u={from:u.from,to:c,level:u.level}),u}function jo(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==io){io=A("pre",null,"CodeMirror-line-like");for(var e=0;e<49;++e)io.appendChild(document.createTextNode("x")),io.appendChild(A("br"));io.appendChild(document.createTextNode("x"))}E(t.measure,io);var n=io.offsetHeight/50;return n>3&&(t.cachedTextHeight=n),P(t.measure),n||1}function Mo(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=A("span","xxxxxxxxxx"),n=A("pre",[e],"CodeMirror-line-like");E(t.measure,n);var o=e.getBoundingClientRect(),r=(o.right-o.left)/10;return r>2&&(t.cachedCharWidth=r),r||10}function Lo(t){for(var e=t.display,n={},o={},r=e.gutters.clientLeft,i=e.gutters.firstChild,s=0;i;i=i.nextSibling,++s){var a=t.display.gutterSpecs[s].className;n[a]=i.offsetLeft+i.clientLeft+r,o[a]=i.clientWidth}return{fixedPos:Do(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:n,gutterWidth:o,wrapperWidth:e.wrapper.clientWidth}}function Do(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function No(t){var e=jo(t.display),n=t.options.lineWrapping,o=n&&Math.max(5,t.display.scroller.clientWidth/Mo(t.display)-3);return function(r){if(rn(t.doc,r))return 0;var i=0;if(r.widgets)for(var s=0;s0&&(l=Zt(t.doc,c.line).text).length==c.ch){var u=R(l,l.length,t.options.tabSize)-l.length;c=se(c.line,Math.max(0,Math.round((i-Kn(t.display).left)/Mo(t.display))-u))}return c}function Vo(t,e){if(e>=t.display.viewTo)return null;if((e-=t.display.viewFrom)<0)return null;for(var n=t.display.view,o=0;oe)&&(r.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=r.viewTo)je&&nn(t.doc,e)r.viewFrom?zo(t):(r.viewFrom+=o,r.viewTo+=o);else if(e<=r.viewFrom&&n>=r.viewTo)zo(t);else if(e<=r.viewFrom){var i=Bo(t,n,n+o,1);i?(r.view=r.view.slice(i.index),r.viewFrom=i.lineN,r.viewTo+=o):zo(t)}else if(n>=r.viewTo){var s=Bo(t,e,e,-1);s?(r.view=r.view.slice(0,s.index),r.viewTo=s.lineN):zo(t)}else{var a=Bo(t,e,e,-1),l=Bo(t,n,n+o,1);a&&l?(r.view=r.view.slice(0,a.index).concat(Sn(t,a.lineN,l.lineN)).concat(r.view.slice(l.index)),r.viewTo+=o):zo(t)}var c=r.externalMeasured;c&&(n=r.lineN&&e=o.viewTo)){var i=o.view[Vo(t,e)];if(null!=i.node){var s=i.changes||(i.changes=[]);-1==z(s,n)&&s.push(n)}}}function zo(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function Bo(t,e,n,o){var r,i=Vo(t,e),s=t.display.view;if(!je||n==t.doc.first+t.doc.size)return{index:i,lineN:n};for(var a=t.display.viewFrom,l=0;l0){if(i==s.length-1)return null;r=a+s[i].size-e,i++}else r=a-e;e+=r,n+=r}for(;nn(t.doc,n)!=n;){if(i==(o<0?0:s.length-1))return null;n+=o*s[i-(o<0?1:0)].size,i+=o}return{index:i,lineN:n}}function Uo(t,e,n){var o=t.display;0==o.view.length||e>=o.viewTo||n<=o.viewFrom?(o.view=Sn(t,e,n),o.viewFrom=e):(o.viewFrom>e?o.view=Sn(t,e,o.viewFrom).concat(o.view):o.viewFromn&&(o.view=o.view.slice(0,Vo(t,n)))),o.viewTo=n}function Wo(t){for(var e=t.display.view,n=0,o=0;o=t.display.viewTo||l.to().line0?s:t.defaultCharWidth())+"px"}if(o.other){var a=n.appendChild(A("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=o.other.left+"px",a.style.top=o.other.top+"px",a.style.height=.85*(o.other.bottom-o.other.top)+"px"}}function Ko(t,e){return t.top-e.top||t.left-e.left}function Yo(t,e,n){var o=t.display,r=t.doc,i=document.createDocumentFragment(),s=Kn(t.display),a=s.left,l=Math.max(o.sizerWidth,Xn(t)-o.sizer.offsetLeft)-s.right,c="ltr"==r.direction;function u(t,e,n,o){e<0&&(e=0),e=Math.round(e),o=Math.round(o),i.appendChild(A("div",null,"CodeMirror-selected","position: absolute; left: "+t+"px;\n top: "+e+"px; width: "+(null==n?l-t:n)+"px;\n height: "+(o-e)+"px"))}function p(e,n,o){var i,s,p=Zt(r,e),d=p.text.length;function f(n,o){return _o(t,se(e,n),"div",p,o)}function h(e,n,o){var r=To(t,p,null,e),i="ltr"==n==("after"==o)?"left":"right";return f("after"==o?r.begin:r.end-(/\s/.test(p.text.charAt(r.end-1))?2:1),i)[i]}var g=ft(p,r.direction);return ct(g,n||0,null==o?d:o,(function(t,e,r,p){var v="ltr"==r,y=f(t,v?"left":"right"),m=f(e-1,v?"right":"left"),b=null==n&&0==t,_=null==o&&e==d,w=0==p,x=!g||p==g.length-1;if(m.top-y.top<=3){var C=(c?_:b)&&x,S=(c?b:_)&&w?a:(v?y:m).left,O=C?l:(v?m:y).right;u(S,y.top,O-S,y.bottom)}else{var T,k,P,E;v?(T=c&&b&&w?a:y.left,k=c?l:h(t,r,"before"),P=c?a:h(e,r,"after"),E=c&&_&&x?l:m.right):(T=c?h(t,r,"before"):a,k=!c&&b&&w?l:y.right,P=!c&&_&&x?a:m.left,E=c?h(e,r,"after"):l),u(T,y.top,k-T,y.bottom),y.bottom0?e.blinker=setInterval((function(){t.hasFocus()||tr(t),e.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function Jo(t){t.hasFocus()||(t.display.input.focus(),t.state.focused||Qo(t))}function Zo(t){t.state.delayingBlurEvent=!0,setTimeout((function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,t.state.focused&&tr(t))}),100)}function Qo(t,e){t.state.delayingBlurEvent&&!t.state.draggingText&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(mt(t,"focus",t,e),t.state.focused=!0,D(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),l&&setTimeout((function(){return t.display.input.reset(!0)}),20)),t.display.input.receivedFocus()),Xo(t))}function tr(t,e){t.state.delayingBlurEvent||(t.state.focused&&(mt(t,"blur",t,e),t.state.focused=!1,k(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout((function(){t.state.focused||(t.display.shift=!1)}),150))}function er(t){for(var e=t.display,n=e.lineDiv.offsetTop,o=Math.max(0,e.scroller.getBoundingClientRect().top),r=e.lineDiv.getBoundingClientRect().top,i=0,l=0;l.005||g<-.005)&&(rt.display.sizerWidth){var y=Math.ceil(d/Mo(t.display));y>t.display.maxLineLength&&(t.display.maxLineLength=y,t.display.maxLine=c.line,t.display.maxLineChanged=!0)}}}Math.abs(i)>2&&(e.scroller.scrollTop+=i)}function nr(t){if(t.widgets)for(var e=0;e=s&&(i=oe(e,an(Zt(e,l))-t.wrapper.clientHeight),s=l)}return{from:i,to:Math.max(s,i+1)}}function rr(t,e){if(!bt(t,"scrollCursorIntoView")){var n=t.display,o=n.sizer.getBoundingClientRect(),r=null;if(e.top+o.top<0?r=!0:e.bottom+o.top>(window.innerHeight||document.documentElement.clientHeight)&&(r=!1),null!=r&&!g){var i=A("div","​",null,"position: absolute;\n top: "+(e.top-n.viewOffset-qn(t.display))+"px;\n height: "+(e.bottom-e.top+Yn(t)+n.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(i),i.scrollIntoView(r),t.display.lineSpace.removeChild(i)}}}function ir(t,e,n,o){var r;null==o&&(o=0),t.options.lineWrapping||e!=n||(n="before"==e.sticky?se(e.line,e.ch+1,"before"):e,e=e.ch?se(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e);for(var i=0;i<5;i++){var s=!1,a=wo(t,e),l=n&&n!=e?wo(t,n):a,c=ar(t,r={left:Math.min(a.left,l.left),top:Math.min(a.top,l.top)-o,right:Math.max(a.left,l.left),bottom:Math.max(a.bottom,l.bottom)+o}),u=t.doc.scrollTop,p=t.doc.scrollLeft;if(null!=c.scrollTop&&(hr(t,c.scrollTop),Math.abs(t.doc.scrollTop-u)>1&&(s=!0)),null!=c.scrollLeft&&(vr(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-p)>1&&(s=!0)),!s)break}return r}function sr(t,e){var n=ar(t,e);null!=n.scrollTop&&hr(t,n.scrollTop),null!=n.scrollLeft&&vr(t,n.scrollLeft)}function ar(t,e){var n=t.display,o=jo(t.display);e.top<0&&(e.top=0);var r=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:n.scroller.scrollTop,i=Jn(t),s={};e.bottom-e.top>i&&(e.bottom=e.top+i);var a=t.doc.height+Gn(n),l=e.topa-o;if(e.topr+i){var u=Math.min(e.top,(c?a:e.bottom)-i);u!=r&&(s.scrollTop=u)}var p=t.options.fixedGutter?0:n.gutters.offsetWidth,d=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:n.scroller.scrollLeft-p,f=Xn(t)-n.gutters.offsetWidth,h=e.right-e.left>f;return h&&(e.right=e.left+f),e.left<10?s.scrollLeft=0:e.leftf+d-3&&(s.scrollLeft=e.right+(h?0:10)-f),s}function lr(t,e){null!=e&&(dr(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function cr(t){dr(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function ur(t,e,n){null==e&&null==n||dr(t),null!=e&&(t.curOp.scrollLeft=e),null!=n&&(t.curOp.scrollTop=n)}function pr(t,e){dr(t),t.curOp.scrollToPos=e}function dr(t){var e=t.curOp.scrollToPos;e&&(t.curOp.scrollToPos=null,fr(t,xo(t,e.from),xo(t,e.to),e.margin))}function fr(t,e,n,o){var r=ar(t,{left:Math.min(e.left,n.left),top:Math.min(e.top,n.top)-o,right:Math.max(e.right,n.right),bottom:Math.max(e.bottom,n.bottom)+o});ur(t,r.scrollLeft,r.scrollTop)}function hr(t,e){Math.abs(t.doc.scrollTop-e)<2||(n||$r(t,{top:e}),gr(t,e,!0),n&&$r(t),Fr(t,100))}function gr(t,e,n){e=Math.max(0,Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,e)),(t.display.scroller.scrollTop!=e||n)&&(t.doc.scrollTop=e,t.display.scrollbars.setScrollTop(e),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e))}function vr(t,e,n,o){e=Math.max(0,Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth)),(n?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)&&!o||(t.doc.scrollLeft=e,Yr(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function yr(t){var e=t.display,n=e.gutters.offsetWidth,o=Math.round(t.doc.height+Gn(t.display));return{clientHeight:e.scroller.clientHeight,viewHeight:e.wrapper.clientHeight,scrollWidth:e.scroller.scrollWidth,clientWidth:e.scroller.clientWidth,viewWidth:e.wrapper.clientWidth,barLeft:t.options.fixedGutter?n:0,docHeight:o,scrollHeight:o+Yn(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:n}}var mr=function(t,e,n){this.cm=n;var o=this.vert=A("div",[A("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),r=this.horiz=A("div",[A("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");o.tabIndex=r.tabIndex=-1,t(o),t(r),gt(o,"scroll",(function(){o.clientHeight&&e(o.scrollTop,"vertical")})),gt(r,"scroll",(function(){r.clientWidth&&e(r.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,s&&a<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};mr.prototype.update=function(t){var e=t.scrollWidth>t.clientWidth+1,n=t.scrollHeight>t.clientHeight+1,o=t.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=e?o+"px":"0";var r=t.viewHeight-(e?o:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+r)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(e){this.horiz.style.display="block",this.horiz.style.right=n?o+"px":"0",this.horiz.style.left=t.barLeft+"px";var i=t.viewWidth-t.barLeft-(n?o:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+i)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(0==o&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?o:0,bottom:e?o:0}},mr.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},mr.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},mr.prototype.zeroWidthHack=function(){var t=b&&!h?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new H,this.disableVert=new H},mr.prototype.enableZeroWidthBar=function(t,e,n){function o(){var r=t.getBoundingClientRect();("vert"==n?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1))!=t?t.style.visibility="hidden":e.set(1e3,o)}t.style.visibility="",e.set(1e3,o)},mr.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var br=function(){};function _r(t,e){e||(e=yr(t));var n=t.display.barWidth,o=t.display.barHeight;wr(t,e);for(var r=0;r<4&&n!=t.display.barWidth||o!=t.display.barHeight;r++)n!=t.display.barWidth&&t.options.lineWrapping&&er(t),wr(t,yr(t)),n=t.display.barWidth,o=t.display.barHeight}function wr(t,e){var n=t.display,o=n.scrollbars.update(e);n.sizer.style.paddingRight=(n.barWidth=o.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=o.bottom)+"px",n.heightForcer.style.borderBottom=o.bottom+"px solid transparent",o.right&&o.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=o.bottom+"px",n.scrollbarFiller.style.width=o.right+"px"):n.scrollbarFiller.style.display="",o.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=o.bottom+"px",n.gutterFiller.style.width=e.gutterWidth+"px"):n.gutterFiller.style.display=""}br.prototype.update=function(){return{bottom:0,right:0}},br.prototype.setScrollLeft=function(){},br.prototype.setScrollTop=function(){},br.prototype.clear=function(){};var xr={native:mr,null:br};function Cr(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&k(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new xr[t.options.scrollbarStyle]((function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),gt(e,"mousedown",(function(){t.state.focused&&setTimeout((function(){return t.display.input.focus()}),0)})),e.setAttribute("cm-not-content","true")}),(function(e,n){"horizontal"==n?vr(t,e):hr(t,e)}),t),t.display.scrollbars.addClass&&D(t.display.wrapper,t.display.scrollbars.addClass)}var Sr=0;function Or(t){t.curOp={cm:t,viewChanged:!1,startHeight:t.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Sr,markArrays:null},Tn(t.curOp)}function Tr(t){var e=t.curOp;e&&Pn(e,(function(t){for(var e=0;e=n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new Rr(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function Er(t){t.updatedDisplay=t.mustUpdate&&Ur(t.cm,t.update)}function Ar(t){var e=t.cm,n=e.display;t.updatedDisplay&&er(e),t.barMeasure=yr(e),n.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=eo(e,n.maxLine,n.maxLine.text.length).left+3,e.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+t.adjustWidthTo+Yn(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+t.adjustWidthTo-Xn(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=n.input.prepareSelection())}function jr(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft=t.display.viewTo)){var n=+new Date+t.options.workTime,o=_e(t,e.highlightFrontier),r=[];e.iter(o.line,Math.min(e.first+e.size,t.display.viewTo+500),(function(i){if(o.line>=t.display.viewFrom){var s=i.styles,a=i.text.length>t.options.maxHighlightLength?Kt(e.mode,o.state):null,l=me(t,i,o,!0);a&&(o.state=a),i.styles=l.styles;var c=i.styleClasses,u=l.classes;u?i.styleClasses=u:c&&(i.styleClasses=null);for(var p=!s||s.length!=i.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),d=0;!p&&dn)return Fr(t,t.options.workDelay),!0})),e.highlightFrontier=o.line,e.modeFrontier=Math.max(e.modeFrontier,o.line),r.length&&Lr(t,(function(){for(var e=0;e=n.viewFrom&&e.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==Wo(t))return!1;Xr(t)&&(zo(t),e.dims=Lo(t));var r=o.first+o.size,i=Math.max(e.visible.from-t.options.viewportMargin,o.first),s=Math.min(r,e.visible.to+t.options.viewportMargin);n.viewFroms&&n.viewTo-s<20&&(s=Math.min(r,n.viewTo)),je&&(i=nn(t.doc,i),s=on(t.doc,s));var a=i!=n.viewFrom||s!=n.viewTo||n.lastWrapHeight!=e.wrapperHeight||n.lastWrapWidth!=e.wrapperWidth;Uo(t,i,s),n.viewOffset=an(Zt(t.doc,n.viewFrom)),t.display.mover.style.top=n.viewOffset+"px";var l=Wo(t);if(!a&&0==l&&!e.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=zr(t);return l>4&&(n.lineDiv.style.display="none"),qr(t,n.updateLineNumbers,e.dims),l>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,Br(c),P(n.cursorDiv),P(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,a&&(n.lastWrapHeight=e.wrapperHeight,n.lastWrapWidth=e.wrapperWidth,Fr(t,400)),n.updateLineNumbers=null,!0}function Wr(t,e){for(var n=e.viewport,o=!0;;o=!1){if(o&&t.options.lineWrapping&&e.oldDisplayWidth!=Xn(t))o&&(e.visible=or(t.display,t.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(t.doc.height+Gn(t.display)-Jn(t),n.top)}),e.visible=or(t.display,t.doc,n),e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)break;if(!Ur(t,e))break;er(t);var r=yr(t);$o(t),_r(t,r),Kr(t,r),e.force=!1}e.signal(t,"update",t),t.display.viewFrom==t.display.reportedViewFrom&&t.display.viewTo==t.display.reportedViewTo||(e.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function $r(t,e){var n=new Rr(t,e);if(Ur(t,n)){er(t),Wr(t,n);var o=yr(t);$o(t),_r(t,o),Kr(t,o),n.finish()}}function qr(t,e,n){var o=t.display,r=t.options.lineNumbers,i=o.lineDiv,s=i.firstChild;function a(e){var n=e.nextSibling;return l&&b&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var c=o.view,u=o.viewFrom,p=0;p-1&&(f=!1),Mn(t,d,u,n)),f&&(P(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(ie(t.options,u)))),s=d.node.nextSibling}else{var h=Hn(t,d,u,n);i.insertBefore(h,s)}u+=d.size}for(;s;)s=a(s)}function Gr(t){var e=t.gutters.offsetWidth;t.sizer.style.marginLeft=e+"px",An(t,"gutterChanged",t)}function Kr(t,e){t.display.sizer.style.minHeight=e.docHeight+"px",t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=e.docHeight+t.display.barHeight+Yn(t)+"px"}function Yr(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var o=Do(e)-e.scroller.scrollLeft+t.doc.scrollLeft,r=e.gutters.offsetWidth,i=o+"px",s=0;s=102&&(null==t.display.chromeScrollHack?t.display.sizer.style.pointerEvents="none":clearTimeout(t.display.chromeScrollHack),t.display.chromeScrollHack=setTimeout((function(){t.display.chromeScrollHack=null,t.display.sizer.style.pointerEvents=""}),100));var o=oi(e),r=o.x,i=o.y,s=ni;0===e.deltaMode&&(r=e.deltaX,i=e.deltaY,s=1);var a=t.display,c=a.scroller,f=c.scrollWidth>c.clientWidth,h=c.scrollHeight>c.clientHeight;if(r&&f||i&&h){if(i&&b&&l)t:for(var g=e.target,v=a.view;g!=c;g=g.parentNode)for(var y=0;y=0&&ae(t,o.to())<=0)return n}return-1};var ai=function(t,e){this.anchor=t,this.head=e};function li(t,e,n){var o=t&&t.options.selectionsMayTouch,r=e[n];e.sort((function(t,e){return ae(t.from(),e.from())})),n=z(e,r);for(var i=1;i0:l>=0){var c=pe(a.from(),s.from()),u=ue(a.to(),s.to()),p=a.empty()?s.from()==s.head:a.from()==a.head;i<=n&&--n,e.splice(--i,2,new ai(p?u:c,p?c:u))}}return new si(e,n)}function ci(t,e){return new si([new ai(t,e||t)],0)}function ui(t){return t.text?se(t.from.line+t.text.length-1,X(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function pi(t,e){if(ae(t,e.from)<0)return t;if(ae(t,e.to)<=0)return ui(e);var n=t.line+e.text.length-(e.to.line-e.from.line)-1,o=t.ch;return t.line==e.to.line&&(o+=ui(e).ch-e.to.ch),se(n,o)}function di(t,e){for(var n=[],o=0;o1&&t.remove(a.line+1,h-1),t.insert(a.line+1,y)}An(t,"change",t,e)}function bi(t,e,n){function o(t,r,i){if(t.linked)for(var s=0;s1&&!t.done[t.done.length-2].ranges?(t.done.pop(),X(t.done)):void 0}function ki(t,e,n,o){var r=t.history;r.undone.length=0;var i,s,a=+new Date;if((r.lastOp==o||r.lastOrigin==e.origin&&e.origin&&("+"==e.origin.charAt(0)&&r.lastModTime>a-(t.cm?t.cm.options.historyEventDelay:500)||"*"==e.origin.charAt(0)))&&(i=Ti(r,r.lastOp==o)))s=X(i.changes),0==ae(e.from,e.to)&&0==ae(e.from,s.to)?s.to=ui(e):i.changes.push(Si(t,e));else{var l=X(r.done);for(l&&l.ranges||Ai(t.sel,r.done),i={changes:[Si(t,e)],generation:r.generation},r.done.push(i);r.done.length>r.undoDepth;)r.done.shift(),r.done[0].ranges||r.done.shift()}r.done.push(n),r.generation=++r.maxGeneration,r.lastModTime=r.lastSelTime=a,r.lastOp=r.lastSelOp=o,r.lastOrigin=r.lastSelOrigin=e.origin,s||mt(t,"historyAdded")}function Pi(t,e,n,o){var r=e.charAt(0);return"*"==r||"+"==r&&n.ranges.length==o.ranges.length&&n.somethingSelected()==o.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}function Ei(t,e,n,o){var r=t.history,i=o&&o.origin;n==r.lastSelOp||i&&r.lastSelOrigin==i&&(r.lastModTime==r.lastSelTime&&r.lastOrigin==i||Pi(t,i,X(r.done),e))?r.done[r.done.length-1]=e:Ai(e,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=i,r.lastSelOp=n,o&&!1!==o.clearRedo&&Oi(r.undone)}function Ai(t,e){var n=X(e);n&&n.ranges&&n.equals(t)||e.push(t)}function ji(t,e,n,o){var r=e["spans_"+t.id],i=0;t.iter(Math.max(t.first,n),Math.min(t.first+t.size,o),(function(n){n.markedSpans&&((r||(r=e["spans_"+t.id]={}))[i]=n.markedSpans),++i}))}function Mi(t){if(!t)return null;for(var e,n=0;n-1&&(X(a)[p]=c[p],delete c[p])}}}return o}function Ii(t,e,n,o){if(o){var r=t.anchor;if(n){var i=ae(e,r)<0;i!=ae(n,r)<0?(r=e,e=n):i!=ae(e,n)<0&&(e=n)}return new ai(r,e)}return new ai(n||e,e)}function Fi(t,e,n,o,r){null==r&&(r=t.cm&&(t.cm.display.shift||t.extend)),Ui(t,new si([Ii(t.sel.primary(),e,n,r)],0),o)}function Vi(t,e,n){for(var o=[],r=t.cm&&(t.cm.display.shift||t.extend),i=0;i=e.ch:a.to>e.ch))){if(r&&(mt(l,"beforeCursorEnter"),l.explicitlyCleared)){if(i.markedSpans){--s;continue}break}if(!l.atomic)continue;if(n){var p=l.find(o<0?1:-1),d=void 0;if((o<0?u:c)&&(p=Xi(t,p,-o,p&&p.line==e.line?i:null)),p&&p.line==e.line&&(d=ae(p,n))&&(o<0?d<0:d>0))return Ki(t,p,e,o,r)}var f=l.find(o<0?-1:1);return(o<0?c:u)&&(f=Xi(t,f,o,f.line==e.line?i:null)),f?Ki(t,f,e,o,r):null}}return e}function Yi(t,e,n,o,r){var i=o||1,s=Ki(t,e,n,i,r)||!r&&Ki(t,e,n,i,!0)||Ki(t,e,n,-i,r)||!r&&Ki(t,e,n,-i,!0);return s||(t.cantEdit=!0,se(t.first,0))}function Xi(t,e,n,o){return n<0&&0==e.ch?e.line>t.first?fe(t,se(e.line-1)):null:n>0&&e.ch==(o||Zt(t,e.line)).text.length?e.line=0;--r)ts(t,{from:o[r].from,to:o[r].to,text:r?[""]:e.text,origin:e.origin});else ts(t,e)}}function ts(t,e){if(1!=e.text.length||""!=e.text[0]||0!=ae(e.from,e.to)){var n=di(t,e);ki(t,e,n,t.cm?t.cm.curOp.id:NaN),os(t,e,n,He(t,e));var o=[];bi(t,(function(t,n){n||-1!=z(o,t.history)||(ls(t.history,e),o.push(t.history)),os(t,e,null,He(t,e))}))}}function es(t,e,n){var o=t.cm&&t.cm.state.suppressEdits;if(!o||n){for(var r,i=t.history,s=t.sel,a="undo"==e?i.done:i.undone,l="undo"==e?i.undone:i.done,c=0;c=0;--f){var h=d(f);if(h)return h.v}}}}function ns(t,e){if(0!=e&&(t.first+=e,t.sel=new si(J(t.sel.ranges,(function(t){return new ai(se(t.anchor.line+e,t.anchor.ch),se(t.head.line+e,t.head.ch))})),t.sel.primIndex),t.cm)){Ro(t.cm,t.first,t.first-e,e);for(var n=t.cm.display,o=n.viewFrom;ot.lastLine())){if(e.from.linei&&(e={from:e.from,to:se(i,Zt(t,i).text.length),text:[e.text[0]],origin:e.origin}),e.removed=Qt(t,e.from,e.to),n||(n=di(t,e)),t.cm?rs(t.cm,e,o):mi(t,e,o),Wi(t,n,W),t.cantEdit&&Yi(t,se(t.firstLine(),0))&&(t.cantEdit=!1)}}function rs(t,e,n){var o=t.doc,r=t.display,i=e.from,s=e.to,a=!1,l=i.line;t.options.lineWrapping||(l=ne(Qe(Zt(o,i.line))),o.iter(l,s.line+1,(function(t){if(t==r.maxLine)return a=!0,!0}))),o.sel.contains(e.from,e.to)>-1&&_t(t),mi(o,e,n,No(t)),t.options.lineWrapping||(o.iter(l,i.line+e.text.length,(function(t){var e=ln(t);e>r.maxLineLength&&(r.maxLine=t,r.maxLineLength=e,r.maxLineChanged=!0,a=!1)})),a&&(t.curOp.updateMaxLine=!0)),Ee(o,i.line),Fr(t,400);var c=e.text.length-(s.line-i.line)-1;e.full?Ro(t):i.line!=s.line||1!=e.text.length||yi(t.doc,e)?Ro(t,i.line,s.line+1,c):Ho(t,i.line,"text");var u=wt(t,"changes"),p=wt(t,"change");if(p||u){var d={from:i,to:s,text:e.text,removed:e.removed,origin:e.origin};p&&An(t,"change",t,d),u&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(d)}t.display.selForContextMenu=null}function is(t,e,n,o,r){var i;o||(o=n),ae(o,n)<0&&(n=(i=[o,n])[0],o=i[1]),"string"==typeof e&&(e=t.splitLines(e)),Qi(t,{from:n,to:o,text:e,origin:r})}function ss(t,e,n,o){n1||!(this.children[0]instanceof us))){var a=[];this.collapse(a),this.children=[new us(a)],this.children[0].parent=this}},collapse:function(t){for(var e=0;e50){for(var s=r.lines.length%25+25,a=s;a10);t.parent.maybeSpill()}},iterN:function(t,e,n){for(var o=0;o0||0==s&&!1!==i.clearWhenEmpty)return i;if(i.replacedWith&&(i.collapsed=!0,i.widgetNode=j("span",[i.replacedWith],"CodeMirror-widget"),o.handleMouseEvents||i.widgetNode.setAttribute("cm-ignore-events","true"),o.insertLeft&&(i.widgetNode.insertLeft=!0)),i.collapsed){if(Ze(t,e.line,e,n,i)||e.line!=n.line&&Ze(t,n.line,e,n,i))throw new Error("Inserting collapsed marker partially overlapping an existing one");Le()}i.addToHistory&&ki(t,{from:e,to:n,origin:"markText"},t.sel,NaN);var a,l=e.line,c=t.cm;if(t.iter(l,n.line+1,(function(o){c&&i.collapsed&&!c.options.lineWrapping&&Qe(o)==c.display.maxLine&&(a=!0),i.collapsed&&l!=e.line&&ee(o,0),Fe(o,new De(i,l==e.line?e.ch:null,l==n.line?n.ch:null),t.cm&&t.cm.curOp),++l})),i.collapsed&&t.iter(e.line,n.line+1,(function(e){rn(t,e)&&ee(e,0)})),i.clearOnEnter&>(i,"beforeCursorEnter",(function(){return i.clear()})),i.readOnly&&(Me(),(t.history.done.length||t.history.undone.length)&&t.clearHistory()),i.collapsed&&(i.id=++gs,i.atomic=!0),c){if(a&&(c.curOp.updateMaxLine=!0),i.collapsed)Ro(c,e.line,n.line+1);else if(i.className||i.startStyle||i.endStyle||i.css||i.attributes||i.title)for(var u=e.line;u<=n.line;u++)Ho(c,u,"text");i.atomic&&qi(c.doc),An(c,"markerAdded",c,i)}return i}vs.prototype.clear=function(){if(!this.explicitlyCleared){var t=this.doc.cm,e=t&&!t.curOp;if(e&&Or(t),wt(this,"clear")){var n=this.find();n&&An(this,"clear",n.from,n.to)}for(var o=null,r=null,i=0;it.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=u,t.display.maxLineChanged=!0)}null!=o&&t&&this.collapsed&&Ro(t,o,r+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&qi(t.doc)),t&&An(t,"markerCleared",t,this,o,r),e&&Tr(t),this.parent&&this.parent.clear()}},vs.prototype.find=function(t,e){var n,o;null==t&&"bookmark"==this.type&&(t=1);for(var r=0;r=0;l--)Qi(this,o[l]);a?Bi(this,a):this.cm&&cr(this.cm)})),undo:Ir((function(){es(this,"undo")})),redo:Ir((function(){es(this,"redo")})),undoSelection:Ir((function(){es(this,"undo",!0)})),redoSelection:Ir((function(){es(this,"redo",!0)})),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,e=0,n=0,o=0;o=t.ch)&&e.push(r.marker.parent||r.marker)}return e},findMarks:function(t,e,n){t=fe(this,t),e=fe(this,e);var o=[],r=t.line;return this.iter(t.line,e.line+1,(function(i){var s=i.markedSpans;if(s)for(var a=0;a=l.to||null==l.from&&r!=t.line||null!=l.from&&r==e.line&&l.from>=e.ch||n&&!n(l.marker)||o.push(l.marker.parent||l.marker)}++r})),o},getAllMarks:function(){var t=[];return this.iter((function(e){var n=e.markedSpans;if(n)for(var o=0;ot)return e=t,!0;t-=i,++n})),fe(this,se(n,e))},indexFromPos:function(t){var e=(t=fe(this,t)).ch;if(t.linee&&(e=t.from),null!=t.to&&t.to-1)return e.state.draggingText(t),void setTimeout((function(){return e.display.input.focus()}),20);try{var p=t.dataTransfer.getData("Text");if(p){var d;if(e.state.draggingText&&!e.state.draggingText.copy&&(d=e.listSelections()),Wi(e.doc,ci(n,n)),d)for(var f=0;f=0;e--)is(t.doc,"",o[e].from,o[e].to,"+delete");cr(t)}))}function Ks(t,e,n){var o=at(t.text,e+n,n);return o<0||o>t.text.length?null:o}function Ys(t,e,n){var o=Ks(t,e.ch,n);return null==o?null:new se(e.line,o,n<0?"after":"before")}function Xs(t,e,n,o,r){if(t){"rtl"==e.doc.direction&&(r=-r);var i=ft(n,e.doc.direction);if(i){var s,a=r<0?X(i):i[0],l=r<0==(1==a.level)?"after":"before";if(a.level>0||"rtl"==e.doc.direction){var c=oo(e,n);s=r<0?n.text.length-1:0;var u=ro(e,c,s).top;s=lt((function(t){return ro(e,c,t).top==u}),r<0==(1==a.level)?a.from:a.to-1,s),"before"==l&&(s=Ks(n,s,1))}else s=r<0?a.to:a.from;return new se(o,s,l)}}return new se(o,r<0?n.text.length:0,r<0?"before":"after")}function Js(t,e,n,o){var r=ft(e,t.doc.direction);if(!r)return Ys(e,n,o);n.ch>=e.text.length?(n.ch=e.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var i=pt(r,n.ch,n.sticky),s=r[i];if("ltr"==t.doc.direction&&s.level%2==0&&(o>0?s.to>n.ch:s.from=s.from&&d>=u.begin)){var f=p?"before":"after";return new se(n.line,d,f)}}var h=function(t,e,o){for(var i=function(t,e){return e?new se(n.line,l(t,1),"before"):new se(n.line,t,"after")};t>=0&&t0==(1!=s.level),c=a?o.begin:l(o.end,-1);if(s.from<=c&&c0?u.end:l(u.begin,-1);return null==v||o>0&&v==e.text.length||!(g=h(o>0?0:r.length-1,o,c(v)))?null:g}Rs.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Rs.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Rs.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Rs.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Rs["default"]=b?Rs.macDefault:Rs.pcDefault;var Zs={selectAll:Ji,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),W)},killLine:function(t){return Gs(t,(function(e){if(e.empty()){var n=Zt(t.doc,e.head.line).text.length;return e.head.ch==n&&e.head.line0)r=new se(r.line,r.ch+1),t.replaceRange(i.charAt(r.ch-1)+i.charAt(r.ch-2),se(r.line,r.ch-2),r,"+transpose");else if(r.line>t.doc.first){var s=Zt(t.doc,r.line-1).text;s&&(r=new se(r.line,1),t.replaceRange(i.charAt(0)+t.doc.lineSeparator()+s.charAt(s.length-1),se(r.line-1,s.length-1),r,"+transpose"))}n.push(new ai(r,r))}t.setSelections(n)}))},newlineAndIndent:function(t){return Lr(t,(function(){for(var e=t.listSelections(),n=e.length-1;n>=0;n--)t.replaceRange(t.doc.lineSeparator(),e[n].anchor,e[n].head,"+input");e=t.listSelections();for(var o=0;o-1&&(ae((r=a.ranges[r]).from(),e)<0||e.xRel>0)&&(ae(r.to(),e)>0||e.xRel<0)?Ca(t,o,e,i):Oa(t,o,e,i)}function Ca(t,e,n,o){var r=t.display,i=!1,c=Dr(t,(function(e){l&&(r.scroller.draggable=!1),t.state.draggingText=!1,t.state.delayingBlurEvent&&(t.hasFocus()?t.state.delayingBlurEvent=!1:Zo(t)),yt(r.wrapper.ownerDocument,"mouseup",c),yt(r.wrapper.ownerDocument,"mousemove",u),yt(r.scroller,"dragstart",p),yt(r.scroller,"drop",c),i||(Ct(e),o.addNew||Fi(t.doc,n,null,null,o.extend),l&&!f||s&&9==a?setTimeout((function(){r.wrapper.ownerDocument.body.focus({preventScroll:!0}),r.input.focus()}),20):r.input.focus())})),u=function(t){i=i||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},p=function(){return i=!0};l&&(r.scroller.draggable=!0),t.state.draggingText=c,c.copy=!o.moveOnDrag,gt(r.wrapper.ownerDocument,"mouseup",c),gt(r.wrapper.ownerDocument,"mousemove",u),gt(r.scroller,"dragstart",p),gt(r.scroller,"drop",c),t.state.delayingBlurEvent=!0,setTimeout((function(){return r.input.focus()}),20),r.scroller.dragDrop&&r.scroller.dragDrop()}function Sa(t,e,n){if("char"==n)return new ai(e,e);if("word"==n)return t.findWordAt(e);if("line"==n)return new ai(se(e.line,0),fe(t.doc,se(e.line+1,0)));var o=n(t,e);return new ai(o.from,o.to)}function Oa(t,e,n,o){s&&Zo(t);var r=t.display,i=t.doc;Ct(e);var a,l,c=i.sel,u=c.ranges;if(o.addNew&&!o.extend?(l=i.sel.contains(n),a=l>-1?u[l]:new ai(n,n)):(a=i.sel.primary(),l=i.sel.primIndex),"rectangle"==o.unit)o.addNew||(a=new ai(n,n)),n=Fo(t,e,!0,!0),l=-1;else{var p=Sa(t,n,o.unit);a=o.extend?Ii(a,p.anchor,p.head,o.extend):p}o.addNew?-1==l?(l=u.length,Ui(i,li(t,u.concat([a]),l),{scroll:!1,origin:"*mouse"})):u.length>1&&u[l].empty()&&"char"==o.unit&&!o.extend?(Ui(i,li(t,u.slice(0,l).concat(u.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),c=i.sel):Ri(i,l,a,$):(l=0,Ui(i,new si([a],0),$),c=i.sel);var d=n;function f(e){if(0!=ae(d,e))if(d=e,"rectangle"==o.unit){for(var r=[],s=t.options.tabSize,u=R(Zt(i,n.line).text,n.ch,s),p=R(Zt(i,e.line).text,e.ch,s),f=Math.min(u,p),h=Math.max(u,p),g=Math.min(n.line,e.line),v=Math.min(t.lastLine(),Math.max(n.line,e.line));g<=v;g++){var y=Zt(i,g).text,m=G(y,f,s);f==h?r.push(new ai(se(g,m),se(g,m))):y.length>m&&r.push(new ai(se(g,m),se(g,G(y,h,s))))}r.length||r.push(new ai(n,n)),Ui(i,li(t,c.ranges.slice(0,l).concat(r),l),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var b,_=a,w=Sa(t,e,o.unit),x=_.anchor;ae(w.anchor,x)>0?(b=w.head,x=pe(_.from(),w.anchor)):(b=w.anchor,x=ue(_.to(),w.head));var C=c.ranges.slice(0);C[l]=Ta(t,new ai(fe(i,x),b)),Ui(i,li(t,C,l),$)}}var h=r.wrapper.getBoundingClientRect(),g=0;function v(e){var n=++g,s=Fo(t,e,!0,"rectangle"==o.unit);if(s)if(0!=ae(s,d)){t.curOp.focus=L(),f(s);var a=or(r,i);(s.line>=a.to||s.lineh.bottom?20:0;l&&setTimeout(Dr(t,(function(){g==n&&(r.scroller.scrollTop+=l,v(e))})),50)}}function y(e){t.state.selectingText=!1,g=1/0,e&&(Ct(e),r.input.focus()),yt(r.wrapper.ownerDocument,"mousemove",m),yt(r.wrapper.ownerDocument,"mouseup",b),i.history.lastSelOrigin=null}var m=Dr(t,(function(t){0!==t.buttons&&Pt(t)?v(t):y(t)})),b=Dr(t,y);t.state.selectingText=b,gt(r.wrapper.ownerDocument,"mousemove",m),gt(r.wrapper.ownerDocument,"mouseup",b)}function Ta(t,e){var n=e.anchor,o=e.head,r=Zt(t.doc,n.line);if(0==ae(n,o)&&n.sticky==o.sticky)return e;var i=ft(r);if(!i)return e;var s=pt(i,n.ch,n.sticky),a=i[s];if(a.from!=n.ch&&a.to!=n.ch)return e;var l,c=s+(a.from==n.ch==(1!=a.level)?0:1);if(0==c||c==i.length)return e;if(o.line!=n.line)l=(o.line-n.line)*("ltr"==t.doc.direction?1:-1)>0;else{var u=pt(i,o.ch,o.sticky),p=u-s||(o.ch-n.ch)*(1==a.level?-1:1);l=u==c-1||u==c?p<0:p>0}var d=i[c+(l?-1:0)],f=l==(1==d.level),h=f?d.from:d.to,g=f?"after":"before";return n.ch==h&&n.sticky==g?e:new ai(new se(n.line,h,g),o)}function ka(t,e,n,o){var r,i;if(e.touches)r=e.touches[0].clientX,i=e.touches[0].clientY;else try{r=e.clientX,i=e.clientY}catch(t){return!1}if(r>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;o&&Ct(e);var s=t.display,a=s.lineDiv.getBoundingClientRect();if(i>a.bottom||!wt(t,n))return Ot(e);i-=a.top-s.viewOffset;for(var l=0;l=r)return mt(t,n,t,oe(t.doc,i),t.display.gutterSpecs[l].className,e),Ot(e)}}function Pa(t,e){return ka(t,e,"gutterClick",!0)}function Ea(t,e){$n(t.display,e)||Aa(t,e)||bt(t,e,"contextmenu")||S||t.display.input.onContextMenu(e)}function Aa(t,e){return!!wt(t,"gutterContextMenu")&&ka(t,e,"gutterContextMenu",!1)}function ja(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),ho(t)}ya.prototype.compare=function(t,e,n){return this.time+va>t&&0==ae(e,this.pos)&&n==this.button};var Ma={toString:function(){return"CodeMirror.Init"}},La={},Da={};function Na(t){var e=t.optionHandlers;function n(n,o,r,i){t.defaults[n]=o,r&&(e[n]=i?function(t,e,n){n!=Ma&&r(t,e,n)}:r)}t.defineOption=n,t.Init=Ma,n("value","",(function(t,e){return t.setValue(e)}),!0),n("mode",null,(function(t,e){t.doc.modeOption=e,gi(t)}),!0),n("indentUnit",2,gi,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(t){vi(t),ho(t),Ro(t)}),!0),n("lineSeparator",null,(function(t,e){if(t.doc.lineSep=e,e){var n=[],o=t.doc.first;t.doc.iter((function(t){for(var r=0;;){var i=t.text.indexOf(e,r);if(-1==i)break;r=i+e.length,n.push(se(o,i))}o++}));for(var r=n.length-1;r>=0;r--)is(t.doc,e,n[r],se(n[r].line,n[r].ch+e.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(t,e,n){t.state.specialChars=new RegExp(e.source+(e.test("\t")?"":"|\t"),"g"),n!=Ma&&t.refresh()})),n("specialCharPlaceholder",yn,(function(t){return t.refresh()}),!0),n("electricChars",!0),n("inputStyle",m?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(t,e){return t.getInputField().spellcheck=e}),!0),n("autocorrect",!1,(function(t,e){return t.getInputField().autocorrect=e}),!0),n("autocapitalize",!1,(function(t,e){return t.getInputField().autocapitalize=e}),!0),n("rtlMoveVisually",!w),n("wholeLineUpdateBefore",!0),n("theme","default",(function(t){ja(t),Qr(t)}),!0),n("keyMap","default",(function(t,e,n){var o=qs(e),r=n!=Ma&&qs(n);r&&r.detach&&r.detach(t,o),o.attach&&o.attach(t,r||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Fa,!0),n("gutters",[],(function(t,e){t.display.gutterSpecs=Jr(e,t.options.lineNumbers),Qr(t)}),!0),n("fixedGutter",!0,(function(t,e){t.display.gutters.style.left=e?Do(t.display)+"px":"0",t.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(t){return _r(t)}),!0),n("scrollbarStyle","native",(function(t){Cr(t),_r(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(t,e){t.display.gutterSpecs=Jr(t.options.gutters,e),Qr(t)}),!0),n("firstLineNumber",1,Qr,!0),n("lineNumberFormatter",(function(t){return t}),Qr,!0),n("showCursorWhenSelecting",!1,$o,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(t,e){"nocursor"==e&&(tr(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)})),n("screenReaderLabel",null,(function(t,e){e=''===e?null:e,t.display.input.screenReaderLabelChanged(e)})),n("disableInput",!1,(function(t,e){e||t.display.input.reset()}),!0),n("dragDrop",!0,Ia),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,$o,!0),n("singleCursorHeightPerLine",!0,$o,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,vi,!0),n("addModeClass",!1,vi,!0),n("pollInterval",100),n("undoDepth",200,(function(t,e){return t.doc.history.undoDepth=e})),n("historyEventDelay",1250),n("viewportMargin",10,(function(t){return t.refresh()}),!0),n("maxHighlightLength",1e4,vi,!0),n("moveInputWithCursor",!0,(function(t,e){e||t.display.input.resetPosition()})),n("tabindex",null,(function(t,e){return t.display.input.getField().tabIndex=e||""})),n("autofocus",null),n("direction","ltr",(function(t,e){return t.doc.setDirection(e)}),!0),n("phrases",null)}function Ia(t,e,n){if(!e!=!(n&&n!=Ma)){var o=t.display.dragFunctions,r=e?gt:yt;r(t.display.scroller,"dragstart",o.start),r(t.display.scroller,"dragenter",o.enter),r(t.display.scroller,"dragover",o.over),r(t.display.scroller,"dragleave",o.leave),r(t.display.scroller,"drop",o.drop)}}function Fa(t){t.options.lineWrapping?(D(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(k(t.display.wrapper,"CodeMirror-wrap"),cn(t)),Io(t),Ro(t),ho(t),setTimeout((function(){return _r(t)}),100)}function Va(t,e){var n=this;if(!(this instanceof Va))return new Va(t,e);this.options=e=e?V(e):{},V(La,e,!1);var o=e.value;"string"==typeof o?o=new Ss(o,e.mode,null,e.lineSeparator,e.direction):e.mode&&(o.modeOption=e.mode),this.doc=o;var r=new Va.inputStyles[e.inputStyle](this),i=this.display=new ti(t,o,r,e);for(var c in i.wrapper.CodeMirror=this,ja(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Cr(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new H,keySeq:null,specialChars:null},e.autofocus&&!m&&i.input.focus(),s&&a<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),Ra(this),Ms(),Or(this),this.curOp.forceUpdate=!0,_i(this,o),e.autofocus&&!m||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&Qo(n)}),20):tr(this),Da)Da.hasOwnProperty(c)&&Da[c](this,e[c],Ma);Xr(this),e.finishInit&&e.finishInit(this);for(var u=0;u20*20}gt(e.scroller,"touchstart",(function(r){if(!bt(t,r)&&!i(r)&&!Pa(t,r)){e.input.ensurePolled(),clearTimeout(n);var s=+new Date;e.activeTouch={start:s,moved:!1,prev:s-o.end<=300?o:null},1==r.touches.length&&(e.activeTouch.left=r.touches[0].pageX,e.activeTouch.top=r.touches[0].pageY)}})),gt(e.scroller,"touchmove",(function(){e.activeTouch&&(e.activeTouch.moved=!0)})),gt(e.scroller,"touchend",(function(n){var o=e.activeTouch;if(o&&!$n(e,n)&&null!=o.left&&!o.moved&&new Date-o.start<300){var i,s=t.coordsChar(e.activeTouch,"page");i=!o.prev||l(o,o.prev)?new ai(s,s):!o.prev.prev||l(o,o.prev.prev)?t.findWordAt(s):new ai(se(s.line,0),fe(t.doc,se(s.line+1,0))),t.setSelection(i.anchor,i.head),t.focus(),Ct(n)}r()})),gt(e.scroller,"touchcancel",r),gt(e.scroller,"scroll",(function(){e.scroller.clientHeight&&(hr(t,e.scroller.scrollTop),vr(t,e.scroller.scrollLeft,!0),mt(t,"scroll",t))})),gt(e.scroller,"mousewheel",(function(e){return ii(t,e)})),gt(e.scroller,"DOMMouseScroll",(function(e){return ii(t,e)})),gt(e.wrapper,"scroll",(function(){return e.wrapper.scrollTop=e.wrapper.scrollLeft=0})),e.dragFunctions={enter:function(e){bt(t,e)||Tt(e)},over:function(e){bt(t,e)||(Ps(t,e),Tt(e))},start:function(e){return ks(t,e)},drop:Dr(t,Ts),leave:function(e){bt(t,e)||Es(t)}};var c=e.input.getField();gt(c,"keyup",(function(e){return da.call(t,e)})),gt(c,"keydown",Dr(t,ua)),gt(c,"keypress",Dr(t,fa)),gt(c,"focus",(function(e){return Qo(t,e)})),gt(c,"blur",(function(e){return tr(t,e)}))}Va.defaults=La,Va.optionHandlers=Da;var Ha=[];function za(t,e,n,o){var r,i=t.doc;null==n&&(n="add"),"smart"==n&&(i.mode.indent?r=_e(t,e).state:n="prev");var s=t.options.tabSize,a=Zt(i,e),l=R(a.text,null,s);a.stateAfter&&(a.stateAfter=null);var c,u=a.text.match(/^\s*/)[0];if(o||/\S/.test(a.text)){if("smart"==n&&((c=i.mode.indent(r,a.text.slice(u.length),a.text))==U||c>150)){if(!o)return;n="prev"}}else c=0,n="not";"prev"==n?c=e>i.first?R(Zt(i,e-1).text,null,s):0:"add"==n?c=l+t.options.indentUnit:"subtract"==n?c=l-t.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var p="",d=0;if(t.options.indentWithTabs)for(var f=Math.floor(c/s);f;--f)d+=s,p+="\t";if(ds,l=Nt(e),c=null;if(a&&o.ranges.length>1)if(Ba&&Ba.text.join("\n")==e){if(o.ranges.length%Ba.text.length==0){c=[];for(var u=0;u=0;d--){var f=o.ranges[d],h=f.from(),g=f.to();f.empty()&&(n&&n>0?h=se(h.line,h.ch-n):t.state.overwrite&&!a?g=se(g.line,Math.min(Zt(i,g.line).text.length,g.ch+X(l).length)):a&&Ba&&Ba.lineWise&&Ba.text.join("\n")==l.join("\n")&&(h=g=se(h.line,0)));var v={from:h,to:g,text:c?c[d%c.length]:l,origin:r||(a?"paste":t.state.cutIncoming>s?"cut":"+input")};Qi(t.doc,v),An(t,"inputRead",t,v)}e&&!a&&qa(t,e),cr(t),t.curOp.updateInput<2&&(t.curOp.updateInput=p),t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=-1}function $a(t,e){var n=t.clipboardData&&t.clipboardData.getData("Text");if(n)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||!e.hasFocus()||Lr(e,(function(){return Wa(e,n,0,null,"paste")})),!0}function qa(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var n=t.doc.sel,o=n.ranges.length-1;o>=0;o--){var r=n.ranges[o];if(!(r.head.ch>100||o&&n.ranges[o-1].head.line==r.head.line)){var i=t.getModeAt(r.head),s=!1;if(i.electricChars){for(var a=0;a-1){s=za(t,r.head.line,"smart");break}}else i.electricInput&&i.electricInput.test(Zt(t.doc,r.head.line).text.slice(0,r.head.ch))&&(s=za(t,r.head.line,"smart"));s&&An(t,"electricInput",t,r.head.line)}}}function Ga(t){for(var e=[],n=[],o=0;on&&(za(this,r.head.line,t,!0),n=r.head.line,o==this.doc.sel.primIndex&&cr(this));else{var i=r.from(),s=r.to(),a=Math.max(n,i.line);n=Math.min(this.lastLine(),s.line-(s.ch?0:1))+1;for(var l=a;l0&&Ri(this.doc,o,new ai(i,c[o].to()),W)}}})),getTokenAt:function(t,e){return Oe(this,t,e)},getLineTokens:function(t,e){return Oe(this,se(t),e,!0)},getTokenTypeAt:function(t){t=fe(this.doc,t);var e,n=be(this,Zt(this.doc,t.line)),o=0,r=(n.length-1)/2,i=t.ch;if(0==i)e=n[2];else for(;;){var s=o+r>>1;if((s?n[2*s-1]:0)>=i)r=s;else{if(!(n[2*s+1]i&&(t=i,r=!0),o=Zt(this.doc,t)}else o=t;return mo(this,o,{top:0,left:0},e||"page",n||r).top+(r?this.doc.height-an(o):0)},defaultTextHeight:function(){return jo(this.display)},defaultCharWidth:function(){return Mo(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,n,o,r){var i=this.display,s=(t=wo(this,fe(this.doc,t))).bottom,a=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),i.sizer.appendChild(e),"over"==o)s=t.top;else if("above"==o||"near"==o){var l=Math.max(i.wrapper.clientHeight,this.doc.height),c=Math.max(i.sizer.clientWidth,i.lineSpace.clientWidth);('above'==o||t.bottom+e.offsetHeight>l)&&t.top>e.offsetHeight?s=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=l&&(s=t.bottom),a+e.offsetWidth>c&&(a=c-e.offsetWidth)}e.style.top=s+"px",e.style.left=e.style.right="","right"==r?(a=i.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==r?a=0:"middle"==r&&(a=(i.sizer.clientWidth-e.offsetWidth)/2),e.style.left=a+"px"),n&&sr(this,{left:a,top:s,right:a+e.offsetWidth,bottom:s+e.offsetHeight})},triggerOnKeyDown:Nr(ua),triggerOnKeyPress:Nr(fa),triggerOnKeyUp:da,triggerOnMouseDown:Nr(ba),execCommand:function(t){if(Zs.hasOwnProperty(t))return Zs[t].call(null,this)},triggerElectric:Nr((function(t){qa(this,t)})),findPosH:function(t,e,n,o){var r=1;e<0&&(r=-1,e=-e);for(var i=fe(this.doc,t),s=0;s0&&s(e.charAt(n-1));)--n;for(;o.5||this.options.lineWrapping)&&Io(this),mt(this,"refresh",this)})),swapDoc:Nr((function(t){var e=this.doc;return e.cm=null,this.state.selectingText&&this.state.selectingText(),_i(this,t),ho(this),this.display.input.reset(),ur(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,An(this,"swapDoc",this,e),e})),phrase:function(t){var e=this.options.phrases;return e&&Object.prototype.hasOwnProperty.call(e,t)?e[t]:t},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},xt(t),t.registerHelper=function(e,o,r){n.hasOwnProperty(e)||(n[e]=t[e]={_global:[]}),n[e][o]=r},t.registerGlobalHelper=function(e,o,r,i){t.registerHelper(e,o,i),n[e]._global.push({pred:r,val:i})}}function Ja(t,e,n,o,r){var i=e,s=n,a=Zt(t,e.line),l=r&&"rtl"==t.direction?-n:n;function c(){var n=e.line+l;return!(n=t.first+t.size)&&(e=new se(n,e.ch,e.sticky),a=Zt(t,n))}function u(i){var s;if("codepoint"==o){var u=a.text.charCodeAt(e.ch+(n>0?0:-1));if(isNaN(u))s=null;else{var p=n>0?u>=55296&&u<56320:u>=56320&&u<57343;s=new se(e.line,Math.max(0,Math.min(a.text.length,e.ch+n*(p?2:1))),-n)}}else s=r?Js(t.cm,a,e,n):Ys(a,e,n);if(null==s){if(i||!c())return!1;e=Xs(r,t.cm,a,e.line,l)}else e=s;return!0}if("char"==o||"codepoint"==o)u();else if("column"==o)u(!0);else if("word"==o||"group"==o)for(var p=null,d="group"==o,f=t.cm&&t.cm.getHelper(e,"wordChars"),h=!0;!(n<0)||u(!h);h=!1){var g=a.text.charAt(e.ch)||"\n",v=ot(g,f)?"w":d&&"\n"==g?"n":!d||/\s/.test(g)?null:"p";if(!d||h||v||(v="s"),p&&p!=v){n<0&&(n=1,u(),e.sticky="after");break}if(v&&(p=v),n>0&&!u(!h))break}var y=Yi(t,e,i,s,!0);return le(i,y)&&(y.hitSide=!0),y}function Za(t,e,n,o){var r,i,s=t.doc,a=e.left;if("page"==o){var l=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*jo(t.display),3);r=(n>0?e.bottom:e.top)+n*c}else"line"==o&&(r=n>0?e.bottom+3:e.top-3);for(;(i=So(t,a,r)).outside;){if(n<0?r<=0:r>=s.height){i.hitSide=!0;break}r+=5*n}return i}var Qa=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new H,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function tl(t,e){var n=no(t,e.line);if(!n||n.hidden)return null;var o=Zt(t.doc,e.line),r=Qn(n,o,e.line),i=ft(o,t.doc.direction),s="left";i&&(s=pt(i,e.ch)%2?"right":"left");var a=ao(r.map,e.ch,s);return a.offset="right"==a.collapse?a.end:a.start,a}function el(t){for(var e=t;e;e=e.parentNode)if(/CodeMirror-gutter-wrapper/.test(e.className))return!0;return!1}function nl(t,e){return e&&(t.bad=!0),t}function ol(t,e,n,o,r){var i="",s=!1,a=t.doc.lineSeparator(),l=!1;function c(t){return function(e){return e.id==t}}function u(){s&&(i+=a,l&&(i+=a),s=l=!1)}function p(t){t&&(u(),i+=t)}function d(e){if(1==e.nodeType){var n=e.getAttribute("cm-text");if(n)return void p(n);var i,f=e.getAttribute("cm-marker");if(f){var h=t.findMarks(se(o,0),se(r+1,0),c(+f));return void(h.length&&(i=h[0].find(0))&&p(Qt(t.doc,i.from,i.to).join(a)))}if("false"==e.getAttribute("contenteditable"))return;var g=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(!/^br$/i.test(e.nodeName)&&0==e.textContent.length)return;g&&u();for(var v=0;v=e.display.viewTo||i.line=e.display.viewFrom&&tl(e,r)||{node:l[0].measure.map[2],offset:0},u=i.lineo.firstLine()&&(s=se(s.line-1,Zt(o.doc,s.line-1).length)),a.ch==Zt(o.doc,a.line).text.length&&a.liner.viewTo-1)return!1;s.line==r.viewFrom||0==(t=Vo(o,s.line))?(e=ne(r.view[0].line),n=r.view[0].node):(e=ne(r.view[t].line),n=r.view[t-1].node.nextSibling);var l,c,u=Vo(o,a.line);if(u==r.view.length-1?(l=r.viewTo-1,c=r.lineDiv.lastChild):(l=ne(r.view[u+1].line)-1,c=r.view[u+1].node.previousSibling),!n)return!1;for(var p=o.doc.splitLines(ol(o,n,c,e,l)),d=Qt(o.doc,se(e,0),se(l,Zt(o.doc,l).text.length));p.length>1&&d.length>1;)if(X(p)==X(d))p.pop(),d.pop(),l--;else{if(p[0]!=d[0])break;p.shift(),d.shift(),e++}for(var f=0,h=0,g=p[0],v=d[0],y=Math.min(g.length,v.length);fs.ch&&m.charCodeAt(m.length-h-1)==b.charCodeAt(b.length-h-1);)f--,h++;p[p.length-1]=m.slice(0,m.length-h).replace(/^\u200b+/,""),p[0]=p[0].slice(f).replace(/\u200b+$/,"");var w=se(e,f),x=se(l,d.length?X(d).length-h:0);return p.length>1||p[0]||ae(w,x)?(is(o.doc,p,w,x,"+input"),!0):void 0},Qa.prototype.ensurePolled=function(){this.forceCompositionEnd()},Qa.prototype.reset=function(){this.forceCompositionEnd()},Qa.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Qa.prototype.readFromDOMSoon=function(){var t=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(t.readDOMTimeout=null,t.composing){if(!t.composing.done)return;t.composing=null}t.updateFromDOM()}),80))},Qa.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||Lr(this.cm,(function(){return Ro(t.cm)}))},Qa.prototype.setUneditable=function(t){t.contentEditable="false"},Qa.prototype.onKeyPress=function(t){0==t.charCode||this.composing||(t.preventDefault(),this.cm.isReadOnly()||Dr(this.cm,Wa)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},Qa.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},Qa.prototype.onContextMenu=function(){},Qa.prototype.resetPosition=function(){},Qa.prototype.needsContentAttribute=!0;var sl=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new H,this.hasSelection=!1,this.composing=null};function al(t,e){if((e=e?V(e):{}).value=t.value,!e.tabindex&&t.tabIndex&&(e.tabindex=t.tabIndex),!e.placeholder&&t.placeholder&&(e.placeholder=t.placeholder),null==e.autofocus){var n=L();e.autofocus=n==t||null!=t.getAttribute("autofocus")&&n==document.body}function o(){t.value=a.getValue()}var r;if(t.form&&(gt(t.form,"submit",o),!e.leaveSubmitMethodAlone)){var i=t.form;r=i.submit;try{var s=i.submit=function(){o(),i.submit=r,i.submit(),i.submit=s}}catch(t){}}e.finishInit=function(n){n.save=o,n.getTextArea=function(){return t},n.toTextArea=function(){n.toTextArea=isNaN,o(),t.parentNode.removeChild(n.getWrapperElement()),t.style.display="",t.form&&(yt(t.form,"submit",o),e.leaveSubmitMethodAlone||"function"!=typeof t.form.submit||(t.form.submit=r))}},t.style.display="none";var a=Va((function(e){return t.parentNode.insertBefore(e,t.nextSibling)}),e);return a}function ll(t){t.off=yt,t.on=gt,t.wheelEventPixels=ri,t.Doc=Ss,t.splitLines=Nt,t.countColumn=R,t.findColumn=G,t.isWordChar=nt,t.Pass=U,t.signal=mt,t.Line=un,t.changeEnd=ui,t.scrollbarModel=xr,t.Pos=se,t.cmpPos=ae,t.modes=Ht,t.mimeModes=zt,t.resolveMode=Wt,t.getMode=$t,t.modeExtensions=qt,t.extendMode=Gt,t.copyState=Kt,t.startState=Xt,t.innerMode=Yt,t.commands=Zs,t.keyMap=Rs,t.keyName=$s,t.isModifierKey=Us,t.lookupKey=Bs,t.normalizeKeyMap=zs,t.StringStream=Jt,t.SharedTextMarker=ms,t.TextMarker=vs,t.LineWidget=ds,t.e_preventDefault=Ct,t.e_stopPropagation=St,t.e_stop=Tt,t.addClass=D,t.contains=M,t.rmClass=k,t.keyNames=Ns}sl.prototype.init=function(t){var e=this,n=this,o=this.cm;this.createField(t);var r=this.textarea;function i(t){if(!bt(o,t)){if(o.somethingSelected())Ua({lineWise:!1,text:o.getSelections()});else{if(!o.options.lineWiseCopyCut)return;var e=Ga(o);Ua({lineWise:!0,text:e.text}),"cut"==t.type?o.setSelections(e.ranges,null,W):(n.prevInput="",r.value=e.text.join("\n"),I(r))}"cut"==t.type&&(o.state.cutIncoming=+new Date)}}t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),v&&(r.style.width="0px"),gt(r,"input",(function(){s&&a>=9&&e.hasSelection&&(e.hasSelection=null),n.poll()})),gt(r,"paste",(function(t){bt(o,t)||$a(t,o)||(o.state.pasteIncoming=+new Date,n.fastPoll())})),gt(r,"cut",i),gt(r,"copy",i),gt(t.scroller,"paste",(function(e){if(!$n(t,e)&&!bt(o,e)){if(!r.dispatchEvent)return o.state.pasteIncoming=+new Date,void n.focus();var i=new Event("paste");i.clipboardData=e.clipboardData,r.dispatchEvent(i)}})),gt(t.lineSpace,"selectstart",(function(e){$n(t,e)||Ct(e)})),gt(r,"compositionstart",(function(){var t=o.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:t,range:o.markText(t,o.getCursor("to"),{className:"CodeMirror-composing"})}})),gt(r,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},sl.prototype.createField=function(t){this.wrapper=Ya(),this.textarea=this.wrapper.firstChild},sl.prototype.screenReaderLabelChanged=function(t){t?this.textarea.setAttribute('aria-label',t):this.textarea.removeAttribute('aria-label')},sl.prototype.prepareSelection=function(){var t=this.cm,e=t.display,n=t.doc,o=qo(t);if(t.options.moveInputWithCursor){var r=wo(t,n.sel.primary().head,"div"),i=e.wrapper.getBoundingClientRect(),s=e.lineDiv.getBoundingClientRect();o.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,r.top+s.top-i.top)),o.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,r.left+s.left-i.left))}return o},sl.prototype.showSelection=function(t){var e=this.cm.display;E(e.cursorDiv,t.cursors),E(e.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},sl.prototype.reset=function(t){if(!this.contextMenuPending&&!this.composing){var e=this.cm;if(e.somethingSelected()){this.prevInput="";var n=e.getSelection();this.textarea.value=n,e.state.focused&&I(this.textarea),s&&a>=9&&(this.hasSelection=n)}else t||(this.prevInput=this.textarea.value="",s&&a>=9&&(this.hasSelection=null))}},sl.prototype.getField=function(){return this.textarea},sl.prototype.supportsTouch=function(){return!1},sl.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!m||L()!=this.textarea))try{this.textarea.focus()}catch(t){}},sl.prototype.blur=function(){this.textarea.blur()},sl.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},sl.prototype.receivedFocus=function(){this.slowPoll()},sl.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){t.poll(),t.cm.state.focused&&t.slowPoll()}))},sl.prototype.fastPoll=function(){var t=!1,e=this;function n(){e.poll()||t?(e.pollingFast=!1,e.slowPoll()):(t=!0,e.polling.set(60,n))}e.pollingFast=!0,e.polling.set(20,n)},sl.prototype.poll=function(){var t=this,e=this.cm,n=this.textarea,o=this.prevInput;if(this.contextMenuPending||!e.state.focused||It(n)&&!o&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var r=n.value;if(r==o&&!e.somethingSelected())return!1;if(s&&a>=9&&this.hasSelection===r||b&&/[\uf700-\uf7ff]/.test(r))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var i=r.charCodeAt(0);if(8203!=i||o||(o="​"),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(o.length,r.length);l1e3||r.indexOf("\n")>-1?n.value=t.prevInput="":t.prevInput=r,t.composing&&(t.composing.range.clear(),t.composing.range=e.markText(t.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},sl.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},sl.prototype.onKeyPress=function(){s&&a>=9&&(this.hasSelection=null),this.fastPoll()},sl.prototype.onContextMenu=function(t){var e=this,n=e.cm,o=n.display,r=e.textarea;e.contextMenuPending&&e.contextMenuPending();var i=Fo(n,t),c=o.scroller.scrollTop;if(i&&!d){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(i)&&Dr(n,Ui)(n.doc,ci(i),W);var u,p=r.style.cssText,f=e.wrapper.style.cssText,h=e.wrapper.offsetParent.getBoundingClientRect();if(e.wrapper.style.cssText="position: static",r.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-h.top-5)+"px; left: "+(t.clientX-h.left-5)+"px;\n z-index: 1000; background: "+(s?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(u=window.scrollY),o.input.focus(),l&&window.scrollTo(null,u),o.input.reset(),n.somethingSelected()||(r.value=e.prevInput=" "),e.contextMenuPending=y,o.selForContextMenu=n.doc.sel,clearTimeout(o.detectingSelectAll),s&&a>=9&&v(),S){Tt(t);var g=function(){yt(window,"mouseup",g),setTimeout(y,20)};gt(window,"mouseup",g)}else setTimeout(y,50)}function v(){if(null!=r.selectionStart){var t=n.somethingSelected(),i="​"+(t?r.value:"");r.value="⇚",r.value=i,e.prevInput=t?"":"​",r.selectionStart=1,r.selectionEnd=i.length,o.selForContextMenu=n.doc.sel}}function y(){if(e.contextMenuPending==y&&(e.contextMenuPending=!1,e.wrapper.style.cssText=f,r.style.cssText=p,s&&a<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=c),null!=r.selectionStart)){(!s||s&&a<9)&&v();var t=0,i=function(){o.selForContextMenu==n.doc.sel&&0==r.selectionStart&&r.selectionEnd>0&&"​"==e.prevInput?Dr(n,Ji)(n):t++<10?o.detectingSelectAll=setTimeout(i,500):(o.selForContextMenu=null,o.input.reset())};o.detectingSelectAll=setTimeout(i,200)}}},sl.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t,this.textarea.readOnly=!!t},sl.prototype.setUneditable=function(){},sl.prototype.needsContentAttribute=!1,Na(Va),Xa(Va);var cl="iter insert remove copy getEditor constructor".split(" ");for(var ul in Ss.prototype)Ss.prototype.hasOwnProperty(ul)&&z(cl,ul)<0&&(Va.prototype[ul]=function(t){return function(){return t.apply(this.doc,arguments)}}(Ss.prototype[ul]));return xt(Ss),Va.inputStyles={textarea:sl,contenteditable:Qa},Va.defineMode=function(t){Va.defaults.mode||"null"==t||(Va.defaults.mode=t),Bt.apply(this,arguments)},Va.defineMIME=Ut,Va.defineMode("null",(function(){return{token:function(t){return t.skipToEnd()}}})),Va.defineMIME("text/plain","null"),Va.defineExtension=function(t,e){Va.prototype[t]=e},Va.defineDocExtension=function(t,e){Ss.prototype[t]=e},Va.fromTextArea=al,ll(Va),Va.version="5.65.6",Va}())},629:(t,e,n)=>{1&&function(t){"use strict";function e(t){for(var e={},n=0;n*\/]/.test(n)?x(null,"select-op"):"."==n&&t.match(/^-?[_a-z][_a-z0-9-]*/i)?x("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?x(null,n):t.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(t.current())&&(e.tokenize=O),x("variable callee","variable")):/[\w\\\-]/.test(n)?(t.eatWhile(/[\w\\\-]/),x("property","word")):x(null,null):/[\d.]/.test(t.peek())?(t.eatWhile(/[\w.%]/),x("number","unit")):t.match(/^-[\w\\\-]*/)?(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?x("variable-2","variable-definition"):x("variable-2","variable")):t.match(/^\w+-/)?x("meta","meta"):void 0}function S(t){return function(e,n){for(var o,r=!1;null!=(o=e.next());){if(o==t&&!r){")"==t&&e.backUp(1);break}r=!r&&"\\"==o}return(o==t||!r&&")"!=t)&&(n.tokenize=null),x("string","string")}}function O(t,e){return t.next(),t.match(/^\s*[\"\')]/,!1)?e.tokenize=null:e.tokenize=S(")"),x(null,"(")}function T(t,e,n){this.type=t,this.indent=e,this.prev=n}function k(t,e,n,o){return t.context=new T(n,e.indentation()+(!1===o?0:s),t.context),n}function P(t){return t.context.prev&&(t.context=t.context.prev),t.context.type}function E(t,e,n){return M[n.context.type](t,e,n)}function A(t,e,n,o){for(var r=o||1;r>0;r--)n.context=n.context.prev;return E(t,e,n)}function j(t){var e=t.current().toLowerCase();i=y.hasOwnProperty(e)?"atom":v.hasOwnProperty(e)?"keyword":"variable"}var M={top:function(t,e,n){if("{"==t)return k(n,e,"block");if("}"==t&&n.context.prev)return P(n);if(_&&/@component/i.test(t))return k(n,e,"atComponentBlock");if(/^@(-moz-)?document$/i.test(t))return k(n,e,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(t))return k(n,e,"atBlock");if(/^@(font-face|counter-style)/i.test(t))return n.stateArg=t,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(t))return"keyframes";if(t&&"@"==t.charAt(0))return k(n,e,"at");if("hash"==t)i="builtin";else if("word"==t)i="tag";else{if("variable-definition"==t)return"maybeprop";if("interpolation"==t)return k(n,e,"interpolation");if(":"==t)return"pseudo";if(m&&"("==t)return k(n,e,"parens")}return n.context.type},block:function(t,e,n){if("word"==t){var o=e.current().toLowerCase();return d.hasOwnProperty(o)?(i="property","maybeprop"):f.hasOwnProperty(o)?(i=w?"string-2":"property","maybeprop"):m?(i=e.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(i+=" error","maybeprop")}return"meta"==t?"block":m||"hash"!=t&&"qualifier"!=t?M.top(t,e,n):(i="error","block")},maybeprop:function(t,e,n){return":"==t?k(n,e,"prop"):E(t,e,n)},prop:function(t,e,n){if(";"==t)return P(n);if("{"==t&&m)return k(n,e,"propBlock");if("}"==t||"{"==t)return A(t,e,n);if("("==t)return k(n,e,"parens");if("hash"!=t||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(e.current())){if("word"==t)j(e);else if("interpolation"==t)return k(n,e,"interpolation")}else i+=" error";return"prop"},propBlock:function(t,e,n){return"}"==t?P(n):"word"==t?(i="property","maybeprop"):n.context.type},parens:function(t,e,n){return"{"==t||"}"==t?A(t,e,n):")"==t?P(n):"("==t?k(n,e,"parens"):"interpolation"==t?k(n,e,"interpolation"):("word"==t&&j(e),"parens")},pseudo:function(t,e,n){return"meta"==t?"pseudo":"word"==t?(i="variable-3",n.context.type):E(t,e,n)},documentTypes:function(t,e,n){return"word"==t&&l.hasOwnProperty(e.current())?(i="tag",n.context.type):M.atBlock(t,e,n)},atBlock:function(t,e,n){if("("==t)return k(n,e,"atBlock_parens");if("}"==t||";"==t)return A(t,e,n);if("{"==t)return P(n)&&k(n,e,m?"block":"top");if("interpolation"==t)return k(n,e,"interpolation");if("word"==t){var o=e.current().toLowerCase();i="only"==o||"not"==o||"and"==o||"or"==o?"keyword":c.hasOwnProperty(o)?"attribute":u.hasOwnProperty(o)?"property":p.hasOwnProperty(o)?"keyword":d.hasOwnProperty(o)?"property":f.hasOwnProperty(o)?w?"string-2":"property":y.hasOwnProperty(o)?"atom":v.hasOwnProperty(o)?"keyword":"error"}return n.context.type},atComponentBlock:function(t,e,n){return"}"==t?A(t,e,n):"{"==t?P(n)&&k(n,e,m?"block":"top",!1):("word"==t&&(i="error"),n.context.type)},atBlock_parens:function(t,e,n){return")"==t?P(n):"{"==t||"}"==t?A(t,e,n,2):M.atBlock(t,e,n)},restricted_atBlock_before:function(t,e,n){return"{"==t?k(n,e,"restricted_atBlock"):"word"==t&&"@counter-style"==n.stateArg?(i="variable","restricted_atBlock_before"):E(t,e,n)},restricted_atBlock:function(t,e,n){return"}"==t?(n.stateArg=null,P(n)):"word"==t?(i="@font-face"==n.stateArg&&!h.hasOwnProperty(e.current().toLowerCase())||"@counter-style"==n.stateArg&&!g.hasOwnProperty(e.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},keyframes:function(t,e,n){return"word"==t?(i="variable","keyframes"):"{"==t?k(n,e,"top"):E(t,e,n)},at:function(t,e,n){return";"==t?P(n):"{"==t||"}"==t?A(t,e,n):("word"==t?i="tag":"hash"==t&&(i="builtin"),"at")},interpolation:function(t,e,n){return"}"==t?P(n):"{"==t||";"==t?A(t,e,n):("word"==t?i="variable":"variable"!=t&&"("!=t&&")"!=t&&(i="error"),"interpolation")}};return{startState:function(t){return{tokenize:null,state:o?"block":"top",stateArg:null,context:new T(o?"block":"top",t||0,null)}},token:function(t,e){if(!e.tokenize&&t.eatSpace())return null;var n=(e.tokenize||C)(t,e);return n&&"object"==typeof n&&(r=n[1],n=n[0]),i=n,"comment"!=r&&(e.state=M[e.state](r,t,e)),i},indent:function(t,e){var n=t.context,o=e&&e.charAt(0),r=n.indent;return"prop"!=n.type||"}"!=o&&")"!=o||(n=n.prev),n.prev&&("}"!=o||"block"!=n.type&&"top"!=n.type&&"interpolation"!=n.type&&"restricted_atBlock"!=n.type?(")"!=o||"parens"!=n.type&&"atBlock_parens"!=n.type)&&("{"!=o||"at"!=n.type&&"atBlock"!=n.type)||(r=Math.max(0,n.indent-s)):r=(n=n.prev).indent),r},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:b,fold:"brace"}}));var n=["domain","regexp","url","url-prefix"],o=e(n),r=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],i=e(r),s=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover","prefers-color-scheme","dynamic-range","video-dynamic-range"],a=e(s),l=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light","standard","high"],c=e(l),u=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","all","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","binding","bleed","block-size","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-content","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-height-step","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotate","rotation","rotation-point","row-gap","ruby-align","ruby-overhang","ruby-position","ruby-span","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-type","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-orientation","text-outline","text-overflow","text-rendering","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","touch-action","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","paint-order","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],p=e(u),d=["accent-color","aspect-ratio","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","content-visibility","margin-block","margin-block-end","margin-block-start","margin-inline","margin-inline-end","margin-inline-start","overflow-anchor","overscroll-behavior","padding-block","padding-block-end","padding-block-start","padding-inline","padding-inline-end","padding-inline-start","scroll-snap-stop","scrollbar-3d-light-color","scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-track-color","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","shape-inside","zoom"],f=e(d),h=e(["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),g=e(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),v=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],y=e(v),m=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","blur","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","brightness","bullets","button","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","conic-gradient","contain","content","contents","content-box","context-menu","continuous","contrast","copy","counter","counters","cover","crop","cross","crosshair","cubic-bezier","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","drop-shadow","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","grayscale","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","hue-rotate","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","manipulation","match","matrix","matrix3d","media-play-button","media-slider","media-sliderthumb","media-volume-slider","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiple_mask_images","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeating-conic-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturate","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","sepia","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],b=e(m),_=n.concat(r).concat(s).concat(l).concat(u).concat(d).concat(v).concat(m);function w(t,e){for(var n,o=!1;null!=(n=t.next());){if(o&&"/"==n){e.tokenize=null;break}o="*"==n}return["comment","comment"]}t.registerHelper("hintWords","css",_),t.defineMIME("text/css",{documentTypes:o,mediaTypes:i,mediaFeatures:a,mediaValueKeywords:c,propertyKeywords:p,nonStandardPropertyKeywords:f,fontProperties:h,counterDescriptors:g,colorKeywords:y,valueKeywords:b,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=w,w(t,e))}},name:"css"}),t.defineMIME("text/x-scss",{mediaTypes:i,mediaFeatures:a,mediaValueKeywords:c,propertyKeywords:p,nonStandardPropertyKeywords:f,colorKeywords:y,valueKeywords:b,fontProperties:h,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=w,w(t,e)):["operator","operator"]},":":function(t){return!!t.match(/^\s*\{/,!1)&&[null,null]},$:function(t){return t.match(/^[\w-]+/),t.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(t){return!!t.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),t.defineMIME("text/x-less",{mediaTypes:i,mediaFeatures:a,mediaValueKeywords:c,propertyKeywords:p,nonStandardPropertyKeywords:f,colorKeywords:y,valueKeywords:b,fontProperties:h,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=w,w(t,e)):["operator","operator"]},"@":function(t){return t.eat("{")?[null,"interpolation"]:!t.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),t.defineMIME("text/x-gss",{documentTypes:o,mediaTypes:i,mediaFeatures:a,propertyKeywords:p,nonStandardPropertyKeywords:f,fontProperties:h,counterDescriptors:g,colorKeywords:y,valueKeywords:b,supportsAtComponent:!0,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=w,w(t,e))}},name:"css",helperType:"gss"})}(n(631))},531:(t,e,n)=>{1&&function(t){"use strict";var e={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};function n(t,e,n){var o=t.current(),r=o.search(e);return r>-1?t.backUp(o.length-r):o.match(/<\/?$/)&&(t.backUp(o.length),t.match(e,!1)||t.match(o)),n}var o={};function r(t){var e=o[t];return e||(o[t]=new RegExp("\\s+"+t+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}function i(t,e){var n=t.match(r(e));return n?/^\s*(.*?)\s*$/.exec(n[2])[1]:""}function s(t,e){return new RegExp((e?"^":"")+"","i")}function a(t,e){for(var n in t)for(var o=e[n]||(e[n]=[]),r=t[n],i=r.length-1;i>=0;i--)o.unshift(r[i])}function l(t,e){for(var n=0;n=0;d--)c.script.unshift(["type",p[d].matches,p[d].mode]);function f(e,r){var a,u=i.token(e,r.htmlState),p=/\btag\b/.test(u);if(p&&!/[<>\s\/]/.test(e.current())&&(a=r.htmlState.tagName&&r.htmlState.tagName.toLowerCase())&&c.hasOwnProperty(a))r.inTag=a+" ";else if(r.inTag&&p&&/>$/.test(e.current())){var d=/^([\S]+) (.*)/.exec(r.inTag);r.inTag=null;var h=">"==e.current()&&l(c[d[1]],d[2]),g=t.getMode(o,h),v=s(d[1],!0),y=s(d[1],!1);r.token=function(t,e){return t.match(v,!1)?(e.token=f,e.localState=e.localMode=null,null):n(t,y,e.localMode.token(t,e.localState))},r.localMode=g,r.localState=t.startState(g,i.indent(r.htmlState,"",""))}else r.inTag&&(r.inTag+=e.current(),e.eol()&&(r.inTag+=" "));return u}return{startState:function(){return{token:f,inTag:null,localMode:null,localState:null,htmlState:t.startState(i)}},copyState:function(e){var n;return e.localState&&(n=t.copyState(e.localMode,e.localState)),{token:e.token,inTag:e.inTag,localMode:e.localMode,localState:n,htmlState:t.copyState(i,e.htmlState)}},token:function(t,e){return e.token(t,e)},indent:function(e,n,o){return!e.localMode||/^\s*<\//.test(n)?i.indent(e.htmlState,n,o):e.localMode.indent?e.localMode.indent(e.localState,n,o):t.Pass},innerMode:function(t){return{state:t.localState||t.htmlState,mode:t.localMode||i}}}}),"xml","javascript","css"),t.defineMIME("text/html","htmlmixed")}(n(631),n(589),n(876),n(629))},876:(t,e,n)=>{1&&function(t){"use strict";t.defineMode("javascript",(function(e,n){var o,r,i=e.indentUnit,s=n.statementIndent,a=n.jsonld,l=n.json||a,c=!1!==n.trackScope,u=n.typescript,p=n.wordCharacters||/[\w$\xa1-\uffff]/,d=function(){function t(t){return{type:t,style:"keyword"}}var e=t("keyword a"),n=t("keyword b"),o=t("keyword c"),r=t("keyword d"),i=t("operator"),s={type:"atom",style:"atom"};return{if:t("if"),while:e,with:e,else:n,do:n,try:n,finally:n,return:r,break:r,continue:r,new:t("new"),delete:o,void:o,throw:o,debugger:t("debugger"),var:t("var"),const:t("var"),let:t("var"),function:t("function"),catch:t("catch"),for:t("for"),switch:t("switch"),case:t("case"),default:t("default"),in:i,typeof:i,instanceof:i,true:s,false:s,null:s,undefined:s,NaN:s,Infinity:s,this:t("this"),class:t("class"),super:t("atom"),yield:o,export:t("export"),import:t("import"),extends:o,await:o}}(),f=/[+\-*&%=<>!?|~^@]/,h=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function g(t){for(var e,n=!1,o=!1;null!=(e=t.next());){if(!n){if("/"==e&&!o)return;"["==e?o=!0:o&&"]"==e&&(o=!1)}n=!n&&"\\"==e}}function v(t,e,n){return o=t,r=n,e}function y(t,e){var n=t.next();if('"'==n||"'"==n)return e.tokenize=m(n),e.tokenize(t,e);if("."==n&&t.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return v("number","number");if("."==n&&t.match(".."))return v("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return v(n);if("="==n&&t.eat(">"))return v("=>","operator");if("0"==n&&t.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return v("number","number");if(/\d/.test(n))return t.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),v("number","number");if("/"==n)return t.eat("*")?(e.tokenize=b,b(t,e)):t.eat("/")?(t.skipToEnd(),v("comment","comment")):re(t,e,1)?(g(t),t.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),v("regexp","string-2")):(t.eat("="),v("operator","operator",t.current()));if("`"==n)return e.tokenize=_,_(t,e);if("#"==n&&"!"==t.peek())return t.skipToEnd(),v("meta","meta");if("#"==n&&t.eatWhile(p))return v("variable","property");if("<"==n&&t.match("!--")||"-"==n&&t.match("->")&&!/\S/.test(t.string.slice(0,t.start)))return t.skipToEnd(),v("comment","comment");if(f.test(n))return">"==n&&e.lexical&&">"==e.lexical.type||(t.eat("=")?"!"!=n&&"="!=n||t.eat("="):/[<>*+\-|&?]/.test(n)&&(t.eat(n),">"==n&&t.eat(n))),"?"==n&&t.eat(".")?v("."):v("operator","operator",t.current());if(p.test(n)){t.eatWhile(p);var o=t.current();if("."!=e.lastType){if(d.propertyIsEnumerable(o)){var r=d[o];return v(r.type,r.style,o)}if("async"==o&&t.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return v("async","keyword",o)}return v("variable","variable",o)}}function m(t){return function(e,n){var o,r=!1;if(a&&"@"==e.peek()&&e.match(h))return n.tokenize=y,v("jsonld-keyword","meta");for(;null!=(o=e.next())&&(o!=t||r);)r=!r&&"\\"==o;return r||(n.tokenize=y),v("string","string")}}function b(t,e){for(var n,o=!1;n=t.next();){if("/"==n&&o){e.tokenize=y;break}o="*"==n}return v("comment","comment")}function _(t,e){for(var n,o=!1;null!=(n=t.next());){if(!o&&("`"==n||"$"==n&&t.eat("{"))){e.tokenize=y;break}o=!o&&"\\"==n}return v("quasi","string-2",t.current())}var w="([{}])";function x(t,e){e.fatArrowAt&&(e.fatArrowAt=null);var n=t.string.indexOf("=>",t.start);if(!(n<0)){if(u){var o=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(t.string.slice(t.start,n));o&&(n=o.index)}for(var r=0,i=!1,s=n-1;s>=0;--s){var a=t.string.charAt(s),l=w.indexOf(a);if(l>=0&&l<3){if(!r){++s;break}if(0==--r){"("==a&&(i=!0);break}}else if(l>=3&&l<6)++r;else if(p.test(a))i=!0;else if(/["'\/`]/.test(a))for(;;--s){if(0==s)return;if(t.string.charAt(s-1)==a&&"\\"!=t.string.charAt(s-2)){s--;break}}else if(i&&!r){++s;break}}i&&!r&&(e.fatArrowAt=s)}}var C={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function S(t,e,n,o,r,i){this.indented=t,this.column=e,this.type=n,this.prev=r,this.info=i,null!=o&&(this.align=o)}function O(t,e){if(!c)return!1;for(var n=t.localVars;n;n=n.next)if(n.name==e)return!0;for(var o=t.context;o;o=o.prev)for(n=o.vars;n;n=n.next)if(n.name==e)return!0}function T(t,e,n,o,r){var i=t.cc;for(k.state=t,k.stream=r,k.marked=null,k.cc=i,k.style=e,t.lexical.hasOwnProperty("align")||(t.lexical.align=!0);1;)if((i.length?i.pop():l?$:U)(n,o)){for(;i.length&&i[i.length-1].lex;)i.pop()();return k.marked?k.marked:"variable"==n&&O(t,o)?"variable-2":e}}var k={state:null,column:null,marked:null,cc:null};function P(){for(var t=arguments.length-1;t>=0;t--)k.cc.push(arguments[t])}function E(){return P.apply(null,arguments),!0}function A(t,e){for(var n=e;n;n=n.next)if(n.name==t)return!0;return!1}function j(t){var e=k.state;if(k.marked="def",c){if(e.context)if("var"==e.lexical.info&&e.context&&e.context.block){var o=M(t,e.context);if(null!=o)return void(e.context=o)}else if(!A(t,e.localVars))return void(e.localVars=new N(t,e.localVars));n.globalVars&&!A(t,e.globalVars)&&(e.globalVars=new N(t,e.globalVars))}}function M(t,e){if(e){if(e.block){var n=M(t,e.prev);return n?n==e.prev?e:new D(n,e.vars,!0):null}return A(t,e.vars)?e:new D(e.prev,new N(t,e.vars),!1)}return null}function L(t){return"public"==t||"private"==t||"protected"==t||"abstract"==t||"readonly"==t}function D(t,e,n){this.prev=t,this.vars=e,this.block=n}function N(t,e){this.name=t,this.next=e}var I=new N("this",new N("arguments",null));function F(){k.state.context=new D(k.state.context,k.state.localVars,!1),k.state.localVars=I}function V(){k.state.context=new D(k.state.context,k.state.localVars,!0),k.state.localVars=null}function R(){k.state.localVars=k.state.context.vars,k.state.context=k.state.context.prev}function H(t,e){var n=function(){var n=k.state,o=n.indented;if("stat"==n.lexical.type)o=n.lexical.indented;else for(var r=n.lexical;r&&")"==r.type&&r.align;r=r.prev)o=r.indented;n.lexical=new S(o,k.stream.column(),t,null,n.lexical,e)};return n.lex=!0,n}function z(){var t=k.state;t.lexical.prev&&(")"==t.lexical.type&&(t.indented=t.lexical.indented),t.lexical=t.lexical.prev)}function B(t){function e(n){return n==t?E():";"==t||"}"==n||")"==n||"]"==n?P():E(e)}return e}function U(t,e){return"var"==t?E(H("vardef",e),Pt,B(";"),z):"keyword a"==t?E(H("form"),G,U,z):"keyword b"==t?E(H("form"),U,z):"keyword d"==t?k.stream.match(/^\s*$/,!1)?E():E(H("stat"),Y,B(";"),z):"debugger"==t?E(B(";")):"{"==t?E(H("}"),V,dt,z,R):";"==t?E():"if"==t?("else"==k.state.lexical.info&&k.state.cc[k.state.cc.length-1]==z&&k.state.cc.pop()(),E(H("form"),G,U,z,Dt)):"function"==t?E(Vt):"for"==t?E(H("form"),V,Nt,U,R,z):"class"==t||u&&"interface"==e?(k.marked="keyword",E(H("form","class"==t?t:e),Ut,z)):"variable"==t?u&&"declare"==e?(k.marked="keyword",E(U)):u&&("module"==e||"enum"==e||"type"==e)&&k.stream.match(/^\s*\w/,!1)?(k.marked="keyword","enum"==e?E(ee):"type"==e?E(Ht,B("operator"),yt,B(";")):E(H("form"),Et,B("{"),H("}"),dt,z,z)):u&&"namespace"==e?(k.marked="keyword",E(H("form"),$,U,z)):u&&"abstract"==e?(k.marked="keyword",E(U)):E(H("stat"),it):"switch"==t?E(H("form"),G,B("{"),H("}","switch"),V,dt,z,z,R):"case"==t?E($,B(":")):"default"==t?E(B(":")):"catch"==t?E(H("form"),F,W,U,z,R):"export"==t?E(H("stat"),Gt,z):"import"==t?E(H("stat"),Yt,z):"async"==t?E(U):"@"==e?E($,U):P(H("stat"),$,B(";"),z)}function W(t){if("("==t)return E(zt,B(")"))}function $(t,e){return K(t,e,!1)}function q(t,e){return K(t,e,!0)}function G(t){return"("!=t?P():E(H(")"),Y,B(")"),z)}function K(t,e,n){if(k.state.fatArrowAt==k.stream.start){var o=n?et:tt;if("("==t)return E(F,H(")"),ut(zt,")"),z,B("=>"),o,R);if("variable"==t)return P(F,Et,B("=>"),o,R)}var r=n?J:X;return C.hasOwnProperty(t)?E(r):"function"==t?E(Vt,r):"class"==t||u&&"interface"==e?(k.marked="keyword",E(H("form"),Bt,z)):"keyword c"==t||"async"==t?E(n?q:$):"("==t?E(H(")"),Y,B(")"),z,r):"operator"==t||"spread"==t?E(n?q:$):"["==t?E(H("]"),te,z,r):"{"==t?pt(at,"}",null,r):"quasi"==t?P(Z,r):"new"==t?E(nt(n)):E()}function Y(t){return t.match(/[;\}\)\],]/)?P():P($)}function X(t,e){return","==t?E(Y):J(t,e,!1)}function J(t,e,n){var o=0==n?X:J,r=0==n?$:q;return"=>"==t?E(F,n?et:tt,R):"operator"==t?/\+\+|--/.test(e)||u&&"!"==e?E(o):u&&"<"==e&&k.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?E(H(">"),ut(yt,">"),z,o):"?"==e?E($,B(":"),r):E(r):"quasi"==t?P(Z,o):";"!=t?"("==t?pt(q,")","call",o):"."==t?E(st,o):"["==t?E(H("]"),Y,B("]"),z,o):u&&"as"==e?(k.marked="keyword",E(yt,o)):"regexp"==t?(k.state.lastType=k.marked="operator",k.stream.backUp(k.stream.pos-k.stream.start-1),E(r)):void 0:void 0}function Z(t,e){return"quasi"!=t?P():"${"!=e.slice(e.length-2)?E(Z):E(Y,Q)}function Q(t){if("}"==t)return k.marked="string-2",k.state.tokenize=_,E(Z)}function tt(t){return x(k.stream,k.state),P("{"==t?U:$)}function et(t){return x(k.stream,k.state),P("{"==t?U:q)}function nt(t){return function(e){return"."==e?E(t?rt:ot):"variable"==e&&u?E(Ot,t?J:X):P(t?q:$)}}function ot(t,e){if("target"==e)return k.marked="keyword",E(X)}function rt(t,e){if("target"==e)return k.marked="keyword",E(J)}function it(t){return":"==t?E(z,U):P(X,B(";"),z)}function st(t){if("variable"==t)return k.marked="property",E()}function at(t,e){return"async"==t?(k.marked="property",E(at)):"variable"==t||"keyword"==k.style?(k.marked="property","get"==e||"set"==e?E(lt):(u&&k.state.fatArrowAt==k.stream.start&&(n=k.stream.match(/^\s*:\s*/,!1))&&(k.state.fatArrowAt=k.stream.pos+n[0].length),E(ct))):"number"==t||"string"==t?(k.marked=a?"property":k.style+" property",E(ct)):"jsonld-keyword"==t?E(ct):u&&L(e)?(k.marked="keyword",E(at)):"["==t?E($,ft,B("]"),ct):"spread"==t?E(q,ct):"*"==e?(k.marked="keyword",E(at)):":"==t?P(ct):void 0;var n}function lt(t){return"variable"!=t?P(ct):(k.marked="property",E(Vt))}function ct(t){return":"==t?E(q):"("==t?P(Vt):void 0}function ut(t,e,n){function o(r,i){if(n?n.indexOf(r)>-1:","==r){var s=k.state.lexical;return"call"==s.info&&(s.pos=(s.pos||0)+1),E((function(n,o){return n==e||o==e?P():P(t)}),o)}return r==e||i==e?E():n&&n.indexOf(";")>-1?P(t):E(B(e))}return function(n,r){return n==e||r==e?E():P(t,o)}}function pt(t,e,n){for(var o=3;o"),yt):"quasi"==t?P(wt,St):void 0}function mt(t){if("=>"==t)return E(yt)}function bt(t){return t.match(/[\}\)\]]/)?E():","==t||";"==t?E(bt):P(_t,bt)}function _t(t,e){return"variable"==t||"keyword"==k.style?(k.marked="property",E(_t)):"?"==e||"number"==t||"string"==t?E(_t):":"==t?E(yt):"["==t?E(B("variable"),ht,B("]"),_t):"("==t?P(Rt,_t):t.match(/[;\}\)\],]/)?void 0:E()}function wt(t,e){return"quasi"!=t?P():"${"!=e.slice(e.length-2)?E(wt):E(yt,xt)}function xt(t){if("}"==t)return k.marked="string-2",k.state.tokenize=_,E(wt)}function Ct(t,e){return"variable"==t&&k.stream.match(/^\s*[?:]/,!1)||"?"==e?E(Ct):":"==t?E(yt):"spread"==t?E(Ct):P(yt)}function St(t,e){return"<"==e?E(H(">"),ut(yt,">"),z,St):"|"==e||"."==t||"&"==e?E(yt):"["==t?E(yt,B("]"),St):"extends"==e||"implements"==e?(k.marked="keyword",E(yt)):"?"==e?E(yt,B(":"),yt):void 0}function Ot(t,e){if("<"==e)return E(H(">"),ut(yt,">"),z,St)}function Tt(){return P(yt,kt)}function kt(t,e){if("="==e)return E(yt)}function Pt(t,e){return"enum"==e?(k.marked="keyword",E(ee)):P(Et,ft,Mt,Lt)}function Et(t,e){return u&&L(e)?(k.marked="keyword",E(Et)):"variable"==t?(j(e),E()):"spread"==t?E(Et):"["==t?pt(jt,"]"):"{"==t?pt(At,"}"):void 0}function At(t,e){return"variable"!=t||k.stream.match(/^\s*:/,!1)?("variable"==t&&(k.marked="property"),"spread"==t?E(Et):"}"==t?P():"["==t?E($,B(']'),B(':'),At):E(B(":"),Et,Mt)):(j(e),E(Mt))}function jt(){return P(Et,Mt)}function Mt(t,e){if("="==e)return E(q)}function Lt(t){if(","==t)return E(Pt)}function Dt(t,e){if("keyword b"==t&&"else"==e)return E(H("form","else"),U,z)}function Nt(t,e){return"await"==e?E(Nt):"("==t?E(H(")"),It,z):void 0}function It(t){return"var"==t?E(Pt,Ft):"variable"==t?E(Ft):P(Ft)}function Ft(t,e){return")"==t?E():";"==t?E(Ft):"in"==e||"of"==e?(k.marked="keyword",E($,Ft)):P($,Ft)}function Vt(t,e){return"*"==e?(k.marked="keyword",E(Vt)):"variable"==t?(j(e),E(Vt)):"("==t?E(F,H(")"),ut(zt,")"),z,gt,U,R):u&&"<"==e?E(H(">"),ut(Tt,">"),z,Vt):void 0}function Rt(t,e){return"*"==e?(k.marked="keyword",E(Rt)):"variable"==t?(j(e),E(Rt)):"("==t?E(F,H(")"),ut(zt,")"),z,gt,R):u&&"<"==e?E(H(">"),ut(Tt,">"),z,Rt):void 0}function Ht(t,e){return"keyword"==t||"variable"==t?(k.marked="type",E(Ht)):"<"==e?E(H(">"),ut(Tt,">"),z):void 0}function zt(t,e){return"@"==e&&E($,zt),"spread"==t?E(zt):u&&L(e)?(k.marked="keyword",E(zt)):u&&"this"==t?E(ft,Mt):P(Et,ft,Mt)}function Bt(t,e){return"variable"==t?Ut(t,e):Wt(t,e)}function Ut(t,e){if("variable"==t)return j(e),E(Wt)}function Wt(t,e){return"<"==e?E(H(">"),ut(Tt,">"),z,Wt):"extends"==e||"implements"==e||u&&","==t?("implements"==e&&(k.marked="keyword"),E(u?yt:$,Wt)):"{"==t?E(H("}"),$t,z):void 0}function $t(t,e){return"async"==t||"variable"==t&&("static"==e||"get"==e||"set"==e||u&&L(e))&&k.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(k.marked="keyword",E($t)):"variable"==t||"keyword"==k.style?(k.marked="property",E(qt,$t)):"number"==t||"string"==t?E(qt,$t):"["==t?E($,ft,B("]"),qt,$t):"*"==e?(k.marked="keyword",E($t)):u&&"("==t?P(Rt,$t):";"==t||","==t?E($t):"}"==t?E():"@"==e?E($,$t):void 0}function qt(t,e){if("!"==e)return E(qt);if("?"==e)return E(qt);if(":"==t)return E(yt,Mt);if("="==e)return E(q);var n=k.state.lexical.prev;return P(n&&"interface"==n.info?Rt:Vt)}function Gt(t,e){return"*"==e?(k.marked="keyword",E(Qt,B(";"))):"default"==e?(k.marked="keyword",E($,B(";"))):"{"==t?E(ut(Kt,"}"),Qt,B(";")):P(U)}function Kt(t,e){return"as"==e?(k.marked="keyword",E(B("variable"))):"variable"==t?P(q,Kt):void 0}function Yt(t){return"string"==t?E():"("==t?P($):"."==t?P(X):P(Xt,Jt,Qt)}function Xt(t,e){return"{"==t?pt(Xt,"}"):("variable"==t&&j(e),"*"==e&&(k.marked="keyword"),E(Zt))}function Jt(t){if(","==t)return E(Xt,Jt)}function Zt(t,e){if("as"==e)return k.marked="keyword",E(Xt)}function Qt(t,e){if("from"==e)return k.marked="keyword",E($)}function te(t){return"]"==t?E():P(ut(q,"]"))}function ee(){return P(H("form"),Et,B("{"),H("}"),ut(ne,"}"),z,z)}function ne(){return P(Et,Mt)}function oe(t,e){return"operator"==t.lastType||","==t.lastType||f.test(e.charAt(0))||/[,.]/.test(e.charAt(0))}function re(t,e,n){return e.tokenize==y&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(e.lastType)||"quasi"==e.lastType&&/\{\s*$/.test(t.string.slice(0,t.pos-(n||0)))}return F.lex=V.lex=!0,R.lex=!0,z.lex=!0,{startState:function(t){var e={tokenize:y,lastType:"sof",cc:[],lexical:new S((t||0)-i,0,"block",!1),localVars:n.localVars,context:n.localVars&&new D(null,null,!1),indented:t||0};return n.globalVars&&"object"==typeof n.globalVars&&(e.globalVars=n.globalVars),e},token:function(t,e){if(t.sol()&&(e.lexical.hasOwnProperty("align")||(e.lexical.align=!1),e.indented=t.indentation(),x(t,e)),e.tokenize!=b&&t.eatSpace())return null;var n=e.tokenize(t,e);return"comment"==o?n:(e.lastType="operator"!=o||"++"!=r&&"--"!=r?o:"incdec",T(e,n,o,r,t))},indent:function(e,o){if(e.tokenize==b||e.tokenize==_)return t.Pass;if(e.tokenize!=y)return 0;var r,a=o&&o.charAt(0),l=e.lexical;if(!/^\s*else\b/.test(o))for(var c=e.cc.length-1;c>=0;--c){var u=e.cc[c];if(u==z)l=l.prev;else if(u!=Dt&&u!=R)break}for(;("stat"==l.type||"form"==l.type)&&("}"==a||(r=e.cc[e.cc.length-1])&&(r==X||r==J)&&!/^[,\.=+\-*:?[\(]/.test(o));)l=l.prev;s&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var p=l.type,d=a==p;return"vardef"==p?l.indented+("operator"==e.lastType||","==e.lastType?l.info.length+1:0):"form"==p&&"{"==a?l.indented:"form"==p?l.indented+i:"stat"==p?l.indented+(oe(e,o)?s||i:0):"switch"!=l.info||d||0==n.doubleIndentSwitch?l.align?l.column+(d?0:1):l.indented+(d?0:i):l.indented+(/^(?:case|default)\b/.test(o)?i:2*i)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:l?null:"/*",blockCommentEnd:l?null:"*/",blockCommentContinue:l?null:" * ",lineComment:l?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:l?"json":"javascript",jsonldMode:a,jsonMode:l,expressionAllowed:re,skipExpression:function(e){T(e,"atom","atom","true",new t.StringStream("",2,null))}}})),t.registerHelper("wordChars","javascript",/[\w$]/),t.defineMIME("text/javascript","javascript"),t.defineMIME("text/ecmascript","javascript"),t.defineMIME("application/javascript","javascript"),t.defineMIME("application/x-javascript","javascript"),t.defineMIME("application/ecmascript","javascript"),t.defineMIME("application/json",{name:"javascript",json:!0}),t.defineMIME("application/x-json",{name:"javascript",json:!0}),t.defineMIME("application/manifest+json",{name:"javascript",json:!0}),t.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),t.defineMIME("text/typescript",{name:"javascript",typescript:!0}),t.defineMIME("application/typescript",{name:"javascript",typescript:!0})}(n(631))},589:(t,e,n)=>{1&&function(t){"use strict";var e={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};t.defineMode("xml",(function(o,r){var i,s,a=o.indentUnit,l={},c=r.htmlMode?e:n;for(var u in c)l[u]=c[u];for(var u in r)l[u]=r[u];function p(t,e){function n(n){return e.tokenize=n,n(t,e)}var o=t.next();return"<"==o?t.eat("!")?t.eat("[")?t.match("CDATA[")?n(h("atom","]]>")):null:t.match("--")?n(h("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),n(g(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),e.tokenize=h("meta","?>"),"meta"):(i=t.eat("/")?"closeTag":"openTag",e.tokenize=d,"tag bracket"):"&"==o?(t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"))?"atom":"error":(t.eatWhile(/[^&<]/),null)}function d(t,e){var n=t.next();if(">"==n||"/"==n&&t.eat(">"))return e.tokenize=p,i=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return i="equals",null;if("<"==n){e.tokenize=p,e.state=_,e.tagName=e.tagStart=null;var o=e.tokenize(t,e);return o?o+" tag error":"tag error"}return/[\'\"]/.test(n)?(e.tokenize=f(n),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function f(t){var e=function(e,n){for(;!e.eol();)if(e.next()==t){n.tokenize=d;break}return"string"};return e.isInAttribute=!0,e}function h(t,e){return function(n,o){for(;!n.eol();){if(n.match(e)){o.tokenize=p;break}n.next()}return t}}function g(t){return function(e,n){for(var o;null!=(o=e.next());){if("<"==o)return n.tokenize=g(t+1),n.tokenize(e,n);if(">"==o){if(1==t){n.tokenize=p;break}return n.tokenize=g(t-1),n.tokenize(e,n)}}return"meta"}}function v(t){return t&&t.toLowerCase()}function y(t,e,n){this.prev=t.context,this.tagName=e||"",this.indent=t.indented,this.startOfLine=n,(l.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function m(t){t.context&&(t.context=t.context.prev)}function b(t,e){for(var n;1;){if(!t.context)return;if(n=t.context.tagName,!l.contextGrabbers.hasOwnProperty(v(n))||!l.contextGrabbers[v(n)].hasOwnProperty(v(e)))return;m(t)}}function _(t,e,n){return"openTag"==t?(n.tagStart=e.column(),w):"closeTag"==t?x:_}function w(t,e,n){return"word"==t?(n.tagName=e.current(),s="tag",O):l.allowMissingTagName&&"endTag"==t?(s="tag bracket",O(t,e,n)):(s="error",w)}function x(t,e,n){if("word"==t){var o=e.current();return n.context&&n.context.tagName!=o&&l.implicitlyClosed.hasOwnProperty(v(n.context.tagName))&&m(n),n.context&&n.context.tagName==o||!1===l.matchClosing?(s="tag",C):(s="tag error",S)}return l.allowMissingTagName&&"endTag"==t?(s="tag bracket",C(t,e,n)):(s="error",S)}function C(t,e,n){return"endTag"!=t?(s="error",C):(m(n),_)}function S(t,e,n){return s="error",C(t,e,n)}function O(t,e,n){if("word"==t)return s="attribute",T;if("endTag"==t||"selfcloseTag"==t){var o=n.tagName,r=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==t||l.autoSelfClosers.hasOwnProperty(v(o))?b(n,o):(b(n,o),n.context=new y(n,o,r==n.indented)),_}return s="error",O}function T(t,e,n){return"equals"==t?k:(l.allowMissing||(s="error"),O(t,e,n))}function k(t,e,n){return"string"==t?P:"word"==t&&l.allowUnquoted?(s="string",O):(s="error",O(t,e,n))}function P(t,e,n){return"string"==t?P:O(t,e,n)}return p.isInText=!0,{startState:function(t){var e={tokenize:p,state:_,indented:t||0,tagName:null,tagStart:null,context:null};return null!=t&&(e.baseIndent=t),e},token:function(t,e){if(!e.tagName&&t.sol()&&(e.indented=t.indentation()),t.eatSpace())return null;i=null;var n=e.tokenize(t,e);return(n||i)&&"comment"!=n&&(s=null,e.state=e.state(i||n,t,e),s&&(n="error"==s?n+" error":s)),n},indent:function(e,n,o){var r=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+a;if(r&&r.noIndent)return t.Pass;if(e.tokenize!=d&&e.tokenize!=p)return o?o.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==l.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+a*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(t){t.state==k&&(t.state=O)},xmlCurrentTag:function(t){return t.tagName?{name:t.tagName,close:"closeTag"==t.type}:null},xmlCurrentContext:function(t){for(var e=[],n=t.context;n;n=n.prev)e.push(n.tagName);return e.reverse()}}})),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})}(n(631))},858:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>o});const o={run:function(t){t.DomComponents.clear(),t.CssComposer.clear()}}},884:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>s});var o=n(50),r=n(163),i=n(668);const s={run:function(t){(0,o.bindAll)(this,'onKeyUp','enableDragger','disableDragger'),this.editor=t,this.canvasModel=this.canvas.getCanvasView().model,this.toggleMove(1)},stop:function(t){this.toggleMove(),this.disableDragger()},onKeyUp:function(t){' '===(0,r.getKeyChar)(t)&&this.editor.stopCommand(this.id)},enableDragger:function(t){this.toggleDragger(1,t)},disableDragger:function(t){this.toggleDragger(0,t)},toggleDragger:function(t,e){var n=this.canvasModel,o=this.em,r=this.dragger,s=t?'add':'remove';this.getCanvas().classList[s]("".concat(this.ppfx,"is__grabbing")),r||(r=new i.Z({getPosition:function(){return{x:n.get('x'),y:n.get('y')}},setPosition:function(t){var e=t.x,o=t.y;n.set({x:e,y:o})},onStart:function(t,e){o.trigger('canvas:move:start',e)},onDrag:function(t,e){o.trigger('canvas:move',e)},onEnd:function(t,e){o.trigger('canvas:move:end',e)}}),this.dragger=r),t?r.start(e):r.stop()},toggleMove:function(t){var e=this.ppfx,n=t?'add':'remove',o=t?'on':'off',i={on:r.on,off:r.off},s=this.getCanvas(),a=["".concat(e,"is__grab")];!t&&a.push("".concat(e,"is__grabbing")),a.forEach((function(t){return s.classList[n](t)})),i[o](document,'keyup',this.onKeyUp),i[o](s,'mousedown',this.enableDragger),i[o](document,'mouseup',this.disableDragger)}}},790:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>a,defineCommand:()=>s});var o,r=n(346),i=void 0&&(void 0).__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function s(t){return t}const a=function(t){function e(e){var n=t.call(this,0)||this;n.config=e||{},n.em=n.config.em||{};var o=n.config.stylePrefix;return n.pfx=o,n.ppfx=n.config.pStylePrefix,n.hoverClass="".concat(o,"hover"),n.badgeClass="".concat(o,"badge"),n.plhClass="".concat(o,"placeholder"),n.freezClass="".concat(n.ppfx,"freezed"),n.canvas=n.em.Canvas,n.init(n.config),n}return i(e,t),e.prototype.onFrameScroll=function(t){},e.prototype.getCanvas=function(){return this.canvas.getElement()},e.prototype.getCanvasBody=function(){return this.canvas.getBody()},e.prototype.getCanvasTools=function(){return this.canvas.getToolsEl()},e.prototype.offset=function(t){var e=t.getBoundingClientRect();return{top:e.top+t.ownerDocument.body.scrollTop,left:e.left+t.ownerDocument.body.scrollLeft}},e.prototype.init=function(t){},e.prototype.callRun=function(t,e){void 0===e&&(e={});var n=this.id;if(t.trigger("run:".concat(n,":before"),e),!e||!e.abort){var o=e.sender||t,r=this.run(t,o,e);return t.trigger("run:".concat(n),r,e),t.trigger('run',n,r,e),r}t.trigger("abort:".concat(n),e)},e.prototype.callStop=function(t,e){void 0===e&&(e={});var n=this.id,o=e.sender||t;t.trigger("stop:".concat(n,":before"),e);var r=this.stop(t,o,e);return t.trigger("stop:".concat(n),r,e),t.trigger('stop',n,r,e),r},e.prototype.stopCommand=function(t){this.em.Commands.stop(this.id,t)},e.prototype.run=function(t,e,n){},e.prototype.stop=function(t,e,n){},e}(r.Hn)},180:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>i});var o=n(50),r=void 0&&(void 0).__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var o,r=0,i=e.length;r{"use strict";n.r(e),n.d(e,{default:()=>a});var o=n(50),r=n(668),i=void 0&&(void 0).__assign||function(){return i=Object.assign||function(t){for(var e,n=1,o=arguments.length;n\n
\n ");(e=document.createElement('div')).className="".concat(a,"guides"),l.className="".concat(a,"guide-info ").concat(a,"guide-info__x"),c.className="".concat(a,"guide-info ").concat(a,"guide-info__y"),l.innerHTML=u,c.innerHTML=u,e.appendChild(l),e.appendChild(c),r.Canvas.getGlobalToolsEl().appendChild(e),this.guidesEl=e,this.elGuideInfoX=l,this.elGuideInfoY=c,this.elGuideInfoContentX=l.querySelector(".".concat(a,"guide-info__content")),this.elGuideInfoContentY=c.querySelector(".".concat(a,"guide-info__content")),i.on('canvas:update frame:scroll',(0,o.debounce)((function(){var e;t.updateGuides(),s.debug&&(null===(e=t.guides)||void 0===e||e.forEach((function(e){return t.renderGuide(e)})))}),200))}return e},getGuidesStatic:function(){var t=this,e=[],n=this.target.getEl(),r=n.parentNode,i=void 0===r?{}:r;return(0,o.each)(i.children,(function(o){return e=e.concat(n!==o?t.getElementGuides(o):[])})),e.concat(this.getElementGuides(i))},getGuidesTarget:function(){return this.getElementGuides(this.target.getEl())},updateGuides:function(t){var e,n,r=this;(t||this.guides).forEach((function(t){var i=t.origin,s=e===i?n:r.getElementPos(i);e=i,n=s,(0,o.each)(r.getGuidePosUpdate(t,s),(function(e,n){return t[n]=e})),t.originRect=s}))},getGuidePosUpdate:function(t,e){var n={},o=e.top,r=e.height,i=e.left,s=e.width;switch(t.type){case't':n.y=o;break;case'b':n.y=o+r;break;case'l':n.x=i;break;case'r':n.x=i+s;break;case'x':n.x=i+s/2;break;case'y':n.y=o+r/2}return n},renderGuide:function(t){void 0===t&&(t={});var e=t.guide||document.createElement('div'),n='px',o=t.active?2:1,r=e.children[0];return e.style="position: absolute; background-color: ".concat(t.active?'green':'red',";"),e.children.length||((r=document.createElement('div')).style='position: absolute; color: red; padding: 5px; top: 0; left: 0;',e.appendChild(r)),t.y?(e.style.width='100%',e.style.height="".concat(o).concat(n),e.style.top="".concat(t.y).concat(n),e.style.left=0):(e.style.width="".concat(o).concat(n),e.style.height='100%',e.style.left="".concat(t.x).concat(n),e.style.top="0".concat(n)),!t.guide&&this.guidesContainer.appendChild(e),e},getElementPos:function(t){return this.editor.Canvas.getElementPos(t,{noScroll:1})},getElementGuides:function(t){var e=this,n=this.opts,o=this.getElementPos(t),r=o.top,s=o.height,a=o.left,l=o.width,c=[{type:'t',y:r},{type:'b',y:r+s},{type:'l',x:a},{type:'r',x:a+l},{type:'x',x:a+l/2},{type:'y',y:r+s/2}].map((function(r){return i(i({},r),{origin:t,originRect:o,guide:n.debug&&e.renderGuide(r)})}));return c.forEach((function(t){var n;return null===(n=e.guides)||void 0===n?void 0:n.push(t)})),c},getTranslate:function(t,e){void 0===e&&(e='x');var n=0;return(t||'').split(' ').forEach((function(t){var o=t.trim(),r="translate".concat(e.toUpperCase(),"(");0===o.indexOf(r)&&(n=parseFloat(o.replace(r,'')))})),n},setTranslate:function(t,e,n){var o="translate".concat(e.toUpperCase(),"("),r="".concat(o).concat(n,")"),i=(t||'').split(' ').map((function(t){return 0===t.trim().indexOf(o)&&(t=r),t})).join(' ');return i.indexOf(o)<0&&(i+=" ".concat(r)),i},getPosition:function(){var t=this.target,e=this.isTran,n=t.getStyle(),o=n.left,r=n.top,i=n.transform,s=0,a=0;return e?(s=this.getTranslate(i),a=this.getTranslate(i,'y')):(s=parseFloat(o||0),a=parseFloat(r||0)),{x:s,y:a}},setPosition:function(t){var e=t.x,n=t.y,r=t.end,i=t.position,s=t.width,a=t.height,l=this,c=l.target,u=l.isTran,p=l.em,d='px',f=!r,h="".concat(parseInt(e,10)).concat(d),g="".concat(parseInt(n,10)).concat(d),v={};if(u){var y=c.getStyle()['transform']||'';y=this.setTranslate(y,'x',h),v={transform:y=this.setTranslate(y,'y',g),__p:f},c.addStyle(v,{avoidStore:!r})}else{var m={position:i,width:s,height:a},b={left:h,top:g,__p:f};(0,o.keys)(m).forEach((function(t){var e=m[t];e&&(b[t]=e)})),v=b,c.addStyle(v,{avoidStore:!r})}null==p||p.Styles.__emitCmpStyleUpdate(v,{components:p.getSelected()})},_getDragData:function(){var t=this.target;return{target:t,parent:t.parent(),index:t.index()}},onStart:function(t){var e=this,n=e.target,o=e.editor,r=e.isTran,i=e.opts,s=i.center,a=i.onStart,l=o.Canvas,c=n.getStyle(),u='absolute',p=[u,'relative'];if(a&&a(this._getDragData()),!r&&c.position!==u){var d=l.offset(n.getEl()),f=d.left,h=d.top,g=d.width,v=d.height,y=n.parent(),m=void 0;do{var b=y.getStyle();m=p.indexOf(b.position)>=0?y:null,y=y.parent()}while(y&&!m);if(s){var _=l.getMouseRelativeCanvas(t);f=_.x,h=_.y}else if(m){var w=l.offset(m.getEl());f-=w.left,h-=w.top}this.setPosition({x:f,y:h,width:"".concat(g,"px"),height:"".concat(v,"px"),position:u})}},onDrag:function(){for(var t=this,e=[],n=0;n0})).sort((function(t,e){return t.gap-e.gap})).map((function(t){return t.guide}))[0];if(m){var b=m.originRect,_=b.left,w=b.width,x=b.top,C=b.height,S=b.rect,O=u?_{"use strict";n.r(e),n.d(e,{default:()=>o});const o={run:function(t){if(t.Canvas.hasFocus()){var e=[];t.getSelectedAll().forEach((function(t){var n=t.components(),o=n&&n.filter((function(t){return t.get('selectable')}))[0];o&&e.push(o)})),e.length&&t.select(e)}}}},368:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>o});const o={run:function(t,e,n){if(void 0===n&&(n={}),t.Canvas.hasFocus()||n.force){var o=[];t.getSelectedAll().forEach((function(t){for(var e=t.parent();e&&!e.get('selectable');)e=e.parent();e&&o.push(e)})),o.length&&t.select(o)}}}},243:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>o});const o={run:function(t){if(t.Canvas.hasFocus()){var e=[];t.getSelectedAll().forEach((function(t){var n=t.parent();if(n){var o,r=n.components().length,i=0,s=0;do{i++,o=(s=t.index()+i)<=r?n.getChildAt(s):null}while(o&&!o.get('selectable'));e.push(o||t)}})),e.length&&t.select(e)}}}},400:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>o});const o={run:function(t){if(t.Canvas.hasFocus()){var e=[];t.getSelectedAll().forEach((function(t){var n=t.parent();if(n){var o,r=0,i=0;do{r++,o=(i=t.index()-r)>=0?n.getChildAt(i):null}while(o&&!o.get('selectable'));e.push(o||t)}})),e.length&&t.select(e)}}}},910:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});var o=n(50);const r={run:function(t,e,n){void 0===n&&(n={});var r=n.target,i=[];if(!r.get('styles'))return i;var s=r.get('type'),a=t.Pages.getAllWrappers();if(!(0,o.flatten)(a.map((function(t){return t.findType(s)}))).length){var l=t.CssComposer.getAll();i=l.filter((function(t){return t.get('group')==="cmp:".concat(s)})),l.remove(i)}return i}}},744:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});var o=void 0&&(void 0).__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var o,r=0,i=e.length;r{"use strict";n.r(e),n.d(e,{default:()=>s});var o=n(50),r=n(895),i=n(407);const s=(0,o.extend)({},i["default"],{init:function(){(0,o.bindAll)(this,'startDelete','stopDelete','onDelete'),this.hoverClass=this.pfx+'hover-delete',this.badgeClass=this.pfx+'badge-red'},enable:function(){this.$el.find('*').mouseover(this.startDelete).mouseout(this.stopDelete).click(this.onDelete)},startDelete:function(t){t.stopPropagation();var e=(0,r["default"])(t.target);e.data('model').get('removable')&&(e.addClass(this.hoverClass),this.attachBadge(e.get(0)))},stopDelete:function(t){t.stopPropagation(),(0,r["default"])(t.target).removeClass(this.hoverClass),this.badge&&this.badge.css({left:-1e3,top:-1e3})},onDelete:function(t){t.stopPropagation();var e=(0,r["default"])(t.target);e.data('model').get('removable')&&(e.data('model').destroy(),this.removeBadge(),this.clean())},updateBadgeLabel:function(t){this.badge.html('Remove '+t.getName())}})},457:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});var o=n(895);const r={run:function(t,e,n){var r=this;void 0===n&&(n={}),e&&e.set&&e.set('active',0);var i=t.getConfig(),s=t.Modal,a=i.stylePrefix;if(this.cm=t.CodeManager||null,!this.$editors){var l=this.buildEditor('htmlmixed','hopscotch','HTML'),c=this.buildEditor('css','hopscotch','CSS');this.htmlEditor=l.el,this.cssEditor=c.el;var u=(0,o["default"])("
"));u.append(l.$el).append(c.$el),this.$editors=u}s.open({title:i.textViewCode,content:this.$editors}).getModel().once('change:open',(function(){return t.stopCommand("".concat(r.id))})),this.htmlEditor.setContent(t.getHtml(n.optsHtml)),this.cssEditor.setContent(t.getCss(n.optsCss))},stop:function(t){var e=t.Modal;e&&e.close()},buildEditor:function(t,e,n){var o=document.createElement('textarea');!this.codeMirror&&(this.codeMirror=this.cm.getViewer('CodeMirror'));var r=this.codeMirror.clone().set({label:n,codeName:t,theme:e,input:o}),i=new this.cm.EditorView({model:r,config:this.cm.getConfig()}).render().$el;return r.init(o),{el:r,$el:i}}}},975:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});var o=n(50);const r={isEnabled:function(){var t=document;return!!(t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement)},enable:function(t){var e='';return t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?(e='webkit',t.webkitRequestFullscreen()):t.mozRequestFullScreen?(e='moz',t.mozRequestFullScreen()):t.msRequestFullscreen&&t.msRequestFullscreen(),e},disable:function(){var t=document;this.isEnabled()&&(t.exitFullscreen?t.exitFullscreen():t.webkitExitFullscreen?t.webkitExitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():t.msExitFullscreen&&t.msExitFullscreen())},fsChanged:function(t){this.isEnabled()||(this.stopCommand({sender:this.sender}),document.removeEventListener("".concat(t||'',"fullscreenchange"),this.fsChanged))},run:function(t,e,n){void 0===n&&(n={}),this.sender=e;var r=n.target,i=(0,o.isElement)(r)?r:document.querySelector(r),s=this.enable(i||t.getContainer());this.fsChanged=this.fsChanged.bind(this,s),document.addEventListener(s+'fullscreenchange',this.fsChanged),t.trigger('change:canvasOffset')},stop:function(t,e){e&&e.set&&e.set('active',!1),this.disable(),t&&t.trigger('change:canvasOffset')}}},191:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>l});var o=n(50),r=n(895),i=n(163),s=n(407),a=n(189);const l=(0,o.extend)({},a["default"],s["default"],{init:function(t){s["default"].init.apply(this,arguments),(0,o.bindAll)(this,'initSorter','rollback','onEndMove'),this.opt=t,this.hoverClass=this.ppfx+'highlighter-warning',this.badgeClass=this.ppfx+'badge-warning',this.noSelClass=this.ppfx+'no-select'},enable:function(){for(var t=[],e=0;e{"use strict";n.r(e),n.d(e,{default:()=>i});var o=n(50),r=n(491);const i={open:function(t){var e=this,n=this,r=n.editor,i=n.title,s=n.config,a=n.am,l=s.custom;if((0,o.isFunction)(l.open))return l.open(a.__customData());r.Modal.open({title:i,content:t}).onceClose((function(){return r.stopCommand(e.id)}))},close:function(){var t=this.config.custom;if((0,o.isFunction)(t.close))return t.close(this.am.__customData());var e=this.editor.Modal;e&&e.close()},run:function(t,e,n){void 0===n&&(n={});var o=t.AssetManager,i=o.getConfig(),s=n.types,a=void 0===s?[]:s,l=n.accept,c=n.select;if(this.title=n.modalTitle||t.t('assetManager.modalTitle')||'',this.editor=t,this.config=i,this.am=o,o.setTarget(n.target),o.onClick(n.onClick),o.onDblClick(n.onDblClick),o.onSelect(n.onSelect),o.__behaviour({select:c,types:a,options:n}),i.custom)this.rendered=this.rendered||(0,r.ut)('div'),this.rendered.className="".concat(i.stylePrefix,"custom-wrp"),o.__behaviour({container:this.rendered}),o.__trgCustom();else{if(!this.rendered||a){var u=o.getAll().filter((function(t){return t}));a&&a.length&&(u=u.filter((function(t){return-1!==a.indexOf(t.get('type'))}))),o.render(u),this.rendered=o.getContainer()}if(l){var p=this.rendered.querySelector("input#".concat(i.stylePrefix,"uploadFile"));p&&p.setAttribute('accept',l)}}return this.open(this.rendered),this},stop:function(t){this.editor=t,this.close(this.rendered)}}},117:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>i});var o=n(50),r=n(491);const i={open:function(){var t=this,e=t.container,n=t.editor,r=t.bm,i=t.config,s=i.custom,a=i.appendTo;if((0,o.isFunction)(s.open))return s.open(r.__customData());if(this.firstRender&&!a){var l='views-container',c=n.Panels;(c.getPanel(l)||c.addPanel({id:l})).set('appendContent',e).trigger('change:appendContent'),s||e.appendChild(r.render())}e&&(e.style.display='block')},close:function(){var t=this.container,e=this.config.custom;if((0,o.isFunction)(e.close))return e.close(this.bm.__customData());t&&(t.style.display='none')},run:function(t){var e=t.Blocks;this.config=e.getConfig(),this.firstRender=!this.container,this.container=this.container||(0,r.ut)('div'),this.editor=t,this.bm=e;var n=this.container;e.__behaviour({container:n}),this.config.custom&&e.__trgCustom(),this.open()},stop:function(){this.close()}}},614:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>o});const o={run:function(t){var e=t.LayerManager,n=t.Panels,o=e.getConfig();if(!o.appendTo){if(!this.layers){var r='views-container',i=document.createElement('div'),s=n.getPanel(r)||n.addPanel({id:r});o.custom?e.__trgCustom({container:i}):i.appendChild(e.render()),s.set('appendContent',i).trigger('change:appendContent'),this.layers=i}this.layers.style.display='block'}},stop:function(){var t=this.layers;t&&(t.style.display='none')}}},801:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});var o=n(895);const r={run:function(t,e){if(this.sender=e,!this.$cn){var n=t.getConfig(),r=t.Panels,i='change:appendContent';this.$cn=(0,o["default"])('
'),this.$cn2=(0,o["default"])('
'),this.$cn.append(this.$cn2);var s=t.DeviceManager;if(s&&n.showDevices){var a=r.addPanel({id:'devices-c'}),l=s.render();a.set('appendContent',l).trigger(i)}var c=t.SelectorManager;this.slm=c;var u=c.getConfig();u.custom?c.__trgCustom({container:this.$cn2.get(0)}):u.appendTo||this.$cn2.append(c.render([]));var p=t.StyleManager;this.sm=p;var d=p.getConfig(),f=d.stylePrefix;this.$header=(0,o["default"])("
").concat(t.t('styleManager.empty'),"
")),this.$cn.append(this.$header),d.custom?p.__trgCustom({container:this.$cn2.get(0)}):d.appendTo||this.$cn2.append(p.render());var h='views-container';this.panel=r.getPanel(h),this.panel||(this.panel=r.addPanel({id:h})),this.panel.set('appendContent',this.$cn).trigger(i),this.em=t.getModel(),this.listenTo(this.em,p.events.target,this.toggleSm)}this.toggleSm()},toggleSm:function(){var t,e,n,o,r=this.sender,i=this.sm;r&&r.get&&!r.get('active')||!i||(i.getSelected()?(null===(t=this.$cn2)||void 0===t||t.show(),null===(e=this.$header)||void 0===e||e.hide()):(null===(n=this.$cn2)||void 0===n||n.hide(),null===(o=this.$header)||void 0===o||o.show()))},stop:function(){var t,e;null===(t=this.$cn2)||void 0===t||t.hide(),null===(e=this.$header)||void 0===e||e.hide()}}},395:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});var o=n(895);const r={run:function(t,e){this.sender=e;var n,r=t.getModel(),i=t.Config.stylePrefix,s=t.TraitManager,a=s.getConfig();if(!a.appendTo){if(!this.$cn){this.$cn=(0,o["default"])('
'),this.$cn2=(0,o["default"])('
'),this.$cn.append(this.$cn2),this.$header=(0,o["default"])('
').append("
").concat(r.t('traitManager.empty'),"
")),this.$cn.append(this.$header),this.$cn2.append("
").concat(r.t('traitManager.label'),"
")),this.$cn2.append(s.render());var l=t.Panels;null==(n=l.getPanel('views-container')?l.getPanel('views-container'):l.addPanel({id:'views-container'}))||n.set('appendContent',this.$cn.get(0)).trigger('change:appendContent'),this.target=t.getModel(),this.listenTo(this.target,'component:toggled',this.toggleTm)}this.toggleTm()}},toggleTm:function(){var t=this.sender;t&&t.get&&!t.get('active')||(1===this.target.getSelectedAll().length?(this.$cn2.show(),this.$header.hide()):(this.$cn2.hide(),this.$header.show()))},stop:function(){this.$cn2&&this.$cn2.hide(),this.$header&&this.$header.hide()}}},98:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});var o=n(50);const r={run:function(t,e,n){void 0===n&&(n={});var r=t.getModel().get('clipboard'),i=t.getSelected();r&&i&&(t.getSelectedAll().forEach((function(e){var i=e.collection;if(i){var s,a={at:e.index()+1,action:n.action||'paste-component'};if((0,o.contains)(r,e)&&e.get('copyable'))s=i.add(e.clone(),a);else{var l=r.filter((function(t){return t.get('copyable')})).filter((function(n){return t.Components.canMove(e.parent(),n).result}));s=i.add(l.map((function(t){return t.clone()})),a)}(s=(0,o.isArray)(s)?s:[s]).forEach((function(e){return t.trigger('component:paste',e)}))}})),i.emitUpdate())}}},129:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>s});var o=n(50),r=void 0&&(void 0).__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var o,r=0,i=e.length;r{"use strict";n.r(e),n.d(e,{default:()=>r});var o=void 0&&(void 0).__assign||function(){return o=Object.assign||function(t){for(var e,n=1,o=arguments.length;n{"use strict";n.r(e),n.d(e,{default:()=>C});var o,r=n(50),i=n(895),s=n(346),a=void 0&&(void 0).__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});const l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.defaults=function(){return{command:'',attributes:{}}},e}(s.Hn);var c=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e}(s.FE);const p=u;u.prototype.model=l;var d=n(330),f=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),h=void 0&&(void 0).__assign||function(){return h=Object.assign||function(t){for(var e,n=1,o=arguments.length;n").concat(l,"
"):'',"\n
").concat(r.getName(),"
");s.innerHTML=p?p(r):d}var f='px',h=s.style;h.display='block';var g=o.getTargetToElementFixed(t,s,{pos:e}).top,v=n.leftOff<0?-n.leftOff:0;h.top=g+f,h.left=v+f}},showHighlighter:function(t){this.canvas.getHighlighter(t).style.opacity=''},initResize:function(t){var e,n=this.em,o=this.canvas,i=null==n?void 0:n.Editor,s=(null==n?void 0:n.config).stylePrefix||'',a="".concat(s,"resizing"),l=!(0,r.isElement)(t)&&(0,w.isTaggableNode)(t)?t:n.getSelected(),c=l&&l.get('resizable'),u={},p=function(t,e,n){var o=n.docs;o&&o.forEach((function(e){var n=e.body,o=n.className||'';n.className=('add'==t?"".concat(o," ").concat(a):o.replace(a,'')).trim()}))};if(i&&c){var d=(0,r.isElement)(t)?t:l.getEl();u={onStart:function(t,r){void 0===r&&(r={});var i=r.el,s=r.config,a=r.resizer,c=s.keyHeight,u=s.keyWidth,d=s.currentUnit,f=s.keepAutoHeight,h=s.keepAutoWidth;p('add',0,r),e=n.Styles.getModelToStyle(l),o.toggleFramesEvents(!1);var g=getComputedStyle(i),v=e.getStyle(),y=v[u];s.autoWidth=h&&'auto'===y,isNaN(parseFloat(y))&&(y=g[u]);var m=v[c];s.autoHeight=f&&'auto'===m,isNaN(parseFloat(m))&&(m=g[c]),a.startDim.w=parseFloat(y),a.startDim.h=parseFloat(m),b=!1,d&&(s.unitHeight=(0,w.getUnitFromValue)(m),s.unitWidth=(0,w.getUnitFromValue)(y))},onMove:function(){i.trigger('component:resize')},onEnd:function(t,e){p('remove',0,e),i.trigger('component:resize'),o.toggleFramesEvents(!0),b=!0},updateTarget:function(t,r,i){if(void 0===i&&(i={}),e){var s=i.store,a=i.selectedHandler,c=i.config,u=c.keyHeight,p=c.keyWidth,d=c.autoHeight,f=c.autoWidth,h=c.unitWidth,g=c.unitHeight,v=['tc','bc'].indexOf(a)>=0,y=['cl','cr'].indexOf(a)>=0,m={};if(!v){var b=o.getBody().offsetWidth,_=r.w{"use strict";n.r(e),n.d(e,{default:()=>r});var o=n(895);const r={startSelectPosition:function(t,e,n){var o=this;void 0===n&&(n={}),this.isPointed=!1;var r=this.em.Utils,i=t.ownerDocument.body;r&&!this.sorter&&(this.sorter=new r.Sorter({container:i,placer:this.canvas.getPlacerEl(),containerSel:'*',itemSel:'*',pfx:this.ppfx,direction:'a',document:e,wmargin:1,nested:1,em:this.em,canvasRelative:1,scale:function(){return o.em.getZoomDecimal()}})),n.onStart&&(this.sorter.onStart=n.onStart),t&&this.sorter.startSort(t,{container:i})},getOffsetDim:function(){var t=this.offset(this.canvas.getFrameEl()),e=this.offset(this.canvas.getElement());return{top:t.top-e.top,left:t.left-e.left}},stopSelectPosition:function(){this.posTargetCollection=null,this.posIndex='after'==this.posMethod&&0!==this.cDim.length?this.posIndex+1:this.posIndex,this.sorter&&(this.sorter.moved=0,this.sorter.endMove()),this.cDim&&(this.posIsLastEl=0!==this.cDim.length&&'after'==this.posMethod&&this.posIndex==this.cDim.length,this.posTargetEl=0===this.cDim.length?(0,o["default"])(this.outsideElem):!this.posIsLastEl&&this.cDim[this.posIndex]?(0,o["default"])(this.cDim[this.posIndex][5]).parent():(0,o["default"])(this.outsideElem),this.posTargetModel=this.posTargetEl.data('model'),this.posTargetCollection=this.posTargetEl.data('model-comp'))},enable:function(){this.startSelectPosition()},nearFloat:function(t,e,n){var o=t||0,r=e||'before',i=n.length,s=0!==i&&'after'==r&&o==i;return 0!==i&&(!s&&!n[o][4]||n[o-1]&&!n[o-1][4]||s&&!n[o-1][4])?1:0},run:function(){this.enable()},stop:function(){this.stopSelectPosition(),this.$wrapper.css('cursor',''),this.$wrapper.unbind()}}},804:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>a});var o=n(50),r=n(895),i=n(163),s=void 0&&(void 0).__assign||function(){return s=Object.assign||function(t){for(var e,n=1,o=arguments.length;n")).get(0),A=(0,r["default"])("
")).get(0),j=g+P+'-el',M="".concat(g+k+'-el'," ").concat(g+k),L="".concat(j," ").concat(g+P);m=(0,r["default"])("
")).get(0),b=(0,r["default"])("
")).get(0),_=(0,r["default"])("
")).get(0),w=(0,r["default"])("
")).get(0),x=(0,r["default"])("
")).get(0),C=(0,r["default"])("
")).get(0),S=(0,r["default"])("
")).get(0),O=(0,r["default"])("
")).get(0),this['marginT'+l]=m,this['marginB'+l]=b,this['marginL'+l]=_,this['marginR'+l]=w,this['padT'+l]=x,this['padB'+l]=C,this['padL'+l]=S,this['padR'+l]=O,E.appendChild(m),E.appendChild(b),E.appendChild(_),E.appendChild(w),A.appendChild(x),A.appendChild(C),A.appendChild(S),A.appendChild(O),y.appendChild(E),y.appendChild(A),this[v]='1'}var D='px',N=parseFloat(h.marginLeft.replace(D,''))*u,I=parseFloat(h.marginRight.replace(D,''))*u,F=parseFloat(h.marginTop.replace(D,''))*u,V=parseFloat(h.marginBottom.replace(D,''))*u,R=m.style,H=b.style,z=_.style,B=w.style,U=x.style,W=C.style,$=S.style,q=O.style,G=parseFloat(f.left),K=parseFloat(h.width)*u+D;R.height=F+D,R.width=K,R.top=f.top-F+D,R.left=G+D,H.height=V+D,H.width=K,H.top=f.top+f.height+D,H.left=G+D;var Y=f.height+F+V+D,X=f.top-F+D;z.height=Y,z.width=N+D,z.top=X,z.left=G-N+D,B.height=Y,B.width=I+D,B.top=X,B.left=G+f.width+D;var J=parseFloat(h.paddingTop)*u;U.height=J+D;var Z=parseFloat(h.paddingBottom)*u;W.height=Z+D;var Q=f.height-Z-J+D,tt=f.top+J+D;$.height=Q,$.width=parseFloat(h.paddingLeft)*u+D,$.top=tt;var et=parseFloat(h.paddingRight)*u;q.height=Q,q.width=et+D,q.top=tt}},stop:function(t,e,n){void 0===n&&(n={});var o=(n||{}).state||'',r=this.getOffsetMethod(o);t.Canvas[r](n.view).style.opacity=0}}},434:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});var o=n(50);const r={init:function(){(0,o.bindAll)(this,'_onFramesChange')},run:function(t){this.toggleVis(t)},stop:function(t){this.toggleVis(t,0)},toggleVis:function(t,e){var n=this;if(void 0===e&&(e=1),!t.Commands.isActive('preview')){var o=t.Canvas,r=e?'on':'off';o.getFrames().forEach((function(t){return n._upFrame(t,e)})),o.getModel()[r]('change:frames',this._onFramesChange)}},_onFramesChange:function(t,e){var n=this;e.forEach((function(t){return t.once('loaded',(function(){return n._upFrame(t,!0)}))}))},_upFrame:function(t,e){var n,o=e?'add':'remove';null===(n=t.view)||void 0===n||n.getBody().classList[o]("".concat(this.ppfx,"dashed"))}}},346:(t,e,n)=>{"use strict";n.d(e,{FE:()=>l,G7:()=>c,Hn:()=>a});var o,r=n(316),i=n.n(r),s=void 0&&(void 0).__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e}(i().Model),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e}(i().Collection),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e}(i().View)},330:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var o,r=n(50),i=n(346),s=void 0&&(void 0).__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=function(t){function e(e,n,o){void 0===e&&(e={}),void 0===o&&(o=!1);var r=t.call(this,e)||this;return r.itemsView='',r.itemType='type',r.reuseView=!1,r.config=n||e.config||{},o&&r.listenTo(r.collection,'add',r.addTo),r.items=[],r}return s(e,t),e.prototype.addTo=function(t){this.add(t)},e.prototype.itemViewNotFound=function(t){var e=this.config,n=this.ns,o=e.em,r="".concat(n?"[".concat(n,"]: "):'',"'").concat(t,"' type not found");o&&o.logWarning(r)},e.prototype.add=function(t,e){var n,o=this,i=o.config,s=o.reuseView,a=o.items,l=this.itemsView||{},c=e||null,u=this.itemView,p=t.get(this.itemType);l[p]?u=l[p]:!p||l[p]||(0,r.includes)(['button','checkbox','color','date','datetime-local','email','file','hidden','image','month','number','password','radio','range','reset','search','submit','tel','text','time','url','week'],p)||this.itemViewNotFound(p),n=t.view&&s?t.view:new u({model:t,config:i},i),a&&a.push(n);var d=n.render().el;c?c.appendChild(d):this.$el.append(d)},e.prototype.render=function(){var t=document.createDocumentFragment();return this.clearItems(),this.$el.empty(),this.collection.length&&this.collection.each((function(e){this.add(e,t)}),this),this.$el.append(t),this.onRender(),this},e.prototype.onRender=function(){},e.prototype.onRemoveBefore=function(t,e){},e.prototype.onRemove=function(t,e){},e.prototype.remove=function(e){void 0===e&&(e={});var n=this.items;return this.onRemoveBefore(n,e),this.clearItems(),t.prototype.remove.call(this),this.onRemove(n,e),this},e.prototype.clearItems=function(){this.items},e}(i.G7);const l=a;a.prototype.itemView=''},668:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(50),r=n(163),i=void 0&&(void 0).__assign||function(){return i=Object.assign||function(t){for(var e,n=1,o=arguments.length;n=e&&t<=e+o||t<=e&&t>=e-o},t.prototype.setGuideLock=function(t,e){var n=(0,o.isUndefined)(t.x)?'Y':'X',r="trg".concat(n);return null!==e?(t.active=!0,t.lock=e,this[r]=t):(delete t.active,delete t.lock,delete this[r]),t},t.prototype.stop=function(t,e){void 0===e&&(e={});var n=this.delta,r=!!e.cancel,i=r?0:n.x,s=r?0:n.y;this.toggleDrag(),this.lockedAxis=null,this.move(i,s,!0);var a=this.opts.onEnd;(0,o.isFunction)(a)&&a(t,this,{cancelled:r})},t.prototype.keyHandle=function(t){(0,r.isEscKey)(t)&&this.stop(t,{cancel:!0})},t.prototype.move=function(t,e,n){var r=this.el,i=this.opts,s=this.startPosition;if(s){var a=i.setPosition,l=s.x+t,c=s.y+e;this.position={x:l,y:c,end:n},(0,o.isFunction)(a)&&a(this.position),r&&(r.style.left="".concat(l,"px"),r.style.top="".concat(c,"px"))}},t.prototype.getContainerEl=function(){var t=this.opts.container;return t?[t]:this.getDocumentEl()},t.prototype.getWindowEl=function(){return this.getContainerEl().map((function(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow}))},t.prototype.getDocumentEl=function(t){var e=this.opts.doc;if(t=t||this.el,!this.docs.length){var n=[document];t&&n.push(t.ownerDocument),e&&n.push(e),this.docs=n}return this.docs},t.prototype.getPointerPos=function(t){var e=this.opts.getPointerPosition,n=(0,r.getPointerEvent)(t);return e?e(t):{x:n.clientX,y:n.clientY}},t.prototype.getStartPosition=function(){var t=this.el,e=this.opts.getPosition,n={x:0,y:0};return(0,o.isFunction)(e)?n=e():t&&(n={x:parseFloat(t.style.left),y:parseFloat(t.style.top)}),n},t.prototype.getScrollInfo=function(){var t=this.opts.doc,e=t&&t.body;return{y:e?e.scrollTop:0,x:e?e.scrollLeft:0}},t.prototype.detectAxisLock=function(t,e){var n=t,o=e,r=Math.abs(n),i=Math.abs(o);return o>=r||o<=-r?'x':n>i||n<-i?'y':void 0},t}()},895:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>vt});var o='undefined'!=typeof document?document:null,r='undefined'!=typeof window?window:null,i=Array.prototype,s=i.filter,a=i.indexOf,l=i.map,c=i.push,u=i.reverse,p=i.slice,d=i.splice,f=/^#[\w-]*$/,h=/^\.[\w-]*$/,g=/<.+>/,v=/^\w+$/;function y(t,e){return void 0===e&&(e=o),h.test(t)?e.getElementsByClassName(t.slice(1)):v.test(t)?e.getElementsByTagName(t):e.querySelectorAll(t)}function m(t,e){if(void 0===e&&(e=o),t){if(t.__cash)return t;var n=t;if(P(t)){if(e.__cash&&(e=e[0]),!(n=f.test(t)?e.getElementById(t.slice(1)):g.test(t)?ft(t):y(t,e)))return}else if(k(t))return this.ready(t);(n.nodeType||n===r)&&(n=[n]),this.length=n.length;for(var i=0,s=this.length;i=0})):n.value=r}))},_.clone=function(){return this.map((function(t,e){return e.cloneNode(!0)}))},_.detach=function(){return this.each((function(t,e){e.parentNode&&e.parentNode.removeChild(e)}))};var ut,pt=/^\s*<(\w+)[^>]*>/,dt=/^\s*<(\w+)\s*\/?>(?:<\/\1>)?\s*$/;function ft(t){if(function(){if(!ut){var t=o.createElement('table'),e=o.createElement('tr');ut={'*':o.createElement('div'),tr:o.createElement('tbody'),td:e,th:e,thead:t,tbody:t,tfoot:t}}}(),!P(t))return[];if(dt.test(t))return[o.createElement(RegExp.$1)];var e=pt.test(t)&&RegExp.$1,n=ut[e]||ut['*'];return n.innerHTML=t,b(n.childNodes).detach().get()}function ht(t,e,n){if(void 0!==e){var o=P(e);!o&&e.length?S(e,(function(e){return ht(t,e,n)})):S(t,o?function(t){t.insertAdjacentHTML(n?'afterbegin':'beforeend',e)}:function(t,o){return function(t,e,n){n?t.insertBefore(e,t.childNodes[0]):t.appendChild(e)}(t,o?e.cloneNode(!0):e,n)})}}b.parseHTML=ft,_.empty=function(){var t=this[0];if(t)for(;t.firstChild;)t.removeChild(t.firstChild);return this},_.append=function(){var t=this;return S(arguments,(function(e){ht(t,e)})),this},_.appendTo=function(t){return ht(b(t),this),this},_.html=function(t){if(void 0===t)return this[0]&&this[0].innerHTML;var e=t.nodeType?t[0].outerHTML:t;return this.each((function(t,n){n.innerHTML=e}))},_.insertAfter=function(t){var e=this;return b(t).each((function(t,n){var o=n.parentNode;e.each((function(e,r){o.insertBefore(t?r.cloneNode(!0):r,n.nextSibling)}))})),this},_.after=function(){var t=this;return S(u.apply(arguments),(function(e){u.apply(b(e).slice()).insertAfter(t)})),this},_.insertBefore=function(t){var e=this;return b(t).each((function(t,n){var o=n.parentNode;e.each((function(e,r){o.insertBefore(t?r.cloneNode(!0):r,n)}))})),this},_.before=function(){var t=this;return S(arguments,(function(e){b(e).insertBefore(t)})),this},_.prepend=function(){var t=this;return S(arguments,(function(e){ht(t,e,!0)})),this},_.prependTo=function(t){return ht(b(t),u.apply(this.slice()),!0),this},_.remove=function(){return this.detach().off()},_.replaceWith=function(t){var e=this;return this.each((function(n,o){var r=o.parentNode;if(r){var i=n?b(t).clone():b(t);if(!i[0])return e.remove(),!1;r.replaceChild(i[0],o),b(i[0]).after(i.slice(1))}}))},_.replaceAll=function(t){return b(t).replaceWith(this),this},_.text=function(t){return void 0===t?this[0]?this[0].textContent:'':this.each((function(e,n){n.textContent=t}))};var gt=o&&o.documentElement;_.offset=function(){var t=this[0];if(t){var e=t.getBoundingClientRect();return{top:e.top+r.pageYOffset-gt.clientTop,left:e.left+r.pageXOffset-gt.clientLeft}}},_.offsetParent=function(){return b(this[0]&&this[0].offsetParent)},_.position=function(){var t=this[0];if(t)return{left:t.offsetLeft,top:t.offsetTop}},_.children=function(t){var e=[];return this.each((function(t,n){c.apply(e,n.children)})),e=b(D(e)),t?e.filter((function(e,n){return T(n,t)})):e},_.contents=function(){var t=[];return this.each((function(e,n){c.apply(t,'IFRAME'===n.tagName?[n.contentDocument]:n.childNodes)})),b(t.length&&D(t))},_.find=function(t){for(var e=[],n=0,o=this.length;n{"use strict";n.d(e,{$Q:()=>g,FW:()=>d,G1:()=>a,GX:()=>w,L_:()=>c,Mx:()=>l,R3:()=>v,SJ:()=>_,cx:()=>u,dL:()=>h,pn:()=>f,rw:()=>m,sE:()=>p,t3:()=>b,ut:()=>y});var o=n(50),r=void 0&&(void 0).__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var o,r=0,i=e.length;r=i?t.appendChild(e):t.insertBefore(e,r[s])},v=function(t,e){return g(t,e)},y=function(t,e,n){void 0===e&&(e={});var r=document.createElement(t);return e&&(0,o.each)(e,(function(t,e){return r.setAttribute(e,t)})),n&&((0,o.isString)(n)?r.innerHTML=n:r.appendChild(n)),r},m=function(t){return document.createTextNode(t)},b=function(t,e){var n,o=t.type;try{n=new window[e](o,t)}catch(t){(n=document.createEvent(e)).initEvent(o,!0,!0)}return n._parentEvent=t,0===o.indexOf('key')&&(n.keyCodeVal=t.keyCode,['keyCode','which'].forEach((function(t){Object.defineProperty(n,t,{get:function(){return this.keyCodeVal}})}))),n},_=function(t,e){void 0===e&&(e=[]),(Array.isArray(e)?e:[e]).forEach((function(e){var n=e[i]||'div',r=e[s]||{},a=document.createElement(n);(0,o.each)(r,(function(t,e){a.setAttribute(e,t)})),t.appendChild(a)}))},w=function(t){var e=(null==t?void 0:t.ownerDocument)||document,n=e.documentElement,o=e.defaultView||window;return{x:(o.pageXOffset||n.scrollLeft||0)-(n.clientLeft||0),y:(o.pageYOffset||n.scrollTop||0)-(n.clientTop||0)}}},163:(t,e,n)=>{"use strict";n.r(e),n.d(e,{appendStyles:()=>f,buildBase64UrlFromSvg:()=>$,camelCase:()=>b,capitalize:()=>R,createId:()=>W,deepMerge:()=>E,escape:()=>k,escapeNodeContent:()=>P,find:()=>T,getElRect:()=>j,getElement:()=>x,getGlobal:()=>l,getKeyChar:()=>D,getKeyCode:()=>L,getModel:()=>A,getPointerEvent:()=>M,getUiClass:()=>d,getUnitFromValue:()=>y,getViewEl:()=>B,hasDnd:()=>w,hasWin:()=>a,isCommentNode:()=>S,isComponent:()=>H,isDef:()=>s,isEmptyObj:()=>V,isEnterKey:()=>I,isEscKey:()=>N,isObject:()=>F,isRule:()=>z,isTaggableNode:()=>O,isTextNode:()=>C,matches:()=>p,normalizeFloat:()=>_,off:()=>v,on:()=>g,setViewEl:()=>U,shallowDiff:()=>h,toLowerCase:()=>c,upFirst:()=>m});var o=n(50),r=void 0&&(void 0).__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n=0?s!==a&&(n[i]=a):n[i]=null}for(var i in e)e.hasOwnProperty(i)&&(0,o.isUndefined)(t[i])&&(n[i]=e[i]);return n},g=function(t,e,n,o){var r=e.split(/\s+/);t=t instanceof Array?t:[t];for(var i=function(e){t.forEach((function(t){return t&&t.addEventListener(r[e],n,o)}))},s=0;s/g,'>').replace(/"/g,'"').replace(/'/g,''').replace(/`/g,'`')},P=function(t){return void 0===t&&(t=''),"".concat(t).replace(/&/g,'&').replace(//g,'>')},E=function(){for(var t=[],e=0;e{var o={"./CanvasClear":858,"./CanvasClear.ts":858,"./CanvasMove":884,"./CanvasMove.ts":884,"./CommandAbstract":790,"./CommandAbstract.ts":790,"./ComponentDelete":180,"./ComponentDelete.ts":180,"./ComponentDrag":544,"./ComponentDrag.ts":544,"./ComponentEnter":236,"./ComponentEnter.ts":236,"./ComponentExit":368,"./ComponentExit.ts":368,"./ComponentNext":243,"./ComponentNext.ts":243,"./ComponentPrev":400,"./ComponentPrev.ts":400,"./ComponentStyleClear":910,"./ComponentStyleClear.ts":910,"./CopyComponent":744,"./CopyComponent.ts":744,"./DeleteComponent":517,"./DeleteComponent.ts":517,"./ExportTemplate":457,"./ExportTemplate.ts":457,"./Fullscreen":975,"./Fullscreen.ts":975,"./MoveComponent":191,"./MoveComponent.ts":191,"./OpenAssets":912,"./OpenAssets.ts":912,"./OpenBlocks":117,"./OpenBlocks.ts":117,"./OpenLayers":614,"./OpenLayers.ts":614,"./OpenStyleManager":801,"./OpenStyleManager.ts":801,"./OpenTraitManager":395,"./OpenTraitManager.ts":395,"./PasteComponent":98,"./PasteComponent.ts":98,"./Preview":129,"./Preview.ts":129,"./Resize":116,"./Resize.ts":116,"./SelectComponent":407,"./SelectComponent.ts":407,"./SelectPosition":189,"./SelectPosition.ts":189,"./ShowOffset":804,"./ShowOffset.ts":804,"./SwitchVisibility":434,"./SwitchVisibility.ts":434};function r(t){var e=i(t);return n(e)}function i(t){if(!n.o(o,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code='MODULE_NOT_FOUND',e}return o[t]}r.keys=function(){return Object.keys(o)},r.resolve=i,t.exports=r,r.id=828},50:(t,e,n)=>{"use strict";n.r(e),n.d(e,{VERSION:()=>r,after:()=>Ne,all:()=>en,allKeys:()=>vt,any:()=>nn,assign:()=>Nt,before:()=>Ie,bind:()=>Ce,bindAll:()=>Te,chain:()=>be,chunk:()=>Rn,clone:()=>Rt,collect:()=>Ye,compact:()=>Pn,compose:()=>De,constant:()=>Z,contains:()=>on,countBy:()=>mn,create:()=>Vt,debounce:()=>je,default:()=>Wn,defaults:()=>It,defer:()=>Ee,delay:()=>Pe,detect:()=>qe,difference:()=>An,drop:()=>Tn,each:()=>Ke,escape:()=>ae,every:()=>en,extend:()=>Dt,extendOwn:()=>Nt,filter:()=>Qe,find:()=>qe,findIndex:()=>He,findKey:()=>Ve,findLastIndex:()=>ze,findWhere:()=>Ge,first:()=>On,flatten:()=>En,foldl:()=>Je,foldr:()=>Ze,forEach:()=>Ke,functions:()=>Mt,get:()=>Wt,groupBy:()=>vn,has:()=>$t,head:()=>On,identity:()=>qt,include:()=>on,includes:()=>on,indexBy:()=>yn,indexOf:()=>We,initial:()=>Sn,inject:()=>Je,intersection:()=>Dn,invert:()=>jt,invoke:()=>rn,isArguments:()=>Y,isArray:()=>q,isArrayBuffer:()=>F,isBoolean:()=>P,isDataView:()=>$,isDate:()=>L,isElement:()=>E,isEmpty:()=>lt,isEqual:()=>gt,isError:()=>N,isFinite:()=>X,isFunction:()=>H,isMap:()=>Ot,isMatch:()=>ct,isNaN:()=>J,isNull:()=>T,isNumber:()=>M,isObject:()=>O,isRegExp:()=>D,isSet:()=>kt,isString:()=>j,isSymbol:()=>I,isTypedArray:()=>rt,isUndefined:()=>k,isWeakMap:()=>Tt,isWeakSet:()=>Pt,iteratee:()=>Jt,keys:()=>at,last:()=>kn,lastIndexOf:()=>$e,map:()=>Ye,mapObject:()=>Qt,matcher:()=>Gt,matches:()=>Gt,max:()=>ln,memoize:()=>ke,methods:()=>Mt,min:()=>cn,mixin:()=>zn,negate:()=>Le,noop:()=>te,now:()=>re,object:()=>Fn,omit:()=>Cn,once:()=>Fe,pairs:()=>At,partial:()=>xe,partition:()=>bn,pick:()=>xn,pluck:()=>sn,property:()=>Kt,propertyOf:()=>ee,random:()=>oe,range:()=>Vn,reduce:()=>Je,reduceRight:()=>Ze,reject:()=>tn,rest:()=>Tn,restArguments:()=>S,result:()=>ve,sample:()=>dn,select:()=>Qe,shuffle:()=>fn,size:()=>_n,some:()=>nn,sortBy:()=>hn,sortedIndex:()=>Be,tail:()=>Tn,take:()=>On,tap:()=>Ht,template:()=>ge,templateSettings:()=>ce,throttle:()=>Ae,times:()=>ne,toArray:()=>pn,toPath:()=>zt,transpose:()=>Nn,unescape:()=>le,union:()=>Ln,uniq:()=>Mn,unique:()=>Mn,uniqueId:()=>me,unzip:()=>Nn,values:()=>Et,where:()=>an,without:()=>jn,wrap:()=>Me,zip:()=>In});var o={};n.r(o),n.d(o,{VERSION:()=>r,after:()=>Ne,all:()=>en,allKeys:()=>vt,any:()=>nn,assign:()=>Nt,before:()=>Ie,bind:()=>Ce,bindAll:()=>Te,chain:()=>be,chunk:()=>Rn,clone:()=>Rt,collect:()=>Ye,compact:()=>Pn,compose:()=>De,constant:()=>Z,contains:()=>on,countBy:()=>mn,create:()=>Vt,debounce:()=>je,default:()=>Bn,defaults:()=>It,defer:()=>Ee,delay:()=>Pe,detect:()=>qe,difference:()=>An,drop:()=>Tn,each:()=>Ke,escape:()=>ae,every:()=>en,extend:()=>Dt,extendOwn:()=>Nt,filter:()=>Qe,find:()=>qe,findIndex:()=>He,findKey:()=>Ve,findLastIndex:()=>ze,findWhere:()=>Ge,first:()=>On,flatten:()=>En,foldl:()=>Je,foldr:()=>Ze,forEach:()=>Ke,functions:()=>Mt,get:()=>Wt,groupBy:()=>vn,has:()=>$t,head:()=>On,identity:()=>qt,include:()=>on,includes:()=>on,indexBy:()=>yn,indexOf:()=>We,initial:()=>Sn,inject:()=>Je,intersection:()=>Dn,invert:()=>jt,invoke:()=>rn,isArguments:()=>Y,isArray:()=>q,isArrayBuffer:()=>F,isBoolean:()=>P,isDataView:()=>$,isDate:()=>L,isElement:()=>E,isEmpty:()=>lt,isEqual:()=>gt,isError:()=>N,isFinite:()=>X,isFunction:()=>H,isMap:()=>Ot,isMatch:()=>ct,isNaN:()=>J,isNull:()=>T,isNumber:()=>M,isObject:()=>O,isRegExp:()=>D,isSet:()=>kt,isString:()=>j,isSymbol:()=>I,isTypedArray:()=>rt,isUndefined:()=>k,isWeakMap:()=>Tt,isWeakSet:()=>Pt,iteratee:()=>Jt,keys:()=>at,last:()=>kn,lastIndexOf:()=>$e,map:()=>Ye,mapObject:()=>Qt,matcher:()=>Gt,matches:()=>Gt,max:()=>ln,memoize:()=>ke,methods:()=>Mt,min:()=>cn,mixin:()=>zn,negate:()=>Le,noop:()=>te,now:()=>re,object:()=>Fn,omit:()=>Cn,once:()=>Fe,pairs:()=>At,partial:()=>xe,partition:()=>bn,pick:()=>xn,pluck:()=>sn,property:()=>Kt,propertyOf:()=>ee,random:()=>oe,range:()=>Vn,reduce:()=>Je,reduceRight:()=>Ze,reject:()=>tn,rest:()=>Tn,restArguments:()=>S,result:()=>ve,sample:()=>dn,select:()=>Qe,shuffle:()=>fn,size:()=>_n,some:()=>nn,sortBy:()=>hn,sortedIndex:()=>Be,tail:()=>Tn,take:()=>On,tap:()=>Ht,template:()=>ge,templateSettings:()=>ce,throttle:()=>Ae,times:()=>ne,toArray:()=>pn,toPath:()=>zt,transpose:()=>Nn,unescape:()=>le,union:()=>Ln,uniq:()=>Mn,unique:()=>Mn,uniqueId:()=>me,unzip:()=>Nn,values:()=>Et,where:()=>an,without:()=>jn,wrap:()=>Me,zip:()=>In});var r='1.13.4',i='object'==typeof self&&self.self===self&&self||'object'==typeof global&&global.global===global&&global||Function('return this')()||{},s=Array.prototype,a=Object.prototype,l='undefined'!=typeof Symbol?Symbol.prototype:null,c=s.push,u=s.slice,p=a.toString,d=a.hasOwnProperty,f='undefined'!=typeof ArrayBuffer,h='undefined'!=typeof DataView,g=Array.isArray,v=Object.keys,y=Object.create,m=f&&ArrayBuffer.isView,b=isNaN,_=isFinite,w=!{toString:null}.propertyIsEnumerable('toString'),x=['valueOf','isPrototypeOf','toString','propertyIsEnumerable','hasOwnProperty','toLocaleString'],C=Math.pow(2,53)-1;function S(t,e){return e=null==e?t.length-1:+e,function(){for(var n=Math.max(arguments.length-e,0),o=Array(n),r=0;r=0&&n<=C}}function tt(t){return function(e){return null==e?void 0:e[t]}}const et=tt('byteLength'),nt=Q(et);var ot=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;const rt=f?function(t){return m?m(t)&&!$(t):nt(t)&&ot.test(p.call(t))}:Z(!1),it=tt('length');function st(t,e){e=function(t){for(var e={},n=t.length,o=0;o':'>','"':'"',"'":''','`':'`'},ae=ie(se),le=ie(jt(se)),ce=ut.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var ue=/(.)^/,pe={"'":"'",'\\':'\\','\r':'r','\n':'n','\u2028':'u2028','\u2029':'u2029'},de=/\\|'|\r|\n|\u2028|\u2029/g;function fe(t){return'\\'+pe[t]}var he=/^\s*(\w|\$)+\s*$/;function ge(t,e,n){!e&&n&&(e=n),e=It({},e,ut.templateSettings);var o=RegExp([(e.escape||ue).source,(e.interpolate||ue).source,(e.evaluate||ue).source].join('|')+'|$','g'),r=0,i="__p+='";t.replace(o,(function(e,n,o,s,a){return i+=t.slice(r,a).replace(de,fe),r=a+e.length,n?i+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":o?i+="'+\n((__t=("+o+"))==null?'':__t)+\n'":s&&(i+="';\n"+s+"\n__p+='"),e})),i+="';\n";var s,a=e.variable;if(a){if(!he.test(a))throw new Error('variable is not a bare identifier: '+a)}else i='with(obj||{}){\n'+i+'}\n',a='obj';i="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+i+'return __p;\n';try{s=new Function(a,'_',i)}catch(t){throw t.source=i,t}var l=function(t){return s.call(this,t,ut)};return l.source='function('+a+'){\n'+i+'}',l}function ve(t,e,n){var o=(e=Bt(e)).length;if(!o)return H(n)?n.call(t):n;for(var r=0;r1)Oe(a,e-1,n,o),r=o.length;else for(var l=0,c=a.length;le?(o&&(clearTimeout(o),o=null),a=c,s=t.apply(r,i),o||(r=i=null)):o||!1===n.trailing||(o=setTimeout(l,u)),s};return c.cancel=function(){clearTimeout(o),a=0,o=r=i=null},c}function je(t,e,n){var o,r,i,s,a,l=function(){var c=re()-r;e>c?o=setTimeout(l,e-c):(o=null,n||(s=t.apply(a,i)),o||(i=a=null))},c=S((function(c){return a=this,i=c,r=re(),o||(o=setTimeout(l,e),n&&(s=t.apply(a,i))),s}));return c.cancel=function(){clearTimeout(o),o=i=a=null},c}function Me(t,e){return xe(e,t)}function Le(t){return function(){return!t.apply(this,arguments)}}function De(){var t=arguments,e=t.length-1;return function(){for(var n=e,o=t[e].apply(this,arguments);n--;)o=t[n].call(this,o);return o}}function Ne(t,e){return function(){if(--t<1)return e.apply(this,arguments)}}function Ie(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}}const Fe=xe(Ie,2);function Ve(t,e,n){e=Zt(e,n);for(var o,r=at(t),i=0,s=r.length;i0?0:r-1;i>=0&&i0?s=i>=0?i:Math.max(i+a,s):a=i>=0?Math.min(i+1,a):i+a+1;else if(n&&i&&a)return o[i=n(o,r)]===r?i:-1;if(r!=r)return(i=e(u.call(o,s,a),J))>=0?i+s:-1;for(i=t>0?s:a-1;i>=0&&i0?0:s-1;for(r||(o=e[i?i[a]:a],a+=t);a>=0&&a=3;return e(t,Yt(n,r,4),o,i)}}const Je=Xe(1),Ze=Xe(-1);function Qe(t,e,n){var o=[];return e=Zt(e,n),Ke(t,(function(t,n,r){e(t,n,r)&&o.push(t)})),o}function tn(t,e,n){return Qe(t,Le(Zt(e)),n)}function en(t,e,n){e=Zt(e,n);for(var o=!Se(t)&&at(t),r=(o||t).length,i=0;i=0}const rn=S((function(t,e,n){var o,r;return H(e)?r=e:(e=Bt(e),o=e.slice(0,-1),e=e[e.length-1]),Ye(t,(function(t){var i=r;if(!i){if(o&&o.length&&(t=Ut(t,o)),null==t)return;i=t[e]}return null==i?i:i.apply(t,n)}))}));function sn(t,e){return Ye(t,Kt(e))}function an(t,e){return Qe(t,Gt(e))}function ln(t,e,n){var o,r,i=-1/0,s=-1/0;if(null==e||'number'==typeof e&&'object'!=typeof t[0]&&null!=t)for(var a=0,l=(t=Se(t)?t:Et(t)).length;ai&&(i=o);else e=Zt(e,n),Ke(t,(function(t,n,o){((r=e(t,n,o))>s||r===-1/0&&i===-1/0)&&(i=t,s=r)}));return i}function cn(t,e,n){var o,r,i=1/0,s=1/0;if(null==e||'number'==typeof e&&'object'!=typeof t[0]&&null!=t)for(var a=0,l=(t=Se(t)?t:Et(t)).length;ao||void 0===n)return 1;if(n1&&(o=Yt(o,e[1])),e=vt(t)):(o=wn,e=Oe(e,!1,!1),t=Object(t));for(var r=0,i=e.length;r1&&(n=e[1])):(e=Ye(Oe(e,!1,!1),String),o=function(t,n){return!on(e,n)}),xn(t,o,n)}));function Sn(t,e,n){return u.call(t,0,Math.max(0,t.length-(null==e||n?1:e)))}function On(t,e,n){return null==t||t.length<1?null==e||n?void 0:[]:null==e||n?t[0]:Sn(t,t.length-e)}function Tn(t,e,n){return u.call(t,null==e||n?1:e)}function kn(t,e,n){return null==t||t.length<1?null==e||n?void 0:[]:null==e||n?t[t.length-1]:Tn(t,Math.max(0,t.length-e))}function Pn(t){return Qe(t,Boolean)}function En(t,e){return Oe(t,e,!1)}const An=S((function(t,e){return e=Oe(e,!0,!0),Qe(t,(function(t){return!on(e,t)}))})),jn=S((function(t,e){return An(t,e)}));function Mn(t,e,n,o){P(e)||(o=n,n=e,e=!1),null!=n&&(n=Zt(n,o));for(var r=[],i=[],s=0,a=it(t);s{var e=t&&t.__esModule?()=>t['default']:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.g=function(){if('object'==typeof globalThis)return globalThis;try{return this||new Function('return this')()}catch(t){if('object'==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{'undefined'!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:'Module'}),Object.defineProperty(t,'__esModule',{value:!0})};var o={};return(()=>{"use strict";n.d(o,{default:()=>Ph});var t=n(50),e=n(163);function r(t){for(var n=[],o=1;o',move:'',plus:'',caret:'',delete:'',copy:'',arrowUp:'',chevron:'',eye:'',eyeOff:''},i18n:{},undoManager:{},assetManager:{},canvas:{},layerManager:{},storageManager:{},richTextEditor:{},domComponents:{},modal:{},codeManager:{},panels:{},commands:{},cssComposer:{},selectorManager:{},deviceManager:{},styleManager:{},blockManager:{},traitManager:{},textViewCode:'Code',keepUnusedStyles:!1,multiFrames:!1,customUI:!1};var s=n(316),a=n.n(s),l=n(895);var c,u=n(346),p=void 0&&(void 0).__extends||(c=function(t,e){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},c(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}c(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),d=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p(e,t),e}(u.Hn);const f=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return p(n,e),n.prototype.getByComponent=function(t){var e=this;return this.filter((function(n){return e.getComponent(n)===t}))[0]},n.prototype.addComponent=function(e,n){var o=this,r=((0,t.isArray)(e)?e:[e]).filter((function(t){return!o.hasComponent(t)})).map((function(t){return new d({component:t})}))[0];return this.push(r,n)},n.prototype.getComponent=function(t){return t.get('component')},n.prototype.hasComponent=function(t){var e=this.getByComponent(t);return e&&this.contains(e)},n.prototype.lastComponent=function(){var t=this.last();return t?this.getComponent(t):void 0},n.prototype.allComponents=function(){var t=this;return this.map((function(e){return t.getComponent(e)})).filter((function(t){return t}))},n.prototype.removeComponent=function(e,n){var o=this,r=((0,t.isArray)(e)?e:[e]).map((function(t){return o.getByComponent(t)}));return this.remove(r,n)},n}(u.FE);var h=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),g=void 0&&(void 0).__assign||function(){return g=Object.assign||function(t){for(var e,n=1,o=arguments.length;n',frameStyle:"\n body { background-color: #fff }\n * ::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.1) }\n * ::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2) }\n * ::-webkit-scrollbar { width: 10px }\n ",notTextable:['button','a','input[type=checkbox]','input[type=radio]']};var w=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();const x=function(t){function e(e,n,o){var r=t.call(this,n,o)||this;return r._module=e,r}return w(e,t),Object.defineProperty(e.prototype,"module",{get:function(){return this._module},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"config",{get:function(){return this._module.config},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"em",{get:function(){return this._module.em},enumerable:!1,configurable:!0}),e}(u.Hn);var C=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();const S=function(e){function n(t,n,o){return e.call(this,n,{module:t,modelConstructor:o})||this}return C(n,e),n.prototype.add=function(n,o){var r,i=this,s=(0,t.isArray)(n)?n:(0,t.isUndefined)(n)?void 0:[n];return s=null!==(r=null==s?void 0:s.map((function(t){return t instanceof i.newModel?t:new i.newModel(i.module,t)})))&&void 0!==r?r:[void 0],e.prototype.add.call(this,(0,t.isArray)(n)?s:s[0],o)},n.prototype.preinitialize=function(t,e){this.newModel=e.modelConstructor,this.module=e.module},n}(u.FE);var O=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),T=void 0&&(void 0).__assign||function(){return T=Object.assign||function(t){for(var e,n=1,o=arguments.length;n=0&&this.head.splice(r,1)},o.prototype.addLink=function(t){var e='link';!this.getHeadByAttr('href',t,e)&&this.addHeadItem({tag:e,attributes:{href:t,rel:'stylesheet'}})},o.prototype.removeLink=function(t){this.removeHeadByAttr('href',t,'link')},o.prototype.addScript=function(t){var e='script';!this.getHeadByAttr('src',t,e)&&this.addHeadItem({tag:e,attributes:{src:t}})},o.prototype.removeScript=function(t){this.removeHeadByAttr('src',t,'script')},o.prototype.getPage=function(){var t;return null===(t=this.collection)||void 0===t?void 0:t.page},o.prototype._emitUpdated=function(t){void 0===t&&(t={}),this.em.trigger('frame:updated',T({frame:this},t))},o.prototype.toJSON=function(e){void 0===e&&(e={});var n=x.prototype.toJSON.call(this,e),o=(0,t.result)(this,'defaults');return e.fromUndo&&delete n.component,delete n.styles,delete n.changesCount,n[P]&&delete n.width,n[E]&&delete n.height,(0,t.forEach)(n,(function(t,e){0===e.indexOf('_')&&delete n[e]})),(0,t.forEach)(o,(function(t,e){n[e]===t&&delete n[e]})),(0,t.forEach)(['attributes','head'],(function(e){(0,t.isEmpty)(n[e])&&delete n[e]})),n},o}(x);const j=A;var M=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();const L=function(e){function n(n,o){void 0===o&&(o=[]);var r=e.call(this,n,o,j)||this;return r.loadedItems=0,r.itemsToLoad=0,(0,t.bindAll)(r,'itemLoaded'),r.on('reset',r.onReset),r.on('remove',r.onRemove),r}return M(n,e),n.prototype.onReset=function(t,e){var n=this;((null==e?void 0:e.previousModels)||[]).map((function(t){return n.onRemove(t)}))},n.prototype.onRemove=function(t){null==t||t.onRemove()},n.prototype.itemLoaded=function(){this.loadedItems++,this.loadedItems>=this.itemsToLoad&&(this.trigger('loaded:all'),this.listenToLoadItems(!1))},n.prototype.listenToLoad=function(){this.loadedItems=0,this.itemsToLoad=this.length,this.listenToLoadItems(!0)},n.prototype.listenToLoadItems=function(t){var e=this;this.forEach((function(n){return n[t?'on':'off']('loaded',e.itemLoaded)}))},n}(S);var D=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();const N=function(e){function n(t,n){void 0===n&&(n={});var o=e.call(this,t,n)||this,r=n.em,i={};o.em=r,t.frames||(i.component=t.component,i.styles=t.styles,['component','styles'].map((function(t){return o.unset(t)})));var s=t.frames||[i],a=new L(r.Canvas,s);a.page=o,o.set('frames',a),!o.getId()&&o.set('id',null==r?void 0:r.get('PageManager')._createId());var l=null==r?void 0:r.get('UndoManager');return null==l||l.add(a),o}return D(n,e),n.prototype.defaults=function(){return{frames:[],_undo:!0}},n.prototype.onRemove=function(){this.getFrames().reset()},n.prototype.getFrames=function(){return this.get('frames')},n.prototype.getId=function(){return this.id},n.prototype.getName=function(){return this.get('name')},n.prototype.setName=function(t){return this.set({name:t})},n.prototype.getAllFrames=function(){return this.getFrames().models||[]},n.prototype.getMainFrame=function(){return this.getFrames().at(0)},n.prototype.getMainComponent=function(){var t=this.getMainFrame();return null==t?void 0:t.getComponent()},n.prototype.toJSON=function(e){void 0===e&&(e={});var n=u.Hn.prototype.toJSON.call(this,e),o=(0,t.result)(this,'defaults');return(0,t.forEach)(n,(function(t,e){0===e.indexOf('_')&&delete n[e]})),(0,t.forEach)(o,(function(t,e){n[e]===t&&delete n[e]})),n},n}(u.Hn);var I=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),F=void 0&&(void 0).__assign||function(){return F=Object.assign||function(t){for(var e,n=1,o=arguments.length;n","
\n
\n \n \n \n
\n
\n
\n
\n \n "],["\n
","
\n
\n \n \n \n
\n
\n
\n
\n \n "])),e,n,e,e,e,e,e,e,e)},e.prototype.events=function(){return{change:'updateDevice','click [data-add-trasp]':'startAdd'}},e.prototype.startAdd=function(){},e.prototype.updateDevice=function(){var t=this.em;if(t){var e=this.devicesEl;t.set('device',e?e.val():'')}},e.prototype.updateSelect=function(){var t=this.em,e=this.devicesEl;if(t&&t.getDeviceModel&&e){var n=t.getDeviceModel();e.val(n?n.get('id'):'')}},e.prototype.getOptions=function(){var t=this.collection,e=this.em,n='';return t.forEach((function(t){var o=t.attributes,r=o.name,i=o.id,s=e&&e.t&&e.t("deviceManager.devices.".concat(i))||r;n+="")})),n},e.prototype.render=function(){var t=this,e=t.em,n=t.ppfx,o=t.$el,r=t.el,i=e&&e.t&&e.t('deviceManager.device');return o.html(this.template({ppfx:n,label:i})),this.devicesEl=o.find(".".concat(n,"devices")),this.devicesEl.append(this.getOptions()),this.devicesEl.val(e.get('device')),r.className="".concat(n,"devices-c"),this},e}(u.G7);var ut,pt=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),dt=void 0&&(void 0).__assign||function(){return dt=Object.assign||function(t){for(var e,n=1,o=arguments.length;n';if(n.stopDefault(),n.inAbsoluteMode()){var c=n.Components.getWrapper(),u=c.append({})[0],p=n.Commands.run('core:component-drag',{event:t,guidesInfo:1,center:1,target:u,onEnd:function(t,n,i){var s;if(!i.cancelled){s=c.append(l)[0];var a=o.getOffset(),p=u.getStyle(),d=p.top,f=p.left,h=p.position,g=(0,Et.GX)(t.target),v=parseInt("".concat(parseFloat(f)+g.x-a.left),10),y=parseInt("".concat(parseFloat(d)+g.y-a.top),10);s.addStyle({left:v+'px',top:y+'px',position:h})}e.handleDragEnd(s,r),u.remove()}});i=function(e){return p.stop(t,{cancel:e})},s=function(t){return l=t}}else{var d=new a.Sorter(Ht({em:n,wmargin:1,nested:1,canvasRelative:1,direction:'a',container:this.el,placer:o.getPlacerEl(),containerSel:'*',itemSel:'*',pfx:'gjs-',onEndMove:function(t){return e.handleDragEnd(t,r)},document:this.el.ownerDocument},this.sortOpts||{}));d.setDropContent(l),d.startSort(),this.sorter=d,i=function(t){t&&(d.moved=!1),d.endMove()},s=function(t){return d.setDropContent(t)}}this.dragStop=i,this.dragContent=s,n.trigger('canvas:dragenter',r,l)}},n.prototype.handleDragEnd=function(t,e){var n=this.em;this.over=!1,t&&(n.set('dragResult',t),n.trigger('canvas:drop',e,t)),n.runDefault({preserveSelected:1})},n.prototype.handleDragOver=function(t){t.preventDefault(),this.em.trigger('canvas:dragover',t)},n.prototype.handleDrop=function(t){t.preventDefault();var e=this.dragContent,n=t.dataTransfer,o=this.getContentByData(n).content;t.target.style.border='',o&&e&&e(o),this.endDrop(!o,t)},n.prototype.getContentByData=function(e){var n=this.em,o=e&&e.types,r=e&&e.files||[],i=n.get('dragContent'),s=e&&e.getData('text');if(r.length){s=[];for(var a=0;a=0)s=e&&e.getData('text/html').replace(/<\/?meta[^>]*>/g,'');else if((0,t.indexOf)(o,'text/uri-list')>=0)s={type:'link',attributes:{href:s},content:s};else if((0,t.indexOf)(o,'text/json')>=0){var u=e&&e.getData('text/json');u&&(s=JSON.parse(u))}else 1===o.length&&'text/plain'===o[0]&&(s="
".concat(s,"
"));var p={content:s};return n.trigger('canvas:dragdata',e,p),p},n}();const Bt=zt;var Ut=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Wt=void 0&&(void 0).__assign||function(){return Wt=Object.assign||function(t){for(var e,n=1,o=arguments.length;na&&(l+=i-a),!(0,t.isUndefined)(e)&&l!==r&&l>0&&l0){var l=n.shift(),u=(0,Et.ut)('script',Wt({type:'text/javascript'},(0,t.isString)(l)?{src:l}:l));u.onerror=u.onload=c.bind(null,n),null===(r=o.contentDocument)||void 0===r||r.head.appendChild(u)}else e.renderBody(),i&&i.trigger(s,a)};o.onload=function(){var t=e.config.frameContent;if(t){var n=e.getDoc();n.open(),n.write(t),n.close()}i&&i.trigger("".concat(s,":before"),a),c($t([],l.get('scripts'),!0))}},o.prototype.renderStyles=function(e){void 0===e&&(e={});var n=this.getHead(),o=this.getCanvasModel(),r=function(e){return e.map((function(e){return{tag:'link',attributes:Wt({rel:'stylesheet'},(0,t.isString)(e)?{href:e}:e)}}))},i=r(e.prev||o.previous('styles')),s=r(o.get('styles')),a=[],l=[],c=function(t,e,n){t.forEach((function(t){var o=t.attributes.href;!e.some((function(t){return t.attributes.href===o}))&&n.push(t)}))};c(s,i,l),c(i,s,a),a.forEach((function(t){var e,o=n.querySelector("link[href=\"".concat(t.attributes.href,"\"]"));null===(e=null==o?void 0:o.parentNode)||void 0===e||e.removeChild(o)})),(0,Et.SJ)(n,l)},o.prototype.renderBody=function(){var t,n,o=this,r=this,i=r.config,s=r.em,a=r.model,l=r.ppfx,c=this.getDoc(),u=this.getBody(),p=this.getWindow(),d=s.config;p._isEditor=!0,this.renderStyles({prev:[]});(0,Et.R3)(u,""));var f=a.getComponent(),h=s.Components.getType('wrapper').view;this.wrapper=new h({model:f,config:Wt(Wt({},f.config),{em:s,frameView:this})}).render(),(0,Et.R3)(u,null===(t=this.wrapper)||void 0===t?void 0:t.el),(0,Et.R3)(u,new Rt({collection:a.getStyles(),config:Wt(Wt({},s.Css.getConfig()),{frameView:this})}).render().el),(0,Et.R3)(u,this.getJsContainer()),(0,e.on)(u,'click',(function(t){var e;return t&&'A'==(null===(e=t.target)||void 0===e?void 0:e.tagName)&&t.preventDefault()})),(0,e.on)(u,'submit',(function(t){return t&&t.preventDefault()})),[{event:'keydown keyup keypress',class:'KeyboardEvent'},{event:'mousedown mousemove mouseup',class:'MouseEvent'},{event:'pointerdown pointermove pointerup',class:'PointerEvent'},{event:'wheel',class:'WheelEvent'}].forEach((function(t){return t.event.split(' ').forEach((function(e){c.addEventListener(e,(function(e){return o.el.dispatchEvent((0,Et.t3)(e,t.class))}))}))})),this._toggleEffects(!0),(0,e.hasDnd)(s)&&(this.droppable=new Bt(s,null===(n=this.wrapper)||void 0===n?void 0:n.el)),a.trigger('loaded')},o.prototype._toggleEffects=function(t){var n=t?e.on:e.off,o=this.getWindow();o&&n(o,"".concat(Et.G1," resize"),this._emitUpdate)},o.prototype._emitUpdate=function(){this.model._emitUpdated()},o}(Pt);const Gt=qt;var Kt=n(668),Yt=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Xt=void 0&&(void 0).__assign||function(){return Xt=Object.assign||function(t){for(var e,n=1,o=arguments.length;n\n
\n ").concat(i.get('name')||'',"\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n ")).append(e.el);var l=(0,Et.ut)('div',{class:"".concat(o,"tools"),style:'pointer-events:none; display: none'},"\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n "));this.elTools=l;var c=null==r?void 0:r.toolsWrapper;return c&&c.appendChild(l),a&&a({el:s,elTop:s.querySelector('[data-frame-top]'),elRight:s.querySelector('[data-frame-right]'),elBottom:s.querySelector('[data-frame-bottom]'),elLeft:s.querySelector('[data-frame-left]'),frame:i,frameWrapperView:this,remove:this.remove,startDrag:this.startDrag}),this},n}(Pt);var Zt=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Qt=function(t){function e(e,n){void 0===e&&(e={});var o=t.call(this,e,!0)||this;return o.listenTo(o.collection,'reset',o.render),o.canvasView=n.canvasView,o._module=n.module,o}return Zt(e,t),e.prototype.onRemoveBefore=function(t,e){void 0===e&&(e={}),t.forEach((function(t){return t.remove(e)}))},e.prototype.onRender=function(){var t=this.$el,e=this.ppfx;t.attr({class:"".concat(e,"frames")})},e.prototype.renderView=function(t,e){return new Jt(t,this.canvasView)},e}(jt);const te=Qt;var ee=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ne=void 0&&(void 0).__assign||function(){return ne=Object.assign||function(t){for(var e,n=1,o=arguments.length;n\n
\n ")},o.prototype._onFramesUpdate=function(){this._initFrames(),this._renderFrames()},o.prototype._initFrames=function(){var t=this,e=t.frames,n=t.model,o=t.config,r=t.em,i=n.frames;r.set('readyCanvas',0),i.once('loaded:all',(function(){return r.set('readyCanvas',1)})),null==e||e.remove(),this.frames=new te({collection:i},ne(ne({},o),{canvasView:this}))},o.prototype.checkSelected=function(t,e){var n;void 0===e&&(e={});var o=e.scroll,r=this.em.get('currentFrame');o&&(null===(n=t.views)||void 0===n||n.forEach((function(t){t._getFrame()===r&&t.scrollIntoView(o)})))},o.prototype.remove=function(){for(var t,e=[],n=0;n=0&&s>=0&&i<=r.height&&s<=r.width},o.prototype.offset=function(t,n){void 0===n&&(n={});var o=n.noScroll,r=(0,e.getElRect)(t),i=o?{x:0,y:0}:(0,Et.GX)(t);return{top:r.top+i.y,left:r.left+i.x,width:r.width,height:r.height}},o.prototype.clearOff=function(){this.frmOff=void 0,this.cvsOff=void 0},o.prototype.getFrameOffset=function(t){var e;if(!this.frmOff||t){var n=null===(e=this.frame)||void 0===e?void 0:e.el,o=null==t?void 0:t.ownerDocument.defaultView,r=o?o.frameElement:n;this.frmOff=this.offset(r||n)}return this.frmOff},o.prototype.getCanvasOffset=function(){return this.cvsOff||(this.cvsOff=this.offset(this.el)),this.cvsOff},o.prototype.getElementPos=function(t,e){void 0===e&&(e={});var n=this.getZoom(),o=this.getFrameOffset(t),r=this.el,i=this.getCanvasOffset(),s=this.offset(t,e),a=e.avoidFrameOffset?0:o.top,l=e.avoidFrameOffset?0:o.left,c=e.avoidFrameZoom?s.top:s.top*n,u=e.avoidFrameZoom?s.left:s.left*n;return{top:e.avoidFrameOffset?c:c+a-i.top+r.scrollTop,left:e.avoidFrameOffset?u:u+l-i.left+r.scrollLeft,height:e.avoidFrameZoom?s.height:s.height*n,width:e.avoidFrameZoom?s.width:s.width*n,zoom:n,rect:s}},o.prototype.getElementOffsets=function(t){var n=this;if(!t||(0,e.isTextNode)(t))return{};var o={},r=window.getComputedStyle(t);return['marginTop','marginRight','marginBottom','marginLeft','paddingTop','paddingRight','paddingBottom','paddingLeft'].forEach((function(t){o[t]=parseFloat(r[t])*n.getZoom()})),o},o.prototype.getPosition=function(t){var e;void 0===t&&(t={});var n=null===(e=this.frame)||void 0===e?void 0:e.el.contentDocument;if(!n)return{top:0,left:0,width:0,height:0};var o=n.body,r=this.getZoom(),i=this.getFrameOffset(),s=this.getCanvasOffset(),a=t.noScroll;return{top:i.top+(a?0:o.scrollTop)*r-s.top,left:i.left+(a?0:o.scrollLeft)*r-s.left,width:s.width,height:s.height}},o.prototype.updateScript=function(t){var e=t.model,n=e.getId();t.scriptContainer||(t.scriptContainer=(0,Et.ut)('div',{'data-id':n}),this.getJsContainer().appendChild(t.scriptContainer)),t.el.id=n,t.scriptContainer.innerHTML='';var o=document.createElement('script'),r=e.getScriptString(),i=e.get('script-props')?r:"function(){\n".concat(r,"\n;}"),s=JSON.stringify(e.__getScriptProps());o.innerHTML="\n setTimeout(function() {\n var item = document.getElementById('".concat(n,"');\n if (!item) return;\n (").concat(i,".bind(item))(").concat(s,")\n }, 1);"),setTimeout((function(){var e=t.scriptContainer;null==e||e.appendChild(o)}),0)},o.prototype.getJsContainer=function(t){var e=this.getFrameView(t);return e&&e.getJsContainer()},o.prototype.getFrameView=function(t){return(null==t?void 0:t._getFrame())||this.em.get('currentFrame')},o.prototype._renderFrames=function(){if(this.ready){var t=this,e=t.model,n=t.frames,o=t.em,r=t.framesArea,i=e.frames;i.listenToLoad(),n.render();var s=i.at(0),a=null==s?void 0:s.view;o.setCurrentFrame(a),null==r||r.appendChild(n.el),this.frame=a}},o.prototype.render=function(){var t=this,n=t.el,o=t.$el,r=t.ppfx,i=t.config,s=t.em;o.html(this.template());var a=o.find('[data-frames]');this.framesArea=a.get(0);var l=o.find('[data-tools]');return this.toolsWrapper=l.get(0),l.append("\n
\n
\n
\n
\n
\n
\n ").concat(i.extHl?"
"):'',"\n
\n
\n
\n
\n
\n
\n
\n ")),this.toolsEl=n.querySelector("#".concat(r,"tools")),this.hlEl=n.querySelector(".".concat(r,"highlighter")),this.badgeEl=n.querySelector(".".concat(r,"badge")),this.placerEl=n.querySelector(".".concat(r,"placeholder")),this.ghostEl=n.querySelector(".".concat(r,"ghost")),this.toolbarEl=n.querySelector(".".concat(r,"toolbar")),this.resizerEl=n.querySelector(".".concat(r,"resizer")),this.offsetEl=n.querySelector(".".concat(r,"offset-v")),this.fixedOffsetEl=n.querySelector(".".concat(r,"offset-fixed-v")),this.toolsGlobEl=n.querySelector(".".concat(r,"tools-gl")),this.el.className=(0,e.getUiClass)(s,this.className),this.ready=!0,this._renderFrames(),this},o}(Pt);const re=oe;var ie=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),se=void 0&&(void 0).__assign||function(){return se=Object.assign||function(t){for(var e,n=1,o=arguments.length;ni.top+i.height?i.top+i.height:f,left:d,elementTop:i.top,elementLeft:i.left,elementWidth:i.width,elementHeight:i.height,targetWidth:t.offsetWidth,targetHeight:t.offsetHeight,canvasTop:r.top,canvasLeft:r.left,canvasWidth:r.width,canvasHeight:r.height};return c&&this.em&&this.em.trigger(c,h),h}},o.prototype.canvasRectOffset=function(t,e,n){var o=this;void 0===n&&(n={});var r=function(t,e,r){void 0===e&&(e=1);var i=o.em.getZoomDecimal(),s=e?'top':'left',a=t.ownerDocument,l=n.offset?function(t){var e=t.defaultView;return null==e?void 0:e.frameElement}(a):{},c=l.offsetTop,u=void 0===c?0:c,p=l.offsetLeft,d=void 0===p?0:p,f=a.body||{},h=f.scrollTop,g=void 0===h?0:h,v=f.scrollLeft,y=e?g:void 0===v?0:v,m=e?u:d;return r[s]-(y-m)*i};return{top:r(t,1,e),left:r(t,0,e)}},o.prototype.getTargetToElementFixed=function(e,n,o){void 0===o&&(o={});var r=o.pos||this.getElementPos(e,{noScroll:!0}),i=o.canvasOff||this.canvasRectOffset(e,r),s=n.offsetHeight||0,a=n.offsetWidth||0,l=r.left+r.width,c=this.getCanvasView(),u=c.getPosition(),p=c.getFrameOffset(e),d=o.event,f=-s,h=(0,t.isUndefined)(o.left)?r.width-a:o.left;if(h=r.left<-h?-r.left:h,h=l>u.width?h-(l-u.width):h,i.top'!=="".concat(a.outerHTML).slice(-2)||(f.void=!0);var T=f.components;if(!f.type&&T){for(var k=1,P=0,E=0;E".concat(e,""),l=r.parseFromString(a,i);if(s){var c=l.head,u=l.body,p=c.querySelectorAll('script');(0,t.each)(p,(function(t){return u.appendChild(t)}));var d=[];(0,t.each)(c.children,(function(t){return d.push(t)})),(0,t.each)(d,(function(t,e){return u.insertBefore(t,u.children[e])})),o=u}else o=l.firstChild;return o}(o,u),d=p.querySelectorAll('script'),f=d.length;if(!((0,t.isUndefined)(a.allowScripts)?u.allowScripts:a.allowScripts))for(;f--;)d[f].parentNode.removeChild(d[f]);if(u.allowUnsafeAttr||this.__clearUnsafeAttr(p),r){for(var h=p.querySelectorAll('style'),g=h.length,v='';g--;)v=h[g].innerHTML+v,h[g].parentNode.removeChild(h[g]);v&&(l.css=r.parse(v))}e&&e.trigger("".concat(ge,":root"),{input:o,root:p});var y=this.parseNode(p,c),m=1!==y.length||c.returnArray?y:y[0];return l.html=m,e&&e.trigger(ge,{input:o,output:l}),l},__clearUnsafeAttr:function(e){var n=this,o=e.attributes||[],r=e.childNodes||[],i=[];(0,t.each)(o,(function(t){var e=t.nodeName||'';0===e.indexOf('on')&&i.push(e)})),i.map((function(t){return e.removeAttribute(t)})),(0,t.each)(r,(function(t){return n.__clearUnsafeAttr(t)}))}}};var ye=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),me=void 0&&(void 0).__assign||function(){return me=Object.assign||function(t){for(var e,n=1,o=arguments.length;n=0:i,a="".concat(o[r]).concat(s?' !important':''),l='__'==r.substr(0,2);a&&!l&&n.push("".concat(r,":").concat(a,";"))}return n.join('')},o.prototype.getSelectors=function(){return this.get('selectors')||this.get('classes')},o.prototype.getSelectorsString=function(t){return this.selectorsToString?this.selectorsToString(t):this.getSelectors().getFullString()},o}(u.Hn);var we=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),xe=void 0&&(void 0).__assign||function(){return xe=Object.assign||function(t){for(var e,n=1,o=arguments.length;n0&&f.reset(d,o)}else p.components=d}return p}))},ke=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return we(n,e),n.prototype.initialize=function(t,e){void 0===e&&(e={}),this.opt=e,this.listenTo(this,'add',this.onAdd),this.listenTo(this,'remove',this.removeChildren),this.listenTo(this,'reset',this.resetChildren);var n=e.em,o=e.config;this.config=o,this.em=n,this.domc=e.domc||(null==n?void 0:n.Components)},n.prototype.resetChildren=function(t,e){var n=this;void 0===e&&(e={});var o=this,r=e.previousModels||[],i=r.filter((function(e){return!t.get(e.cid)})),s=Oe(t),a=Oe(r).filter((function(t){return s.indexOf(t)>=0}));e.keepIds=(e.keepIds||[]).concat(a),i.forEach((function(t){return n.removeChildren(t,o,e)})),t.each((function(t){return n.onAdd(t)}))},n.prototype.resetFromString=function(t,e){var n,o;void 0===t&&(t=''),void 0===e&&(e={}),e.keepIds=Oe(this);var r=this,i=r.domc,s=r.em,a=r.parent,l=null==s?void 0:s.Css,c=(null==i?void 0:i.allById())||{},u=this.parseString(t,e),p=Te(u,c,e),d=e.visitedCmps,f=void 0===d?{}:d;Object.keys(f).forEach((function(t){var e=f[t];if(e.length){var n=(null==l?void 0:l.getRules("#".concat(t)))||[];n.length&&e.forEach((function(t){n.forEach((function(e){var n=e.clone();n.set('selectors',["#".concat(t.attributes.id)]),l.getAll().add(n)}))}))}})),this.reset(p,e),null==s||s.trigger('component:content',a,e,t),null===(o=(n=a).__checkInnerChilds)||void 0===o||o.call(n)},n.prototype.removeChildren=function(t,e,n){var o=this;if(void 0===n&&(n={}),t){var r=this.domc,i=this.em,s=n.temporary||n.fromUndo;if(t.prevColl=this,!s){var a=t.getId(),l=i.Selectors.getAll(),c=i.Css.getAll(),u=(n.keepIds||[]).indexOf(a)<0;delete(r?r.allById():{})[a];var p=u?c.remove(c.filter((function(t){return t.getSelectors().getFullString()==="#".concat(a)})),n):[];l.remove(p.map((function(t){return t.getSelectors().at(0)}))),t.opt.temporary||(i.Commands.run('core:component-style-clear',{target:t}),t.removed(),t.trigger('removed'),i.trigger('component:remove',t)),t.components().forEach((function(t){return o.removeChildren(t,e,n)}))}var d=t.components();i.stopListening(d),i.stopListening(t),i.stopListening(t.get('classes')),t.__postRemove()}},n.prototype.model=function(t,e){var n,o=e.collection.opt,r=o.em,i=r.Components.componentTypes;e.em=r,e.config=o.config,e.componentTypes=i,e.domc=o.domc;for(var s=0;s=0&&this.set('void',!0),n.em=i,this.opt=n,this.em=i,this.frame=n.frame,this.config=n.config||{},this.set('attributes',$e($e({},(0,t.result)(this,'defaults').attributes||{}),this.get('attributes')||{})),this.ccid=o.createId(this,n),this.initClasses(),this.initComponents(),this.initTraits(),this.initToolbar(),this.initScriptProps(),this.listenTo(this,'change:script',this.scriptUpdated),this.listenTo(this,'change:tagName',this.tagUpdated),this.listenTo(this,'change:attributes',this.attrUpdated),this.listenTo(this,'change:attributes:id',this._idUpdated),this.on('change:toolbar',this.__emitUpdateTlb),this.on('change',this.__onChange),this.on(Qe,this.__propToParent),this.set('status',''),this.views=[],['classes','traits','components'].forEach((function(t){var e="add remove ".concat('components'!==t?'change':'');r.listenTo(r.get(t),e.trim(),(function(){for(var e=[],n=0;n=0}))},o.prototype.__getSymbToUp=function(t){var e=this;void 0===t&&(t={});var n=[],o=t.changed;if(t.fromInstance||t.noPropagate||t.fromUndo||o&&this.__isSymbOvrd(o))return n;var r=this.__getSymbols()||[],i=this.__getSymbol();return n=(i?qe([i],i.__getSymbols()||[],!0):r).filter((function(t){return t!==e})).filter((function(t){return!(o&&t.__isSymbOvrd(o))}))},o.prototype.__getSymbTop=function(t){for(var e=this,n=this.parent(t);n&&(n.__isSymbol()||n.__getSymbol());)e=n,n=n.parent(t);return e},o.prototype.__upSymbProps=function(n,o){var r=this;void 0===o&&(o={});var i=this.changedAttributes()||{},s=i.attributes||{};if(delete i.status,delete i.open,delete i[Ye],delete i[Xe],delete i[Je],delete i.attributes,delete s.id,(0,e.isEmptyObj)(s)||(i.attributes=s),!(0,e.isEmptyObj)(i)){var a=this.__getSymbToUp(o);(0,t.keys)(i).map((function(t){r.__isSymbOvrd(t)&&delete i[t]})),this.__logSymbol('props',a,{opts:o,changed:i}),a.forEach((function(e){var n=$e({},i);(0,t.keys)(n).map((function(t){e.__isSymbOvrd(t)&&delete n[t]})),e.set(n,$e({fromInstance:r},o))}))}},o.prototype.__upSymbCls=function(t,e,n){var o=this;void 0===n&&(n={});var r=this.__getSymbToUp(n);this.__logSymbol('classes',r,{opts:n}),r.forEach((function(t){t.set('classes',o.get('classes'),{fromInstance:o})})),this.__changesUp(n)},o.prototype.__upSymbComps=function(t,e,n){var o=this,r=n||e||{},i={fromInstance:r.fromInstance,fromUndo:r.fromUndo},s=t.opt.temporary;if(n)if(n.add){var a=[],l=!!this.__getSymbols();if((y=this.__getSymbToUp($e($e({},i),{changed:'components:add'}))).length){var c=t.__getSymbol();a=(c?c.__getSymbols():t.__getSymbols())||[],(a=qe([],a,!0)).push(c||t)}!s&&this.__logSymbol('add',y,{opts:n,addedInstances:a.map((function(t){return t.cid})),added:t.cid}),y.forEach((function(e){var r=e.__getSymbTop(),i=a.filter((function(t){var e=t.__getSymbTop({prev:1});return r&&e&&e===r}))[0]||t.clone({symbol:!0,symbolInv:l});e.append(i,$e({fromInstance:o},n))}))}else{var u=t.__getSymbol();if(u&&!n.temporary&&u.set(Ye,u.__getSymbols().filter((function(e){return e!==t}))),!t.__isSymbolTop()){var p='components:remove',d=n.index,f=t.parent(),h=$e({fromInstance:t},n),g=t.__isSymbolNested(),v=function(t){var e=t.parent();e&&!e.__isSymbOvrd(p)&&t.remove(h)};y=(null==f?void 0:f.__isSymbOvrd(p))?[]:t.__getSymbToUp(i);g&&(y=null==f?void 0:f.__getSymbToUp($e($e({},i),{changed:p})),v=function(t){var e=t.components().at(d);e&&e.remove($e({fromInstance:f},h))}),!s&&this.__logSymbol('remove',y,{opts:n,removed:t.cid,isSymbNested:g}),y.forEach(v)}}else{var y=this.__getSymbToUp($e($e({},i),{changed:'components:reset'})),m=t.models;this.__logSymbol('reset',y,{components:m}),y.forEach((function(t){var n=m.map((function(t){return t.clone({symbol:!0})}));t.components().reset(n,$e({fromInstance:o},e))}))}this.__changesUp(r)},o.prototype.initClasses=function(e,n,o){void 0===o&&(o={});var r=this.get('attributes').class||[],i=[this,'change:classes',this.initClasses],s=this.get('classes')||r,a=(0,t.isString)(s)?s.split(' '):s;this.stopListening.apply(this,i);var l=this.normalizeClasses(a),c=new Fe([]);return this.set('classes',c,o),c.add(l),c.on('add remove reset',this.__upSymbCls),this.listenTo.apply(this,i),this},o.prototype.initComponents=function(){var e=[this,'change:components',this.initComponents];this.stopListening.apply(this,e);var n=new Pe([],this.opt);n.parent=this;var o=this.get('components'),r=!this.opt.avoidChildren;return this.set('components',n),r&&o&&n.add((0,t.isFunction)(o)?o(this):o,this.opt),n.on('add remove reset',this.__upSymbComps),this.listenTo.apply(this,e),this},o.prototype.initTraits=function(t){var e=this.em,n='change:traits';this.off(n,this.initTraits),this.__loadTraits();var o=$e({},this.get('attributes')),r=this.traits;return r.each((function(t){if(!t.get('changeProp')){var e=t.get('name'),n=t.getInitValue();e&&n&&(o[e]=n)}})),r.length&&this.set('attributes',o),this.on(n,this.initTraits),t&&e&&e.trigger('component:toggled'),this},o.prototype.initScriptProps=function(){if(!this.opt.temporary){var t='script-props',e=["change:".concat(t),this.initScriptProps];this.off.apply(this,e);var n=this.previous(t)||[],o=this.get(t)||[],r=n.map((function(t){return"change:".concat(t)})).join(' '),i=o.map((function(t){return"change:".concat(t)})).join(' ');r&&this.off(r,this.__scriptPropsChange),i&&this.on(i,this.__scriptPropsChange),this.on.apply(this,e)}},o.prototype.__scriptPropsChange=function(t,e,n){void 0===n&&(n={}),n.avoidStore||this.trigger('rerender')},o.prototype.append=function(e,n){void 0===n&&(n={});var o=((0,t.isArray)(e)?qe([],e,!0):[e]).map((function(e){return(0,t.isString)(e)||e.collection&&e.collection.remove(e,{temporary:!0}),e})),r=this.components().add(o,n);return(0,t.isArray)(r)?r:[r]},o.prototype.components=function(e,n){void 0===n&&(n={});var o=this.get('components');return(0,t.isUndefined)(e)?o:(o.reset(void 0,n),e?this.append(e,n):[])},o.prototype.getChildAt=function(t){return this.components().at(t||0)||void 0},o.prototype.getLastChild=function(){var t=this.components();return t.at(t.length-1)||null},o.prototype.empty=function(t){return void 0===t&&(t={}),this.components().reset(void 0,t),this},o.prototype.parent=function(t){void 0===t&&(t={});var e=this.collection||t.prev&&this.prevColl;return e?e.parent:void 0},o.prototype.parents=function(){var t=this.parent();return t?[t].concat(t.parents()):[]},o.prototype.scriptUpdated=function(){this.set('scriptUpdated',1)},o.prototype.initToolbar=function(){var t=this.em,e=this,n=t&&t.getConfig().stylePrefix||'';if(!e.get('toolbar')&&t){var o=[];e.collection&&o.push({label:t.getIcon('arrowUp'),command:function(t){return t.runCommand('core:component-exit',{force:1})}}),e.get('draggable')&&o.push({attributes:{class:"".concat(n,"no-touch-actions"),draggable:!0},label:t.getIcon('move'),command:'tlb-move'}),e.get('copyable')&&o.push({label:t.getIcon('copy'),command:'tlb-clone'}),e.get('removable')&&o.push({label:t.getIcon('delete'),command:'tlb-delete'}),e.set('toolbar',o)}},o.prototype.__loadTraits=function(e,n){void 0===n&&(n={});var o=e||this.traits;if(!(o instanceof Ue)){o=(0,t.isFunction)(o)?o(this):o;var r=new Ue([],this.opt);r.setTarget(this),o.length&&(o.forEach((function(t){return t.attributes&&delete t.attributes.value})),r.add(o)),this.set({traits:r},n)}return this},o.prototype.getTraits=function(){return this.__loadTraits(),qe([],this.traits.models,!0)},o.prototype.setTraits=function(e){var n=(0,t.isArray)(e)?e:[e];return this.set({traits:n}),this.getTraits()},o.prototype.getTrait=function(t){return this.getTraits().filter((function(e){return e.get('id')===t||e.get('name')===t}))[0]||null},o.prototype.updateTrait=function(t,e){var n,o=this.getTrait(t);return o&&o.set(e),null===(n=this.em)||void 0===n||n.trigger('component:toggled'),this},o.prototype.getTraitIndex=function(t){var e=this.getTrait(t);return e?this.traits.indexOf(e):-1},o.prototype.removeTrait=function(e){var n,o=this,r=((0,t.isArray)(e)?e:[e]).map((function(t){return o.getTrait(t)})),i=this.traits,s=r.length?i.remove(r):[];return null===(n=this.em)||void 0===n||n.trigger('component:toggled'),(0,t.isArray)(s)?s:[s]},o.prototype.addTrait=function(e,n){var o;void 0===n&&(n={}),this.__loadTraits();var r=this.traits.add(e,n);return null===(o=this.em)||void 0===o||o.trigger('component:toggled'),(0,t.isArray)(r)?r:[r]},o.prototype.normalizeClasses=function(t){var e=[],n=this.em,o=null==n?void 0:n.Selectors;return o?t.models?qe([],t.models,!0):(t.forEach((function(t){return e.push(o.add(t))})),e):[]},o.prototype.clone=function(t){void 0===t&&(t={});var e=this.em,n=$e({},this.attributes),o=$e({},this.opt),r=this.getId(),i=null==e?void 0:e.Css;n.attributes=$e({},n.attributes),delete n.attributes.id,n.components=[],n.classes=[],n.traits=[],this.__isSymbolTop()&&(t.symbol=!0),this.get('components').each((function(e,o){n.components[o]=e.clone($e($e({},t),{_inner:1}))})),this.get('traits').each((function(t,e){n.traits[e]=t.clone()})),this.get('classes').each((function(t,e){n.classes[e]=t.get('name')})),n.status='',o.collection=null;var s=new this.constructor(n,o),a="#".concat(s.getId());(i?i.getRules("#".concat(r)):[]).forEach((function(t){var e=t.clone();e.set('selectors',[a]),i.getAll().add(e)})),s.set(Ye,0);var l=this.__getSymbol(),c=this.__getSymbols();t.symbol||!l&&!c?l?(l.set(Ye,qe(qe([],l.__getSymbols(),!0),[s],!1)),s.__initSymb()):t.symbol&&(this.__isSymbol()?(this.set(Ye,qe(qe([],c,!0),[s],!1)),s.set(Xe,this),s.__initSymb()):t.symbolInv?(this.set(Ye,[s]),s.set(Xe,this),[this,s].map((function(t){return t.__initSymb()}))):(s.set(Ye,[this]),[this,s].map((function(t){return t.__initSymb()})),this.set(Xe,s))):(s.set(Xe,0),s.set(Ye,0));var u='component:clone';return e&&e.trigger(u,s),this.trigger(u,s),s},o.prototype.getName=function(t){void 0===t&&(t={});var n=this.em,o=this.attributes,r=o.type,i=o.tagName,s=o.name,a=r||i,l=r?'':i,c='domComponents.names.',u=s&&(null==n?void 0:n.t("".concat(c).concat(s))),p=l&&(null==n?void 0:n.t("".concat(c).concat(l))),d=n&&(n.t("".concat(c).concat(r))||n.t("".concat(c).concat(i))),f=this.get('custom-name');return(t.noCustom?'':f)||u||s||p||(0,e.capitalize)(l)||d||(0,e.capitalize)(a)},o.prototype.getIcon=function(){var t=this.get('icon');return t?t+' ':''},o.prototype.toHTML=function(n){void 0===n&&(n={});var o=this,r=[],i=n.tag||o.get('tagName'),s=o.get('void'),a=n.attributes,l=this.getAttrToHTML();if(delete n.tag,a&&((0,t.isFunction)(a)?l=a(o,l)||{}:(0,e.isObject)(a)&&(l=a)),n.withProps){var c=this.toJSON();(0,t.forEach)(c,(function(n,o){'_'!==o[0]&&['classes','attributes','components'].indexOf(o)<0&&(l["data-gjs-".concat(o)]=(0,t.isArray)(n)||(0,e.isObject)(n)?JSON.stringify(n):n)}))}for(var u in l){var p=l[u];if(!(0,t.isUndefined)(p)&&null!==p)if((0,t.isBoolean)(p))p&&r.push(u);else{var d='';if(n.altQuoteAttr&&(0,t.isString)(p)&&p.indexOf('"')>=0)d="'".concat(p.replace(/'/g,'''),"'");else{var f=(0,t.isString)(p)?p.replace(/"/g,'"'):p;d="\"".concat(f,"\"")}r.push("".concat(u,"=").concat(d))}}var h=r.length?" ".concat(r.join(' ')):'',g=o.getInnerHTML(n),v="<".concat(i).concat(h).concat(s?'/':'',">").concat(g);return!s&&(v+="")),v},o.prototype.getInnerHTML=function(t){return this.__innerHTML(t)},o.prototype.__innerHTML=function(t){void 0===t&&(t={});var e=this.components();return e.length?e.map((function(e){return e.toHTML(t)})).join(''):this.get('content')},o.prototype.getAttrToHTML=function(){var t=this.getAttributes();return delete t.style,t},o.prototype.toJSON=function(e){void 0===e&&(e={});var n=s.Model.prototype.toJSON.call(this,e);if(n.attributes=this.getAttributes(),delete n.attributes.class,delete n.toolbar,delete n.traits,delete n.status,delete n.open,delete n._undoexc,!e.fromUndo){var o=n[Xe],r=n[Ye];r&&(0,t.isArray)(r)&&(n[Ye]=r.filter((function(t){return t})).map((function(t){return t.getId?t.getId():t}))),o&&!(0,t.isString)(o)&&(n[Xe]=o.getId())}return this.em.getConfig().avoidDefaults&&this.getChangedProps(n),n},o.prototype.getChangedProps=function(e){var n=e||s.Model.prototype.toJSON.apply(this),o=(0,t.result)(this,'defaults');return(0,t.forEach)(o,(function(t,e){-1===['type'].indexOf(e)&&n[e]===t&&delete n[e]})),(0,t.isEmpty)(n.type)&&delete n.type,(0,t.forEach)(['attributes','style'],(function(e){(0,t.isEmpty)(o[e])&&(0,t.isEmpty)(n[e])&&delete n[e]})),(0,t.forEach)(['classes','components'],(function(e){(!n[e]||(0,t.isEmpty)(o[e])&&!n[e].length)&&delete n[e]})),n},o.prototype.getId=function(){return(this.get('attributes')||{}).id||this.ccid||this.cid},o.prototype.setId=function(t,e){var n=$e({},this.get('attributes'));return n.id=t,this.set('attributes',n,e),this},o.prototype.getEl=function(t){void 0===t&&(t=void 0);var e=this.getView(t);return e&&e.el},o.prototype.getView=function(t){var e=this.view,n=this.views;return t&&(e=n.filter((function(e){return e._getFrame()===t.view}))[0]),e},o.prototype.getCurrentView=function(){var t=(this.em.get('currentFrame')||{}).model;return this.getView(t)},o.prototype.__getScriptProps=function(){var t=this.props();return(this.get('script-props')||[]).reduce((function(e,n){return e[n]=t[n],e}),{})},o.prototype.getScriptString=function(e){var n=this,o=e||this.get('script')||'';if(!o)return o;if(this.get('script-props'))o=o.toString().trim();else{if('function'==typeof o){var r=o.toString().trim();o=(r=r.replace(/^function[\s\w]*\(\)\s?\{/,'').replace(/\}$/,'')).trim()}var i=this.em.getConfig(),s=Ge(i.tagVarStart||'{[ '),a=Ge(i.tagVarEnd||' ]}'),l=new RegExp("".concat(s,"([\\w\\d-]*)").concat(a),'g');o=o.replace(l,(function(e,o){n.scriptUpdated();var r=n.attributes[o]||'';return(0,t.isArray)(r)||'object'==typeof r?JSON.stringify(r):r}))}return o},o.prototype.emitUpdate=function(t){for(var e,n=[],o=1;o=0&&this.__propSelfToParent({component:this,changed:(e={},e[t]=s,e),options:n[2]||n[1]||{}})},o.prototype.onAll=function(e){return(0,t.isFunction)(e)&&(e(this),this.components().forEach((function(t){return t.onAll(e)}))),this},o.prototype.forEachChild=function(e){(0,t.isFunction)(e)&&this.components().forEach((function(t){e(t),t.forEachChild(e)}))},o.prototype.remove=function(t){var e=this;void 0===t&&(t={});var n=this.em,o=this.collection,r=function(){o&&o.remove(e,$e($e({},t),{action:'remove-component'})),o||(e.components('',t),e.components().removeChildren(e,void 0,t))},i=$e({},t);return[this,n].map((function(t){return t.trigger('component:remove:before',e,r,i)})),!i.abort&&r(),this},o.prototype.move=function(t,e){if(void 0===e&&(e={}),t){var n=e.at,o=this.index(),r=t===this.parent();r&&(o===n||o===n-1)||(r&&n&&n>o&&(e.at=n-1),this.remove({temporary:1}),t.append(this,e),this.emitUpdate())}return this},o.prototype.isInstanceOf=function(t){var e,n,o=null===(n=null===(e=this.em)||void 0===e?void 0:e.Components.getType(t))||void 0===n?void 0:n.model;return!!o&&this instanceof o},o.prototype.isChildOf=function(e){for(var n=(0,t.isString)(e),o=this.parent();o;){if(n){if(o.isInstanceOf(e))return!0}else if(o===e)return!0;o=o.parent()}return!1},o.prototype.resetId=function(t){void 0===t&&(t={});var e=this.em,n=this.getId();if(!n)return this;var r=o.createId(this);this.setId(r);var i=null==e?void 0:e.Css.getIdRule(n),s=null==i?void 0:i.get('selectors').at(0);return null==s||s.set('name',r),this},o.prototype._getStyleRule=function(t){var e=(void 0===t?{}:t).id,n=this.em,o=e||this.getId();return null==n?void 0:n.Css.getIdRule(o)},o.prototype._getStyleSelector=function(t){var e=this._getStyleRule(t);return null==e?void 0:e.get('selectors').at(0)},o.prototype._idUpdated=function(t,e,n){if(void 0===n&&(n={}),!n.idUpdate){var r=this.ccid,i=(this.get('attributes')||{}).id,s=(this.previous('attributes')||{}).id||r,a=o.getList(this);if(a[i]||!i&&s)return this.setId(s,{idUpdate:!0});delete a[s],a[i]=this,this.ccid=i;var l=this._getStyleSelector({id:s});l&&l.set({name:i,label:i})}},o.getDefaults=function(){return(0,t.result)(this.prototype,'defaults')},o.isComponent=function(t){return{tagName:(0,e.toLowerCase)(t.tagName)}},o.ensureInList=function(t){var e=o.getList(t),n=t.getId(),r=e[n];if(r){if(r!==t){var i=o.getIncrementId(n,e);t.setId(i),e[i]=t}}else e[n]=t;t.components().forEach((function(t){return o.ensureInList(t)}))},o.createId=function(t,e){void 0===e&&(e={});var n,r=o.getList(t),i=e.idMap,s=void 0===i?{}:i,a=t.get('attributes').id;return a?(n=o.getIncrementId(a,r,e),t.setId(n),a!==n&&(s[a]=n)):n=o.getNewId(r),r[n]=t,n},o.getNewId=function(t){for(var e=Object.keys(t).length.toString().length+2,n=(Math.random()+1.1).toString(36).slice(-e),r="i".concat(n);t[r];)r=o.getNewId(t);return r},o.getIncrementId=function(t,e,n){void 0===n&&(n={});var o=n.keepIds,r=1,i=t;if((void 0===o?[]:o).indexOf(t)<0)for(;e[i];)r++,i="".concat(t,"-").concat(r);return i},o.getList=function(t){var e=t.opt,n=void 0===e?{}:e,o=n.domc,r=n.em,i=o||(null==r?void 0:r.Components);return i?i.componentsById:{}},o.checkId=function(e,n,r,i){void 0===n&&(n=[]),void 0===r&&(r={}),void 0===i&&(i={});var s=(0,t.isArray)(e)?e:[e],a=i.keepIds,l=void 0===a?[]:a;s.forEach((function(e){e.attributes;var s=e.attributes,a=void 0===s?{}:s,c=e.components,u=a.id;if(u&&r[u]&&l.indexOf(u)<0){var p=o.getIncrementId(u,r);a.id=p,(0,t.isArray)(n)&&n.forEach((function(t){var e=t.selectors;e.forEach((function(t,n){t==="#".concat(u)&&(e[n]="#".concat(p))}))}))}c&&o.checkId(c,n,r,i)}))},o}(_e);const en=tn;var nn=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),on=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.compView=cn,t}return nn(n,e),n.prototype.initialize=function(t){this.opts=t||{},this.config=t.config||{},this.em=this.config.em;var e=this.collection;this.listenTo(e,'add',this.addTo),this.listenTo(e,'reset',this.resetChildren),this.listenTo(e,'remove',this.removeChildren)},n.prototype.removeChildren=function(t,e,n){var o=this;void 0===n&&(n={}),t.views.forEach((function(t){if(t){var e=t.childrenView,n=t.scriptContainer;e&&e.stopListening(),(0,Et.L_)(n),t.remove.apply(t)}})),t.components().forEach((function(t){return o.removeChildren(t,e,n)}))},n.prototype.addTo=function(t,e,n){void 0===e&&(e={}),void 0===n&&(n={});var o=this.em,r=this.collection.indexOf(t);if(this.addToCollection(t,null,r),o&&!n.temporary){var i=function(t){o.trigger('component:add',t),t.components().forEach((function(t){return i(t)}))};i(t)}},n.prototype.addToCollection=function(e,n,o){for(var r=this,i=r.config,s=r.opts,a=r.em,l=n||null,c=i.frameView,u=(null==c?void 0:c.model)&&e.getView(c.model),p=s.componentTypes||(null==a?void 0:a.Components.getTypes()),d=e.get('type')||'default',f=this.compView,h=0;h=c.scrollTop&&l>=c.scrollLeft&&a<=c.scrollBottom&&l<=(null==i?void 0:i.offsetWidth)+r.scrollLeft},o.prototype.scrollIntoView=function(t){var e;void 0===t&&(t={});var n=this.getOffsetRect();if(!this.isInViewport({rect:n})||t.force){var o=this.el;'smooth'!==t.behavior?null===(e=o.ownerDocument.defaultView)||void 0===e||e.scrollTo(0,n.top):o.scrollIntoView(an({behavior:'smooth',block:'nearest'},t))}},o.prototype.reset=function(){var t=this.el;this.el='',this._ensureElement(),this._setData(),(0,Et.dL)(t,this.el),this.render()},o.prototype._setData=function(){var t=this.model,e=t.components();this.$el.data({model:t,collection:e,view:this})},o.prototype._getFrame=function(){var t;return null===(t=this.em)||void 0===t?void 0:t.get('Canvas').config.frameView},o.prototype.renderChildren=function(){this.updateContent();var t=this.getChildrenContainer(),e=this.childrenView||new rn({collection:this.model.get('components'),config:this.config,componentTypes:this.opts.componentTypes});e.render(t),this.childrenView=e;for(var n=Array.prototype.slice.call(e.el.childNodes),o=0,r=n.length;o=0},n}(en);var gn=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();const vn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return gn(e,t),e}(cn);var yn=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),mn=void 0&&(void 0).__assign||function(){return mn=Object.assign||function(t){for(var e,n=1,o=arguments.length;n\n \n "),fallback:"\n \n "),file:''})},enumerable:!1,configurable:!0}),o.prototype.initialize=function(o,r){n.prototype.initialize.call(this,o,r);var i=this.get('attributes').src;i&&(0,e.buildBase64UrlFromSvg)((0,t.result)(this,'defaults').src)!==i&&this.set('src',i,{silent:!0})},o.prototype.initToolbar=function(){n.prototype.initToolbar.call(this);var t=this.em;if(t){var e='image-editor';if(t.Commands.has(e)){for(var o=!1,r=this.get('toolbar'),i=0;i=0)&&delete r.editable}))}return r},o}(lo);const ho=fo;var go=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),vo=void 0&&(void 0).__assign||function(){return vo=Object.assign||function(t){for(var e,n=1,o=arguments.length;n0&&r[r.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]-1;return Sr(Sr({},i),!u||p?{reason:2}:{result:!0})},n.prototype.allById=function(){return this.componentsById},n.prototype.getById=function(t){return this.componentsById[t]||null},n.prototype.destroy=function(){var t,e=this.allById();Object.keys(e).forEach((function(t){return e[t]&&e[t].remove()})),null===(t=this.componentView)||void 0===t||t.remove(),[this.em,this.componentsById,this.componentView].forEach((function(t){return{}}))},n}(b);const kr=Tr;const Pr={stylePrefix:'css-',rules:[]};var Er=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Ar=Number.MAX_VALUE,jr=function(n){function o(){var e=n.call(this)||this;return(0,t.bindAll)(e,'sortRules'),e.compCls=[],e.ids=[],e}return Er(o,n),o.prototype.buildFromModel=function(t,e){var n=this;void 0===e&&(e={});var o='',r=this.em,i=r&&r.getConfig().avoidInlineStyle,s=t.styleToString(),a=t.classes;return this.ids.push("#".concat(t.getId())),a.forEach((function(t){return n.compCls.push(t.getFullName())})),!i&&s&&(o="#".concat(t.getId(),"{").concat(s,"}")),t.components().forEach((function(t){return o+=n.buildFromModel(t,e)})),o},o.prototype.build=function(n,o){var r=this;void 0===o&&(o={});var i=o.json,s=o.em,a=o.cssc||(null==s?void 0:s.Css);this.em=s,this.compCls=[],this.ids=[],this.model=n;var l=[],c=n?this.buildFromModel(n,o):'',u=(0,t.isUndefined)(o.clearStyles)&&s?s.getConfig().clearStyles:o.clearStyles;if(a){var p=o.rules||a.getAll(),d={},f=[];o.onlyMatched&&n&&(0,e.hasWin)()&&(p=this.matchedRules(n,p)),p.forEach((function(t){var e=t.getAtRule();if(e){var n=d[e];n?n.push(t):d[e]=[t]}else{var s=r.buildFromRule(t,f,o);i?l.push(s):c+=s}})),this.sortMediaObject(d).forEach((function(t){var e='',n=t.key;t.value.forEach((function(t){var s=r.buildFromRule(t,f,o);t.get('singleAtRule')?c+="".concat(n,"{").concat(s,"}"):e+=s,i&&l.push(s)})),e&&(c+="".concat(n,"{").concat(e,"}"))})),s&&u&&p.remove&&p.remove(f)}return i?l.filter((function(t){return t})):c},o.prototype.buildFromRule=function(t,e,n){var o,r=this;void 0===n&&(n={});var i,s='',a=this.model,l=t.selectorsToString({skipAdd:1}),c=t.get('selectorsAdd'),u=t.get('singleAtRule');if(null===(o=t.get('selectors'))||void 0===o||o.forEach((function(t){var e=t.getFullName();(r.compCls.indexOf(e)>=0||r.ids.indexOf(e)>=0||n.keepUnusedStyles)&&(i=1)})),l&&i||c||u||!a){var p=t.getDeclaration({body:1});p&&(n.json?s=t:s+=p)}else e.push(t);return s},o.prototype.matchedRules=function(t,e){var n=this,o=t.getEl(),r=[];return e.forEach((function(t){try{t.selectorsToString().split(',').some((function(t){return null==o?void 0:o.matches(n.__cleanSelector(t))}))&&r.push(t)}catch(t){}})),t.components().forEach((function(t){r=r.concat(n.matchedRules(t,e))})),r=r.filter((function(t,e){return r.indexOf(t)===e}))},o.prototype.getQueryLength=function(t){var e=/(-?\d*\.?\d+)\w{0,}/.exec(t);return e?parseFloat(e[1]):Ar},o.prototype.sortMediaObject=function(e){var n=this;void 0===e&&(e={});var o=[];return(0,t.each)(e,(function(t,e){return o.push({key:e,value:t})})),o.sort((function(t,e){var o=[t.key,e.key].every((function(t){return-1!==t.indexOf('min-width')})),r=o?t.key:e.key,i=o?e.key:t.key;return n.getQueryLength(r)-n.getQueryLength(i)}))},o.prototype.sortRules=function(t,e){var n=function(t){return t.get('mediaText')||''},o=[n(t),n(e)].every((function(t){return-1!==t.indexOf('min-width')})),r=n(o?t:e),i=n(o?e:t);return this.getQueryLength(r)-this.getQueryLength(i)},o.prototype.__cleanSelector=function(t){return t.split(' ').map((function(t){return t.split(':')[0]})).join(' ')},o}(u.Hn);const Mr=jr;var Lr=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Dr=void 0&&(void 0).__assign||function(){return Dr=Object.assign||function(t){for(var e,n=1,o=arguments.length;n=0}))},o.prototype.setIdRule=function(e,n,o){void 0===n&&(n={}),void 0===o&&(o={});var r=o.addOpts,i=void 0===r?{}:r,s=o.mediaText,a=o.state||'',l=(0,t.isUndefined)(s)?this.em.getCurrentMedia():s,c=this.em.Selectors.add({name:e,type:Le.TYPE_ID},i),u=this.add(c,a,l,{},i);return u.setStyle(n,Ur(Ur({},o),i)),u},o.prototype.getIdRule=function(e,n){void 0===n&&(n={});var o=n.mediaText,r=n.state||'',i=(0,t.isUndefined)(o)?this.em.getCurrentMedia():o,s=this.em.Selectors.get(e,Le.TYPE_ID);return s&&this.get(s,r,i)},o.prototype.setClassRule=function(t,e,n){void 0===e&&(e={}),void 0===n&&(n={});var o=n.state||'',r=n.mediaText||this.em.getCurrentMedia(),i=this.em.Selectors.add({name:t,type:Le.TYPE_CLASS}),s=this.add(i,o,r);return s.setStyle(e,n),s},o.prototype.getClassRule=function(t,e){void 0===e&&(e={});var n=e.state||'',o=e.mediaText||this.em.getCurrentMedia(),r=this.em.Selectors.get(t,Le.TYPE_CLASS);return r&&this.get(r,n,o)},o.prototype.remove=function(e,n){var o=(0,t.isString)(e)?this.getRules(e):e,r=this.getAll().remove(o,n);return(0,t.isArray)(r)?r:[r]},o.prototype.clear=function(t){return void 0===t&&(t={}),this.getAll().reset([],t),this},o.prototype.getComponentRules=function(e,n){void 0===n&&(n={});var o=n.state,r=n.mediaText;n.current&&(o=this.em.get('state')||'',r=this.em.getCurrentMedia());var i=e.getId();return this.getAll().filter((function(e){return!(!(0,t.isUndefined)(o)&&e.get('state')!==o)&&(!(!(0,t.isUndefined)(r)&&e.get('mediaText')!==r)&&e.getSelectorsString()==="#".concat(i))}))},o.prototype.render=function(){var t;return null===(t=this.rulesView)||void 0===t||t.remove(),this.rulesView=new Rt({collection:this.rules,config:this.config}),this.rulesView.render().el},o.prototype.destroy=function(){var t;this.rules.reset(),this.rules.stopListening(),null===(t=this.rulesView)||void 0===t||t.remove()},o}(b);const qr=$r;const Gr={appendTo:'',blocks:[],appendOnClick:!1,custom:!1};var Kr=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();const Yr=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Kr(n,e),n.prototype.defaults=function(){return{label:'',content:'',media:'',category:'',activate:!1,select:void 0,resetId:!1,disable:!1,onClick:void 0,attributes:{}}},n.prototype.getId=function(){return this.id},n.prototype.getLabel=function(){return this.get('label')},n.prototype.getMedia=function(){return this.get('media')},n.prototype.getContent=function(){return this.get('content')},n.prototype.getCategoryLabel=function(){var e=this.get('category');return(0,t.isFunction)(null==e?void 0:e.get)?e.get('label'):(null==e?void 0:e.label)?null==e?void 0:e.label:e},n}(u.Hn);var Xr=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Jr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Xr(e,t),e}(u.FE);const Zr=Jr;Jr.prototype.model=Yr;var Qr=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();const ti=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Qr(e,t),e.prototype.defaults=function(){return{id:'',label:'',open:!0,attributes:{}}},e}(u.Hn);var ei=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ni=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ei(e,t),e}(u.FE);const oi=ni;ni.prototype.model=ti;var ri=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ii=function(n){function o(t,e){void 0===e&&(e={});var o=n.call(this,t)||this,r=o.model;return o.em=e.em,o.config=e,o.endDrag=o.endDrag.bind(o),o.ppfx=e.pStylePrefix||'',o.listenTo(r,'destroy remove',o.remove),o.listenTo(r,'change',o.render),o}return ri(o,n),o.prototype.events=function(){return{click:'handleClick',mousedown:'startDrag',dragstart:'handleDragStart',drag:'handleDrag',dragend:'handleDragEnd'}},o.prototype.__getModule=function(){return this.em.Blocks},o.prototype.handleClick=function(e){var n=this,o=n.config,r=n.model,i=n.em,s=r.get('onClick')||o.appendOnClick;if(i.trigger('block:click',r,e),s){if((0,t.isFunction)(s))return s(r,null==i?void 0:i.getEditor(),{event:e});var a,l,c=o.getSorter(),u=r.get('content'),p=i.getSelected();if(c.setDropContent(u),p)if(c.validTarget(p.getEl(),u).valid)a=p;else{var d=p.parent();d&&c.validTarget(d.getEl(),u).valid&&(a=d,l=d.components().indexOf(p)+1)}if(!a){var f=i.getWrapper();c.validTarget(f.getEl(),u).valid&&(a=f)}var h=a&&a.append(u,{at:l})[0];h&&i.setSelected(h,{scroll:1})}},o.prototype.startDrag=function(t){var n=this,o=n.config,r=n.em,i=n.model,s=i.get('disable');if(0===t.button&&o.getSorter&&!this.el.draggable&&!s){r.refreshCanvas();var a=o.getSorter();a.__currentBlock=i,a.setDragHelper(this.el,t),a.setDropContent(this.model.get('content')),a.startSort(this.el),(0,e.on)(document,'mouseup',this.endDrag)}},o.prototype.handleDragStart=function(t){this.__getModule().__startDrag(this.model,t)},o.prototype.handleDrag=function(t){this.__getModule().__drag(t)},o.prototype.handleDragEnd=function(){this.__getModule().__endDrag()},o.prototype.endDrag=function(){(0,e.off)(document,'mouseup',this.endDrag);var t=this.config.getSorter();t.moved=0,t.endMove()},o.prototype.render=function(){var t,n=this,o=n.em,r=n.el,i=n.$el,s=n.ppfx,a=n.model,l=a.get('disable'),c=a.get('attributes')||{},u=c.class||'',p="".concat(s,"block"),d=o&&o.t("blockManager.labels.".concat(a.id))||a.get('label'),f=a.get('render'),h=a.get('media'),g=l?"".concat(p,"--disable"):"".concat(s,"four-color-h");i.attr(c),r.className="".concat(u," ").concat(p," ").concat(s,"one-bg ").concat(g).trim(),r.innerHTML="\n ".concat(h?"
").concat(h,"
"):'',"\n
").concat(d,"
\n "),r.title=c.title||(null===(t=r.textContent)||void 0===t?void 0:t.trim()),r.setAttribute('draggable',"".concat(!(!(0,e.hasDnd)(o)||l)));var v=f&&f({el:r,model:a,className:p,prefix:s});return v&&(r.innerHTML=v),this},o}(u.G7);const si=ii;var ai=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),li=void 0&&(void 0).__makeTemplateObject||function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t},ci=function(t){function e(e,n){var o=t.call(this,e)||this;o.config=n;var r=n.pStylePrefix||'';return o.em=n.em,o.pfx=r,o.caretR='fa fa-caret-right',o.caretD='fa fa-caret-down',o.iconClass="".concat(r,"caret-icon"),o.activeClass="".concat(r,"open"),o.className="".concat(r,"block-category"),o.listenTo(o.model,'change:open',o.updateVisibility),o.model.view=o,o}return ai(e,t),e.prototype.events=function(){return{'click [data-title]':'toggle'}},e.prototype.template=function(t){var e=t.pfx,n=t.label;return r(pi||(pi=li(["\n
\n \n ","\n
\n
\n "],["\n
\n \n ","\n
\n
\n "])),e,e,n,e)},e.prototype.attributes=function(){return this.model.get('attributes')||{}},e.prototype.updateVisibility=function(){this.model.get('open')?this.open():this.close()},e.prototype.open=function(){this.$el.addClass(this.activeClass),this.getIconEl().className="".concat(this.iconClass," ").concat(this.caretD),this.getBlocksEl().style.display=''},e.prototype.close=function(){this.$el.removeClass(this.activeClass),this.getIconEl().className="".concat(this.iconClass," ").concat(this.caretR),this.getBlocksEl().style.display='none'},e.prototype.toggle=function(){var t=this.model;t.set('open',!t.get('open'))},e.prototype.getIconEl=function(){return this.iconEl||(this.iconEl=this.el.querySelector(".".concat(this.iconClass))),this.iconEl},e.prototype.getBlocksEl=function(){return this.blocksEl||(this.blocksEl=this.el.querySelector(".".concat(this.pfx,"blocks-c"))),this.blocksEl},e.prototype.append=function(t){this.getBlocksEl().appendChild(t)},e.prototype.render=function(){var t=this,e=t.em,n=t.el,o=t.$el,r=t.model,i=t.pfx,s=e.t("blockManager.categories.".concat(r.id))||r.get('label');return n.innerHTML=this.template({pfx:i,label:s}),o.addClass(this.className),o.css({order:r.get('order')}),this.updateVisibility(),this},e}(u.G7);const ui=ci;var pi,di=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),fi=void 0&&(void 0).__assign||function(){return fi=Object.assign||function(t){for(var e,n=1,o=arguments.length;n\n
\n
\n
\n "),this.collection.each((function(e){return t.add(e,n)})),this.append(n);var o="".concat(this.blockContClass,"s ").concat(e,"one-bg ").concat(e,"two-color");return this.$el.addClass(o),this.rendered=!0,this},n}(u.G7);const gi=hi;var vi=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),yi=void 0&&(void 0).__assign||function(){return yi=Object.assign||function(t){for(var e,n=1,o=arguments.length;n',iconSync:'',iconTagOn:'',iconTagOff:'',iconTagRemove:'',componentFirst:!1,custom:!1};var Ei=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Ai=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ei(e,t),e.prototype.defaults=function(){return{name:'',label:''}},e.prototype.getName=function(){return this.get('name')},e.prototype.getLabel=function(){return this.get('label')||this.getName()},e}(u.Hn);const ji=Ai;Ai.prototype.idAttribute='name';var Mi=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Li=void 0&&(void 0).__makeTemplateObject||function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t},Di='contentEditable',Ni=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e)||this,o=e.config||{};return n.config=o,n.module=e.module,n.coll=e.coll||null,n.pfx=o.stylePrefix||'',n.ppfx=o.pStylePrefix||'',n.em=o.em,n.listenTo(n.model,'change:active',n.updateStatus),n}return Mi(e,t),e.prototype.template=function(){var t=this,e=t.pfx,n=t.model,o=t.config,i=n.get('label')||'';return r(Fi||(Fi=Li(["\n \n ","\n $"," \n "],["\n \n ","\n $"," \n "])),e,e,e,i,e,e,o.iconTagRemove)},e.prototype.events=function(){return{'click [data-tag-remove]':'removeTag','click [data-tag-status]':'changeStatus','dblclick [data-tag-name]':'startEditTag','focusout [data-tag-name]':'endEditTag'}},e.prototype.getInputEl=function(){return this.inputEl||(this.inputEl=this.el.querySelector('[data-tag-name]')),this.inputEl},e.prototype.startEditTag=function(){var t=this.em,e=this.getInputEl();e[Di]='true',e.focus(),null==t||t.setEditing(!0)},e.prototype.endEditTag=function(){var t=this.model,e=this.em,n=this.getInputEl(),o=n.textContent||'',r=null==e?void 0:e.Selectors;n[Di]='false',null==e||e.setEditing(!1),r&&r.rename(t,o)!==t&&(n.innerText=t.get('label'))},e.prototype.changeStatus=function(){var t=this.model;t.set('active',!t.get('active'))},e.prototype.removeTag=function(){this.module.removeSelected(this.model)},e.prototype.updateStatus=function(){var t=this,e=t.model,n=t.$el,o=t.config,r=o.iconTagOn,i=o.iconTagOff,s=n.find('[data-tag-status]');e.get('active')?(s.html(r),n.removeClass('opac50')):(s.html(i),n.addClass('opac50'))},e.prototype.render=function(){var t=this.pfx,e=this.ppfx;return this.$el.html(this.template()),this.$el.attr('class',"".concat(t,"tag ").concat(e,"three-bg")),this.updateStatus(),this},e}(u.G7);const Ii=Ni;var Fi,Vi=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Ri=void 0&&(void 0).__makeTemplateObject||function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t},Hi=function(e){function n(n){void 0===n&&(n={});var o=e.call(this,n)||this;o.config=n.config||{},o.pfx=o.config.stylePrefix||'',o.ppfx=o.config.pStylePrefix||'',o.className=o.pfx+'tags',o.stateInputId=o.pfx+'states',o.stateInputC=o.pfx+'input-c',o.states=o.config.states||[];var r=o.config.em,i=o.collection;o.target=r;var s=r.Selectors;o.module=s,o.em=r,o.componentChanged=(0,t.debounce)(o.componentChanged.bind(o),0),o.checkSync=(0,t.debounce)(o.checkSync.bind(o),0);return o.listenTo(r,'component:toggled component:update:classes',o.componentChanged),o.listenTo(r,'styleManager:update',o.componentChanged),o.listenTo(r,'component:update:classes change:state',o.__handleStateChange),o.listenTo(r,'styleable:change change:device',o.checkSync),o.listenTo(i,'add',o.addNew),o.listenTo(i,'reset',o.renderClasses),o.listenTo(i,'remove',o.tagRemoved),o.listenTo(s.getAll(),s.events.state,(0,t.debounce)((function(){return o.renderStates()}),0)),o.delegateEvents(),o}return Vi(n,e),n.prototype.template=function(t){var e=t.labelInfo,n=t.labelHead,o=t.iconSync,i=t.iconAdd,s=t.pfx,a=t.ppfx;return r(Bi||(Bi=Ri(["
\n
","
\n
\n \n
\n \n \n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n $"," \n $"," \n
\n
\n
",":
\n
\n
"],["
\n
","
\n
\n \n
\n \n \n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n $"," \n $"," \n
\n
\n
",":
\n
\n
"])),s,s,s,s,n,s,s,s,a,a,a,s,a,a,s,a,s,s,s,s,s,i,s,s,o,s,s,e,s)},n.prototype.events=function(){return{'change [data-states]':'stateChanged','click [data-add]':'startNewTag','focusout [data-input]':'endNewTag','keyup [data-input]':'onInputKeyUp','click [data-sync-style]':'syncStyle'}},n.prototype.syncStyle=function(){var t,e=this.em,n=this.getTarget(),o=e.Css,r=this.getCommonSelectors({opts:{noDisabled:1}}),i=e.get('state'),s=e.getCurrentMedia(),a=[],l=o.get(r,i,s)||o.add(r,i,s);this.getTargets().forEach((function(e){var n=o.getIdRule(e.getId(),{state:i,mediaText:s});t=n.getStyle(),n.setStyle({}),a.push(n)})),t&&l.addStyle(t),e.trigger('component:toggled'),e.trigger('component:sync-style',{component:n,selectors:r,mediaText:s,rule:l,ruleComponents:a,state:i})},n.prototype.tagRemoved=function(t){this.updateStateVis()},n.prototype.addNew=function(t){this.addToClasses(t)},n.prototype.startNewTag=function(){var t,e;null===(t=this.$addBtn)||void 0===t||t.css({display:'none'}),null===(e=this.$input)||void 0===e||e.show().focus()},n.prototype.endNewTag=function(){var t,e;null===(t=this.$addBtn)||void 0===t||t.css({display:''}),null===(e=this.$input)||void 0===e||e.hide().val('')},n.prototype.onInputKeyUp=function(t){var e;13===t.keyCode?(t.preventDefault(),this.addNewTag(null===(e=this.$input)||void 0===e?void 0:e.val())):27===t.keyCode&&this.endNewTag()},n.prototype.checkStates=function(){var t=this.em.getState(),e=this.getStates();e&&e.val(t)},n.prototype.componentChanged=function(t){var e=(void 0===t?{}:t).targets;this.updateSelection(e)},n.prototype.updateSelection=function(e){var n=e||this.getTargets(),o=[];return(n=(0,t.isArray)(n)?n:[n])&&n.length&&(o=this.getCommonSelectors({targets:n}),this.checkSync({validSelectors:o})),this.collection.reset(o),this.updateStateVis(n),this.module.__trgCustom(),o},n.prototype.getCommonSelectors=function(t){var e=void 0===t?{}:t,n=e.targets,o=e.opts,r=void 0===o?{}:o,i=n||this.getTargets();return this.module.__getCommonSelectors(i,r)},n.prototype._commonSelectors=function(){for(var t,e=[],n=0;n",""],["",""])),i,e);else{var u=null==e?void 0:e.getSelectors();if(!u)return'';var p=u.getStyleable(),d=a.get('state'),f=e.getId?r(Wi||(Wi=Ri(["","\n #",""],["","\n #",""])),i,e.getName(),i,e.getId()):'';n=(n=this.collection.getFullString(p))?r($i||($i=Ri(["",""],["",""])),i,n):e.get('selectorsAdd')||f,n=c&&f?f:n,n+=d?r(qi||(qi=Ri([":",""],[":",""])),i,d):'',n=l?l({result:n,state:d,target:e}):n}return n&&"").concat(n,"")},n.prototype.stateChanged=function(t){var e=this.em,n=t.target.value;e.set('state',n)},n.prototype.addNewTag=function(t){var e=t.trim();e&&(this.module.addSelected({label:e}),this.endNewTag())},n.prototype.addToClasses=function(t,e){var n=e,o=this.getClasses(),r=new Ii({model:t,config:this.config,coll:this.collection,module:this.module}).render().el;return n?n.appendChild(r):o.append(r),r},n.prototype.renderClasses=function(){var t=this,e=document.createDocumentFragment(),n=this.getClasses();n.empty(),this.collection.each((function(n){return t.addToClasses(n,e)})),n.append(e)},n.prototype.getClasses=function(){return this.$el.find('[data-selectors]')},n.prototype.getStates=function(){if(!this.$states){var t=this.$el.find('[data-states]');this.$states=t[0]&&t}return this.$states},n.prototype.getStatesC=function(){return this.$statesC||(this.$statesC=this.$el.find('#'+this.stateInputC)),this.$statesC},n.prototype.renderStates=function(){var t=this.module,e=this.em,n=e.t('selectorManager.emptyState'),o=t.getStates().map((function(t){var n=e.t("selectorManager.states.".concat(t.id))||t.getLabel()||t.id;return"")})).join(''),r=this.getStates();r&&r.html("").concat(o)),this.checkStates()},n.prototype.render=function(){var t=this,e=t.em,n=t.pfx,o=t.ppfx,r=t.config,i=t.$el,s=t.el,a=r.render,l={iconSync:r.iconSync,iconAdd:r.iconAdd,labelHead:e.t('selectorManager.label'),labelInfo:e.t('selectorManager.selected'),ppfx:o,pfx:n,el:s};i.html(this.template(l));var c=a&&a(l);return c&&c!==s&&i.empty().append(c),this.$input=i.find('[data-input]'),this.$addBtn=i.find('[data-add]'),this.$classes=i.find('#'+n+'tags-c'),this.$btnSyncEl=i.find('[data-sync-style]'),this.$input.hide(),this.renderStates(),this.renderClasses(),i.attr('class',"".concat(this.className," ").concat(o,"one-bg ").concat(o,"two-color")),this},n}(u.G7);const zi=Hi;var Bi,Ui,Wi,$i,qi,Gi=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Ki=void 0&&(void 0).__assign||function(){return Ki=Object.assign||function(t){for(var e,n=1,o=arguments.length;n=0})):e.slice(1).reduce((function(e,n){return t.__common(e,n)}),e[0]):[]},o.prototype.__updateSelectedByComponents=function(){this.selected.reset(this.__getCommon())},o}(b);const ls=as;const cs={textTags:['br','b','i','u','a','ul','ol'],parserCss:void 0,parserHtml:void 0,optionsHtml:{htmlType:'text/html',allowScripts:!1,allowUnsafeAttr:!1,keepEmptyTextNodes:!1}};var us={4:'media',5:'font-face',6:'page',7:'keyframes',11:'counter-style',12:'supports',13:'document',14:'font-feature-values',15:'viewport'},ps=(0,t.keys)(us),ds=['5','6','11','15'],fs=['font-face','page','counter-style','viewport'],hs=function(t){void 0===t&&(t='');for(var e=[],n=[],o=t.split(','),r=0,i=o.length;r=0&&(o.singleAtRule=!0),l&&(o.atRuleType=l),c&&(o.selectorsAdd=c),u&&(o.mediaText=u),a&&(t[r-1]=s[0],o.state=a,s.splice(s.length-1,1)),o.selectors=t,o.style=e,o},ms=function(t){for(var e=[],n=t.cssRules||[],o=0,r=n.length;o=0;if(p)a=!0,l=us[s],c=vs(i);else if(ps.indexOf(s)>=0){var d=ms(i);c=vs(i);for(var f=0,h=d.length;f0&&r[r.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]0&&r[r.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]0&&r[r.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]").concat(n,"")},o.prototype.templateInput=function(t){var e=this.clsField;return"
")},o.prototype.getClbOpts=function(){return{component:this.target,trait:this.model,elInput:this.getInputElem()}},o.prototype.removeView=function(){this.remove(),this.removed()},o.prototype.init=function(){},o.prototype.removed=function(){},o.prototype.onRender=function(t){},o.prototype.onUpdate=function(t){},o.prototype.onEvent=function(t){},o.prototype.onChange=function(e){var n=this.getInputElem();n&&!(0,t.isUndefined)(n.value)&&this.model.set('value',n.value),this.onEvent(ca(ca({},this.getClbOpts()),{event:e}))},o.prototype.getValueForTarget=function(){return this.model.get('value')},o.prototype.setInputValue=function(t){var e=this.getInputElem();e&&(e.value=t)},o.prototype.onValueChange=function(t,e,n){if(void 0===n&&(n={}),n.fromTarget)this.setInputValue(t.get('value')),this.postUpdate();else{var o=this.getValueForTarget();t.setTargetValue(o,n)}},o.prototype.renderLabel=function(){var t=this.$el,e=this.target,n=this.getLabel(),o=this.templateLabel(e);this.createLabel&&(o=this.createLabel({label:n,component:e,trait:this})||''),t.find('[data-label]').append(o)},o.prototype.getLabel=function(){var t=this.em,n=this.model.attributes,o=n.label,r=n.name;return t.t("traitManager.traits.labels.".concat(r))||(0,e.capitalize)(o||r).replace(/-/g,' ')},o.prototype.getComponent=function(){return this.target},o.prototype.getInputEl=function(){if(!this.$input){var e=this.em,n=this.model,o=n,r=n.attributes.name,i=o.get('placeholder')||o.get('default')||'',s=o.get('type')||'text',a=o.get('min'),c=o.get('max'),u=this.getModelValue(),p=(0,l["default"])("")),d=e.t("traitManager.traits.attributes.".concat(r))||{};p.attr(ca({placeholder:i},d)),(0,t.isUndefined)(u)||(o.set({value:u},{silent:!0}),p.prop('value',u)),a&&p.prop('min',a),c&&p.prop('max',c),this.$input=p}return this.$input.get(0)},o.prototype.getInputElem=function(){var t=this.input,e=this.$input;return t||e&&e.get&&e.get(0)||this.getElInput()},o.prototype.getModelValue=function(){var e,n=this.model,o=this.target,r=n.getName();if(n.get('changeProp'))e=o.get(r);else{var i=o.get('attributes');e=n.get('value')||i[r]}return(0,t.isUndefined)(e)?'':e},o.prototype.getElInput=function(){return this.elInput},o.prototype.renderField=function(){var e=this,n=e.$el,o=e.appendInput,r=e.model,i=n.find('[data-input]'),s=i[i.length-1],a=r.el;a||(a=this.createInput?this.createInput(this.getClbOpts()):this.getInputEl()),(0,t.isString)(a)?(s.innerHTML=a,this.elInput=s.firstChild):(o?s.appendChild(a):s.insertBefore(a,s.firstChild),this.elInput=a),r.el=this.elInput},o.prototype.hasLabel=function(){var t=this.model.attributes.label;return!this.noLabel&&!1!==t},o.prototype.rerender=function(){delete this.model.el,this.render()},o.prototype.postUpdate=function(){this.onUpdate(this.getClbOpts())},o.prototype.render=function(){var e=this,n=e.$el,o=e.pfx,r=e.ppfx,i=e.model.attributes,s=i.type,a=i.id,l=this.hasLabel&&this.hasLabel(),c="".concat(o,"trait");delete this.$input;var u="
\n ").concat(l?"
"):'',"\n
\n ").concat(this.templateInput?(0,t.isFunction)(this.templateInput)?this.templateInput(this.getClbOpts()):this.templateInput:'',"\n
\n
");return n.empty().append(u),l&&this.renderLabel(),this.renderField(),this.el.className="".concat(c,"__wrp ").concat(c,"__wrp-").concat(a),this.postUpdate(),this.onRender(this.getClbOpts()),this},o}(u.G7);const pa=ua;ua.prototype.eventCapture=['change'];var da=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),fa=function(t){function e(e,n){void 0===e&&(e={});var o=t.call(this,e)||this;o.reuseView=!0,o.itemsView=n;var r=e.config||{},i=r.stylePrefix||'',s=e.editor;return o.config=r,o.em=s,o.pfx=i,o.ppfx=r.pStylePrefix||'',o.className="".concat(i,"traits"),o.listenTo(s,'component:toggled',o.updatedCollection),o.updatedCollection(),o}return da(e,t),e.prototype.updatedCollection=function(){var t=this,e=t.ppfx,n=t.className,o=t.em.getSelected();this.el.className="".concat(n," ").concat(e,"one-bg ").concat(e,"two-color"),this.collection=o?o.traits:[],this.render()},e}(aa.Z);const ha=fa;fa.prototype.itemView=pa;var ga=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();const va=function(e){function n(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.listenTo(n.model,'change:options',n.rerender),n}return ga(n,e),n.prototype.templateInput=function(){var t=this.ppfx,e=this.clsField;return"
\n
\n
\n
\n
\n
")},n.prototype.getInputEl=function(){if(!this.$input){var e=this.model,n=this.em,o=e.get('name'),r=e.get('options')||[],i=[],s='',this.$input=(0,l["default"])(s);var a=e.getTargetValue(),c=i.indexOf(a)>=0?a:e.get('default');!(0,t.isUndefined)(c)&&this.$input.val(c)}return this.$input.get(0)},n}(pa);var ya=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();const ma=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.appendInput=!1,t}return ya(n,e),n.prototype.templateInput=function(){var t=this.ppfx,e=this.clsField;return"")},n.prototype.onChange=function(){this.model.set('value',this.getInputElem().checked)},n.prototype.setInputValue=function(t){var e=this.getInputElem();e&&(e.checked=!!t)},n.prototype.getInputEl=function(){for(var e=[],n=0;n")},e.prototype.inputClass=function(){return"".concat(this.ppfx,"field")},e.prototype.holderClass=function(){return"".concat(this.ppfx,"input-holder")},e.prototype.elementUpdated=function(){this.model.trigger('el:change')},e.prototype.setValue=function(t,e){var n=this.model,o=t||n.get('defaults'),r=this.getInputEl();r&&(r.value=o)},e.prototype.handleModelChange=function(t,e,n){this.setValue(e,n)},e.prototype.handleChange=function(t){t.stopPropagation();var e=this.getInputEl().value;this.__onInputChange(e),this.elementUpdated()},e.prototype.__onInputChange=function(t){this.model.set({value:t},{fromInput:1})},e.prototype.getInputEl=function(){if(!this.inputEl){var t=this.model,e=this.opts.type||'text',n=t.get('placeholder')||t.get('defaults')||t.get('default')||'';this.inputEl=(0,l["default"])(""))}return this.inputEl.get(0)},e.prototype.render=function(){this.inputEl=null;var t=this.$el;return t.addClass(this.inputClass()),t.html(this.template()),t.find(".".concat(this.holderClass())).append(this.getInputEl()),this},e}(u.G7);const wa=_a;_a.prototype.events={change:'handleChange'};var xa=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Ca=function(n){function o(e){void 0===e&&(e={});var o=n.call(this,e)||this;return(0,t.bindAll)(o,'moveIncrement','upIncrement'),o.doc=document,o.listenTo(o.model,'change:unit',o.handleModelChange),o}return xa(o,n),o.prototype.template=function(){var t=this.ppfx;return"\n \n \n
\n
\n
\n
\n ")},o.prototype.inputClass=function(){var t=this.ppfx;return this.opts.contClass||"".concat(t,"field ").concat(t,"field-integer")},o.prototype.setValue=function(t,e){var n=e||{},o=this.validateInputValue(t,{deepCheck:1}),r={value:o.value,unit:''};(o.unit||o.force)&&(r.unit=o.unit),this.model.set(r,n),n.silent&&this.handleModelChange()},o.prototype.handleChange=function(t){t.stopPropagation(),this.setValue(this.getInputEl().value),this.elementUpdated()},o.prototype.handleUnitChange=function(t){t.stopPropagation();var e=this.getUnitEl().value;this.model.set('unit',e),this.elementUpdated()},o.prototype.handleKeyDown=function(t){'ArrowUp'===t.key&&(t.preventDefault(),this.upArrowClick()),'ArrowDown'===t.key&&(t.preventDefault(),this.downArrowClick())},o.prototype.elementUpdated=function(){this.model.trigger('el:change')},o.prototype.handleModelChange=function(){var t=this.model;this.getInputEl().value=t.get('value');var e=this.getUnitEl();e&&(e.value=t.get('unit')||'')},o.prototype.getUnitEl=function(){if(!this.unitEl){var t=this.model,e=t.get('units')||[];if(e.length){var n=[''];e.forEach((function(e){var o=e==t.get('unit')?'selected':'';n.push(""))}));var o=document.createElement('div');o.innerHTML=""),this.unitEl=o.firstChild}}return this.unitEl},o.prototype.upArrowClick=function(){var t=this.model,e=t.get('step'),n=parseFloat(t.get('value'));this.setValue(this.normalizeValue(n+e)),this.elementUpdated()},o.prototype.downArrowClick=function(){var t=this.model,e=t.get('step'),n=parseFloat(t.get('value'));this.setValue(this.normalizeValue(n-e)),this.elementUpdated()},o.prototype.downIncrement=function(t){t.preventDefault(),this.moved=!1;var n=this.model.get('value')||0;n=this.normalizeValue(n),this.current={y:t.pageY,val:n},(0,e.on)(this.doc,'mousemove',this.moveIncrement),(0,e.on)(this.doc,'mouseup',this.upIncrement)},o.prototype.moveIncrement=function(t){this.moved=!0;var e=this.model,n=e.get('step'),o=this.current,r=this.normalizeValue(o.val+(o.y-t.pageY)*n),i=this.validateInputValue(r),s=i.value,a=i.unit;return this.prValue=s,e.set({value:s,unit:a},{avoidStore:1}),!1},o.prototype.upIncrement=function(){var t=this.model,n=t.get('step');if((0,e.off)(this.doc,'mouseup',this.upIncrement),(0,e.off)(this.doc,'mousemove',this.moveIncrement),this.prValue&&this.moved){var o=this.prValue-n;t.set('value',o,{avoidStore:1}).set('value',o+n),this.elementUpdated()}},o.prototype.normalizeValue=function(t,e){void 0===e&&(e=0);var n=this.model.get('step'),o=0;if(isNaN(t))return e;if(t=parseFloat(t),Math.floor(t)!==t){var r=n.toString().split('.')[1];o=r?r.length:0}return o?parseFloat(t.toFixed(o)):t},o.prototype.validateInputValue=function(e,n){void 0===n&&(n={});var o=0,r=n||{},i=this.model,s='',a=(0,t.isUndefined)(e)?s:e,l=n.units||i.get('units')||[],c=i.get('unit')||l.length&&l[0]||'',u=(0,t.isUndefined)(n.max)?i.get('max'):n.max,p=(0,t.isUndefined)(n.min)?i.get('min'):n.min,d=!!i.get('limitlessMax'),f=!!i.get('limitlessMin');if(r.deepCheck){var h=i.get('fixedValues')||[];if(''===a&&(c=''),a){var g=new RegExp('^'+h.join('|'),'g');if(h.length&&g.test(a))a=a.match(g)[0],c='',o=1;else{var v=a+'';a+='',a=parseFloat(a.replace(',','.')),a=isNaN(a)?s:a;var y=v.replace(a,'');(0,t.indexOf)(l,y)>=0&&(c=y)}}}return d||(0,t.isUndefined)(u)||''===u||(a=a>u?u:a),f||(0,t.isUndefined)(p)||''===p||(a=a","
","
▼
",''].join(''),l=function(){var t='';if(i)for(var e=1;e<=6;e++)t+="
";return["
","
","
","
","",'
','
',"
","
","
","
","
","
","
","
",'
','
','
',"
",'
',"
","
",t,'
','
',"
",'
',"
","",'
',"
","
","","",'
','
','
'].join('')}(),c='spectrum.id';t.fn.spectrum=function(e,n){if('string'==typeof e){var o=this,i=Array.prototype.slice.call(arguments,1);return this.each((function(){var n=r[t(this).data(c)];if(n){var s=n[e];if(!s)throw new Error("Spectrum: no such method: '"+e+"'");'get'==e?o=n.get():'container'==e?o=n.container:'option'==e?o=n.option.apply(n,i):'destroy'==e?(n.destroy(),t(this).removeData(c)):s.apply(n,i)}})),o}return this.spectrum('destroy').each((function(){var n=T(this,t.extend({},e,t(this).data()));t(this).data(c,n.id)}))},t.fn.spectrum.load=!0,t.fn.spectrum.loadOpts={},t.fn.spectrum.draggable=A,t.fn.spectrum.defaults=o,t.fn.spectrum.inputTypeColorSupport=function e(){if(void 0===e._cachedResult){var n=t("")[0];e._cachedResult='color'===n.type&&''!==n.value}return e._cachedResult},t.spectrum={},t.spectrum.localization={},t.spectrum.palettes={},t.fn.spectrum.processNativeColorInputs=function(){var e=t('input[type=color]');e.length&&!j()&&e.spectrum({preferredFormat:'hex6'})};var u=/^[\s,#]+/,p=/\s+$/,d=0,f=Math,h=f.round,g=f.min,v=f.max,y=f.random,m=function(t,e){if(e=e||{},(t=t||'')instanceof m)return t;if(!(this instanceof m))return new m(t,e);var n=function(t){var e={r:0,g:0,b:0},n=1,o=!1,r=!1;'string'==typeof t&&(t=function(t){t=t.replace(u,'').replace(p,'').toLowerCase();var e,n=!1;if(x[t])t=x[t],n=!0;else if('transparent'==t)return{r:0,g:0,b:0,a:0,format:'name'};if(e=S.rgb.exec(t))return{r:e[1],g:e[2],b:e[3]};if(e=S.rgba.exec(t))return{r:e[1],g:e[2],b:e[3],a:e[4]};if(e=S.hsl.exec(t))return{h:e[1],s:e[2],l:e[3]};if(e=S.hsla.exec(t))return{h:e[1],s:e[2],l:e[3],a:e[4]};if(e=S.hsv.exec(t))return{h:e[1],s:e[2],v:e[3]};if(e=S.hsva.exec(t))return{h:e[1],s:e[2],v:e[3],a:e[4]};if(e=S.hex8.exec(t))return{a:et(e[1]),r:Z(e[2]),g:Z(e[3]),b:Z(e[4]),format:n?'name':'hex8'};if(e=S.hex6.exec(t))return{r:Z(e[1]),g:Z(e[2]),b:Z(e[3]),format:n?'name':'hex'};if(e=S.hex3.exec(t))return{r:Z(e[1]+''+e[1]),g:Z(e[2]+''+e[2]),b:Z(e[3]+''+e[3]),format:n?'name':'hex'};return!1}(t));'object'==typeof t&&(t.hasOwnProperty('r')&&t.hasOwnProperty('g')&&t.hasOwnProperty('b')?(i=t.r,s=t.g,a=t.b,e={r:255*X(i,255),g:255*X(s,255),b:255*X(a,255)},o=!0,r='%'===String(t.r).substr(-1)?'prgb':'rgb'):t.hasOwnProperty('h')&&t.hasOwnProperty('s')&&t.hasOwnProperty('v')?(t.s=tt(t.s),t.v=tt(t.v),e=function(t,e,n){t=6*X(t,360),e=X(e,100),n=X(n,100);var o=f.floor(t),r=t-o,i=n*(1-e),s=n*(1-r*e),a=n*(1-(1-r)*e),l=o%6,c=[n,s,i,i,a,n][l],u=[a,n,n,s,i,i][l],p=[i,i,a,n,n,s][l];return{r:255*c,g:255*u,b:255*p}}(t.h,t.s,t.v),o=!0,r='hsv'):t.hasOwnProperty('h')&&t.hasOwnProperty('s')&&t.hasOwnProperty('l')&&(t.s=tt(t.s),t.l=tt(t.l),e=function(t,e,n){var o,r,i;function s(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}if(t=X(t,360),e=X(e,100),n=X(n,100),0===e)o=r=i=n;else{var a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;o=s(l,a,t+1/3),r=s(l,a,t),i=s(l,a,t-1/3)}return{r:255*o,g:255*r,b:255*i}}(t.h,t.s,t.l),o=!0,r='hsl'),t.hasOwnProperty('a')&&(n=t.a));var i,s,a;return n=Y(n),{ok:o,format:t.format||r,r:g(255,v(e.r,0)),g:g(255,v(e.g,0)),b:g(255,v(e.b,0)),a:n}}(t);this._originalInput=t,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=h(100*this._a)/100,this._format=e.format||n.format,this._gradientType=e.gradientType,this._r<1&&(this._r=h(this._r)),this._g<1&&(this._g=h(this._g)),this._b<1&&(this._b=h(this._b)),this._ok=n.ok,this._tc_id=d++};m.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},setAlpha:function(t){return this._a=Y(t),this._roundA=h(100*this._a)/100,this},toHsv:function(){var t=L(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=L(this._r,this._g,this._b),e=h(360*t.h),n=h(100*t.s),o=h(100*t.v);return 1==this._a?'hsv('+e+', '+n+'%, '+o+'%)':'hsva('+e+', '+n+'%, '+o+'%, '+this._roundA+')'},toHsl:function(){var t=M(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=M(this._r,this._g,this._b),e=h(360*t.h),n=h(100*t.s),o=h(100*t.l);return 1==this._a?'hsl('+e+', '+n+'%, '+o+'%)':'hsla('+e+', '+n+'%, '+o+'%, '+this._roundA+')'},toHex:function(t){return D(this._r,this._g,this._b,t)},toHexString:function(t){return'#'+this.toHex(t)},toHex8:function(){return N(this._r,this._g,this._b,this._a)},toHex8String:function(){return'#'+this.toHex8()},toRgb:function(){return{r:h(this._r),g:h(this._g),b:h(this._b),a:this._a}},toRgbString:function(){return 1==this._a?'rgb('+h(this._r)+', '+h(this._g)+', '+h(this._b)+')':'rgba('+h(this._r)+', '+h(this._g)+', '+h(this._b)+', '+this._roundA+')'},toPercentageRgb:function(){return{r:h(100*X(this._r,255))+'%',g:h(100*X(this._g,255))+'%',b:h(100*X(this._b,255))+'%',a:this._a}},toPercentageRgbString:function(){return 1==this._a?'rgb('+h(100*X(this._r,255))+'%, '+h(100*X(this._g,255))+'%, '+h(100*X(this._b,255))+'%)':'rgba('+h(100*X(this._r,255))+'%, '+h(100*X(this._g,255))+'%, '+h(100*X(this._b,255))+'%, '+this._roundA+')'},toName:function(){return 0===this._a?'transparent':!(this._a<1)&&(C[D(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e='#'+N(this._r,this._g,this._b,this._a),n=e,o=this._gradientType?'GradientType = 1, ':'';t&&(n=m(t).toHex8String());return'progid:DXImageTransform.Microsoft.gradient('+o+'startColorstr='+e+',endColorstr='+n+')'},toString:function(t){var e=!!t;t=t||this._format;var n=!1,o=this._a<1&&this._a>=0;return e||!o||'hex'!==t&&'hex6'!==t&&'hex3'!==t&&'name'!==t?('rgb'===t&&(n=this.toRgbString()),'prgb'===t&&(n=this.toPercentageRgbString()),'hex'!==t&&'hex6'!==t||(n=this.toHexString()),'hex3'===t&&(n=this.toHexString(!0)),'hex8'===t&&(n=this.toHex8String()),'name'===t&&(n=this.toName()),'hsl'===t&&(n=this.toHslString()),'hsv'===t&&(n=this.toHsvString()),n||this.toHexString()):'name'===t&&0===this._a?this.toName():this.toRgbString()},_applyModification:function(t,e){var n=t.apply(null,[this].concat([].slice.call(e)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(R,arguments)},brighten:function(){return this._applyModification(H,arguments)},darken:function(){return this._applyModification(z,arguments)},desaturate:function(){return this._applyModification(I,arguments)},saturate:function(){return this._applyModification(F,arguments)},greyscale:function(){return this._applyModification(V,arguments)},spin:function(){return this._applyModification(B,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(G,arguments)},complement:function(){return this._applyCombination(U,arguments)},monochromatic:function(){return this._applyCombination(K,arguments)},splitcomplement:function(){return this._applyCombination(q,arguments)},triad:function(){return this._applyCombination(W,arguments)},tetrad:function(){return this._applyCombination($,arguments)}},m.fromRatio=function(t,e){if('object'==typeof t){var n={};for(var o in t)t.hasOwnProperty(o)&&(n[o]='a'===o?t[o]:tt(t[o]));t=n}return m(t,e)},m.equals=function(t,e){return!(!t||!e)&&m(t).toRgbString()==m(e).toRgbString()},m.random=function(){return m.fromRatio({r:y(),g:y(),b:y()})},m.mix=function(t,e,n){n=0===n?0:n||50;var o,r=m(t).toRgb(),i=m(e).toRgb(),s=n/100,a=2*s-1,l=i.a-r.a,c=1-(o=((o=a*l==-1?a:(a+l)/(1+a*l))+1)/2),u={r:i.r*o+r.r*c,g:i.g*o+r.g*c,b:i.b*o+r.b*c,a:i.a*s+r.a*(1-s)};return m(u)},m.readability=function(t,e){var n=m(t),o=m(e),r=n.toRgb(),i=o.toRgb(),s=n.getBrightness(),a=o.getBrightness(),l=Math.max(r.r,i.r)-Math.min(r.r,i.r)+Math.max(r.g,i.g)-Math.min(r.g,i.g)+Math.max(r.b,i.b)-Math.min(r.b,i.b);return{brightness:Math.abs(s-a),color:l}},m.isReadable=function(t,e){var n=m.readability(t,e);return n.brightness>125&&n.color>500},m.mostReadable=function(t,e){for(var n=null,o=0,r=!1,i=0;i125&&s.color>500,l=3*(s.brightness/125)+s.color/500;(a&&!r||a&&r&&l>o||!a&&!r&&l>o)&&(r=a,o=l,n=m(e[i]))}return n};var b,_,w,x=m.names={aliceblue:'f0f8ff',antiquewhite:'faebd7',aqua:'0ff',aquamarine:'7fffd4',azure:'f0ffff',beige:'f5f5dc',bisque:'ffe4c4',black:'000',blanchedalmond:'ffebcd',blue:'00f',blueviolet:'8a2be2',brown:'a52a2a',burlywood:'deb887',burntsienna:'ea7e5d',cadetblue:'5f9ea0',chartreuse:'7fff00',chocolate:'d2691e',coral:'ff7f50',cornflowerblue:'6495ed',cornsilk:'fff8dc',crimson:'dc143c',cyan:'0ff',darkblue:'00008b',darkcyan:'008b8b',darkgoldenrod:'b8860b',darkgray:'a9a9a9',darkgreen:'006400',darkgrey:'a9a9a9',darkkhaki:'bdb76b',darkmagenta:'8b008b',darkolivegreen:'556b2f',darkorange:'ff8c00',darkorchid:'9932cc',darkred:'8b0000',darksalmon:'e9967a',darkseagreen:'8fbc8f',darkslateblue:'483d8b',darkslategray:'2f4f4f',darkslategrey:'2f4f4f',darkturquoise:'00ced1',darkviolet:'9400d3',deeppink:'ff1493',deepskyblue:'00bfff',dimgray:'696969',dimgrey:'696969',dodgerblue:'1e90ff',firebrick:'b22222',floralwhite:'fffaf0',forestgreen:'228b22',fuchsia:'f0f',gainsboro:'dcdcdc',ghostwhite:'f8f8ff',gold:'ffd700',goldenrod:'daa520',gray:'808080',green:'008000',greenyellow:'adff2f',grey:'808080',honeydew:'f0fff0',hotpink:'ff69b4',indianred:'cd5c5c',indigo:'4b0082',ivory:'fffff0',khaki:'f0e68c',lavender:'e6e6fa',lavenderblush:'fff0f5',lawngreen:'7cfc00',lemonchiffon:'fffacd',lightblue:'add8e6',lightcoral:'f08080',lightcyan:'e0ffff',lightgoldenrodyellow:'fafad2',lightgray:'d3d3d3',lightgreen:'90ee90',lightgrey:'d3d3d3',lightpink:'ffb6c1',lightsalmon:'ffa07a',lightseagreen:'20b2aa',lightskyblue:'87cefa',lightslategray:'789',lightslategrey:'789',lightsteelblue:'b0c4de',lightyellow:'ffffe0',lime:'0f0',limegreen:'32cd32',linen:'faf0e6',magenta:'f0f',maroon:'800000',mediumaquamarine:'66cdaa',mediumblue:'0000cd',mediumorchid:'ba55d3',mediumpurple:'9370db',mediumseagreen:'3cb371',mediumslateblue:'7b68ee',mediumspringgreen:'00fa9a',mediumturquoise:'48d1cc',mediumvioletred:'c71585',midnightblue:'191970',mintcream:'f5fffa',mistyrose:'ffe4e1',moccasin:'ffe4b5',navajowhite:'ffdead',navy:'000080',oldlace:'fdf5e6',olive:'808000',olivedrab:'6b8e23',orange:'ffa500',orangered:'ff4500',orchid:'da70d6',palegoldenrod:'eee8aa',palegreen:'98fb98',paleturquoise:'afeeee',palevioletred:'db7093',papayawhip:'ffefd5',peachpuff:'ffdab9',peru:'cd853f',pink:'ffc0cb',plum:'dda0dd',powderblue:'b0e0e6',purple:'800080',rebeccapurple:'663399',red:'f00',rosybrown:'bc8f8f',royalblue:'4169e1',saddlebrown:'8b4513',salmon:'fa8072',sandybrown:'f4a460',seagreen:'2e8b57',seashell:'fff5ee',sienna:'a0522d',silver:'c0c0c0',skyblue:'87ceeb',slateblue:'6a5acd',slategray:'708090',slategrey:'708090',snow:'fffafa',springgreen:'00ff7f',steelblue:'4682b4',tan:'d2b48c',teal:'008080',thistle:'d8bfd8',tomato:'ff6347',turquoise:'40e0d0',violet:'ee82ee',wheat:'f5deb3',white:'fff',whitesmoke:'f5f5f5',yellow:'ff0',yellowgreen:'9acd32'},C=m.hexNames=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}(x),S=(_='[\\s|\\(]+('+(b='(?:'+'[-\\+]?\\d*\\.\\d+%?'+')|(?:'+'[-\\+]?\\d+%?'+')')+')[,|\\s]+('+b+')[,|\\s]+('+b+')\\s*\\)?',w='[\\s|\\(]+('+b+')[,|\\s]+('+b+')[,|\\s]+('+b+')[,|\\s]+('+b+')\\s*\\)?',{rgb:new RegExp('rgb'+_),rgba:new RegExp('rgba'+w),hsl:new RegExp('hsl'+_),hsla:new RegExp('hsla'+w),hsv:new RegExp('hsv'+_),hsva:new RegExp('hsva'+w),hex3:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex8:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});window.tinycolor=m,t((function(){t.fn.spectrum.load&&t.fn.spectrum.processNativeColorInputs()}))}function O(e,n,o,r){for(var i=[],a=0;a')}else{i.push(t('
').append(t('').attr('title',r.noColorSelectedText)).html())}}return"
"+i.join('')+'
'}function T(e,c){var u,p,d,f,h=function(e,n){var r=t.extend({},o,e);return r.callbacks={move:E(r.move,n),change:E(r.change,n),show:E(r.show,n),hide:E(r.hide,n),beforeShow:E(r.beforeShow,n)},r}(c,e),g=h.flat,v=h.showSelectionPalette,y=h.localStorageKey,b=h.theme,_=h.callbacks,w=(u=$t,p=10,function(){var t=this,e=arguments,n=function(){f=null,u.apply(t,e)};d&&clearTimeout(f),!d&&f||(f=setTimeout(n,p))}),x=!1,C=!1,S=!0,T=0,k=0,M=0,L=0,D=0,N=0,I=0,F=0,V=0,R=0,H=1,z=[],B=[],U={},W=h.selectionPalette.slice(0),$=h.maxSelectionSize,q='sp-dragging',G=null,K=e.ownerDocument,Y=(K.body,t(e)),X=!1,J=t(l,K).addClass(b),Z=J.find('.sp-picker-container'),Q=J.find('.sp-color'),tt=J.find('.sp-dragger'),et=J.find('.sp-hue'),nt=J.find('.sp-slider'),ot=J.find('.sp-alpha-inner'),rt=J.find('.sp-alpha'),it=J.find('.sp-alpha-handle'),st=J.find('.sp-input'),at=J.find('.sp-palette'),lt=J.find('.sp-initial'),ct=J.find('.sp-cancel'),ut=J.find('.sp-clear'),pt=J.find('.sp-choose'),dt=J.find('.sp-palette-toggle'),ft=Y.is('input'),ht=ft&&'color'===Y.attr('type')&&j(),gt=ft&&!g,vt=gt?t(a).addClass(b).addClass(h.className).addClass(h.replacerClassName):t([]),yt=gt?vt:Y,mt=vt.find('.sp-preview-inner'),bt=h.color||ft&&Y.val(),_t=!1,wt=h.preferredFormat,xt=!h.showButtons||h.clickoutFiresChange,Ct=!bt,St=h.allowEmpty&&!ht;function Ot(){if(h.showPaletteOnly&&(h.showPalette=!0),dt.text(h.showPaletteOnly?h.togglePaletteMoreText:h.togglePaletteLessText),h.palette){z=h.palette.slice(0),B=t.isArray(z[0])?z:[z],U={};for(var e=0;e1&&(delete window.localStorage[y],t.each(e,(function(t,e){kt(e)})))}catch(t){}try{W=window.localStorage[y].split(';')}catch(t){}}}function kt(e){if(v){var n=m(e).toRgbString();if(!U[n]&&-1===t.inArray(n,W))for(W.push(n);W.length>$;)W.shift();if(y&&window.localStorage)try{window.localStorage[y]=W.join(';')}catch(t){}}}function Pt(){var e=Ht(),n=t.map(B,(function(t,n){return O(t,e,'sp-palette-row sp-palette-row-'+n,h)}));Tt(),W&&n.push(O(function(){var t=[];if(h.showPalette)for(var e=0;ef&&f>r?Math.abs(g.left+r-f):0),g.top-=Math.min(g.top,g.top+i>h&&h>i?Math.abs(i+s-o):o),g}(J,yt))),Ut(),h.showPalette&&Pt(),Y.trigger('reflow.spectrum'))}function qt(){Ft(),X=!0,Y.attr('disabled',!0),yt.addClass('sp-disabled')}!function(){if(i&&J.find('*:not(input)').attr('unselectable','on'),Ot(),gt&&Y.after(vt).hide(),St||ut.hide(),g)Y.after(J).hide();else{var e='parent'===h.appendTo?Y.parent():t(h.appendTo);1!==e.length&&(e=t('body')),e.append(J)}function n(e){return e.data&&e.data.ignore?(Rt(t(e.target).closest('.sp-thumb-el').data('color')),zt()):(Rt(t(e.target).closest('.sp-thumb-el').data('color')),zt(),h.hideAfterPaletteSelect&&(Wt(!0),Ft())),!1}Tt(),yt.bind('click.spectrum touchstart.spectrum',(function(e){X||Lt(),e.stopPropagation(),t(e.target).is('input')||e.preventDefault()})),(Y.is(':disabled')||!0===h.disabled)&&qt(),J.click(P),st.change(Mt),st.bind('paste',(function(){setTimeout(Mt,1)})),st.keydown((function(t){13==t.keyCode&&Mt()})),ct.text(h.cancelText),ct.bind('click.spectrum',(function(t){t.stopPropagation(),t.preventDefault(),Vt(),Ft()})),ut.attr('title',h.clearText),ut.bind('click.spectrum',(function(t){t.stopPropagation(),t.preventDefault(),Ct=!0,zt(),g&&Wt(!0)})),pt.text(h.chooseText),pt.bind('click.spectrum',(function(t){t.stopPropagation(),t.preventDefault(),i&&st.is(':focus')&&st.trigger('change'),st.hasClass('sp-validation-error')||(Wt(!0),Ft())})),dt.text(h.showPaletteOnly?h.togglePaletteMoreText:h.togglePaletteLessText),dt.bind('click.spectrum',(function(t){t.stopPropagation(),t.preventDefault(),h.showPaletteOnly=!h.showPaletteOnly,h.showPaletteOnly||g||J.css('left','-='+(Z.outerWidth(!0)+5)),Ot()})),A(rt,(function(t,e,n){H=t/D,Ct=!1,n.shiftKey&&(H=Math.round(10*H)/10),zt()}),At,jt),A(et,(function(t,e){F=parseFloat(e/L),Ct=!1,h.showAlpha||(H=1),zt()}),At,jt),A(Q,(function(t,e,n){if(n.shiftKey){if(!G){var o=V*T,r=k-R*k,i=Math.abs(t-o)>Math.abs(e-r);G=i?'x':'y'}}else G=null;var s=!G||'y'===G;(!G||'x'===G)&&(V=parseFloat(t/T)),s&&(R=parseFloat((k-e)/k)),Ct=!1,h.showAlpha||(H=1),zt()}),At,jt),bt?(Rt(bt),Bt(),wt=h.preferredFormat||m(bt).getFormat(),kt(bt)):Bt(),g&&Dt();var o=i?'mousedown.spectrum':'click.spectrum touchstart.spectrum';at.delegate('.sp-thumb-el',o,n),lt.delegate('.sp-thumb-el:nth-child(1)',o,{ignore:!0},n)}();var Gt={show:Dt,hide:Ft,toggle:Lt,reflow:$t,option:function(e,o){return e===n?t.extend({},h):o===n?h[e]:(h[e]=o,'preferredFormat'===e&&(wt=h.preferredFormat),void Ot())},enable:function(){X=!1,Y.attr('disabled',!1),yt.removeClass('sp-disabled')},disable:qt,offset:function(t){h.offset=t,$t()},set:function(t){Rt(t),Wt()},get:Ht,destroy:function(){Y.show(),yt.unbind('click.spectrum touchstart.spectrum'),J.remove(),vt.remove(),r[Gt.id]=null},container:J};return Gt.id=r.push(Gt)-1,Gt}function k(){}function P(t){t.stopPropagation()}function E(t,e){var n=Array.prototype.slice,o=n.call(arguments,2);return function(){return t.apply(e,o.concat(n.call(arguments)))}}function A(e,n,o,r){n=n||function(){},o=o||function(){},r=r||function(){};var s=document,a=!1,l={},c=0,u=0,p='ontouchstart'in window,d={};function f(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),t.returnValue=!1}function h(t){if(a){if(i&&s.documentMode<9&&!t.button)return g();var o=t&&t.touches&&t.touches[0],r=o&&o.pageX||t.pageX,d=o&&o.pageY||t.pageY,h=Math.max(0,Math.min(r-l.left,u)),v=Math.max(0,Math.min(d-l.top,c));p&&f(t),n.apply(e,[h,v,t])}}function g(){a&&(t(s).unbind(d),t(s.body).removeClass('sp-dragging'),setTimeout((function(){r.apply(e,arguments)}),0)),a=!1}d['selectstart']=f,d['dragstart']=f,d['touchmove mousemove']=h,d['touchend mouseup']=g,t(e).bind('touchstart mousedown',(function(n){var r=n.which?3==n.which:2==n.button;r||a||!1!==o.apply(e,arguments)&&(a=!0,c=t(e).height(),u=t(e).width(),l=t(e).offset(),t(s).bind(d),t(s.body).addClass('sp-dragging'),h(n),f(n))}))}function j(){return t.fn.spectrum.inputTypeColorSupport()}function M(t,e,n){t=X(t,255),e=X(e,255),n=X(n,255);var o,r,i=v(t,e,n),s=g(t,e,n),a=(i+s)/2;if(i==s)o=r=0;else{var l=i-s;switch(r=a>.5?l/(2-i-s):l/(i+s),i){case t:o=(e-n)/l+(e>1)+720)%360;--e;)o.h=(o.h+r)%360,i.push(m(o));return i}function K(t,e){e=e||6;for(var n=m(t).toHsv(),o=n.h,r=n.s,i=n.v,s=[],a=1/e;e--;)s.push(m({h:o,s:r,v:i})),i=(i+a)%1;return s}function Y(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function X(t,e){(function(t){return'string'==typeof t&&-1!=t.indexOf('.')&&1===parseFloat(t)})(t)&&(t='100%');var n=function(t){return'string'==typeof t&&-1!=t.indexOf('%')}(t);return t=g(e,v(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),f.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function J(t){return g(1,v(0,t))}function Z(t){return parseInt(t,16)}function Q(t){return 1==t.length?'0'+t:''+t}function tt(t){return t<=1&&(t=100*t+'%'),t}function et(t){return Z(t)/255}}(l["default"]);var Ea=function(t){var e='name'===t.getFormat()&&t.toName(),n=1==t.getAlpha()?t.toHexString():t.toRgbString();return e||n.replace(/ /g,'')};const Aa=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return ka(n,e),n.prototype.template=function(){var t=this.ppfx;return"\n
\n
\n
\n
\n
\n
\n ")},n.prototype.inputClass=function(){var t=this.ppfx;return"".concat(t,"field ").concat(t,"field-color")},n.prototype.holderClass=function(){return"".concat(this.ppfx,"input-holder")},n.prototype.remove=function(){return e.prototype.remove.call(this),this.colorEl.spectrum('destroy'),this},n.prototype.handleChange=function(e){e.stopPropagation();var n=e.target.value;(0,t.isUndefined)(n)||this.__onInputChange(n)},n.prototype.__onInputChange=function(t){var e=this.model,n=this.opts.onChange,o=t,r=this.getColorEl();if(r){r.spectrum('set',o);var i=r.spectrum('get'),s=o&&Ea(i);s&&(o=s)}n?n(o):e.set({value:o},{fromInput:1})},n.prototype.setValue=function(e,n){void 0===n&&(n={});var o=this.model,r=(0,t.isUndefined)(n.def)?o.get('defaults'):n.def,i=(0,t.isUndefined)(e)?(0,t.isUndefined)(r)?'':r:e,s=this.getInputEl(),a=this.getColorEl(),l='none'!=i?i:'';s.value=i,a.get(0).style.backgroundColor=l,(n.fromTarget||n.fromInput&&!n.avoidStore)&&(a.spectrum('set',l),this.noneColor='none'==i,this.movedColor=l)},n.prototype.getColorEl=function(){var t=this;if(!this.colorEl){var e=this,n=e.em,o=e.model,r=e.opts,i=this.ppfx,s=r.onChange,a=(0,l["default"])("
")),c=a.get(0).style,u=n&&n.config?n.config.el:'',p=n&&n.getConfig&&n.getConfig().colorPicker||{};this.movedColor='';var d,f=!1;this.$el.find('[data-colorp-c]').append(a);var h=function(t,e){void 0===e&&(e=!0),s?s(t,!e):(e&&o.setValueFromInput(0,!1),o.setValueFromInput(t,e))};a.spectrum(Pa(Pa(Pa({color:o.getValue()||!1,containerClassName:"".concat(i,"one-bg ").concat(i,"two-color"),appendTo:u||'body',maxSelectionSize:8,showPalette:!0,showAlpha:!0,chooseText:'Ok',cancelText:'⨯',palette:[]},p),o.get('colorPicker')||{}),{move:function(e){var n=Ea(e);t.movedColor=n,c.backgroundColor=n,h(n,!1)},change:function(e){f=!0;var n=Ea(e);c.backgroundColor=n,h(n),t.noneColor=!1},show:function(e){f=!1,t.movedColor='',d=s?o.getValue({noDefault:!0}):Ea(e)},hide:function(){f||!d&&!s||(t.noneColor&&(d=''),c.backgroundColor=d,a.spectrum('set',d),h(d,!1))}})),n&&n.on&&this.listenTo(n,'component:selected',(function(){t.movedColor&&h(t.movedColor),f=!0,t.movedColor='',a.spectrum('hide')})),this.colorEl=a}return this.colorEl},n.prototype.render=function(){return wa.prototype.render.call(this),this.getColorEl(),this},n}(wa);var ja=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();const Ma=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ja(e,t),e.prototype.templateInput=function(){return''},e.prototype.getInputEl=function(){if(!this.input){var t=this.model,e=this.getModelValue(),n=new Aa({model:t,target:this.config.em,contClass:this.ppfx+'field-color',ppfx:this.ppfx}).render();n.setValue(e,{fromTarget:1}),this.input=n.el}return this.input},e}(pa);var La=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Da=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return La(n,e),n.prototype.templateInput=function(){return''},n.prototype.onChange=function(){this.handleClick()},n.prototype.handleClick=function(){var e=this.model,n=this.em,o=e.get('command');o&&((0,t.isString)(o)?n.Commands.run(o):o(n.Editor,e))},n.prototype.renderLabel=function(){this.model.get('label')&&pa.prototype.renderLabel.apply(this)},n.prototype.getInputEl=function(){var t=this.model,e=this.ppfx,n=t.props(),o=n.labelButton,r=n.text,i=n.full,s=o||r,a="".concat(e,"btn");return"")},n}(pa);const Na=Da;Da.prototype.eventCapture=['click button'];var Ia=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Fa=void 0&&(void 0).__assign||function(){return Fa=Object.assign||function(t){for(var e,n=1,o=arguments.length;n\n ").concat(x,"\n ").concat(C,"\n "):'',"\n
\n
\n
\n ").concat(S,"\n ").concat(m?"").concat(m,""):'',"\n ").concat(y,"\n
\n
\n
\n
").concat(u||'',"
\n
").concat(w||'',"
\n
")},Object.defineProperty(o.prototype,"em",{get:function(){return this.module.em},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"ppfx",{get:function(){return this.em.getConfig().stylePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"pfx",{get:function(){return this.config.stylePrefix},enumerable:!1,configurable:!0}),o.prototype.initComponent=function(){var t=this,e=this.model,n=this.config.onInit,o=e.components();this.listenTo(o,'remove add reset',this.checkChildren),[['change:status',this.updateStatus],['change:open',this.updateOpening],['change:layerable',this.updateLayerable],['change:style:display',this.updateVisibility],['rerender:layer',this.render],['change:name change:custom-name',this.updateName]].forEach((function(n){return t.listenTo(e,n[0],n[1])})),this.$el.data('model',e),this.$el.data('collection',o),e.viewLayer=this,n.bind(this)({component:e,render:this.__render,listenTo:this.listenTo})},o.prototype.updateName=function(){this.getInputName().innerText=this.model.getName()},o.prototype.getVisibilityEl=function(){return this.eyeEl||(this.eyeEl=this.$el.children(".".concat(this.pfx,"layer-vis"))),this.eyeEl},o.prototype.updateVisibility=function(){var t=this,e=t.pfx,n=t.model,o=t.module,r="".concat(e,"layer-hidden"),i=!o.isVisible(n)?'addClass':'removeClass';this.$el[i](r),this.getVisibilityEl()[i]("".concat(e,"layer-off"))},o.prototype.toggleVisibility=function(t){null==t||t.stopPropagation();var e=this.module,n=this.model;e.setVisible(n,!e.isVisible(n))},o.prototype.handleEdit=function(t){null==t||t.stopPropagation();var e=this,n=e.em,o=e.$el,r=e.clsNoEdit,i=e.clsEdit,s=this.getInputName();s[Ya]='true',s.focus(),document.execCommand('selectAll',!1),n.setEditing(!0),o.find(".".concat(this.inputNameCls)).removeClass(r).addClass(i)},o.prototype.handleEditKey=function(t){t.stopPropagation(),((0,e.isEscKey)(t)||(0,e.isEnterKey)(t))&&this.handleEditEnd(t)},o.prototype.handleEditEnd=function(t){null==t||t.stopPropagation();var e=this,n=e.em,o=e.$el,r=e.clsNoEdit,i=e.clsEdit,s=this.getInputName(),a=s.textContent;s.scrollLeft=0,s[Ya]='false',this.setName(a,{component:this.model,propName:'custom-name'}),n.setEditing(!1),o.find(".".concat(this.inputNameCls)).addClass(r).removeClass(i),this.updateName()},o.prototype.setName=function(t,e){var n=e.propName;this.model.set(n,t)},o.prototype.getInputName=function(){return this.inputName||(this.inputName=this.el.querySelector(".".concat(this.inputNameCls))),this.inputName},o.prototype.updateOpening=function(){var t=this,e=t.$el,n=t.model,o=t.pfx,r='open',i="".concat(o,"layer-open"),s=this.getCaret();this.module.isOpen(n)?(e.addClass(r),s.addClass(i)):(e.removeClass(r),s.removeClass(i))},o.prototype.toggleOpening=function(t){var e=this.model,n=this.module;null==t||t.stopImmediatePropagation(),e.get('components').length&&n.setOpen(e,!n.isOpen(e))},o.prototype.handleSelect=function(t){null==t||t.stopPropagation();var e=this.module,n=this.model;e.setLayerData(n,{selected:!0},{event:t})},o.prototype.handleHover=function(t){null==t||t.stopPropagation();var e=this.module,n=this.model;e.setLayerData(n,{hovered:!0})},o.prototype.handleHoverOut=function(t){null==t||t.stopPropagation();var e=this.module,n=this.model;e.setLayerData(n,{hovered:!1})},o.prototype.startSort=function(t){t.stopPropagation();var e=this.em,n=this.sorter;t.button&&0!==t.button||n&&(n.onStart=function(t){return e.trigger("".concat(Ke,":start"),t)},n.onMoveClb=function(t){return e.trigger(Ke,t)},n.startSort(t.target))},o.prototype.updateStatus=function(){cn.prototype.updateStatus.apply(this,[{avoidHover:!this.config.highlightHover,noExtHl:!0}])},o.prototype.checkChildren=function(){var t=this,e=t.model,n=t.clsNoChild,o=t.$el,r=t.module,i=r.getComponents(e).length,s=o.children(".".concat(this.clsTitleC)).children(".".concat(this.clsTitle)),a=this.cnt;a||(a=o.children('[data-count]').get(0),this.cnt=a),s[i?'removeClass':'addClass'](n),a&&(a.innerHTML=i||''),!i&&r.setOpen(e,!1)},o.prototype.getCaret=function(){return this.caret&&this.caret.length||(this.caret=this.$el.children(".".concat(this.clsTitleC)).find(".".concat(this.clsCaret))),this.caret},o.prototype.setRoot=function(n){n=(0,t.isString)(n)?this.em.getWrapper().find(n)[0]:n;var o=(0,e.getModel)(n,0);o&&(this.stopListening(),this.model=o,this.initComponent(),this._rendered&&this.render())},o.prototype.updateLayerable=function(){(this.parentView||this).render()},o.prototype.__clearItems=function(){var t;null===(t=this.items)||void 0===t||t.remove()},o.prototype.remove=function(){for(var t=[],e=0;e\n ").concat(this.getPreview(),"\n
\n
\n ").concat(this.getInfo(),"\n
\n
\n ⨯\n
\n ")},n.prototype.updateTarget=function(e){e&&e.set&&(e.set('attributes',(0,t.clone)(e.get('attributes'))),e.set('src',this.model.get('src')))},n.prototype.getPreview=function(){return''},n.prototype.getInfo=function(){return''},n.prototype.render=function(){var t=this.el;return t.innerHTML=this.template(this,this.model),t.className=this.className,this},n}(u.G7);const bl=ml;var _l=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),wl=void 0&&(void 0).__makeTemplateObject||function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t},xl=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return _l(n,e),n.prototype.getPreview=function(){var t=this,e=t.pfx,n=t.ppfx,o=t.model.get('src');return r(Sl||(Sl=wl(["\n
\n
\n "],["\n
\n
\n "])),e,o,e,n)},n.prototype.getInfo=function(){var t=this.pfx,e=this.model,n=e.get('name'),o=e.get('width'),i=e.get('height'),s=e.get('unitDim'),a=o&&i?"".concat(o,"x").concat(i).concat(s):'';return n=n||e.getFilename(),r(Ol||(Ol=wl(["\n
","
\n
","
\n "],["\n
","
\n
","
\n "])),t,n,t,a)},n.prototype.init=function(t){var e=this.pfx;this.className+=" ".concat(e,"asset-image")},n.prototype.onClick=function(){var e=this.model,n=this.pfx,o=this.__getBhv().select,r=this.config.onClick,i=this.collection;i.trigger('deselectAll'),this.$el.addClass(n+'highlight'),(0,t.isFunction)(o)?o(e,!1):(0,t.isFunction)(r)?r(e):this.updateTarget(i.target)},n.prototype.onDblClick=function(){var e=this.em,n=this.model,o=this.__getBhv().select,r=this.config.onDblClick,i=this.collection,s=i.target,a=i.onSelect;(0,t.isFunction)(o)?o(n,!0):(0,t.isFunction)(r)?r(n):(this.updateTarget(s),null==e||e.Modal.close()),(0,t.isFunction)(a)&&a(n)},n.prototype.onRemove=function(t){t.stopImmediatePropagation(),this.model.collection.remove(this.model)},n}(bl);const Cl=xl;var Sl,Ol;xl.prototype.events={'click [data-toggle=asset-remove]':'onRemove',click:'onClick',dblclick:'onDblClick'};var Tl=void 0&&(void 0).__assign||function(){return Tl=Object.assign||function(t){for(var e,n=1,o=arguments.length;n\n
\n \n
\n \n
\n \n ")),"\n
\n
\n ").concat(r,"\n
\n
\n
\n
\n ")},e.prototype.handleSubmit=function(t){t.preventDefault();var e=this.getAddInput(),n=e&&e.value.trim(),o=this.config.handleAdd;if(n){e.value='';var r=this.getAssetsEl();r&&(r.scrollTop=0),o?o.bind(this)(n):this.options.globalCollection.add(n,{at:0})}},e.prototype.getAssetsEl=function(){return this.el.querySelector(".".concat(this.pfx,"assets"))},e.prototype.getAddInput=function(){return this.inputUrl&&this.inputUrl.value||(this.inputUrl=this.el.querySelector(".".concat(this.pfx,"add-asset input"))),this.inputUrl},e.prototype.removedAsset=function(t){this.collection.length||this.toggleNoAssets()},e.prototype.addToAsset=function(t){1==this.collection.length&&this.toggleNoAssets(!0),this.addAsset(t)},e.prototype.addAsset=function(t,e){void 0===e&&(e=null);var n=e,o=this.collection,r=this.config,i=new t.typeView({model:t,collection:o,config:r}).render().el;if(n)n.appendChild(i);else{var s=this.getAssetsEl();s&&s.insertBefore(i,s.firstChild)}return i},e.prototype.toggleNoAssets=function(t){void 0===t&&(t=!1);var e=this.$el.find(".".concat(this.pfx,"assets"));if(t)e.empty();else{var n=this.config.noAssets;n&&e.append(n)}},e.prototype.deselectAll=function(){var t=this.pfx;this.$el.find(".".concat(t,"highlight")).removeClass("".concat(t,"highlight"))},e.prototype.renderAssets=function(){var t=this,e=document.createDocumentFragment(),n=this.$el.find(".".concat(this.pfx,"assets"));n.empty(),this.toggleNoAssets(!!this.collection.length),this.collection.each((function(n){return t.addAsset(n,e)})),n.append(e)},e.prototype.render=function(){var t=this.options.fu.render().el;return this.$el.empty(),this.$el.append(t).append(this.template(this)),this.el.className="".concat(this.ppfx,"asset-manager"),this.renderAssets(),this},e}(u.G7);const Dl=Ll;Ll.prototype.events={submit:'handleSubmit'};var Nl=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Il=void 0&&(void 0).__makeTemplateObject||function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t},Fl=function(t){function e(n){void 0===n&&(n={});var o=t.call(this,n)||this;o.options=n;var r=n.config||{};o.module=n.module,o.config=r,o.em=o.config.em,o.pfx=r.stylePrefix||'',o.ppfx=r.pStylePrefix||'',o.target=o.options.globalCollection||{},o.uploadId=o.pfx+'uploadFile',o.disabled=void 0!==r.disableUpload?r.disableUpload:!r.upload&&!r.embedAsBase64,o.multiUpload=void 0===r.multiUpload||r.multiUpload;var i=r.uploadFile;return i?o.uploadFile=i.bind(o):!r.upload&&r.embedAsBase64&&(o.uploadFile=e.embedAsBase64),o.delegateEvents(),o}return Nl(e,t),e.prototype.template=function(t){var e=t.pfx,n=t.title,o=t.uploadId,i=t.disabled,s=t.multiUpload;return r(Rl||(Rl=Il(["\n
\n
","
\n \n
\n \n "],["\n
\n
","
\n \n
\n \n "])),e,n,o,i?'disabled':'',s?'multiple':'')},e.prototype.events=function(){return{'change [data-input]':'uploadFile'}},e.prototype.onUploadStart=function(){var t=this.module;t&&t.__propEv('asset:upload:start')},e.prototype.onUploadEnd=function(t){var e=this.$el,n=this.module;n&&n.__propEv('asset:upload:end',t);var o=e.find('input');o&&o.val('')},e.prototype.onUploadError=function(t){var e=this.module;console.error(t),this.onUploadEnd(t),e&&e.__propEv('asset:upload:error',t)},e.prototype.onUploadResponse=function(t,e){var n,o=this,r=o.module,i=o.config,s=o.target;try{n='string'==typeof t?JSON.parse(t):t}catch(e){n=t}r&&r.__propEv('asset:upload:response',n),i.autoAdd&&s&&s.add(n.data,{at:0}),this.onUploadEnd(t),null==e||e(n)},e.prototype.uploadFile=function(t,e){var n=this,o=t.dataTransfer?t.dataTransfer.files:t.target.files,r=this.config,i=r.beforeUpload;if(!1!==(i&&i(o))){var s=new FormData,a=r.params,l=r.customFetch,c=r.fetchOptions;for(var u in a)s.append(u,a[u]);if(this.multiUpload)for(var p=0;p").concat(o.dropzoneContent,"")),p(),'draggable'in i&&[i,a].forEach((function(t){t.ondragover=d,t.ondragleave=f,t.ondrop=h}))},e.prototype.render=function(){var t=this,e=t.$el,n=t.pfx,o=t.em;return e.html(this.template({title:o&&o.t('assetManager.uploadTitle'),uploadId:this.uploadId,disabled:this.disabled,multiUpload:this.multiUpload,pfx:n})),this.initDrop(),e.attr('class',n+'file-uploader'),this},e.embedAsBase64=function(t,e){var n=this,o=t.dataTransfer?t.dataTransfer.files:t.target.files,r={data:[]};if(FileReader){for(var i=[],s=/^(.+)\/(.+)$/,a=function(t){var e=new Promise((function(e,n){var o=new FileReader;o.addEventListener('load',(function(r){var i,a=t.name,l=s.exec(t.type);if('image'===(i=l?l[1]:t.type)){var c={src:o.result,name:a,type:i,height:0,width:0},u=new Image;u.addEventListener('error',(function(t){n(t)})),u.addEventListener('load',(function(){c.height=u.height,c.width=u.width,e(c)})),u.src=c.src}else e(i?{src:o.result,name:a,type:i}:o.result)})),o.addEventListener('error',(function(t){n(t)})),o.addEventListener('abort',(function(t){n('Aborted')})),o.readAsDataURL(t)}));i.push(e)},l=0,c=o;l0&&(i=e.split('.').reduce((function(e,n){if(!(0,t.isUndefined)(e))return e[n]}),r)),i}},o.prototype._debug=function(t,e){void 0===e&&(e={});var n=this.em,o=this.config;(e.debug||o.debug)&&n&&n.logWarning(t)},o.prototype.destroy=function(){},o}(m);const dc=pc;var fc=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),hc=void 0&&(void 0).__assign||function(){return hc=Object.assign||function(t){for(var e,n=1,o=arguments.length;na+u-e||il+c-e)return 1},o.prototype.getCurrentPos=function(){var t=this.eventMove;return{x:(null==t?void 0:t.pageX)||0,y:(null==t?void 0:t.pageY)||0}},o.prototype.getDim=function(t){var e,n,o,r,i=this.em,s=this.canvasRelative,a=null==i?void 0:i.Canvas,l=a?a.getElementOffsets(t):{};if(s&&i){var c=a.getElementPos(t,{noScroll:1});e=c.top,n=c.left,o=c.height,r=c.width}else{var u=this.offset(t);e=this.relative?t.offsetTop:u.top-(this.wmargin?-1:1)*this.elT,n=this.relative?t.offsetLeft:u.left-(this.wmargin?-1:1)*this.elL,o=t.offsetHeight,r=t.offsetWidth}return{top:e,left:n,height:o,width:r,offsets:l}},o.prototype.getChildrenDim=function(n){var o=this,r=[];if(!n)return r;var i=this.getTargetModel(n);if(i&&i.view&&!this.ignoreViewChildren){var s=i.getCurrentView?i.getCurrentView():i.view;n=s.getChildrenContainer()}return(0,t.each)(n.children,(function(t,i){var s=t,a=(0,e.getModel)(s,l["default"]),c=a&&a.index?a.index():i;if((0,e.isTextNode)(s)||o.matches(s,o.itemSel)){var u,p=o.getDim(s),d=o.direction;u='v'==d||'h'!=d&&o.isInFlow(s,n),p.dir=u,p.el=s,p.indexEl=c,r.push(p)}})),r},o.prototype.nearBorders=function(t,e,n){var o=!1,r=this.borderOffset,i=e||0,s=n||0,a=t.top,l=t.left,c=t.height,u=t.width;return(a+r>s||s>a+c-r||l+r>i||i>l+u-r)&&(o=!0),o},o.prototype.findPosition=function(t,e,n){for(var o,r={index:0,indexEl:0,method:'before'},i=0,s=0,a=0,l=0,c=0,u=0,p=0,d=t.length;ps||a&&c>=a||i&&h+vx&&(_.at=f-1))}i&&(w?(delete _.at,s=v.getView().insertComponent(i,_)):s=g.add(i,_)),delete this.dropContent,delete this.prevTarget}else if(a){var S=h.dropInfo||(null==v?void 0:v.get('droppable')),O=h.dragInfo||(null==y?void 0:y.get('draggable'));!g&&d.push('Target collection not found'),!b&&S&&d.push("Target is not droppable, accepts [".concat(S,"]")),!m&&O&&d.push("Component not draggable, acceptable by [".concat(O,"]")),a.logWarning('Invalid target position',{errors:d,model:y,context:'sorter',target:v})}return null==a||a.trigger('sorter:drag:end',{targetCollection:g,modelToDrop:i,warns:d,validResult:h,dst:n,srcEl:p}),s},o.prototype.rollback=function(t){(0,e.off)(this.getDocuments(),'keydown',this.rollback),27==(t.which||t.keyCode)&&(this.moved=!1,this.endMove())},o}(u.G7);const yc=vc;var mc=void 0&&(void 0).__assign||function(){return mc=Object.assign||function(t){for(var e,n=1,o=arguments.length;nb?v.h=Math.round(v.w/b):v.w=Math.round(v.h*b)}for(var _ in~y.indexOf('l')&&(v.l+=i.w-v.w),~y.indexOf('t')&&(v.t+=i.h-v.h),v){var w=_;v[w]=parseInt("".concat(v[w]),10)}return v}},n}();const _c=bc;var wc=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),xc=void 0&&(void 0).__assign||function(){return xc=Object.assign||function(t){for(var e,n=1,o=arguments.length;n=0&&jc.splice(o,1),93!=n&&224!=n||(n=91),n in Tc)for(e in Tc[n]=!1,Pc)Pc[e]==n&&(Vc[e]=!1)}function Fc(){for(Sc in Tc)Tc[Sc]=!1;for(Sc in Pc)Vc[Sc]=!1}function Vc(t,e,n){var o,r;o=Hc(t),void 0===n&&(n=e,e='all');for(var i=0;i1&&(r=zc(t),t=[t[t.length-1]]),t=t[0],(t=Ac(t))in Oc||(Oc[t]=[]),Oc[t].push({shortcut:o[i],scope:e,method:n,key:o[i],mods:r})}for(Sc in Pc)Vc[Sc]=!1;function Rc(){return kc||'all'}function Hc(t){var e;return''==(e=(t=t.replace(/\s/g,'')).split(','))[e.length-1]&&(e[e.length-2]+=','),e}function zc(t){for(var e=t.slice(0,t.length-1),n=0;n1&&(a=zc(o)),t=o[o.length-1],t=Ac(t),void 0===e&&(e=Rc()),!Oc[t])return;for(r=0;r0,Tc)(!Tc[o]&&Mc(n.mods,+o)>-1||Tc[o]&&-1==Mc(n.mods,+o))&&(i=!1);(0!=n.mods.length||Tc[16]||Tc[18]||Tc[17]||Tc[91])&&!i||!1===n.method(t,n)&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0))}}(t)})),Bc(t.document,'keyup',Ic),Bc(t,'focus',Fc)};const Uc=Vc;const Wc={defaults:{'core:undo':{keys:'⌘+z, ctrl+z',handler:'core:undo'},'core:redo':{keys:'⌘+shift+z, ctrl+shift+z',handler:'core:redo'},'core:copy':{keys:'⌘+c, ctrl+c',handler:'core:copy'},'core:paste':{keys:'⌘+v, ctrl+v',handler:'core:paste'},'core:component-next':{keys:'s',handler:'core:component-next'},'core:component-prev':{keys:'w',handler:'core:component-prev'},'core:component-enter':{keys:'d',handler:'core:component-enter'},'core:component-exit':{keys:'a',handler:'core:component-exit'},'core:component-delete':{keys:'backspace, delete',handler:'core:component-delete',opts:{prevent:!0}}}};var $c=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),qc=void 0&&(void 0).__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var o,r=0,i=e.length;r\n
\n
").concat(r,"
\n
⨯
\n
\n
\n
").concat(o,"
\n
\n
\n \n
")},e.prototype.events=function(){return{click:'onClick','click [data-close-modal]':'hide'}},e.prototype.onClick=function(t){this.config.backdrop&&t.target===this.el&&this.hide()},e.prototype.getCollector=function(){return this.$collector||(this.$collector=this.$el.find('.'+this.pfx+'collector')),this.$collector},e.prototype.getContent=function(){var t=this.pfx;return this.$content||(this.$content=this.$el.find(".".concat(t,"content #").concat(t,"c"))),this.$content},e.prototype.getTitle=function(t){return void 0===t&&(t={}),this.$title||(this.$title=this.$el.find('.'+this.pfx+'title')),t.$?this.$title:this.$title.get(0)},e.prototype.updateContent=function(){var t=this.getContent(),e=t.children(),n=this.getCollector(),o=this.model.get('content');e.length&&n.append(e),t.empty().append(o)},e.prototype.updateTitle=function(){var t=this.getTitle({$:!0});t&&t.empty().append(this.model.get('title'))},e.prototype.updateOpen=function(){this.el.style.display=this.model.get('open')?'':'none'},e.prototype.hide=function(){this.model.close()},e.prototype.show=function(){this.model.open()},e.prototype.updateAttr=function(t){var e=this,n=e.pfx,o=e.$el,r=e.el,i=[].slice.call(r.attributes).map((function(t){return t.name}));o.removeAttr(i.join(' ')),o.attr(Qc(Qc({},t||{}),{class:"".concat(n,"container ").concat(t&&t.class||'').trim()}))},e.prototype.render=function(){var t=this.$el,e=this.model.toJSON();return e.pfx=this.pfx,e.ppfx=this.ppfx,t.html(this.template(e)),this.updateAttr(),this.updateOpen(),this},e}(Pt);var eu=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();const nu=function(e){function n(n){var o=e.call(this,n,'Modal',Yc)||this;return o.model=new Jc(o),o.model.on('change:open',(function(t,e){n.trigger("modal:".concat(e?'open':'close'))})),o.model.on('change',(0,t.debounce)((function(){var e=o._evData(),r=o.config.custom;(0,t.isFunction)(r)&&r(e),n.trigger('modal',e)}),0)),o}return eu(n,e),n.prototype._evData=function(){var e=this,n=this.getTitle(),o=this.getContent(),r=this.model.attributes;return{open:r.open,attributes:r.attributes,title:(0,t.isString)(n)?(0,Et.rw)(n):n,content:(0,t.isString)(o)?(0,Et.rw)(o):o.get?o.get(0):o,close:function(){e.close()}}},n.prototype.postRender=function(t){var e=t.model.config.el||t.el,n=this.render();n&&(null==e||e.appendChild(n))},n.prototype.open=function(t){void 0===t&&(t={});var e=t.attributes||{};return t.title&&this.setTitle(t.title),t.content&&this.setContent(t.content),this.model.set('attributes',e),this.model.open(),this.modal&&this.modal.updateAttr(e),this},n.prototype.close=function(){return this.model.close(),this},n.prototype.onceClose=function(t){return this.em.once('modal:close',t),this},n.prototype.onceOpen=function(t){return this.em.once('modal:open',t),this},n.prototype.isOpen=function(){return!!this.model.get('open')},n.prototype.setTitle=function(t){return this.model.set('title',t),this},n.prototype.getTitle=function(){return this.model.get('title')},n.prototype.setContent=function(t){return this.model.set('content',' '),this.model.set('content',t),this},n.prototype.getContent=function(){return this.model.get('content')},n.prototype.getContentEl=function(){var t;return null===(t=this.modal)||void 0===t?void 0:t.getContent().get(0)},n.prototype.getModel=function(){return this.model},n.prototype.render=function(){var t;if(!this.config.custom){var e=tu.extend(this.config.extend),n=this.modal&&this.modal.el;return this.modal=new e({el:n,model:this.model,config:this.config}),null===(t=this.modal)||void 0===t?void 0:t.render().el}},n.prototype.destroy=function(){var t;null===(t=this.modal)||void 0===t||t.remove()},n}(m);var ou='sw-visibility',ru='export-template',iu='open-sm',su='open-tm',au='open-layers',lu='open-blocks',cu='fullscreen',uu='preview';const pu={stylePrefix:'pn-',defaults:[{id:'commands',buttons:[{}]},{id:'options',buttons:[{active:!0,id:ou,className:'fa fa-square-o',command:'core:component-outline',context:ou,attributes:{title:'View components'}},{id:uu,className:'fa fa-eye',command:uu,context:uu,attributes:{title:'Preview'}},{id:cu,className:'fa fa-arrows-alt',command:cu,context:cu,attributes:{title:'Fullscreen'}},{id:ru,className:'fa fa-code',command:ru,attributes:{title:'View code'}}]},{id:'views',buttons:[{id:iu,className:'fa fa-paint-brush',command:iu,active:!0,togglable:!1,attributes:{title:'Open Style Manager'}},{id:su,className:'fa fa-cog',command:su,togglable:!1,attributes:{title:'Settings'}},{id:au,className:'fa fa-bars',command:au,togglable:!1,attributes:{title:'Open Layer Manager'}},{id:lu,className:'fa fa-th-large',command:lu,togglable:!1,attributes:{title:'Open Blocks'}}]}]};var du=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();const fu=function(t){function e(e,n){var o=t.call(this,e,n)||this;return o.get('buttons').length&&o.set('buttons',new vu(o.module,o.get('buttons'))),o}return du(e,t),e.prototype.defaults=function(){return{id:'',label:'',tagName:'span',className:'',command:'',context:'',buttons:[],attributes:{},options:{},active:!1,dragDrop:!1,togglable:!0,runDefaultCommand:!0,stopDefaultCommand:!1,disable:!1}},Object.defineProperty(e.prototype,"className",{get:function(){return this.get('className')},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"command",{get:function(){return this.get('command')},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"active",{get:function(){return this.get('active')},set:function(t){this.set('active',t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"togglable",{get:function(){return this.get('togglable')},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"runDefaultCommand",{get:function(){return this.get('runDefaultCommand')},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"stopDefaultCommand",{get:function(){return this.get('stopDefaultCommand')},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"disable",{get:function(){return this.get('disable')},enumerable:!1,configurable:!0}),e}(x);var hu=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),gu=function(t){function e(e,n){return t.call(this,e,n,fu)||this}return hu(e,t),e.prototype.deactivateAllExceptOne=function(t,e){this.forEach((function(n,o){n!==t&&(n.set('active',!1),e&&n.get('buttons').length&&n.get('buttons').deactivateAllExceptOne(t,e))}))},e.prototype.deactivateAll=function(t,e){var n=t||'';this.forEach((function(t){t.get('context')==n&&t!==e&&t.set('active',!1,{fromCollection:!0})}))},e.prototype.disableAllButtons=function(t){var e=t||'';this.forEach((function(t,n){t.get('context')==e&&t.set('disable',!0)}))},e.prototype.disableAllButtonsExceptOne=function(t,e){this.forEach((function(n,o){n!==t&&(n.set('disable',!0),e&&n.get('buttons').length&&n.get('buttons').disableAllButtonsExceptOne(t,e))}))},e}(S);const vu=gu;gu.prototype.model=fu;var yu=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();const mu=function(t){function e(e,n){var o=t.call(this,e,n)||this,r=o.get('buttons')||[];return o.buttons=new vu(e,r),o}return yu(e,t),e.prototype.defaults=function(){return{id:'',content:'',visible:!0,buttons:[],attributes:{}}},Object.defineProperty(e.prototype,"buttons",{get:function(){return this.get('buttons')},set:function(t){this.set('buttons',t)},enumerable:!1,configurable:!0}),e}(x);var bu=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),_u=function(t){function e(e,n){return t.call(this,e,n,mu)||this}return bu(e,t),e}(S);const wu=_u;_u.prototype.model=mu;var xu=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Cu=void 0&&(void 0).__assign||function(){return Cu=Object.assign||function(t){for(var e,n=1,o=arguments.length;n\n
","
\n
\n \n "],["\n
\n
","
\n
\n
\n "])),e,e,n,e,o,e)},e.prototype.initialize=function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix},e.prototype.render=function(){var t=this,e=t.model,n=t.pfx,o=t.$el,r=e.toJSON();return r.pfx=n,o.html(this.template(r)),o.attr('class',"".concat(n,"editor-c")),o.find("#".concat(n,"code")).append(e.get('input')),this},e}(u.G7);var tp,ep=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),np='CodeMirror',op=function(e){function n(t){var n=e.call(this,t,'CodeManager',Iu)||this;n.EditorView=Qu;var o=n.config,r=o.pStylePrefix;return r&&(o.stylePrefix=r+o.stylePrefix),n.generators={},n.viewers={},n.defGenerators={html:new Ru,css:new Mr,json:new Bu,js:new $u},n.defViewers={CodeMirror:new Xu},n.loadDefaultGenerators().loadDefaultViewers(),n}return ep(n,e),n.prototype.addGenerator=function(t,e){return this.generators[t]=e,this},n.prototype.getGenerator=function(t){return this.generators[t]},n.prototype.getGenerators=function(){return this.generators},n.prototype.addViewer=function(t,e){return this.viewers[t]=e,this},n.prototype.getViewer=function(t){return this.viewers[t]},n.prototype.getViewers=function(){return this.viewers},n.prototype.createViewer=function(e){void 0===e&&(e={});var n=(0,t.isUndefined)(e.type)?np:e.type,o=this.getViewer(n)&&this.getViewer(n).clone(),r=document.createElement('div'),i=document.createElement('textarea');return r.appendChild(i),o.set(e),o.init(i),o.setElement(r),o},n.prototype.updateViewer=function(t,e){t.setContent(e)},n.prototype.getCode=function(t,e,n){void 0===n&&(n={}),n.em=this.em;var o=this.getGenerator(e);return o?o.build(t,n):''},n.prototype.loadDefaultGenerators=function(){for(var t in this.defGenerators)this.addGenerator(t,this.defGenerators[t]);return this},n.prototype.loadDefaultViewers=function(){for(var t in this.defViewers)this.addViewer(t,this.defViewers[t]);return this},n.prototype.destroy=function(){},n}(m);const rp=op;var ip=n(410),sp=n.n(ip);const ap={maximumStackLength:500,trackSelection:!0};var lp=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),cp=void 0&&(void 0).__assign||function(){return cp=Object.assign||function(t){for(var e,n=1,o=arguments.length;n=0})))return!1;if((0,t.isBoolean)(n))return!0;if((0,t.isArray)(n)&&dp(e).some((function(t){return n.indexOf(t)>=0})))return!0}return!1},on:function(e,n,o){var i=this;!this.beforeCache&&(this.beforeCache=e.previousAttributes());var s=o||n||{};if(s.noUndo&&setTimeout((function(){i.beforeCache=null})),!pp(s)){var a=e.toJSON({fromUndo:r}),l={object:e,before:this.beforeCache,after:a};if(this.beforeCache=null,!(0,t.isEmpty)(a))return l}}}),o.um.changeUndoType('add',{on:function(t,e,n){if(void 0===n&&(n={}),!pp(n)&&o.isRegistered(e))return{object:e,before:void 0,after:t,options:cp(cp({},n),{fromUndo:r})}}}),o.um.changeUndoType('remove',{on:function(t,e,n){if(void 0===n&&(n={}),!pp(n)&&o.isRegistered(e))return{object:e,before:t,after:void 0,options:cp(cp({},n),{fromUndo:r})}}}),o.um.changeUndoType('reset',{undo:function(t,e){t.reset(e,{fromUndo:r})},redo:function(t,e,n){t.reset(n,{fromUndo:r})},on:function(t,e){if(void 0===e&&(e={}),!pp(e)&&o.isRegistered(t))return{object:t,before:e.previousModels,after:up([],t.models,!0),options:cp(cp({},e),{fromUndo:r})}}}),o.um.on('undo redo',(function(){n.trigger('change:canvasOffset'),n.getSelectedAll().map((function(t){return t.trigger('rerender:layer')}))})),['undo','redo'].forEach((function(t){return o.um.on(t,(function(){return n.trigger(t)}))})),o}return lp(n,e),n.prototype.postLoad=function(){var t=this.config,e=this.em;t.trackSelection&&e&&this.add(e.get('selected'))},n.prototype.add=function(t){return this.um.register(t),this},n.prototype.remove=function(t){return this.um.unregister(t),this},n.prototype.removeAll=function(){return this.um.unregisterAll(),this},n.prototype.start=function(){return this.um.startTracking(),this},n.prototype.stop=function(){return this.um.stopTracking(),this},n.prototype.undo=function(t){void 0===t&&(t=!0);var e=this.em,n=this.um;return!e.isEditing()&&n.undo(t),this},n.prototype.undoAll=function(){return this.um.undoAll(),this},n.prototype.redo=function(t){void 0===t&&(t=!0);var e=this.em,n=this.um;return!e.isEditing()&&n.redo(t),this},n.prototype.redoAll=function(){return this.um.redoAll(),this},n.prototype.hasUndo=function(){return!!this.um.isAvailable('undo')},n.prototype.hasRedo=function(){return!!this.um.isAvailable('redo')},n.prototype.isRegistered=function(t){return!!this.getInstance().objectRegistry.isRegistered(t)},n.prototype.getStack=function(){return this.um.stack},n.prototype.getStackGroup=function(){var t=[],e=[];return this.getStack().forEach((function(n){var o=n.get('magicFusionIndex');e.indexOf(o)<0&&(e.push(o),t.push(n))})),t},n.prototype.skip=function(t){this.stop(),t(),this.start()},n.prototype.getGroupedStack=function(){var e={},n=this.getStack();return n.forEach((function(t,n){var o=t.get('magicFusionIndex'),r=function(t,e){var n=t.attributes,o=n.type,r=n.after,i=n.before,s=n.object,a=n.options;return{index:e,type:o,after:r,before:i,object:s,options:void 0===a?{}:a}}(t,n);e[o]?e[o].push(r):e[o]=[r]})),Object.keys(e).map((function(n){var o=e[n];return{index:o[o.length-1].index,actions:o,labels:(0,t.unique)(o.reduce((function(t,e){var n,o=null===(n=e.options)||void 0===n?void 0:n.action;return o&&t.push(o),t}),[]))}}))},n.prototype.goToGroup=function(e){var n=this;if(e){var o=this.getPointer(),r=e.index-o;(0,t.times)(Math.abs(r),(function(){n[r<0?'undo':'redo'](!1)}))}},n.prototype.getPointer=function(){return this.getStack().pointer},n.prototype.clear=function(){return this.um.clear(),this},n.prototype.getInstance=function(){return this.um},n.prototype.destroy=function(){this.clear().removeAll()},n}(m);const hp=fp;const gp={stylePrefix:'rte-',adjustToolbar:!0,actions:['bold','italic','underline','strikethrough','link','wrap'],custom:!1};var vp,yp=void 0&&(void 0).__assign||function(){return yp=Object.assign||function(t){for(var e,n=1,o=arguments.length;nB',attributes:{title:'Bold'},result:function(t){return t.exec('bold')}},italic:{name:'italic',icon:'I',attributes:{title:'Italic'},result:function(t){return t.exec('italic')}},underline:{name:'underline',icon:'U',attributes:{title:'Underline'},result:function(t){return t.exec('underline')}},strikethrough:{name:'strikethrough',icon:'S',attributes:{title:'Strike-through'},result:function(t){return t.exec('strikeThrough')}},link:{icon:"\n \n ",name:'link',attributes:{style:'font-size:1.4rem;padding:0 4px 2px;',title:'Link'},state:function(t){return t&&t.selection()&&xp(t)?bp:_p},result:function(t){xp(t)?t.exec('unlink'):t.insertHTML("").concat(t.selection(),""),{select:!0})}},wrap:{name:'wrap',icon:"\n \n ",attributes:{title:'Wrap for style'},state:function(t){return(null==t?void 0:t.selection())&&xp(t,'SPAN')?wp:_p},result:function(t){!xp(t,'SPAN')&&t.insertHTML("").concat(t.selection(),""),{select:!0})}}},Op=function(){function n(e,n,o){void 0===o&&(o={});var r=this;if(this.em=e,this.settings=o,n[mp])return n[mp];n[mp]=this,this.setEl(n),this.updateActiveActions=this.updateActiveActions.bind(this),this.__onKeydown=this.__onKeydown.bind(this),this.__onPaste=this.__onPaste.bind(this);var i=(o.actions||[]).map((function(e){var n=e;return(0,t.isString)(e)?n=yp({},Sp[e]):Sp[e.name]&&(n=yp(yp({},Sp[e.name]),e)),n})),s=i.length?i:Object.keys(Sp).map((function(t){return Sp[t]}));o.classes=yp({actionbar:'actionbar',button:'action',active:'active',disabled:'disabled',inactive:'inactive'},o.classes);var a=o.classes,l=o.actionbar;if(this.actionbar=l,this.classes=a,this.actions=s,!l){if(!this.isCustom(o.module)){var c=o.actionbarContainer;(l=document.createElement('div')).className=a.actionbar,null==c||c.appendChild(l),this.actionbar=l}s.forEach((function(t){return r.addAction(t)}))}return o.styleWithCSS&&this.exec('styleWithCSS'),this}return n.prototype.isCustom=function(t){var e=t||this.em.RichTextEditor;return!(!(null==e?void 0:e.config.custom)&&!(null==e?void 0:e.customRte))},n.prototype.destroy=function(){},n.prototype.setEl=function(t){this.el=t,this.doc=t.ownerDocument},n.prototype.updateActiveActions=function(){var t=this,e=this.getActions();e.forEach((function(e){var n=e.update,o=e.btn,r=t.classes,i=r.active,s=r.inactive,a=r.disabled,l=e.state,c=e.name,u=t.doc,p=vp.INACTIVE;if(o&&(o.className=o.className.replace(i,'').trim(),o.className=o.className.replace(s,'').trim(),o.className=o.className.replace(a,'').trim()),l){var d=l(t,u);if(p=d,o)switch(d){case bp:o.className+=" ".concat(i);break;case _p:o.className+=" ".concat(s);break;case wp:o.className+=" ".concat(a)}}else u.queryCommandSupported(c)&&u.queryCommandState(c)&&(o&&(o.className+=" ".concat(i)),p=vp.ACTIVE);e.currentState=p,null==n||n(t,e)})),e.length&&this.em.RichTextEditor.__dbdTrgCustom()},n.prototype.enable=function(t){return this.enabled?this:this.__toggleEffects(!0,t)},n.prototype.disable=function(){return this.__toggleEffects(!1)},n.prototype.__toggleEffects=function(t,n){void 0===t&&(t=!1),void 0===n&&(n={});var o=t?e.on:e.off,r=this.el,i=this.doc,s=this.actionbarEl();if(s&&(s.style.display=t?'':'none'),r.contentEditable="".concat(!!t),o(r,'mouseup keyup',this.updateActiveActions),o(i,'keydown',this.__onKeydown),o(i,'paste',this.__onPaste),this.enabled=t,t){var a=n.event;if(this.syncActions(),this.updateActiveActions(),a){var l=null;if(i.caretRangeFromPoint){var c=(0,e.getPointerEvent)(a);l=i.caretRangeFromPoint(c.clientX,c.clientY)}else a.rangeParent&&(l=i.createRange()).setStart(a.rangeParent,a.rangeOffset);var u=i.getSelection();null==u||u.removeAllRanges(),l&&(null==u||u.addRange(l))}r.focus()}return this},n.prototype.__onKeydown=function(t){var e=t,n=this.doc;'Enter'!==e.key||['insertOrderedList','insertUnorderedList'].some((function(t){return n.queryCommandState(t)}))||(n.execCommand('insertLineBreak'),e.preventDefault())},n.prototype.__onPaste=function(t){var e=t.clipboardData||window.clipboardData,n=e.getData('text'),o=e.getData('text/html');if(n&&!o){t.preventDefault();var r=n.replace(/(?:\r\n|\r|\n)/g,'
');this.doc.execCommand('insertHTML',!1,r)}},n.prototype.syncActions=function(){var t=this;this.getActions().forEach((function(e){if(t.actionbar&&(!e.state||e.state&&e.state(t,t.doc)>=0)){var n=e.event||'click',o=e.btn;o&&(o["on".concat(n)]=function(){e.result(t,e),t.updateActiveActions()})}}))},n.prototype.addAction=function(t,e){void 0===e&&(e={});var n=e.sync,o=this.actionbarEl();if(o){var r=t.icon,i=t.attributes,s=void 0===i?{}:i,a=document.createElement('span');for(var l in a.className=this.classes.button,t.btn=a,s)a.setAttribute(l,s[l]);'string'==typeof r?a.innerHTML=r:a.appendChild(r),o.appendChild(a)}n&&(this.actions.push(t),this.syncActions())},n.prototype.getActions=function(){return this.actions},n.prototype.selection=function(){return this.doc.getSelection()},n.prototype.exec=function(t,e){this.doc.execCommand(t,!1,e)},n.prototype.actionbarEl=function(){return this.actionbar},n.prototype.insertHTML=function(n,o){var r=(void 0===o?{}:o).select,i=this,s=i.em,a=i.doc,l=i.el,c=a.getSelection();if(c&&c.rangeCount){var u=(0,e.getModel)(l),p=a.createElement('div'),d=c.getRangeAt(0);d.deleteContents(),(0,t.isString)(n)?p.innerHTML=n:n&&p.appendChild(n),Array.prototype.slice.call(p.childNodes).forEach((function(t){d.insertNode(t)})),c.removeAllRanges(),c.addRange(d),l.focus(),r&&u&&(u.once('rte:disable',(function(){var t=u.find("[".concat(Cp,"]"))[0];t&&(s.setSelected(t),t.removeAttributes(Cp))})),u.trigger('disable'))}},n}();const Tp=Op;var kp=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Pp=void 0&&(void 0).__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(r,i){function s(t){try{l(o.next(t))}catch(t){i(t)}}function a(t){try{l(o["throw"](t))}catch(t){i(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((o=o.apply(t,e||[])).next())}))},Ep=void 0&&(void 0).__generator||function(t,e){var n,o,r,i,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,o&&(r=2&a[0]?o["return"]:a[0]?o["throw"]||((r=o["return"])&&r.call(o),0):o.next)&&!(r=r.call(o,a[1])).done)return r;switch(o=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,o=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(r=s.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]=0}))),g=this.get('onChange'),v={property:this,from:p,to:u,value:l,opts:n};i.__trgEv(i.events.propertyUpdate,v),g&&g(v),h&&this.__upTargetsStyle(((o={})[s]=l,o),n)},o.prototype.__upTargetsStyle=function(t,e){var n,o=null===(n=this.em)||void 0===n?void 0:n.get('StyleManager');null==o||o.addStyleTargets($p($p({},t),{__p:!!e.avoidStore}),e)},o.prototype._up=function(t,e){void 0===e&&(e={}),e.noTarget&&(e.__up=!0);var n=e.partial,o=qp(e,["partial"]);return t.__p=!(!o.avoidStore&&!n),this.set(t,$p($p({},o),{avoidStore:t.__p}))},o.prototype.up=function(t,e){void 0===e&&(e={}),this.set(t,$p($p({},e),{__up:!0}))},o.prototype.init=function(){},o.prototype.getId=function(){return this.get('id')},o.prototype.getType=function(){return this.get('type')},o.prototype.getName=function(){return this.get('property')},o.prototype.getLabel=function(t){var e;void 0===t&&(t={});var n=t.locale,o=void 0===n||n,r=this.getId(),i=this.get('name')||this.get('label');return o&&(null===(e=this.em)||void 0===e?void 0:e.t("styleManager.properties.".concat(r)))||i},o.prototype.getValue=function(t){void 0===t&&(t={});var e=t.noDefault,n=this.get('value');return this.hasValue()||e?n:this.getDefaultValue()},o.prototype.hasValue=function(e){void 0===e&&(e={});var n=e.noParent&&this.getParentTarget(),o=this.get('value');return!(0,t.isUndefined)(o)&&''!==o&&!n},o.prototype.hasValueParent=function(){return this.hasValue()&&!this.hasValue({noParent:!0})},o.prototype.getStyle=function(t){var n;void 0===t&&(t={});var o=this.getName();return(n={})[t.camelCase?(0,e.camelCase)(o):o]=this.__getFullValue(t),n},o.prototype.getDefaultValue=function(){var e=this.get('default');return"".concat((0,t.isUndefined)(e)?this.get('defaults'):e)},o.prototype.upValue=function(t,e){void 0===e&&(e={});var n=null===t||''===t?this.__getClearProps():this.__parseValue(t,e);return this._up(n,e)},o.prototype.isVisible=function(){return!!this.get('visible')},o.prototype.clear=function(t){return void 0===t&&(t={}),this._up(this.__getClearProps(),$p($p({},t),{__clear:!0})),this},o.prototype.canClear=function(){var t=this.getParent();return t?t.__canClearProp(this):this.hasValue({noParent:!0})},o.prototype.getParent=function(){return this.__getParentProp()||null},o.prototype.isFull=function(){return!!this.get('full')},o.prototype.__parseValue=function(t,e){return this.parseValue(t,e)},o.prototype.__getClearProps=function(){return{value:''}},o.prototype.setValue=function(t,e,n){void 0===e&&(e=!0),void 0===n&&(n={});var o=this.parseValue(t),r=!e;!r&&this.set({value:void 0},{avoidStore:r,silent:!0}),this.set(o,$p({avoidStore:r},n))},o.prototype.setValueFromInput=function(t,e,n){void 0===n&&(n={}),this.setValue(t,e,$p($p({},n),{fromInput:1}))},o.prototype.parseValue=function(e,n){void 0===n&&(n={});var o={value:e},r='!important';if((0,t.isString)(e)&&-1!==e.indexOf(r)&&(o.value=e.replace(r,'').trim(),o.important=!0),!this.get('functionName')&&!n.complete)return o;var i=[],s="".concat(o.value),a=s.indexOf('(')+1,l=s.lastIndexOf(')'),c=s.substring(0,a-1);if(c&&(o.functionName=c),i.push(a),l>=0&&i.push(l),o.value=String.prototype.substring.apply(s,i),n.numeric){var u=parseFloat(o.value);o.unit=o.value.replace(u,''),o.value=u}return o},o.prototype.__getFullValue=function(t){var e=(void 0===t?{}:t).withDefault;return!this.hasValue()&&e?this.getDefaultValue():this.getFullValue()},o.prototype.getFullValue=function(e,n){void 0===n&&(n={});var o=this.get('functionName'),r=this.getDefaultValue(),i=(0,t.isUndefined)(e)?this.get('value'):e,s=!(0,t.isUndefined)(i)&&''!==i;if(i&&r&&i===r)return r;if(o&&s){var a='url'===o?"'".concat(i.replace(/'|"/g,''),"'"):i;i="".concat(o,"(").concat(a,")")}return s&&this.get('important')&&!n.skipImportant&&(i="".concat(i," !important")),i||''},o.prototype.__setParentTarget=function(t){this.up({parentTarget:t})},o.prototype.getParentTarget=function(){return this.get('parentTarget')||null},o.prototype.__parseFn=function(t){void 0===t&&(t='');var e=t.indexOf('(')+1,n=t.lastIndexOf(')');return{name:t.substring(0,e-1).trim(),value:String.prototype.substring.apply(t,[e,n>=0?n:void 0]).trim()}},o.prototype.__checkVisibility=function(n){var o=n.target,r=n.component,i=n.sectors,s=r||o;if(!s)return!1;var a=this.getId(),l=this.getName(),c=this.get('toRequire'),u=this.get('requires'),p=this.get('requiresParent'),d=s.get('unstylable'),f=s.get('stylable-require'),h=s.get('stylable');if((0,t.isArray)(h)&&(h=h.indexOf(l)>=0),(0,t.isArray)(d)&&(h=d.indexOf(l)<0),c&&(h=!o||f&&(f.indexOf(a)>=0||f.indexOf(l)>=0)),i&&u){var g=(0,t.keys)(u);i.forEach((function(e){e.getProperties().forEach((function(e){if((0,t.includes)(g,e.id)){var n=u[e.id];h=h&&(0,t.includes)(n,e.get('value'))}}))}))}if(p){var v=r&&r.parent(),y=v&&v.getEl();if(y){var m=(0,e.hasWin)()?window.getComputedStyle(y):{};(0,t.each)(p,(function(e,n){h=h&&m[n]&&(0,t.includes)(e,m[n])}))}else h=!1}return!!h},o}(u.Hn);const Yp=Kp;Kp.callParentInit=function(t,e,n,o){void 0===o&&(o={}),t.prototype.initialize.apply(e,[n,$p($p({},o),{skipInit:1})])},Kp.callInit=function(t,e,n){void 0===n&&(n={}),!n.skipInit&&t.init(e,n)};var Xp=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Jp=void 0&&(void 0).__assign||function(){return Jp=Object.assign||function(t){for(var e,n=1,o=arguments.length;n=0?t:void 0},o.prototype.selectLayer=function(t){return this.set('selectedLayer',t,{__select:!0})},o.prototype.selectLayerAt=function(t){void 0===t&&(t=0);var e=this.getLayer(t);return e&&this.selectLayer(e)},o.prototype.moveLayer=function(e,n){void 0===n&&(n=0);var o=e?e.getIndex():-1;o>=0&&(0,t.isNumber)(n)&&n>=0&&n0&&!e},o.prototype.clear=function(t){return void 0===t&&(t={}),this.__getLayers().reset(),this.__upTargetsStyleProps(t),Yp.prototype.clear.call(this),this},o.prototype.__canClearProp=function(){return!1},o}(ed);const gd=hd;var vd=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),yd=void 0&&(void 0).__assign||function(){return yd=Object.assign||function(t){for(var e,n=1,o=arguments.length;n\n
\n ")},o.prototype.templateLabel=function(t){var e=this.pfx,n=this.em,o=t.parent,r=t.attributes,i=r.icon,s=void 0===i?'':i,a=r.info,l=void 0===a?'':a,c=null==n?void 0:n.getConfig().icons,u=(null==c?void 0:c.close)||'';return"\n \n ").concat(t.getLabel(),"\n \n ").concat(o?'':"
").concat(u,"
"),"\n ")},o.prototype.templateInput=function(t){return"\n
\n \n
\n ")},o.prototype.remove=function(){var t=this;return u.G7.prototype.remove.apply(this,arguments),['em','input','$input','view'].forEach((function(e){return t[e]=null})),this.__destroyFn(this._getClbOpts()),this},o.prototype.updateStatus=function(){var t,e=this,n=e.model,o=e.pfx,r=e.ppfx,i=e.config,s="".concat(r,"four-color"),a="".concat(r,"color-warn"),l=this.$el.children(".".concat(o,"label")),c=this.getClearEl(),u=c?c.style:{};l.removeClass("".concat(s," ").concat(a)),u.display='none',n.hasValue({noParent:!0})&&i.highlightChanged?(l.addClass(s),i.clearProperties&&(u.display='')):n.hasValue()&&i.highlightComputed&&l.addClass(a),null===(t=this.parent)||void 0===t||t.updateStatus()},o.prototype.clear=function(t){t&&t.stopPropagation(),this.model.clear()},o.prototype.getClearEl=function(){return this.clearEl||(this.clearEl=this.el.querySelector("[".concat(_d,"]"))),this.clearEl},o.prototype.inputValueChanged=function(t){t&&t.stopPropagation(),this.emit||this.model.upValue(t.target.value)},o.prototype.onValueChange=function(t,e,n){void 0===n&&(n={}),this.setValue(this.model.getFullValue(void 0,{skipImportant:!0})),this.updateStatus()},o.prototype.setValue=function(e){var n=this.model,o=(0,t.isUndefined)(e)||''===e?n.getDefaultValue():e;if(this.update)return this.__update(o);this.__setValueInput(o)},o.prototype.__setValueInput=function(t){var e=this.getInputEl();e&&(e.value=t)},o.prototype.getInputEl=function(){return this.input||(this.input=this.el.querySelector('input')),this.input},o.prototype.updateVisibility=function(){this.el.style.display=this.model.isVisible()?'':'none'},o.prototype.clearCached=function(){delete this.clearEl,delete this.input,delete this.$input},o.prototype.__unset=function(){var t=this.unset&&this.unset.bind(this);t&&t(this._getClbOpts())},o.prototype.__update=function(t){var e=this.update&&this.update.bind(this);e&&e(yd(yd({},this._getClbOpts()),{value:t}))},o.prototype.__change=function(){for(var t=[],e=0;e\n \n \n ")},e.prototype.remove=function(){var t;return null===(t=this.props)||void 0===t||t.remove(),xd.prototype.remove.apply(this,arguments),this},e.prototype.onValueChange=function(){},e.prototype.onRender=function(){var t=this.pfx,e=this.model,n=e.get('properties');if(n.length&&!this.props){var o=e.isDetached(),r=new Od({config:kd(kd({},this.config),{highlightComputed:o,highlightChanged:o}),collection:n,parent:this});r.render(),this.$el.find("#".concat(t,"input-holder")).append(r.el),this.props=r}},e.prototype.clearCached=function(){xd.prototype.clearCached.apply(this,arguments),delete this.props},e}(xd);var Ed=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Ad=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Ed(n,e),n.prototype.events=function(){return{click:'select','click [data-close-layer]':'removeItem','mousedown [data-move-layer]':'initSorter','touchstart [data-move-layer]':'initSorter'}},n.prototype.template=function(){var t=this,e=t.pfx,n=t.ppfx,o=t.em,r=null==o?void 0:o.getConfig().icons,i=(null==r?void 0:r.close)||'',s=(null==r?void 0:r.move)||'';return"\n
\n
\n ").concat(s,"\n
\n
\n
\n
\n
\n
\n ").concat(i,"\n
\n
\n
\n ")},n.prototype.initialize=function(t){void 0===t&&(t={});var e=this.model,n=t.config||{};this.em=n.em,this.config=n,this.sorter=t.sorter,this.pfx=n.stylePrefix||'',this.ppfx=n.pStylePrefix||'',this.propertyView=t.propertyView;var o=this.propertyView.model;this.listenTo(e,'destroy remove',this.remove),this.listenTo(e,'change:values',this.updateLabel),this.listenTo(o,'change:selectedLayer',this.updateVisibility),e.view=this,e.set({droppable:0,draggable:1}),this.$el.data('model',e)},n.prototype.initSorter=function(){var t;null===(t=this.sorter)||void 0===t||t.startSort(this.el)},n.prototype.removeItem=function(t){t&&t.stopPropagation(),this.model.remove()},n.prototype.select=function(){this.model.select()},n.prototype.getPropertiesWrapper=function(){return this.propsWrapEl||(this.propsWrapEl=this.el.querySelector('[data-properties]')),this.propsWrapEl},n.prototype.getPreviewEl=function(){return this.previewEl||(this.previewEl=this.el.querySelector('[data-preview]')),this.previewEl},n.prototype.getLabelEl=function(){return this.labelEl||(this.labelEl=this.el.querySelector('[data-label]')),this.labelEl},n.prototype.updateLabel=function(){var e=this.model,n=e.getLabel();if(this.getLabelEl().innerHTML=n,e.hasPreview()){var o=this.getPreviewEl(),r=e.getStylePreview({number:{min:-3,max:3}}),i=(0,t.keys)(r).map((function(t){return"".concat(t,":").concat(r[t])})).join(';');o.setAttribute('style',i)}},n.prototype.updateVisibility=function(){var t,e=this,n=e.pfx,o=e.model,r=e.propertyView,i=this.getPropertiesWrapper(),s=o.isSelected();i.style.display=s?'':'none',this.$el[s?'addClass':'removeClass']("".concat(n,"active")),s&&i.appendChild(null===(t=r.props)||void 0===t?void 0:t.el)},n.prototype.render=function(){var t=this,e=t.el,n=t.pfx,o=t.model;return e.innerHTML=this.template(),e.className="".concat(n,"layer"),o.hasPreview()&&(e.querySelector('[data-preview-box]').style.display=''),this.updateLabel(),this.updateVisibility(),this},n}(u.G7);const jd=Ad;var Md=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Ld=function(t){function e(e){var n=t.call(this,e)||this,o=n.collection,r=e.config||{},i=r.em,s=r.stylePrefix||'',a=r.pStylePrefix||'';n.config=r,n.pfx=s,n.ppfx=a,n.propertyView=e.propertyView,n.className="".concat(s,"layers ").concat(a,"field"),n.listenTo(o,'add',n.addTo),n.listenTo(o,'reset',n.reset),n.items=[];var l=null==i?void 0:i.Utils;return n.sorter=l?new l.Sorter({container:n.el,ignoreViewChildren:1,containerSel:".".concat(s,"layers"),itemSel:".".concat(s,"layer"),pfx:r.pStylePrefix}):'',o.view=n,n.$el.data('model',o),n.$el.data('collection',o),n}return Md(e,t),e.prototype.addTo=function(t){var e=this.collection.indexOf(t);this.addToCollection(t,null,e)},e.prototype.addToCollection=function(t,e,n){var o=e||null,r=this,i=r.propertyView,s=r.config,a=r.sorter,l=r.$el,c=new jd({model:t,config:s,sorter:a,propertyView:i}),u=c.render().el;if(this.items.push(c),o)o.appendChild(u);else if(void 0!==n){var p='before';l.children().length===n&&(n--,p='after'),n<0?l.append(u):l.children().eq(n)[p](u)}else l.append(u);return u},e.prototype.reset=function(t,e){this.clearItems(),this.render()},e.prototype.remove=function(){return this.clearItems(),u.G7.prototype.remove.apply(this,arguments),this},e.prototype.clearItems=function(){this.items.forEach((function(t){return t.remove()})),this.items=[]},e.prototype.render=function(){var t=this,e=this.$el,n=this.sorter,o=document.createDocumentFragment();return e.empty(),this.collection.forEach((function(e){return t.addToCollection(e,o)})),e.append(o),e.attr('class',this.className),n&&(n.plh=null),this},e}(u.G7);const Dd=Ld;var Nd=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Id=void 0&&(void 0).__assign||function(){return Id=Object.assign||function(t){for(var e,n=1,o=arguments.length;n\n \n
\n \n ")},e.prototype.init=function(){var t=this.model;this.listenTo(t.__getLayers(),'change reset',this.updateStatus)},e.prototype.addLayer=function(){this.model.addLayer({},{at:0})},e.prototype.setValue=function(){},e.prototype.remove=function(){var t;return null===(t=this.layersView)||void 0===t||t.remove(),Pd.prototype.remove.apply(this,arguments),this},e.prototype.clearCached=function(){Pd.prototype.clearCached.apply(this,arguments),delete this.layersView},e.prototype.onRender=function(){var t=this,e=t.model,n=t.el,o=t.config,r=e.get('properties');if(r.length&&!this.props){var i=new Od({config:Id(Id({},o),{highlightComputed:!1,highlightChanged:!1}),collection:r,parent:this});i.render();var s=new Dd({collection:e.__getLayers(),config:o,propertyView:this});s.render(),n.querySelector('[data-layers-wrapper]').appendChild(s.el),this.props=i,this.layersView=s}},e}(Pd);const Vd=Fd;var Rd=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Hd=void 0&&(void 0).__assign||function(){return Hd=Object.assign||function(t){for(var e,n=1,o=arguments.length;n\n
\n
\n \n
\n
\n
\n
\n
\n
").concat(r,"
\n
\n \n ")},n.prototype.__setValueInput=function(t){var e=this.model,n=this.el,o=e.getDefaultValue(),r=n.querySelector('[data-preview-box]'),i=n.querySelector('[data-preview]');r.style.display=t&&t!==o?'':'none',i.style.backgroundImage=t||e.getDefaultValue()},n.prototype.openAssetManager=function(){var e,n=this,o=null===(e=this.em)||void 0===e?void 0:e.Assets;null==o||o.open({select:function(e,r){var i=(0,t.isString)(e)?e:e.get('src');n.model.upValue(i,{partial:!r}),r&&o.close()},types:['image'],accept:'image/*'})},n}(xd);var Bd=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();const Ud=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Bd(e,t),e.prototype.templateInput=function(t){return''},e.prototype.init=function(){var t=this.model;this.listenTo(t,'change:unit',this.onValueChange),this.listenTo(t,'change:units',this.render)},e.prototype.setValue=function(t){},e.prototype.onRender=function(){var t=this,e=t.ppfx,n=t.model,o=t.el;if(!this.inputInst){var r=n.input;r.ppfx=e,r.render(),o.querySelector(".".concat(e,"fields")).appendChild(r.el),this.input=r.inputEl.get(0),this.inputInst=r}},e.prototype.clearCached=function(){xd.prototype.clearCached.apply(this,arguments),this.inputInst=null},e}(xd);var Wd=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();const $d=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Wd(e,t),e.prototype.setValue=function(t){var e;null===(e=this.inputInst)||void 0===e||e.setValue(t,{fromTarget:1,def:this.model.getDefaultValue()})},e.prototype.remove=function(){var t=this;Ud.prototype.remove.apply(this,arguments);var e=this.inputInst;return e&&e.remove&&e.remove(),['inputInst','$color'].forEach((function(e){return t[e]=null})),this},e.prototype.__handleChange=function(t,e){this.model.upValue(t,{partial:e})},e.prototype.onRender=function(){var t;if(!this.inputInst){this.__handleChange=this.__handleChange.bind(this);var e=this,n=e.ppfx,o=e.model,r=e.em,i=e.el,s=new Aa({target:r,model:o,ppfx:n,onChange:this.__handleChange}).render();i.querySelector(".".concat(n,"fields")).appendChild(s.el),this.input=null===(t=s.inputEl)||void 0===t?void 0:t.get(0),this.inputInst=s}},e}(Ud);var qd=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Gd=void 0&&(void 0).__assign||function(){return Gd=Object.assign||function(t){for(var e,n=1,o=arguments.length;n\n \n
\n
\n
\n \n ")},e.prototype.updateOptions=function(){delete this.input,this.onRender()},e.prototype.onRender=function(){var t=this.pfx,e=this.model,n=e.getOptions();if(!this.input){var o=[];n.forEach((function(t){var n=e.getOptionId(t),r=e.getOptionLabel(n),i=t.style?t.style.replace(/"/g,'"'):'',s=i?"style=\"".concat(i,"\""):'',a=n.replace(/"/g,'"');o.push(""))}));var r=this.el.querySelector("#".concat(t,"input-holder"));r.innerHTML=""),this.input=r.firstChild}},e.prototype.__setValueInput=function(t){var e=this.model,n=this.getInputEl(),o=e.getOptions()[0],r=o?e.getOptionId(o):'';n&&(n.value=t||r)},e}(xd);var Zd=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Qd=void 0&&(void 0).__assign||function(){return Qd=Object.assign||function(t){for(var e,n=1,o=arguments.length;n")},e.prototype.onRender=function(){var t=this.pfx,e=this.ppfx,n=this.model,o="".concat(e,"radio-item-label"),r=n.getName(),i=n.getOptions(),s="".concat(t,"radio ").concat(t,"radio-").concat(r),a=n.cid;if(!this.input){var l=[];i.forEach((function(i){var c=i.className?"".concat(i.className," ").concat(t,"icon ").concat(o):'',u=n.getOptionId(i),p="".concat(r,"-").concat(u,"-").concat(a),d=c?'':n.getOptionLabel(u),f=i.title?"title=\"".concat(i.title,"\""):'',h=n.getValue()===u?'checked':'';l.push("\n
\n \n \n
\n "))}));var c=this.el.querySelector(".".concat(e,"field"));c.innerHTML="
").concat(l.join(''),"
"),this.input=c.firstChild}},e.prototype.__setValueInput=function(t){var e,n=this.model,o=t||n.getDefaultValue(),r=null===(e=this.getInputEl())||void 0===e?void 0:e.querySelector("[value=\"".concat(o,"\"]"));r&&(r.checked=!0)},e}(Jd);var of=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),rf=void 0&&(void 0).__assign||function(){return rf=Object.assign||function(t){for(var e,n=1,o=arguments.length;n\n \n \n ")},e.prototype.getSliderEl=function(){return this.slider||(this.slider=this.el.querySelector('input[type=range]')),this.slider},e.prototype.inputValueChanged=function(t){t.stopPropagation(),this.model.upValue(this.getSliderEl().value)},e.prototype.inputValueChangedSoft=function(t){t.stopPropagation(),this.model.upValue(this.getSliderEl().value,{partial:!0})},e.prototype.setValue=function(t){var e=this.model,n=e.parseValue(t);this.getSliderEl().value=''===t?e.getDefaultValue():parseFloat(n.value),Ud.prototype.setValue.apply(this,arguments)},e.prototype.onRender=function(){Ud.prototype.onRender.apply(this,arguments),this.model.get('showInput')||(this.inputInst.el.style.display='none')},e.prototype.clearCached=function(){Ud.prototype.clearCached.apply(this,arguments),delete this.slider},e}(Ud);const ff=u.FE.extend(Pl).extend({extendViewApi:1,init:function(){var t=this.opts,e=this.em,n=t.module||(null==e?void 0:e.get('StyleManager'));n&&(n.__listenAdd(this,n.events.propertyAdd),n.__listenRemove(this,n.events.propertyRemove))},types:[{id:'stack',model:gd,view:Vd,isType:function(t){if(t&&'stack'==t.type)return t}},{id:'composite',model:ed,view:Pd,isType:function(t){if(t&&'composite'==t.type)return t}},{id:'file',model:Yp,view:zd,isType:function(t){if(t&&'file'==t.type)return t}},{id:'color',model:Yp,view:$d,isType:function(t){if(t&&'color'==t.type)return t}},{id:'select',model:Yd,view:Jd,isType:function(t){if(t&&'select'==t.type)return t}},{id:'radio',model:tf,view:nf,isType:function(t){if(t&&'radio'==t.type)return t}},{id:'slider',model:cf,view:df,isType:function(t){if(t&&'slider'==t.type)return t}},{id:'integer',model:sf,view:Ud,isType:function(t){if(t&&'integer'==t.type)return t}},{id:'number',model:sf,view:Ud,isType:function(t){if(t&&'number'==t.type)return t}},{id:'base',model:Yp,view:xd,isType:function(t){return t.type='base',t}}]});var hf=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),gf=void 0&&(void 0).__assign||function(){return gf=Object.assign||function(t){for(var e,n=1,o=arguments.length;n\n
$","
\n
","
\n \n "],["\n
\n
$","
\n
","
\n
\n "])),a,a,s,a,o)},e.prototype.events=function(){return{'click [data-sector-title]':'toggle'}},e.prototype.updateOpen=function(){var t=this,e=t.$el,n=t.model,o=t.pfx,r=n.isOpen();e[r?'addClass':'removeClass']("".concat(o,"open")),this.getPropertiesEl().style.display=r?'':'none'},e.prototype.updateVisibility=function(){this.el.style.display=this.model.isVisible()?'':'none'},e.prototype.getPropertiesEl=function(){var t=this.$el,e=this.pfx;return t.find(".".concat(e,"properties")).get(0)},e.prototype.toggle=function(){var t=this.model;t.setOpen(!t.get('open'))},e.prototype.renderProperties=function(){var t=this.model,e=this.config,n=t.get('properties');if(n){var o=new Od({collection:n,config:e});this.$el.append(o.render().el)}},e.prototype.render=function(){var t=this,e=t.pfx,n=t.model,o=t.$el,r=n.getId(),i=n.getName();return o.html(this.template({pfx:e,label:i})),this.renderProperties(),o.attr('class',"".concat(e,"sector ").concat(e,"sector__").concat(r," no-select")),this.updateOpen(),this},e}(u.G7);const jf=Af;var Mf,Lf=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Df=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e)||this,o=e.module,r=e.config,i=n.collection;return n.pfx=(null==r?void 0:r.stylePrefix)||'',n.ppfx=(null==r?void 0:r.pStylePrefix)||'',n.config=r,n.module=o,n.listenTo(i,'add',n.addTo),n.listenTo(i,'reset',n.render),n}return Lf(e,t),e.prototype.remove=function(){var t=this;return u.G7.prototype.remove.apply(this,arguments),['config','module','em'].forEach((function(e){return t[e]={}})),this},e.prototype.addTo=function(t,e,n){void 0===n&&(n={}),this.addToCollection(t,null,n)},e.prototype.addToCollection=function(t,e,n){void 0===n&&(n={});var o=this.config,r=this.el,i=e||r,s=new jf({model:t,config:o}).render().el;return(0,Et.$Q)(i,s,n.at),s},e.prototype.render=function(){var t=this,e=this,n=e.$el,o=e.pfx,r=e.ppfx;n.empty();var i=document.createDocumentFragment();return this.collection.each((function(e){return t.addToCollection(e,i)})),n.append(i),n.addClass("".concat(o,"sectors ").concat(r,"one-bg ").concat(r,"two-color")),this},e}(u.G7);const Nf=Df;var If=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Ff=void 0&&(void 0).__assign||function(){return Ff=Object.assign||function(t){for(var e,n=1,o=arguments.length;n0&&r[r.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]=e.getStepsBeforeSave()&&this.store().catch((function(e){return t.logError(e)}))},o.prototype.loadModule=function(t){var e=new t(this);return this.set(e.name,e),e.onLoad&&this.toLoad.push(e),this.modules.push(e),e},o.prototype.loadStorableModule=function(t){var e=this.loadModule(t);return this.storables.push(e),e},o.prototype.init=function(t,e){void 0===e&&(e={}),this.destroyed&&(this.initialize(e),this.destroyed=!1),this.set('Editor',t)},o.prototype.getEditor=function(){return this.get('Editor')},o.prototype.handleUpdates=function(t,e,n){var o=this;void 0===n&&(n={}),this.__skip||n.temporary||n.noCount||n.avoidStore||!this.get('ready')||(this.timedInterval&&clearTimeout(this.timedInterval),this.timedInterval=setTimeout((function(){var t=o.getDirtyCount()||0,e=(n.unset,sh(n,["unset"]));o.set('changesCount',t+1,e)}),0))},o.prototype.changesUp=function(t){this.handleUpdates(0,0,t)},o.prototype.componentHovered=function(t,e,n){var o=this.previous('componentHovered');o&&this.trigger('component:unhovered',o,n),e&&this.trigger('component:hovered',e,n)},o.prototype.getSelected=function(){return this.selected.lastComponent()},o.prototype.getSelectedAll=function(){return this.selected.allComponents()},o.prototype.setSelected=function(n,o){var r=this;void 0===o&&(o={});var i=o.event,s=i&&(i.ctrlKey||i.metaKey),a=(i||{}).shiftKey,c=((0,t.isArray)(n)?n:[n]).map((function(t){return(0,e.getModel)(t,l["default"])})),u=this.getSelectedAll(),p=this.getConfig().multipleSelection,d=(0,t.isArray)(n);d&&this.removeSelected(u.filter((function(e){return!(0,t.contains)(c,e)}))),c.forEach((function(n){var i=(0,e.getModel)(n,void 0);if(i&&(r.trigger('component:select:before',i,o),!i.get('selectable')||o.abort)){if(!o.useValid)return;for(var l=i.parent();l&&!l.get('selectable');)l=l.parent();i=l}if(s&&p)return r.toggleSelected(i);if(a&&p){r.clearSelection(r.get('Canvas').getWindow());var c,f,h=i.collection,g=i.index();if(r.getSelectedAll().forEach((function(e){var n=e.collection,o=e.index();n===h&&(og&&(f=(0,t.isUndefined)(f)?o:Math.min(f,o)))})),!(0,t.isUndefined)(c))for(;c!==g;)r.addSelected(h.at(c)),c++;if(!(0,t.isUndefined)(f))for(;f!==g;)r.addSelected(h.at(f)),f--;return r.addSelected(i)}!d&&r.removeSelected(u.filter((function(t){return t!==i}))),r.addSelected(i,o),i}))},o.prototype.addSelected=function(n,o){var r=this;void 0===o&&(o={});var i=(0,e.getModel)(n,l["default"]);((0,t.isArray)(i)?i:[i]).forEach((function(e){var n=r.selected;e&&e.get('selectable')&&!e.parents().some((function(t){return n.hasComponent(t)}))&&(o.forceChange&&r.removeSelected(e,o),n.allComponents().filter((function(n){return(0,t.contains)(n.parents(),e)})).forEach((function(t){return r.removeSelected(t,o)})),n.addComponent(e,o),e&&r.trigger('component:select',e,o))}))},o.prototype.removeSelected=function(t,n){void 0===n&&(n={}),this.selected.removeComponent((0,e.getModel)(t,l["default"]),n)},o.prototype.toggleSelected=function(n,o){var r=this;void 0===o&&(o={});var i=(0,e.getModel)(n,l["default"]);((0,t.isArray)(i)?i:[i]).forEach((function(t){r.selected.hasComponent(t)?r.removeSelected(t,o):r.addSelected(t,o)}))},o.prototype.setHovered=function(t,n){if(void 0===n&&(n={}),!t)return this.set('componentHovered','');var o='component:hover',r=(0,e.getModel)(t,void 0);if(r){if(n.forceChange&&this.set('componentHovered',''),this.trigger("".concat(o,":before"),r,n),!r.get('hoverable')){if(!n.useValid||n.abort)return;for(var i=r&&r.parent();i&&!i.get('hoverable');)i=i.parent();r=i}n.abort||(this.set('componentHovered',r,n),this.trigger(o,r,n))}},o.prototype.getHovered=function(){return this.get('componentHovered')},o.prototype.setComponents=function(t,e){return void 0===e&&(e={}),this.get('DomComponents').setComponents(t,e)},o.prototype.getComponents=function(){var t=this.get('DomComponents'),e=this.get('CodeManager');if(t&&e){var n=t.getComponents();return e.getCode(n,'json')}},o.prototype.setStyle=function(t,e){void 0===e&&(e={});var n=this.get('CssComposer');return n.clear(e),n.getAll().add(t,e),this},o.prototype.addStyle=function(e,n){void 0===n&&(n={});var o=this.getStyle().add(e,n);return(0,t.isArray)(o)?o:[o]},o.prototype.getStyle=function(){return this.Css.getAll()},o.prototype.setState=function(t){return this.set('state',t),this},o.prototype.getState=function(){return this.get('state')||''},o.prototype.getHtml=function(t){void 0===t&&(t={});var e=this.config,n=e.optsHtml,o=e.jsInHtml?this.getJs(t):'',r=t.component||this.get('DomComponents').getComponent(),i=r?this.get('CodeManager').getCode(r,'html',oh(oh({},n),t)):'';return i+=o?"'; window.initialComponents = window.initialComponents.replace('', fullScript + ''); - $.each(window.languages, (languageCode, languageTranslation) => { + Object.keys(window.languages || {}).forEach(languageCode => { if (window.pageBlocks[languageCode] === null) { window.pageBlocks[languageCode] = {}; } @@ -56,14 +56,15 @@ // remove whitespace from phpb-block-container elements, otherwise these components will become type=text, // resulting in components dropped inside the container jumping to the dropped position - 1 - let $blockHtml = $("").append(block.content); - $blockHtml.find("[phpb-blocks-container]").each(function() { - if ($(this).html() !== '' && $(this).html().trim() === '') { - $(this).html(''); + let tempDiv = document.createElement("div"); + tempDiv.innerHTML = block.content; + tempDiv.querySelectorAll("[phpb-blocks-container]").forEach(cont => { + if (cont.innerHTML !== '' && cont.innerHTML.trim() === '') { + cont.innerHTML = ''; } }); - window.themeBlocks[blockSlug].content = $blockHtml.html(); - block.content = $blockHtml.html(); + window.themeBlocks[blockSlug].content = tempDiv.innerHTML; + block.content = tempDiv.innerHTML; editor.BlockManager.add(blockSlug, block); } @@ -72,8 +73,10 @@ /** * Switch pagebuilder to another language variant on changing the language selector. */ - $("#language-selector select").on("change", function() { - let selectedLanguage = $(this).find("option:selected").val(); + document.addEventListener("change", function(e) { + const select = e.target.closest("#language-selector select"); + if (!select) return; + let selectedLanguage = select.value; window.switchLanguage(selectedLanguage, function() { activateLanguage(selectedLanguage); @@ -116,7 +119,7 @@ }); }; - $(window).on('pagebuilder-page-loaded', function(event) { + window.addEventListener('pagebuilder-page-loaded', function(event) { window.editor.getWrapper().find("[phpb-content-container]").forEach(container => { restrictEditAccess(container); window.runScriptsOfComponentAndChildren(container); @@ -135,19 +138,28 @@ * @param component */ function replacePlaceholdersForRenderedBlocks(component) { - let newComponent = component; + if (!component) return; // if we encounter a pagebuilder block, replace it with the server-side rendered html - if (component.get('tagName') === 'phpb-block') { - let id = component.attributes.attributes.id; - if (window.pageBlocks[window.currentLanguage][id] !== undefined && window.pageBlocks[window.currentLanguage][id]['html'] !== undefined) { - newComponent = component.replaceWith(window.pageBlocks[window.currentLanguage][id]['html']); + if (component.get && component.get('tagName') === 'phpb-block') { + let id = component.attributes && component.attributes.attributes ? component.attributes.attributes.id : null; + if (id && window.pageBlocks[window.currentLanguage] && window.pageBlocks[window.currentLanguage][id] !== undefined && window.pageBlocks[window.currentLanguage][id]['html'] !== undefined) { + let replaced = component.replaceWith(window.pageBlocks[window.currentLanguage][id]['html']); window.pageBlocks[window.currentLanguage][id]['html'] = ''; + let replacedComponents = Array.isArray(replaced) ? replaced : [replaced]; + replacedComponents.forEach(comp => { + if (comp && comp.get && comp.get('components')) { + comp.get('components').each(childComponent => replacePlaceholdersForRenderedBlocks(childComponent)); + } + }); + return; } } // replace placeholders inside child components - newComponent.get('components').each(childComponent => replacePlaceholdersForRenderedBlocks(childComponent)); + if (component.get && component.get('components')) { + component.get('components').each(childComponent => replacePlaceholdersForRenderedBlocks(childComponent)); + } } /** @@ -171,37 +183,46 @@ window.editor.on('component:selected', function(component) { // if the component has settings, activate settings panel in pagebuilder sidebar if (componentHasBlockSettings(component)) { - $(".gjs-pn-buttons .gjs-pn-btn:nth-of-type(2)").click(); + const btn = document.querySelector(".gjs-pn-buttons .gjs-pn-btn:nth-of-type(2)"); + if (btn) btn.click(); } else if (component.get('type') === '' && componentHasBackground(component)) { // on selecting a default component without settings, with editable background, show background styling - $(".gjs-pn-buttons .gjs-pn-btn:nth-of-type(3)").click(); - if ($("#gjs-sm-position").hasClass("gjs-sm-open")) { - $("#gjs-sm-position").find(".gjs-sm-title").click(); + const btn = document.querySelector(".gjs-pn-buttons .gjs-pn-btn:nth-of-type(3)"); + if (btn) btn.click(); + const pos = document.getElementById("gjs-sm-position"); + if (pos && pos.classList.contains("gjs-sm-open")) { + const title = pos.querySelector(".gjs-sm-title"); + if (title) title.click(); } - if (! $("#gjs-sm-background").hasClass("gjs-sm-open")) { - $("#gjs-sm-background").find(".gjs-sm-title").click(); + const bg = document.getElementById("gjs-sm-background"); + if (bg && !bg.classList.contains("gjs-sm-open")) { + const title = bg.querySelector(".gjs-sm-title"); + if (title) title.click(); } } // if component has no settings, add no settings text to settings panel in sidebar if (! componentHasBlockSettings(component)) { setTimeout(function() { - $(".gjs-trt-traits").html('

' + window.translations['trait-manager']['no-settings'] + '

'); + const traits = document.querySelector(".gjs-trt-traits"); + if (traits) { + traits.innerHTML = '

' + window.translations['trait-manager']['no-settings'] + '

'; + } }, 0); } // only show the toolbar buttons that are applicable setTimeout(function() { - if (! component.attributes.removable) { - $(".gjs-toolbar .fa-trash-o.gjs-toolbar-item").hide(); - } - if (! component.attributes.copyable) { - $(".gjs-toolbar .fa-clone.gjs-toolbar-item").hide(); - } - if (! component.attributes.draggable) { - $(".gjs-toolbar .fa-arrows.gjs-toolbar-item").hide(); - } + const trash = document.querySelector(".gjs-toolbar .fa-trash-o.gjs-toolbar-item"); + if (trash && !component.attributes.removable) trash.style.display = 'none'; + + const clone = document.querySelector(".gjs-toolbar .fa-clone.gjs-toolbar-item"); + if (clone && !component.attributes.copyable) clone.style.display = 'none'; + + const arrows = document.querySelector(".gjs-toolbar .fa-arrows.gjs-toolbar-item"); + if (arrows && !component.attributes.draggable) arrows.style.display = 'none'; + if (! component.attributes.removable && ! component.attributes.copyable && ! component.attributes.draggable) { window.editor.select(component.parent()); } @@ -211,7 +232,8 @@ let labelHtml = window.themeBlocks[blockSlug]['label']; let labelTextParts = labelHtml.split(""); if (labelTextParts.length > 1) { - $(".gjs-toolbar").attr('title', "Bloknaam: " + labelTextParts[1]); + const toolbar = document.querySelector(".gjs-toolbar"); + if (toolbar) toolbar.setAttribute('title', "Bloknaam: " + labelTextParts[1]); } } }, 0); @@ -322,7 +344,8 @@ // replace the by the actual component // the component is wrapped with a wrapper element to allow block styling (via a unique .style-identifier selector) let wrapperElement = ('wrapper' in component.attributes.attributes) ? component.attributes.attributes['wrapper'] : 'div'; - blockRootComponent = component.replaceWith({tagName: wrapperElement}); + let rep = component.replaceWith({tagName: wrapperElement}); + blockRootComponent = Array.isArray(rep) ? rep[0] : rep; blockRootComponent.attributes['is-style-wrapper'] = true; clone.components().each(function(componentChild) { blockRootComponent.append(cloneComponent(componentChild)); @@ -336,9 +359,11 @@ // else, replace it by a wrapper div to allow block styling (via a unique .style-identifier selector) if (clone.components().length === 1) { let firstChild = cloneComponent(clone.components().models[0]); - blockRootComponent = component.replaceWith(firstChild); + let rep = component.replaceWith(firstChild); + blockRootComponent = Array.isArray(rep) ? rep[0] : rep; } else { - blockRootComponent = component.replaceWith({tagName: 'div'}); + let rep = component.replaceWith({tagName: 'div'}); + blockRootComponent = Array.isArray(rep) ? rep[0] : rep; blockRootComponent.attributes['is-style-wrapper'] = true; clone.components().each(function(componentChild) { blockRootComponent.append(cloneComponent(componentChild)); @@ -451,12 +476,16 @@ /** * On updating an attribute (block setting from the settings side panel), refresh dynamic block via Ajax. */ - window.editor.on('component:update', function(component) { + window.editor.on('component:update', async function(component) { + const frame = document.querySelector(".gjs-frame"); + const frameDoc = frame && (frame.contentDocument || (frame.contentWindow && frame.contentWindow.document)); + const frameEl = frameDoc ? frameDoc.getElementById(component.ccid) : null; + if (window.isLoaded !== true || component.attributes['block-slug'] === undefined || component.attributes['is-updating'] || component.changed['attributes'] === undefined || - $(".gjs-frame").contents().find("#" + component.ccid).length === 0 + !frameEl ) { return; } @@ -487,45 +516,61 @@ } component.attributes['is-updating'] = true; - $(".gjs-frame").contents().find("#" + component.ccid).addClass('gjs-freezed'); + if (frameEl) frameEl.classList.add('gjs-freezed'); let container = window.editor.getWrapper().find("#" + component.ccid)[0].parent(); let data = window.getComponentDataInStorageFormat(component); - // refresh component contents with updated version requested via ajax call - $.ajax({ - type: "POST", - url: window.renderBlockUrl, - data: { - data: JSON.stringify(data), - language: window.currentLanguage - }, - success: function(blockHtml) { - let blockId = $(blockHtml).attr('block-id'); - // set the block settings for the updated component to the new values - window.pageBlocks[window.currentLanguage][blockId] = (data.blocks[blockId] === undefined) ? {} : data.blocks[blockId]; + // refresh component contents with updated version requested via fetch call + try { + const formData = new URLSearchParams(); + formData.append('data', JSON.stringify(data)); + formData.append('language', window.currentLanguage); - // replace old component for the rendered html returned by the server - component.replaceWith(blockHtml); - replacePlaceholdersForRenderedBlocks(container); - applyBlockAttributesToComponents(container); - restrictEditAccess(container, false, false); + const response = await fetch(window.renderBlockUrl, { + method: 'POST', + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + 'X-Requested-With': 'XMLHttpRequest' + }, + body: formData + }); - // run builder scripts of the replaced component and all its children - let replacedComponent = findChildViaBlockIdsPath(container, [blockId]); - runScriptsOfComponentAndChildren(replacedComponent); - - // select the component that was selected before the ajax call - relativeIds.push(blockId); - let componentToSelect = findChildViaBlockIdsPath(container, relativeIds.reverse()); - window.editor.select(componentToSelect); - }, - error: function() { - $(".gjs-frame").contents().find("#" + component.ccid).removeClass('gjs-freezed'); + if (!response.ok) { + if (frameEl) frameEl.classList.remove('gjs-freezed'); component.attributes['is-updating'] = false; window.toastr.error(window.translations['toastr-component-update-failed']); + return; } - }); + + const blockHtml = await response.text(); + let parsedDiv = document.createElement('div'); + parsedDiv.innerHTML = blockHtml; + let firstEl = parsedDiv.firstElementChild; + let blockId = firstEl ? firstEl.getAttribute('block-id') : null; + + // set the block settings for the updated component to the new values + window.pageBlocks[window.currentLanguage][blockId] = (data.blocks[blockId] === undefined) ? {} : data.blocks[blockId]; + + // replace old component for the rendered html returned by the server + component.replaceWith(blockHtml); + replacePlaceholdersForRenderedBlocks(container); + applyBlockAttributesToComponents(container); + restrictEditAccess(container, false, false); + + // run builder scripts of the replaced component and all its children + let replacedComponent = findChildViaBlockIdsPath(container, [blockId]); + runScriptsOfComponentAndChildren(replacedComponent); + + // select the component that was selected before the ajax call + relativeIds.push(blockId); + let componentToSelect = findChildViaBlockIdsPath(container, relativeIds.reverse()); + window.editor.select(componentToSelect); + } catch (error) { + if (frameEl) frameEl.classList.remove('gjs-freezed'); + component.attributes['is-updating'] = false; + window.toastr.error(window.translations['toastr-component-update-failed']); + } }); /** @@ -694,13 +739,16 @@ // refresh the current component in order to switch its component type to raw-content. // this disables GrapesJS parsing of any child elements, avoiding that any GrapesJS specific html attributes are added - let newComponent = component.replaceWith(component.toHTML()); - // copy important attributes from the original component to the refreshed component - ['block-id', 'block-slug', 'is-html', 'style-identifier'].forEach(attribute => { - newComponent.attributes[attribute] = component.attributes[attribute]; - }); - // apply block/component edit restrictions to the new raw-content type version of the component - restrictEditAccess(newComponent); + let replaced = component.replaceWith(component.toHTML()); + let newComponent = Array.isArray(replaced) ? replaced[0] : replaced; + if (newComponent) { + // copy important attributes from the original component to the refreshed component + ['block-id', 'block-slug', 'is-html', 'style-identifier'].forEach(attribute => { + newComponent.attributes[attribute] = component.attributes[attribute]; + }); + // apply block/component edit restrictions to the new raw-content type version of the component + restrictEditAccess(newComponent); + } return; } } @@ -756,7 +804,7 @@ settings.removable = true; } - if (! $.isEmptyObject(settings)) { + if (Object.keys(settings).length > 0) { component.set(settings); if (settings.stylable !== undefined && settings.stylable) { addUniqueClass(component); diff --git a/plugi-core/src/Modules/GrapesJS/resources/assets/js/pagebuilder.js b/plugi-core/src/Modules/GrapesJS/resources/assets/js/pagebuilder.js index 710d1f1..1411788 100644 --- a/plugi-core/src/Modules/GrapesJS/resources/assets/js/pagebuilder.js +++ b/plugi-core/src/Modules/GrapesJS/resources/assets/js/pagebuilder.js @@ -1,24 +1,55 @@ - $(".gjs-editor").append($("#toggle-sidebar")); - $(".gjs-pn-panels").prepend($("#sidebar-header")); - $(".gjs-pn-panels").append($("#sidebar-bottom-buttons")); + const editorEl = document.querySelector('.gjs-editor'); +const toggleSidebarBtn = document.getElementById('toggle-sidebar'); +const sidebarHeader = document.getElementById('sidebar-header'); +const sidebarBottomButtons = document.getElementById('sidebar-bottom-buttons'); +const panelsEl = document.querySelector('.gjs-pn-panels'); +const gjsEl = document.getElementById('gjs'); - $("#toggle-sidebar").click(function() { - $("#gjs").toggleClass('sidebar-collapsed'); +if (editorEl && toggleSidebarBtn) { + editorEl.appendChild(toggleSidebarBtn); +} +if (panelsEl) { + if (sidebarHeader) panelsEl.prepend(sidebarHeader); + if (sidebarBottomButtons) panelsEl.appendChild(sidebarBottomButtons); +} + +if (toggleSidebarBtn) { + toggleSidebarBtn.addEventListener('click', function() { + if (gjsEl) gjsEl.classList.toggle('sidebar-collapsed'); triggerEditorResize(); }); - autoCollapseSidebar(); +} +autoCollapseSidebar(); +if (window.editor) { window.editor.on('run:open-sm', function(editor) { - $(".gjs-trt-traits").parent().parent().css('display', 'none'); - $(".gjs-sm-sectors").parent().parent().css('display', 'block'); + const traits = document.querySelector('.gjs-trt-traits'); + if (traits && traits.parentElement && traits.parentElement.parentElement) { + traits.parentElement.parentElement.style.display = 'none'; + } + const sectors = document.querySelector('.gjs-sm-sectors'); + if (sectors && sectors.parentElement && sectors.parentElement.parentElement) { + sectors.parentElement.parentElement.style.display = 'block'; + } // move element classes editor to advanced section - $("#gjs-sm-advanced .gjs-sm-properties").append($(".gjs-clm-tags")); + const advancedProps = document.querySelector('#gjs-sm-advanced .gjs-sm-properties'); + const clmTags = document.querySelector('.gjs-clm-tags'); + if (advancedProps && clmTags) { + advancedProps.appendChild(clmTags); + } }); + window.editor.on('run:open-tm', function(editor) { - $(".gjs-sm-sectors").parent().parent().css('display', 'none'); - $(".gjs-trt-traits").parent().parent().css('display', 'block'); + const sectors = document.querySelector('.gjs-sm-sectors'); + if (sectors && sectors.parentElement && sectors.parentElement.parentElement) { + sectors.parentElement.parentElement.style.display = 'none'; + } + const traits = document.querySelector('.gjs-trt-traits'); + if (traits && traits.parentElement && traits.parentElement.parentElement) { + traits.parentElement.parentElement.style.display = 'block'; + } }); window.editor.on('block:drag:start', function(block) { @@ -31,44 +62,51 @@ if (! selectedDomComponent) return; setTimeout(function() { - let $toolbar = $(".gjs-rte-toolbar").first(); - let toolbarInUpperHalf = $toolbar.offset().top < (toolbarPosition.elementTop + (0.5 * toolbarPosition.elementHeight)); + let toolbar = document.querySelector('.gjs-rte-toolbar'); + if (!toolbar) return; + const rect = toolbar.getBoundingClientRect(); + let toolbarInUpperHalf = (rect.top + window.scrollY) < (toolbarPosition.elementTop + (0.5 * toolbarPosition.elementHeight)); if (toolbarInUpperHalf) { - let newTop = toolbarPosition.elementTop - $toolbar.height(); + let newTop = toolbarPosition.elementTop - toolbar.offsetHeight; if (newTop > 0) { - $toolbar.css('top', newTop + 'px'); - } else { - //$toolbar.css('top', (toolbarPosition.elementTop + toolbarPosition.elementHeight) + 'px'); + toolbar.style.top = newTop + 'px'; } } }, 0); }); +} - function autoCollapseSidebar() { - if ($(window).width() < 1000) { - $("#gjs").addClass('sidebar-collapsed'); - triggerEditorResize(); - } +function autoCollapseSidebar() { + if (window.innerWidth < 1000) { + if (gjsEl) gjsEl.classList.add('sidebar-collapsed'); + triggerEditorResize(); } +} - function triggerEditorResize() { +function triggerEditorResize() { + if (window.editor && window.editor.trigger) { window.editor.trigger('change:canvasOffset canvasScroll'); } +} - // prevent exiting page builder with backspace button - let backspaceIsPressed = false; - $(document).keydown(function(event) { - if (event.which === 8) backspaceIsPressed = true; - }).keyup(function(event) { - if (event.which === 8) backspaceIsPressed = false; - }); - $(window).on('beforeunload', function(event) { - if (backspaceIsPressed) event.preventDefault(); - }); - +// prevent exiting page builder with backspace button +let backspaceIsPressed = false; +document.addEventListener('keydown', function(event) { + if (event.key === 'Backspace' || event.which === 8) backspaceIsPressed = true; +}); +document.addEventListener('keyup', function(event) { + if (event.key === 'Backspace' || event.which === 8) backspaceIsPressed = false; +}); +window.addEventListener('beforeunload', function(event) { + if (backspaceIsPressed) event.preventDefault(); +}); function addBlockSearch() { - $(".gjs-blocks-cs").prepend($("#block-search")); + const blocksCs = document.querySelector('.gjs-blocks-cs'); + const blockSearch = document.getElementById('block-search'); + if (blocksCs && blockSearch) { + blocksCs.prepend(blockSearch); + } } // listen to messages from iframe @@ -77,11 +115,12 @@ window.addEventListener("message", onMessage, false); function onMessage(event) { // if the page is loaded, remove loading element if (event.data === 'page-loaded') { - $("#phpb-loading").addClass('loaded'); + const loadingEl = document.getElementById('phpb-loading'); + if (loadingEl) loadingEl.classList.add('loaded'); addBlockSearch(); window.isLoaded = true; - $(window).trigger('pagebuilder-page-loaded'); - } else if(event.data === 'touch-start') { - window.touchStart(); + window.dispatchEvent(new CustomEvent('pagebuilder-page-loaded')); + } else if (event.data === 'touch-start') { + if (window.touchStart) window.touchStart(); } } diff --git a/plugi-core/src/Modules/GrapesJS/resources/assets/js/responsive.js b/plugi-core/src/Modules/GrapesJS/resources/assets/js/responsive.js index 51da5bb..27347eb 100644 --- a/plugi-core/src/Modules/GrapesJS/resources/assets/js/responsive.js +++ b/plugi-core/src/Modules/GrapesJS/resources/assets/js/responsive.js @@ -1,6 +1,7 @@ window.touchStart = function() { - $("#gjs").addClass('sidebar-collapsed'); - } + const gjsEl = document.getElementById('gjs'); + if (gjsEl) gjsEl.classList.add('sidebar-collapsed'); +}; diff --git a/plugi-core/src/Modules/GrapesJS/resources/assets/js/rte-link-manager.js b/plugi-core/src/Modules/GrapesJS/resources/assets/js/rte-link-manager.js new file mode 100644 index 0000000..13bcafb --- /dev/null +++ b/plugi-core/src/Modules/GrapesJS/resources/assets/js/rte-link-manager.js @@ -0,0 +1,330 @@ +export function sanitizeHtml(html) { + if (!html) return ''; + // remove all not allowed tags + let result = html.replace(/<(?!\/?(?:a|table|tr|td|th|thead|tbody|tfoot|caption|col|colgroup|p|ul|ol|li|br|strong|em|b|i|u|strike|s|sub|sup|h1|h2|h3|h4|h5|h6|blockquote|pre|hr|span)\b)[^>]+>/gim, ''); + + // remove disallowed attributes from allowed tags, keeping href on anchor and style on table elements + result = result.replace(/<(a|table|tr|td|th|thead|tbody|tfoot|caption|col|colgroup|p|ul|ol|li|br|strong|em|b|i|u|strike|s|sub|sup|h1|h2|h3|h4|h5|h6|blockquote|pre|hr|span)\b([^>]*)>/gim, function(match, tag, attrs) { + tag = tag.toLowerCase(); + if (tag === 'a') { + const hrefMatch = attrs.match(/href="([^"]*)"/i) || attrs.match(/href='([^']*)'/i); + const targetMatch = attrs.match(/target="([^"]*)"/i) || attrs.match(/target='([^']*)'/i); + const href = hrefMatch ? ` href="${hrefMatch[1]}"` : ''; + const target = targetMatch && targetMatch[1] === '_blank' ? ' target="_blank"' : ''; + return ``; + } + if ('|table|tr|td|th|thead|tbody|tfoot|'.includes('|' + tag + '|')) { + const styleMatch = attrs.match(/style="([^"]*)"/i) || attrs.match(/style='([^']*)'/i); + return styleMatch ? `<${tag} style="${styleMatch[1]}">` : `<${tag}>`; + } + return `<${tag}>`; + }); + + return result; +} + +function setupPasteSanitizer(editor) { + const handlePaste = ({ ev, rte }) => { + ev.preventDefault(); + const clipboardData = ev.clipboardData || window.clipboardData; + if (!clipboardData) return; + + const html = clipboardData.getData('text/html'); + const text = clipboardData.getData('text/plain'); + + if (html) { + const cleanHtml = sanitizeHtml(html); + rte.insertHTML(cleanHtml); + } else if (text) { + const escaped = text + .replace(/&/g, '&') + .replace(//g, '>') + .replace(/(?:\r\n|\r|\n)/g, '
'); + rte.insertHTML(escaped); + } + }; + + if (editor.RichTextEditor) { + const rteConfig = editor.RichTextEditor.getConfig(); + rteConfig.onPaste = handlePaste; + } +} + +function registerToolbarActions(editor) { + const rte = editor.RichTextEditor; + if (!rte) return; + + // Custom Link action + if (rte.get('link')) { + rte.remove('link'); + } + rte.add('link', { + icon: '', + attributes: { title: (window.translations && window.translations['link']) || 'Link' }, + result: r => openLinkModal(editor, r) + }); + + if (!rte.get('unorderedList')) { + rte.add('unorderedList', { + icon: '', + attributes: { title: 'Bulleted List' }, + result: r => r.exec('insertUnorderedList') + }); + } + + if (!rte.get('orderedList')) { + rte.add('orderedList', { + icon: '', + attributes: { title: 'Numbered List' }, + result: r => r.exec('insertOrderedList') + }); + } + + if (!rte.get('justifyLeft')) { + rte.add('justifyLeft', { + icon: '', + attributes: { title: 'Align Left' }, + result: r => r.exec('justifyLeft') + }); + } + + if (!rte.get('justifyCenter')) { + rte.add('justifyCenter', { + icon: '', + attributes: { title: 'Align Center' }, + result: r => r.exec('justifyCenter') + }); + } + + if (!rte.get('justifyRight')) { + rte.add('justifyRight', { + icon: '', + attributes: { title: 'Align Right' }, + result: r => r.exec('justifyRight') + }); + } +} + +function openLinkModal(editor, rte) { + const sel = rte.selection(); + let savedRange = null; + let currentAnchor = null; + + if (sel && sel.rangeCount > 0) { + savedRange = sel.getRangeAt(0).cloneRange(); + let node = sel.anchorNode; + if (node) { + if (node.nodeType === Node.TEXT_NODE) node = node.parentNode; + currentAnchor = node.closest ? node.closest('a') : null; + } + } + + let initialType = 'page'; + let initialPageId = ''; + let initialUrl = ''; + let initialTargetBlank = false; + + if (currentAnchor) { + const href = currentAnchor.getAttribute('href') || ''; + if (currentAnchor.getAttribute('target') === '_blank') { + initialTargetBlank = true; + } + if (href.startsWith('[page id=')) { + initialType = 'page'; + initialPageId = href.substring(9, href.length - 1); + } else { + initialType = 'url'; + initialUrl = href; + } + } + + const pages = window.pages || []; + const translations = window.translations || {}; + + const container = document.createElement('div'); + container.className = 'gjs-link-modal-form'; + container.style.padding = '10px 0'; + + // Type selector: Internal Page vs External URL + const typeGroup = document.createElement('div'); + typeGroup.style.marginBottom = '12px'; + typeGroup.innerHTML = ` + +
+ + +
+ `; + container.appendChild(typeGroup); + + // Page selection container + const pageGroup = document.createElement('div'); + pageGroup.style.marginBottom = '12px'; + pageGroup.style.display = initialType === 'page' ? 'block' : 'none'; + + let pageOptionsHtml = ''; + pages.forEach(item => { + const title = Array.isArray(item) ? item[0] : (item.title || item.name); + const id = Array.isArray(item) ? item[1] : item.id; + const isSelected = String(id) === String(initialPageId) ? 'selected' : ''; + pageOptionsHtml += ``; + }); + + pageGroup.innerHTML = ` + + + `; + container.appendChild(pageGroup); + + // URL input container + const urlGroup = document.createElement('div'); + urlGroup.style.marginBottom = '12px'; + urlGroup.style.display = initialType === 'url' ? 'block' : 'none'; + urlGroup.innerHTML = ` + + + `; + container.appendChild(urlGroup); + + // Toggle between page and URL + const radios = typeGroup.querySelectorAll('input[type="radio"]'); + radios.forEach(radio => { + radio.addEventListener('change', () => { + if (radio.value === 'page') { + pageGroup.style.display = 'block'; + urlGroup.style.display = 'none'; + } else { + pageGroup.style.display = 'none'; + urlGroup.style.display = 'block'; + } + }); + }); + + // Target blank checkbox + const targetGroup = document.createElement('div'); + targetGroup.style.marginBottom = '16px'; + targetGroup.innerHTML = ` + + `; + container.appendChild(targetGroup); + + // Buttons + const buttonsGroup = document.createElement('div'); + buttonsGroup.style.display = 'flex'; + buttonsGroup.style.gap = '8px'; + buttonsGroup.style.justifyContent = 'flex-end'; + + const cancelBtn = document.createElement('button'); + cancelBtn.type = 'button'; + cancelBtn.className = 'btn'; + cancelBtn.innerText = translations['cancel'] || 'Cancel'; + cancelBtn.addEventListener('click', () => editor.Modal.close()); + buttonsGroup.appendChild(cancelBtn); + + if (currentAnchor) { + const unlinkBtn = document.createElement('button'); + unlinkBtn.type = 'button'; + unlinkBtn.className = 'btn btn-danger'; + unlinkBtn.style.color = '#e53e3e'; + unlinkBtn.innerText = translations['unlink'] || 'Remove Link'; + unlinkBtn.addEventListener('click', () => { + const parent = currentAnchor.parentNode; + while (currentAnchor.firstChild) { + parent.insertBefore(currentAnchor.firstChild, currentAnchor); + } + parent.removeChild(currentAnchor); + editor.Modal.close(); + }); + buttonsGroup.appendChild(unlinkBtn); + } + + const applyBtn = document.createElement('button'); + applyBtn.type = 'button'; + applyBtn.className = 'btn btn-primary'; + applyBtn.style.backgroundColor = '#3b82f6'; + applyBtn.style.color = '#fff'; + applyBtn.innerText = translations['apply'] || 'Apply'; + applyBtn.addEventListener('click', () => { + const selectedType = typeGroup.querySelector('input[type="radio"]:checked').value; + const pageSelect = pageGroup.querySelector('select'); + const urlInput = urlGroup.querySelector('input'); + const targetBlank = targetGroup.querySelector('input').checked; + + let href = ''; + if (selectedType === 'page') { + if (pageSelect.value) { + href = `[page id=${pageSelect.value}]`; + } + } else { + href = urlInput.value.trim(); + } + + if (!href) { + editor.Modal.close(); + return; + } + + if (savedRange && rte.doc) { + const win = rte.doc.defaultView || window; + const currentSel = win.getSelection(); + if (currentSel) { + currentSel.removeAllRanges(); + currentSel.addRange(savedRange); + } + } + + if (currentAnchor) { + currentAnchor.setAttribute('href', href); + if (targetBlank) { + currentAnchor.setAttribute('target', '_blank'); + } else { + currentAnchor.removeAttribute('target'); + } + } else { + const selectedText = savedRange ? savedRange.toString() : ''; + const targetAttr = targetBlank ? ' target="_blank"' : ''; + const textToInsert = selectedText || href; + rte.insertHTML(`${textToInsert}`); + } + + editor.Modal.close(); + }); + buttonsGroup.appendChild(applyBtn); + + container.appendChild(buttonsGroup); + + editor.Modal.open({ + title: translations['link'] || 'Link', + content: container + }); +} + +let isInitialized = false; +export function initRteLinkManager(editor) { + if (!editor || !editor.RichTextEditor || isInitialized) return; + isInitialized = true; + setupPasteSanitizer(editor); + registerToolbarActions(editor); +} + +if (typeof window !== 'undefined') { + if (window.editor) { + initRteLinkManager(window.editor); + } else { + window.addEventListener('load', () => { + if (window.editor) initRteLinkManager(window.editor); + }); + } +} diff --git a/plugi-core/src/Modules/GrapesJS/resources/assets/js/run-builder-scripts.js b/plugi-core/src/Modules/GrapesJS/resources/assets/js/run-builder-scripts.js index 69d8f4d..a3d8b86 100644 --- a/plugi-core/src/Modules/GrapesJS/resources/assets/js/run-builder-scripts.js +++ b/plugi-core/src/Modules/GrapesJS/resources/assets/js/run-builder-scripts.js @@ -57,10 +57,6 @@ if (component && component.attributes && (component.attributes['block-id'] || component.attributes['id'])) { window.runScriptsOfComponentAndChildren(component); } - // remove all existing CKEditors after dragging a block with active editor - for (let instanceName in CKEDITOR.instances) { - CKEDITOR.instances[instanceName].destroy(true); - } }); /** @@ -87,20 +83,20 @@ } if (blockId && window.customBuilderScripts[blockId] !== undefined) { let styleIdentifier = component.attributes["style-identifier"]; - let $scriptTag = $("").append(window.customBuilderScripts[blockId]); - // prepend block and blockSelector variables allowing the script to refer to this exact block instance - $scriptTag.find('script').prepend('let inPageBuilder = true;'); - $scriptTag.find('script').prepend('let blockSelector = ".' + styleIdentifier + '";'); - $scriptTag.find('script').prepend('let block = document.getElementsByClassName("' + styleIdentifier + '")[0];'); - // wrap the script contents in a self-invoking function (to add a scope avoiding variable name collisions) - $scriptTag.find('script').prepend('(function(){'); - $scriptTag.find('script').append('})();'); - - // execute the script in the page that is being edited - let scriptTag = document.createElement("script"); - scriptTag.type = "text/javascript"; - scriptTag.innerHTML = $scriptTag.find('script').html(); - window.editor.Canvas.getDocument().body.appendChild(scriptTag); + let tempDiv = document.createElement("div"); + tempDiv.innerHTML = window.customBuilderScripts[blockId]; + let parsedScript = tempDiv.querySelector('script'); + if (parsedScript) { + let scriptContent = parsedScript.innerHTML; + let wrapped = `(function(){\nlet block = document.getElementsByClassName("${styleIdentifier}")[0];\nlet blockSelector = ".${styleIdentifier}";\nlet inPageBuilder = true;\n${scriptContent}\n})();`; + let scriptTag = document.createElement("script"); + scriptTag.type = "text/javascript"; + scriptTag.textContent = wrapped; + let canvasDoc = window.editor.Canvas.getDocument(); + if (canvasDoc && canvasDoc.body) { + canvasDoc.body.appendChild(scriptTag); + } + } } } diff --git a/plugi-core/src/Modules/GrapesJS/resources/assets/js/save-page.js b/plugi-core/src/Modules/GrapesJS/resources/assets/js/save-page.js index 69ca1e7..76d5776 100644 --- a/plugi-core/src/Modules/GrapesJS/resources/assets/js/save-page.js +++ b/plugi-core/src/Modules/GrapesJS/resources/assets/js/save-page.js @@ -14,15 +14,18 @@ /** * Save page on clicking save button. */ - $("#save-page").click(function() { - saveAllTranslationsToServer(); - }); + const savePageBtn = document.getElementById("save-page"); + if (savePageBtn) { + savePageBtn.addEventListener('click', function() { + saveAllTranslationsToServer(); + }); + } /** * Save page on Ctrl + S. */ - $(document).bind("keydown", function(e){ - if(e.ctrlKey && e.which === 83) { + document.addEventListener("keydown", function(e) { + if (e.ctrlKey && (e.key === 's' || e.key === 'S' || e.which === 83)) { // text-editor updates are not applied until focus is lost, so force GrapesJS update window.editor.store(); @@ -42,35 +45,51 @@ window.switchLanguage = function(newLanguage, callback) { window.setWaiting(true); - saveCurrentTranslationLocally(function() { + saveCurrentTranslationLocally(async function() { applyChangesFromCurrentLanguageToNewLanguage(newLanguage); let data = window.pageData; data.blocks = {[newLanguage]: window.pageBlocks[newLanguage]}; + const formData = new URLSearchParams(); + formData.append('data', JSON.stringify(data)); + formData.append('language', newLanguage); + // render the language variant server-side - $.ajax({ - type: "POST", - url: window.renderLanguageVariantUrl, - data: { - data: JSON.stringify(data), - language: newLanguage - }, - success: function(response) { - response = JSON.parse(response); - window.pageBlocks[newLanguage] = response.dynamicBlocks ? response.dynamicBlocks : {}; - callback(); - window.setWaiting(false); - }, - error: function(error) { - callback(); - console.log(error); - let errorMessage = error.statusText + ' ' + error.status; - errorMessage = error.responseJSON.message ? (errorMessage + ': "' + error.responseJSON.message + '"') : errorMessage; + try { + const response = await fetch(window.renderLanguageVariantUrl, { + method: 'POST', + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + 'X-Requested-With': 'XMLHttpRequest' + }, + body: formData + }); + + if (!response.ok) { + let errData = {}; + try { errData = await response.json(); } catch(e) {} + let errorMessage = response.statusText + ' ' + response.status; + errorMessage = errData.message ? (errorMessage + ': "' + errData.message + '"') : errorMessage; window.toastr.error(errorMessage); window.toastr.error(window.translations['toastr-switching-language-failed']); + callback(); + window.setWaiting(false); + return; } - }); + + const responseText = await response.text(); + let parsed = JSON.parse(responseText); + window.pageBlocks[newLanguage] = parsed.dynamicBlocks ? parsed.dynamicBlocks : {}; + callback(); + window.setWaiting(false); + } catch (error) { + callback(); + console.error(error); + window.toastr.error(error.message || 'Error'); + window.toastr.error(window.translations['toastr-switching-language-failed']); + window.setWaiting(false); + } }); }; @@ -98,13 +117,23 @@ // copy the content of blocks containers of the current language to the blocks containers of the new language for (let blockId in currentLanguageBlocks) { - let $currentLanguageBlockHtmlDom = $("" + currentLanguageBlocks[blockId]['html'] + ""); - let $newLanguageBlockHtmlDom = $("" + newLanguageBlocks[blockId]['html'] + ""); - $currentLanguageBlockHtmlDom.find("[phpb-blocks-container]").each(function(index) { - let currentLanguageBlockContainerHtml = $(this).html(); - $newLanguageBlockHtmlDom.find("[phpb-blocks-container]").eq(index).html(currentLanguageBlockContainerHtml); + let currentBlockHtml = (currentLanguageBlocks[blockId] && currentLanguageBlocks[blockId]['html']) || ''; + let newBlockHtml = (newLanguageBlocks[blockId] && newLanguageBlocks[blockId]['html']) || ''; + + let currDiv = document.createElement("div"); + currDiv.innerHTML = currentBlockHtml; + let newDiv = document.createElement("div"); + newDiv.innerHTML = newBlockHtml; + + let currContainers = currDiv.querySelectorAll("[phpb-blocks-container]"); + let newContainers = newDiv.querySelectorAll("[phpb-blocks-container]"); + + currContainers.forEach((cont, index) => { + if (newContainers[index]) { + newContainers[index].innerHTML = cont.innerHTML; + } }); - newLanguageBlocks[blockId]['html'] = $newLanguageBlockHtmlDom.html(); + newLanguageBlocks[blockId]['html'] = newDiv.innerHTML; } window.pageBlocks[newLanguage] = newLanguageBlocks; @@ -226,10 +255,10 @@ function saveAllTranslationsToServer() { toggleSaving(); - saveCurrentTranslationLocally(function() { + saveCurrentTranslationLocally(async function() { // update all language variants with the latest data of the current language we just saved locally - $.each(window.languages, (languageCode, languageTranslation) => { + Object.keys(window.languages || {}).forEach(languageCode => { if (languageCode !== window.currentLanguage) { applyChangesFromCurrentLanguageToNewLanguage(languageCode); } @@ -239,29 +268,45 @@ data.style = removeOldStyleSelectors(data.style); data.blocks = window.pageBlocks; - $.ajax({ - type: "POST", - url: $("#save-page").data('url'), - data: { - data: JSON.stringify(data) - }, - success: function() { - toggleSaving(); - window.toastr.success(window.translations['toastr-changes-saved']); + const saveBtn = document.getElementById("save-page"); + const saveUrl = saveBtn ? (saveBtn.dataset.url || saveBtn.getAttribute('data-url')) : ''; - setTimeout(function() { - window.changesOffset = window.editor.getModel().get('changesCount'); - }, 250); - }, - error: function(error) { - toggleSaving(); - console.log(error); - let errorMessage = error.statusText + ' ' + error.status; - errorMessage = error.responseJSON.message ? (errorMessage + ': "' + error.responseJSON.message + '"') : errorMessage; + const formData = new URLSearchParams(); + formData.append('data', JSON.stringify(data)); + + try { + const response = await fetch(saveUrl, { + method: 'POST', + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + 'X-Requested-With': 'XMLHttpRequest' + }, + body: formData + }); + + toggleSaving(); + + if (!response.ok) { + let errData = {}; + try { errData = await response.json(); } catch(e) {} + let errorMessage = response.statusText + ' ' + response.status; + errorMessage = errData.message ? (errorMessage + ': "' + errData.message + '"') : errorMessage; window.toastr.error(errorMessage); window.toastr.error(window.translations['toastr-saving-failed']); + return; } - }); + + window.toastr.success(window.translations['toastr-changes-saved']); + + setTimeout(function() { + window.changesOffset = window.editor.getModel().get('changesCount'); + }, 250); + } catch(error) { + toggleSaving(); + console.error(error); + window.toastr.error(error.message || 'Error'); + window.toastr.error(window.translations['toastr-saving-failed']); + } }); } @@ -342,12 +387,15 @@ function getContainerHtml(container) { let html = ''; container.get('components').forEach(component => html += component.toHTML()); - let htmlDom = $("" + html + ""); + let div = document.createElement("div"); + div.innerHTML = html; // replace phpb-block elements with shortcode - htmlDom.find('phpb-block').each(function() { - $(this).replaceWith('[block slug="' + $(this).attr('slug') + '" id="' + $(this).attr('id') + '"]'); + div.querySelectorAll('phpb-block').forEach(el => { + let slug = el.getAttribute('slug') || ''; + let id = el.getAttribute('id') || ''; + el.replaceWith('[block slug="' + slug + '" id="' + id + '"]'); }); - return htmlDom.html(); + return div.innerHTML; } /** @@ -356,12 +404,15 @@ * @param component */ function getComponentHtml(component) { - let htmlDom = $("" + component.toHTML() + ""); + let div = document.createElement("div"); + div.innerHTML = component.toHTML(); // replace phpb-block elements with shortcode - htmlDom.find('phpb-block').each(function() { - $(this).replaceWith('[block slug="' + $(this).attr('slug') + '" id="' + $(this).attr('id') + '"]'); + div.querySelectorAll('phpb-block').forEach(el => { + let slug = el.getAttribute('slug') || ''; + let id = el.getAttribute('id') || ''; + el.replaceWith('[block slug="' + slug + '" id="' + id + '"]'); }); - return htmlDom.html(); + return div.innerHTML; } /** @@ -513,17 +564,20 @@ * Toggle the save button waiting status. */ function toggleSaving() { - let button = $("#save-page"); + let button = document.getElementById("save-page"); + if (!button) return; button.blur(); - if (button.hasClass('waiting')) { - button.attr("disabled", false); - button.removeClass('waiting'); - button.find('.spinner-border').addClass('d-none'); + let spinner = button.querySelector('.spinner-border') || button.querySelector('.loading'); + + if (button.classList.contains('waiting')) { + button.removeAttribute("disabled"); + button.classList.remove('waiting'); + if (spinner) spinner.classList.add('d-none'); } else { - button.attr("disabled", true); - button.addClass('waiting'); - button.find('.spinner-border').removeClass('d-none'); + button.setAttribute("disabled", "true"); + button.classList.add('waiting'); + if (spinner) spinner.classList.remove('d-none'); } } diff --git a/plugi-core/src/Modules/GrapesJS/resources/assets/js/toast.js b/plugi-core/src/Modules/GrapesJS/resources/assets/js/toast.js new file mode 100644 index 0000000..787678d --- /dev/null +++ b/plugi-core/src/Modules/GrapesJS/resources/assets/js/toast.js @@ -0,0 +1,75 @@ +let toastContainer = null; + +function getToastContainer() { + if (!toastContainer || !document.body.contains(toastContainer)) { + toastContainer = document.createElement('div'); + toastContainer.className = 'toast toast-top toast-end'; + toastContainer.style.cssText = 'position:fixed; top:20px; right:20px; z-index:999999; display:flex; flex-direction:column; gap:10px; pointer-events:none;'; + document.body.appendChild(toastContainer); + } + return toastContainer; +} + +export function showToast(message, type = 'info', duration = 3500) { + if (!message) return; + const container = getToastContainer(); + const alert = document.createElement('div'); + alert.className = `alert alert-${type}`; + alert.style.cssText = ` + pointer-events: auto; + min-width: 250px; + max-width: 400px; + padding: 12px 16px; + border-radius: 6px; + box-shadow: 0 4px 12px rgba(0,0,0,0.25); + color: #fff; + font-size: 14px; + font-family: inherit; + display: flex; + align-items: center; + gap: 8px; + background-color: ${type === 'success' ? '#10b981' : type === 'error' ? '#ef4444' : '#3b82f6'}; + transition: opacity 0.3s ease, transform 0.3s ease; + opacity: 0; + transform: translateY(-10px); + `; + + const icon = document.createElement('i'); + icon.className = type === 'success' ? 'fa fa-check-circle' : type === 'error' ? 'fa fa-exclamation-circle' : 'fa fa-info-circle'; + alert.appendChild(icon); + + const span = document.createElement('span'); + span.innerText = message; + span.style.flex = '1'; + alert.appendChild(span); + + container.appendChild(alert); + + // animate in + requestAnimationFrame(() => { + alert.style.opacity = '1'; + alert.style.transform = 'translateY(0)'; + }); + + setTimeout(() => { + alert.style.opacity = '0'; + alert.style.transform = 'translateY(-10px)'; + setTimeout(() => { + if (alert.parentNode) { + alert.parentNode.removeChild(alert); + } + }, 300); + }, duration); +} + +window.toastr = { + success(msg, duration = 3000) { + showToast(msg, 'success', duration); + }, + error(msg, duration = 4000) { + showToast(msg, 'error', duration); + }, + info(msg, duration = 3000) { + showToast(msg, 'info', duration); + } +}; diff --git a/plugi-core/src/Modules/GrapesJS/resources/assets/sass/ckeditor.scss b/plugi-core/src/Modules/GrapesJS/resources/assets/sass/ckeditor.scss deleted file mode 100644 index 1ba0f89..0000000 --- a/plugi-core/src/Modules/GrapesJS/resources/assets/sass/ckeditor.scss +++ /dev/null @@ -1,16 +0,0 @@ -.cke_dialog_body { - .cke_dialog_ui_vbox_child { - padding: 0; - } - input.cke_dialog_ui_input_text, - input.cke_dialog_ui_input_password, - input.cke_dialog_ui_input_tel, - textarea.cke_dialog_ui_input_textarea, - div.cke_dialog_ui_input_select { - margin-bottom: 10px; - } - - .cke_dialog_ui_input_select { - width: 100% !important; - } -} diff --git a/plugi-core/src/Modules/GrapesJS/resources/assets/sass/pagebuilder.scss b/plugi-core/src/Modules/GrapesJS/resources/assets/sass/pagebuilder.scss index c114ada..d8ca582 100644 --- a/plugi-core/src/Modules/GrapesJS/resources/assets/sass/pagebuilder.scss +++ b/plugi-core/src/Modules/GrapesJS/resources/assets/sass/pagebuilder.scss @@ -263,43 +263,29 @@ html, body, #gjs { position: absolute; box-shadow: none; width: $sidebar-width; - padding-bottom: 0; - margin-bottom: 0; - margin-left: 0; - margin-right: 0; - padding-left: 0; - padding-right: 0; + padding: 0 10px; background: #22272e; height: 40px; z-index: 100; + display: flex; + align-items: center; #language-selector { - float: right; + margin-left: auto; - .dropdown-item.active, - .dropdown-item:active { - background: #22272e !important; - } - .dropdown-menu.show { - padding: 0; - } - .dropdown-toggle { - margin-top: 2px; - color: #fff !important; - background: none !important; - border: none; - box-shadow: none; - outline: none !important; - } - .flag-icon { - background-size: contain; - background-position: 50%; - background-repeat: no-repeat; - position: relative; - display: inline-block; - width: 1.33333333em; - height: 12px; - line-height: 1em; + select { + background: #2e323b; + color: #e3e3e3; + border: 1px solid #474c57; + border-radius: 4px; + padding: 4px 8px; + font-size: 12px; + outline: none; + cursor: pointer; + + &:focus { + border-color: #3b82f6; + } } } } @@ -311,7 +297,13 @@ html, body, #gjs { color: #c4c7ce; background: #22272e; border-radius: 0; - transition-duration: unset; + border: none; + cursor: pointer; + height: 40px; + width: 40px; + display: flex; + align-items: center; + justify-content: center; } @@ -524,28 +516,31 @@ html, body, #gjs { width: $sidebar-width; margin: 0; padding: 0; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; background: #474c57; border-top: none; + display: flex; button, a { - float: right; + flex: 1; + display: inline-flex; + align-items: center; + justify-content: center; height: 100%; - width: 33.33%; border-left: 1px solid #343944; border-radius: 0; color: #e3e3e3; - font-size: 15px; - padding: 8px 0; + font-size: 13px; + padding: 0 4px; + text-decoration: none; + border: none; + border-left: 1px solid #343944; &:hover { background: #017eb5; color: #fff; } - &:last-child { + &:first-child { border-left: none; } } @@ -554,7 +549,7 @@ html, body, #gjs { background: #0091d1; color: #fff !important; - i.fa { + i.fa-save { display: none; } } @@ -570,4 +565,40 @@ html, body, #gjs { @import 'fields'; @import 'style-manager'; @import 'asset-manager'; -@import 'ckeditor'; \ No newline at end of file + +.gjs-link-modal-form { + color: #d1d5db; + font-size: 14px; + + .gjs-field { + background-color: #2e323b; + border: 1px solid #474c57; + color: #fff; + padding: 8px 12px; + border-radius: 4px; + outline: none; + font-size: 14px; + + &:focus { + border-color: #3b82f6; + } + } + + select.gjs-field { + appearance: none; + background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a0aec0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); + background-repeat: no-repeat; + background-position: right 10px center; + background-size: 16px; + padding-right: 32px; + } + + .btn { + padding: 6px 14px; + border-radius: 4px; + font-size: 13px; + cursor: pointer; + border: none; + transition: background-color 0.15s ease-in-out; + } +} \ No newline at end of file diff --git a/plugi-core/src/Modules/GrapesJS/resources/views/grapesjs/asset-manager.php b/plugi-core/src/Modules/GrapesJS/resources/views/grapesjs/asset-manager.php index 8a6941d..b1a0195 100644 --- a/plugi-core/src/Modules/GrapesJS/resources/views/grapesjs/asset-manager.php +++ b/plugi-core/src/Modules/GrapesJS/resources/views/grapesjs/asset-manager.php @@ -2,17 +2,14 @@ window.editor.on('asset:remove', function(asset) { let assetId = asset.attributes.public_id; - $.ajax({ - type: "POST", - url: " 'upload_delete', 'page' => $page->getId()]) ?>", - data: { - id: assetId + fetch(" 'upload_delete', 'page' => $page->getId()]) ?>", { + method: "POST", + headers: { + "Content-Type": "application/x-www-form-urlencoded", + "X-Requested-With": "XMLHttpRequest" }, - success: function() { - }, - error: function() { - } - }); + body: new URLSearchParams({ id: assetId }) + }).catch(function() {}); }); diff --git a/plugi-core/src/Modules/GrapesJS/resources/views/grapesjs/component-type-manager.php b/plugi-core/src/Modules/GrapesJS/resources/views/grapesjs/component-type-manager.php index 0d8785d..66e858d 100644 --- a/plugi-core/src/Modules/GrapesJS/resources/views/grapesjs/component-type-manager.php +++ b/plugi-core/src/Modules/GrapesJS/resources/views/grapesjs/component-type-manager.php @@ -1,15 +1,16 @@ - - - + customStyle(); ?> - - - - - - diff --git a/plugi-core/src/Modules/GrapesJS/resources/views/pagebuilder.php b/plugi-core/src/Modules/GrapesJS/resources/views/pagebuilder.php index 61a0486..8313c4b 100644 --- a/plugi-core/src/Modules/GrapesJS/resources/views/pagebuilder.php +++ b/plugi-core/src/Modules/GrapesJS/resources/views/pagebuilder.php @@ -15,20 +15,8 @@
- - - -