From 903089793df7d87067d092242f403c540bf5da39 Mon Sep 17 00:00:00 2001 From: Hai Huynh Date: Sun, 11 Jun 2023 16:24:10 +0700 Subject: [PATCH] 0.5.0 --- Block/Content.php | 19 +- Builder/Base/AbstractCss.php | 13 - Builder/Base/AbstractDocument.php | 6 +- Builder/Base/AbstractModule.php | 2 +- Builder/Css/ContentCss.php | 23 +- Builder/Elements/Section.php | 70 +- Builder/Managers/Icons.php | 22 +- Builder/Managers/Resolvers.php | 20 - Builder/Managers/Schemes.php | 4 +- Builder/Managers/Settings.php | 7 +- Builder/Managers/Tags.php | 4 +- Builder/Managers/Widgets.php | 4 +- Builder/Modules/Ajax.php | 9 +- Builder/Modules/Common.php | 14 +- Builder/Modules/Editor.php | 203 +- Builder/Modules/Frontend.php | 61 +- Builder/Modules/Preview.php | 16 +- Builder/Resolver/RequireJsResolver.php | 110 - Builder/Sources/Local.php | 1 - CHANGELOG.md | 6 + Controller/Actions/Actions.php | 3 +- Controller/Adminhtml/Ajax/Heartbeat.php | 24 - Controller/Adminhtml/Content/Media.php | 23 + .../Content/{EditorPreview.php => Canvas.php} | 4 +- EntryPoint.php | 21 +- Helper/DataHelper.php | 47 +- Helper/EscaperHelper.php | 2 + Helper/RequestHelper.php | 4 + Helper/StateHelper.php | 18 +- Helper/ThemeHelper.php | 86 +- Helper/UrlBuilderHelper.php | 32 +- Model/ContentRegistry.php | 11 + Model/LocalSampleCollection.php | 2 +- PageBuilder.php | 10 +- .../View/Page/InitEditorResources.php | 68 +- Traits/TraitComponentsLoader.php | 14 - Traits/TraitHttpContentAction.php | 3 +- composer.json | 2 +- etc/frontend/di.xml | 2 +- i18n/en_US.csv | 33 +- .../layout/pagebuilder_content_editor.xml | 5 +- .../layout/pagebuilder_content_media.xml | 30 + view/adminhtml/templates/editor/editor.phtml | 30 +- view/adminhtml/templates/editor/media.phtml | 148 + .../templates/editor/media_bucket.phtml | 105 + .../templates/editor/media_uploader.phtml | 51 - view/adminhtml/web/js/media/uploader.js | 107 - view/base/web/build/common-modules.min.js | 2 +- view/base/web/build/common.min.js | 2 +- view/base/web/build/editor-modules.min.js | 2 +- .../base/web/build/editor-preview-rtl.min.css | 2 +- view/base/web/build/editor-preview.min.css | 2 +- view/base/web/build/editor-rtl.min.css | 2 +- view/base/web/build/editor.min.css | 2 +- view/base/web/build/editor.min.js | 2 +- view/base/web/build/frontend-modules.min.js | 2 +- view/base/web/build/frontend.min.js | 2 +- view/base/web/js/editor-entry.js | 19 +- ...trojs-config.js => editor-introduction.js} | 60 +- view/base/web/js/frontend-entry.js | 1 - view/base/web/js/view/tipsy-wrapper.js | 4 +- .../lib/color-picker/color-picker-alpha.js | 52 +- view/base/web/lib/font-awesome/css/brands.css | 14 - .../web/lib/font-awesome/css/brands.min.css | 5 - .../web/lib/font-awesome/css/fontawesome.css | 4359 ----------------- .../lib/font-awesome/css/fontawesome.min.css | 5 - .../base/web/lib/font-awesome/css/regular.css | 15 - .../web/lib/font-awesome/css/regular.min.css | 5 - view/base/web/lib/font-awesome/css/solid.css | 16 - .../web/lib/font-awesome/css/solid.min.css | 5 - .../web/lib/font-awesome/css/svg-with-js.css | 342 -- .../lib/font-awesome/css/svg-with-js.min.css | 1 - .../web/lib/font-awesome/css/v4-shims.css | 2166 -------- .../web/lib/font-awesome/css/v4-shims.min.css | 5 - view/base/web/lib/jquery/jquery-3.6.0.min.js | 2 + ...erscore.min.js => underscore.1.8.3.min.js} | 0 ...iew.xml => pagebuilder_content_canvas.xml} | 0 view/frontend/templates/head.phtml | 5 +- view/frontend/web/css/widgets/_banner.less | 2 +- .../web/css/widgets/_calltoaction.less | 4 +- .../web/css/widgets/_google-maps.less | 1 + .../frontend/web/js/widgets/call-to-action.js | 67 +- 82 files changed, 816 insertions(+), 7858 deletions(-) delete mode 100644 Builder/Managers/Resolvers.php delete mode 100644 Builder/Resolver/RequireJsResolver.php delete mode 100644 Controller/Adminhtml/Ajax/Heartbeat.php create mode 100644 Controller/Adminhtml/Content/Media.php rename Controller/Content/{EditorPreview.php => Canvas.php} (92%) create mode 100644 view/adminhtml/layout/pagebuilder_content_media.xml create mode 100644 view/adminhtml/templates/editor/media.phtml create mode 100644 view/adminhtml/templates/editor/media_bucket.phtml delete mode 100644 view/adminhtml/templates/editor/media_uploader.phtml delete mode 100644 view/adminhtml/web/js/media/uploader.js rename view/base/web/js/{action/editor-introjs-config.js => editor-introduction.js} (56%) delete mode 100644 view/base/web/lib/font-awesome/css/brands.css delete mode 100644 view/base/web/lib/font-awesome/css/brands.min.css delete mode 100644 view/base/web/lib/font-awesome/css/fontawesome.css delete mode 100644 view/base/web/lib/font-awesome/css/fontawesome.min.css delete mode 100644 view/base/web/lib/font-awesome/css/regular.css delete mode 100644 view/base/web/lib/font-awesome/css/regular.min.css delete mode 100644 view/base/web/lib/font-awesome/css/solid.css delete mode 100644 view/base/web/lib/font-awesome/css/solid.min.css delete mode 100644 view/base/web/lib/font-awesome/css/svg-with-js.css delete mode 100644 view/base/web/lib/font-awesome/css/svg-with-js.min.css delete mode 100644 view/base/web/lib/font-awesome/css/v4-shims.css delete mode 100644 view/base/web/lib/font-awesome/css/v4-shims.min.css create mode 100644 view/base/web/lib/jquery/jquery-3.6.0.min.js rename view/base/web/lib/underscore/{underscore.min.js => underscore.1.8.3.min.js} (100%) rename view/frontend/layout/{pagebuilder_content_editorpreview.xml => pagebuilder_content_canvas.xml} (100%) diff --git a/Block/Content.php b/Block/Content.php index a5845229..7834e62a 100644 --- a/Block/Content.php +++ b/Block/Content.php @@ -23,8 +23,9 @@ use Magento\Framework\Profiler; use Magento\Framework\View\Element\Template; use Magento\Widget\Block\BlockInterface; +use Magento\Framework\DataObject\IdentityInterface; -class Content extends Template implements BlockInterface +class Content extends Template implements BlockInterface, IdentityInterface { /** * @var ContentInterface[] @@ -326,4 +327,20 @@ public function __toString() { return $this->toHtml(); } + + /** + * @inheritDoc + */ + public function getIdentities() + { + $keys = []; + if ($this->currentContentId) { + $keys[] = 'pagebuilder_content_' . $this->currentContentId; + } + if ($this->currentIdentifier) { + $keys[] = 'pagebuilder_content_' . $this->currentIdentifier; + } + + return $keys; + } } diff --git a/Builder/Base/AbstractCss.php b/Builder/Base/AbstractCss.php index 92ef49f1..14d6f84e 100644 --- a/Builder/Base/AbstractCss.php +++ b/Builder/Base/AbstractCss.php @@ -12,7 +12,6 @@ use Goomento\PageBuilder\Builder\Managers\Controls; use Goomento\PageBuilder\Builder\Managers\Icons; use Goomento\PageBuilder\Builder\Managers\Tags; -use Goomento\PageBuilder\Builder\Modules\Frontend; use Goomento\PageBuilder\Builder\Modules\Stylesheet; use Goomento\PageBuilder\Developer; use Goomento\PageBuilder\Exception\BuilderException; @@ -208,18 +207,6 @@ public function enqueue() $frontend->enqueueFont($defaultFont); } - if (!empty($meta['icons'])) { - $iconsTypes = Icons::getIconManagerTabs(); - foreach ($meta['icons'] as $iconFont) { - if (!isset($iconsTypes[ $iconFont ])) { - continue; - } - /** @var Frontend $frontend */ - $frontend = ObjectManagerHelper::get(Frontend::class); - $frontend->enqueueFont($iconFont); - } - } - $name = $this->getName(); /** diff --git a/Builder/Base/AbstractDocument.php b/Builder/Base/AbstractDocument.php index c562a6cc..1c329498 100644 --- a/Builder/Base/AbstractDocument.php +++ b/Builder/Base/AbstractDocument.php @@ -174,7 +174,7 @@ public function getContainerAttributes() 'class' => 'goomento gmt gmt-' . $this->getModel()->getUniqueIdentity(), ]; - if (!StateHelper::isEditorPreviewMode()) { + if (!StateHelper::isCanvasMode()) { $attributes['data-gmt-settings'] = DataHelper::encode($this->getFrontendSettings()); } @@ -380,7 +380,7 @@ public function getPreviewUrl() if (null === $url) { - $url = UrlBuilderHelper::getEditorPreviewUrl( + $url = UrlBuilderHelper::getCanvasUrl( $this->getModel()->getOriginContent() ); @@ -637,7 +637,7 @@ public function getLastEdited() $user = $content->getLastEditorUser(); $displayName = $user ? $user->getName() : __('Automatic'); - return __('Updated %1 by %2', DataHelper::timeElapsedString($content->getUpdateTime()), $displayName)->__toString(); + return __('Updated by %1', $displayName)->__toString(); } /** diff --git a/Builder/Base/AbstractModule.php b/Builder/Base/AbstractModule.php index 83d87909..2c643f83 100644 --- a/Builder/Base/AbstractModule.php +++ b/Builder/Base/AbstractModule.php @@ -33,7 +33,7 @@ abstract class AbstractModule extends AbstractBase */ public function __clone() { - throw new \Goomento\PageBuilder\Exception\BuilderException('Something went wrong'); + throw new \Exception('Something went wrong'); } /** diff --git a/Builder/Css/ContentCss.php b/Builder/Css/ContentCss.php index ff7d63c0..38c3c8fa 100644 --- a/Builder/Css/ContentCss.php +++ b/Builder/Css/ContentCss.php @@ -134,19 +134,6 @@ protected function deleteMeta() ->removeFlag('direct_save'); } - /** - * Get post data. - * - * Retrieve raw post data from the database. - * - * - * @return array ContentCss data. - */ - protected function getData() - { - return $this->model->getElements(); - } - /** * Render CSS. * @@ -155,10 +142,10 @@ protected function getData() */ protected function renderCss() { - $data = $this->getData(); + $elements = $this->getModel()->getElements(); $elementManager = ObjectManagerHelper::getElementsManager(); - if (!empty($data)) { - foreach ($data as $elementData) { + if (!empty($elements)) { + foreach ($elements as $elementData) { $element = $elementManager->createElementInstance((array) $elementData); if (!$element) { continue; @@ -298,7 +285,7 @@ protected function renderStyles(AbstractElement $element) */ protected function useExternalFile() { - $useInline = (!$this->getModel() instanceof RevisionInterface); - return $useInline && !DataHelper::useInlineCss(); + $isRevision = $this->getModel() instanceof RevisionInterface; + return !$isRevision && !DataHelper::useInlineCss(); } } diff --git a/Builder/Elements/Section.php b/Builder/Elements/Section.php index e7825fd3..9e5bc814 100644 --- a/Builder/Elements/Section.php +++ b/Builder/Elements/Section.php @@ -458,25 +458,39 @@ protected function registerControls() $this->endControlsSection(); - // Popup Section $this->startControlsSection( - 'section_popup_section', + 'section_type_section', [ - 'label' => __('Popup'), + 'label' => __('Section Type'), 'tab' => Controls::TAB_LAYOUT, ] ); $this->addControl( - 'popup_enabled', + 'section_type', [ - 'label' => __('Enabled'), - 'type' => Controls::SWITCHER, + 'label' => __('Type'), + 'type' => Controls::SELECT, + 'prefix_class' => 'gmt-section-type-', 'default' => '', - 'prefix_class' => 'gmt-section-popup-', - 'description' => __('Enable this section will hide section on storefront. Use "Call to Action" widget to show this popup.'), - 'frontend_available' => true, - 'return_value' => 'ok', + 'options' => [ + '' => __('Default'), + 'popup' => __('Popup'), + ], + ] + ); + + $this->endControlsSection(); + + // Popup Section + $this->startControlsSection( + 'section_popup_section', + [ + 'label' => __('Popup'), + 'tab' => Controls::TAB_LAYOUT, + 'condition' => [ + 'section_type' => 'popup' + ] ] ); @@ -486,9 +500,6 @@ protected function registerControls() 'type' => Controls::RAW_HTML, 'raw' => __('Note: CSS ID must be placed in tab Advanced > Identify > CSS ID. .'), 'content_classes' => 'gmt-panel-alert gmt-panel-alert-warning', - 'condition' => [ - 'popup_enabled' => 'ok' - ] ] ); @@ -498,10 +509,7 @@ protected function registerControls() 'label' => __('Title'), 'type' => Controls::TEXT, 'frontend_available' => true, - 'default' => __('Popup Title'), - 'condition' => [ - 'popup_enabled' => 'ok' - ] + 'placeholder' => __('Popup Title'), ] ); @@ -516,9 +524,6 @@ protected function registerControls() 'close' => __('Close Button'), 'confirm' => __('Confirm Button'), 'both' => __('Both'), - ], - 'condition' => [ - 'popup_enabled' => 'ok' ] ] ); @@ -530,8 +535,7 @@ protected function registerControls() 'label' => __('Close Button'), 'type' => Controls::HEADING, 'condition' => [ - 'popup_buttons' => ['close', 'both'], - 'popup_enabled' => 'ok', + 'popup_buttons' => ['close', 'both'] ] ] ); @@ -542,11 +546,8 @@ protected function registerControls() 'label' => __('Label'), 'type' => Controls::TEXT, 'frontend_available' => true, - 'default' => __('Close'), - 'placeholder' => __('Close'), 'condition' => [ - 'popup_buttons' => ['close', 'both'], - 'popup_enabled' => 'ok', + 'popup_buttons' => ['close', 'both'] ] ] ); @@ -561,8 +562,7 @@ protected function registerControls() 'title' => __('Add your custom class WITHOUT the dot. e.g: my-class'), 'frontend_available' => true, 'condition' => [ - 'popup_buttons' => ['close', 'both'], - 'popup_enabled' => 'ok', + 'popup_buttons' => ['close', 'both'] ] ] ); @@ -574,8 +574,7 @@ protected function registerControls() 'label' => __('Confirm Button'), 'type' => Controls::HEADING, 'condition' => [ - 'popup_buttons' => ['confirm', 'both'], - 'popup_enabled' => 'ok', + 'popup_buttons' => ['confirm', 'both'] ] ] ); @@ -586,11 +585,8 @@ protected function registerControls() 'label' => __('Text'), 'type' => Controls::TEXT, 'frontend_available' => true, - 'default' => __('Confirm'), - 'placeholder' => __('Confirm'), 'condition' => [ - 'popup_buttons' => ['confirm', 'both'], - 'popup_enabled' => 'ok', + 'popup_buttons' => ['confirm', 'both'] ] ] ); @@ -603,8 +599,7 @@ protected function registerControls() 'frontend_available' => true, 'placeholder' => __('https://your-link.com'), 'condition' => [ - 'popup_buttons' => ['confirm', 'both'], - 'popup_enabled' => 'ok', + 'popup_buttons' => ['confirm', 'both'] ] ] ); @@ -619,8 +614,7 @@ protected function registerControls() 'prefix_class' => '', 'title' => __('Add your custom class WITHOUT the dot. e.g: my-class'), 'condition' => [ - 'popup_buttons' => ['confirm', 'both'], - 'popup_enabled' => 'ok', + 'popup_buttons' => ['confirm', 'both'] ] ] ); diff --git a/Builder/Managers/Icons.php b/Builder/Managers/Icons.php index ca81bac7..c98c599f 100644 --- a/Builder/Managers/Icons.php +++ b/Builder/Managers/Icons.php @@ -82,7 +82,7 @@ private static function initTabs() 'displayPrefix' => 'far', 'labelIcon' => 'fab fa-font-awesome-alt', 'ver' => '5.9.0', - 'fetchJson' => self::getFaAssetUrl('regular', 'json', false), + 'fetchJson' => self::getFaAssetUrl('regular'), 'native' => true, ], 'fa-solid' => [ @@ -92,7 +92,7 @@ private static function initTabs() 'displayPrefix' => 'fas', 'labelIcon' => 'fab fa-font-awesome', 'ver' => '5.9.0', - 'fetchJson' => self::getFaAssetUrl('solid', 'json', false), + 'fetchJson' => self::getFaAssetUrl('solid'), 'native' => true, ], 'fa-brands' => [ @@ -103,7 +103,7 @@ private static function initTabs() 'displayPrefix' => 'fab', 'labelIcon' => 'fab fa-font-awesome-flag', 'ver' => '5.9.0', - 'fetchJson' => self::getFaAssetUrl('brands', 'json', false), + 'fetchJson' => self::getFaAssetUrl('brands'), 'native' => true, ], ])->getResult(); @@ -124,22 +124,11 @@ public static function getIconManagerTabs() /** * @param $filename - * @param string $extType - * @param bool $addSuffix * @return string */ - private static function getFaAssetUrl($filename, $extType = 'css', $addSuffix = true) + private static function getFaAssetUrl($filename) { - static $isTestMode = null; - if (null === $isTestMode) { - $isTestMode = !!Developer::debug(); - } - $url = 'Goomento_PageBuilder/lib/font-awesome/' . $extType . '/' . $filename; - if (!$isTestMode && $addSuffix) { - $url .= '.min'; - } - $url .= '.' . $extType; - return UrlBuilderHelper::urlStaticBuilder($url); + return UrlBuilderHelper::getAssetUrlWithParams(sprintf('Goomento_PageBuilder/lib/font-awesome/json/%s.json', $filename)); } /** @@ -159,7 +148,6 @@ public static function getIconManagerTabsConfig() return array_values(array_merge($tabs, self::getIconManagerTabs())); } - /** * @param $icon * @param array $attributes diff --git a/Builder/Managers/Resolvers.php b/Builder/Managers/Resolvers.php deleted file mode 100644 index aa7a52c4..00000000 --- a/Builder/Managers/Resolvers.php +++ /dev/null @@ -1,20 +0,0 @@ -components = [ + $this->setComponent([ Color::NAME => Color::class, Typography::NAME => Typography::class, ColorPicker::NAME => ColorPicker::class, - ]; + ]); } } diff --git a/Builder/Managers/Settings.php b/Builder/Managers/Settings.php index 0db03db8..84c58d8c 100644 --- a/Builder/Managers/Settings.php +++ b/Builder/Managers/Settings.php @@ -122,9 +122,12 @@ public function __construct() { $this->registerDefaultSettingsManagers(); - $this->components = [ + $this->setComponent([ GeneralSettings::NAME => GeneralSettings::class, PageSettings::NAME => PageSettings::class, - ]; + ]); + + // Construct it to enable the hook + $this->getComponents(); } } diff --git a/Builder/Managers/Tags.php b/Builder/Managers/Tags.php index c334e715..ed3951cf 100644 --- a/Builder/Managers/Tags.php +++ b/Builder/Managers/Tags.php @@ -421,14 +421,14 @@ public function registerAjaxActions(Ajax $ajax) */ public function registerTags() { - $this->components = [ + $this->setComponent([ DataConfig::NAME => DataConfig::class, Urls::NAME => Urls::class, Images::NAME => Images::class, CmsBlocks::NAME => CmsBlocks::class, CmsPages::NAME => CmsPages::class, PageBuilderContents::NAME => PageBuilderContents::class, - ]; + ]); } /** diff --git a/Builder/Managers/Widgets.php b/Builder/Managers/Widgets.php index 078d5434..928b4348 100644 --- a/Builder/Managers/Widgets.php +++ b/Builder/Managers/Widgets.php @@ -24,9 +24,9 @@ class Widgets */ private function initWidgets() { - $this->components = [ + $this->setComponent([ Common::NAME => Common::class, - ]; + ]); HooksHelper::doAction('pagebuilder/widgets/widgets_registered', $this); } diff --git a/Builder/Modules/Ajax.php b/Builder/Modules/Ajax.php index b3625682..249e6527 100644 --- a/Builder/Modules/Ajax.php +++ b/Builder/Modules/Ajax.php @@ -11,7 +11,6 @@ use Exception; use Goomento\PageBuilder\Api\Data\BuildableContentInterface; use Goomento\PageBuilder\Builder\Base\AbstractModule; -use Goomento\PageBuilder\Developer; use Goomento\PageBuilder\Exception\BuilderException; use Goomento\PageBuilder\Helper\DataHelper; use Goomento\PageBuilder\Helper\EscaperHelper; @@ -137,7 +136,7 @@ public function handleAjaxRequest(BuildableContentInterface $buildableContent, a $this->currentActionId = $actionId; - if (!isset($this->registeredAjaxActions[ $actionData['action'] ?? '' ])) { + if (!isset($actionData['action']) || !isset($this->registeredAjaxActions[ $actionData['action'] ])) { continue; } @@ -161,7 +160,7 @@ public function handleAjaxRequest(BuildableContentInterface $buildableContent, a } } catch (Exception $e) { LoggerHelper::error($e); - if (Developer::debug()) { + if (DataHelper::isDebugMode()) { $this->addToCurrentResponseData(false, $e->getMessage(), $e->getCode()); } else { $this->addToCurrentResponseData(false, __('Something went wrong. Please try again later.'), 502); @@ -216,9 +215,7 @@ protected function getInitSettings() { return [ 'url' => UrlBuilderHelper::getUrl('pagebuilder/ajax/json'), - 'actions' => [ - 'heartbeat' => UrlBuilderHelper::getUrl('pagebuilder/ajax/heartbeat') - ], + 'actions' => [], ]; } diff --git a/Builder/Modules/Common.php b/Builder/Modules/Common.php index 76524252..c28e1f35 100644 --- a/Builder/Modules/Common.php +++ b/Builder/Modules/Common.php @@ -57,11 +57,9 @@ public function initComponents() */ public function registerScriptsEditorBefore() { - $minSuffix = Developer::debug() ? '' : '.min'; - ThemeHelper::registerScript( 'goomento-common-modules', - 'Goomento_PageBuilder/build/common-modules' . $minSuffix, + 'Goomento_PageBuilder/build/common-modules', [ 'jquery', 'jquery/ui', @@ -73,7 +71,7 @@ public function registerScriptsEditorBefore() ThemeHelper::registerScript( 'goomento-common', - 'Goomento_PageBuilder/build/common' . $minSuffix, + 'Goomento_PageBuilder/build/common', [ 'goomento-common-modules', 'dialogs-manager', @@ -91,13 +89,9 @@ public function registerScriptsEditorBefore() */ public function registerStyles() { - $minSuffix = Developer::debug() ? '' : '.min'; - ThemeHelper::registerStyle( 'goomento-common', - 'Goomento_PageBuilder/build/common' . $minSuffix . '.css', - [], - Developer::version() + 'Goomento_PageBuilder/build/common.css' ); } @@ -115,7 +109,7 @@ protected function getInitSettings() 'isRTL' => DataHelper::isRtl(), 'activeModules' => array_keys($this->getComponents()), 'urls' => [ - 'assets' => UrlBuilderHelper::urlStaticBuilder('Goomento_PageBuilder') . '/', + 'assets' => UrlBuilderHelper::getAssetUrlWithParams('Goomento_PageBuilder') . '/', ], ]; } diff --git a/Builder/Modules/Editor.php b/Builder/Modules/Editor.php index 0fbf1fa6..d26bf069 100644 --- a/Builder/Modules/Editor.php +++ b/Builder/Modules/Editor.php @@ -27,6 +27,7 @@ use Goomento\PageBuilder\Helper\UrlBuilderHelper; use Magento\Framework\RequireJs\Config; +// phpcs:disable Magento2.Security.LanguageConstruct.DirectOutput class Editor { /** @@ -57,37 +58,48 @@ class Editor * Init the editor * This function trigger in editor only, otherwise, will make confused system */ - public function initByContent(BuildableContentInterface $buildableContent) + public function constructByContent(BuildableContentInterface $buildableContent) { $this->content = $buildableContent; // Init document $this->getDocument(); - HooksHelper::addAction('pagebuilder/adminhtml/header', [ $this,'editorHeaderTrigger' ]); + HooksHelper::addAction('header', [$this, 'editorHeader'], 0); + HooksHelper::addAction('pagebuilder/adminhtml/header', [ $this,'editorHeaderTrigger' ]); HooksHelper::addAction('pagebuilder/adminhtml/footer', [ $this,'editorFooterTrigger' ]); - HooksHelper::addAction('pagebuilder/adminhtml/register_scripts', [ $this,'registerScripts' ], 11); HooksHelper::addAction('pagebuilder/adminhtml/enqueue_scripts', [ $this,'enqueueStyles' ]); - - // Print out the script in footer HooksHelper::addAction('pagebuilder/editor/footer', [ $this,'enqueueScripts' ]); - HooksHelper::addFilter('pagebuilder/settings/module/ajax', [ $this,'getAjaxUrls' ]); - - HooksHelper::addAction('header', function () { - if (DataHelper::isJsMinifyFilesEnabled() && StateHelper::isProductionMode()) { - /** @var Config $requireJsConfig */ - $requireJsConfig = ObjectManagerHelper::get(\Magento\Framework\RequireJs\Config::class); - // phpcs:ignore Magento2.Security.LanguageConstruct.DirectOutput - echo ''; - } - }, 9); // Should print out at first - HooksHelper::doAction('pagebuilder/editor/init'); } + /** + * Prepare initial resources + * + * @return void + */ + public function editorHeader() : void + { + $params = array_merge(['_secure' => RequestHelper::isSecure()]); + $cssPrefix = DataHelper::isCssMinifyFilesEnabled() ? '.min' : ''; + // Requirejs + echo ''; + // Global style + echo ''; + // Icon + echo ''; + + if (DataHelper::isJsMinifyFilesEnabled() && StateHelper::isProductionMode()) { + /** @var Config $requireJsConfig */ + $requireJsConfig = ObjectManagerHelper::get(\Magento\Framework\RequireJs\Config::class); + + echo ''; + } + } + /** * Modify Ajax URLs setting * @@ -159,8 +171,7 @@ public function getBuildableContent() public function getDocument() { if ($this->document === null) { - $this->document = ObjectManagerHelper::getDocumentsManager() - ->getByContent($this->getBuildableContent()); + $this->document = ObjectManagerHelper::getDocumentsManager()->getByContent($this->getBuildableContent()); } return $this->document; @@ -173,23 +184,20 @@ public function getDocument() */ public function beforeRegisterScripts() { - - $suffix = Developer::debug() ? '' : '.min'; - ThemeHelper::registerScript( 'backbone', - 'Goomento_PageBuilder/lib/backbone/backbone' . $suffix + 'Goomento_PageBuilder/lib/backbone/backbone' ); ThemeHelper::registerScript( 'backbone.radio', - 'Goomento_PageBuilder/lib/backbone/backbone.radio' . $suffix, + 'Goomento_PageBuilder/lib/backbone/backbone.radio', ['backbone'] ); ThemeHelper::registerScript( 'backbone.marionette', - 'Goomento_PageBuilder/lib/backbone/backbone.marionette' . $suffix, + 'Goomento_PageBuilder/lib/backbone/backbone.marionette', [ 'backbone', 'backbone.radio' @@ -201,7 +209,6 @@ public function beforeRegisterScripts() 'Goomento_PageBuilder/lib/flatpickr/flatpickr.min' ); - ThemeHelper::registerScript( 'nouislider', 'Goomento_PageBuilder/js/view/nouislider-wrapper', @@ -250,6 +257,16 @@ public function beforeRegisterScripts() 'jquery/ui', ] ); + + ThemeHelper::registerScript( + 'introjs', + 'Goomento_PageBuilder/js/view/intro-wrapper' + ); + + ThemeHelper::registerScript( + 'editor-introduction', + 'Goomento_PageBuilder/js/editor-introduction' + ); } /** @@ -257,114 +274,33 @@ public function beforeRegisterScripts() */ public function registerScripts() { - $suffix = Developer::debug() ? '' : '.min'; - ThemeHelper::registerScript( 'goomento-editor-modules', - 'Goomento_PageBuilder/build/editor-modules' . $suffix, + 'Goomento_PageBuilder/build/editor-modules', ['goomento-common-modules'] ); - $requirejs = [ - 'map' => [ - '*' => [ - 'ko' => 'knockoutjs/knockout', - 'knockout' => 'knockoutjs/knockout', - 'mageUtils' => 'mage/utils/main', - 'rjsResolver' => 'mage/requirejs/resolver', - 'loader' => 'mage/loader_old', - 'loaderAjax' => 'mage/loader_old', - 'mediabrowser' => 'jquery/jstree/jquery.jstree', - 'jstree' => 'jquery/jstree/jquery.jstree', - 'mediaUploader' => 'Magento_Backend/js/media-uploader', - 'mage/translate' => 'Magento_Backend/js/translate', - 'folderTree' => 'Magento_Cms/js/folder-tree', - 'uiElement' => 'Magento_Ui/js/lib/core/element/element', - 'uiCollection' => 'Magento_Ui/js/lib/core/collection', - 'uiComponent' => 'Magento_Ui/js/lib/core/collection', - 'uiClass' => 'Magento_Ui/js/lib/core/class', - 'uiEvents' => 'Magento_Ui/js/lib/core/events', - 'uiRegistry' => 'Magento_Ui/js/lib/registry/registry', - 'consoleLogger' => 'Magento_Ui/js/lib/logger/console-logger', - 'uiLayout' => 'Magento_Ui/js/core/renderer/layout', - 'escaper' => 'Magento_Security/js/escaper', - 'floatingHeader' => 'mage/backend/floating-header', - 'validation' => 'mage/backend/validation', - ] - ], - 'shim' => [ - 'extjs/ext-tree' => [ - 'prototype' - ], - 'extjs/ext-tree-checkbox' => [ - 'extjs/ext-tree', - 'extjs/defaults' - ], - 'jquery/editableMultiselect/js/jquery.editable' => [ - 'jquery' - ], - 'jquery/jstree/jquery.hotkeys' => ['jquery'], - 'jquery/hover-intent' => ['jquery'], - 'mage/adminhtml/backup' => ['prototype'], - 'mage/new-gallery' => ['jquery'], - 'mage/webapi' => ['jquery'], - 'jquery/ui' => ['jquery'], - 'MutationObserver' => ['es6-collections'], - 'matchMedia' => [ - 'exports' => 'mediaCheck' - ], - 'magnifier/magnifier' => ['jquery'], - ], - 'bundles' => [ - 'js/theme' => [ - 'globalNavigation', - 'globalSearch', - 'modalPopup', - 'useDefault', - 'loadingPopup', - 'collapsable', - ] - ], - 'deps' => [ - 'js/theme', - 'mage/backend/bootstrap', - 'mage/adminhtml/globals', - ], - 'paths' => [ - 'jquery/validate' => 'jquery/jquery.validate', - 'jquery/hover-intent' => 'jquery/jquery.hoverIntent', - 'jquery/file-uploader' => 'jquery/fileUploader/jquery.fileupload-fp', - 'prototype' => 'legacy-build.min', - 'jquery/jquery-storageapi' => 'Magento_Cookie/js/jquery.storageapi.extended', - 'text' => 'mage/requirejs/text', - 'domReady' => 'requirejs/domReady', - 'spectrum' => 'jquery/spectrum/spectrum', - 'tinycolor' => 'jquery/spectrum/tinycolor', - 'jquery-ui-modules' => 'jquery/ui-modules', - 'ui/template' => 'Magento_Ui/templates' - ], - 'config' => [ - 'mixins' => [ - 'jquery/jstree/jquery.jstree' => [ - 'mage/backend/jstree-mixin' => true - ], - 'jquery' => [ - 'jquery/patches/jquery' => true - ], - ], - 'text' => [ - 'headers' => [ - 'X-Requested-With' => 'XMLHttpRequest' - ] - ] - ] - ]; + ThemeHelper::removeScripts('underscore'); + ThemeHelper::registerScript('underscore', 'Goomento_PageBuilder/lib/underscore/underscore.1.8.3.min'); - $requirejs = HooksHelper::applyFilters('pagebuilder/editor/requirejs_config', $requirejs)->getResult(); + ThemeHelper::removeScripts('jquery'); + ThemeHelper::registerScript('jquery', 'Goomento_PageBuilder/lib/jquery/jquery-3.6.0.min'); + + ThemeHelper::registerScript('tinymce', '//cdnjs.cloudflare.com/ajax/libs/tinymce/5.10.7/tinymce.min'); + + ThemeHelper::removeScripts('jquery/ui'); + ThemeHelper::registerScript( + 'jquery/ui', + 'Goomento_PageBuilder/lib/jquery/jquery-ui.1.13.2.min', + [ + 'jquery', + 'tinymce' + ] + ); ThemeHelper::registerScript( 'goomento-editor-engine', - 'Goomento_PageBuilder/build/editor' . $suffix, + 'Goomento_PageBuilder/build/editor', [ 'underscore', 'jquery', @@ -372,8 +308,6 @@ public function registerScripts() 'backbone', 'backbone.radio', 'backbone.marionette', - 'mage/adminhtml/browser', - 'prototype', 'nouislider', 'goomento-common', 'goomento-editor-modules', @@ -386,10 +320,7 @@ public function registerScripts() 'ace', 'jquery-hover-intent', 'imagesloaded', - 'introjs', - ], - [ - 'requirejs' => $requirejs + 'editor-introduction', ] ); @@ -510,10 +441,6 @@ public function enqueueStyles() */ HooksHelper::doAction('pagebuilder/editor/before_enqueue_styles'); - $suffix = Developer::debug() ? '' : '.min'; - - $directionSuffix = DataHelper::isRtl() ? '-rtl' : ''; - ThemeHelper::registerStyle( 'google-font-inter', 'https://fonts.googleapis.com/css?family=Inter:300,400,500,600,700&display=swap' @@ -521,7 +448,7 @@ public function enqueueStyles() ThemeHelper::registerStyle( 'goomento-editor', - 'Goomento_PageBuilder/build/editor' . $directionSuffix . $suffix . '.css', + 'Goomento_PageBuilder/build/editor.css', [ 'goomento-common', 'jquery-select2', @@ -630,8 +557,12 @@ public function filterTemplate(string $content) : string */ public function __construct() { + /** + * Ready to catch the custom trigger by controller + */ + HooksHelper::addAction('pagebuilder/editor/index', [ $this, 'constructByContent']); + HooksHelper::addAction('pagebuilder/adminhtml/register_scripts', [$this, 'beforeRegisterScripts'], 7); - HooksHelper::addAction('pagebuilder/editor/index', [ $this, 'initByContent']); // catch trigger in controller HooksHelper::addFilter("pagebuilder/widget/render_content", [$this, 'filterTemplate'], 9); } } diff --git a/Builder/Modules/Frontend.php b/Builder/Modules/Frontend.php index 36cf55c4..b923c9e9 100644 --- a/Builder/Modules/Frontend.php +++ b/Builder/Modules/Frontend.php @@ -23,7 +23,8 @@ use Goomento\PageBuilder\Helper\UrlBuilderHelper; use Goomento\PageBuilder\Helper\ThemeHelper; -// phpcs:ignore Magento2.Functions.StaticFunction.StaticFunction +// phpcs:disable Magento2.Functions.StaticFunction.StaticFunction +// phpcs:disable Magento2.Functions.DiscouragedFunction.Discouraged class Frontend extends AbstractApp { const NAME = 'frontend'; @@ -47,13 +48,18 @@ class Frontend extends AbstractApp */ private $registeredFonts = []; + /** + * + * @var array + */ + private $stylesToEnqueue = ['goomento-frontend']; + /** * Frontend constructor. */ public function __construct() { HooksHelper::addAction('pagebuilder/frontend/init', [$this, 'init']); - HooksHelper::addFilter('pagebuilder/content/html', [ $this, 'applyBuilderInContent' ], 9); } @@ -68,9 +74,7 @@ public function __construct() public function init() { HooksHelper::addAction('pagebuilder/frontend/register_scripts', [$this, 'registerScripts'], 9); - HooksHelper::addAction('pagebuilder/frontend/register_styles', [$this, 'registerStyles'], 9); - HooksHelper::addAction('pagebuilder/frontend/header', [ $this, 'header' ], 9); HooksHelper::addAction('pagebuilder/frontend/footer', [ $this, 'footer' ], 9); } @@ -85,7 +89,6 @@ public function init() */ public function registerScripts() { - $minSuffix = Developer::debug() ? '' : '.min'; /** * Before frontend register scripts. * @@ -96,7 +99,7 @@ public function registerScripts() ThemeHelper::registerScript( 'goomento-frontend-modules', - 'Goomento_PageBuilder/build/frontend-modules' . $minSuffix, + 'Goomento_PageBuilder/build/frontend-modules', [ 'jquery', 'jquery/ui', @@ -105,7 +108,7 @@ public function registerScripts() ThemeHelper::registerScript( 'goomento-frontend-engine', - 'Goomento_PageBuilder/build/frontend' . $minSuffix, + 'Goomento_PageBuilder/build/frontend', [ 'jquery', 'dialogs-manager', @@ -117,7 +120,9 @@ public function registerScripts() ThemeHelper::registerScript( 'goomento-frontend', 'Goomento_PageBuilder/js/frontend-entry', - ['underscore'] + [ + 'underscore' + ] ); $this->printConfig(); @@ -141,9 +146,6 @@ public function registerScripts() */ public function registerStyles() { - - $minSuffix = Developer::debug() ? '' : '.min'; - /** * Before frontend register styles. * @@ -152,15 +154,9 @@ public function registerStyles() */ HooksHelper::doAction('pagebuilder/frontend/before_register_styles'); - $directionSuffix = DataHelper::isRtl() ? '-rtl' : ''; - - $frontendFileUrl = 'Goomento_PageBuilder/build/frontend' . $directionSuffix . $minSuffix . '.css'; - ThemeHelper::registerStyle( 'goomento-frontend', - $frontendFileUrl, - [], - Developer::version() + 'Goomento_PageBuilder/build/frontend.css' ); /** @@ -217,10 +213,10 @@ public function enqueueStyles() */ HooksHelper::doAction('pagebuilder/frontend/before_enqueue_styles'); - ThemeHelper::enqueueStyle('fontawesome'); - ThemeHelper::enqueueStyle('goomento-animations'); - ThemeHelper::enqueueStyle('goomento-frontend'); + foreach ($this->stylesToEnqueue as $style) { + ThemeHelper::enqueueStyle($style); + } /** * After frontend styles enqueued. @@ -230,7 +226,7 @@ public function enqueueStyles() */ HooksHelper::doAction('pagebuilder/frontend/after_enqueue_styles'); - if (!StateHelper::isEditorPreviewMode()) { + if (!StateHelper::isCanvasMode()) { $this->parseGlobalCssCode(); } } @@ -379,9 +375,9 @@ private function enqueueGoogleFonts($googleFonts = []) * Enqueue all the frontend fonts. * * - * @param array $font Fonts to enqueue in the frontend. + * @param string $font Fonts to enqueue in the frontend. */ - public function enqueueFont($font) + public function enqueueFont(string $font) { if (in_array($font, $this->registeredFonts)) { return; @@ -415,7 +411,7 @@ protected function parseGlobalCssCode() */ public function applyBuilderInContent(BuildableContentInterface $content) { - if (StateHelper::isEditorPreviewMode()) { + if (StateHelper::isCanvasMode()) { return ''; } @@ -464,12 +460,11 @@ public function getBuilderContent(BuildableContentInterface $buildableContent) $cssFile = new ContentCss($buildableContent); - // phpcs:ignore Magento2.Functions.DiscouragedFunction.Discouraged ob_start(); HooksHelper::addAction('pagebuilder/frontend/enqueue_scripts', [$cssFile, 'enqueue']); - if (!empty($cssFile) && RequestHelper::isAjax()) { + if (RequestHelper::isAjax()) { $cssFile->printCss(); } @@ -487,6 +482,14 @@ public function getBuilderContent(BuildableContentInterface $buildableContent) */ $html = HooksHelper::applyFilters('pagebuilder/the_content', $html)->getResult(); + if (strpos($html, 'animation') !== false) { + $this->stylesToEnqueue['goomento-animations'] = 'goomento-animations'; + } + + if (strpos($html, 'fa-') !== false) { + $this->stylesToEnqueue['fontawesome'] = 'fontawesome'; + } + $buildableContent->setFlag('is_rendering_content', false); return $html; @@ -502,7 +505,7 @@ public function getBuilderContent(BuildableContentInterface $buildableContent) */ protected function getInitSettings() { - $isPreviewMode = StateHelper::isEditorPreviewMode(); + $isPreviewMode = StateHelper::isCanvasMode(); $settings = [ 'environmentMode' => [ @@ -512,7 +515,7 @@ protected function getInitSettings() 'breakpoints' => Developer::DEFAULT_BREAKPOINTS, 'version' => Developer::version(), 'urls' => [ - 'assets' => UrlBuilderHelper::urlStaticBuilder('Goomento_PageBuilder') . '/', + 'assets' => UrlBuilderHelper::getAssetUrlWithParams('Goomento_PageBuilder') . '/', ], ]; diff --git a/Builder/Modules/Preview.php b/Builder/Modules/Preview.php index e569fab2..3907db75 100644 --- a/Builder/Modules/Preview.php +++ b/Builder/Modules/Preview.php @@ -9,7 +9,6 @@ namespace Goomento\PageBuilder\Builder\Modules; use Goomento\PageBuilder\Api\Data\BuildableContentInterface; -use Goomento\PageBuilder\Developer; use Goomento\PageBuilder\Helper\HooksHelper; use Goomento\PageBuilder\Helper\DataHelper; use Goomento\PageBuilder\Helper\ObjectManagerHelper; @@ -26,7 +25,7 @@ class Preview /** * Init the preview */ - public function initByContent(BuildableContentInterface $buildableContent) + public function constructByContent(BuildableContentInterface $buildableContent) { $this->contentModel = $buildableContent; @@ -79,13 +78,9 @@ public function enqueueStyles() { ObjectManagerHelper::getWidgetsManager()->enqueueWidgetsStyles(); - $debugSuffix = Developer::debug() ? '' : '.min'; - - $directionSuffix = DataHelper::isRtl() ? '-rtl' : ''; - ThemeHelper::registerStyle( 'editor-preview', - 'Goomento_PageBuilder/build/editor-preview' . $directionSuffix . $debugSuffix . '.css', + 'Goomento_PageBuilder/build/editor-preview.css', [ 'jquery-select2', 'pen' @@ -93,6 +88,8 @@ public function enqueueStyles() ); ThemeHelper::enqueueStyle('editor-preview'); + ThemeHelper::enqueueStyle('goomento-animations'); + ThemeHelper::enqueueStyle('fontawesome'); /** * Preview enqueue styles. @@ -133,6 +130,9 @@ public function footer() */ public function __construct() { - HooksHelper::addAction('pagebuilder/content/preview', [ $this, 'initByContent']); + /** + * Ready to catch the custom trigger by controller + */ + HooksHelper::addAction('pagebuilder/content/canvas', [ $this, 'constructByContent']); } } diff --git a/Builder/Resolver/RequireJsResolver.php b/Builder/Resolver/RequireJsResolver.php deleted file mode 100644 index a0d94195..00000000 --- a/Builder/Resolver/RequireJsResolver.php +++ /dev/null @@ -1,110 +0,0 @@ -=')) { - $requirejs['paths']['jquery/file-uploader'] = 'jquery/fileUploader/jquery.fileuploader'; - } - - $requirejs['map']['*']['wysiwygAdapter'] = '//cdnjs.cloudflare.com/ajax/libs/tinymce/5.10.7/tinymce.min.js'; - - ThemeHelper::removeScripts('underscore'); - ThemeHelper::registerScript('underscore', 'Goomento_PageBuilder/lib/underscore/underscore.min'); - - // Remove jQuery UI - $magentoVersion = Developer::magentoVersion(); - ThemeHelper::removeScripts('jquery/ui'); - $jqueryUi = version_compare($magentoVersion, '2.4.5', '>=') ? - 'Goomento_PageBuilder/lib/jquery/jquery-ui.1.13.2.min' : - 'Goomento_PageBuilder/lib/jquery/jquery-ui.1.11.4.min'; - - ThemeHelper::registerScript( - 'jquery/ui', - $jqueryUi, - ['jquery'], - [ - 'requirejs' => [ - 'map' => [ - '*' => [ - 'jquery-ui-modules/widget' => 'jquery/ui', - 'jquery-ui-modules/core' => 'jquery/ui', - 'jquery-ui-modules/accordion' => 'jquery/ui', - 'jquery-ui-modules/autocomplete' => 'jquery/ui', - 'jquery-ui-modules/button' => 'jquery/ui', - 'jquery-ui-modules/datepicker' => 'jquery/ui', - 'jquery-ui-modules/dialog' => 'jquery/ui', - 'jquery-ui-modules/draggable' => 'jquery/ui', - 'jquery-ui-modules/droppable' => 'jquery/ui', - 'jquery-ui-modules/effect-blind' => 'jquery/ui', - 'jquery-ui-modules/effect-bounce' => 'jquery/ui', - 'jquery-ui-modules/effect-clip' => 'jquery/ui', - 'jquery-ui-modules/effect-drop' => 'jquery/ui', - 'jquery-ui-modules/effect-explode' => 'jquery/ui', - 'jquery-ui-modules/effect-fade' => 'jquery/ui', - 'jquery-ui-modules/effect-fold' => 'jquery/ui', - 'jquery-ui-modules/effect-highlight' => 'jquery/ui', - 'jquery-ui-modules/effect-scale' => 'jquery/ui', - 'jquery-ui-modules/effect-pulsate' => 'jquery/ui', - 'jquery-ui-modules/effect-shake' => 'jquery/ui', - 'jquery-ui-modules/effect-slide' => 'jquery/ui', - 'jquery-ui-modules/effect-transfer' => 'jquery/ui', - 'jquery-ui-modules/effect' => 'jquery/ui', - 'jquery-ui-modules/menu' => 'jquery/ui', - 'jquery-ui-modules/mouse' => 'jquery/ui', - 'jquery-ui-modules/position' => 'jquery/ui', - 'jquery-ui-modules/progressbar' => 'jquery/ui', - 'jquery-ui-modules/resizable' => 'jquery/ui', - 'jquery-ui-modules/selectable' => 'jquery/ui', - 'jquery-ui-modules/slider' => 'jquery/ui', - 'jquery-ui-modules/sortable' => 'jquery/ui', - 'jquery-ui-modules/spinner' => 'jquery/ui', - 'jquery-ui-modules/tabs' => 'jquery/ui', - 'jquery-ui-modules/tooltip' => 'jquery/ui', - 'jquery-ui-modules/timepicker' => 'jquery/ui', - ] - ] - ] - ] - ); - - return $requirejs; - } - - /** - * @param array $config - * @return array - */ - public function updateBuilderJsVariables(array $config) : array - { - return $config; - } -} diff --git a/Builder/Sources/Local.php b/Builder/Sources/Local.php index c57c12be..343316b5 100644 --- a/Builder/Sources/Local.php +++ b/Builder/Sources/Local.php @@ -157,7 +157,6 @@ public function saveItem(array $templateData) { $defaults = [ 'title' => __('(no title)'), - 'page_settings' => [], // @TODO remove this, should use `settings` 'status' => BuildableContentInterface::STATUS_PENDING, ]; diff --git a/CHANGELOG.md b/CHANGELOG.md index ed74e8b6..65c9ddc7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Magento 2 Goomento Page Builder +## 0.5.0 Added Dark mode +- Seperated Editor JS libs with Magento +- Updated color picker panel +- Added Dark mode +- Optimized loading + ## 0.4.5 Fixed minor bugs - Fixed minor bugs - Added Documents to menu diff --git a/Controller/Actions/Actions.php b/Controller/Actions/Actions.php index 321f6cdb..e0766287 100644 --- a/Controller/Actions/Actions.php +++ b/Controller/Actions/Actions.php @@ -11,7 +11,6 @@ use Exception; use Goomento\Core\Model\Registry; use Goomento\PageBuilder\Controller\AbstractAction; -use Goomento\PageBuilder\Developer; use Goomento\PageBuilder\Helper\Data; use Goomento\PageBuilder\Helper\DataHelper; use Goomento\PageBuilder\Helper\EscaperHelper; @@ -112,7 +111,7 @@ public function execute() } catch (LocalizedException $e) { $results[$actionId]['message'] = $e->getMessage(); } catch (Exception $e) { - if (Developer::debug()) { + if (DataHelper::isDebugMode()) { $results[$actionId]['message'] = $e->getMessage(); } else { $results[$actionId]['message'] = (string) __('Something went wrong when render your action.'); diff --git a/Controller/Adminhtml/Ajax/Heartbeat.php b/Controller/Adminhtml/Ajax/Heartbeat.php deleted file mode 100644 index a5684220..00000000 --- a/Controller/Adminhtml/Ajax/Heartbeat.php +++ /dev/null @@ -1,24 +0,0 @@ -setResponseData( - HooksHelper::applyFilters('pagebuilder/heartbeat/response', [])->getResult() - )->sendResponse(); - } -} diff --git a/Controller/Adminhtml/Content/Media.php b/Controller/Adminhtml/Content/Media.php new file mode 100644 index 00000000..21dea20d --- /dev/null +++ b/Controller/Adminhtml/Content/Media.php @@ -0,0 +1,23 @@ +resultFactory->create(ResultFactory::TYPE_PAGE); + } +} diff --git a/Controller/Content/EditorPreview.php b/Controller/Content/Canvas.php similarity index 92% rename from Controller/Content/EditorPreview.php rename to Controller/Content/Canvas.php index e08b8bc4..4984a355 100644 --- a/Controller/Content/EditorPreview.php +++ b/Controller/Content/Canvas.php @@ -15,7 +15,7 @@ * For Editor Preview purpose, therefore, there is no content should be rendered * This page will not be cached */ -class EditorPreview extends View +class Canvas extends View { /** * @inheritdoc @@ -23,7 +23,7 @@ class EditorPreview extends View public function execute() { try { - HooksHelper::doAction('pagebuilder/content/preview', $this->getContent(true)); + HooksHelper::doAction('pagebuilder/content/canvas', $this->getContent(true)); return $this->renderPage(); } catch (LocalizedException $e) { $this->messageManager->addErrorMessage( diff --git a/EntryPoint.php b/EntryPoint.php index 5f6404f5..b3c50551 100644 --- a/EntryPoint.php +++ b/EntryPoint.php @@ -44,7 +44,6 @@ private function _construct() ObjectManagerHelper::get(Builder\Managers\Revisions::class); ObjectManagerHelper::get(Builder\Managers\Documents::class); ObjectManagerHelper::get(Builder\Managers\Settings::class); - ObjectManagerHelper::get(Builder\Managers\Resolvers::class); } /** @@ -63,8 +62,8 @@ public function init(array $buildSubject = []) HooksHelper::addAction('pagebuilder/widgets/widgets_registered', [$this, 'registerWidgets']); // Register the default resource css, js files - HooksHelper::addAction('pagebuilder/register_styles', [$this, 'registerStyles']); - HooksHelper::addAction('pagebuilder/register_scripts', [$this, 'registerScripts']); + HooksHelper::addAction('pagebuilder/register_styles', [$this, 'registerStyles'], 8); + HooksHelper::addAction('pagebuilder/register_scripts', [$this, 'registerScripts'], 8); } /** @@ -115,12 +114,14 @@ public function registerScripts() ThemeHelper::registerScript( 'jquery-waypoints', - 'Goomento_PageBuilder/lib/waypoints/waypoints.min' + 'Goomento_PageBuilder/lib/waypoints/waypoints.min', + ['jquery'] ); ThemeHelper::registerScript( 'jquery-tipsy', - 'Goomento_PageBuilder/js/view/tipsy-wrapper' + 'Goomento_PageBuilder/js/view/tipsy-wrapper', + ['jquery'] ); ThemeHelper::registerScript( @@ -128,16 +129,6 @@ public function registerScripts() 'Goomento_PageBuilder/js/goomento-backend' ); - ThemeHelper::registerScript( - 'introjs', - 'Goomento_PageBuilder/js/view/intro-wrapper' - ); - - ThemeHelper::registerScript( - 'goomento-editor-introjs-config', - 'Goomento_PageBuilder/js/action/editor-introjs-config' - ); - ThemeHelper::registerScript( 'goomento-widget-banner-slider', 'Goomento_PageBuilder/js/widgets/banner-slider' diff --git a/Helper/DataHelper.php b/Helper/DataHelper.php index e39c53ce..d19f2e12 100644 --- a/Helper/DataHelper.php +++ b/Helper/DataHelper.php @@ -131,51 +131,6 @@ public static function arrayGetValue(array &$array, $path, string $delimiter = ' return $ref; } - /** - * @param $datetime - * @param false $full - * @return string - * @deprecated - * @throws \Exception - */ - public static function timeElapsedString($datetime, bool $full = false): string - { - $now = new \DateTime; - $ago = new \DateTime($datetime); - $diff = $now->diff($ago); - - $diffTime = [ - 'w' => floor($diff->d / 7) - ]; - - $diffTime['d'] = $diffTime['w'] * 7; - - $string = [ - 'y' => 'year', - 'm' => 'month', - 'w' => 'week', - 'd' => 'day', - 'h' => 'hour', - 'i' => 'minute', - 's' => 'second', - ]; - - foreach ($string as $k => &$v) { - if (isset($diffTime[$k])) { - $v = $diffTime[$k] . ' ' . $v . ($diffTime[$k] > 1 ? 's' : ''); - } else { - unset($string[$k]); - } - } - - if (!$full) { - $string = array_slice($string, 0, 1); - } - $string = $string ? implode(', ', $string) . ' ago' : 'just now'; - $string .= ' (' . $ago->format('F j, Y, g:i a') . ')'; - return $string; - } - /** * @param $string * @return bool @@ -229,7 +184,7 @@ public static function printJsConfig($handle, $jsVar, $config) */ public static function getPlaceholderImageSrc() { - $placeholderImage = UrlBuilderHelper::urlStaticBuilder('Goomento_PageBuilder::images/placeholder.png'); + $placeholderImage = UrlBuilderHelper::getAssetUrlWithParams('Goomento_PageBuilder::images/placeholder.png'); /** * Get placeholder image source. diff --git a/Helper/EscaperHelper.php b/Helper/EscaperHelper.php index 43183490..6ca923b0 100644 --- a/Helper/EscaperHelper.php +++ b/Helper/EscaperHelper.php @@ -30,6 +30,8 @@ * @see Escaper::escapeCss() * @method static escapeJsQuote($data, $quote = '\'') * @see Escaper::escapeJsQuote() + * @method static escapeUrl($string) + * @see Escaper::escapeUrl() */ // phpcs:disable Magento2.Functions.StaticFunction.StaticFunction class EscaperHelper diff --git a/Helper/RequestHelper.php b/Helper/RequestHelper.php index fcc801bd..f8875e7f 100644 --- a/Helper/RequestHelper.php +++ b/Helper/RequestHelper.php @@ -20,7 +20,11 @@ * See https://developer.adobe.com/commerce/php/development/components/object-manager/#usage-rules * * @method static getParams(); + * @see RequestInterface::getParams(); * @method static getParam($param, $default = null); + * @see RequestInterface::getParam(); + * @method static isSecure(); + * @see RequestInterface::isSecure(); */ // phpcs:disable Magento2.Functions.StaticFunction.StaticFunction // phpcs:disable Magento2.Security.Superglobal.SuperglobalUsageWarning diff --git a/Helper/StateHelper.php b/Helper/StateHelper.php index c215e2e2..0f13ae48 100644 --- a/Helper/StateHelper.php +++ b/Helper/StateHelper.php @@ -73,19 +73,19 @@ public static function emulateFrontend(callable $callback) $isBuildable = Developer::getVar('is_buildable'); $isView = Developer::getVar('is_view'); $isEditor = Developer::getVar('is_editor'); - $isPreview = Developer::getVar('is_preview'); + $isPreview = Developer::getVar('is_canvas'); try { Developer::setVar('is_buildable', false); Developer::setVar('is_view', false); Developer::setVar('is_editor', false); - Developer::setVar('is_preview', false); + Developer::setVar('is_canvas', false); return self::emulateAreaCode(Area::AREA_FRONTEND, $callback); } finally { Developer::setVar('is_buildable', $isBuildable); Developer::setVar('is_view', $isView); Developer::setVar('is_editor', $isEditor); - Developer::setVar('is_preview', $isPreview); + Developer::setVar('is_canvas', $isPreview); } } @@ -97,7 +97,7 @@ public static function isBuildable() : bool { if (Developer::getVar('is_buildable') === null) { Developer::setVar('is_buildable', self::isEditorMode() - || self::isEditorPreviewMode() + || self::isCanvasMode() || self::isViewMode()); } return Developer::getVar('is_buildable') ?: false; @@ -107,18 +107,18 @@ public static function isBuildable() : bool * TRUE when access the editor preview page (canvas page) (FE) * @return bool */ - public static function isEditorPreviewMode() : bool + public static function isCanvasMode() : bool { - if (Developer::getVar('is_preview') === null) { + if (Developer::getVar('is_canvas') === null) { $isPreviewMode = HooksHelper::didAction('pagebuilder/preview/index'); if ($isPreviewMode === false) { $actionName = RegistryHelper::registry('current_action_name'); - $isPreviewMode = $actionName === 'pagebuilder_content_editorpreview'; + $isPreviewMode = $actionName === 'pagebuilder_content_canvas'; } - Developer::setVar('is_preview', $isPreviewMode); + Developer::setVar('is_canvas', $isPreviewMode); } - return Developer::getVar('is_preview') ?: false; + return Developer::getVar('is_canvas') ?: false; } /** diff --git a/Helper/ThemeHelper.php b/Helper/ThemeHelper.php index 080b0f59..35dc098a 100644 --- a/Helper/ThemeHelper.php +++ b/Helper/ThemeHelper.php @@ -10,6 +10,7 @@ use Goomento\PageBuilder\Api\Data\BuildableContentInterface; use Goomento\PageBuilder\Api\Data\ContentInterface; +use Goomento\PageBuilder\Developer; /** * @@ -26,6 +27,18 @@ class ThemeHelper extends \Goomento\Core\Helper\ThemeHelper */ private static $contents = []; + /** + * Resources that contains these string will be debuggable + * @var string + */ + const DEBUGGABLE_RESOURCES = '/Goomento_PageBuilder\/build/'; + + /** + * Resources that contains these string will applicable for RTL or LTR + * @var string[] + */ + const DIRECTION_RESOURCES = '/^Goomento_PageBuilder\/build\/(editor|editor-preview|frontend)(\.css)*$/'; + /** * Add body class to theme * @@ -66,44 +79,75 @@ public static function hasContentOnPage() : bool } /** - * Trigger all hooks for header + * Hook for render URL * * @return void */ - public static function onDoHeader() + public static function onStyleLoaderSource($src = '') { - self::getStylesManager()->doItems(); - self::getScriptsManager()->doHeadItems(); + if (!preg_match('#((https?|ftp)://(\S*?\.\S*?))([\s)\[\]{},;"\':<]|\.\s|$)#i', $src)) { + $src = UrlBuilderHelper::getAssetUrlWithParams($src); + } + + // Trip off all params in static folder for best fix with Css minification config + if (strpos($src, 'static/') !== false && StateHelper::isProductionMode() + && DataHelper::isCssMinifyFilesEnabled()) { + $src = preg_replace("/^([^?]+).*/", "$1", $src); + } + + return $src; } /** - * Trigger all hooks for header - * - * @return void + * @inheritDoc */ - public static function onDoFooter() - { - self::getStylesManager()->doItems(); - self::getScriptsManager()->doFooterItems(); + public static function registerScript( + string $handle, + string $src, + array $deps = [], + array $args = [] + ) { + return parent::registerScript($handle, self::getDebugResource($src), $deps, $args); } /** - * Hook for render URL + * @inheritDoc + */ + public static function registerStyle( + string $handle, + $src, + array $deps = [], + $ver = false, + string $media = 'all' + ) { + if (DataHelper::isRtl() && preg_match(self::DIRECTION_RESOURCES, $src)) { + $src = str_replace('.css', '-rtl.css', $src); + } + return parent::registerStyle($handle, self::getDebugResource($src), $deps, $ver, $media); + } + + /** + * Get debug resource * + * @param string $handle * @return void */ - public static function onStyleLoaderSource($src = '') + private static function getDebugResource(string $handle) : string { - if (!preg_match('#((https?|ftp)://(\S*?\.\S*?))([\s)\[\]{},;"\':<]|\.\s|$)#i', $src)) { - $src = UrlBuilderHelper::urlStaticBuilder($src); - } + if (!Developer::debug() && preg_match(self::DEBUGGABLE_RESOURCES, $handle)) { + $parts = explode('.', $handle); + $ext = array_pop($parts); + if (in_array($ext, ['js', 'css'])) { + $parts[] = 'min'; + $parts[] = $ext; + } else { + $parts[] = $ext; + $parts[] = 'min'; + } - // Trip off all params in static folder for best fix with Css minification config - if (strpos($src, 'static/') !== false && StateHelper::isProductionMode() - && DataHelper::isCssMinifyFilesEnabled()) { - $src = preg_replace("/^([^?]+).*/", "$1", $src); + $handle = implode('.', $parts); } - return $src; + return $handle; } } diff --git a/Helper/UrlBuilderHelper.php b/Helper/UrlBuilderHelper.php index c577e659..d47c08b1 100644 --- a/Helper/UrlBuilderHelper.php +++ b/Helper/UrlBuilderHelper.php @@ -32,6 +32,10 @@ class UrlBuilderHelper * @var Url */ private static $frontendUrlBuilder; + /** + * @var Repository + */ + private static $assetUrlBuilder; /** * @return Url @@ -57,6 +61,18 @@ private static function getUrlBuilder() return self::$urlBuilder; } + /** + * @return Repository + */ + private static function getAssetUrlBuilder() + { + if (null === self::$assetUrlBuilder) { + self::$assetUrlBuilder = ObjectManagerHelper::get(Repository::class); + } + + return self::$assetUrlBuilder; + } + /** * Build url by requested path and parameters * @@ -98,9 +114,9 @@ public static function getFrontendUrl(string $routePath = null, array $routePara * @param int $userId * @return string */ - public static function getEditorPreviewUrl(ContentInterface $content, int $userId = 0) + public static function getCanvasUrl(ContentInterface $content, int $userId = 0) { - return self::getFrontendUrl('pagebuilder/content/editorpreview', [ + return self::getFrontendUrl('pagebuilder/content/canvas', [ 'content_id' => $content->getId(), 'store_id' => self::getStoreId($content), 'layout' => $content->getSetting('layout'), @@ -209,16 +225,14 @@ public static function getLiveEditorUrl(ContentInterface $content) /** * @param $src - * @param null $area + * @param array|null $params * @return string */ - public static function urlStaticBuilder($src, $area = null) + public static function getAssetUrlWithParams($src, ?array $params = []) { - /** @var Repository $assetRepo */ - $assetRepo = ObjectManagerHelper::get(Repository::class); - if (null === $area) { - $area = StateHelper::getAreaCode(); + if (!isset($params['area'])) { + $params['area'] = StateHelper::getAreaCode(); } - return $assetRepo->getUrlWithParams($src, ['area' => $area]); + return self::getAssetUrlBuilder()->getUrlWithParams($src, $params); } } diff --git a/Model/ContentRegistry.php b/Model/ContentRegistry.php index eb8db61c..677d08ed 100644 --- a/Model/ContentRegistry.php +++ b/Model/ContentRegistry.php @@ -15,6 +15,7 @@ use Goomento\PageBuilder\Api\ContentRegistryInterface; use Goomento\PageBuilder\Logger\Logger; use Magento\Framework\Exception\NoSuchEntityException; +use Magento\PageCache\Model\Cache\Type as FullPageCache; class ContentRegistry implements ContentRegistryInterface { @@ -48,17 +49,23 @@ class ContentRegistry implements ContentRegistryInterface * @var ContentRepositoryInterface */ private $contentRepository; + /** + * @var FullPageCache + */ + private $fullPageCache; /** * ContentRegistry constructor. * @param ContentInterfaceFactory $contentFactory * @param ContentRepositoryInterface $contentRepository + * @param FullPageCache $fullPageCache * @param BetterCaching $cache * @param Logger $logger */ public function __construct( ContentInterfaceFactory $contentFactory, ContentRepositoryInterface $contentRepository, + FullPageCache $fullPageCache, BetterCaching $cache, Logger $logger ) { @@ -66,6 +73,7 @@ public function __construct( $this->contentRepository = $contentRepository; $this->logger = $logger; $this->cache = $cache; + $this->fullPageCache = $fullPageCache; } /** @@ -220,6 +228,9 @@ private function cleanContentCache($content) // Remove from cache $this->cache->remove($this->getContentCacheKey($id)); + // Clean full page cache + $this->fullPageCache->clean(\Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG, [$this->getContentCacheKey($id)]); + // Remove identifier $this->contentIdentifier(false, $id); } diff --git a/Model/LocalSampleCollection.php b/Model/LocalSampleCollection.php index 921cf99f..075174b2 100644 --- a/Model/LocalSampleCollection.php +++ b/Model/LocalSampleCollection.php @@ -21,7 +21,7 @@ class LocalSampleCollection public function __construct( array $samples = [] ) { - $this->components = $samples; + $this->setComponent($samples); } /** diff --git a/PageBuilder.php b/PageBuilder.php index 818fada3..fe780095 100644 --- a/PageBuilder.php +++ b/PageBuilder.php @@ -66,7 +66,7 @@ public function init(array $buildSubject = []) // Wait for all components loaded HooksHelper::addAction('init', function () { - $this->regisDefaultHook(); + $this->registerDefaultHook(); }); } } @@ -82,7 +82,7 @@ public static function initialize() /** * Register default hook */ - private function regisDefaultHook() + private function registerDefaultHook() { $areaCode = StateHelper::getAreaCode(); @@ -102,7 +102,8 @@ private function regisDefaultHook() HooksHelper::doAction('pagebuilder/enqueue_scripts'); HooksHelper::doAction("pagebuilder/{$areaCode}/enqueue_scripts"); - ThemeHelper::onDoHeader(); + ThemeHelper::getStylesManager()->doItems(); + ThemeHelper::getScriptsManager()->doHeadItems(); }); // FOOTER @@ -113,7 +114,8 @@ private function regisDefaultHook() HooksHelper::addAction('pagebuilder/footer', function () use ($areaCode) { HooksHelper::doAction("pagebuilder/{$areaCode}/footer"); - ThemeHelper::onDoFooter(); + ThemeHelper::getStylesManager()->doItems(); + ThemeHelper::getScriptsManager()->doFooterItems(); }); // DEFAULT diff --git a/Plugin/Framework/View/Page/InitEditorResources.php b/Plugin/Framework/View/Page/InitEditorResources.php index 1f079fdb..573bcf30 100644 --- a/Plugin/Framework/View/Page/InitEditorResources.php +++ b/Plugin/Framework/View/Page/InitEditorResources.php @@ -8,41 +8,32 @@ namespace Goomento\PageBuilder\Plugin\Framework\View\Page; use Exception; -use Goomento\PageBuilder\Helper\DataHelper; use Goomento\PageBuilder\Helper\HooksHelper; -use Magento\Framework\App\RequestInterface; -use Magento\Framework\View\Asset\Repository; +use Goomento\PageBuilder\Logger\Logger; use Magento\Framework\View\Page\Config; use Magento\Framework\View\Page\Config\RendererInterface; class InitEditorResources { - /** - * @var RequestInterface - */ - private $request; - /** - * @var Repository - */ - private $assetRepository; /** * @var Config */ private $pageConfig; + /** + * @var Logger + */ + private $logger; /** - * @param Repository $assetRepository - * @param RequestInterface $request * @param Config $pageConfig + * @param Logger $logger */ public function __construct( - Repository $assetRepository, - RequestInterface $request, - Config $pageConfig + Config $pageConfig, + Logger $logger ) { - $this->assetRepository = $assetRepository; $this->pageConfig = $pageConfig; - $this->request = $request; + $this->logger = $logger; } /** @@ -50,41 +41,18 @@ public function __construct( * @param $result * @return string */ - public function afterRenderHeadContent(RendererInterface $subject, $result) + public function afterRenderHeadContent(RendererInterface $subject, $result) : string { - if (is_string($result)) { - try { - if (HooksHelper::didAction('pagebuilder/editor/index') || - HooksHelper::didAction('pagebuilder/editor/render_widget')) { - $result = $subject->renderMetadata(); - $result .= $subject->renderTitle(); - $result .= $this->pageConfig->getIncludes(); - $result .= $this->getHtmlHead(); - } - } catch (Exception $e) { - + try { + if (HooksHelper::didAction('pagebuilder/editor/index') || + HooksHelper::didAction('pagebuilder/editor/render_widget')) { + $result = $subject->renderMetadata(); + $result .= $subject->renderTitle(); + $result .= $this->pageConfig->getIncludes(); } + } catch (Exception $e) { + $this->logger->error($e); } - return $result; } - - /** - * @return string - */ - private function getHtmlHead() : string - { - $params = array_merge(['_secure' => $this->request->isSecure()]); - $requirejsUrl = $this->assetRepository->getUrlWithParams('Goomento_PageBuilder/lib/requirejs/require.min.js', $params); - $html = sprintf('', $requirejsUrl); - $cssPrefix = DataHelper::isCssMinifyFilesEnabled() ? '.min' : ''; - foreach (['css/styles', 'jquery/jstree/themes/default/style', 'Goomento_Core::css/style-m'] as $file) { - $cssUrl = $this->assetRepository->getUrlWithParams($file . $cssPrefix . '.css', $params); - $html .= sprintf('', $cssUrl); - } - $iconUrl = $this->assetRepository->getUrlWithParams('Goomento_Core/images/goomento.ico', $params); - $html .= sprintf('', $iconUrl); - - return $html; - } } diff --git a/Traits/TraitComponentsLoader.php b/Traits/TraitComponentsLoader.php index 4c5f1cb4..b11cb111 100644 --- a/Traits/TraitComponentsLoader.php +++ b/Traits/TraitComponentsLoader.php @@ -19,8 +19,6 @@ trait TraitComponentsLoader */ protected function getComponents(): array { - $this->getRegisterComponents(); - $components = (array) $this->components; foreach ($components as $name => $model) { if (is_string($model) && class_exists($model)) { @@ -37,8 +35,6 @@ protected function getComponents(): array */ protected function getComponent(?string $name) { - $this->getRegisterComponents(); - if ($name !== null) { $model = $this->components[$name] ?? null; if (is_string($model) && class_exists($model)) { @@ -60,8 +56,6 @@ protected function getComponent(?string $name) */ protected function setComponent($name, $model = null) { - $this->getRegisterComponents(); - if (is_array($name)) { foreach ($name as $item => $value) { $this->setComponent($item, $value); @@ -73,14 +67,6 @@ protected function setComponent($name, $model = null) return $this; } - /** - * @return array - */ - private function getRegisterComponents() - { - return $this->components; - } - /** * @param string|null $name * @return bool diff --git a/Traits/TraitHttpContentAction.php b/Traits/TraitHttpContentAction.php index 66a9bbbf..19fad54f 100644 --- a/Traits/TraitHttpContentAction.php +++ b/Traits/TraitHttpContentAction.php @@ -58,11 +58,10 @@ protected function getContent(bool $force = false) * @param $inLastRevision * @return string|null * @throws LocalizedException - * @TODO should check this */ protected function getContentLayout($inLastRevision = false) { - if ($inLastRevision && $this->getContent(true)->getLastRevision()) { + if ($inLastRevision && $this->getContent(true)->getLastRevision(true)) { return $this->getContent(true)->getLastRevision()->getSetting('layout'); } elseif (!$inLastRevision) { return $this->getContent(true)->getSetting('layout'); diff --git a/composer.json b/composer.json index 203065f7..d1516de7 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "goomento/module-page-builder", "description": "Goomento - The Free Magento Page Builder Extension, allows you to create unique Magento websites, landing pages using advanced animations, custom CSS, responsive designs, and more, without a line of code.", "type": "magento2-module", - "version": "0.4.5", + "version": "0.5.0", "license": [ "OSL-3.0" ], diff --git a/etc/frontend/di.xml b/etc/frontend/di.xml index 0c4515e9..ac2fc557 100755 --- a/etc/frontend/di.xml +++ b/etc/frontend/di.xml @@ -20,7 +20,7 @@ - + diff --git a/i18n/en_US.csv b/i18n/en_US.csv index e35aded8..a397aa7b 100644 --- a/i18n/en_US.csv +++ b/i18n/en_US.csv @@ -160,6 +160,7 @@ Template,Template "CMS Page Content","CMS Page Content" "Config Path","Config Path" Logo,Logo +"Page Builder Content","Page Builder Content" URLs,URLs "Home Page","Home Page" Column,Column @@ -261,6 +262,8 @@ Basic,Basic General,General Products,Products Magento,Magento +Form,Form +External,External Lightbox,Lightbox "Font Awesome - Regular","Font Awesome - Regular" "Font Awesome - Solid","Font Awesome - Solid" @@ -270,9 +273,7 @@ Anonymous,Anonymous Url,Url WYSIWYG,WYSIWYG "Invalid format.","Invalid format." -"Action not found.","Action not found." "Something went wrong. Please try again later.","Something went wrong. Please try again later." -"Add Media","Add Media" Colors,Colors "Color Palettes","Color Palettes" Primary,Primary @@ -486,6 +487,8 @@ Faces,Faces Time,Time "URL ID","URL ID" "The URL of the webpage that will be liked.","The URL of the webpage that will be liked." +"Form Builder","Form Builder" +"Multistep Form Builder","Multistep Form Builder" "Google Maps","Google Maps" Zoom,Zoom Map,Map @@ -561,7 +564,7 @@ Price,Price "Add to Wishlist","Add to Wishlist" "Products Sidebar Template","Products Sidebar Template" "SnowDog Menu","SnowDog Menu" -"This widget requires to install Snowdog Menu.","This widget requires to install Snowdog Menu." +"Create new menu at Admin Panel > Content > Elements > Menus","Create new menu at Admin Panel > Content > Elements > Menus" "Menu Id","Menu Id" Menu,Menu Submenu,Submenu @@ -780,6 +783,7 @@ Actions,Actions File,File "Accepted: JSON files","Accepted: JSON files" Loading,Loading +"Add Media","Add Media" "Drop widget here","Drop widget here" "Add New Section","Add New Section" "Add new section","Add new section" @@ -801,8 +805,9 @@ Desktop,Desktop Saved,Saved "Save Options","Save Options" "Save as Template","Save as Template" +"Dark Mode","Dark Mode" "Global Settings","Global Settings" -"Keyboard shortcuts","Keyboard shortcuts" +"How To Use?","How To Use?" "Back To Magento","Back To Magento" "Update changes to page","Update changes to page" "%s are disabled","%s are disabled" @@ -826,7 +831,7 @@ Paste,Paste Quit,Quit Skip,Skip "Drag navigator","Drag navigator" -"Double click to change","Double click to change" +"Double Click To Set Name","Double Click To Set Name" "Easy Navigation is Here!","Easy Navigation is Here!" "Once you fill your page with content, this window will give you an overview display of all the page elements. This way, you can easily move around any section, column, or widget.","Once you fill your page with content, this window will give you an overview display of all the page elements. This way, you can easily move around any section, column, or widget." "Saved draft & revisions","Saved draft & revisions" @@ -857,6 +862,7 @@ or,or Find,Find Replace,Replace "What's new?","What's new?" +Documents,Documents "Latest Release:","Latest Release:" Version,Version "Release Note","Release Note" @@ -870,7 +876,6 @@ Version,Version "Migrate Now","Migrate Now" "Create New","Create New" "Edit With Goomento","Edit With Goomento" -by,by Shortcode,Shortcode "Select page builder","Select page builder" "WYSIWYG Editor","WYSIWYG Editor" @@ -892,7 +897,8 @@ Shortcode,Shortcode "Do you want to also import the document settings of the template?","Do you want to also import the document settings of the template?" "Attention: Importing may override previous settings","Attention: Importing may override previous settings" "Item #%1","Item #%1" -"Browser too small for editing experiment. Please open this page on Desktop.","Browser too small for editing experiment. Please open this page on Desktop." +"Browser size too small for editing experiment. Please open this page on Desktop.","Browser size too small for editing experiment. Please open this page on Desktop." +"Your browser isn't compatible","Your browser isn't compatible" "Inner section","Inner section" "Delete all content","Delete all content" "Attention: We are going to DELETE ALL CONTENT from this page. Are you sure you want to do that?","Attention: We are going to DELETE ALL CONTENT from this page. Are you sure you want to do that?" @@ -902,7 +908,6 @@ Cancel,Cancel "Unknown Error","Unknown Error" Refresh,Refresh "Go Back","Go Back" -"Your browser isn't compatible","Your browser isn't compatible" "Your browser isn't compatible with all of Goomento's editing features. We recommend you switch to another browser like Chrome or Firefox.","Your browser isn't compatible with all of Goomento's editing features. We recommend you switch to another browser like Chrome or Firefox." "Proceed Anyway","Proceed Anyway" "Looks like there was some issue while displaying preview page.","Looks like there was some issue while displaying preview page." @@ -910,6 +915,7 @@ Refresh,Refresh "Go back or Refresh this page if issue is persistent","Go back or Refresh this page if issue is persistent" "My Libraries","My Libraries" Upload,Upload +Help,Help "Go to","Go to" Shortcuts,Shortcuts "Open issue","Open issue" @@ -920,13 +926,13 @@ Shortcuts,Shortcuts "Global style","Global style" "Default Colors","Default Colors" "Before enter revision review","Before enter revision review" +"Editing started","Editing started" Added,Added Removed,Removed Edited,Edited Moved,Moved "Style pasted","Style pasted" "Style reset","Style reset" -"Editing started","Editing started" "All content","All content" "Add New Column","Add New Column" "Saving has been disabled until you’re reconnected.","Saving has been disabled until you’re reconnected." @@ -957,12 +963,8 @@ Publish,Publish "Server error: ","Server error: " "Something when wrong when saving your content.","Something when wrong when saving your content." Elements,Elements -Help,Help -"Color value","Color value" -"Select Color","Select Color" -"Select default color","Select default color" -Clear,Clear -"Clear color","Clear color" +div,div +iframe,iframe "Page Builder","Page Builder" "Pages - Landing Pages","Pages - Landing Pages" Sections,Sections @@ -1011,6 +1013,7 @@ Data,Data "Add New Page","Add New Page" "Delete Page(s)","Delete Page(s)" "Are you sure you wan't to delete selected items?","Are you sure you wan't to delete selected items?" +"Refresh Style/Cache","Refresh Style/Cache" ID,ID Created,Created Modified,Modified diff --git a/view/adminhtml/layout/pagebuilder_content_editor.xml b/view/adminhtml/layout/pagebuilder_content_editor.xml index 41394026..0d3133cd 100644 --- a/view/adminhtml/layout/pagebuilder_content_editor.xml +++ b/view/adminhtml/layout/pagebuilder_content_editor.xml @@ -10,9 +10,8 @@ - + diff --git a/view/adminhtml/layout/pagebuilder_content_media.xml b/view/adminhtml/layout/pagebuilder_content_media.xml new file mode 100644 index 00000000..dd35a6d9 --- /dev/null +++ b/view/adminhtml/layout/pagebuilder_content_media.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/view/adminhtml/templates/editor/editor.phtml b/view/adminhtml/templates/editor/editor.phtml index a1822b0d..366b54df 100644 --- a/view/adminhtml/templates/editor/editor.phtml +++ b/view/adminhtml/templates/editor/editor.phtml @@ -15,7 +15,10 @@ use Goomento\PageBuilder\Helper\Fonts; use Goomento\PageBuilder\Helper\ObjectManagerHelper; use Magento\Backend\Block\Template; -$document = ObjectManagerHelper::getEditor()->getDocument(); +$schemeFieldsKeys = TypographyGroup::getSchemeFieldsKeys(); +$typographyGroup = ObjectManagerHelper::getControlsManager()->getControlGroups(TypographyGroup::NAME); +$typographyFields = $typographyGroup->getFields(); +$schemeFields = array_intersect_key($typographyFields, array_flip($schemeFieldsKeys)); ?>
@@ -254,11 +257,15 @@ $document = ObjectManagerHelper::getEditor()->getDocument();
+
+ +
-
@@ -319,17 +326,7 @@ $document = ObjectManagerHelper::getEditor()->getDocument();
{{{ title }}}
- getControlGroups(TypographyGroup::NAME); - - $typographyFields = $typographyGroup->getFields(); - - $schemeFields = array_intersect_key($typographyFields, array_flip($schemeFieldsKeys)); - - foreach ($schemeFields as $optionName => $option): + $option): ?>
@@ -757,8 +754,8 @@ $document = ObjectManagerHelper::getEditor()->getDocument();
{{{ goomento.helpers.formatDatetime(date) }}} & - {{{ jQuery.mage.__( type ) }}} - {{{ jQuery.mage.__( 'by' ) }}} {{{ author }}} + {{{ type }}} + by {{{ author }}}
@@ -941,7 +938,7 @@ $document = ObjectManagerHelper::getEditor()->getDocument(); + diff --git a/view/adminhtml/templates/editor/media_bucket.phtml b/view/adminhtml/templates/editor/media_bucket.phtml new file mode 100644 index 00000000..05223b4f --- /dev/null +++ b/view/adminhtml/templates/editor/media_bucket.phtml @@ -0,0 +1,105 @@ + + diff --git a/view/adminhtml/templates/editor/media_uploader.phtml b/view/adminhtml/templates/editor/media_uploader.phtml deleted file mode 100644 index d7cf9f71..00000000 --- a/view/adminhtml/templates/editor/media_uploader.phtml +++ /dev/null @@ -1,51 +0,0 @@ -getDocument(); -$storeId = (int) RequestHelper::getParam('store', 0); -if (DataHelper::getCustomMediaUrl()) { - $mediaUrl = DataHelper::getCustomMediaUrl(); -} else { - $mediaUrl = UrlBuilderHelper::getFrontendUrl('', [ - '_type' => UrlInterface::URL_TYPE_MEDIA, - 'store_id' => $storeId, - ]); -} -?> -
- -
- - diff --git a/view/adminhtml/web/js/media/uploader.js b/view/adminhtml/web/js/media/uploader.js deleted file mode 100644 index ba55ea16..00000000 --- a/view/adminhtml/web/js/media/uploader.js +++ /dev/null @@ -1,107 +0,0 @@ -/** - * @package Goomento_PageBuilder - * @link https://github.com/Goomento/PageBuilder - */ -define([ - 'jquery', - 'underscore', -], function ($, _) { - 'use strict'; - - $.widget('goomento.mediaUploader', { - options: { - htmlId: '', - openDialogUrl: '', - }, - imageUrl: '', - /** - * @inheritDoc - * @private - */ - _create: function() { - $(`#${this.options.htmlId}`).change(this.onChange.bind(this)); - - $(document.body).on('click.add-media-button', '.insert-media', function () { - mediaBucket.onSelected(function () { - let image = mediaBucket.get(); - if (!_.isEmpty(image) && tinymce) { - let html = '\'\''; - tinymce.activeEditor.execCommand('mceInsertContent', false, html); - } - }); - mediaBucket.openFrame(); - }); - - window.mediaBucket = this; - }, - /** - * Get full media file - * @param rawUrl - * @returns {string|*} - * @private - */ - _getFileUrl: function (rawUrl) { - let matched = rawUrl.match(/___directive\/([a-zA-Z0-9,]*)/i), - url = rawUrl; - if (matched && matched[1]) { - let widget = Base64.mageDecode(matched[1]); - widget = widget.match(/url=(\"|\')([^\"\']+)(\"|\')/i); - if (widget && widget[2]) { - url = widget[2]; - } - } - - return this._isUrl(url) ? - url : goomentoMediaUrl.replace(/\/$/, '') + '/' + url; - }, - /** - * Check whether is url or not - * @param urlString - * @returns {boolean} - * @private - */ - _isUrl: function (urlString) { - let urlPattern = new RegExp('^(https?:\\/\\/)?'+ // validate protocol - '((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|'+ // validate domain name - '((\\d{1,3}\\.){3}\\d{1,3}))'+ // validate OR ip (v4) address - '(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*'+ // validate port and path - '(\\?[;&a-z\\d%_.~+=-]*)?'+ // validate query string - '(\\#[-a-z\\d_]*)?$','i'); // validate fragment locator - return !!urlPattern.test(urlString); - }, - onChange: function () { - let filePathname = ($(`#${this.options.htmlId}`).val() || '').trim(); - if (filePathname !== '') { - this.imageUrl = this._getFileUrl(filePathname); - $(this).trigger('selected').off('selected'); - // Reset the image in bucket - $(`#${this.options.htmlId}`).val(''); - } - }, - openFrame: function() { - this.imageUrl = ''; - MediabrowserUtility.openDialog(this.options.openDialogUrl, null, null, null, { 'targetElementId': this.options.htmlId }); - return this; - }, - get: function () { - return { - url: this.imageUrl - }; - }, - /** - * Wait for media stop return the file - * @param callback - * @returns {Window.mediaBucket} - */ - onSelected: function (callback) { - if (this.callback) { - $(this).off('selected', this.callback); - } - $(this).on('selected', callback); - this.callback = callback; - return this; - }, - }); - - return $.goomento.mediaUploader; -}); diff --git a/view/base/web/build/common-modules.min.js b/view/base/web/build/common-modules.min.js index c3f6f882..200e84af 100644 --- a/view/base/web/build/common-modules.min.js +++ b/view/base/web/build/common-modules.min.js @@ -1 +1 @@ -!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n,r=e();for(n in r)("object"==typeof exports?exports:t)[n]=r[n]}}(window,function(){return n=[function(t,e){t.exports=function(t){return t&&t.__esModule?t:{default:t}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t=t.exports={version:"2.6.12"};"number"==typeof __e&&(__e=t)},function(t,e,n){t.exports=n(125)},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var o=n(2);function r(t,e){for(var n=0;ndocument.F=Object<\/script>"),t.close(),c=t.F;e--;)delete c.prototype[u[e]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(r.prototype=o(t),n=new r,r.prototype=null,n[a]=t):n=c(),void 0===e?n:i(n,e)}},function(t,e){t.exports=!0},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(20),o=n(112),i=n(104),u=Object.defineProperty;e.f=n(23)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(46),o=n(31),i=n(16),u=n(53),a=n(11),c=n(77),s=Object.getOwnPropertyDescriptor;e.f=n(12)?s:function(t,e){if(t=i(t),e=u(e,!0),c)try{return s(t,e)}catch(t){}if(a(t,e))return o(!r.f.call(t,e),t[e])}},,function(t,e,n){var r=n(39).f,o=Function.prototype,i=/^\s*function ([^ (]*)/;"name"in o||n(23)&&r(o,"name",{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(t){return""}}})},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){t.exports={}},function(t,e,n){t.exports=n(171)},function(t,e){e.f={}.propertyIsEnumerable},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(0>>0,f=new RegExp(t.source,a+"g");(r=p.call(f,n))&&!((o=f.lastIndex)>c&&(u.push(n.slice(c,r.index)),1>>0;if(0==a)return[];if(0===r.length)return null===_(u,r)?[r]:[];for(var c=0,s=0,f=[];so;)!u(r,n=e[o++])||~c(i,n)||i.push(n);return i}},function(t,e,n){t.exports=n(133)},function(t,e,n){t.exports=n(136)},function(t,e,n){"use strict";function g(){return this}var m=n(36),x=n(7),b=n(74),_=n(19),w=n(44),S=n(152),O=n(51),M=n(62),k=n(15)("iterator"),j=!([].keys&&"next"in[].keys());t.exports=function(t,e,n,r,o,i,u){S(n,e,r);function a(t){if(!j&&t in p)return p[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}}var c,s,r=e+" Iterator",f="values"==o,l=!1,p=t.prototype,d=p[k]||p["@@iterator"]||o&&p[o],h=d||a(o),v=o?f?a("entries"):h:void 0,y="Array"==e&&p.entries||d;if(y&&(y=M(y.call(new t)))!==Object.prototype&&y.next&&(O(y,r,!0),m||"function"==typeof y[k]||_(y,k,g)),f&&d&&"values"!==d.name&&(l=!0,h=function(){return d.call(this)}),m&&!u||!j&&!l&&p[k]||_(p,k,h),w[e]=h,w[r]=g,o)if(c={values:f?h:a("values"),keys:i?h:a("keys"),entries:v},u)for(s in c)s in p||b(p,s,c[s]);else x(x.P+x.F*(j||l),e,c);return c}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},,,,function(t,e,n){"use strict";var r=n(97),o=RegExp.prototype.exec;t.exports=function(t,e){var n=t.exec;if("function"==typeof n){n=n.call(t,e);if("object"!=typeof n)throw new TypeError("RegExp exec method returned something other than an Object or null");return n}if("RegExp"!==r(t))throw new TypeError("RegExp#exec called on incompatible receiver");return o.call(t,e)}},function(t,e){t.exports=!1},function(t,e,n){"use strict";n(164);var r,c=n(30),s=n(22),f=n(21),l=n(38),p=n(10),d=n(67),h=p("species"),v=!f(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")}),y=(r=(n=/(?:)/).exec,n.exec=function(){return r.apply(this,arguments)},2===(n="ab".split(n)).length&&"a"===n[0]&&"b"===n[1]);t.exports=function(n,t,e){var i,r,o=p(n),u=!f(function(){var t={};return t[o]=function(){return 7},7!=""[n](t)}),a=u?!f(function(){var t=!1,e=/a/;return e.exec=function(){return t=!0,null},"split"===n&&(e.constructor={},e.constructor[h]=function(){return e}),e[o](""),!t}):void 0;u&&a&&("replace"!==n||v)&&("split"!==n||y)||(i=/./[o],e=(a=e(l,o,""[n],function(t,e,n,r,o){return e.exec===d?u&&!o?{done:!0,value:i.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}))[0],r=a[1],c(String.prototype,n,e),s(RegExp.prototype,o,2==t?function(t,e){return r.call(t,this,e)}:function(t){return r.call(t,this)}))}},function(t,e,n){var r=n(25),o=n(17).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e,n){var r=n(27);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(54),o=Math.min;t.exports=function(t){return 0=t.length?{value:void 0,done:!0}:(t=r(t,e),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){"use strict";var r=n(21);t.exports=function(t,e){return!!t&&r(function(){e?t.call(null,function(){},1):t.call(null)})}},function(t,e,n){"use strict";var r=n(20);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){t.exports=!n(23)&&!n(21)(function(){return 7!=Object.defineProperty(n(91)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){"use strict";var r=n(26),o=n(105),c=n(27),s=n(106),f=n(34),l=[].slice;r(r.P+r.F*n(21)(function(){o&&l.call(o)}),"Array",{slice:function(t,e){var n=f(this.length),r=c(this);if(e=void 0===e?n:e,"Array"==r)return l.call(this,t,e);for(var o=s(t,n),t=s(e,n),i=f(t-o),u=new Array(i),a=0;ao;)s(T,e=n[o++])||e==j||e==D||r.push(e);return r}function a(t){for(var e,n=t===C,r=Y(n?P:m(t)),o=[],i=0;r.length>i;)!s(T,e=r[i++])||n&&!s(C,e)||o.push(T[e]);return o}var c=t(8),s=t(11),f=t(12),l=t(7),p=t(74),D=t(101).KEY,d=t(18),h=t(56),v=t(51),$=t(37),y=t(15),V=t(58),H=t(59),B=t(146),G=t(102),g=t(13),Q=t(9),W=t(29),m=t(16),x=t(53),b=t(31),_=t(35),z=t(147),K=t(40),w=t(69),U=t(14),J=t(32),X=K.f,S=U.f,Y=z.f,O=c.Symbol,M=c.JSON,k=M&&M.stringify,j=y("_hidden"),q=y("toPrimitive"),Z={}.propertyIsEnumerable,E=h("symbol-registry"),T=h("symbols"),P=h("op-symbols"),C=Object.prototype,h="function"==typeof O&&!!w.f,R=c.QObject,L=!R||!R.prototype||!R.prototype.findChild,A=f&&d(function(){return 7!=_(S({},"a",{get:function(){return S(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=X(C,e);r&&delete C[e],S(t,e,n),r&&t!==C&&S(C,e,r)}:S,I=h&&"symbol"==typeof O.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof O};h||(p((O=function(){if(this instanceof O)throw TypeError("Symbol is not a constructor!");var e=$(0et;)y(tt[et++]);for(var nt=J(y.store),rt=0;nt.length>rt;)H(nt[rt++]);l(l.S+l.F*!h,"Symbol",{for:function(t){return s(E,t+="")?E[t]:E[t]=O(t)},keyFor:function(t){if(!I(t))throw TypeError(t+" is not a symbol!");for(var e in E)if(E[e]===t)return e},useSetter:function(){L=!0},useSimple:function(){L=!1}}),l(l.S+l.F*!h,"Object",{create:function(t,e){return void 0===e?_(t):n(_(t),e)},defineProperty:u,defineProperties:n,getOwnPropertyDescriptor:o,getOwnPropertyNames:i,getOwnPropertySymbols:a});R=d(function(){w.f(1)});l(l.S+l.F*R,"Object",{getOwnPropertySymbols:function(t){return w.f(W(t))}}),M&&l(l.S+l.F*(!h||d(function(){var t=O();return"[null]"!=k([t])||"{}"!=k({a:t})||"{}"!=k(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],o=1;ou;)i.call(t,r=o[u++])&&e.push(r);return e}},function(t,e,n){var r=n(16),o=n(75).f,i={}.toString,u="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){if(!u||"[object Window]"!=i.call(t))return o(r(t));var e=t;try{return o(e)}catch(e){return u.slice()}}},function(t,e,n){n(59)("asyncIterator")},function(t,e,n){n(59)("observable")},function(t,e,n){n(109),n(117),t.exports=n(58).f("iterator")},function(t,e,n){var i=n(54),u=n(43);t.exports=function(o){return function(t,e){var n,t=String(u(t)),e=i(e),r=t.length;return e<0||r<=e?o?"":void 0:(n=t.charCodeAt(e))<55296||56319=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){t.exports=n(168)},,,function(t,e,n){var r=n(25),o=n(27),i=n(10)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},function(t,e,n){t.exports=n(184)},function(t,e){t.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},,function(t,e,n){var i=n(47),u=n(38);t.exports=function(o){return function(t,e){var n,t=String(u(t)),e=i(e),r=t.length;return e<0||r<=e?o?"":void 0:(n=t.charCodeAt(e))<55296||56319>>0||(i.test(t)?16:10))}:r},function(t,e,n){function r(t,e,n){var r={},o=u(function(){return!!a[t]()||"​…"!="​…"[t]()}),e=r[t]=o?e(f):a[t];n&&(r[n]=e),i(i.P+i.F*o,"String",r)}var i=n(7),o=n(43),u=n(18),a=n(161),n="["+a+"]",c=RegExp("^"+n+n+"*"),s=RegExp(n+n+"*$"),f=r.trim=function(t,e){return t=String(o(t)),1&e&&(t=t.replace(c,"")),t=2&e?t.replace(s,""):t};t.exports=r},,,,,,,,function(t,e,n){"use strict";function r(){var o,i=jQuery,t=arguments,u=this,r={};this.getItems=function(t,e){var n;return e?(n=(e=e.split(".")).splice(0,1),e.length?t[n]?this.getItems(t[n],e.join(".")):void 0:t[n]):t},this.getSettings=function(t){return this.getItems(o,t)},this.setSettings=function(t,e,n){var r;return n=n||o,"object"===(0,a.default)(t)?(i.extend(n,t),u):(r=(t=t.split(".")).splice(0,1),t.length?(n[r]||(n[r]={}),u.setSettings(t.join("."),e,n[r])):(n[r]=e,u))},this.getErrorMessage=function(t,e){t="forceMethodImplementation"===t?"The method '".concat(e,"' must to be implemented in the inheritor child."):"An error occurs";return t},this.forceMethodImplementation=function(t){throw new Error(this.getErrorMessage("forceMethodImplementation",t))},this.on=function(t,e){return"object"===(0,a.default)(t)?i.each(t,function(t){u.on(t,this)}):t.split(" ").forEach(function(t){r[t]||(r[t]=[]),r[t].push(e)}),u},this.off=function(t,e){return r[t]&&(e?-1!==(e=r[t].indexOf(e))&&delete r[t][e]:delete r[t]),u},this.trigger=function(t){var e="on"+t[0].toUpperCase()+t.slice(1),n=Array.prototype.slice.call(arguments,1),e=(u[e]&&u[e].apply(u,n),r[t]);return e&&i.each(e,function(t,e){e.apply(u,n)}),u},u.__construct.apply(u,t),i.each(u,function(t){var e=u[t];"function"==typeof e&&(u[t]=function(){return e.apply(u,arguments)})}),o=u.getDefaultSettings(),(t=t[0])&&i.extend(!0,o,t),u.trigger("init")}var o=n(0),i=o(n(107)),a=o(n(66));n(76),n(113),n(42);r.prototype.__construct=function(){},r.prototype.getDefaultSettings=function(){return{}},r.prototype.getConstructorID=function(){return this.constructor.name},r.extend=function(t){function e(){return r.apply(this,arguments)}var n=jQuery,r=this;return n.extend(e,r),((e.prototype=(0,i.default)(n.extend({},r.prototype,t))).constructor=e).__super__=r.prototype,e},t.exports=r},function(t,e,n){"use strict";n=n(0)(n(195));t.exports=n.default.extend({elements:null,getDefaultElements:function(){return{}},bindEvents:function(){},onInit:function(){this.initElements(),this.bindEvents()},initElements:function(){this.elements=this.getDefaultElements()}})},,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";var r,o=n(2),i=n(0),u=(o(e,"__esModule",{value:!0}),e.default=void 0,i(n(3))),o=i(n(4)),a=i(n(5)),c=i(n(6)),s=i(n(218)),f=i(n(219)),l=i(n(220)),n=(i=Marionette.LayoutView,(0,a.default)(p,i),r=(0,c.default)(p),(0,o.default)(p,[{key:"el",value:function(){return this.getModal().getElements("widget")}},{key:"regions",value:function(){return{modalHeader:".dialog-header",modalContent:".dialog-lightbox-content",modalLoading:".dialog-lightbox-loading"}}},{key:"initialize",value:function(){this.modalHeader.show(new s.default(this.getHeaderOptions()))}},{key:"getModal",value:function(){return this.modal||this.initModal(),this.modal}},{key:"initModal",value:function(){var t={className:"gmt-templates-modal",closeButton:!1,draggable:!1,hide:{onOutsideClick:!1,onEscKeyPress:!1}};jQuery.extend(!0,t,this.getModalOptions()),this.modal=goomentoCommon.dialogsManager.createWidget("lightbox",t),this.modal.getElements("message").append(this.modal.addElement("content"),this.modal.addElement("loading")),t.draggable&&this.draggableModal()}},{key:"showModal",value:function(){this.getModal().show()}},{key:"hideModal",value:function(){this.getModal().hide()}},{key:"draggableModal",value:function(){var t=this.getModal().getElements("widgetContent");t.draggable({containment:"parent",stop:function(){t.height("")}}),t.css("position","absolute")}},{key:"getModalOptions",value:function(){return{}}},{key:"getLogoOptions",value:function(){return{}}},{key:"getHeaderOptions",value:function(){return{closeType:"normal"}}},{key:"getHeaderView",value:function(){return this.modalHeader.currentView}},{key:"showLoadingView",value:function(){this.modalLoading.show(new l.default),this.modalLoading.$el.show(),this.modalContent.$el.hide()}},{key:"hideLoadingView",value:function(){this.modalContent.$el.show(),this.modalLoading.$el.hide()}},{key:"showLogo",value:function(){this.getHeaderView().logoArea.show(new f.default(this.getLogoOptions()))}}]),p);function p(){return(0,u.default)(this,p),r.apply(this,arguments)}e.default=n},function(t,e,n){"use strict";var r,o=n(2),i=n(0),u=(o(e,"__esModule",{value:!0}),e.default=void 0,i(n(3))),o=i(n(4)),a=i(n(5)),i=i(n(6)),a=(n=Marionette.LayoutView,(0,a.default)(c,n),r=(0,i.default)(c),(0,o.default)(c,[{key:"className",value:function(){return"gmt-templates-modal__header"}},{key:"getTemplate",value:function(){return"#tmpl-gmt-templates-modal__header"}},{key:"regions",value:function(){return{logoArea:".gmt-templates-modal__header__logo-area",tools:"#gmt-template-library-header-tools",menuArea:".gmt-templates-modal__header__menu-area"}}},{key:"ui",value:function(){return{closeModal:".gmt-templates-modal__header__close"}}},{key:"events",value:function(){return{"click @ui.closeModal":"onCloseModalClick"}}},{key:"templateHelpers",value:function(){return{closeType:this.getOption("closeType")}}},{key:"onCloseModalClick",value:function(){this._parent._parent._parent.hideModal()}}]),c);function c(){return(0,u.default)(this,c),r.apply(this,arguments)}e.default=a},function(t,e,n){"use strict";var r,o=n(2),i=n(0),u=(o(e,"__esModule",{value:!0}),e.default=void 0,i(n(3))),o=i(n(4)),a=i(n(5)),i=i(n(6)),a=(n=Marionette.ItemView,(0,a.default)(c,n),r=(0,i.default)(c),(0,o.default)(c,[{key:"getTemplate",value:function(){return"#tmpl-gmt-templates-modal__header__logo"}},{key:"className",value:function(){return"gmt-templates-modal__header__logo"}},{key:"events",value:function(){return{click:"onClick"}}},{key:"templateHelpers",value:function(){return{title:this.getOption("title")}}},{key:"onClick",value:function(){var t=this.getOption("click");t&&t()}}]),c);function c(){return(0,u.default)(this,c),r.apply(this,arguments)}e.default=a},function(t,e,n){"use strict";var r,o=n(2),i=n(0),u=(o(e,"__esModule",{value:!0}),e.default=void 0,i(n(3))),o=i(n(4)),a=i(n(5)),i=i(n(6)),a=(n=Marionette.ItemView,(0,a.default)(c,n),r=(0,i.default)(c),(0,o.default)(c,[{key:"id",value:function(){return"gmt-template-library-loading"}},{key:"getTemplate",value:function(){return"#tmpl-gmt-template-library-loading"}}]),c);function c(){return(0,u.default)(this,c),r.apply(this,arguments)}e.default=a},,,,,,,,,,,,,,,function(t,e,n){"use strict";var r=n(2),o=n(0),r=(r(e,"__esModule",{value:!0}),e.default=void 0,o(n(195))),i=o(n(196)),o=o(n(236)),n=window.goomentoModules={Module:r.default,ViewModule:i.default,utils:{Masonry:o.default}};e.default=n},function(t,e,n){"use strict";var r=n(0),c=r(n(160)),r=r(n(196));t.exports=r.default.extend({getDefaultSettings:function(){return{container:null,items:null,columnsCount:3,verticalSpaceBetween:30}},getDefaultElements:function(){return{$container:jQuery(this.getSettings("container")),$items:jQuery(this.getSettings("items"))}},run:function(){var o=[],i=this.elements.$container.position().top,u=this.getSettings(),a=u.columnsCount;i+=(0,c.default)(this.elements.$container.css("margin-top"),10),this.elements.$items.each(function(t){var e=Math.floor(t/a),n=jQuery(this),r=n[0].getBoundingClientRect().height+u.verticalSpaceBetween;e?(t=n.position().top-i-o[e=t%a],t-=(0,c.default)(n.css("margin-top"),10),n.css("margin-top",(t*=-1)+"px"),o[e]+=r):o.push(r)})}})},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";var r,o=n(2),i=n(0),u=(o(e,"__esModule",{value:!0}),e.default=void 0,i(n(45))),a=(n(76),n(33),i(n(3))),o=i(n(4)),c=i(n(5)),i=i(n(6)),c=(n=goomentoModules.Module,(0,c.default)(s,n),r=(0,i.default)(s),(0,o.default)(s,[{key:"__construct",value:function(){var t=0document.F=Object<\/script>"),t.close(),c=t.F;e--;)delete c.prototype[u[e]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(r.prototype=o(t),n=new r,r.prototype=null,n[a]=t):n=c(),void 0===e?n:i(n,e)}},function(t,e){t.exports=!0},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(20),o=n(112),i=n(104),u=Object.defineProperty;e.f=n(23)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(45),o=n(31),i=n(16),u=n(52),a=n(11),c=n(77),s=Object.getOwnPropertyDescriptor;e.f=n(12)?s:function(t,e){if(t=i(t),e=u(e,!0),c)try{return s(t,e)}catch(t){}if(a(t,e))return o(!r.f.call(t,e),t[e])}},function(t,e,n){var r=n(39).f,o=Function.prototype,i=/^\s*function ([^ (]*)/;"name"in o||n(23)&&r(o,"name",{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(t){return""}}})},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){t.exports={}},function(t,e,n){t.exports=n(171)},function(t,e){e.f={}.propertyIsEnumerable},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(0>>0,f=new RegExp(t.source,a+"g");(r=p.call(f,n))&&!((o=f.lastIndex)>c&&(u.push(n.slice(c,r.index)),1>>0;if(0==a)return[];if(0===r.length)return null===_(u,r)?[r]:[];for(var c=0,s=0,f=[];so;)!u(r,n=e[o++])||~c(i,n)||i.push(n);return i}},function(t,e,n){t.exports=n(133)},function(t,e,n){t.exports=n(136)},function(t,e,n){"use strict";function g(){return this}var m=n(36),x=n(7),b=n(74),_=n(19),w=n(43),S=n(152),O=n(49),M=n(61),k=n(15)("iterator"),j=!([].keys&&"next"in[].keys());t.exports=function(t,e,n,r,o,i,u){S(n,e,r);function a(t){if(!j&&t in p)return p[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}}var c,s,r=e+" Iterator",f="values"==o,l=!1,p=t.prototype,d=p[k]||p["@@iterator"]||o&&p[o],h=d||a(o),v=o?f?a("entries"):h:void 0,y="Array"==e&&p.entries||d;if(y&&(y=M(y.call(new t)))!==Object.prototype&&y.next&&(O(y,r,!0),m||"function"==typeof y[k]||_(y,k,g)),f&&d&&"values"!==d.name&&(l=!0,h=function(){return d.call(this)}),m&&!u||!j&&!l&&p[k]||_(p,k,h),w[e]=h,w[r]=g,o)if(c={values:f?h:a("values"),keys:i?h:a("keys"),entries:v},u)for(s in c)s in p||b(p,s,c[s]);else x(x.P+x.F*(j||l),e,c);return c}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},,,,function(t,e,n){"use strict";var r=n(97),o=RegExp.prototype.exec;t.exports=function(t,e){var n=t.exec;if("function"==typeof n){n=n.call(t,e);if("object"!=typeof n)throw new TypeError("RegExp exec method returned something other than an Object or null");return n}if("RegExp"!==r(t))throw new TypeError("RegExp#exec called on incompatible receiver");return o.call(t,e)}},function(t,e){t.exports=!1},function(t,e,n){"use strict";n(164);var r,c=n(30),s=n(22),f=n(21),l=n(38),p=n(10),d=n(67),h=p("species"),v=!f(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")}),y=(r=(n=/(?:)/).exec,n.exec=function(){return r.apply(this,arguments)},2===(n="ab".split(n)).length&&"a"===n[0]&&"b"===n[1]);t.exports=function(n,t,e){var i,r,o=p(n),u=!f(function(){var t={};return t[o]=function(){return 7},7!=""[n](t)}),a=u?!f(function(){var t=!1,e=/a/;return e.exec=function(){return t=!0,null},"split"===n&&(e.constructor={},e.constructor[h]=function(){return e}),e[o](""),!t}):void 0;u&&a&&("replace"!==n||v)&&("split"!==n||y)||(i=/./[o],e=(a=e(l,o,""[n],function(t,e,n,r,o){return e.exec===d?u&&!o?{done:!0,value:i.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}))[0],r=a[1],c(String.prototype,n,e),s(RegExp.prototype,o,2==t?function(t,e){return r.call(t,this,e)}:function(t){return r.call(t,this)}))}},function(t,e,n){var r=n(24),o=n(17).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e,n){var r=n(27);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(53),o=Math.min;t.exports=function(t){return 0=t.length?{value:void 0,done:!0}:(t=r(t,e),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){"use strict";var r=n(21);t.exports=function(t,e){return!!t&&r(function(){e?t.call(null,function(){},1):t.call(null)})}},function(t,e,n){"use strict";var r=n(20);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){t.exports=!n(23)&&!n(21)(function(){return 7!=Object.defineProperty(n(91)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){"use strict";var r=n(26),o=n(105),c=n(27),s=n(106),f=n(34),l=[].slice;r(r.P+r.F*n(21)(function(){o&&l.call(o)}),"Array",{slice:function(t,e){var n=f(this.length),r=c(this);if(e=void 0===e?n:e,"Array"==r)return l.call(this,t,e);for(var o=s(t,n),t=s(e,n),i=f(t-o),u=new Array(i),a=0;ao;)s(T,e=n[o++])||e==j||e==D||r.push(e);return r}function a(t){for(var e,n=t===C,r=Y(n?P:m(t)),o=[],i=0;r.length>i;)!s(T,e=r[i++])||n&&!s(C,e)||o.push(T[e]);return o}var c=t(8),s=t(11),f=t(12),l=t(7),p=t(74),D=t(101).KEY,d=t(18),h=t(55),v=t(49),$=t(37),y=t(15),V=t(57),H=t(58),B=t(146),G=t(102),g=t(13),Q=t(9),W=t(29),m=t(16),x=t(52),b=t(31),_=t(35),z=t(147),K=t(40),w=t(69),U=t(14),J=t(32),X=K.f,S=U.f,Y=z.f,O=c.Symbol,M=c.JSON,k=M&&M.stringify,j=y("_hidden"),q=y("toPrimitive"),Z={}.propertyIsEnumerable,E=h("symbol-registry"),T=h("symbols"),P=h("op-symbols"),C=Object.prototype,h="function"==typeof O&&!!w.f,R=c.QObject,L=!R||!R.prototype||!R.prototype.findChild,A=f&&d(function(){return 7!=_(S({},"a",{get:function(){return S(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=X(C,e);r&&delete C[e],S(t,e,n),r&&t!==C&&S(C,e,r)}:S,I=h&&"symbol"==typeof O.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof O};h||(p((O=function(){if(this instanceof O)throw TypeError("Symbol is not a constructor!");var e=$(0et;)y(tt[et++]);for(var nt=J(y.store),rt=0;nt.length>rt;)H(nt[rt++]);l(l.S+l.F*!h,"Symbol",{for:function(t){return s(E,t+="")?E[t]:E[t]=O(t)},keyFor:function(t){if(!I(t))throw TypeError(t+" is not a symbol!");for(var e in E)if(E[e]===t)return e},useSetter:function(){L=!0},useSimple:function(){L=!1}}),l(l.S+l.F*!h,"Object",{create:function(t,e){return void 0===e?_(t):n(_(t),e)},defineProperty:u,defineProperties:n,getOwnPropertyDescriptor:o,getOwnPropertyNames:i,getOwnPropertySymbols:a});R=d(function(){w.f(1)});l(l.S+l.F*R,"Object",{getOwnPropertySymbols:function(t){return w.f(W(t))}}),M&&l(l.S+l.F*(!h||d(function(){var t=O();return"[null]"!=k([t])||"{}"!=k({a:t})||"{}"!=k(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],o=1;ou;)i.call(t,r=o[u++])&&e.push(r);return e}},function(t,e,n){var r=n(16),o=n(75).f,i={}.toString,u="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){if(!u||"[object Window]"!=i.call(t))return o(r(t));var e=t;try{return o(e)}catch(e){return u.slice()}}},function(t,e,n){n(58)("asyncIterator")},function(t,e,n){n(58)("observable")},function(t,e,n){n(109),n(117),t.exports=n(57).f("iterator")},function(t,e,n){var i=n(53),u=n(42);t.exports=function(o){return function(t,e){var n,t=String(u(t)),e=i(e),r=t.length;return e<0||r<=e?o?"":void 0:(n=t.charCodeAt(e))<55296||56319=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){t.exports=n(168)},,,function(t,e,n){var r=n(24),o=n(27),i=n(10)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},function(t,e,n){t.exports=n(184)},function(t,e){t.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},,function(t,e,n){var i=n(46),u=n(38);t.exports=function(o){return function(t,e){var n,t=String(u(t)),e=i(e),r=t.length;return e<0||r<=e?o?"":void 0:(n=t.charCodeAt(e))<55296||56319>>0||(i.test(t)?16:10))}:r},function(t,e,n){function r(t,e,n){var r={},o=u(function(){return!!a[t]()||"​…"!="​…"[t]()}),e=r[t]=o?e(f):a[t];n&&(r[n]=e),i(i.P+i.F*o,"String",r)}var i=n(7),o=n(42),u=n(18),a=n(161),n="["+a+"]",c=RegExp("^"+n+n+"*"),s=RegExp(n+n+"*$"),f=r.trim=function(t,e){return t=String(o(t)),1&e&&(t=t.replace(c,"")),t=2&e?t.replace(s,""):t};t.exports=r},,,,,,,,function(t,e,n){"use strict";function r(){var o,i=jQuery,t=arguments,u=this,r={};this.getItems=function(t,e){var n;return e?(n=(e=e.split(".")).splice(0,1),e.length?t[n]?this.getItems(t[n],e.join(".")):void 0:t[n]):t},this.getSettings=function(t){return this.getItems(o,t)},this.setSettings=function(t,e,n){var r;return n=n||o,"object"===(0,a.default)(t)?(i.extend(n,t),u):(r=(t=t.split(".")).splice(0,1),t.length?(n[r]||(n[r]={}),u.setSettings(t.join("."),e,n[r])):(n[r]=e,u))},this.getErrorMessage=function(t,e){t="forceMethodImplementation"===t?"The method '".concat(e,"' must to be implemented in the inheritor child."):"An error occurs";return t},this.forceMethodImplementation=function(t){throw new Error(this.getErrorMessage("forceMethodImplementation",t))},this.on=function(t,e){return"object"===(0,a.default)(t)?i.each(t,function(t){u.on(t,this)}):t.split(" ").forEach(function(t){r[t]||(r[t]=[]),r[t].push(e)}),u},this.off=function(t,e){return r[t]&&(e?-1!==(e=r[t].indexOf(e))&&delete r[t][e]:delete r[t]),u},this.trigger=function(t){var e="on"+t[0].toUpperCase()+t.slice(1),n=Array.prototype.slice.call(arguments,1),e=(u[e]&&u[e].apply(u,n),r[t]);return e&&i.each(e,function(t,e){e.apply(u,n)}),u},u.__construct.apply(u,t),i.each(u,function(t){var e=u[t];"function"==typeof e&&(u[t]=function(){return e.apply(u,arguments)})}),o=u.getDefaultSettings(),(t=t[0])&&i.extend(!0,o,t),u.trigger("init")}var o=n(0),i=o(n(107)),a=o(n(65));n(76),n(113),n(41);r.prototype.__construct=function(){},r.prototype.getDefaultSettings=function(){return{}},r.prototype.getConstructorID=function(){return this.constructor.name},r.extend=function(t){function e(){return r.apply(this,arguments)}var n=jQuery,r=this;return n.extend(e,r),((e.prototype=(0,i.default)(n.extend({},r.prototype,t))).constructor=e).__super__=r.prototype,e},t.exports=r},function(t,e,n){"use strict";n=n(0)(n(195));t.exports=n.default.extend({elements:null,getDefaultElements:function(){return{}},bindEvents:function(){},onInit:function(){this.initElements(),this.bindEvents()},initElements:function(){this.elements=this.getDefaultElements()}})},,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";var r,o=n(2),i=n(0),u=(o(e,"__esModule",{value:!0}),e.default=void 0,i(n(3))),o=i(n(4)),a=i(n(5)),c=i(n(6)),s=i(n(218)),f=i(n(219)),l=i(n(220)),n=(i=Marionette.LayoutView,(0,a.default)(p,i),r=(0,c.default)(p),(0,o.default)(p,[{key:"el",value:function(){return this.getModal().getElements("widget")}},{key:"regions",value:function(){return{modalHeader:".dialog-header",modalContent:".dialog-lightbox-content",modalLoading:".dialog-lightbox-loading"}}},{key:"initialize",value:function(){this.modalHeader.show(new s.default(this.getHeaderOptions()))}},{key:"getModal",value:function(){return this.modal||this.initModal(),this.modal}},{key:"initModal",value:function(){var t={className:"gmt-templates-modal",closeButton:!1,draggable:!1,hide:{onOutsideClick:!1,onEscKeyPress:!1}};jQuery.extend(!0,t,this.getModalOptions()),this.modal=goomentoCommon.dialogsManager.createWidget("lightbox",t),this.modal.getElements("message").append(this.modal.addElement("content"),this.modal.addElement("loading")),t.draggable&&this.draggableModal()}},{key:"showModal",value:function(){this.getModal().show()}},{key:"hideModal",value:function(){this.getModal().hide()}},{key:"draggableModal",value:function(){var t=this.getModal().getElements("widgetContent");t.draggable({containment:"parent",stop:function(){t.height("")}}),t.css("position","absolute")}},{key:"getModalOptions",value:function(){return{}}},{key:"getLogoOptions",value:function(){return{}}},{key:"getHeaderOptions",value:function(){return{closeType:"normal"}}},{key:"getHeaderView",value:function(){return this.modalHeader.currentView}},{key:"showLoadingView",value:function(){this.modalLoading.show(new l.default),this.modalLoading.$el.show(),this.modalContent.$el.hide()}},{key:"hideLoadingView",value:function(){this.modalContent.$el.show(),this.modalLoading.$el.hide()}},{key:"showLogo",value:function(){this.getHeaderView().logoArea.show(new f.default(this.getLogoOptions()))}}]),p);function p(){return(0,u.default)(this,p),r.apply(this,arguments)}e.default=n},function(t,e,n){"use strict";var r,o=n(2),i=n(0),u=(o(e,"__esModule",{value:!0}),e.default=void 0,i(n(3))),o=i(n(4)),a=i(n(5)),i=i(n(6)),a=(n=Marionette.LayoutView,(0,a.default)(c,n),r=(0,i.default)(c),(0,o.default)(c,[{key:"className",value:function(){return"gmt-templates-modal__header"}},{key:"getTemplate",value:function(){return"#tmpl-gmt-templates-modal__header"}},{key:"regions",value:function(){return{logoArea:".gmt-templates-modal__header__logo-area",tools:"#gmt-template-library-header-tools",menuArea:".gmt-templates-modal__header__menu-area"}}},{key:"ui",value:function(){return{closeModal:".gmt-templates-modal__header__close"}}},{key:"events",value:function(){return{"click @ui.closeModal":"onCloseModalClick"}}},{key:"templateHelpers",value:function(){return{closeType:this.getOption("closeType")}}},{key:"onCloseModalClick",value:function(){this._parent._parent._parent.hideModal()}}]),c);function c(){return(0,u.default)(this,c),r.apply(this,arguments)}e.default=a},function(t,e,n){"use strict";var r,o=n(2),i=n(0),u=(o(e,"__esModule",{value:!0}),e.default=void 0,i(n(3))),o=i(n(4)),a=i(n(5)),i=i(n(6)),a=(n=Marionette.ItemView,(0,a.default)(c,n),r=(0,i.default)(c),(0,o.default)(c,[{key:"getTemplate",value:function(){return"#tmpl-gmt-templates-modal__header__logo"}},{key:"className",value:function(){return"gmt-templates-modal__header__logo"}},{key:"events",value:function(){return{click:"onClick"}}},{key:"templateHelpers",value:function(){return{title:this.getOption("title")}}},{key:"onClick",value:function(){var t=this.getOption("click");t&&t()}}]),c);function c(){return(0,u.default)(this,c),r.apply(this,arguments)}e.default=a},function(t,e,n){"use strict";var r,o=n(2),i=n(0),u=(o(e,"__esModule",{value:!0}),e.default=void 0,i(n(3))),o=i(n(4)),a=i(n(5)),i=i(n(6)),a=(n=Marionette.ItemView,(0,a.default)(c,n),r=(0,i.default)(c),(0,o.default)(c,[{key:"id",value:function(){return"gmt-template-library-loading"}},{key:"getTemplate",value:function(){return"#tmpl-gmt-template-library-loading"}}]),c);function c(){return(0,u.default)(this,c),r.apply(this,arguments)}e.default=a},,,,,,,,,,,,,,,function(t,e,n){"use strict";var r=n(2),o=n(0),r=(r(e,"__esModule",{value:!0}),e.default=void 0,o(n(195))),i=o(n(196)),o=o(n(236)),n=window.goomentoModules={Module:r.default,ViewModule:i.default,utils:{Masonry:o.default}};e.default=n},function(t,e,n){"use strict";var r=n(0),c=r(n(160)),r=r(n(196));t.exports=r.default.extend({getDefaultSettings:function(){return{container:null,items:null,columnsCount:3,verticalSpaceBetween:30}},getDefaultElements:function(){return{$container:jQuery(this.getSettings("container")),$items:jQuery(this.getSettings("items"))}},run:function(){var o=[],i=this.elements.$container.position().top,u=this.getSettings(),a=u.columnsCount;i+=(0,c.default)(this.elements.$container.css("margin-top"),10),this.elements.$items.each(function(t){var e=Math.floor(t/a),n=jQuery(this),r=n[0].getBoundingClientRect().height+u.verticalSpaceBetween;e?(t=n.position().top-i-o[e=t%a],t-=(0,c.default)(n.css("margin-top"),10),n.css("margin-top",(t*=-1)+"px"),o[e]+=r):o.push(r)})}})},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";var r,o=n(2),i=n(0),u=(o(e,"__esModule",{value:!0}),e.default=void 0,i(n(44))),a=(n(76),n(33),i(n(3))),o=i(n(4)),c=i(n(5)),i=i(n(6)),c=(n=goomentoModules.Module,(0,c.default)(s,n),r=(0,i.default)(s),(0,o.default)(s,[{key:"__construct",value:function(){var t=0document.F=Object<\/script>"),t.close(),a=t.F;e--;)delete a.prototype[i[e]];return a()};t.exports=Object.create||function(t,e){var n;return null!==t?(r.prototype=o(t),n=new r,r.prototype=null,n[c]=t):n=a(),void 0===e?n:u(n,e)}},function(t,e){t.exports=!0},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(20),o=n(112),u=n(104),i=Object.defineProperty;e.f=n(23)?Object.defineProperty:function(t,e,n){if(r(t),e=u(e,!0),r(n),o)try{return i(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(46),o=n(31),u=n(16),i=n(53),c=n(11),a=n(77),s=Object.getOwnPropertyDescriptor;e.f=n(12)?s:function(t,e){if(t=u(t),e=i(e,!0),a)try{return s(t,e)}catch(t){}if(c(t,e))return o(!r.f.call(t,e),t[e])}},function(t,e,n){"use strict";var S=n(20),w=n(70),O=n(34),j=n(47),k=n(96),M=n(88),C=Math.max,A=Math.min,P=Math.floor,E=/\$([$&`']|\d\d?|<[^>]*>)/g,T=/\$([$&`']|\d\d?)/g;n(90)("replace",2,function(o,u,b,_){return[function(t,e){var n=o(this),r=null==t?void 0:t[u];return void 0!==r?r.call(t,n,e):b.call(String(n),t,e)},function(t,e){var n=_(b,t,this,e);if(n.done)return n.value;var r,o=S(t),u=String(this),i="function"==typeof e,c=(i||(e=String(e)),o.global);c&&(r=o.unicode,o.lastIndex=0);for(var a=[];;){var s=M(o,u);if(null===s)break;if(a.push(s),!c)break;""===String(s[0])&&(o.lastIndex=k(u,O(o.lastIndex),r))}for(var f,l="",p=0,d=0;d>>0,f=new RegExp(t.source,c+"g");(r=p.call(f,n))&&!((o=f.lastIndex)>a&&(i.push(n.slice(a,r.index)),1>>0;if(0==c)return[];if(0===r.length)return null===_(i,r)?[r]:[];for(var a=0,s=0,f=[];so;)!i(r,n=e[o++])||~a(u,n)||u.push(n);return u}},function(t,e,n){t.exports=n(133)},function(t,e,n){t.exports=n(136)},function(t,e,n){"use strict";function g(){return this}var x=n(36),m=n(7),b=n(74),_=n(19),S=n(44),w=n(152),O=n(51),j=n(62),k=n(15)("iterator"),M=!([].keys&&"next"in[].keys());t.exports=function(t,e,n,r,o,u,i){w(n,e,r);function c(t){if(!M&&t in p)return p[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}}var a,s,r=e+" Iterator",f="values"==o,l=!1,p=t.prototype,d=p[k]||p["@@iterator"]||o&&p[o],v=d||c(o),h=o?f?c("entries"):v:void 0,y="Array"==e&&p.entries||d;if(y&&(y=j(y.call(new t)))!==Object.prototype&&y.next&&(O(y,r,!0),x||"function"==typeof y[k]||_(y,k,g)),f&&d&&"values"!==d.name&&(l=!0,v=function(){return d.call(this)}),x&&!i||!M&&!l&&p[k]||_(p,k,v),S[e]=v,S[r]=g,o)if(a={values:f?v:c("values"),keys:u?v:c("keys"),entries:h},i)for(s in a)s in p||b(p,s,a[s]);else m(m.P+m.F*(M||l),e,a);return a}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){"use strict";var r=n(99),o=n(178),u=n(94),i=n(86);t.exports=n(179)(Array,"Array",function(t,e){this._t=i(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),u.Arguments=u.Array,r("keys"),r("values"),r("entries")},function(t,e,n){var r=n(92),o=n(38);t.exports=function(t){return r(o(t))}},,function(t,e,n){"use strict";var r=n(97),o=RegExp.prototype.exec;t.exports=function(t,e){var n=t.exec;if("function"==typeof n){n=n.call(t,e);if("object"!=typeof n)throw new TypeError("RegExp exec method returned something other than an Object or null");return n}if("RegExp"!==r(t))throw new TypeError("RegExp#exec called on incompatible receiver");return o.call(t,e)}},function(t,e){t.exports=!1},function(t,e,n){"use strict";n(164);var r,a=n(30),s=n(22),f=n(21),l=n(38),p=n(10),d=n(67),v=p("species"),h=!f(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")}),y=(r=(n=/(?:)/).exec,n.exec=function(){return r.apply(this,arguments)},2===(n="ab".split(n)).length&&"a"===n[0]&&"b"===n[1]);t.exports=function(n,t,e){var u,r,o=p(n),i=!f(function(){var t={};return t[o]=function(){return 7},7!=""[n](t)}),c=i?!f(function(){var t=!1,e=/a/;return e.exec=function(){return t=!0,null},"split"===n&&(e.constructor={},e.constructor[v]=function(){return e}),e[o](""),!t}):void 0;i&&c&&("replace"!==n||h)&&("split"!==n||y)||(u=/./[o],e=(c=e(l,o,""[n],function(t,e,n,r,o){return e.exec===d?i&&!o?{done:!0,value:u.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}))[0],r=c[1],a(String.prototype,n,e),s(RegExp.prototype,o,2==t?function(t,e){return r.call(t,this,e)}:function(t){return r.call(t,this)}))}},function(t,e,n){var r=n(25),o=n(17).document,u=r(o)&&r(o.createElement);t.exports=function(t){return u?o.createElement(t):{}}},function(t,e,n){var r=n(27);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(54),o=Math.min;t.exports=function(t){return 0=t.length?{value:void 0,done:!0}:(t=r(t,e),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){"use strict";var r=n(21);t.exports=function(t,e){return!!t&&r(function(){e?t.call(null,function(){},1):t.call(null)})}},function(t,e,n){"use strict";var r=n(20);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){t.exports=!n(23)&&!n(21)(function(){return 7!=Object.defineProperty(n(91)("div"),"a",{get:function(){return 7}}).a})},,function(t,e,n){var i=n(14),c=n(13),a=n(32);t.exports=n(12)?Object.defineProperties:function(t,e){c(t);for(var n,r=a(e),o=r.length,u=0;uo;)s(A,e=n[o++])||e==M||e==D||r.push(e);return r}function c(t){for(var e,n=t===E,r=Y(n?P:x(t)),o=[],u=0;r.length>u;)!s(A,e=r[u++])||n&&!s(E,e)||o.push(A[e]);return o}var a=t(8),s=t(11),f=t(12),l=t(7),p=t(74),D=t(101).KEY,d=t(18),v=t(56),h=t(51),q=t(37),y=t(15),$=t(58),Q=t(59),B=t(146),G=t(102),g=t(13),V=t(9),K=t(29),x=t(16),m=t(53),b=t(31),_=t(35),H=t(147),W=t(40),S=t(69),z=t(14),J=t(32),U=W.f,w=z.f,Y=H.f,O=a.Symbol,j=a.JSON,k=j&&j.stringify,M=y("_hidden"),X=y("toPrimitive"),Z={}.propertyIsEnumerable,C=v("symbol-registry"),A=v("symbols"),P=v("op-symbols"),E=Object.prototype,v="function"==typeof O&&!!S.f,T=a.QObject,L=!T||!T.prototype||!T.prototype.findChild,R=f&&d(function(){return 7!=_(w({},"a",{get:function(){return w(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=U(E,e);r&&delete E[e],w(t,e,n),r&&t!==E&&w(E,e,r)}:w,I=v&&"symbol"==typeof O.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof O};v||(p((O=function(){if(this instanceof O)throw TypeError("Symbol is not a constructor!");var e=q(0et;)y(tt[et++]);for(var nt=J(y.store),rt=0;nt.length>rt;)Q(nt[rt++]);l(l.S+l.F*!v,"Symbol",{for:function(t){return s(C,t+="")?C[t]:C[t]=O(t)},keyFor:function(t){if(!I(t))throw TypeError(t+" is not a symbol!");for(var e in C)if(C[e]===t)return e},useSetter:function(){L=!0},useSimple:function(){L=!1}}),l(l.S+l.F*!v,"Object",{create:function(t,e){return void 0===e?_(t):n(_(t),e)},defineProperty:i,defineProperties:n,getOwnPropertyDescriptor:o,getOwnPropertyNames:u,getOwnPropertySymbols:c});T=d(function(){S.f(1)});l(l.S+l.F*T,"Object",{getOwnPropertySymbols:function(t){return S.f(K(t))}}),j&&l(l.S+l.F*(!v||d(function(){var t=O();return"[null]"!=k([t])||"{}"!=k({a:t})||"{}"!=k(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],o=1;oi;)u.call(t,r=o[i++])&&e.push(r);return e}},function(t,e,n){var r=n(16),o=n(75).f,u={}.toString,i="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){if(!i||"[object Window]"!=u.call(t))return o(r(t));var e=t;try{return o(e)}catch(e){return i.slice()}}},function(t,e,n){n(59)("asyncIterator")},function(t,e,n){n(59)("observable")},function(t,e,n){n(109),n(117),t.exports=n(58).f("iterator")},function(t,e,n){var u=n(54),i=n(43);t.exports=function(o){return function(t,e){var n,t=String(i(t)),e=u(e),r=t.length;return e<0||r<=e?o?"":void 0:(n=t.charCodeAt(e))<55296||56319=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),u.Arguments=u.Array,r("keys"),r("values"),r("entries")},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){t.exports=n(168)},function(t,e,n){var r=n(175),o=n(118);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e,n){var r=n(39).f,o=n(48),u=n(10)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,u)&&r(t,u,{configurable:!0,value:e})}},function(t,e,n){var r=n(25),o=n(27),u=n(10)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[u])?!!e:"RegExp"==o(t))}},,,function(t,e,n){t.exports=n(191)},function(t,e,n){var u=n(47),i=n(38);t.exports=function(o){return function(t,e){var n,t=String(i(t)),e=u(e),r=t.length;return e<0||r<=e?o?"":void 0:(n=t.charCodeAt(e))<55296||56319document.F=Object<\/script>"),t.close(),a=t.F;e--;)delete a.prototype[i[e]];return a()};t.exports=Object.create||function(t,e){var n;return null!==t?(r.prototype=o(t),n=new r,r.prototype=null,n[c]=t):n=a(),void 0===e?n:u(n,e)}},function(t,e,n){var i=n(48),c=n(86),a=n(176)(!1),s=n(95)("IE_PROTO");t.exports=function(t,e){var n,r=c(t),o=0,u=[];for(n in r)n!=s&&i(r,n)&&u.push(n);for(;e.length>o;)!i(r,n=e[o++])||~a(u,n)||u.push(n);return u}},function(t,e,n){var a=n(86),s=n(34),f=n(106);t.exports=function(c){return function(t,e,n){var r,o=a(t),u=s(o.length),i=f(n,u);if(c&&e!=e){for(;it.length)&&(e=t.length);for(var n=0,r=new Array(e);n/g,interpolate:/{{{([\s\S]+?)}}}/g,escape:/{{([^}]+?)}}(?!})/g})}}},{key:"getDefaultElements",value:function(){return{$window:jQuery(window),$document:jQuery(document),$body:jQuery(document.body)}}},{key:"initComponents",value:function(){this.helpers=new l.default,this.storage=new p.default,window.$e={components:new h.default,commands:new y.default,routes:new g.default,shortcuts:new x.default(jQuery(window)),bc:new m.default,run:function(){for(var t=arguments.length,e=new Array(t),n=0;ndocument.F=Object<\/script>"),t.close(),a=t.F;e--;)delete a.prototype[i[e]];return a()};t.exports=Object.create||function(t,e){var n;return null!==t?(r.prototype=o(t),n=new r,r.prototype=null,n[c]=t):n=a(),void 0===e?n:u(n,e)}},function(t,e){t.exports=!0},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(20),o=n(112),u=n(104),i=Object.defineProperty;e.f=n(23)?Object.defineProperty:function(t,e,n){if(r(t),e=u(e,!0),r(n),o)try{return i(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(45),o=n(31),u=n(16),i=n(52),c=n(11),a=n(77),s=Object.getOwnPropertyDescriptor;e.f=n(12)?s:function(t,e){if(t=u(t),e=i(e,!0),a)try{return s(t,e)}catch(t){}if(c(t,e))return o(!r.f.call(t,e),t[e])}},,function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){t.exports={}},function(t,e,n){t.exports=n(171)},function(t,e){e.f={}.propertyIsEnumerable},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(0]*>)/g,T=/\$([$&`']|\d\d?)/g;n(90)("replace",2,function(o,u,b,_){return[function(t,e){var n=o(this),r=null==t?void 0:t[u];return void 0!==r?r.call(t,n,e):b.call(String(n),t,e)},function(t,e){var n=_(b,t,this,e);if(n.done)return n.value;var r,o=S(t),u=String(this),i="function"==typeof e,c=(i||(e=String(e)),o.global);c&&(r=o.unicode,o.lastIndex=0);for(var a=[];;){var s=M(o,u);if(null===s)break;if(a.push(s),!c)break;""===String(s[0])&&(o.lastIndex=k(u,O(o.lastIndex),r))}for(var f,l="",p=0,d=0;d>>0,f=new RegExp(t.source,c+"g");(r=p.call(f,n))&&!((o=f.lastIndex)>a&&(i.push(n.slice(a,r.index)),1>>0;if(0==c)return[];if(0===r.length)return null===_(i,r)?[r]:[];for(var a=0,s=0,f=[];so;)!i(r,n=e[o++])||~a(u,n)||u.push(n);return u}},function(t,e,n){t.exports=n(133)},function(t,e,n){t.exports=n(136)},function(t,e,n){"use strict";function g(){return this}var x=n(36),m=n(7),b=n(74),_=n(19),S=n(43),w=n(152),O=n(49),j=n(61),k=n(15)("iterator"),M=!([].keys&&"next"in[].keys());t.exports=function(t,e,n,r,o,u,i){w(n,e,r);function c(t){if(!M&&t in p)return p[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}}var a,s,r=e+" Iterator",f="values"==o,l=!1,p=t.prototype,d=p[k]||p["@@iterator"]||o&&p[o],v=d||c(o),h=o?f?c("entries"):v:void 0,y="Array"==e&&p.entries||d;if(y&&(y=j(y.call(new t)))!==Object.prototype&&y.next&&(O(y,r,!0),x||"function"==typeof y[k]||_(y,k,g)),f&&d&&"values"!==d.name&&(l=!0,v=function(){return d.call(this)}),x&&!i||!M&&!l&&p[k]||_(p,k,v),S[e]=v,S[r]=g,o)if(a={values:f?v:c("values"),keys:u?v:c("keys"),entries:h},i)for(s in a)s in p||b(p,s,a[s]);else m(m.P+m.F*(M||l),e,a);return a}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){"use strict";var r=n(99),o=n(178),u=n(94),i=n(86);t.exports=n(179)(Array,"Array",function(t,e){this._t=i(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),u.Arguments=u.Array,r("keys"),r("values"),r("entries")},function(t,e,n){var r=n(92),o=n(38);t.exports=function(t){return r(o(t))}},,function(t,e,n){"use strict";var r=n(97),o=RegExp.prototype.exec;t.exports=function(t,e){var n=t.exec;if("function"==typeof n){n=n.call(t,e);if("object"!=typeof n)throw new TypeError("RegExp exec method returned something other than an Object or null");return n}if("RegExp"!==r(t))throw new TypeError("RegExp#exec called on incompatible receiver");return o.call(t,e)}},function(t,e){t.exports=!1},function(t,e,n){"use strict";n(164);var r,a=n(30),s=n(22),f=n(21),l=n(38),p=n(10),d=n(67),v=p("species"),h=!f(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")}),y=(r=(n=/(?:)/).exec,n.exec=function(){return r.apply(this,arguments)},2===(n="ab".split(n)).length&&"a"===n[0]&&"b"===n[1]);t.exports=function(n,t,e){var u,r,o=p(n),i=!f(function(){var t={};return t[o]=function(){return 7},7!=""[n](t)}),c=i?!f(function(){var t=!1,e=/a/;return e.exec=function(){return t=!0,null},"split"===n&&(e.constructor={},e.constructor[v]=function(){return e}),e[o](""),!t}):void 0;i&&c&&("replace"!==n||h)&&("split"!==n||y)||(u=/./[o],e=(c=e(l,o,""[n],function(t,e,n,r,o){return e.exec===d?i&&!o?{done:!0,value:u.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}))[0],r=c[1],a(String.prototype,n,e),s(RegExp.prototype,o,2==t?function(t,e){return r.call(t,this,e)}:function(t){return r.call(t,this)}))}},function(t,e,n){var r=n(24),o=n(17).document,u=r(o)&&r(o.createElement);t.exports=function(t){return u?o.createElement(t):{}}},function(t,e,n){var r=n(27);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(53),o=Math.min;t.exports=function(t){return 0=t.length?{value:void 0,done:!0}:(t=r(t,e),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){"use strict";var r=n(21);t.exports=function(t,e){return!!t&&r(function(){e?t.call(null,function(){},1):t.call(null)})}},function(t,e,n){"use strict";var r=n(20);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){t.exports=!n(23)&&!n(21)(function(){return 7!=Object.defineProperty(n(91)("div"),"a",{get:function(){return 7}}).a})},,function(t,e,n){var i=n(14),c=n(13),a=n(32);t.exports=n(12)?Object.defineProperties:function(t,e){c(t);for(var n,r=a(e),o=r.length,u=0;uo;)s(A,e=n[o++])||e==M||e==D||r.push(e);return r}function c(t){for(var e,n=t===E,r=Y(n?P:x(t)),o=[],u=0;r.length>u;)!s(A,e=r[u++])||n&&!s(E,e)||o.push(A[e]);return o}var a=t(8),s=t(11),f=t(12),l=t(7),p=t(74),D=t(101).KEY,d=t(18),v=t(55),h=t(49),q=t(37),y=t(15),$=t(57),Q=t(58),B=t(146),G=t(102),g=t(13),V=t(9),K=t(29),x=t(16),m=t(52),b=t(31),_=t(35),H=t(147),W=t(40),S=t(69),z=t(14),J=t(32),U=W.f,w=z.f,Y=H.f,O=a.Symbol,j=a.JSON,k=j&&j.stringify,M=y("_hidden"),X=y("toPrimitive"),Z={}.propertyIsEnumerable,C=v("symbol-registry"),A=v("symbols"),P=v("op-symbols"),E=Object.prototype,v="function"==typeof O&&!!S.f,T=a.QObject,L=!T||!T.prototype||!T.prototype.findChild,R=f&&d(function(){return 7!=_(w({},"a",{get:function(){return w(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=U(E,e);r&&delete E[e],w(t,e,n),r&&t!==E&&w(E,e,r)}:w,I=v&&"symbol"==typeof O.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof O};v||(p((O=function(){if(this instanceof O)throw TypeError("Symbol is not a constructor!");var e=q(0et;)y(tt[et++]);for(var nt=J(y.store),rt=0;nt.length>rt;)Q(nt[rt++]);l(l.S+l.F*!v,"Symbol",{for:function(t){return s(C,t+="")?C[t]:C[t]=O(t)},keyFor:function(t){if(!I(t))throw TypeError(t+" is not a symbol!");for(var e in C)if(C[e]===t)return e},useSetter:function(){L=!0},useSimple:function(){L=!1}}),l(l.S+l.F*!v,"Object",{create:function(t,e){return void 0===e?_(t):n(_(t),e)},defineProperty:i,defineProperties:n,getOwnPropertyDescriptor:o,getOwnPropertyNames:u,getOwnPropertySymbols:c});T=d(function(){S.f(1)});l(l.S+l.F*T,"Object",{getOwnPropertySymbols:function(t){return S.f(K(t))}}),j&&l(l.S+l.F*(!v||d(function(){var t=O();return"[null]"!=k([t])||"{}"!=k({a:t})||"{}"!=k(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],o=1;oi;)u.call(t,r=o[i++])&&e.push(r);return e}},function(t,e,n){var r=n(16),o=n(75).f,u={}.toString,i="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){if(!i||"[object Window]"!=u.call(t))return o(r(t));var e=t;try{return o(e)}catch(e){return i.slice()}}},function(t,e,n){n(58)("asyncIterator")},function(t,e,n){n(58)("observable")},function(t,e,n){n(109),n(117),t.exports=n(57).f("iterator")},function(t,e,n){var u=n(53),i=n(42);t.exports=function(o){return function(t,e){var n,t=String(i(t)),e=u(e),r=t.length;return e<0||r<=e?o?"":void 0:(n=t.charCodeAt(e))<55296||56319=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),u.Arguments=u.Array,r("keys"),r("values"),r("entries")},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){t.exports=n(168)},function(t,e,n){var r=n(175),o=n(118);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e,n){var r=n(39).f,o=n(47),u=n(10)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,u)&&r(t,u,{configurable:!0,value:e})}},function(t,e,n){var r=n(24),o=n(27),u=n(10)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[u])?!!e:"RegExp"==o(t))}},,,function(t,e,n){t.exports=n(191)},function(t,e,n){var u=n(46),i=n(38);t.exports=function(o){return function(t,e){var n,t=String(i(t)),e=u(e),r=t.length;return e<0||r<=e?o?"":void 0:(n=t.charCodeAt(e))<55296||56319document.F=Object<\/script>"),t.close(),a=t.F;e--;)delete a.prototype[i[e]];return a()};t.exports=Object.create||function(t,e){var n;return null!==t?(r.prototype=o(t),n=new r,r.prototype=null,n[c]=t):n=a(),void 0===e?n:u(n,e)}},function(t,e,n){var i=n(47),c=n(86),a=n(176)(!1),s=n(95)("IE_PROTO");t.exports=function(t,e){var n,r=c(t),o=0,u=[];for(n in r)n!=s&&i(r,n)&&u.push(n);for(;e.length>o;)!i(r,n=e[o++])||~a(u,n)||u.push(n);return u}},function(t,e,n){var a=n(86),s=n(34),f=n(106);t.exports=function(c){return function(t,e,n){var r,o=a(t),u=s(o.length),i=f(n,u);if(c&&e!=e){for(;it.length)&&(e=t.length);for(var n=0,r=new Array(e);n/g,interpolate:/{{{([\s\S]+?)}}}/g,escape:/{{([^}]+?)}}(?!})/g})}}},{key:"getDefaultElements",value:function(){return{$window:jQuery(window),$document:jQuery(document),$body:jQuery(document.body)}}},{key:"initComponents",value:function(){this.helpers=new l.default,this.storage=new p.default,window.$e={components:new h.default,commands:new y.default,routes:new g.default,shortcuts:new x.default(jQuery(window)),bc:new m.default,run:function(){for(var t=arguments.length,e=new Array(t),n=0;ndocument.F=Object<\/script>"),t.close(),s=t.F;e--;)delete s.prototype[u[e]];return s()};t.exports=Object.create||function(t,e){var n;return null!==t?(o.prototype=r(t),n=new o,o.prototype=null,n[c]=t):n=s(),void 0===e?n:i(n,e)}},function(t,e){t.exports=!0},function(t,e){var n=0,o=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+o).toString(36))}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var o=n(20),r=n(112),i=n(104),u=Object.defineProperty;e.f=n(23)?Object.defineProperty:function(t,e,n){if(o(t),e=i(e,!0),o(n),r)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var o=n(46),r=n(31),i=n(16),u=n(53),c=n(11),s=n(77),a=Object.getOwnPropertyDescriptor;e.f=n(12)?a:function(t,e){if(t=i(t),e=u(e,!0),s)try{return a(t,e)}catch(t){}if(c(t,e))return r(!o.f.call(t,e),t[e])}},,function(t,e,n){var o=n(39).f,r=Function.prototype,i=/^\s*function ([^ (]*)/;"name"in r||n(23)&&o(r,"name",{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(t){return""}}})},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){t.exports={}},,function(t,e){e.f={}.propertyIsEnumerable},function(t,e){var n=Math.ceil,o=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(0r;)!u(o,n=e[r++])||~s(i,n)||i.push(n);return i}},function(t,e,n){t.exports=n(133)},function(t,e,n){t.exports=n(136)},function(t,e,n){"use strict";function g(){return this}var m=n(36),b=n(7),x=n(74),_=n(19),S=n(44),w=n(152),O=n(51),C=n(62),j=n(15)("iterator"),M=!([].keys&&"next"in[].keys());t.exports=function(t,e,n,o,r,i,u){w(n,e,o);function c(t){if(!M&&t in p)return p[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}}var s,a,o=e+" Iterator",f="values"==r,l=!1,p=t.prototype,d=p[j]||p["@@iterator"]||r&&p[r],v=d||c(r),y=r?f?c("entries"):v:void 0,h="Array"==e&&p.entries||d;if(h&&(h=C(h.call(new t)))!==Object.prototype&&h.next&&(O(h,o,!0),m||"function"==typeof h[j]||_(h,j,g)),f&&d&&"values"!==d.name&&(l=!0,v=function(){return d.call(this)}),m&&!u||!M&&!l&&p[j]||_(p,j,v),S[e]=v,S[o]=g,r)if(s={values:f?v:c("values"),keys:i?v:c("keys"),entries:y},u)for(a in s)a in p||x(p,a,s[a]);else b(b.P+b.F*(M||l),e,s);return s}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){"use strict";var o=n(99),r=n(178),i=n(94),u=n(86);t.exports=n(179)(Array,"Array",function(t,e){this._t=u(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,r(1)):r(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(t,e,n){var o=n(92),r=n(38);t.exports=function(t){return o(r(t))}},,,function(t,e){t.exports=!1},,function(t,e,n){var o=n(25),r=n(17).document,i=o(r)&&o(r.createElement);t.exports=function(t){return i?r.createElement(t):{}}},function(t,e,n){var o=n(27);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==o(t)?t.split(""):Object(t)}},function(t,e,n){var o=n(54),r=Math.min;t.exports=function(t){return 0=t.length?{value:void 0,done:!0}:(t=o(t,e),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){"use strict";var o=n(21);t.exports=function(t,e){return!!t&&o(function(){e?t.call(null,function(){},1):t.call(null)})}},,function(t,e,n){t.exports=!n(23)&&!n(21)(function(){return 7!=Object.defineProperty(n(91)("div"),"a",{get:function(){return 7}}).a})},,function(t,e,n){var u=n(14),c=n(13),s=n(32);t.exports=n(12)?Object.defineProperties:function(t,e){c(t);for(var n,o=s(e),r=o.length,i=0;ir;)a(T,e=n[r++])||e==M||e==N||o.push(e);return o}function c(t){for(var e,n=t===E,o=Y(n?k:m(t)),r=[],i=0;o.length>i;)!a(T,e=o[i++])||n&&!a(E,e)||r.push(T[e]);return r}var s=t(8),a=t(11),f=t(12),l=t(7),p=t(74),N=t(101).KEY,d=t(18),v=t(56),y=t(51),V=t(37),h=t(15),B=t(58),G=t(59),$=t(146),H=t(102),g=t(13),W=t(9),q=t(29),m=t(16),b=t(53),x=t(31),_=t(35),z=t(147),Q=t(40),S=t(69),J=t(14),U=t(32),K=Q.f,w=J.f,Y=z.f,O=s.Symbol,C=s.JSON,j=C&&C.stringify,M=h("_hidden"),X=h("toPrimitive"),Z={}.propertyIsEnumerable,P=v("symbol-registry"),T=v("symbols"),k=v("op-symbols"),E=Object.prototype,v="function"==typeof O&&!!S.f,L=s.QObject,A=!L||!L.prototype||!L.prototype.findChild,F=f&&d(function(){return 7!=_(w({},"a",{get:function(){return w(this,"a",{value:7}).a}})).a})?function(t,e,n){var o=K(E,e);o&&delete E[e],w(t,e,n),o&&t!==E&&w(E,e,o)}:w,R=v&&"symbol"==typeof O.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof O};v||(p((O=function(){if(this instanceof O)throw TypeError("Symbol is not a constructor!");var e=V(0et;)h(tt[et++]);for(var nt=U(h.store),ot=0;nt.length>ot;)G(nt[ot++]);l(l.S+l.F*!v,"Symbol",{for:function(t){return a(P,t+="")?P[t]:P[t]=O(t)},keyFor:function(t){if(!R(t))throw TypeError(t+" is not a symbol!");for(var e in P)if(P[e]===t)return e},useSetter:function(){A=!0},useSimple:function(){A=!1}}),l(l.S+l.F*!v,"Object",{create:function(t,e){return void 0===e?_(t):n(_(t),e)},defineProperty:u,defineProperties:n,getOwnPropertyDescriptor:r,getOwnPropertyNames:i,getOwnPropertySymbols:c});L=d(function(){S.f(1)});l(l.S+l.F*L,"Object",{getOwnPropertySymbols:function(t){return S.f(q(t))}}),C&&l(l.S+l.F*(!v||d(function(){var t=O();return"[null]"!=j([t])||"{}"!=j({a:t})||"{}"!=j(Object(t))})),"JSON",{stringify:function(t){for(var e,n,o=[t],r=1;ru;)i.call(t,o=r[u++])&&e.push(o);return e}},function(t,e,n){var o=n(16),r=n(75).f,i={}.toString,u="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){if(!u||"[object Window]"!=i.call(t))return r(o(t));var e=t;try{return r(e)}catch(e){return u.slice()}}},function(t,e,n){n(59)("asyncIterator")},function(t,e,n){n(59)("observable")},function(t,e,n){n(109),n(117),t.exports=n(58).f("iterator")},function(t,e,n){var i=n(54),u=n(43);t.exports=function(r){return function(t,e){var n,t=String(u(t)),e=i(e),o=t.length;return e<0||o<=e?r?"":void 0:(n=t.charCodeAt(e))<55296||56319=t.length?(this._t=void 0,r(1)):r(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},,function(t,e,n){var o=n(175),r=n(118);t.exports=Object.keys||function(t){return o(t,r)}},function(t,e,n){var o=n(39).f,r=n(48),i=n(10)("toStringTag");t.exports=function(t,e,n){t&&!r(t=n?t:t.prototype,i)&&o(t,i,{configurable:!0,value:e})}},,,,,,,,,,,,,,,,function(t,e,n){function o(){}var r=n(20),i=n(181),u=n(118),c=n(95)("IE_PROTO"),s=function(){var t=n(91)("iframe"),e=u.length;for(t.style.display="none",n(105).appendChild(t),t.src="javascript:",(t=t.contentWindow.document).open(),t.write("