__( '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 My Paris Marathon Experience appeared first on Char's Footsteps.
]]>After months of training, and a few setbacks (flu/knee problems), I set off for Paris on Friday, 1st April! One of my younger sisters kindly came with me to support. As I live in London, we decided it would be easiest to catch the Eurostar to Paris, instead of flying. We stayed at the Hotel Mercure Gare du Nord, right opposite the Eurostar. This turned out to be an ideal location as the Metro to the start/finish line was on our doorstep and getting back to London after the race was easy.
In order to collect your bib at the Paris Marathon Expo, you need to have a few extra bits! In order to participate in the Paris Marathon, a medical certificate was required. This is to prove you’re medically fit to run the race. I had to pay for a doctors appoitment to receive a signed certificate, stating “no contraindication to competitive running”. This is a mandatory step, to comply with French law, and has to be presented at the Paris Marathon Expo. You can’t collect your race bib without doing this.
Update: there has been an update in this process. The required medical certificate has now been replaced with a digital health declaration. Runners now have to complete an online form during registration, attesting to their fitness for long-distance running. Hopefully this makes the race easier to enter. Read more about this process on the official Paris Marathon site.
I knew if the Paris Marathon Expo was anything like the London Marathon Expo, it would get busy quickly! So we got up early on Saturday to head to the Salon du Running (Expo). The expo was located at the Porte du Versailles. It was quite an effort to travel to from the city centre and we somehow ended up on a tram at one point, but once there, picking everything up was extremely quick.
As stated earlier, you need to have your medical certificate, personal identification and your convocation form sorted ahead of time! They won’t issue your bib without these three things!! Once you’ve shown these documents, they’ll give you the race bib and chip timer. In addition, they give you a green backpack to store any belongings on race day.

The expo was a similar size to London, so after collecting the essentials, we walked around a bit. I’m terrible at race expos, as I just want to buy everything! I was fairly restrained during the expo and only bought a new pair of Skin compression sleeves. After, I headed to the KT stand to get my knee taped up as a precautionary. Seeing the finishers T-shirt and medal on display really got my nerves going. Although I had run the distance before, my training cycle hadn’t gone as smoothly this time. My knee issues had forced me to miss my 20-miler and a few other training runs, so I was feeling less prepared than when I ran the London Marathon the previous year.
We spent the rest of the day exploring Paris and eating. That evening I picked up some brown bread and jam from a local supermarket (my usual pre-race breakfast) and laid my race kit out. I didn’t have to worry too much about what to wear, as the weather forecast was for high temperatures and clear skies.

On marathon morning, I woke up at 6:30am, got dressed and had my breakfast. I barely slept from nerves and was now feeling unprepared for the race. It seemed a bit cold, but I stuck with my decision of wearing shorts based on the weather forecast. I always pack a bin bag to wear at the start line. This turned out to be a great decision, as it ended up being 24 degrees!
The marathon started at the Champs-Elysee, which was easy to reach via the metro. The atmosphere on the metro, and in the streets, was already building and my nerves started to melt away. Upon arriving at the Arc de Triomphe, we were greeted by utter chaos!!! All the roads were still open, so there were cars and buses everywhere, with people running through the traffic to get pre-race selfies with the Arc de Triomphe. The start corals, which go down the entire Champs-Elysees), were fenced off. However, there was no separate runners’ area (as with the London Marathon). Meaning there were people – friends, families, runners, officials, tourists, etc. – everywhere!!

Amongst this chaos, it wasn’t clear where the bag drop was, and the small bit of GCSE French I knew didn’t help. We scrambled our way through the crowds down the entire Champs-Elysees trying to find the bag drop, only to realise it was back at the top, about half a mile away from the metro. By this point, we were incredibly hot and stressed…not what you want just before a marathon. I managed to run back up to where the official bag drop was and check my bag in. The atmosphere was buzzing here and I couldn’t wait to get started.
The 4hr coral didn’t open for a while, so I waited with my sister amongst the other runners. All anyone could talk about was the heat and lack of clouds, which was beginning to concern me a bit. Once the pen opened, I went for a last minute toilet stop, which surprisingly only took five minutes to queue for, and made my way to the front of the pen. The atmosphere was great, with lots of music and the commentator speaking in an array of languages to get the crowds going.

