__( 'Save as a template', 'elementor' );
__( 'New', 'elementor' );
__( 'Create component', 'elementor' );
__( 'To create new components, update Elementor Pro to the latest version.', 'elementor' );
__( 'Update Now', 'elementor' );
__( 'Add %s', 'elementor' );
__( 'Edit %s', 'elementor' );
__( 'Duplicate %s', 'elementor' );
__( 'Delete %s', 'elementor' );# Members - EDD Integration
The Members - EDD Integration add-on more nicely integrates the [Easy Digital Downloads](https://easydigitaldownloads.com/) plugin capabilities into the Members plugin's role manager.
The [Members plugin](https://themehybrid.com/plugins/members) and the Easy Digital Downloads plugin are required to be installed and activated for this plugin to work.
## Shop Role Group
The plugin creates a new "Shop" role group for Easy Digital Downloads, which is located under the Users > Roles screen in the admin. This role group lists the following roles:
- Shop Accountant
- Shop Manager
- Shop Vendor
- Shop Worker
- Any other roles that have EDD-related capabilities.
This allows you to see any roles that have EDD permissions at a glance.
## Downloads Capability Group
When editing or creating a new role in Members, this add-on creates a new "Downloads" tab (cap group). This tab combines all of the Easy Digital Downloads capabilities in one place. That way, you can see all available caps without jumping between different tabs.
## Copyright and License
This project is licensed under the [GNU GPL](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html), version 2 or later.
2019 © [Justin Tadlock](http://justintadlock.com).
/******/ (function() { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ "./node_modules/@monaco-editor/loader/lib/es/_virtual/_rollupPluginBabelHelpers.js":
/*!*****************************************************************************************!*\
!*** ./node_modules/@monaco-editor/loader/lib/es/_virtual/_rollupPluginBabelHelpers.js ***!
\*****************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ arrayLikeToArray: function() { return /* binding */ _arrayLikeToArray; },
/* harmony export */ arrayWithHoles: function() { return /* binding */ _arrayWithHoles; },
/* harmony export */ defineProperty: function() { return /* binding */ _defineProperty; },
/* harmony export */ iterableToArrayLimit: function() { return /* binding */ _iterableToArrayLimit; },
/* harmony export */ nonIterableRest: function() { return /* binding */ _nonIterableRest; },
/* harmony export */ objectSpread2: function() { return /* binding */ _objectSpread2; },
/* harmony export */ objectWithoutProperties: function() { return /* binding */ _objectWithoutProperties; },
/* harmony export */ objectWithoutPropertiesLoose: function() { return /* binding */ _objectWithoutPropertiesLoose; },
/* harmony export */ slicedToArray: function() { return /* binding */ _slicedToArray; },
/* harmony export */ toPrimitive: function() { return /* binding */ _toPrimitive; },
/* harmony export */ toPropertyKey: function() { return /* binding */ _toPropertyKey; },
/* harmony export */ unsupportedIterableToArray: function() { return /* binding */ _unsupportedIterableToArray; }
/* harmony export */ });
function _arrayLikeToArray(r, a) {
(null == a || a > r.length) && (a = r.length);
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
return n;
}
function _arrayWithHoles(r) {
if (Array.isArray(r)) return r;
}
function _defineProperty(e, r, t) {
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
value: t,
enumerable: true,
configurable: true,
writable: true
}) : e[r] = t, e;
}
function _iterableToArrayLimit(r, l) {
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
if (null != t) {
var e,
n,
i,
u,
a = [],
f = true,
o = false;
try {
if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
} catch (r) {
o = true, n = r;
} finally {
try {
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
} finally {
if (o) throw n;
}
}
return a;
}
}
function _nonIterableRest() {
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
function ownKeys(e, r) {
var t = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var o = Object.getOwnPropertySymbols(e);
r && (o = o.filter(function (r) {
return Object.getOwnPropertyDescriptor(e, r).enumerable;
})), t.push.apply(t, o);
}
return t;
}
function _objectSpread2(e) {
for (var r = 1; r < arguments.length; r++) {
var t = null != arguments[r] ? arguments[r] : {};
r % 2 ? ownKeys(Object(t), true).forEach(function (r) {
_defineProperty(e, r, t[r]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
});
}
return e;
}
function _objectWithoutProperties(e, t) {
if (null == e) return {};
var o,
r,
i = _objectWithoutPropertiesLoose(e, t);
if (Object.getOwnPropertySymbols) {
var n = Object.getOwnPropertySymbols(e);
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
}
return i;
}
function _objectWithoutPropertiesLoose(r, e) {
if (null == r) return {};
var t = {};
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
if (-1 !== e.indexOf(n)) continue;
t[n] = r[n];
}
return t;
}
function _slicedToArray(r, e) {
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
}
function _toPrimitive(t, r) {
if ("object" != typeof t || !t) return t;
var e = t[Symbol.toPrimitive];
if (void 0 !== e) {
var i = e.call(t, r);
if ("object" != typeof i) return i;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return ("string" === r ? String : Number)(t);
}
function _toPropertyKey(t) {
var i = _toPrimitive(t, "string");
return "symbol" == typeof i ? i : i + "";
}
function _unsupportedIterableToArray(r, a) {
if (r) {
if ("string" == typeof r) return _arrayLikeToArray(r, a);
var t = {}.toString.call(r).slice(8, -1);
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
}
}
/***/ }),
/***/ "./node_modules/@monaco-editor/loader/lib/es/config/index.js":
/*!*******************************************************************!*\
!*** ./node_modules/@monaco-editor/loader/lib/es/config/index.js ***!
\*******************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ config; }
/* harmony export */ });
var config = {
paths: {
vs: 'https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs'
}
};
/***/ }),
/***/ "./node_modules/@monaco-editor/loader/lib/es/index.js":
/*!************************************************************!*\
!*** ./node_modules/@monaco-editor/loader/lib/es/index.js ***!
\************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* reexport safe */ _loader_index_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }
/* harmony export */ });
/* harmony import */ var _loader_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./loader/index.js */ "./node_modules/@monaco-editor/loader/lib/es/loader/index.js");
/***/ }),
/***/ "./node_modules/@monaco-editor/loader/lib/es/loader/index.js":
/*!*******************************************************************!*\
!*** ./node_modules/@monaco-editor/loader/lib/es/loader/index.js ***!
\*******************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ loader; }
/* harmony export */ });
/* harmony import */ var _virtual_rollupPluginBabelHelpers_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_virtual/_rollupPluginBabelHelpers.js */ "./node_modules/@monaco-editor/loader/lib/es/_virtual/_rollupPluginBabelHelpers.js");
/* harmony import */ var state_local__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! state-local */ "./node_modules/state-local/lib/es/state-local.js");
/* harmony import */ var _config_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../config/index.js */ "./node_modules/@monaco-editor/loader/lib/es/config/index.js");
/* harmony import */ var _validators_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../validators/index.js */ "./node_modules/@monaco-editor/loader/lib/es/validators/index.js");
/* harmony import */ var _utils_compose_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/compose.js */ "./node_modules/@monaco-editor/loader/lib/es/utils/compose.js");
/* harmony import */ var _utils_deepMerge_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/deepMerge.js */ "./node_modules/@monaco-editor/loader/lib/es/utils/deepMerge.js");
/* harmony import */ var _utils_makeCancelable_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/makeCancelable.js */ "./node_modules/@monaco-editor/loader/lib/es/utils/makeCancelable.js");
var _excluded = ["monaco"];
/** the local state of the module */
var _state$create = state_local__WEBPACK_IMPORTED_MODULE_1__["default"].create({
config: _config_index_js__WEBPACK_IMPORTED_MODULE_2__["default"],
isInitialized: false,
resolve: null,
reject: null,
monaco: null
}),
_state$create2 = (0,_virtual_rollupPluginBabelHelpers_js__WEBPACK_IMPORTED_MODULE_0__.slicedToArray)(_state$create, 2),
getState = _state$create2[0],
setState = _state$create2[1];
/**
* set the loader configuration
* @param {Object} config - the configuration object
*/
function config(globalConfig) {
var _validators$config = _validators_index_js__WEBPACK_IMPORTED_MODULE_3__["default"].config(globalConfig),
monaco = _validators$config.monaco,
config = (0,_virtual_rollupPluginBabelHelpers_js__WEBPACK_IMPORTED_MODULE_0__.objectWithoutProperties)(_validators$config, _excluded);
setState(function (state) {
return {
config: (0,_utils_deepMerge_js__WEBPACK_IMPORTED_MODULE_5__["default"])(state.config, config),
monaco: monaco
};
});
}
/**
* handles the initialization of the monaco-editor
* @return {Promise} - returns an instance of monaco (with a cancelable promise)
*/
function init() {
var state = getState(function (_ref) {
var monaco = _ref.monaco,
isInitialized = _ref.isInitialized,
resolve = _ref.resolve;
return {
monaco: monaco,
isInitialized: isInitialized,
resolve: resolve
};
});
if (!state.isInitialized) {
setState({
isInitialized: true
});
if (state.monaco) {
state.resolve(state.monaco);
return (0,_utils_makeCancelable_js__WEBPACK_IMPORTED_MODULE_6__["default"])(wrapperPromise);
}
if (window.monaco && window.monaco.editor) {
storeMonacoInstance(window.monaco);
state.resolve(window.monaco);
return (0,_utils_makeCancelable_js__WEBPACK_IMPORTED_MODULE_6__["default"])(wrapperPromise);
}
(0,_utils_compose_js__WEBPACK_IMPORTED_MODULE_4__["default"])(injectScripts, getMonacoLoaderScript)(configureLoader);
}
return (0,_utils_makeCancelable_js__WEBPACK_IMPORTED_MODULE_6__["default"])(wrapperPromise);
}
/**
* injects provided scripts into the document.body
* @param {Object} script - an HTML script element
* @return {Object} - the injected HTML script element
*/
function injectScripts(script) {
return document.body.appendChild(script);
}
/**
* creates an HTML script element with/without provided src
* @param {string} [src] - the source path of the script
* @return {Object} - the created HTML script element
*/
function createScript(src) {
var script = document.createElement('script');
return src && (script.src = src), script;
}
/**
* creates an HTML script element with the monaco loader src
* @return {Object} - the created HTML script element
*/
function getMonacoLoaderScript(configureLoader) {
var state = getState(function (_ref2) {
var config = _ref2.config,
reject = _ref2.reject;
return {
config: config,
reject: reject
};
});
var loaderScript = createScript("".concat(state.config.paths.vs, "/loader.js"));
loaderScript.onload = function () {
return configureLoader();
};
loaderScript.onerror = state.reject;
return loaderScript;
}
/**
* configures the monaco loader
*/
function configureLoader() {
var state = getState(function (_ref3) {
var config = _ref3.config,
resolve = _ref3.resolve,
reject = _ref3.reject;
return {
config: config,
resolve: resolve,
reject: reject
};
});
var require = window.require;
require.config(state.config);
require(['vs/editor/editor.main'], function (loaded) {
var monaco = loaded.m /* for 0.53 & 0.54 */ || loaded /* for other versions */;
storeMonacoInstance(monaco);
state.resolve(monaco);
}, function (error) {
state.reject(error);
});
}
/**
* store monaco instance in local state
*/
function storeMonacoInstance(monaco) {
if (!getState().monaco) {
setState({
monaco: monaco
});
}
}
/**
* internal helper function
* extracts stored monaco instance
* @return {Object|null} - the monaco instance
*/
function __getMonacoInstance() {
return getState(function (_ref4) {
var monaco = _ref4.monaco;
return monaco;
});
}
var wrapperPromise = new Promise(function (resolve, reject) {
return setState({
resolve: resolve,
reject: reject
});
});
var loader = {
config: config,
init: init,
__getMonacoInstance: __getMonacoInstance
};
/***/ }),
/***/ "./node_modules/@monaco-editor/loader/lib/es/utils/compose.js":
/*!********************************************************************!*\
!*** ./node_modules/@monaco-editor/loader/lib/es/utils/compose.js ***!
\********************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ compose; }
/* harmony export */ });
var compose = function compose() {
for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) {
fns[_key] = arguments[_key];
}
return function (x) {
return fns.reduceRight(function (y, f) {
return f(y);
}, x);
};
};
/***/ }),
/***/ "./node_modules/@monaco-editor/loader/lib/es/utils/curry.js":
/*!******************************************************************!*\
!*** ./node_modules/@monaco-editor/loader/lib/es/utils/curry.js ***!
\******************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ curry; }
/* harmony export */ });
function curry(fn) {
return function curried() {
var _this = this;
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return args.length >= fn.length ? fn.apply(this, args) : function () {
for (var _len2 = arguments.length, nextArgs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
nextArgs[_key2] = arguments[_key2];
}
return curried.apply(_this, [].concat(args, nextArgs));
};
};
}
/***/ }),
/***/ "./node_modules/@monaco-editor/loader/lib/es/utils/deepMerge.js":
/*!**********************************************************************!*\
!*** ./node_modules/@monaco-editor/loader/lib/es/utils/deepMerge.js ***!
\**********************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ merge; }
/* harmony export */ });
/* harmony import */ var _virtual_rollupPluginBabelHelpers_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_virtual/_rollupPluginBabelHelpers.js */ "./node_modules/@monaco-editor/loader/lib/es/_virtual/_rollupPluginBabelHelpers.js");
function merge(target, source) {
Object.keys(source).forEach(function (key) {
if (source[key] instanceof Object) {
if (target[key]) {
Object.assign(source[key], merge(target[key], source[key]));
}
}
});
return (0,_virtual_rollupPluginBabelHelpers_js__WEBPACK_IMPORTED_MODULE_0__.objectSpread2)((0,_virtual_rollupPluginBabelHelpers_js__WEBPACK_IMPORTED_MODULE_0__.objectSpread2)({}, target), source);
}
/***/ }),
/***/ "./node_modules/@monaco-editor/loader/lib/es/utils/isObject.js":
/*!*********************************************************************!*\
!*** ./node_modules/@monaco-editor/loader/lib/es/utils/isObject.js ***!
\*********************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ isObject; }
/* harmony export */ });
function isObject(value) {
return {}.toString.call(value).includes('Object');
}
/***/ }),
/***/ "./node_modules/@monaco-editor/loader/lib/es/utils/makeCancelable.js":
/*!***************************************************************************!*\
!*** ./node_modules/@monaco-editor/loader/lib/es/utils/makeCancelable.js ***!
\***************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ CANCELATION_MESSAGE: function() { return /* binding */ CANCELATION_MESSAGE; },
/* harmony export */ "default": function() { return /* binding */ makeCancelable; }
/* harmony export */ });
// The source (has been changed) is https://github.com/facebook/react/issues/5465#issuecomment-157888325
var CANCELATION_MESSAGE = {
type: 'cancelation',
msg: 'operation is manually canceled'
};
function makeCancelable(promise) {
var hasCanceled_ = false;
var wrappedPromise = new Promise(function (resolve, reject) {
promise.then(function (val) {
return hasCanceled_ ? reject(CANCELATION_MESSAGE) : resolve(val);
});
promise["catch"](reject);
});
return wrappedPromise.cancel = function () {
return hasCanceled_ = true;
}, wrappedPromise;
}
/***/ }),
/***/ "./node_modules/@monaco-editor/loader/lib/es/validators/index.js":
/*!***********************************************************************!*\
!*** ./node_modules/@monaco-editor/loader/lib/es/validators/index.js ***!
\***********************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ validators; },
/* harmony export */ errorHandler: function() { return /* binding */ errorHandler; },
/* harmony export */ errorMessages: function() { return /* binding */ errorMessages; }
/* harmony export */ });
/* harmony import */ var _utils_curry_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/curry.js */ "./node_modules/@monaco-editor/loader/lib/es/utils/curry.js");
/* harmony import */ var _utils_isObject_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/isObject.js */ "./node_modules/@monaco-editor/loader/lib/es/utils/isObject.js");
/**
* validates the configuration object and informs about deprecation
* @param {Object} config - the configuration object
* @return {Object} config - the validated configuration object
*/
function validateConfig(config) {
if (!config) errorHandler('configIsRequired');
if (!(0,_utils_isObject_js__WEBPACK_IMPORTED_MODULE_1__["default"])(config)) errorHandler('configType');
if (config.urls) {
informAboutDeprecation();
return {
paths: {
vs: config.urls.monacoBase
}
};
}
return config;
}
/**
* logs deprecation message
*/
function informAboutDeprecation() {
console.warn(errorMessages.deprecation);
}
function throwError(errorMessages, type) {
throw new Error(errorMessages[type] || errorMessages["default"]);
}
var errorMessages = {
configIsRequired: 'the configuration object is required',
configType: 'the configuration object should be an object',
"default": 'an unknown error accured in `@monaco-editor/loader` package',
deprecation: "Deprecation warning!\n You are using deprecated way of configuration.\n\n Instead of using\n monaco.config({ urls: { monacoBase: '...' } })\n use\n monaco.config({ paths: { vs: '...' } })\n\n For more please check the link https://github.com/suren-atoyan/monaco-loader#config\n "
};
var errorHandler = (0,_utils_curry_js__WEBPACK_IMPORTED_MODULE_0__["default"])(throwError)(errorMessages);
var validators = {
config: validateConfig
};
/***/ }),
/***/ "./packages/packages/pro/editor-controls-extended/src/components/css-code-editor/css-editor.styles.ts":
/*!************************************************************************************************************!*\
!*** ./packages/packages/pro/editor-controls-extended/src/components/css-code-editor/css-editor.styles.ts ***!
\************************************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ EditorWrapper: function() { return /* binding */ EditorWrapper; },
/* harmony export */ ResizeHandle: function() { return /* binding */ ResizeHandle; }
/* harmony export */ });
/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_ui__WEBPACK_IMPORTED_MODULE_0__);
const EditorWrapper = (0,_elementor_ui__WEBPACK_IMPORTED_MODULE_0__.styled)((0,_elementor_ui__WEBPACK_IMPORTED_MODULE_0__.Box))`
/* @noflip */
direction: ltr;
border: 1px solid var( --e-a-border-color );
border-radius: 8px;
padding: 4px;
position: relative;
height: 200px;
.monaco-editor .suggest-widget {
width: 220px !important;
max-width: 220px !important;
z-index: 1001;
}
.visual-content-dimmed {
opacity: 0.6;
color: #aaa !important;
pointer-events: none;
}
.monaco-editor {
.margin-view-overlays > div:nth-of-type( 1 ) .cldr.codicon.codicon-folding-expanded {
visibility: hidden;
}
.monaco-scrollable-element {
> .scrollbar {
width: 6px !important;
> .slider {
width: 6px !important;
}
}
}
}
`;
const ResizeHandle = (0,_elementor_ui__WEBPACK_IMPORTED_MODULE_0__.styled)((0,_elementor_ui__WEBPACK_IMPORTED_MODULE_0__.Button))`
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 6px;
cursor: ns-resize;
background: transparent;
border: none;
padding: 0;
&:hover {
background: rgba( 0, 0, 0, 0.05 );
}
&:active {
background: rgba( 0, 0, 0, 0.1 );
}
&::after {
content: '';
position: absolute;
top: 50%;
left: 50%;
transform: translate( -50%, -50% );
width: 30px;
height: 2px;
background: var( --e-a-border-color );
border-radius: 1px;
}
`;
/***/ }),
/***/ "./packages/packages/pro/editor-controls-extended/src/components/css-code-editor/css-editor.tsx":
/*!******************************************************************************************************!*\
!*** ./packages/packages/pro/editor-controls-extended/src/components/css-code-editor/css-editor.tsx ***!
\******************************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ CssEditor: function() { return /* binding */ CssEditor; }
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _elementor_editor_controls__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @elementor/editor-controls */ "@elementor/editor-controls");
/* harmony import */ var _elementor_editor_controls__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_elementor_editor_controls__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _elementor_editor_ui__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @elementor/editor-ui */ "@elementor/editor-ui");
/* harmony import */ var _elementor_editor_ui__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_elementor_editor_ui__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_elementor_ui__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _monaco_editor_react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @monaco-editor/react */ "./node_modules/@monaco-editor/react/dist/index.mjs");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _css_editor_styles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./css-editor.styles */ "./packages/packages/pro/editor-controls-extended/src/components/css-code-editor/css-editor.styles.ts");
/* harmony import */ var _css_validation__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./css-validation */ "./packages/packages/pro/editor-controls-extended/src/components/css-code-editor/css-validation.ts");
/* harmony import */ var _resize_handle__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./resize-handle */ "./packages/packages/pro/editor-controls-extended/src/components/css-code-editor/resize-handle.tsx");
/* harmony import */ var _visual_content_change_protection__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./visual-content-change-protection */ "./packages/packages/pro/editor-controls-extended/src/components/css-code-editor/visual-content-change-protection.ts");
const createEditorDidMountHandler = (editorRef, monacoRef, onUserContentChange, setIsValid, syntaxRuleOptions) => {
return (editor, monaco) => {
editorRef.current = editor;
monacoRef.current = monaco;
(0,_visual_content_change_protection__WEBPACK_IMPORTED_MODULE_9__.preventChangeOnVisualContent)(editor);
(0,_css_validation__WEBPACK_IMPORTED_MODULE_7__.setCustomSyntaxRules)(editor, monaco, syntaxRuleOptions);
const initialCode = editor.getModel()?.getValue() ?? '';
const initialUserContent = (0,_visual_content_change_protection__WEBPACK_IMPORTED_MODULE_9__.getActual)(initialCode);
onUserContentChange(initialUserContent);
monaco.editor.onDidChangeMarkers(() => {
(0,_css_validation__WEBPACK_IMPORTED_MODULE_7__.clearMarkersFromVisualContent)(editor, monaco);
setIsValid((0,_css_validation__WEBPACK_IMPORTED_MODULE_7__.validate)(editor, monaco));
});
editor.setPosition({
lineNumber: 2,
column: (editor.getModel()?.getLineContent(2).length ?? 0) + 1
});
disableFoldingFirstRow(editor);
// eslint-disable-next-line no-bitwise
editor.addCommand(monaco.KeyMod.CtrlCmd | monaco.KeyCode.KeyA, () => {
const editorModel = editor.getModel();
if (!editorModel) {
return;
}
const fullRange = editorModel.getFullModelRange();
const contentEndLine = fullRange.endLineNumber - 1;
let endColumn = editorModel.getLineLastNonWhitespaceColumn(contentEndLine);
if (endColumn === 0) {
endColumn = editorModel.getLineMaxColumn(contentEndLine);
}
editor.setSelection(new monaco.Selection(fullRange.startLineNumber + 1, fullRange.startColumn, contentEndLine, endColumn));
});
};
};
function disableFoldingFirstRow(editor) {
if (!(typeof editor.getDomNode === 'function')) {
return;
}
const marginViewOverlays = editor.getDomNode()?.querySelector('.margin-view-overlays');
const handler = event => {
const ev = event;
if (ev.button !== 0) {
return;
}
const target = ev.target;
const firstElem = marginViewOverlays?.children[0];
const isFirstRow = target === firstElem || target.parentElement === firstElem;
if (isFirstRow) {
event.preventDefault();
event.stopPropagation();
}
};
marginViewOverlays?.addEventListener('mousedown', handler);
editor.onDidDispose(() => {
marginViewOverlays?.removeEventListener('mousedown', handler);
});
}
const CssEditor = ({
value,
onChange,
syntaxRuleOptions,
readOnly = false
}) => {
const theme = (0,_elementor_ui__WEBPACK_IMPORTED_MODULE_3__.useTheme)();
const containerRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
const editorRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
const monacoRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
const debounceTimer = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
const [hasContent, setHasContent] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(value.trim() !== '');
const [isValid, setIsValid] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(true);
const [contentVersion, setContentVersion] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(0);
useOnUpdate(() => {
const code = editorRef.current?.getModel()?.getValue() ?? '';
const userContent = (0,_visual_content_change_protection__WEBPACK_IMPORTED_MODULE_9__.getActual)(code);
setHasContent(!userContent.trim());
onChange(userContent, isValid);
}, [contentVersion, isValid]);
const handleUserContentChange = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(newValue => {
setHasContent(newValue.trim() !== '');
}, []);
const handleResize = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(() => {
editorRef.current?.layout();
}, []);
const handleHeightChange = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(height => {
if (containerRef.current) {
containerRef.current.style.height = `${height}px`;
}
}, []);
const handleEditorChange = () => {
if (!editorRef.current || !monacoRef.current) {
return;
}
(0,_css_validation__WEBPACK_IMPORTED_MODULE_7__.setCustomSyntaxRules)(editorRef?.current, monacoRef.current, syntaxRuleOptions);
if (debounceTimer.current) {
clearTimeout(debounceTimer.current);
}
debounceTimer.current = setTimeout(() => {
setContentVersion(prev => prev + 1);
}, 500);
};
const handleEditorDidMount = createEditorDidMountHandler(editorRef, monacoRef, handleUserContentChange, setIsValid, syntaxRuleOptions);
const handleReset = () => editorRef.current?.getModel()?.setValue((0,_visual_content_change_protection__WEBPACK_IMPORTED_MODULE_9__.setVisualContent)(''));
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
const timerRef = debounceTimer;
return () => {
const timer = timerRef.current;
if (timer) {
clearTimeout(timer);
}
};
}, []);
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_editor_ui__WEBPACK_IMPORTED_MODULE_2__.FloatingActionsBar, {
actions: hasContent ? [/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_editor_controls__WEBPACK_IMPORTED_MODULE_1__.ClearIconButton, {
key: "clear",
tooltipText: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('Clear', 'elementor-pro'),
onClick: handleReset
})] : []
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_3__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_css_editor_styles__WEBPACK_IMPORTED_MODULE_6__.EditorWrapper, {
ref: containerRef,
dir: "ltr"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_monaco_editor_react__WEBPACK_IMPORTED_MODULE_4__.Editor, {
height: "100%",
language: "css",
theme: theme.palette.mode === 'dark' ? 'vs-dark' : 'vs',
value: (0,_visual_content_change_protection__WEBPACK_IMPORTED_MODULE_9__.setVisualContent)(value),
onMount: handleEditorDidMount,
onChange: handleEditorChange,
options: {
lineNumbers: 'on',
lineNumbersMinChars: 3,
folding: true,
minimap: {
enabled: false
},
fontFamily: 'Roboto, Arial, Helvetica, Verdana, sans-serif',
fontSize: 12,
renderLineHighlight: 'none',
hideCursorInOverviewRuler: true,
overviewRulerBorder: false,
fixedOverflowWidgets: true,
suggestFontSize: 10,
suggestLineHeight: 14,
stickyScroll: {
enabled: false
},
lineDecorationsWidth: 2,
wordWrap: 'on',
scrollBeyondLastLine: false,
readOnly,
editContext: false
}
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_resize_handle__WEBPACK_IMPORTED_MODULE_8__.ResizeHandleComponent, {
onResize: handleResize,
containerRef: containerRef,
onHeightChange: handleHeightChange
}))));
};
function useOnUpdate(callback, dependencies) {
const hasMounted = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(false);
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
if (hasMounted.current) {
callback();
} else {
hasMounted.current = true;
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, dependencies);
}
/***/ }),
/***/ "./packages/packages/pro/editor-controls-extended/src/components/css-code-editor/css-validation.ts":
/*!*********************************************************************************************************!*\
!*** ./packages/packages/pro/editor-controls-extended/src/components/css-code-editor/css-validation.ts ***!
\*********************************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ clearMarkersFromVisualContent: function() { return /* binding */ clearMarkersFromVisualContent; },
/* harmony export */ setCustomSyntaxRules: function() { return /* binding */ setCustomSyntaxRules; },
/* harmony export */ validate: function() { return /* binding */ validate; }
/* harmony export */ });
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
const syntaxRules = {
pseudoState: {
pattern: '^\\s*[&]{0,1}\\s*(?::hover|:active|:focus)',
regex: true,
message: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('The use of pseudo-states is not permitted. Instead, switch to the desired pseudo state and add your custom code there.', 'elementor-pro')
},
mediaQuery: {
pattern: '@media\\s+[^{]*\\b(?:min-width|max-width|width)\\b',
regex: true,
message: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('The use of @media width queries is not permitted. Instead, switch to the desired breakpoint and add your custom code there.', 'elementor-pro')
}
};
function setCustomSyntaxRules(editor, monaco, options) {
const model = editor.getModel();
if (!model) {
return true;
}
const customMarkers = [];
Object.entries(syntaxRules).forEach(([id, rule]) => {
if (options?.rules?.[id] === false) {
return;
}
const matches = model.findMatches(rule.pattern, true, rule.regex ?? false, true, null, true);
matches.forEach(match => {
customMarkers.push({
severity: monaco.MarkerSeverity.Error,
message: rule.message,
startLineNumber: match.range.startLineNumber,
startColumn: match.range.startColumn,
endLineNumber: match.range.endLineNumber,
endColumn: match.range.endColumn,
source: 'custom-css-rules'
});
});
});
monaco.editor.setModelMarkers(model, 'custom-css-rules', customMarkers);
return customMarkers.length === 0;
}
function validate(editor, monaco) {
const model = editor.getModel();
if (!model) {
return true;
}
const allMarkers = monaco.editor.getModelMarkers({
resource: model.uri
});
return allMarkers.filter(marker => marker.severity === monaco.MarkerSeverity.Error).length === 0;
}
function clearMarkersFromVisualContent(editor, monaco) {
const model = editor.getModel();
if (!model) {
return;
}
const allMarkers = monaco.editor.getModelMarkers({
resource: model.uri
});
const filteredMarkers = allMarkers.filter(marker => marker.startLineNumber !== 1);
const nonCustomMarkers = filteredMarkers.filter(m => m.source !== 'custom-css-rules');
if (nonCustomMarkers.length === allMarkers.length) {
return;
}
monaco.editor.setModelMarkers(model, 'css', nonCustomMarkers);
}
/***/ }),
/***/ "./packages/packages/pro/editor-controls-extended/src/components/css-code-editor/resize-handle.tsx":
/*!*********************************************************************************************************!*\
!*** ./packages/packages/pro/editor-controls-extended/src/components/css-code-editor/resize-handle.tsx ***!
\*********************************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ ResizeHandleComponent: function() { return /* binding */ ResizeHandleComponent; }
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _css_editor_styles__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./css-editor.styles */ "./packages/packages/pro/editor-controls-extended/src/components/css-code-editor/css-editor.styles.ts");
const ResizeHandleComponent = ({
onResize,
containerRef,
onHeightChange
}) => {
const handleResizeMove = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(e => {
const container = containerRef.current;
if (!container) {
return;
}
const containerRect = container.getBoundingClientRect();
const newHeight = Math.max(100, e.clientY - containerRect.top);
onHeightChange?.(newHeight);
onResize(newHeight);
}, [containerRef, onResize, onHeightChange]);
const handleResizeEnd = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(() => {
document.removeEventListener('mousemove', handleResizeMove);
document.removeEventListener('mouseup', handleResizeEnd);
}, [handleResizeMove]);
const handleResizeStart = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(e => {
e.preventDefault();
e.stopPropagation();
document.addEventListener('mousemove', handleResizeMove);
document.addEventListener('mouseup', handleResizeEnd);
}, [handleResizeMove, handleResizeEnd]);
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {
return () => {
document.removeEventListener('mousemove', handleResizeMove);
document.removeEventListener('mouseup', handleResizeEnd);
};
}, [handleResizeMove, handleResizeEnd]);
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_css_editor_styles__WEBPACK_IMPORTED_MODULE_1__.ResizeHandle, {
onMouseDown: handleResizeStart,
"aria-label": "Resize editor height",
title: "Drag to resize editor height"
});
};
/***/ }),
/***/ "./packages/packages/pro/editor-controls-extended/src/components/css-code-editor/visual-content-change-protection.ts":
/*!***************************************************************************************************************************!*\
!*** ./packages/packages/pro/editor-controls-extended/src/components/css-code-editor/visual-content-change-protection.ts ***!
\***************************************************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ getActual: function() { return /* binding */ getActual; },
/* harmony export */ preventChangeOnVisualContent: function() { return /* binding */ preventChangeOnVisualContent; },
/* harmony export */ setVisualContent: function() { return /* binding */ setVisualContent; }
/* harmony export */ });
const preventChangeOnVisualContent = editor => {
const model = editor.getModel();
if (!model) {
return;
}
// On first load
applyVisualContentStyling(editor, model);
// On every change
model.onDidChangeContent(() => {
applyVisualContentStyling(editor, model);
});
disableCursorOnVisualContent(editor);
overridePushEditOperations(model);
};
const applyVisualContentStyling = (editor, model) => {
const decorationsCollection = editor.createDecorationsCollection();
const lineCount = model.getLineCount();
const decorations = [];
decorations.push({
range: {
startLineNumber: 1,
startColumn: 1,
endLineNumber: 1,
endColumn: model.getLineContent(1).length + 1
},
options: {
inlineClassName: 'visual-content-dimmed',
isWholeLine: false
}
});
if (lineCount > 1) {
decorations.push({
range: {
startLineNumber: lineCount,
startColumn: 1,
endLineNumber: lineCount,
endColumn: model.getLineContent(lineCount).length + 1
},
options: {
inlineClassName: 'visual-content-dimmed',
isWholeLine: false
}
});
}
decorationsCollection.set(decorations);
};
const disableCursorOnVisualContent = editor => {
const model = editor.getModel();
if (!model) {
return;
}
editor.onDidChangeCursorPosition(e => {
const totalLines = model.getLineCount();
const position = e.position;
if (position.lineNumber === 1) {
editor.setPosition({
lineNumber: 2,
column: 1
});
} else if (position.lineNumber === totalLines) {
editor.setPosition({
lineNumber: totalLines - 1,
column: model.getLineContent(totalLines - 1).length + 1
});
}
});
};
const overridePushEditOperations = model => {
const originalPushEditOperations = model.pushEditOperations;
model.pushEditOperations = (beforeCursorState, editOperations, cursorStateComputer) => {
const totalLines = model.getLineCount();
const modelRange = model.getFullModelRange();
const filteredOperations = editOperations.filter(operation => {
const range = operation.range;
const affectsProtectedLine = range.startLineNumber === 1 || range.endLineNumber === 1 || range.startLineNumber === totalLines || range.endLineNumber === totalLines;
if (affectsProtectedLine && isFullContentReplacement(range, modelRange) && hasVisualContent(operation.text)) {
return true;
}
return !affectsProtectedLine;
});
return originalPushEditOperations.call(model, beforeCursorState, filteredOperations, cursorStateComputer);
};
};
const isFullContentReplacement = (range, modelRange) => {
return range.startLineNumber === modelRange.startLineNumber && range.endLineNumber === modelRange.endLineNumber && range.startColumn === modelRange.startColumn && range.endColumn === modelRange.endColumn;
};
const hasVisualContent = text => {
if (!text) {
return false;
}
return text.startsWith('element.style {') && text.endsWith('}');
};
const setVisualContent = value => {
const trimmed = value.trim();
return `element.style {\n${trimmed ? ' ' + trimmed.replace(/\n/g, '\n ') + '\n' : ' \n'}}`;
};
const getActual = value => {
const lines = value.split('\n');
if (lines.length < 2) {
return '';
}
return lines.slice(1, -1).map(line => line.replace(/^ {2}/, '')).join('\n');
};
/***/ }),
/***/ "./packages/packages/pro/editor-controls-extended/src/controls/attributes-control.tsx":
/*!********************************************************************************************!*\
!*** ./packages/packages/pro/editor-controls-extended/src/controls/attributes-control.tsx ***!
\********************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ AttributesControl: function() { return /* binding */ AttributesControl; }
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _elementor_editor_controls__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @elementor/editor-controls */ "@elementor/editor-controls");
/* harmony import */ var _elementor_editor_controls__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_elementor_editor_controls__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
const AttributesControl = (0,_elementor_editor_controls__WEBPACK_IMPORTED_MODULE_1__.createControl)(() => {
const getHelperText = (key, value) => {
if (value && !key) {
return {
keyHelper: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Empty attribute names aren't valid and won't render on the page.", 'elementor-pro')
};
}
return {};
};
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_editor_controls__WEBPACK_IMPORTED_MODULE_1__.KeyValueControl, {
keyName: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Name', 'elementor-pro'),
valueName: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Value', 'elementor-pro'),
regexKey: "^[a-zA-Z0-9_-]*$",
validationErrorMessage: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Names can only use letters, numbers, dashes (-) and underscores (_).', 'elementor-pro'),
getHelperText: getHelperText
});
});
/***/ }),
/***/ "./packages/packages/pro/editor-controls-extended/src/controls/display-conditions-control.tsx":
/*!****************************************************************************************************!*\
!*** ./packages/packages/pro/editor-controls-extended/src/controls/display-conditions-control.tsx ***!
\****************************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ DisplayConditionsControl: function() { return /* binding */ DisplayConditionsControl; }
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _elementor_editor_controls__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @elementor/editor-controls */ "@elementor/editor-controls");
/* harmony import */ var _elementor_editor_controls__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_elementor_editor_controls__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _elementor_icons__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @elementor/icons */ "@elementor/icons");
/* harmony import */ var _elementor_icons__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_elementor_icons__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_elementor_ui__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _prop_types_display_conditions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../prop-types/display-conditions */ "./packages/packages/pro/editor-controls-extended/src/prop-types/display-conditions.ts");
/* harmony import */ var _utils_display_conditions_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/display-conditions-utils */ "./packages/packages/pro/editor-controls-extended/src/utils/display-conditions-utils.ts");
const OPEN_MODAL_EVENT = 'elementor/display-conditions/open';
const CLOSE_MODAL_EVENT = 'elementor/display-conditions/close';
const SET_CACHE_NOTICE_STATUS_EVENT = 'elementor/display-conditions/set-cache-notice-status';
const ariaLabel = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Display Conditions', 'elementor-pro');
async function setCacheNoticeStatus() {
return new Promise((resolve, reject) => {
window.dispatchEvent(new CustomEvent(SET_CACHE_NOTICE_STATUS_EVENT, {
detail: {
resolve,
reject
}
}));
});
}
const DisplayConditionsControl = (0,_elementor_editor_controls__WEBPACK_IMPORTED_MODULE_1__.createControl)(({
disabled = false
}) => {
const {
setValue,
value: displayConditionsValue
} = (0,_elementor_editor_controls__WEBPACK_IMPORTED_MODULE_1__.useBoundProp)(_prop_types_display_conditions__WEBPACK_IMPORTED_MODULE_5__.displayConditionsPropTypeUtil);
const [isModalOpen, setIsModalOpen] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
const hasValue = !!displayConditionsValue?.length;
const setControlValue = value => setValue((0,_utils_display_conditions_utils__WEBPACK_IMPORTED_MODULE_6__.transformV3ToV4)(JSON.parse(value ?? '[]')));
const getControlValue = () => (0,_utils_display_conditions_utils__WEBPACK_IMPORTED_MODULE_6__.transformV4ToV3)(displayConditionsValue) ?? [];
const onClose = () => {
setIsModalOpen(false);
window.dispatchEvent(new CustomEvent(CLOSE_MODAL_EVENT));
};
const conditions = getControlValue();
const openConditionsModal = () => {
setIsModalOpen(true);
window.dispatchEvent(new CustomEvent(OPEN_MODAL_EVENT, {
detail: {
props: {
getControlValue,
setControlValue,
onClose,
setCacheNoticeStatus
}
}
}));
};
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_3__.Stack, {
direction: "row",
spacing: 2,
sx: {
justifyContent: 'flex-end',
alignItems: 'center'
}
}, disabled && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_3__.Chip, {
icon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_icons__WEBPACK_IMPORTED_MODULE_2__.CrownFilledIcon, {
fontSize: "tiny"
}),
size: "tiny",
color: "promotion",
variant: "standard",
sx: {
width: '20px',
'& .MuiChip-label': {
display: 'none'
}
}
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_3__.Tooltip, {
title: ariaLabel,
placement: "top"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_3__.Box, {
sx: {
cursor: disabled ? 'not-allowed' : 'pointer',
display: 'inline-flex'
}
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_3__.ToggleButton, {
value: JSON.stringify(conditions),
size: "tiny",
variant: "outline",
"aria-pressed": hasValue,
"aria-expanded": isModalOpen,
selected: hasValue,
"aria-haspopup": "dialog",
"aria-label": ariaLabel,
onClick: openConditionsModal,
disabled: disabled,
sx: {
pointerEvents: disabled ? 'none' : 'auto'
},
"data-behavior": "display-conditions"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_icons__WEBPACK_IMPORTED_MODULE_2__.SitemapIcon, {
fontSize: "tiny"
}))))));
});
/***/ }),
/***/ "./packages/packages/pro/editor-controls-extended/src/controls/options-control.tsx":
/*!*****************************************************************************************!*\
!*** ./packages/packages/pro/editor-controls-extended/src/controls/options-control.tsx ***!
\*****************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ OptionsControl: function() { return /* binding */ OptionsControl; }
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _elementor_editor_controls__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @elementor/editor-controls */ "@elementor/editor-controls");
/* harmony import */ var _elementor_editor_controls__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_elementor_editor_controls__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
const OptionsControl = (0,_elementor_editor_controls__WEBPACK_IMPORTED_MODULE_1__.createControl)(() => {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_editor_controls__WEBPACK_IMPORTED_MODULE_1__.KeyValueControl, {
keyName: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Name', 'elementor-pro'),
valueName: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Value', 'elementor-pro')
});
});
/***/ }),
/***/ "./packages/packages/pro/editor-controls-extended/src/extend-transition-properties.ts":
/*!********************************************************************************************!*\
!*** ./packages/packages/pro/editor-controls-extended/src/extend-transition-properties.ts ***!
\********************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ extendTransitionProperties: function() { return /* binding */ extendTransitionProperties; },
/* harmony export */ transitionProperties: function() { return /* reexport safe */ _elementor_editor_controls__WEBPACK_IMPORTED_MODULE_0__.transitionProperties; },
/* harmony export */ transitionsItemsList: function() { return /* reexport safe */ _elementor_editor_controls__WEBPACK_IMPORTED_MODULE_0__.transitionsItemsList; }
/* harmony export */ });
/* harmony import */ var _elementor_editor_controls__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/editor-controls */ "@elementor/editor-controls");
/* harmony import */ var _elementor_editor_controls__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_editor_controls__WEBPACK_IMPORTED_MODULE_0__);
function extendTransitionProperties(isDisabled = false) {
if (!_elementor_editor_controls__WEBPACK_IMPORTED_MODULE_0__.transitionProperties || _elementor_editor_controls__WEBPACK_IMPORTED_MODULE_0__.transitionProperties.length === 0) {
return;
}
_elementor_editor_controls__WEBPACK_IMPORTED_MODULE_0__.transitionProperties.forEach(category => {
category.properties.forEach(property => {
if (property.value !== 'all') {
property.isDisabled = isDisabled;
}
});
});
_elementor_editor_controls__WEBPACK_IMPORTED_MODULE_0__.transitionsItemsList.splice(0, _elementor_editor_controls__WEBPACK_IMPORTED_MODULE_0__.transitionsItemsList.length, ..._elementor_editor_controls__WEBPACK_IMPORTED_MODULE_0__.transitionProperties.map(category => ({
label: category.label,
items: category.properties.map(property => property.label)
})));
}
/***/ }),
/***/ "./packages/packages/pro/editor-controls-extended/src/init.ts":
/*!********************************************************************!*\
!*** ./packages/packages/pro/editor-controls-extended/src/init.ts ***!
\********************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ init: function() { return /* binding */ init; }
/* harmony export */ });
/* harmony import */ var _elementor_license_api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/license-api */ "@elementor/license-api");
/* harmony import */ var _elementor_license_api__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_license_api__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _extend_transition_properties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./extend-transition-properties */ "./packages/packages/pro/editor-controls-extended/src/extend-transition-properties.ts");
async function init() {
const [isExpired, features] = await Promise.all([(0,_elementor_license_api__WEBPACK_IMPORTED_MODULE_0__.fetchLicenseStatus)().catch(() => false), (0,_elementor_license_api__WEBPACK_IMPORTED_MODULE_0__.fetchTierFeatures)().catch(() => [])]);
if (features.includes('transitions')) {
(0,_extend_transition_properties__WEBPACK_IMPORTED_MODULE_1__.extendTransitionProperties)(isExpired);
}
}
/***/ }),
/***/ "./packages/packages/pro/editor-controls-extended/src/prop-types/condition-group.ts":
/*!******************************************************************************************!*\
!*** ./packages/packages/pro/editor-controls-extended/src/prop-types/condition-group.ts ***!
\******************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ conditionGroupPropTypeUtil: function() { return /* binding */ conditionGroupPropTypeUtil; }
/* harmony export */ });
/* harmony import */ var _elementor_editor_props__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/editor-props */ "@elementor/editor-props");
/* harmony import */ var _elementor_editor_props__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_editor_props__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema");
/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_1__);
const unknownChildrenSchema = _elementor_schema__WEBPACK_IMPORTED_MODULE_1__.z.any().nullable();
const conditionGroupPropTypeUtil = (0,_elementor_editor_props__WEBPACK_IMPORTED_MODULE_0__.createPropUtils)('condition-group', _elementor_schema__WEBPACK_IMPORTED_MODULE_1__.z.array(unknownChildrenSchema));
/***/ }),
/***/ "./packages/packages/pro/editor-controls-extended/src/prop-types/display-conditions.ts":
/*!*********************************************************************************************!*\
!*** ./packages/packages/pro/editor-controls-extended/src/prop-types/display-conditions.ts ***!
\*********************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ displayConditionsPropTypeUtil: function() { return /* binding */ displayConditionsPropTypeUtil; }
/* harmony export */ });
/* harmony import */ var _elementor_editor_props__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/editor-props */ "@elementor/editor-props");
/* harmony import */ var _elementor_editor_props__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_editor_props__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @elementor/schema */ "@elementor/schema");
/* harmony import */ var _elementor_schema__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_elementor_schema__WEBPACK_IMPORTED_MODULE_1__);
const unknownChildrenSchema = _elementor_schema__WEBPACK_IMPORTED_MODULE_1__.z.any().nullable();
const displayConditionsPropTypeUtil = (0,_elementor_editor_props__WEBPACK_IMPORTED_MODULE_0__.createPropUtils)('display-conditions', _elementor_schema__WEBPACK_IMPORTED_MODULE_1__.z.array(unknownChildrenSchema));
/***/ }),
/***/ "./packages/packages/pro/editor-controls-extended/src/utils/display-conditions-utils.ts":
/*!**********************************************************************************************!*\
!*** ./packages/packages/pro/editor-controls-extended/src/utils/display-conditions-utils.ts ***!
\**********************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ transformV3ToV4: function() { return /* binding */ transformV3ToV4; },
/* harmony export */ transformV4ToV3: function() { return /* binding */ transformV4ToV3; }
/* harmony export */ });
/* harmony import */ var _elementor_editor_props__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/editor-props */ "@elementor/editor-props");
/* harmony import */ var _elementor_editor_props__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_editor_props__WEBPACK_IMPORTED_MODULE_0__);
// Value must be falsy for navigator indication to work properly
function transformV3ToV4(displayConditions) {
if (!Array.isArray(displayConditions) || !displayConditions?.length) {
return null;
}
const transformed = displayConditions.filter(conditionGroup => !!conditionGroup?.length).map(conditionGroup => ({
$$type: 'condition-group',
value: conditionGroup.map(condition => _elementor_editor_props__WEBPACK_IMPORTED_MODULE_0__.stringPropTypeUtil.create(JSON.stringify(condition)))
}));
return transformed.length ? transformed : null;
}
function transformV4ToV3(value) {
const conditionGroups = value;
const transformed = conditionGroups?.map(group => group.value.map(conditions => {
return JSON.parse(_elementor_editor_props__WEBPACK_IMPORTED_MODULE_0__.stringPropTypeUtil.extract(conditions) ?? '[]');
})) ?? null;
return getStructuredConditions(transformed);
}
function shouldConvertConditionsStructure(conditions) {
return !!conditions?.length && !Array.isArray(conditions?.[0]);
}
function getStructuredConditions(conditions) {
return shouldConvertConditionsStructure(conditions) ? [conditions] : conditions;
}
/***/ }),
/***/ "./node_modules/state-local/lib/es/state-local.js":
/*!********************************************************!*\
!*** ./node_modules/state-local/lib/es/state-local.js ***!
\********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
function ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly) symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
});
keys.push.apply(keys, symbols);
}
return keys;
}
function _objectSpread2(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) {
ownKeys(Object(source), true).forEach(function (key) {
_defineProperty(target, key, source[key]);
});
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
} else {
ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
});
}
}
return target;
}
function compose() {
for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) {
fns[_key] = arguments[_key];
}
return function (x) {
return fns.reduceRight(function (y, f) {
return f(y);
}, x);
};
}
function curry(fn) {
return function curried() {
var _this = this;
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
return args.length >= fn.length ? fn.apply(this, args) : function () {
for (var _len3 = arguments.length, nextArgs = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
nextArgs[_key3] = arguments[_key3];
}
return curried.apply(_this, [].concat(args, nextArgs));
};
};
}
function isObject(value) {
return {}.toString.call(value).includes('Object');
}
function isEmpty(obj) {
return !Object.keys(obj).length;
}
function isFunction(value) {
return typeof value === 'function';
}
function hasOwnProperty(object, property) {
return Object.prototype.hasOwnProperty.call(object, property);
}
function validateChanges(initial, changes) {
if (!isObject(changes)) errorHandler('changeType');
if (Object.keys(changes).some(function (field) {
return !hasOwnProperty(initial, field);
})) errorHandler('changeField');
return changes;
}
function validateSelector(selector) {
if (!isFunction(selector)) errorHandler('selectorType');
}
function validateHandler(handler) {
if (!(isFunction(handler) || isObject(handler))) errorHandler('handlerType');
if (isObject(handler) && Object.values(handler).some(function (_handler) {
return !isFunction(_handler);
})) errorHandler('handlersType');
}
function validateInitial(initial) {
if (!initial) errorHandler('initialIsRequired');
if (!isObject(initial)) errorHandler('initialType');
if (isEmpty(initial)) errorHandler('initialContent');
}
function throwError(errorMessages, type) {
throw new Error(errorMessages[type] || errorMessages["default"]);
}
var errorMessages = {
initialIsRequired: 'initial state is required',
initialType: 'initial state should be an object',
initialContent: 'initial state shouldn\'t be an empty object',
handlerType: 'handler should be an object or a function',
handlersType: 'all handlers should be a functions',
selectorType: 'selector should be a function',
changeType: 'provided value of changes should be an object',
changeField: 'it seams you want to change a field in the state which is not specified in the "initial" state',
"default": 'an unknown error accured in `state-local` package'
};
var errorHandler = curry(throwError)(errorMessages);
var validators = {
changes: validateChanges,
selector: validateSelector,
handler: validateHandler,
initial: validateInitial
};
function create(initial) {
var handler = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
validators.initial(initial);
validators.handler(handler);
var state = {
current: initial
};
var didUpdate = curry(didStateUpdate)(state, handler);
var update = curry(updateState)(state);
var validate = curry(validators.changes)(initial);
var getChanges = curry(extractChanges)(state);
function getState() {
var selector = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function (state) {
return state;
};
validators.selector(selector);
return selector(state.current);
}
function setState(causedChanges) {
compose(didUpdate, update, validate, getChanges)(causedChanges);
}
return [getState, setState];
}
function extractChanges(state, causedChanges) {
return isFunction(causedChanges) ? causedChanges(state.current) : causedChanges;
}
function updateState(state, changes) {
state.current = _objectSpread2(_objectSpread2({}, state.current), changes);
return changes;
}
function didStateUpdate(state, handler, changes) {
isFunction(handler) ? handler(state.current) : Object.keys(changes).forEach(function (field) {
var _handler$field;
return (_handler$field = handler[field]) === null || _handler$field === void 0 ? void 0 : _handler$field.call(handler, state.current[field]);
});
return changes;
}
var index = {
create: create
};
/* harmony default export */ __webpack_exports__["default"] = (index);
/***/ }),
/***/ "react":
/*!**************************!*\
!*** external ["React"] ***!
\**************************/
/***/ (function(module) {
module.exports = window["React"];
/***/ }),
/***/ "@elementor/editor-controls":
/*!*************************************************!*\
!*** external ["elementorV2","editorControls"] ***!
\*************************************************/
/***/ (function(module) {
module.exports = window["elementorV2"]["editorControls"];
/***/ }),
/***/ "@elementor/editor-props":
/*!**********************************************!*\
!*** external ["elementorV2","editorProps"] ***!
\**********************************************/
/***/ (function(module) {
module.exports = window["elementorV2"]["editorProps"];
/***/ }),
/***/ "@elementor/editor-ui":
/*!*******************************************!*\
!*** external ["elementorV2","editorUi"] ***!
\*******************************************/
/***/ (function(module) {
module.exports = window["elementorV2"]["editorUi"];
/***/ }),
/***/ "@elementor/icons":
/*!****************************************!*\
!*** external ["elementorV2","icons"] ***!
\****************************************/
/***/ (function(module) {
module.exports = window["elementorV2"]["icons"];
/***/ }),
/***/ "@elementor/license-api":
/*!*********************************************!*\
!*** external ["elementorV2","licenseApi"] ***!
\*********************************************/
/***/ (function(module) {
module.exports = window["elementorV2"]["licenseApi"];
/***/ }),
/***/ "@elementor/schema":
/*!*****************************************!*\
!*** external ["elementorV2","schema"] ***!
\*****************************************/
/***/ (function(module) {
module.exports = window["elementorV2"]["schema"];
/***/ }),
/***/ "@elementor/ui":
/*!*************************************!*\
!*** external ["elementorV2","ui"] ***!
\*************************************/
/***/ (function(module) {
module.exports = window["elementorV2"]["ui"];
/***/ }),
/***/ "@wordpress/i18n":
/*!******************************!*\
!*** external ["wp","i18n"] ***!
\******************************/
/***/ (function(module) {
module.exports = window["wp"]["i18n"];
/***/ }),
/***/ "./node_modules/@monaco-editor/react/dist/index.mjs":
/*!**********************************************************!*\
!*** ./node_modules/@monaco-editor/react/dist/index.mjs ***!
\**********************************************************/
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ DiffEditor: function() { return /* binding */ we; },
/* harmony export */ Editor: function() { return /* binding */ de; },
/* harmony export */ "default": function() { return /* binding */ Ft; },
/* harmony export */ loader: function() { return /* reexport safe */ _monaco_editor_loader__WEBPACK_IMPORTED_MODULE_0__["default"]; },
/* harmony export */ useMonaco: function() { return /* binding */ Le; }
/* harmony export */ });
/* harmony import */ var _monaco_editor_loader__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @monaco-editor/loader */ "./node_modules/@monaco-editor/loader/lib/es/index.js");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
var le={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},v=le;var ae={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},Y=ae;function Me({children:e}){return react__WEBPACK_IMPORTED_MODULE_1__.createElement("div",{style:Y.container},e)}var Z=Me;var $=Z;function Ee({width:e,height:r,isEditorReady:n,loading:t,_ref:a,className:m,wrapperProps:E}){return react__WEBPACK_IMPORTED_MODULE_1__.createElement("section",{style:{...v.wrapper,width:e,height:r},...E},!n&&react__WEBPACK_IMPORTED_MODULE_1__.createElement($,null,t),react__WEBPACK_IMPORTED_MODULE_1__.createElement("div",{ref:a,style:{...v.fullWidth,...!n&&v.hide},className:m}))}var ee=Ee;var H=(0,react__WEBPACK_IMPORTED_MODULE_1__.memo)(ee);function Ce(e){(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(e,[])}var k=Ce;function he(e,r,n=!0){let t=(0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(!0);(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(t.current||!n?()=>{t.current=!1}:e,r)}var l=he;function D(){}function h(e,r,n,t){return De(e,t)||be(e,r,n,t)}function De(e,r){return e.editor.getModel(te(e,r))}function be(e,r,n,t){return e.editor.createModel(r,n,t?te(e,t):void 0)}function te(e,r){return e.Uri.parse(r)}function Oe({original:e,modified:r,language:n,originalLanguage:t,modifiedLanguage:a,originalModelPath:m,modifiedModelPath:E,keepCurrentOriginalModel:g=!1,keepCurrentModifiedModel:N=!1,theme:x="light",loading:P="Loading...",options:y={},height:V="100%",width:z="100%",className:F,wrapperProps:j={},beforeMount:A=D,onMount:q=D}){let[M,O]=(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(!1),[T,s]=(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(!0),u=(0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null),c=(0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null),w=(0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null),d=(0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(q),o=(0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(A),b=(0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(!1);k(()=>{let i=_monaco_editor_loader__WEBPACK_IMPORTED_MODULE_0__["default"].init();return i.then(f=>(c.current=f)&&s(!1)).catch(f=>f?.type!=="cancelation"&&console.error("Monaco initialization: error:",f)),()=>u.current?I():i.cancel()}),l(()=>{if(u.current&&c.current){let i=u.current.getOriginalEditor(),f=h(c.current,e||"",t||n||"text",m||"");f!==i.getModel()&&i.setModel(f)}},[m],M),l(()=>{if(u.current&&c.current){let i=u.current.getModifiedEditor(),f=h(c.current,r||"",a||n||"text",E||"");f!==i.getModel()&&i.setModel(f)}},[E],M),l(()=>{let i=u.current.getModifiedEditor();i.getOption(c.current.editor.EditorOption.readOnly)?i.setValue(r||""):r!==i.getValue()&&(i.executeEdits("",[{range:i.getModel().getFullModelRange(),text:r||"",forceMoveMarkers:!0}]),i.pushUndoStop())},[r],M),l(()=>{u.current?.getModel()?.original.setValue(e||"")},[e],M),l(()=>{let{original:i,modified:f}=u.current.getModel();c.current.editor.setModelLanguage(i,t||n||"text"),c.current.editor.setModelLanguage(f,a||n||"text")},[n,t,a],M),l(()=>{c.current?.editor.setTheme(x)},[x],M),l(()=>{u.current?.updateOptions(y)},[y],M);let L=(0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(()=>{if(!c.current)return;o.current(c.current);let i=h(c.current,e||"",t||n||"text",m||""),f=h(c.current,r||"",a||n||"text",E||"");u.current?.setModel({original:i,modified:f})},[n,r,a,e,t,m,E]),U=(0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(()=>{!b.current&&w.current&&(u.current=c.current.editor.createDiffEditor(w.current,{automaticLayout:!0,...y}),L(),c.current?.editor.setTheme(x),O(!0),b.current=!0)},[y,x,L]);(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{M&&d.current(u.current,c.current)},[M]),(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{!T&&!M&&U()},[T,M,U]);function I(){let i=u.current?.getModel();g||i?.original?.dispose(),N||i?.modified?.dispose(),u.current?.dispose()}return react__WEBPACK_IMPORTED_MODULE_1__.createElement(H,{width:z,height:V,isEditorReady:M,loading:P,_ref:w,className:F,wrapperProps:j})}var ie=Oe;var we=(0,react__WEBPACK_IMPORTED_MODULE_1__.memo)(ie);function Pe(){let[e,r]=(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(_monaco_editor_loader__WEBPACK_IMPORTED_MODULE_0__["default"].__getMonacoInstance());return k(()=>{let n;return e||(n=_monaco_editor_loader__WEBPACK_IMPORTED_MODULE_0__["default"].init(),n.then(t=>{r(t)})),()=>n?.cancel()}),e}var Le=Pe;function He(e){let r=(0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)();return (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{r.current=e},[e]),r.current}var se=He;var _=new Map;function Ve({defaultValue:e,defaultLanguage:r,defaultPath:n,value:t,language:a,path:m,theme:E="light",line:g,loading:N="Loading...",options:x={},overrideServices:P={},saveViewState:y=!0,keepCurrentModel:V=!1,width:z="100%",height:F="100%",className:j,wrapperProps:A={},beforeMount:q=D,onMount:M=D,onChange:O,onValidate:T=D}){let[s,u]=(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(!1),[c,w]=(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(!0),d=(0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null),o=(0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null),b=(0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null),L=(0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(M),U=(0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(q),I=(0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(),i=(0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(t),f=se(m),Q=(0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(!1),B=(0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(!1);k(()=>{let p=_monaco_editor_loader__WEBPACK_IMPORTED_MODULE_0__["default"].init();return p.then(R=>(d.current=R)&&w(!1)).catch(R=>R?.type!=="cancelation"&&console.error("Monaco initialization: error:",R)),()=>o.current?pe():p.cancel()}),l(()=>{let p=h(d.current,e||t||"",r||a||"",m||n||"");p!==o.current?.getModel()&&(y&&_.set(f,o.current?.saveViewState()),o.current?.setModel(p),y&&o.current?.restoreViewState(_.get(m)))},[m],s),l(()=>{o.current?.updateOptions(x)},[x],s),l(()=>{!o.current||t===void 0||(o.current.getOption(d.current.editor.EditorOption.readOnly)?o.current.setValue(t):t!==o.current.getValue()&&(B.current=!0,o.current.executeEdits("",[{range:o.current.getModel().getFullModelRange(),text:t,forceMoveMarkers:!0}]),o.current.pushUndoStop(),B.current=!1))},[t],s),l(()=>{let p=o.current?.getModel();p&&a&&d.current?.editor.setModelLanguage(p,a)},[a],s),l(()=>{g!==void 0&&o.current?.revealLine(g)},[g],s),l(()=>{d.current?.editor.setTheme(E)},[E],s);let X=(0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(()=>{if(!(!b.current||!d.current)&&!Q.current){U.current(d.current);let p=m||n,R=h(d.current,t||e||"",r||a||"",p||"");o.current=d.current?.editor.create(b.current,{model:R,automaticLayout:!0,...x},P),y&&o.current.restoreViewState(_.get(p)),d.current.editor.setTheme(E),g!==void 0&&o.current.revealLine(g),u(!0),Q.current=!0}},[e,r,n,t,a,m,x,P,y,E,g]);(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{s&&L.current(o.current,d.current)},[s]),(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{!c&&!s&&X()},[c,s,X]),i.current=t,(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{s&&O&&(I.current?.dispose(),I.current=o.current?.onDidChangeModelContent(p=>{B.current||O(o.current.getValue(),p)}))},[s,O]),(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{if(s){let p=d.current.editor.onDidChangeMarkers(R=>{let G=o.current.getModel()?.uri;if(G&&R.find(J=>J.path===G.path)){let J=d.current.editor.getModelMarkers({resource:G});T?.(J)}});return()=>{p?.dispose()}}return()=>{}},[s,T]);function pe(){I.current?.dispose(),V?y&&_.set(m,o.current.saveViewState()):o.current.getModel()?.dispose(),o.current.dispose()}return react__WEBPACK_IMPORTED_MODULE_1__.createElement(H,{width:z,height:F,isEditorReady:s,loading:N,_ref:b,className:j,wrapperProps:A})}var fe=Ve;var de=(0,react__WEBPACK_IMPORTED_MODULE_1__.memo)(fe);var Ft=de;
//# sourceMappingURL=index.mjs.map
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ if (!(moduleId in __webpack_modules__)) {
/******/ delete __webpack_module_cache__[moduleId];
/******/ var e = new Error("Cannot find module '" + moduleId + "'");
/******/ e.code = 'MODULE_NOT_FOUND';
/******/ throw e;
/******/ }
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/************************************************************************/
/******/ /* webpack/runtime/compat get default export */
/******/ !function() {
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function() { return module['default']; } :
/******/ function() { return module; };
/******/ __webpack_require__.d(getter, { a: getter });
/******/ return getter;
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/define property getters */
/******/ !function() {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = function(exports, definition) {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ !function() {
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
/******/ }();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ !function() {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ }();
/******/
/************************************************************************/
var __webpack_exports__ = {};
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk.
!function() {
/*!*********************************************************************!*\
!*** ./packages/packages/pro/editor-controls-extended/src/index.ts ***!
\*********************************************************************/
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ AttributesControl: function() { return /* reexport safe */ _controls_attributes_control__WEBPACK_IMPORTED_MODULE_1__.AttributesControl; },
/* harmony export */ CssEditor: function() { return /* reexport safe */ _components_css_code_editor_css_editor__WEBPACK_IMPORTED_MODULE_6__.CssEditor; },
/* harmony export */ DisplayConditionsControl: function() { return /* reexport safe */ _controls_display_conditions_control__WEBPACK_IMPORTED_MODULE_3__.DisplayConditionsControl; },
/* harmony export */ OptionsControl: function() { return /* reexport safe */ _controls_options_control__WEBPACK_IMPORTED_MODULE_2__.OptionsControl; },
/* harmony export */ conditionGroupPropTypeUtil: function() { return /* reexport safe */ _prop_types_condition_group__WEBPACK_IMPORTED_MODULE_5__.conditionGroupPropTypeUtil; },
/* harmony export */ displayConditionsPropTypeUtil: function() { return /* reexport safe */ _prop_types_display_conditions__WEBPACK_IMPORTED_MODULE_4__.displayConditionsPropTypeUtil; }
/* harmony export */ });
/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./init */ "./packages/packages/pro/editor-controls-extended/src/init.ts");
/* harmony import */ var _controls_attributes_control__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./controls/attributes-control */ "./packages/packages/pro/editor-controls-extended/src/controls/attributes-control.tsx");
/* harmony import */ var _controls_options_control__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./controls/options-control */ "./packages/packages/pro/editor-controls-extended/src/controls/options-control.tsx");
/* harmony import */ var _controls_display_conditions_control__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./controls/display-conditions-control */ "./packages/packages/pro/editor-controls-extended/src/controls/display-conditions-control.tsx");
/* harmony import */ var _prop_types_display_conditions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./prop-types/display-conditions */ "./packages/packages/pro/editor-controls-extended/src/prop-types/display-conditions.ts");
/* harmony import */ var _prop_types_condition_group__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./prop-types/condition-group */ "./packages/packages/pro/editor-controls-extended/src/prop-types/condition-group.ts");
/* harmony import */ var _components_css_code_editor_css_editor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./components/css-code-editor/css-editor */ "./packages/packages/pro/editor-controls-extended/src/components/css-code-editor/css-editor.tsx");
(0,_init__WEBPACK_IMPORTED_MODULE_0__.init)();
}();
(window.elementorV2 = window.elementorV2 || {}).editorControlsExtended = __webpack_exports__;
/******/ })()
;
window.elementorV2.editorControlsExtended?.init?.();
The post The Pyramids of Chi appeared first on Char's Footsteps.
]]>
The best way to get to the Pyramids of Chi is via scooter. It’s located just north of Ubud centre but it isn’t very walkable. There is a small car park just in front of the Pyramids of Chi entrance, so you will be able to park.
I believe they have a shuttle that helps take you back to Ubud centre. However, the three classes I tried were each at 7pm and the shuttle wasn’t still running after the class.
There is a cafe located on site with a range of healthy food options, from all day breakfasts to large plates. As you’d expect from a place like this, the food is vegan, organic, gluten free, sugar free etc. I only ate there once, but had a really tasty zucchini lasagne! I also enjoyed the impressive view of the pyramids with jungle trees in the background. Check out the menu on their site for more information on what’s on offer.

The Pyramids of Chi are two large, pyramid-shaped structures designed to “harness the natural energies of the earth and amplify the benefits of sound healing”. Created by Australian founders Peter & Lynn McIntosh, this unique venue combines ancient pyramid power with modern sound healing techniques to create a powerful space for meditation and relaxation.
At the heart of the Pyramids of Chi experience are their sound healing sessions. These sessions use a variety of instruments, including gongs, drums, and didgeridoos, to produce therapeutic sounds that help align and balance your body’s energy. The acoustics of the pyramids enhance the vibrations, supposedly promoting deep relaxation and healing.

My first two sessions here were their famous Light, Sound, Vibration classes. On both occasions, I chose to do the 7pm evening sessions in the hopes it would give me a restful sleep. I booked through their official website and was sent confirmation emails containing a QR code. Upon arrival, they’ll scan you code and give you a lanyard with a specific coloured string. This colour will correspond with the class you’re doing. I waited in the cafe, before having a quick briefing on how the Pyramids of Chi work and where I needed to go for my class.
Once in my pyramid, we sat in a circle for a brief introduction to each other and the session itself. The Pyramid had a few rows of water beds lined up, with blankets and eye masks. Without giving too much away, you lie on the water beds and the main lights are dimmed.

Once the session starts, you’ll experience various flashing lights overhead and hear different sounds, like the didgeridoo. It was a very unique experience and I left feeling very relaxed and much lighter. I would say your experience will be largely influenced by the people around you. My first class was packed and the guy next to me fell asleep, snoring throughout the session. Whereas the second one was very empty and undisturbed throughout.

The Pyramids of Chi offer guided meditation and yoga classes in their peaceful environment. These sessions are designed to help you connect with your inner self, reduce stress, and improve overall well-being. The serene setting makes it an ideal place for both beginners and experienced practitioners.

Throughout the year, the Pyramids of Chi host various workshops and retreats focused on wellness, spirituality, and personal growth. These programs are led by experienced facilitators and cover a range of topics, from mindfulness and breath-work to sound therapy and energy healing.
In addition to sound healing, the Pyramids of Chi offer a variety of other healing services. These include Reiki and chakra balancing all aimed at promoting physical, emotional and spiritual well-being.

All-in-all, I really enjoyed my time at the Pyramids of Chi. If nothing else, it’s a very relaxing area with beautiful scenery and no street noise. The cafe serves good, healthy food and the shop is filled with a variety of wellness products and souvenirs. There are so many different types of classes so definitely spend time on their site going through different options.
The post The Pyramids of Chi appeared first on Char's Footsteps.
]]>The post B211A Visa Bali: Everything You Need to Know appeared first on Char's Footsteps.
]]>After living and working in Melbourne for a year on the working holiday visa, my time was up. Despite moving to Australia with a relocation package from work, I had issues with the 482 sponsored visa application. With my WHV expiring date looming, my company allowed me to stay in Bali for 6 months, and come back to Australia on a new visa. The updated WHV is being released on July 1, 2024, omiting the need for the traditional 88-day farm work.
In this blog post, I’ll provide an overview of my experience applying for the B211a visa. This will include cost, application process, processing time, length of validity, and other key details those looking for a long-term stay in Bali need to know.
To make life easier, I went down the path of using a Bali visa agent. I chose a reputable agency, with good Google reviews and seemingly positive recommendations from those in Bali expat FB groups. After our initial correspondences, they requested a few items to get the application process started. This included:
You can apply through the Indonesian Government website. However, other backpackers I met who went down this route ran into a few issues. Primarily with the extension part of the visa. I didn’t go down this route, so can’t advise from personal experience.
Although this is a 6 month visa, it’s actually set up as a 60-day visa with the possibility to extend twice. Meaning there will be admin and costs every 60 days in order to get the full 180 days.
Typically the first extension has to be done at the immigration office, whereas the second one can be done through your visa agent. This is because they need to collect biometrics from you.
The visa cost will depend on a few factors including; if you a visa agent, their costs, how you choose to extend the visa and the processing time you choose. The quote I received from my visa agent in January 2024:
Normal Service: IDR 2,850,000 – 10 business days processing time.
VIP Service: IDR 4,700,000 – 3-4 business days processing time.
VVIP Service: IDR 6,500,000 – 2 business days processing time.
These processing times don’t include weekends or public holidays. The price included the visa fee, sponsor fee and free airport pick up for some destinations. These don’t include the price of extending the visas every 2 months. Each extension costs IDR 2,500,000. However, some agents will charge an additional IDR 1,000,000 to extend the first time, if you can’t go to the immigration office for biometrics.
I imagine prices vary slightly between different visa agents but this is what I was quoted.
Processing times for the B211a visa application averages 1-2 weeks. I was applying for the B221a offshore visa and chose the 10-business day turnaround as it was cheaper. However, my visa ended up arriving 6 business days after it was submitted. Be sure to factor in busy bank holiday periods, like Christmas and New Year, as this will slow down the process. Otherwise, it seems very quick.
The B211a visa valid for 60days with the possibility to extend twice, giving you a total of 180 days in Indonesia. You don’t need to leave the country for any visa runs. The process starts 2 weeks before your 60 days are over, by providing your visa agency with your passport. They will book dates for a visit to immigration to take biometrics and get the visa extended by 60 days. For your second extension, you won’t need to visit immigration. The visa agent can take your passport and sort the extension out.
The B211a can’t be extended beyond the initial 6 months, so once the visa expires, you’ll need to leave the country and re-apply for a new visa, if you intend on staying in Indonesia.
Although the entire application process was very smooth and straightforward, I ran into issues at immigration. My departure from Melbourne Airport was on Friday 2nd February, with my flight out of Indonesia on 11th July to London. This period of time is well within the allowed 6 month visa period. However, because the visa is technically only valid for the first 60 days, before you pay to extend, this caused issues.
The first problem was at Melbourne Airport, where the Quantas check-in desk said they’d never heard of the visa. Furthermore, they weren’t sure if they could accept my July flight as proof of onward journey, as it was after the initial 60 day visa period. After much explaining, they let me on the plane. I then had issues when I landed in Bali. For the same reason, he was concerned I’d overstay my visa. Luckily after some back-forth he let me through.
Overall, it was a pain free process and the visa agency were brilliant at sorting the bulk of it out.
For digital nomads, remote workers, and extended backpackers, the B211a visa provides an excellent long-term option for staying in beautiful Bali. The reasonably priced visa allows up to 6 months in the country with minimal processing time, hassle, and paperwork. With outdoor cafes and co-working spaces across the island, Bali is growing as a hub for location-independent lifestyles. Spend your days in rice paddy villages, surfing beginner waves, or eating fresh tropical fruit bowls – Bali has something for everyone. The B211a visa lets you fully experience all the magic for up to 180 days.
Check out my post on applying for the VOA in Bali for those looking for a shorter stay in Bali – 30 to 60 days.
The post B211A Visa Bali: Everything You Need to Know appeared first on Char's Footsteps.
]]>The post Nyepi: The Balinese Day of Silence appeared first on Char's Footsteps.
]]>Nyepi is derived from the word “sepi” in Bahasa Indonesia, meaning silence. It falls on the day after the dark moon of the spring equinox, usually in March or April.
Nyepi Day 2026 will be on Thursday, 19th March at 6am and ends Friday, 13th March at 6am.
The celebration begins with elaborate processions known as “Melasti,” during which Balinese Hindus purify themselves and their environment by taking sacred objects to the sea. This act symbolises the purification of the soul and the washing away of impurities.
Following Melasti, the island plunges into absolute silence and stillness. Traditional rituals, such as the “ogoh-ogoh” parade featuring giant paper-mâché monsters symbolising evil spirits, are held the night before Nyepi. However, once Nyepi starts, everything comes to a stop. The Balinese shut themselves indoors, refrain from using electricity, and abstain from work, entertainment, and even talking.
Nyepi is primarily celebrated by the Balinese Hindu community, which constitutes the majority of Bali’s population. However, its significance and impact extend beyond religious boundaries, as the entire island, regardless of faith, participates in observing the day of silence.
Hotels, businesses and transportation services will stop operations and tourists are expected to respect the customs by staying inside their accommodations. Most hotels and resorts will still let tourists use spas, pools, on-site restaurants but you won’t be able to leave the premises for the 24 hours its observed.
The government enforces strict regulations to ensure compliance, making Nyepi a remarkable example of communal solidarity and reverence for tradition. There are typically police or ‘local watchmen’ who patrol the streets, so you won’t be able to sneak out.
Understand and honour the solemnity of Nyepi by refraining from making noise or engaging in activities that disrupt the tranquility of the day. This includes not playing loud music, using electronic devices, or speaking loudly.
You can’t leave the house/your accommodation on Nyepi day. Use this time for introspection, meditation, reading, or engaging in creative pursuits. This is enforced by police and watchmen throughout the day to ensure people abide by these rules. I would highly recommend staying in a hotel or a serviced accommodation (like an apartment). I was staying in an Airbnb, with just a room and ensuite so I felt quite ‘cabin fever’ inside all day and had no way of cooking. If I had more notice (I found out about Nyepi day the night before), I would have booked into a hotel instead.
Stock up on essential supplies such as food, water, and medication before Nyepi begins, as stores and services will be closed during the day. This will need to be factored into where you stay. E.g. I was staying in an Airbnb, comprising on a room and ensuite bathroom that was separate from the main house. I also didn’t have any kitchen facilities in my room. As I had no way of cooking, I had to stockpile on dry goods to eat during the day.
Be sure to familiarise yourself with the customs and regulations associated with the observance. Make necessary arrangements for accommodation and activities that comply with restrictions.
Be mindful of local traditions and cultural sensitivities during your stay in Bali. Avoid engaging in behaviour that may be perceived as disrespectful or disruptive.
You won’t be able to fly in or out of Bali at all during Nyepi Day, so be sure to plan your trips with this day in mind.
With all lights off, you’ll be treated to beautiful sky nights full of stars.
Nyepi offers an opportunity for self-reflection, spiritual renewal and communal solidarity. Embrace the silence and stillness, by partaking in this ancient Balinese tradition, to get a deeper understanding of the island’s rich cultural heritage. Bali is the main place that celebrates Nyepi Day. If you find yourself not wanting to partake, I’d suggest you go somewhere else in Indonesia. Lombok, the Gili Islands, Komodo National Park are just some of the many places you could visit to avoid Nyepi Day.
The post Nyepi: The Balinese Day of Silence appeared first on Char's Footsteps.
]]>The post Things To Do In Ubud appeared first on Char's Footsteps.
]]>
Among the most recognisable images of Bali, is the Sacred Monkey Forest Sanctuary. If you’ve seen photos of Ubud, you would have likely seen the classic monkey selfies or heard people having to chase after their sunglasses. These are all typical scenes found in the Sacred Monkey Forest Sanctuary. Located in Padangtegal, just South of Ubud’s main hub, the Sacred Monkey Forest Sanctuary is home to over 700 long-tailed macaques, beautiful temples and stunning forests.

