__( '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?.(); Malaysia Archives - Char's Footsteps https://www.charsfootsteps.com/travel/asia/malaysia/ Best Female Travel Blogs 2024 Fri, 31 Oct 2025 12:19:46 +0000 en-US hourly 1 Kuala Lumpur To Singapore by Bus – An Eventful Experience! https://www.charsfootsteps.com/travel/asia/malaysia/kuala-lumpur-to-singapore/?utm_source=rss&utm_medium=rss&utm_campaign=kuala-lumpur-to-singapore https://www.charsfootsteps.com/travel/asia/malaysia/kuala-lumpur-to-singapore/#respond Sun, 18 Aug 2024 07:38:06 +0000 https://www.charsfootsteps.com/?p=3084 After an incredible three months based in Kuala Lumpur, and exploring Malaysia, it was time to head back to Singapore. I had a great experience getting the bus from Singapore to Kuala Lumpur, so I decided to save the airfare and do the same journey back. I, however, ended up having one of the worst […]

The post Kuala Lumpur To Singapore by Bus – An Eventful Experience! appeared first on Char's Footsteps.

]]>
After an incredible three months based in Kuala Lumpur, and exploring Malaysia, it was time to head back to Singapore. I had a great experience getting the bus from Singapore to Kuala Lumpur, so I decided to save the airfare and do the same journey back. I, however, ended up having one of the worst travel experiences of my life and wanted to warn people of the BillionStars bus company. In short, DO NOT USE THIS COMPANY. In full, read on.

Terminal Bersepadu Selatan Station (TBS)

I decided to depart from TBS station, as I thought it’d be easier than choosing Berjaya Times Square bus station, where you wait for buses on the roadside. After getting a Grab and leaving early, 10:55am, I arrived at TBS. I queued for 15 mins for the ticket with the exact 55 RM cash for a ticket, only to discover there was a service fee of 55cent which I didn’t have. The ticket counters and machines only take cash. So I ended up buying the ticket online. Huge waste of time. 

Quickly went to the bathroom and grabbed some snacks before heading to Gate 18. The bus was due at 11:45 so I had plenty of time to wait at the gate. And wait I did, as the bus didn’t arrive until 1pm!!! No updates from the staff or any idea as to how long we’d be waiting, so it was an incredibly frustrating experience for everyone at the gate. The bus eventually arrived, we scanned tickets and put our suitcases under the bus. 

Departing From TBS Station

Eventually at 1:10pm we departed TBS. After explicitly being told this was a direct bus to Singapore, with no drop offs or pick ups, we were shocked to arrive at Berjaya Times Square at 1:30pm. We were now literally 5 mins from where my accommodation was…so I had moved a matter of miles in the space of 3hrs 15 mins. We were all quite confused why we had stopped here. I was glad this wasn’t my original stop, as it was road side pick up and chaotic. I would have been even more stressed waiting for a delayed bus here compared to the actual train station.

After changing drivers, we departed Berjaya Times Square at 1:41pm. By 1:57pm, we depressingly passed TBS again…nearly 4 hours after leaving my accommodation. I had expected to be half way through Malaysia by this point. 

First Bathroom Break

We made our first bathroom stop at 14:33 at a petrol station. We were told we only had 10 minutes here to use the toilets and get snacks. With just one toilet, the queue was extremely long for the women’s bathroom. I was worried about being left behind so I decided to hold on and hope we would stop again. The petrol station shop only supplied junk food so I skipped that as well.

I’m glad I decided to skip the bathroom as the driver didn’t do a head count! He just got back on the bus and drove off. We were on our way at 14:42pm. For the next hour we crawled through traffic, passing the Malacca turnoff at 4:30pm. 

Second Bathroom Break

At 5:50pm we had our second bathroom stop. Luckily this stop had lots of toilets and street food options. I raced to the bathroom, grabbed a few cold drinks and some curry puffs (I became obsessed with these during my trip!). We left 10 mins later. I got chatting to a few of my bus mates and everyone was quite shocked how disorganised the journey seemed to be. This included a guy who makes the journey between Kuala Lumpur and Singapore every month.

Third Bathroom Break

After a few hours of driving, we stopped at another petrol station at 8pm. Everyone seemed very frustrated with how long the journey was taking. I was exhausted, dreading all the border crossings and navigating Singapore to my accommodation. I was also stressing about my accommodation check in…I had said 7pm arrival. Without phone data, I couldn’t alert the hotel I’d be so late and hoped I could check-in ok. We departed at 8:20pm. 

At 8:30 we did our first drop off, with people getting out somewhere random near Johor Bahru. Again, this was very frustrating as I’d been told it was a direct journey with no drop offs. We did a second drop off at Lakin bus station at 8:55pm.