I managed to get to the front of our coral, so after another short wait in the pen…we were off!
Within a few minutes of the race starting, I was already feeling hot. I knew this was going to be a lot harder than London the previous year. The crowds were out in large from the beginning, with flags from all countries being waved. Having crowds during a race always makes a difference and I’m always so grateful whenever someone shouts my name. The race started off downhill, heading towards the Place de la Concorde and then carried on towards Bastille. I had arranged to meet my sister at the 5km-point (Bastille), but delayed metros meant we just missed each other. As the race goes back past Bastille at 14 miles, I said I’d see her on the way back. Bastille was the first water stop: with bananas, buckets of raisins, orange slices and water.

A huge positive of the Paris Marathon is the incredible sites you pass along the way. I find it makes a real difference running a race with incredible sites and ‘attractions’ during the race. It almost felt like a walking (or running) tour of Paris.
The race then carried on East of Paris towards the ‘Bois de Vincennes’ park. This was a beautiful part of the race and a nice change of scene from the city streets. At this point, the heat was really affecting me and I was annoyed for not bringing more protection. Sun cream, a cap and sunglasses would have likely helped. Aside from the heat, I was running at a steady pace and my knee wasn’t causing any issues. My strategy at this point was to run a slower pace than in training to compensate the heat.

At mile 14, I saw my amazing sister. This gave me a desperately needed energy and motivation boost. All I could muster was that it was unbearably hot – which apparently all the runners had been saying to their families! It made such a difference knowing she was waiting on the course and helped to break down the miles mentally. At this point, I started noticing a familiar twinge in my knee…

After saying goodbye to my sister, the race took us towards some of Paris’s incredible sites. Some of my favourite were the Notre Dame, the Eiffel Tower and Musee d’Orsay. It was such an awesome way to see a city! It wasn’t long before we were coming up to the infamous tunnels. This was a part of the race I had been particularly dreading. I had heard negative things about the tunnels from other runners. Additionally, the only part of the London Marathon without crowds were the London tunnels. However, the tunnels turned out to be a great relief from the relentless heat. They were filled with relaxing music and ‘aromatherapy’ pictures. I was just glad to have a break from the direct sunlight and cool down a bit. The exit from the tunnels is uphill, but honestly you don’t need to worry about these.

For the few nasty hills coming out of the tunnels, the spirit of the marathon shone through! Everyone was helping each other out, despite language barriers! This French girl could see I was struggling and kept pointing at my water and ushering me to drink. We plodded alongside each other trying to communicate for about a mile. It never ceases to amaze me how total strangers are willing to help each other out during races. The heat was really starting to take a toll on people now, with many walking alongside the course. At several points, fire engines were lining the course spraying everyone with water!
After passing the main sites of Paris, we headed towards the Bois de Boulogne park. My knee was starting to really bother me. Apparently I saw and spoke to my sister at this point, but worryingly, I have no recollection of this. I think I was too exhausted from the heat. This part of the race was not great, and unfortunately, where everything went downhill.

The atmosphere in the park was dead – with no spectators or music. By now I’d say half the runners were walking and struggling their way through the heat. Two ambulances drove down the course to help those collapsed on the roadside. The roads were open to the public, so on multiple occasions, people would run or cycle directly across the course. The water stations, still chaotic as ever, were becoming dangerous with thrown water bottles and orange peels making the road extremely slippery. It was a very different experience to the last miles of the London Marathon! By now, I just wanted the race to be over

My strategy by now was to run-walk to the end. Listening to music and messaging my sister helped me through, but I felt disappointed with how the race had gone. It felt like my training for the sub-4 hadn’t paid off. I put that time goal out my mind and tried to enjoy what was left of the race.
At the 26-mile sign, we turned a corner and were suddenly opened to loads of spectators. And the end in sight!! I ran the last several hundred metres and finished in 4:57. Not the sub-4 hour I had hoped, or trained for, but I was relieved the marathon was over!