Given how tame the monkeys are, the Sacred Monkey Forest isn’t a place for relaxation. Both times I’ve gone, it’s been chaotic! With monkeys running around the place, trying to steal stuff off you. I was also unable to walk peacefully near the forest as the monkeys roam around the nearby streets, grabbing things off passer-bys. However, it’s definitely a unique chance to be up close to these beautiful creatures and see some lush greenery.

The Monkey Forest is open from 8:30am – 6pm every day and costs 80,000 IDR. It’s a hard one to recommend, because it’s a stunning place to visit, but there is a fair amount of abuse and scams going on here. Don’t engage with people trying to get you to hold the monkeys or get you to pose with them.
Bali is home to some of the world’s most beautiful rice fields, with many found in Ubud. The most famous rice field in Ubud is the Tegalalang Rice Field. You’ll find Tegalalang in the heart of Ubud, famously recognised for its incredibly picturesque rice terraces that cascade down the hillsides.

These iconic rice fields have become a symbol for Ubud and are a must see when staying in Ubud. My favourite thing about visiting these rice fields in particular was learning about the impressive irrigation system that helps sustain these fields and the engineering and labour that’s involved with shaping the landscape. As it’s such a popular spot in Ubud, it does get busy!

If you want to avoid the typical crowds at the Tegalalang Rice Terrace, I suggest you get there early! If you’re looking for a less touristic option, that will still wow you, consider going to the Penestanan Rice Field Walk instead. The 1.5km out and back walk is flat and mostly paved. You’ll be treated to incredible views of rice fields without the crowds. Another favourite of mine is the Unesco World Heritage Site of Jatiluwih Rice Terraces. Or just walk around outer areas of Ubud to still see a few, small rice fields.