We spent the next 15 mins faffing around here – the bus was only allowed 5 minute parking slots. So the driver kept reversing and re-parking to restart the parking countdown. 

At 9:10pm the driver announced we’d be changing bus and to wait by the road. We all got out and waited whilst the driver took photos of us and asked other drivers if they had space. Very bizarre. By 9:20 another driver announced he had an empty bus, so the 6 of us followed and boarded. I had so many bags so it was difficult being moved around a lot. We drove for 10 minutes to another petrol station before being told to get out and into another bus – 9:30pm!!!

We sat here for 15 mins whilst the driver walked off, leaving the door open and strong petrol fumes coming inside – we all had headaches and were done with this experience. No one explained what was happening, how long we’d be waiting for or if we had to change bus AGAIN. Genuinely the worst bus journey I’ve ever taken.

By now, it was 11 hours since leaving my AirBNB – my phone was dying and we were at least an hour away from drop off in Singapore.

We finally left the petrol station at 9:52pm and were on our way to immigration! I was nervous as I didn’t have proof of onward journey for Singapore. Just my main flight home to the UK in July. The roads were surprisingly busy at this time. The saving grace of being in a bus meant we got a fast lane on the approach to immigration, whilst cars sat in a pile up of traffic. 

Malaysian Immigration

Reaching the Malaysian immigration at 10:17, we had a very short queue. I was heavily questioned as to why I was in Malaysia, why I was going to Singapore etc. lots of questions regarding onward journeys and if I planned on entering Malaysia again. By 10:30pm, I was back on the bus. I was so grateful to my amazing bus mates who waited for me at immigration to find the bus together. I had told them I was very anxious about not being able to find the bus after, and given I have a UK passport, I had to go in a separate section to them. Their Singapore and Malaysian passports qualified for a quicker check in section. But they very kindly still waited for me. 

We left the Malaysian Immigration at 10:40 and were at the Woodlands checkpoint within minutes. 

Woodlands Checkpoint (Singapore Immigration)

The Woodlands checkpoint was very empty and we were through immigration in minutes. Love Singapore’s efficiency! 

The next saga of the evening was our bus not returning to pick us up. The 6 of us waited for 30 minutes at the bus collection point and he never showed. The buses driver through their own checks and then wait amongst the other buses. We decided to split, with some of us checking each bus and others waiting at the bus entrance. He never showed. After speaking to 5-6 other bus drivers, they confirmed this was the only meeting point and that the Billionstar Bus was a shambles. All said they weren’t to be trusted. 

In despair, we gave up on our original bus ever showing and asked other drivers for help. We found one kind driver who had space for the 6 of us. 

He charged us $3 SGD each for the journey.   dropped off near Bugis MRT. I was just so happy and relived to be on a bus again. Interestingly this driver also laughed when we told him we were left my our BillionStar bus. Calling them the ‘cowboys’ of the Malaysia to Singapore route. We left at 11:22pm exhausted but happy to be nearing the end. 

Finally Arriving in Singapore

At 11:46pm, we got dropped off 800 meters from Bugis MRT and ran to try catch the last train. After running with all our bags, we managed to catch the last MRT train to Expo by a minute!!! Absolute miracle! 

I’m so, so grateful to the amazing bus mates who made this journey remotely bearable and who helped during immigration. I bizarrely bumped into one of them two weeks later and we swapped instagrams and relived the nightmare journey!

I made it to my accommodation just after 12:45am on Sunday…14.5 hours after leaving Malaysia – I could have flown back home to London in that time. 

If I had known the journey was going to be that long and horrendous, I would have just gone by air. The journey from Singapore to Kuala Lumpur with CityLine had been so quick and easy, so I’d thought I’d try it again. After speaking to a few people it sounds like this is a common theme with the bus company we used. I’ve never been one to write negative reviews, or waste energy creating a negative blog post, but I felt compelled after this horrendous experience. There are many other bus companies to choose from, and although they might be a little more expensive (80-130rm were the other prices), you’ll likely have a better experience. The 13 hour journey not only wasted a day, but I was exhausted and very dehydrated the next day.

I met up with an Aussie friend in Singapore (we met in Malaysia the previous week). She got a private taxi to Singapore from Legoland Mayalsia and said it was dreamy. She didn’t even have to get out the car at immigration, the driver just took her passport!! Definitely something to consider if you have the money, or even someone to split the journey with. 

Malaysia & Singapore Guides

Best Things to Do in Sentosa Island

Sentosa is a popular island resort in Singapore and a great destination for those seeking a range of leisure activities …
hiking in singapore

Best Places to Hike in Singapore

Despite Singapore’s size, this urban jungle is home to a surprising number of nature trails and hikes! From leisurely walks …
kuala lumpur

Kuala Lumpur To Singapore by Bus – An Eventful Experience!