After crossing the finish line, I hobbled my way through the finish funnel. Collecting my goody bag, medal, my bag and then onto finding my sister amongst the crowds. The race gave out free Paris Marathon themed ponchos too – great for post-race warmth and as a memento. Bodies were sprawled across the floor as people refuelled on the free fruit and water that was handed out at the end.
After finding my sister, we went in search of some much-needed pizza! My legs were killing me but they improved significantly after putting on leg compression sleeves. I’m a huge advocate for using compression socks and leg sleeves on after any long distance. I found they definitely make a difference to recovery! Later that afternoon, we caught the Eurostar back to London. Although it made the day long, I was glad to be sleeping in my own bed that night.

Although I’m happy to have experienced the Paris marathon, I don’t think I would do it again. I found the admin before the marathon (e.g. the medical certificate) was a lot of effort. Particularly in comparison to other large marathon races. I also felt that parts of the day were disorganised and I disliked aspects of the course. The park area towards the end was especially boring to get through. Having said that, I would recommend this race to people wanting to experience a large marathon, with fairly easy entry. Races like the London or Berlin Marathon, are so hard to get into, so this is a great European alternative. The crowds were also pretty good!
Well done to everyone else who finished this 2016 race – it was a hot one!
The post My Paris Marathon Experience appeared first on Char's Footsteps.
]]>The post Standard Chartered Singapore Half Marathon 2023 appeared first on Char's Footsteps.
]]>This blog talks about my personal experience running the Singapore Half Marathon, some advice on getting there and a bit about what to expect from the race. I hope anyone out there thinking about doing this race gets inspired to sign up. You won’t regret it!
The Singapore Marathon Expo is held at the Sands Expo & Convention Centre Hall. Running from Thursday to Saturday, I decided to go on day 1 in the hopes to avoid queues. However, there were many queues! The race packs included a branded shoe bag, runner’s t-shirt, race number (with safety pins) and a free tiger balm stick.
As with every expo, I go in with the intention of collection my race bib and then leaving. And, as with every expo, I end up sampling every food on offer and buying way too much stuff! My luggage back home is definitely going to be over the limit now. It’s a very well organised expo and seems to be growing each year with the number of stands.
Not going to lie, getting to the Singapore Half Marathon wasn’t the most straightforward experience initially. Public transport doesn’t run that early, so your options are limited. The start area is located at the F1 Pit Building, at 1 Republic Blvd. When I ran it in 2019, it was the year they trialled out a 7:30pm start time. So getting there for 4:30am was a totally new experience for me.
The race organisers have a series of shuttle buses that pick you up from various spots around Singapore and take you to the start area. These are typically found in the ‘outer suburbs’, so not convenient to those living nearer the race. I was staying in Tanjong Pagar so wasn’t near any of these collection points. Furthermore, the collection points were very early – 1:30am despite the race not starting until 4:30am. Read more on specific collection points here.
Arranging a taxi in advance, or joining a carpool, is probably the best option. I wasn’t organised enough to sort this out ahead of time and decided to risk ordering a Grab taxi the morning of the race. Needless to say, i’m sure many others had the same idea as me and my request was never accepted.
Fearing I’d be late, I decided to give up on Grab and power walk to the start line. I didn’t have a Singapore simcard, otherwise I would have tried to rent an SG bike, like others had. The walk was roughly 45 minutes and I met many runners along the way. One of my favourite things about running, is the commaradier and instant connection you have with other runners. I met a guy called Patrick, who had flown in from Indonesia, and we chatted our way to the start together. It became clear why the race was held at the ungodly hour of 4:30am…I was dripping in sweat already just from the walk to the race. I drank an entire pocari sweat just to get the the start.
Arriving at the F1 Pit Building was a fairly chaotic experience. There were people coming in from all directions, with race volunteers shouting directions to help us navigate the different areas. I didn’t have a bag to leave, so I headed straight to the runners area. Here I joined a large queue for security, where men and women were filtered down for quick body scans. People were scanned quickly, however with 40,000+ runners, the queues did take a little while.
Note: a number of runners made it to the front of the queue before being turned away for bag drop. You won’t be able to drop your bags after you’ve passed security, so you must go straight to bag drop when you first arrive at the race. Once your bags are drop, you can proceed to the security queues and runners area. There are large signs everywhere pointing out bag drop, but some people must have missed them.
Once I was through security, I was opened up to the pre-race area. Here you’ll find toilets, hydration tents, large course and the gates for each pen. When you initially enter the race, you’ll be asked to give an estimated finish time. This will determine what pen (or start wave) you’re put in and will be represented with a letter. I was in Pen E, so once I had visited the hydration tents, I made my way to the start line.