Unfortunately, many rice fields across Bali have been destroyed to make space to accommodate tourists with new hotels, restaurants and bars. I was shocked at how many rice fields had been destroyed and built over between my first trip to Ubud in September 2018 to my most recent in 2024. Definitely the saddest part of going to Ubud, and Bali in general, was how developed and overcrowded it was.
The Ubud Markets are a great respite from a few days of seeing the main sights the town has to offer. The markets offer a vibrant and busy shopping experience, with everything from hand-carved woodwork, jewellery, textiles, souvenirs, shoes, clothes, bags and more! An array of local products that make for a perfect keepsake or a gift for back home.

It seems hit and miss in terms of how busy it gets. I’ve been at times where it’s so congested you can’t properly walk through and other times where it’s empty (as in my pics).

Choose to relax, unwind and rejuvenate at one of the many spas in Ubud. The town is well known for its traditional Balinese healing practices and holistic wellness experiences. The Balinese massage is a very popular treatment, comprising of acupressure and aromatherapy to promote healing.

Another popular spa treatment in Ubud is a Flower Bath. As the name suggests, you relax in a tub filled with fragrant flowers. There are a number of places to choose from, but arguably the most famous Flower Bath is held at the Udaya.
Whether you’re looking for a spa treatment, pamper day or a whole week of relaxation, there is something for everyone and every budget in Ubud. I enjoyed so many different spas but one of my favourites was Putri Ubud Spa – especially their lymphatic massage!