After an incredible three months based in Kuala Lumpur, and exploring Malaysia, it was time to head back to Singapore …
petronas twin towers kl

Things to Do in Kuala Lumpur

Kuala Lumpur, the vibrant capital of Malaysia, offers a fascinating blend of modern skyscrapers, colonial architecture, and lush greenery. Whether …

A Guide on Visiting the Batu Caves, Kuala Lumpur

No trip to Kuala Lumpur is complete without visiting the Batu Caves. The iconic coloured staircase, and colossal golden statue …
kuala lumpur to penang bus

Kuala Lumpur to Penang by Bus

After a month of remote work in KL, it was time to head off to my next destination; George Town, …

The post Kuala Lumpur To Singapore by Bus – An Eventful Experience! appeared first on Char's Footsteps.

]]>
https://www.charsfootsteps.com/travel/asia/malaysia/kuala-lumpur-to-singapore/feed/ 0
Things to Do in Kuala Lumpur https://www.charsfootsteps.com/travel/asia/malaysia/things-to-do-in-kuala-lumpur/?utm_source=rss&utm_medium=rss&utm_campaign=things-to-do-in-kuala-lumpur https://www.charsfootsteps.com/travel/asia/malaysia/things-to-do-in-kuala-lumpur/#respond Tue, 28 May 2024 09:51:40 +0000 https://www.charsfootsteps.com/?p=2963 Kuala Lumpur, the vibrant capital of Malaysia, offers a fascinating blend of modern skyscrapers, colonial architecture, and lush greenery. Whether you’re into history, a nature lover, or a foodie, Kuala Lumpur has something for everyone. I was lucky enough to spend 3 months remote working in Kuala Lumpur and was surprised at what I found. […]

The post Things to Do in Kuala Lumpur appeared first on Char's Footsteps.

]]>
Kuala Lumpur, the vibrant capital of Malaysia, offers a fascinating blend of modern skyscrapers, colonial architecture, and lush greenery. Whether you’re into history, a nature lover, or a foodie, Kuala Lumpur has something for everyone. I was lucky enough to spend 3 months remote working in Kuala Lumpur and was surprised at what I found. So, here is my guide on the best things to do in Kuala Lumpur.

How to Get to Kuala Lumpur

Getting to Kuala Lumpur is relatively straightforward. The city centre is about 45km away from Kuala Lumpur International Airport (KLIA). From the airport, you can take the KLIA Ekspres train, which gets you to KL Sentral in 28 minutes. Alternatively, there are airport taxis, ride-sharing services, and buses. If you’re coming from other parts of Malaysia or neighbouring countries, Kuala Lumpur is well-connected by bus and train services. I have taken the bus several times between Singapore and Kuala Lumpur and always found it to be comfortable, efficient and cheap! I also did a return bus journey from Penang to Kuala Lumpur which was fairly easy too!

Petronas Twin Towers

No trip to Kuala Lumpur is complete without visiting the iconic Petronas Twin Towers. Standing at 451.9m, the Petronas twin towers were once the tallest buildings in the world. You can either enjoy the majestic building from the ground or buy tickets to up inside it. There’s Skybridge on the 41st and 42nd floors and the observation deck on the 86th floor offer stunning views of the city. Be sure to book your tickets in advance to avoid long queues!

I found the towers to be great to visit both day and night, but particularly special once the sun has set, as the towers light up. In addition, I’d highly recommend going to a rooftop bar nearby to enjoy a few drinks and watch the Petronas Twin Towers light up as the sun goes down. My favourite rooftop bars for this were Wet Deck at the W Hotel and the Sky Bar.

If you’re visiting the Petronas Twin Towers, consider popping into Surai Shopping Mall or visit the KLCC Park for a coffee and walk. If you’re looking for good photo opportunities with the Twin Towers, go to the bridge in the KLCC Park!!

The Batu Caves

The Batu Caves are located just a short drive north of the city centre and are a must-do in Kuala Lumpur. These are a series of caves and cave temples nestled within a limestone hill. The main attraction is the large Golden Statue of Lord Murugan at the entrance and the 272 colourful steps leading up to the Temple Cave.

You could easily spend a few hours here, exploring the caves and the surrounding area. Arrive early to avoid the heat and large crowds and be mindfill that the Batu Caves are a religious site, so wear appropriate clothing.

Hikes and Walks in Nature in Kuala Lumpur

If you’re looking to escape the city’s hustle and bustle, Kuala Lumpur offers plenty of opportunities for outdoor adventures. Bukit Nanas Forest Reserve, right in the city centre, offers a lush escape with lush, jungle-like experience with hiking trails and a canopy walk.