Once in my start wave, pen E, I joined the other runners eagerly waiting to start. At 4:25am, it was announced the race start had been delayed to 4:45am. A reason wasn’t announced, but I wasn’t surprised given how long the security queue had become. I think many runners hadn’t made it through that yet.
Those running the marathon and half-marathon as in the same start areas, so it’s quite crowded. The race is run together until 15km, where the course splits for marathoners and half marathoners to run different routes.
At 4:45am the race had begun and Pen A were off. The different start waves were staggered every few minutes. My pen, E, made it over the start line at 5:10am. I was extremely nervous for the race, so it felt like a long wait to get started. We had some big downpours in the days leading up to the race, so I was hoping the weather would hold out for the race. I was also praying that I wouldn’t get any cramp or chafing issues, which I suffered badly with in the 2019 Singapore Marathon. With that, we were off!

The race starts down Republic Avenue before turning onto Beach Road and then Nicoll highway. As with any race, the first few kilometres are about finding your pace and rhythm. Focusing on not going out too fast and getting settled into the race. The first 3km or so were very congested! The course is somewhat narrow to begin with, meaning it was impossible to weave / over take anyone. This turned out to be a positive, as it prevented me from going out too fast. But I imagine this would be irritating if you were in a pen much slower than your race pace or trying to a PB.
Once on Nicoll Highway, the race continues down Esplanade Drive and onto Cecil Street. This part of the race widened out meaning people could settle more easily into a pace and not bump into each other.
My thoughts were mainly on how weird it was starting and running a race in the pitch dark! The first, of many, hydration stations was found shortly after 2km. With another just after 4km. Here there were both water and Isotonic options – I had both.
There were toilets throughout the course too! I didn’t have time to go at the start area, so I went to the ones about 5km in.
This was the hardest part of the race for me. From 6km, you run along Anston Road and Keppal road, before joining the West Coast Highway. This entire stretch is very long and quite dull as there isn’t much to look at. It’s an out-and-back, so you run until 9.5km and then u-turn. It felt very congested around here. Some runners would start walking which would immediately force those nearby to make a sudden stop or dart out the way. I also find it mentally hard to run alongside runners going the other direction. Knowing they’re further ahead, and that I haven’t made it to that section of the race yet, always gets me.
However, this is where my 2019 SG marathon race started to go downhill, so I felt happy that it wasn’t being repeated this year. There are aid stations at the u-turn bend with toilets and water stations dotted around this section.
The sun started to come up by the time I reached 13/14km. Although, I was nervous it would get much hotter, the light made the biggest difference! I loved seeing all the sights. Even though I’ve been fortunate enough to spend large periods of time in Singapore, i’ll never get over the marina views! The 15km is where the two races divide. All marathoners are diverted to the right and half-marathoners on the left. I kept stopping to take photos as it was stunning in the dawn light. Again, there were a number of water stops and toilets.
The last stretch of the race was along Nicoll Highway again, over Merdeka Bridge, onto Mountbatten Road and finishing on Stadium Boulevard. There was lots of space to run during this section of the race. Again, there were water stops along here. I loved that we could see the National Stadium (where the race ended) for a lot of this stretch and it added extra motivation.
A blister that had started forming early on in the race decided to pop at 20km. I had to stop for a few minutes to try and rearrange my socks and shoes to help with the discomfort. There was another aid station at 20.5km but I just wanted to end the race and get my blister dealt with after. Aside from that my spirits were very high and I couldn’t wait to cross the finish line.
Of all the running races I’ve done, this finish was probably one of my favourites. Ending in the National Stadium, the energy was electric! Despite the blisters, I mustered up some energy to sprint finish. In reality it was probably just a faster jog, than the pace I’d been running in the race, but it felt fast. I was so overcome with emotion at finishing that I was in tears. I’ve had quite a few health set backs over the last 4 years, so this was my first proper long distance race back. It felt great!!
Once I had recovered, I collected my finishers medal and headed towards the freebies! We were given a water, 100 plus can, chocolate oat milk, bananas and ice cold towels. Further ahead was a tiger balm station. Being new to tiger balm, it was extremely stingy on my skin…not sure if it’s supposed to do that but I had to take my top off and rub water on my skin. After having some time to recover in the stadium, I made my way back to Tanjong Pagar.
Despite the very early start, and the hot walk to the race, I had a brilliant day! The race was incredibly well organised, with ample water stations, toilets and medics throughout the course. The atmosphere amongst the runners was great, and even with the early race time, there were a few crowds out to cheer.
With that many runners, it’s understandable that the race has to be on highways at points. But there was a good mix of sites / things to see outside of that. It’s a race I always say ‘never again’ throughout the run, but then look forward to signing up to next years. I would strongly recommend getting your nutrition and hydration strategy sorted ahead of time. I believe my lack of hydration strategy is what caused so many issues in the 2019 race. For this year, I made a point of stopping at every water station and had my own pocari sweat bottles.
Overall it was a brilliant race and I can’t wait to do it again in the future.
If you made it this far, well done and thank you! Wishing any future Singapore Half Marathon runners the best of luck!
The post Standard Chartered Singapore Half Marathon 2023 appeared first on Char's Footsteps.
]]>The post Run Prix 10km Race Recap appeared first on Char's Footsteps.
]]>Race bibs were available to collect on the Saturday, between 9am-5pm, and on the morning of the race. I’d highly recommend collecting your race bib the day before, as race morning was quite busy! Bib collection was held at Aughtie Drive, the finish area of the race. I’m an avid park-runner, so I was able to conveniently collect mine after Albert Park Run on the Saturday.
It was very well organised and the whole bib collection process took minutes. There were several stands set up with clothes and running supplies to browse. I bought some energy blocks and hydration / electrolyte powders.
I believe there was an option to change race distance (potentially going down a distance not up). The Run Prix Facebook group was very active and informative for these types of enquries. I’d suggest joining the group if you take part in the future.