One of my favourite things to do in Ubud is to walk along the Campuhan Ridge Walk. This 2.4mile out-and-back trail is easily accessible by foot from Ubud’s centre and is a fantastic place to escape the town’s noise.

I’ve done the Campuhan Ridge Walk a number of times at various points during the day. Although it can get hot during midday, it’s really doable to hike this at any time. If anything, early in the morning was almost too busy!

The starting point is by Ibah Luxury Villas & Spas. You’ll find a path that will lead you to the Campuhan Ridge Walk. It’s worth noting that there’s free parking by the entrance if you’re coming by bike or car. There is no entrance fee for the Campuhan Ridge Walk itself either. Once you get to the end of the trail there are a few cafes to sit and enjoy a fresh juice overlooking the fields.

The Ubud Swing has become incredibly popular over the years, for adrenaline junkies and Instagram ‘influencers’ alike. Hanging from a palm tree, the Ubud Swing offers some incredible views of the surrounding rice fields and jungles.
I’m terrified of heights, so I sat this one out and was the dutiful bag-holder for the rest of my group. The queues were long, and it’s a very ‘Instagram vs reality’ moment as it appears to be a secluded spot….it’s definitely not. If you’re looking to get some iconic shots in Ubud, head here (preferably in the morning). However I’d personally say you can skip this and still have a great time in Ubud.
There’s an entrance fee, which will depend on the package you choose. Prices start at $10 USD for the basic entry and go up to $35 USD.
As with many tourist attractions in Ubud, your best way to get to the Ubud Swing is by taxi, hired driver or rented scooter. It’s about 20 minutes from the centre of Ubud but not walkable given the road quality.
If you’ve had enough of the traditional tourist places, consider signing up to a Balinese or Indonesian cooking class. There are a number to choose from and they range from private sessions to large group classes. Not only is this a great way to meet other people, but you’ll get to try authentic balinese cuisines. I chose one that included a market tour too, so we could pick out our ingredients!