I also loved visiting The Botanic Gardens, which had a range of different areas to explore, such as the main lake and the Butterfly Garden. For a more challenging hike, head to Bukit Tabur, known for its dramatic ridge and panoramic views. If you’re looking for a family-friendly option, the KLCC Park, with its walking paths and water fountains, is perfect. This is a great place for Petronas Twin Tower photo ops here!

presint 18 parkrun Putrajaya
Presint 18 Parkrun Putrajaya

I’m a big fan of Parkrun and I loved going to the Presint 18 Parkrun in Putrajaya. It was a gorgeous run in the park, along a palm tree-lined river, with a really friendly bunch of people. Putrajaya, the home of Government buildings, was also a fascinating place to spend the morning and see some beautiful, unique architecture. Although it wasn’t the easiest of parkruns to get to, I’d highly recommend it to any other runners visiting Kuala Lumpur. The Taman Tun Dr Ismail (TTDI) Park is also a beautiful urban oasis, perfect for a leisurely stroll or a jog.

With all of these parks and trails, I’d highly recommend getting there as early as possible as the heat and humidity were almost unbearable on some days. Also in the rain season, the afternoons typically have a strong downpour of rain which wouldn’t be fun to experience in the middle of a park/trail.

Shopping in Kuala Lumpur

Kuala Lumpur is a shopper’s paradise. From luxury malls to bustling street markets, there’s something for every budget. Suria KLCC and Pavilion Kuala Lumpur offer a range of high-end brands, while Berjaya Times Square is great for bargain hunters. The famous Petaling Street and Central Market in Chinatown is good for souvenirs, clothes and crafts.

One of my favourite areas to shop was the TRX building. There are a number of good shops there but my favourite part was the huge food hall on the C floor and the bars and restaurants alongside TRX with an outdoor roof area.

Food Markets

One of the best ways to experience KL is through its incredible food scene. The city is a melting pot of cultures, and this diversity is reflected in its cuisine. Jalan Alor in Bukit Bintang, and Petaling Street in Chinatown, are famous for street food, offering everything from satay to durian. Jalan Alor is also moments away from Changkat Bukit Bintang – a street full of various bars and restaurants and often a good place for cheap drinks deals.

For a more local experience, visit the Taman Connaught Night Market, open on Wednesdays. It’s slightly out the way of the city centre but you’ll be able to try a variety of Malaysian dishes like char kuey teow, nasi lemak, and roti canai.

For a more upscale dining experience, check out the trendy restaurants in the Bangsar and Damansara neighbourhoods. I found there were lots of hidden speakeasies and restaurants in Kuala Lumpur, so have a look on maps, as you might not walk past in.

Nightlife in Kuala Lumpur

Kuala Lumpur has pretty good nightlife. You’re not going to have the backpacker vibes of Thailand or the wide variety, as a city like Singapore, but there is fairly good nightlife. Changkat Bukit Bintang is one of the go-to place for bars and nightclubs in the city centre. It’s a strip filled with various ‘pub type’ places to eat and drink, typically with good happy hour deals. Kuala Lumpur is also home to a number of great rooftop bars, perfect for enjoying a laid back drink with sunset views of the city. Rooftop bars in Kuala Lumpur I enjoyed were SkyBar, Heli Lounge Bar and Wet Deck.

I found KL also had a range of good speakeasy bars, many were in Chinatown. You can also check out the Petaling Street Night Market here too. Other areas I enjoyed going out in were Bukit Damansara, Desa Sri and Hartamas. I was based near these areas as it was further out from the touristy, crowded centre. But there will be other district with good bars too – just be wary of slow taxi times given the bad KL traffic if you’re travelling from KLCC area.

Cultural and Historical Sites

Kuala Lumpur is also home to rich history and culture. If you’re short on time in the city, definitely prioritise visiting the Sultan Abdul Samad Building, Merdeka Square, and the National Mosque. These are significant landmarks and are located fairly close together, making it easy to visit in one afternoon. If you are in this area, consider checking out Chinatown and the Botanic Gardens too, as they’re close. For a deeper understanding of the local culture, visit the Islamic Arts Museum and the National Museum.

FAQs

What is the Best Time to Visit Kuala Lumpur?

Probably the best time to visit Kuala Lumpur would be during the dry season, from May to July and December to February. However, I was based there for March – June, and despite the downpours, had a great time! As with many countries in this region, the rain was fairly predictable so you could just plan your day around it.

Is Kuala Lumpur Safe for Tourists?

Yes, Kuala Lumpur is generally safe, but like any major city, it’s wise to stay aware of your surroundings. I would say though my only complaint on Kuala Lumpur was some men were fairly inappropriate in terms of staring and calling out. I’ve not experienced this to the same scale so i’d highly urge women to be covered – choosing long, floaty trousers over denim shorts for example.