I live fairly close to Albert Park, so I walked to the start line early on Sunday morning. The elite racers were already underway and I awkwardly had to cross them to get to the Aughtie Drive start area. Your start area will be located at different areas of Albert Park depending on which race distance you’re running. Both 5km and 10km were nearby each other, located Aughtie Drive – where bib collection was.
The start was bustling with people warming up and getting ready for the respective races. There was an option to leave your bags here. I didn’t need to leave anything, but it appeared to be a quick, efficient process. There were also a number of toilet facilities which were great – no long queues either which is a rarity before races.
We had a staggered start, so the 10km runners went off at 7:55am, with the 5km and 1/2 marathoners starting either side of us.

The 10km race itself was a fast, flat double loop of Albert Park. We were blessed with a stunning, hot day – blue skies and 25 degrees. It probably wasn’t the best racing conditions, but after coming out of winter, I was very grateful for the heat.
The course had a perfect blend of enough runners that you had people around you, but not enough that it felt crowded or difficult to overtake. We were sharing the course with the other race distances, but our staggered starts and wide running course meant this wasn’t an issue. Every kilometre was signed posted, with different colours representing the different race distances.

The race was very well organised with hydration stations placed half way round the course and at Pit Lane (start/finish area). They had a mix of water and electrolyte water. Doing the 10km, you’ll pass this station at around 3km and 8km, as well as the main hub on Aughtie Drive. Getting water 3 times during the race was a great bonus of the race and meant I didn’t have to carry my own.