Ubud is famous for its yoga and wellness retreats. If you’re looking to embark on a spiritual journey, or just escape from the chaos that is Ubud, there are plenty of options available.

The Yoga Barn and Radiantly Alive are both popular places to take yoga, meditation and other wellness classes in Ubud. Another popular favourite for sound healing and other wellness practices include the Pyramids of Chi. I had a few sessions at each of these places and had great experiences! There are other quieter studios dotted around Ubud if you’re looking for a more authentic and cheaper experience.

There’s also the Bali Spirit Festival, an annual gathering of yogis from around the world. Unlike other parts of Bali, there’s definitely a more serene and spiritual feel to Ubud – mainly outside the centre. I found a lot of these places were great to meet other people staying in Ubud longer term too.
Th Goa Gajah Cave, otherwise know as the Elephant Cave, is a stunning archaeological site located just outside of central Ubud, in Bedulu Village. If you have the time, and transportation means, it’s definitely worth checking out! The Elephant Cave is a archaeological site, dating back to the 9th century. You’ll find a series of intricate stone carvings of deities, mythological creatures and faces around the cave. Nearby is a beautiful little waterfall and bathing area. Over the years, the Elephant Cave has been partially destroyed by earthquakes.
Given that it’s a temple area, it imperative that you respect the culture and cover your knees and chest before entering the caves. This applies to both men and women. The entrance fee was 50k and that included a sarong to cover up if you’re caught short. To note, there were quiet a few stairs to climb, so this is best done outside of peak heat.
What you do in Ubud will depend on your budget, interests and how long you have there. The good thing is most places are a short walk or scooter ride away, meaning you can do most of the key sights in a few days.