What Language is Spoken in Kuala Lumpur?

Malay is the official language, but English is widely spoken, especially in tourist areas. I found there to be no issues with language barriers as an english speaker.

What Currency is Used in Kuala Lumpur?

The Malaysian Ringgit (MYR). I used Wise throughout my trip and it was really easy to check the live exchange rate, transfer and convert money and use the contactless app. You will need to have cash for food markets and adhoc places like laundromats. There are money exchange services at the airport, hotels, and throughout the city. However, cards and contactless payments were accepted at most places.

Do I need a Visa to Visit Kuala Lumpur?

This will depend on your nationality. Many countries have visa-free entry for short stays. Check with the Malaysian embassy or government websites for more details on your specific situation.

How Can I Get Around Kuala Lumpur?

Public transportation is efficient, with options like the LRT, MRT, buses, and taxis. I personally found Grab to be quite cheap, so that was often a go-to also. It’ll depend on which time you’re planning to travel as rush hour in Kuala Lumpur is pretty bad!

Are there any cultural considerations I should be aware of?

Malaysia is a Muslim-majority country, so it’s important to dress modestly, especially when visiting religious sites! Some places, like the Batu Caves, will provide cover ups to rent but this isn’t a guarantee at every religious site. It’s also advisable to avoid public displays of affection and alcohol consumption in certain areas out of respect for local customs.

I was truely surprised by Kuala Lumpur, and what was supposed to be a few weeks of remote working turned into 30 months! From its towering skyscrapers to its historical sites, and from the bustling markets to the serene parks, there was always something to explore. Whether you’re here for a short visit or an extended stay, Kuala Lumpur promises an unforgettable experience

Kuala Lumpur Guides and Surrounding Areas

Best Things to Do in Sentosa Island

Sentosa is a popular island resort in Singapore and a great destination for those seeking a range of leisure activities …
hiking in singapore

Best Places to Hike in Singapore

Despite Singapore’s size, this urban jungle is home to a surprising number of nature trails and hikes! From leisurely walks …
kuala lumpur

Kuala Lumpur To Singapore by Bus – An Eventful Experience!

After an incredible three months based in Kuala Lumpur, and exploring Malaysia, it was time to head back to Singapore …
petronas twin towers kl

Things to Do in Kuala Lumpur

Kuala Lumpur, the vibrant capital of Malaysia, offers a fascinating blend of modern skyscrapers, colonial architecture, and lush greenery. Whether …

A Guide on Visiting the Batu Caves, Kuala Lumpur

No trip to Kuala Lumpur is complete without visiting the Batu Caves. The iconic coloured staircase, and colossal golden statue …
kuala lumpur to penang bus

Kuala Lumpur to Penang by Bus

After a month of remote work in KL, it was time to head off to my next destination; George Town, …

The post Things to Do in Kuala Lumpur appeared first on Char's Footsteps.

]]>
https://www.charsfootsteps.com/travel/asia/malaysia/things-to-do-in-kuala-lumpur/feed/ 0
A Guide on Visiting the Batu Caves, Kuala Lumpur https://www.charsfootsteps.com/travel/asia/malaysia/batu-caves-kuala-lumpur/?utm_source=rss&utm_medium=rss&utm_campaign=batu-caves-kuala-lumpur https://www.charsfootsteps.com/travel/asia/malaysia/batu-caves-kuala-lumpur/#respond Sat, 18 May 2024 07:16:31 +0000 https://www.charsfootsteps.com/?p=2903 No trip to Kuala Lumpur is complete without visiting the Batu Caves. The iconic coloured staircase, and colossal golden statue of Lord Murugan, are nestled in the limestone hills of Batu. A visit to the Batu Caves will give you a unique blend of Malaysia’s culture and the country’s natural beauty. Located just 13km north […]

The post A Guide on Visiting the Batu Caves, Kuala Lumpur appeared first on Char's Footsteps.

]]>
No trip to Kuala Lumpur is complete without visiting the Batu Caves. The iconic coloured staircase, and colossal golden statue of Lord Murugan, are nestled in the limestone hills of Batu. A visit to the Batu Caves will give you a unique blend of Malaysia’s culture and the country’s natural beauty. Located just 13km north of Kuala Lumpur, this sacred site is a must-see for anyone traveling to the Malaysian capital. Here is a quick guide on my experience visiting the Batu Caves.

Powered by GetYourGuide

Getting to the Batu Caves

The easiest way to reach the Batu Caves is by taking the KL Commuter train from Kuala Lumpur. The journey takes around 30 minutes, and goes directly to Batu Caves station. From there, it’s a short walk to the entrance of the caves.