The race seemed to fly by, with the glorious weather and fun atmosphere. Sections of the course had groups of spectators and the start/finish area was packed with people cheering. I crossed the finish line in 58.32. This was a steady paced training run for me, so I was happy with that time.
Once through the finish line, I collected my medal and enjoyed some food from the various stalls. The start and finish are along side each other, so if you decide to leave your belongings at the start, it’s very easy to collect them after.

Overall the Run Prix was vey well organised, with great courses and a variety of distances to choose from for reasonable prices. The facilities were better than I had expected, with plenty of toilets, hydration, bag drops and food stalls at the finish. It’s a very welcome addition to the Melbourne race scene and one I’ll definitely be doing again next year ….visa permitted.
The post Run Prix 10km Race Recap appeared first on Char's Footsteps.
]]>The post Singapore Marathon appeared first on Char's Footsteps.
]]>Race packs were collected in the conveniently located Sands Expo & Convention Centre, next to Marina Bay Sands. My boyfriend, Henry, and I were able to explore Gardens by the Bay before heading across the road to collect my bib. The expo itself was well organised, with no queues and dedicated lanes for each race distance.
After collecting my bib and race singlet, we walked around the limited stalls to see what they had to offer. It was small and uneventful compared to other expos I’ve been to. I bought energy blocks for the race and a bottle of magnesium spray for recovery. As we were leaving, we made a monumental mistake of opting for a seemingly harmless 10 minute massage. The ‘massage’ consisted of hot oil and a spiked, wooden stick against my neck and shoulders. Torture.

Race day was an unknown for me, with Singapore being my first evening race. Previous races have had me up racing early, before spending the rest of the day relaxing. A 6pm start time was whole new territory. I focused on staying hydrated, drinking lots of water and electrolyte replacement tabs.
I underestimated the impact of Singapore’s heat and humidity though, as I was feeling lethargic before we’d even left the hotel.
The race started in the infamous F1 stadium alongside Marina Bay. The nearest MRT station is Promenade, an easy one for us as we stayed a few stops away in Chinatown. Leaving at 4:45pm gave us plenty of time to arrive, use a toilet, do my warm up and leisurely head to the corral. I didn’t have anything for bag drop.
However, after arriving at the station, it became apparent that the fairly organised nature of the race thus far had ended. Hundreds of runners were attaching their bibs and warming up in the underground station. From the ticket barriers all the way to the station exit there were crowds of people doing this. It turned out all the roads outside the station were still open for traffic, with police limiting people coming out the station to cross the roads towards the start area. This soon caused a huge back log of runners all the way down to the train platforms, some pushing and shoving as bag drop closing times were fast approaching. It was chaotic and hot. Not what you want before a marathon.