Ubud is location about 40km away from Ngurah Rai International Airport. Public transport is vey limited, so it’s likely you’ll get a taxi or a pre-arranged service to Ubud. There are the blue taxis that will be waiting outside the airport. Otherwise, download Grab (Asia’s equivalent to Uber) and order a taxi.
If you’re travelling light – i.e. a small backpack – I’d strongly urge you to book a taxi scooter. Typically your bag can be kept between the drivers’s legs or on your back. This will not only save money but will be considerably quicker than taxi cars. The road quality in Bali isn’t good, and with the limited public transport, it gets very congested. Average journey time in a car should be 1.5 hours…last time took me nearly 3.
Getting public transport from Ngurah Rai International Airport to Ubud requires you to walk a short way to catch the K2B bus to Gor Ngurah Rai. From there, you’ll need to change to catch the K4B bus to Puri Ubud. Average journey time for this is 2-3 hours. This is the only place I’ve been too where I’d strongly suggest a taxi over public transport.
As with the majority of Bali, Ubud doesn’t have great public transport. The easiest way to get around Ubud is via scooter – either renting your own or taking a Grab scooter. Taxis are also common but more expensive and take longer with the usual traffic. For short journeys, book your taxi through Grab. For longer journeys, for example, Ubud to Canggu, I’ve had the best service and price from asking for recommendations in expat Facebook groups. Alternatively, your accommodation and tourist stalls in Ubud have taxis available – these will be more expensive.
In short, yes! If you’re entering Bali, you’ll need a visa. If you’re planning to be in Ubud short-term, I suggest apply for the Visa on Arrival or E-VOA. This will give you 30 days, with the chance to extend by another 30 days. Getting the VOA means having to extend physically in an immigration office, whereas the E-VOA can be extended online. If you plan to be in Ubud, or Bali, for longer than 60 days, I suggest you apply for the B211A Visa. I applied for this easily through an agency and it allows 6 months in Bali – you do have to pay for extensions every 2 months through the agency.
The post Things To Do In Ubud appeared first on Char's Footsteps.
]]>The post How to Apply for The Visa On Arrival in Bali appeared first on Char's Footsteps.
]]>The Visa on Arrival (VOA) is just a visa you need to enter the country, but one that doesn’t require you to apply ahead of time. These can be obtained at airports and any other major points of entry into Indonesia. For Bali, the VOA is typically obtained at the Ngurah Rali International Airport, also known as Denpasar International Airport.
Indonesia have now introduced an E-VOA, for you to easily apply ahead of time.
The Visa on Arrival in Bali currently costs 500,000IDR for the 30 day, single-entry visa. It’s recommended to pay in cash. Any change owed to you will be given in Indonesian Rupiah.
The 30 day visa extension will cost you $35 USD / 500,000 IDR – plus additional fees for biometrics.
You have two options for getting a Visa on Arrival. The traditional way to obtain a VOA is at the arrivals hall of the airport. The VOA desk is usually next to customs and is signposted. Here you’ll pay for the visa and receive a purple slip with your arrival date. You must keep this to exit the country so consider bringing a paper clip to attach it in your passport easily. Once you’ve got this, you’ll queue up at the immigration desks for stamps in your passport.
You can get an E-VOA for Indonesia from the official immigration site here. It costs the same but saves you queuing at the VOA counter and allows you to use the electronic gates at the airport.
Both E-VOA and VOA require you to have a valid passport for at least 6 months from the day you arrive in Indonesia. You must also provide proof of onward journey – particularly if you’re staying a while in Bali.
TOP TIP: there are typically queues at both VOA desks and the main immigration desk. SO I’d advise getting the E-VOA and getting out the plane quickly to avoid queues.
The visa on arrival in Bali is valid for 30 days. However, you can extend this for another 30 days, once! If you plan to be in Bali for longer than 60 days combined, it’s better to apply for different visas ahead of your journey. I used the B211A for 6 months with no issues. I know people who have done visa runs, to places like Malaysia, but some have had issues getting back into the country. Better to not risk it and come in on the correct visa.
If you applied for an E-VOA, you can extend your visa online, via the account you used for the initial visa. This is more convenient and costs the same price as extending a standard VOA. However, the drawback to this is not all points of entry accept the E-VOA. If you’re travelling to a popular tourist place like Lombok or Bali, you’ll be fine with E-VOA. Other less frequently used ports of entry might not accept it.
Unfortunately, if you entered Indonesia with a VOA from the airport, you must extend at an immigration office. This will include 3 visits to immigration; first to drop your passport and application form off, second for biometrics and interview, and third to pick up your passport.
If you’re trying to save money, you can do this process yourself. However, I was staying in Ubud – far from the three immigration offices – and decided to pay at agent to help the process.
The Visa Extension Agency I used were brilliant and absolutely worth the extra cost. In total, the visa extension and agency cost came to a total of 830,000 IDR. The process consisted of me dropping off my passport at the extension office, along with my proof of onward journey. They took some details from me, and with this, they sorted out all the immigration forms. They took my passport to immigration the next and informed me (via whatsapp) a few days later on the date I should go to the Immigration office. There are three in Bali, with the closest one to Ubud being in Denpasar. The other two are in Nusa Dua and near Uluwatu.

The immigration office was open from 7:30am -12pm and 1-4pm. My advice is to get there early! I arrived at 7:45am and was finished by 8am! I know some people who have had to queue for hours.
Once you arrive at immigration, you’ll need to go to counter 4 (biometrics and interview counter) and collect a queue number. I was number 10 in line and was seen very quickly. Inside the room, they’ll ask you a few questions on why you’re in Bali, where you’re staying for your trip and when you’re leaving. They’ll also take photos and fingerprints. My passport was ready to collect from the Visa Extension Agency in Ubud two days later. I was happy to only have to go to immigration once, and it was worth paying extra to have the agency go to and from immigration the first and third time.
You have to start the application at least two weeks ahead of the visa expiry date.
The visa on arrival in Bali is only available to certain nationalities and this list is always subject to change. Currently there are 87 countries eligible. It’s best to check out their immigration site here to see if your country is on the list. Some countries include;
In short, yes. All children will need a visa on arrival to enter Bali regardless of their age.
If you’re looking for a longer stay in Bali or Indonesia, consider looking into the B211A Visa. This allows up to 6 month in Indonesia and is a fairly straightforward process.
The post How to Apply for The Visa On Arrival in Bali appeared first on Char's Footsteps.
]]>