Alternatively, you can take a taxi or Grab, which will cost you around MYR 30-40 one-way from the city centre. As I went early in the morning, I took a Grab, but I decided on public transport on the way back to avoid the notorious KL traffic. I found the train to be comfortable, with good air-conditioning, and it only cost MYR 2.60. There was a 40 minute wait for the train, so I’d suggest buying any water or snacks before you go through the train barriers. You can’t buy anything on platform level.

KL Sentral to Batu Caves

Most visitors will be coming from a central location of Kuala Lumpur, like KL Sentral. I found the easiest way to get to the Batu Caves was by train, which takes 35 minutes and costs between RM 2 -4. You can buy a KTM Komuter train ticket from the train station. I found these trains to be in good conditions and fairly quiet. You can also get the 173 bus, however, this takes just over an 1 hour in good traffic. The KL traffic is no joke, so I’d even be a bit wary of taking a taxi or Uber.

At the Batu Caves

As you approach the Batu Caves, you’ll be greeted by the towering 42.7m high statue of Lord Murugan, the Hindu god of war. This massive golden sculpture is hard to miss and serves as a magnificent gateway to the caves.

From here you’ll need to climb the 272 steps to reach the main cave entrance. Trust me, it’s a workout! Made hard by my terrible choice in clothes. I didn’t have anything appropriate outside of thick black trousers and top. Be sure to wear comfortable shoes, light /airy clothing and bring plenty of water! There are people checking everyones’ clothing at the bottom of the stairs, to ensure people are respectful of this religious area. You’ll be requested to rent cover ups if you’re deemed to be not dressed appropriately.

I thought the colourful steps looked beautiful on the way up, so take your time enjoying them. On the way down you don’t see the colours as much, so it’s less visually appealing.

Inside the Batu Caves

Once you’ve recovered from climbing the 212 stairs, you’ll reach the main cave. With ceilings reaching 100 metres, the sheer size and beauty of the cave will take your breath away. I went on a very sunny day, so I was treated to the sunlight streaming through various openings of the cave. Inside you’ll find a series of ornate Hindu shrines, altars, and statues dedicated to various deities.

As you explore deeper into the cave complex, you’ll come across several smaller caves, each with its own unique features and spiritual significance. One of the most interesting is the Art Gallery Cave, where you’ll find intricate Hindu sculptures and paintings adorning the walls.

Batu Caves Monkeys

monkeys at batu caves

The Batu Caves is home to many monkeys. If you’ve been to Ubud’s Monkey Forest, you might know what to expect! Most of the monkeys running around the Batu Caves are found at the entrance. They are clearly very used to people and are quite brazen. It didn’t appear to be as bad as in Ubud (where your things will just be grabbed off you), but be wary about getting too close. After speaking to locals, they said the monkeys weren’t dangerous but they had on occasion grabbed belongings off people, so just keep your distance and don’t let your kids get too close.

There are also LOTS of pigeons …

Batu Caves FAQs

Is there an entrance fee?

No, entry to the Batu Caves is free. However, there is a small fee (around MYR 5) if you want to visit the Dark Cave, a separate eco-adventure tour within the cave complex, or the Ramayana Cave.

Batu Cave Opening Hours

The Batu Caves are open daily from 7 AM to 9 PM. Opening hours for the various caves inside can change depending on weekday vs weekend so be sure to search times for any specific things you want to see ahead of time.

What is the best time to visit?

To avoid the crowds and intense heat, it’s best to visit early in the morning or late in the afternoon. I was warned of this and chose to visit at 9am, thinking it would be quiet and cool…it was not. I was fine dealing with the crowds, but the heat was on another level. My only appropriate clothing were thick black trousers and a thick cotton top…I was dripping in sweat before I made it up half the stairs. I had also been living in Malaysia for about 3 months by this point, so was quite used to the humidity. So it might hit even harder if you’re new to the climate.

Can I take photographs inside the caves?

Yes, you can take photographs inside the main cave and the smaller caves. However, be respectful of worshippers and avoid using flash photography near the shrines.

Are there any facilities inside the caves?

Yes, there were two shops inside the main cave that were selling food, drinks and souvenirs. There are also toilets outside which cost MYR 2 to use. I found these to be in good condition!

What should I wear to the Batu Caves?

As the Batu Caves are a religious site, it’s important to dress modestly. Avoid wearing shorts or sleeveless tops, and consider covering your shoulders and knees out of respect. You will be searched when you first arrive and made to rent clothing if you’re not dressed appropriately. I believe this cost MYR 10 to rent. I’d highly recommend wearing something floating and light coloured…I really suffered with my outfit choice and left early due to the heat.

How many steps does the Batu Caves have?

272 steps!

How long should I spend at the caves?

It felt like i’d seen everything there was to offer in around 90 minutes. I would say you need between an hour or two. However, you might want longer if you’re planning to spend time eating and visiting the additional caves on site.