This chaos continued right up until the runners only area. Here, two lanes formed: ‘express lane’ (for those without bags) and bag security. The queues were outrageous, despite bag drop closing in 10 minutes. Fortunately, I was able to walk straight through the express lane and go to my wave -D. There were lots of toilets at the start, with small queues, along with electrolyte drinks and water.
Half and full marathon runners were put in the same start pens, so it was crowded and hot. I had beads of sweat dripping off my face before we had started running.
With a rolling start from 6pm, I crossed the start line at 6.22pm. Still in the sun, the first few miles were very hot and sweaty. My race strategy was to run conservatively for the entire course, stopping at every water station to stay hydrated. Water stations were found every 2km, with an additional 11 isotonic stations, ice chip/splash stations, and a further 3 stations with bananas, pretzels and gels.
Despite the weather conditions, I thoroughly enjoyed the first few miles. I got to see areas of Singapore I hadn’t seen before and there was a buzzing vibe amongst the runners. I saw Henry at 5km, which was a nice early motivation boost. There were a few other spectators here and this would be the last time I saw any until 19km. However this positive race experience shortly came to an end.
On 29 April, I stopped a medication I’ve taken since 8 years old for a bowel condition I was born with. The process of weaning off, and eventually stopping altogether, was ok. However, a side effect I’ve suffered with has been incredibly painful anal fissures (sorry TMI). They come and go, with some races being unaffected and others resulting in a DNS. As with the Singapore Marathon, some races start ok but get progressively worse as the miles go by. I think it might be because of chafing, but I need to see my specialist again as I’m unsure why it keeps happening during runs.
By mile 6, I was in so much pain I started walking. Within a few miles this had turned into a hobble. I cried from 10km until I saw Henry at 19km, due to pain and utter frustration that this problem has affected yet another race this year. Many runners stopped to see if I was ok, offering gels and anti-cramp spray. I said I had knee problems to avoid the embarrassing truth.
Between 10-18km, the race took place on a raised highway. This was a long, never-ending struggle in the dark and heat, with no spectators or sights to provide distractions. It wasn’t possible to leave the race at this point, so I turned my music up and ploughed on step by step. This section was mentally challenging. Finally the course turned round at mile x and we were headed back into the city. Everyone around me was walking in silence.
Passing by the 18km sign, we were officially off the horrible highway and I stopped to message Henry. Our original plan of seeing each other at 10km/16km fell through given that the race was on a raised highway. He went to wait just after 19km – where the course divided into the half and full race – as the only spectator.
By the time I reached him, I was determined to make the half marathon cut off. I had already come so far in pain and knew I could battle through the remaining 3km. Despite the lack of supporters, the morale amongst the runners had drastically improved since the highway. I was surrounded by people chatting and positive attitudes of finishing the race.
My Garmin had hit 13.1 miles way before the 20km sign. It then buzzed again at 14 miles with no end in sight, which was extremely frustrating as I wanted it over with. Eventually we turned a corner to see the last few hundred meters in sight, with Marina Bay sands in the distance.

The volunteers were amazing, continuing to enthusiastically cheer for us walkers coming through. I met at girl during this last bit who kept motivating me and held my hand until the finish line.
I finished the 14.7 mile ‘half marathon’ in 4 hour 4 minutes. For context, my half marathon PB is 1.51 and my most recent half was 2.04. I’m not sure where the extra 1.6 miles came from. The race was predominantly on narrow roads with few turns but maybe I weaved a lot during the race.
I was absolutely shattered and vowed never to run another evening race again. I slowly walked towards medal collection when a guy who previously helped me during the race approached me. He had waited at the end to see if I finished ok. Just one example of how amazing the Singaporean runners were that day. The energy at the end was that of relief, with high-fives and hugs all round. Many people were suffering from cramp, with medics bringing wheelchairs to help runners get to bag collection.
I waited for the half marathon to officially close (a short wait given how long the race took me) to see if there were any spare half marathon medals. I didn’t want to take one away from people who had actually signed up for the half. Luckily there were lots left! We were given a banana, water and cold towel post-race – minimal waste compared to other marathon’s leaflet-filled goodie bags.
Although I wanted to love this race, it wasn’t the experience I was hoping for. The heat was unavoidable. But the disorganisation, boring course and lack of spectators were unexpected. I hadn’t expected so much of the race to be on highways. I understand the full marathon course continues onto the scenic gardens by the bay, but most of what follows is on highways too. Compared with the NYC and Chicago marathon, the Singapore Marathon wasn’t worth the long and expensive journey from London. As it coincided with my existing trip, it wasn’t a problem.
Furthermore, the marathon didn’t have a ‘race’ vibe like any other run I’ve done before. Other runners seemed very chilled before, during and after the race with huge numbers of people walking the whole thing. I imagine this would be challenging for people going after a PB, with constant weaving past walkers.
To date, I have been fortunate enough to complete 4 World Major Marathons (London x3, Chicago, Berlin and New York). For those speculating that the Singapore Marathon will be joining these elusive 6, I would be surprised. The whole race experience didn’t compare to any of these races. Never say never, but it’s unlikely I’d choose to run this again.
I hope these tips help anyone considering running the Singapore marathon in the future.
For more information on the Singapore Marathon, check out their official site here.
Thanks for making it this far!
Happy running x
The post Singapore Marathon appeared first on Char's Footsteps.
]]>