/*! elementor - v3.18.0 - 20-12-2023 */ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ /***/ "../modules/ai/assets/js/editor/actions-data.js": /*!******************************************************!*\ !*** ../modules/ai/assets/js/editor/actions-data.js ***! \******************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.vocalTones = exports.translateLanguages = exports.textareaAutocomplete = exports.textAutocomplete = exports.codeHtmlAutocomplete = exports.codeCssAutocomplete = void 0; var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); var textAutocomplete = [(0, _i18n.__)('Craft a catchy slogan for', 'elementor'), (0, _i18n.__)('Write a strong section header for', 'elementor'), (0, _i18n.__)('Create a blog title for', 'elementor'), (0, _i18n.__)('Suggest a 4 word headline for', 'elementor'), (0, _i18n.__)('Write an attention grabbing title for', 'elementor')]; exports.textAutocomplete = textAutocomplete; var textareaAutocomplete = [(0, _i18n.__)('Write a product description for', 'elementor'), (0, _i18n.__)('Create a blog post for', 'elementor'), (0, _i18n.__)('Craft an about us section for', 'elementor'), (0, _i18n.__)('Offer a few sentences to invite visitors to', 'elementor'), (0, _i18n.__)('Write microcopy for a submission form that includes', 'elementor')]; exports.textareaAutocomplete = textareaAutocomplete; var codeHtmlAutocomplete = [(0, _i18n.__)('GA event fired on every button element click (assume GA was loaded)', 'elementor'), (0, _i18n.__)('Iframe code to embed a Spotify widget on my web page. My ID is 1234567890', 'elementor'), (0, _i18n.__)('Write an embed code of Google Analytics', 'elementor'), (0, _i18n.__)('Write an embed code of Facebook Pixel', 'elementor'), (0, _i18n.__)('HTML code that embeds the following PDF into a webpage: link to PDF', 'elementor')]; exports.codeHtmlAutocomplete = codeHtmlAutocomplete; var codeCssAutocomplete = [(0, _i18n.__)('On hover, animate 20% bigger, rotate 10 deg CCW', 'elementor'), (0, _i18n.__)('Add a circle-shaped clip mask, semi transparent on hover', 'elementor'), (0, _i18n.__)('Rainbow colored animated text gradient', 'elementor'), (0, _i18n.__)('Add a 3D shadow to the text', 'elementor')]; exports.codeCssAutocomplete = codeCssAutocomplete; var vocalTones = [{ label: (0, _i18n.__)('Casual', 'elementor') }, { label: (0, _i18n.__)('Confidence', 'elementor') }, { label: (0, _i18n.__)('Formal', 'elementor') }, { label: (0, _i18n.__)('Friendly', 'elementor') }, { label: (0, _i18n.__)('Inspirational', 'elementor') }, { label: (0, _i18n.__)('Motivational', 'elementor') }, { label: (0, _i18n.__)('Nostalgic', 'elementor') }, { label: (0, _i18n.__)('Playful', 'elementor') }, { label: (0, _i18n.__)('Professional', 'elementor') }, { label: (0, _i18n.__)('Scientific', 'elementor') }, { label: (0, _i18n.__)('Straightforward', 'elementor') }, { label: (0, _i18n.__)('Witty', 'elementor') }]; exports.vocalTones = vocalTones; var translateLanguages = [{ label: (0, _i18n.__)('Arabic', 'elementor'), value: 'ar-SA' }, { label: (0, _i18n.__)('Chinese', 'elementor'), value: 'zh-CN' }, { label: (0, _i18n.__)('Czech', 'elementor'), value: 'cs-CZ' }, { label: (0, _i18n.__)('Danish', 'elementor'), value: 'da-DK' }, { label: (0, _i18n.__)('Dutch', 'elementor'), value: 'nl-NL' }, { label: (0, _i18n.__)('English', 'elementor'), value: 'en-US' }, { label: (0, _i18n.__)('Finnish', 'elementor'), value: 'fi-FI' }, { label: (0, _i18n.__)('French', 'elementor'), value: 'fr-FR' }, { label: (0, _i18n.__)('German', 'elementor'), value: 'de-DE' }, { label: (0, _i18n.__)('Greek', 'elementor'), value: 'el-GR' }, { label: (0, _i18n.__)('Hebrew', 'elementor'), value: 'he-IL' }, { label: (0, _i18n.__)('Hungarian', 'elementor'), value: 'hu-HU' }, { label: (0, _i18n.__)('Indonesian', 'elementor'), value: 'id-ID' }, { label: (0, _i18n.__)('Italian', 'elementor'), value: 'it-IT' }, { label: (0, _i18n.__)('Japanese', 'elementor'), value: 'ja-JP' }, { label: (0, _i18n.__)('Korean', 'elementor'), value: 'ko-KR' }, { label: (0, _i18n.__)('Persian', 'elementor'), value: 'fa-IR' }, { label: (0, _i18n.__)('Polish', 'elementor'), value: 'pl-PL' }, { label: (0, _i18n.__)('Portuguese', 'elementor'), value: 'pt-PT' }, { label: (0, _i18n.__)('Russian', 'elementor'), value: 'ru-RU' }, { label: (0, _i18n.__)('Spanish', 'elementor'), value: 'es-ES' }, { label: (0, _i18n.__)('Swedish', 'elementor'), value: 'sv-SE' }, { label: (0, _i18n.__)('Thai', 'elementor'), value: 'th-TH' }, { label: (0, _i18n.__)('Turkish', 'elementor'), value: 'tr-TR' }, { label: (0, _i18n.__)('Vietnamese', 'elementor'), value: 'vi-VN' }]; exports.translateLanguages = translateLanguages; /***/ }), /***/ "../modules/ai/assets/js/editor/ai-behavior.js": /*!*****************************************************!*\ !*** ../modules/ai/assets/js/editor/ai-behavior.js ***! \*****************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /* provided dependency */ var ReactDOM = __webpack_require__(/*! react-dom */ "react-dom"); var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); var _app = _interopRequireDefault(__webpack_require__(/*! ./app */ "../modules/ai/assets/js/editor/app.js")); var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } var AiBehavior = /*#__PURE__*/function (_Marionette$Behavior) { (0, _inherits2.default)(AiBehavior, _Marionette$Behavior); var _super = _createSuper(AiBehavior); function AiBehavior() { (0, _classCallCheck2.default)(this, AiBehavior); return _super.apply(this, arguments); } (0, _createClass2.default)(AiBehavior, [{ key: "initialize", value: function initialize() { this.type = 'text'; this.controlType = 'text'; this.buttonLabel = (0, _i18n.__)('Write with AI', 'elementor'); this.editButtonLabel = (0, _i18n.__)('Edit with AI', 'elementor'); this.isLabelBlock = false; this.additionalOptions = {}; this.context = {}; this.config = window.ElementorAiConfig; } }, { key: "ui", value: function ui() { return { aiButton: '.e-ai-button' }; } }, { key: "events", value: function events() { return { 'click @ui.aiButton': 'onAiButtonClick' }; } }, { key: "onAiButtonClick", value: function onAiButtonClick(event) { var _elementor, _elementor$getPrefere; event.stopPropagation(); var colorScheme = ((_elementor = elementor) === null || _elementor === void 0 ? void 0 : (_elementor$getPrefere = _elementor.getPreferences) === null || _elementor$getPrefere === void 0 ? void 0 : _elementor$getPrefere.call(_elementor, 'ui_theme')) || 'auto'; var isRTL = elementorCommon.config.isRTL; var rootElement = document.createElement('div'); document.body.append(rootElement); window.elementorAiCurrentContext = this.getOption('context'); ReactDOM.render( /*#__PURE__*/_react.default.createElement(_app.default, { type: this.getOption('type'), controlType: this.getOption('controlType'), getControlValue: this.getOption('getControlValue'), setControlValue: this.getOption('setControlValue'), additionalOptions: this.getOption('additionalOptions'), controlView: this.getOption('controlView'), onClose: function onClose() { ReactDOM.unmountComponentAtNode(rootElement); rootElement.remove(); }, colorScheme: colorScheme, isRTL: isRTL }), rootElement); } }, { key: "getAiButtonLabel", value: function getAiButtonLabel() { var _this$getOption; var defaultValue = (_this$getOption = this.getOption('additionalOptions')) === null || _this$getOption === void 0 ? void 0 : _this$getOption.defaultValue; var currentValue = this.getOption('getControlValue')(); var isMedia = 'media' === this.getOption('type'); var isDefaultValue = !isMedia && defaultValue === currentValue || isMedia && (currentValue === null || currentValue === void 0 ? void 0 : currentValue.url) === (defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.url); return isDefaultValue ? this.getOption('buttonLabel') : this.getOption('editButtonLabel'); } }, { key: "onRender", value: function onRender() { var isPromotion = !this.config.is_get_started; var buttonLabel = this.getAiButtonLabel(); var $button = jQuery('