Are there food options at the caves?

Yes, there were a few vegetarian Indian restaurants and snack stalls near the entrance by the station.

Is there Parking at Batu Caves?

Yes, there is paid parking available near the entrance. Most people I saw though travelled via public transport or taxi, so don’t feel the need to rent a car for solely this.

Is the Batu Caves suitable for children?

Yes, but I imagine they’d get tired by the stairs. If you’re going during a busy period, like myself, be prepared to have to carry the kids up to prevent traffic on the stairs. I would also recommend being wary about having kids near the monkeys, as they were clearly very used to being around people and seemed quite grabby.

Visiting the Batu Caves was an incredible experience that combined natural beauty, cultural heritage and spiritual learnings. Whether you’re a curious traveler like myself, or a devout Hindu, these ancient caves will leave a lasting impression on you. Just remember to come prepared, be respectful and embrace the unique atmosphere of this Malaysian attraction. Check out the official Malaysia Tourism Site for more information.

Malaysia Guides

Best Things to Do in Sentosa Island

Sentosa is a popular island resort in Singapore and a great destination for those seeking a range of leisure activities …
hiking in singapore

Best Places to Hike in Singapore

Despite Singapore’s size, this urban jungle is home to a surprising number of nature trails and hikes! From leisurely walks …
kuala lumpur

Kuala Lumpur To Singapore by Bus – An Eventful Experience!

After an incredible three months based in Kuala Lumpur, and exploring Malaysia, it was time to head back to Singapore …
petronas twin towers kl

Things to Do in Kuala Lumpur

Kuala Lumpur, the vibrant capital of Malaysia, offers a fascinating blend of modern skyscrapers, colonial architecture, and lush greenery. Whether …

A Guide on Visiting the Batu Caves, Kuala Lumpur

No trip to Kuala Lumpur is complete without visiting the Batu Caves. The iconic coloured staircase, and colossal golden statue …
kuala lumpur to penang bus

Kuala Lumpur to Penang by Bus

After a month of remote work in KL, it was time to head off to my next destination; George Town, …

The post A Guide on Visiting the Batu Caves, Kuala Lumpur appeared first on Char's Footsteps.

]]>
https://www.charsfootsteps.com/travel/asia/malaysia/batu-caves-kuala-lumpur/feed/ 0
Kuala Lumpur to Penang by Bus https://www.charsfootsteps.com/travel/asia/malaysia/kuala-lumpur-penang-bus/?utm_source=rss&utm_medium=rss&utm_campaign=kuala-lumpur-penang-bus https://www.charsfootsteps.com/travel/asia/malaysia/kuala-lumpur-penang-bus/#respond Thu, 25 Apr 2024 12:14:19 +0000 https://www.charsfootsteps.com/?p=2862 After a month of remote work in KL, it was time to head off to my next destination; George Town, Penang. With its old shop houses, rich history and promises of incredible food, I couldn’t wait to get there. For George Town / Penang Island, you firstly need to get to Butterworth (otherwise known as […]

The post Kuala Lumpur to Penang by Bus appeared first on Char's Footsteps.

]]>
After a month of remote work in KL, it was time to head off to my next destination; George Town, Penang. With its old shop houses, rich history and promises of incredible food, I couldn’t wait to get there. For George Town / Penang Island, you firstly need to get to Butterworth (otherwise known as Penang Sentral). From here you can get the ferry to Georgetown or drive/bus over the bridge. After much deliberation over how to get to Penang from Kuala Lumpur, I decided on the bus.

Flying is obviously the quickest way but also the most expensive. Given the number of bags with me, initial cheap flights of £17-30 quickly escalated once you add three extra bags. Alternatively, you can catch the train from Kuala Lumpur to Penang. This is typically the fastest way on the land, however the trains weren’t very frequent. I wanted some flexibility, so the limited trains weren’t for me. After having a recent positive experience getting the bus from Singapore to Kuala Lumpur, I decided to give the buses another go.

Booking Tickets for The Penang Bus

You can buy bus tickets for Penang online ahead of time. Sites I’ve had good experiences with in the past include EasyBook and BusOnlineTickets . I opted to buy my ticket at the station as I wanted some flexibility in the morning to go-with-the-flow.

Most buses to Penang depart from Terminal Bersepadu Selatan (TBS station) in Kuala Lumpur. I was staying in KLCC, so this was an easy Grab ride from my serviced apartment for RM16. If you’re travelling to TBS by taxi, you’ll likely also be dropped at the main lobby entrance. Once inside, follow signs for the ticket counters. You’ll see a row of ticket machines and counter options. Ticket machines are much quicker but only accept cash. I paid RM 34 for the bus from TBS to Butterworth (Penang Sentral). When buying your ticket, you’ll be asked to select ‘From/To’ Destinations, a time, bus company, a specific seat, your name, passport number and mobile.

TBS Station

TBS station itself is fairly big, with several convenience stores (like 7/11) and restrooms. After I bought my ticket for the 11:30am bus from KL to Penang, I made my way to Gate 17. To note, once you’re scanned into your gate area you’ll be waiting in an area without bathrooms. There was a small shop by my gate but that was it.

This was my only negative part of the journey. I saw waiting by my gate from 11am, for my 11:30am bus, for it to arrive 40 minutes late. There were no updates on what was going on, if i’d missed it or if it was just delayed. All other buses seemed to be arriving at the gate fine and i spent over an hour watching people come and go.

The bus finally came at 12:10. However it arrived at another gate without any announcement! A guy came over to our gate and very nonchalantly started speaking. A few people I’d been sat waiting with all got up, so I followed to ask if he knew something about my buses whereabouts. Turned out he was there to collect us from Gate 17 and walk us to Gate 4 across the station. There were no proper announcements or checks to see if everyone booked on the 11:30am had made it! I highly imagine many people missed this as the bus was practically empty, despite the seat selector being full when buying my ticket.

The Journey From Kuala Lumpur to Penang Sentral

The journey itself was fairly uneventful. We left TBS at 12:15 and drove north-west, on the AH2, towards Penang. We stopped at a petrol station just outside of Ipoh at 14:23pm to use bathrooms and buy food/drinks. It wasn’t clear how long we had here so I only went to the bathroom. The driver came back on the bus and did head checks at 14:42, before continuing with the journey. 

A few fellow passengers had their phones blaring out tv shows, music and games during the journey, which was annoying.

At 4:06 we reached our second stop which was a bus change over. Anyone heading to Butterworth / Penang Sentral had to go into a second Jasmin Express bus. Straightforward enough but it would have been great to get a heads up this was happening. People from my new bus then moved somewhere else. It was all a bit chaotic but I guess apart of the experience. There was a small food stand here but I wasn’t going to risk the buses leaving without me so I left it.

By 4:20pm, we were off again. Again, it was a fairly uneventful journey. There was bad traffic coming into Butterworth, but it might have been caused by the heavy rainy. We arrived at Butterworth / Penang at 5:05pm

The Bus Conditions and Tips

Both buses were spacious with comfortable reclining seats and strong aircon. I had significantly more space than I would have on a plane, so that already made up for the slow journey. There were no toilets on board, but the rest stop half way was adequate enough.

Some of the buses from Kuala Lumpur to Penang have extra amenities, like Wi-Fi. If this is important to you, check the bus facilities online before booking or ask at the train station ticket counters. These tend to be 5-10 RM more expensive than buses without Wi-Fi.

My top tip is to bring food and drinks with you!! There aren’t substantial stops, as I experienced with Singapore to Malaysia, so I arrived at George Town starving!

Penang to George Town Ferry

Once you arrive at Penang Sentral, collect your bags and head into the bus terminal. You’ll need to take the escalators up to level 2 for taxis, ferries and local buses to George Town. I originally considered a taxi, but didn’t have enough cash for the RM 70 fare. After giving up on taxis, I walked to the ferry station, just in time for the 5:20pm ferry. This area was well signposted and people were friendly to direct me. The ferry only cost RM 2 and took 10 minutes! The ferry itself was comfortable with lots of seating, air con, and despite the torrential rain, it wasn’t bumpy!

Arriving at George Town

Once you arrive at Georgetown ferry terminal, you’ll be faced with a 5-10 min walk out. I note this, because carrying nearly 60kg backpacks in the torrential rain made this difficult. There’s a taxi rank once you’re through the station, which I took to my hostel for rm20. The driver conveniently covered the meter with a baseball cap, so I was potentially ripped-off. However, I couldn’t face navigating George Town without phone data and my heavy bags in the torrential rain. I made it to my hostel just after 6pm.

Overall, getting the bus from Kuala Lumpur to Penang was the best option for me. It was cheap, very comfortable and fairly stress-free. It did take longer than expected, but that was largely due to the delays at TBS in Kuala Lumpur. In terms of timing, I left my serviced apartment at 10:30am and got to the hostel in George Town just at 6pm. That did also include taking taxis to/from my accommodation and having no wait time for the ferry – so it was long! However, the total spend only came to 68rm (£11.40)! Money saved went towards well-deserved icy Chang Beers when I arrived.

Hope this helps anyone looking to take the bus from Kuala Lumpur to Penang or George Town!

Happy Travels x

The post Kuala Lumpur to Penang by Bus appeared first on Char's Footsteps.

]]>
https://www.charsfootsteps.com/travel/asia/malaysia/kuala-lumpur-penang-bus/feed/ 0