PluginProbe
Elementor Website Builder – more than just a page builder / 4.3.2
Elementor Website Builder – more than just a page builder v4.3.2
4.3.2 4.3.1 4.3.0 4.3.0-beta3 4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 All 455 releases
elementor / assets / js / editor-one-sidebar-navigation.js

editor-one-sidebar-navigation.js in Elementor Website Builder – more than just a page builder 4.3.2, at assets/js/editor-one-sidebar-navigation.js

2,362 lines 113.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 (function(react, react_dom, _elementor_ui, _elementor_icons_ChevronRightIcon, _elementor_icons_AdjustmentsIcon, _elementor_icons_FolderIcon, _elementor_icons_RocketIcon, _elementor_icons_HomeIcon, _elementor_icons_SendIcon, _elementor_icons_SettingsIcon, _elementor_icons_UsersIcon, _elementor_icons_PlugIcon, _elementor_icons_FileSettingsIcon, _elementor_icons_ChevronDownSmallIcon, _elementor_icons, _elementor_icons_SearchIcon) {
2
3 //#region \0rolldown/runtime.js
4 var __create = Object.create;
5 var __defProp = Object.defineProperty;
6 var __name = (target, value) => __defProp(target, "name", {
7 value,
8 configurable: true
9 });
10 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
11 var __getOwnPropNames = Object.getOwnPropertyNames;
12 var __getProtoOf = Object.getPrototypeOf;
13 var __hasOwnProp = Object.prototype.hasOwnProperty;
14 var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
15 var __copyProps = (to, from, except, desc) => {
16 if (from && typeof from === "object" || typeof from === "function") {
17 for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
18 key = keys[i];
19 if (!__hasOwnProp.call(to, key) && key !== except) {
20 __defProp(to, key, {
21 get: ((k) => from[k]).bind(null, key),
22 enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
23 });
24 }
25 }
26 }
27 return to;
28 };
29 var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
30 value: mod,
31 enumerable: true
32 }) : target, mod));
33
34 //#endregion
35 react = __toESM(react);
36 react_dom = __toESM(react_dom);
37 _elementor_icons_ChevronRightIcon = __toESM(_elementor_icons_ChevronRightIcon);
38 _elementor_icons_AdjustmentsIcon = __toESM(_elementor_icons_AdjustmentsIcon);
39 _elementor_icons_FolderIcon = __toESM(_elementor_icons_FolderIcon);
40 _elementor_icons_RocketIcon = __toESM(_elementor_icons_RocketIcon);
41 _elementor_icons_HomeIcon = __toESM(_elementor_icons_HomeIcon);
42 _elementor_icons_SendIcon = __toESM(_elementor_icons_SendIcon);
43 _elementor_icons_SettingsIcon = __toESM(_elementor_icons_SettingsIcon);
44 _elementor_icons_UsersIcon = __toESM(_elementor_icons_UsersIcon);
45 _elementor_icons_PlugIcon = __toESM(_elementor_icons_PlugIcon);
46 _elementor_icons_FileSettingsIcon = __toESM(_elementor_icons_FileSettingsIcon);
47 _elementor_icons_ChevronDownSmallIcon = __toESM(_elementor_icons_ChevronDownSmallIcon);
48 _elementor_icons_SearchIcon = __toESM(_elementor_icons_SearchIcon);
49
50 //#region node_modules/react-dom/client.js
51 var require_client = /* @__PURE__ */ __commonJSMin(((exports) => {
52 var m = (globalThis.ReactDOM);
53 var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
54 exports.createRoot = function(c, o) {
55 i.usingClientEntryPoint = true;
56 try {
57 return m.createRoot(c, o);
58 } finally {
59 i.usingClientEntryPoint = false;
60 }
61 };
62 }));
63
64 //#endregion
65 //#region assets/dev/js/utils/react.js
66 var import_client = require_client();
67 /**
68 * Support conditional rendering of a React App to the DOM, based on the React version.
69 * We use `createRoot` when available, but fallback to `ReactDOM.render` for older versions.
70 *
71 * @param {Promise.resolve(React).ReactElement} app The app to render.
72 * @param {HTMLElement} domElement The DOM element to render the app into.
73 *
74 * @return {{ unmount: () => void }} The unmount function.
75 */
76 function render(app, domElement) {
77 var unmountFunction;
78 try {
79 var root = (0, import_client.createRoot)(domElement);
80 root.render(app);
81 unmountFunction = function unmountFunction() {
82 root.unmount();
83 };
84 } catch (e) {
85 react_dom.render(app, domElement);
86 unmountFunction = function unmountFunction() {
87 react_dom.unmountComponentAtNode(domElement);
88 };
89 }
90 return { unmount: unmountFunction };
91 }
92 var react_default = { render };
93
94 //#endregion
95 //#region node_modules/@babel/runtime/helpers/esm/extends.js
96 function _extends() {
97 return _extends = Object.assign ? Object.assign.bind() : function(n) {
98 for (var e = 1; e < arguments.length; e++) {
99 var t = arguments[e];
100 for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
101 }
102 return n;
103 }, _extends.apply(null, arguments);
104 }
105
106 //#endregion
107 //#region modules/editor-one/assets/js/sidebar-navigation/components/icons/editor.js
108 var EditorIcon = function EditorIcon(props) {
109 return /*#__PURE__*/ react.default.createElement(_elementor_ui.SvgIcon, _extends({
110 width: "22",
111 height: "22",
112 viewBox: "0 0 22 22",
113 fill: "none"
114 }, props), /*#__PURE__*/ react.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg" }, /*#__PURE__*/ react.default.createElement("path", {
115 d: "M16.8622 12.1197V4.74246C16.8621 2.70533 15.2107 1.05396 13.1735 1.05396H4.74246C2.70535 1.05398 1.05398 2.70535 1.05396 4.74246V14.2274C1.05396 16.2645 2.70533 17.916 4.74246 17.916H12.1197C12.4107 17.916 12.6466 18.152 12.6466 18.443C12.6465 18.734 12.4107 18.9698 12.1197 18.9698H4.74246C2.12329 18.9698 0 16.8465 0 14.2274V4.74246C2.28646e-05 2.1233 2.1233 2.21612e-05 4.74246 0H13.1735C15.7927 2.60738e-07 17.916 2.12329 17.916 4.74246V12.1197C17.916 12.4107 17.68 12.6466 17.389 12.6466C17.098 12.6465 16.8622 12.4107 16.8622 12.1197Z",
116 fill: "black",
117 fillOpacity: "0.56"
118 }), /*#__PURE__*/ react.default.createElement("path", {
119 d: "M9.29598 11.3878C8.81835 10.0982 10.1012 8.85589 11.3748 9.3747L21.0159 13.3025C22.3228 13.835 22.3301 15.6829 21.0275 16.2257L17.4478 17.7172C17.3249 17.7684 17.2259 17.8644 17.1708 17.9856L15.7665 21.0751C15.1824 22.36 13.3351 22.2935 12.8449 20.9699L9.29598 11.3878ZM10.9772 10.3507C10.5527 10.1778 10.125 10.5919 10.2842 11.0217L13.8332 20.604C13.9966 21.0451 14.6124 21.0672 14.8071 20.6389L16.2113 17.5495C16.3767 17.1858 16.6737 16.8981 17.0425 16.7444L20.6222 15.2529C21.0563 15.0719 21.0538 14.456 20.6182 14.2786L10.9772 10.3507Z",
120 fill: "black",
121 fillOpacity: "0.56"
122 })));
123 };
124
125 //#endregion
126 //#region node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js
127 /** @license React v16.13.1
128 * react-is.development.js
129 *
130 * Copyright (c) Facebook, Inc. and its affiliates.
131 *
132 * This source code is licensed under the MIT license found in the
133 * LICENSE file in the root directory of this source tree.
134 */
135 var require_react_is_development = /* @__PURE__ */ __commonJSMin(((exports) => {
136 (function() {
137 "use strict";
138 var hasSymbol = typeof Symbol === "function" && Symbol.for;
139 var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for("react.element") : 60103;
140 var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for("react.portal") : 60106;
141 var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for("react.fragment") : 60107;
142 var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for("react.strict_mode") : 60108;
143 var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for("react.profiler") : 60114;
144 var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for("react.provider") : 60109;
145 var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for("react.context") : 60110;
146 var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for("react.async_mode") : 60111;
147 var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for("react.concurrent_mode") : 60111;
148 var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for("react.forward_ref") : 60112;
149 var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for("react.suspense") : 60113;
150 var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for("react.suspense_list") : 60120;
151 var REACT_MEMO_TYPE = hasSymbol ? Symbol.for("react.memo") : 60115;
152 var REACT_LAZY_TYPE = hasSymbol ? Symbol.for("react.lazy") : 60116;
153 var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for("react.block") : 60121;
154 var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for("react.fundamental") : 60117;
155 var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for("react.responder") : 60118;
156 var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for("react.scope") : 60119;
157 function isValidElementType(type) {
158 return typeof type === "string" || typeof type === "function" || type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
159 }
160 function typeOf(object) {
161 if (typeof object === "object" && object !== null) {
162 var $$typeof = object.$$typeof;
163 switch ($$typeof) {
164 case REACT_ELEMENT_TYPE:
165 var type = object.type;
166 switch (type) {
167 case REACT_ASYNC_MODE_TYPE:
168 case REACT_CONCURRENT_MODE_TYPE:
169 case REACT_FRAGMENT_TYPE:
170 case REACT_PROFILER_TYPE:
171 case REACT_STRICT_MODE_TYPE:
172 case REACT_SUSPENSE_TYPE: return type;
173 default:
174 var $$typeofType = type && type.$$typeof;
175 switch ($$typeofType) {
176 case REACT_CONTEXT_TYPE:
177 case REACT_FORWARD_REF_TYPE:
178 case REACT_LAZY_TYPE:
179 case REACT_MEMO_TYPE:
180 case REACT_PROVIDER_TYPE: return $$typeofType;
181 default: return $$typeof;
182 }
183 }
184 case REACT_PORTAL_TYPE: return $$typeof;
185 }
186 }
187 }
188 var AsyncMode = REACT_ASYNC_MODE_TYPE;
189 var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
190 var ContextConsumer = REACT_CONTEXT_TYPE;
191 var ContextProvider = REACT_PROVIDER_TYPE;
192 var Element = REACT_ELEMENT_TYPE;
193 var ForwardRef = REACT_FORWARD_REF_TYPE;
194 var Fragment = REACT_FRAGMENT_TYPE;
195 var Lazy = REACT_LAZY_TYPE;
196 var Memo = REACT_MEMO_TYPE;
197 var Portal = REACT_PORTAL_TYPE;
198 var Profiler = REACT_PROFILER_TYPE;
199 var StrictMode = REACT_STRICT_MODE_TYPE;
200 var Suspense = REACT_SUSPENSE_TYPE;
201 var hasWarnedAboutDeprecatedIsAsyncMode = false;
202 function isAsyncMode(object) {
203 if (!hasWarnedAboutDeprecatedIsAsyncMode) {
204 hasWarnedAboutDeprecatedIsAsyncMode = true;
205 console["warn"]("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.");
206 }
207 return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
208 }
209 function isConcurrentMode(object) {
210 return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
211 }
212 function isContextConsumer(object) {
213 return typeOf(object) === REACT_CONTEXT_TYPE;
214 }
215 function isContextProvider(object) {
216 return typeOf(object) === REACT_PROVIDER_TYPE;
217 }
218 function isElement(object) {
219 return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
220 }
221 function isForwardRef(object) {
222 return typeOf(object) === REACT_FORWARD_REF_TYPE;
223 }
224 function isFragment(object) {
225 return typeOf(object) === REACT_FRAGMENT_TYPE;
226 }
227 function isLazy(object) {
228 return typeOf(object) === REACT_LAZY_TYPE;
229 }
230 function isMemo(object) {
231 return typeOf(object) === REACT_MEMO_TYPE;
232 }
233 function isPortal(object) {
234 return typeOf(object) === REACT_PORTAL_TYPE;
235 }
236 function isProfiler(object) {
237 return typeOf(object) === REACT_PROFILER_TYPE;
238 }
239 function isStrictMode(object) {
240 return typeOf(object) === REACT_STRICT_MODE_TYPE;
241 }
242 function isSuspense(object) {
243 return typeOf(object) === REACT_SUSPENSE_TYPE;
244 }
245 exports.AsyncMode = AsyncMode;
246 exports.ConcurrentMode = ConcurrentMode;
247 exports.ContextConsumer = ContextConsumer;
248 exports.ContextProvider = ContextProvider;
249 exports.Element = Element;
250 exports.ForwardRef = ForwardRef;
251 exports.Fragment = Fragment;
252 exports.Lazy = Lazy;
253 exports.Memo = Memo;
254 exports.Portal = Portal;
255 exports.Profiler = Profiler;
256 exports.StrictMode = StrictMode;
257 exports.Suspense = Suspense;
258 exports.isAsyncMode = isAsyncMode;
259 exports.isConcurrentMode = isConcurrentMode;
260 exports.isContextConsumer = isContextConsumer;
261 exports.isContextProvider = isContextProvider;
262 exports.isElement = isElement;
263 exports.isForwardRef = isForwardRef;
264 exports.isFragment = isFragment;
265 exports.isLazy = isLazy;
266 exports.isMemo = isMemo;
267 exports.isPortal = isPortal;
268 exports.isProfiler = isProfiler;
269 exports.isStrictMode = isStrictMode;
270 exports.isSuspense = isSuspense;
271 exports.isValidElementType = isValidElementType;
272 exports.typeOf = typeOf;
273 })();
274 }));
275
276 //#endregion
277 //#region node_modules/prop-types/node_modules/react-is/index.js
278 var require_react_is = /* @__PURE__ */ __commonJSMin(((exports, module) => {
279 module.exports = require_react_is_development();
280 }));
281
282 //#endregion
283 //#region node_modules/object-assign/index.js
284 /*
285 object-assign
286 (c) Sindre Sorhus
287 @license MIT
288 */
289 var require_object_assign = /* @__PURE__ */ __commonJSMin(((exports, module) => {
290 var getOwnPropertySymbols = Object.getOwnPropertySymbols;
291 var hasOwnProperty = Object.prototype.hasOwnProperty;
292 var propIsEnumerable = Object.prototype.propertyIsEnumerable;
293 function toObject(val) {
294 if (val === null || val === void 0) throw new TypeError("Object.assign cannot be called with null or undefined");
295 return Object(val);
296 }
297 function shouldUseNative() {
298 try {
299 if (!Object.assign) return false;
300 var test1 = /* @__PURE__ */ new String("abc");
301 test1[5] = "de";
302 if (Object.getOwnPropertyNames(test1)[0] === "5") return false;
303 var test2 = {};
304 for (var i = 0; i < 10; i++) test2["_" + String.fromCharCode(i)] = i;
305 if (Object.getOwnPropertyNames(test2).map(function(n) {
306 return test2[n];
307 }).join("") !== "0123456789") return false;
308 var test3 = {};
309 "abcdefghijklmnopqrst".split("").forEach(function(letter) {
310 test3[letter] = letter;
311 });
312 if (Object.keys(Object.assign({}, test3)).join("") !== "abcdefghijklmnopqrst") return false;
313 return true;
314 } catch (err) {
315 return false;
316 }
317 }
318 module.exports = shouldUseNative() ? Object.assign : function(target, source) {
319 var from;
320 var to = toObject(target);
321 var symbols;
322 for (var s = 1; s < arguments.length; s++) {
323 from = Object(arguments[s]);
324 for (var key in from) if (hasOwnProperty.call(from, key)) to[key] = from[key];
325 if (getOwnPropertySymbols) {
326 symbols = getOwnPropertySymbols(from);
327 for (var i = 0; i < symbols.length; i++) if (propIsEnumerable.call(from, symbols[i])) to[symbols[i]] = from[symbols[i]];
328 }
329 }
330 return to;
331 };
332 }));
333
334 //#endregion
335 //#region node_modules/prop-types/lib/ReactPropTypesSecret.js
336 /**
337 * Copyright (c) 2013-present, Facebook, Inc.
338 *
339 * This source code is licensed under the MIT license found in the
340 * LICENSE file in the root directory of this source tree.
341 */
342 var require_ReactPropTypesSecret = /* @__PURE__ */ __commonJSMin(((exports, module) => {
343 var ReactPropTypesSecret = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
344 module.exports = ReactPropTypesSecret;
345 }));
346
347 //#endregion
348 //#region node_modules/prop-types/lib/has.js
349 var require_has = /* @__PURE__ */ __commonJSMin(((exports, module) => {
350 module.exports = Function.call.bind(Object.prototype.hasOwnProperty);
351 }));
352
353 //#endregion
354 //#region node_modules/prop-types/checkPropTypes.js
355 /**
356 * Copyright (c) 2013-present, Facebook, Inc.
357 *
358 * This source code is licensed under the MIT license found in the
359 * LICENSE file in the root directory of this source tree.
360 */
361 var require_checkPropTypes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
362 var printWarning = function() {};
363 var ReactPropTypesSecret = require_ReactPropTypesSecret();
364 var loggedTypeFailures = {};
365 var has = require_has();
366 printWarning = function(text) {
367 var message = "Warning: " + text;
368 if (typeof console !== "undefined") console.error(message);
369 try {
370 throw new Error(message);
371 } catch (x) {}
372 };
373 /**
374 * Assert that the values match with the type specs.
375 * Error messages are memorized and will only be shown once.
376 *
377 * @param {object} typeSpecs Map of name to a ReactPropType
378 * @param {object} values Runtime values that need to be type-checked
379 * @param {string} location e.g. "prop", "context", "child context"
380 * @param {string} componentName Name of the component for error messages.
381 * @param {?Function} getStack Returns the component stack.
382 * @private
383 */
384 function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
385 for (var typeSpecName in typeSpecs) if (has(typeSpecs, typeSpecName)) {
386 var error;
387 try {
388 if (typeof typeSpecs[typeSpecName] !== "function") {
389 var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
390 err.name = "Invariant Violation";
391 throw err;
392 }
393 error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
394 } catch (ex) {
395 error = ex;
396 }
397 if (error && !(error instanceof Error)) printWarning((componentName || "React class") + ": type specification of " + location + " `" + typeSpecName + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof error + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).");
398 if (error instanceof Error && !(error.message in loggedTypeFailures)) {
399 loggedTypeFailures[error.message] = true;
400 var stack = getStack ? getStack() : "";
401 printWarning("Failed " + location + " type: " + error.message + (stack != null ? stack : ""));
402 }
403 }
404 }
405 /**
406 * Resets warning cache when testing.
407 *
408 * @private
409 */
410 checkPropTypes.resetWarningCache = function() {
411 loggedTypeFailures = {};
412 };
413 module.exports = checkPropTypes;
414 }));
415
416 //#endregion
417 //#region node_modules/prop-types/factoryWithTypeCheckers.js
418 /**
419 * Copyright (c) 2013-present, Facebook, Inc.
420 *
421 * This source code is licensed under the MIT license found in the
422 * LICENSE file in the root directory of this source tree.
423 */
424 var require_factoryWithTypeCheckers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
425 var ReactIs = require_react_is();
426 var assign = require_object_assign();
427 var ReactPropTypesSecret = require_ReactPropTypesSecret();
428 var has = require_has();
429 var checkPropTypes = require_checkPropTypes();
430 var printWarning = function() {};
431 printWarning = function(text) {
432 var message = "Warning: " + text;
433 if (typeof console !== "undefined") console.error(message);
434 try {
435 throw new Error(message);
436 } catch (x) {}
437 };
438 function emptyFunctionThatReturnsNull() {
439 return null;
440 }
441 module.exports = function(isValidElement, throwOnDirectAccess) {
442 var ITERATOR_SYMBOL = typeof Symbol === "function" && Symbol.iterator;
443 var FAUX_ITERATOR_SYMBOL = "@@iterator";
444 /**
445 * Returns the iterator method function contained on the iterable object.
446 *
447 * Be sure to invoke the function with the iterable as context:
448 *
449 * var iteratorFn = getIteratorFn(myIterable);
450 * if (iteratorFn) {
451 * var iterator = iteratorFn.call(myIterable);
452 * ...
453 * }
454 *
455 * @param {?object} maybeIterable
456 * @return {?function}
457 */
458 function getIteratorFn(maybeIterable) {
459 var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
460 if (typeof iteratorFn === "function") return iteratorFn;
461 }
462 /**
463 * Collection of methods that allow declaration and validation of props that are
464 * supplied to React components. Example usage:
465 *
466 * var Props = require('ReactPropTypes');
467 * var MyArticle = React.createClass({
468 * propTypes: {
469 * // An optional string prop named "description".
470 * description: Props.string,
471 *
472 * // A required enum prop named "category".
473 * category: Props.oneOf(['News','Photos']).isRequired,
474 *
475 * // A prop named "dialog" that requires an instance of Dialog.
476 * dialog: Props.instanceOf(Dialog).isRequired
477 * },
478 * render: function() { ... }
479 * });
480 *
481 * A more formal specification of how these methods are used:
482 *
483 * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
484 * decl := ReactPropTypes.{type}(.isRequired)?
485 *
486 * Each and every declaration produces a function with the same signature. This
487 * allows the creation of custom validation functions. For example:
488 *
489 * var MyLink = React.createClass({
490 * propTypes: {
491 * // An optional string or URI prop named "href".
492 * href: function(props, propName, componentName) {
493 * var propValue = props[propName];
494 * if (propValue != null && typeof propValue !== 'string' &&
495 * !(propValue instanceof URI)) {
496 * return new Error(
497 * 'Expected a string or an URI for ' + propName + ' in ' +
498 * componentName
499 * );
500 * }
501 * }
502 * },
503 * render: function() {...}
504 * });
505 *
506 * @internal
507 */
508 var ANONYMOUS = "<<anonymous>>";
509 var ReactPropTypes = {
510 array: createPrimitiveTypeChecker("array"),
511 bigint: createPrimitiveTypeChecker("bigint"),
512 bool: createPrimitiveTypeChecker("boolean"),
513 func: createPrimitiveTypeChecker("function"),
514 number: createPrimitiveTypeChecker("number"),
515 object: createPrimitiveTypeChecker("object"),
516 string: createPrimitiveTypeChecker("string"),
517 symbol: createPrimitiveTypeChecker("symbol"),
518 any: createAnyTypeChecker(),
519 arrayOf: createArrayOfTypeChecker,
520 element: createElementTypeChecker(),
521 elementType: createElementTypeTypeChecker(),
522 instanceOf: createInstanceTypeChecker,
523 node: createNodeChecker(),
524 objectOf: createObjectOfTypeChecker,
525 oneOf: createEnumTypeChecker,
526 oneOfType: createUnionTypeChecker,
527 shape: createShapeTypeChecker,
528 exact: createStrictShapeTypeChecker
529 };
530 /**
531 * inlined Object.is polyfill to avoid requiring consumers ship their own
532 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
533 */
534 function is(x, y) {
535 if (x === y) return x !== 0 || 1 / x === 1 / y;
536 else return x !== x && y !== y;
537 }
538 /**
539 * We use an Error-like object for backward compatibility as people may call
540 * PropTypes directly and inspect their output. However, we don't use real
541 * Errors anymore. We don't inspect their stack anyway, and creating them
542 * is prohibitively expensive if they are created too often, such as what
543 * happens in oneOfType() for any type before the one that matched.
544 */
545 function PropTypeError(message, data) {
546 this.message = message;
547 this.data = data && typeof data === "object" ? data : {};
548 this.stack = "";
549 }
550 PropTypeError.prototype = Error.prototype;
551 function createChainableTypeChecker(validate) {
552 var manualPropTypeCallCache = {};
553 var manualPropTypeWarningCount = 0;
554 function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
555 componentName = componentName || ANONYMOUS;
556 propFullName = propFullName || propName;
557 if (secret !== ReactPropTypesSecret) {
558 if (throwOnDirectAccess) {
559 var err = /* @__PURE__ */ new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");
560 err.name = "Invariant Violation";
561 throw err;
562 } else if (typeof console !== "undefined") {
563 var cacheKey = componentName + ":" + propName;
564 if (!manualPropTypeCallCache[cacheKey] && manualPropTypeWarningCount < 3) {
565 printWarning("You are manually calling a React.PropTypes validation function for the `" + propFullName + "` prop on `" + componentName + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details.");
566 manualPropTypeCallCache[cacheKey] = true;
567 manualPropTypeWarningCount++;
568 }
569 }
570 }
571 if (props[propName] == null) {
572 if (isRequired) {
573 if (props[propName] === null) return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required " + ("in `" + componentName + "`, but its value is `null`."));
574 return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required in " + ("`" + componentName + "`, but its value is `undefined`."));
575 }
576 return null;
577 } else return validate(props, propName, componentName, location, propFullName);
578 }
579 var chainedCheckType = checkType.bind(null, false);
580 chainedCheckType.isRequired = checkType.bind(null, true);
581 return chainedCheckType;
582 }
583 function createPrimitiveTypeChecker(expectedType) {
584 function validate(props, propName, componentName, location, propFullName, secret) {
585 var propValue = props[propName];
586 if (getPropType(propValue) !== expectedType) {
587 var preciseType = getPreciseType(propValue);
588 return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + preciseType + "` supplied to `" + componentName + "`, expected ") + ("`" + expectedType + "`."), { expectedType });
589 }
590 return null;
591 }
592 return createChainableTypeChecker(validate);
593 }
594 function createAnyTypeChecker() {
595 return createChainableTypeChecker(emptyFunctionThatReturnsNull);
596 }
597 function createArrayOfTypeChecker(typeChecker) {
598 function validate(props, propName, componentName, location, propFullName) {
599 if (typeof typeChecker !== "function") return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside arrayOf.");
600 var propValue = props[propName];
601 if (!Array.isArray(propValue)) {
602 var propType = getPropType(propValue);
603 return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an array."));
604 }
605 for (var i = 0; i < propValue.length; i++) {
606 var error = typeChecker(propValue, i, componentName, location, propFullName + "[" + i + "]", ReactPropTypesSecret);
607 if (error instanceof Error) return error;
608 }
609 return null;
610 }
611 return createChainableTypeChecker(validate);
612 }
613 function createElementTypeChecker() {
614 function validate(props, propName, componentName, location, propFullName) {
615 var propValue = props[propName];
616 if (!isValidElement(propValue)) {
617 var propType = getPropType(propValue);
618 return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement."));
619 }
620 return null;
621 }
622 return createChainableTypeChecker(validate);
623 }
624 function createElementTypeTypeChecker() {
625 function validate(props, propName, componentName, location, propFullName) {
626 var propValue = props[propName];
627 if (!ReactIs.isValidElementType(propValue)) {
628 var propType = getPropType(propValue);
629 return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement type."));
630 }
631 return null;
632 }
633 return createChainableTypeChecker(validate);
634 }
635 function createInstanceTypeChecker(expectedClass) {
636 function validate(props, propName, componentName, location, propFullName) {
637 if (!(props[propName] instanceof expectedClass)) {
638 var expectedClassName = expectedClass.name || ANONYMOUS;
639 var actualClassName = getClassName(props[propName]);
640 return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + actualClassName + "` supplied to `" + componentName + "`, expected ") + ("instance of `" + expectedClassName + "`."));
641 }
642 return null;
643 }
644 return createChainableTypeChecker(validate);
645 }
646 function createEnumTypeChecker(expectedValues) {
647 if (!Array.isArray(expectedValues)) {
648 if (arguments.length > 1) printWarning("Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).");
649 else printWarning("Invalid argument supplied to oneOf, expected an array.");
650 return emptyFunctionThatReturnsNull;
651 }
652 function validate(props, propName, componentName, location, propFullName) {
653 var propValue = props[propName];
654 for (var i = 0; i < expectedValues.length; i++) if (is(propValue, expectedValues[i])) return null;
655 var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
656 if (getPreciseType(value) === "symbol") return String(value);
657 return value;
658 });
659 return new PropTypeError("Invalid " + location + " `" + propFullName + "` of value `" + String(propValue) + "` " + ("supplied to `" + componentName + "`, expected one of " + valuesString + "."));
660 }
661 return createChainableTypeChecker(validate);
662 }
663 function createObjectOfTypeChecker(typeChecker) {
664 function validate(props, propName, componentName, location, propFullName) {
665 if (typeof typeChecker !== "function") return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside objectOf.");
666 var propValue = props[propName];
667 var propType = getPropType(propValue);
668 if (propType !== "object") return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an object."));
669 for (var key in propValue) if (has(propValue, key)) {
670 var error = typeChecker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
671 if (error instanceof Error) return error;
672 }
673 return null;
674 }
675 return createChainableTypeChecker(validate);
676 }
677 function createUnionTypeChecker(arrayOfTypeCheckers) {
678 if (!Array.isArray(arrayOfTypeCheckers)) {
679 printWarning("Invalid argument supplied to oneOfType, expected an instance of array.");
680 return emptyFunctionThatReturnsNull;
681 }
682 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
683 var checker = arrayOfTypeCheckers[i];
684 if (typeof checker !== "function") {
685 printWarning("Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + getPostfixForTypeWarning(checker) + " at index " + i + ".");
686 return emptyFunctionThatReturnsNull;
687 }
688 }
689 function validate(props, propName, componentName, location, propFullName) {
690 var expectedTypes = [];
691 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
692 var checker = arrayOfTypeCheckers[i];
693 var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
694 if (checkerResult == null) return null;
695 if (checkerResult.data && has(checkerResult.data, "expectedType")) expectedTypes.push(checkerResult.data.expectedType);
696 }
697 var expectedTypesMessage = expectedTypes.length > 0 ? ", expected one of type [" + expectedTypes.join(", ") + "]" : "";
698 return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`" + expectedTypesMessage + "."));
699 }
700 return createChainableTypeChecker(validate);
701 }
702 function createNodeChecker() {
703 function validate(props, propName, componentName, location, propFullName) {
704 if (!isNode(props[propName])) return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`, expected a ReactNode."));
705 return null;
706 }
707 return createChainableTypeChecker(validate);
708 }
709 function invalidValidatorError(componentName, location, propFullName, key, type) {
710 return new PropTypeError((componentName || "React class") + ": " + location + " type `" + propFullName + "." + key + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + type + "`.");
711 }
712 function createShapeTypeChecker(shapeTypes) {
713 function validate(props, propName, componentName, location, propFullName) {
714 var propValue = props[propName];
715 var propType = getPropType(propValue);
716 if (propType !== "object") return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
717 for (var key in shapeTypes) {
718 var checker = shapeTypes[key];
719 if (typeof checker !== "function") return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
720 var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
721 if (error) return error;
722 }
723 return null;
724 }
725 return createChainableTypeChecker(validate);
726 }
727 function createStrictShapeTypeChecker(shapeTypes) {
728 function validate(props, propName, componentName, location, propFullName) {
729 var propValue = props[propName];
730 var propType = getPropType(propValue);
731 if (propType !== "object") return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
732 for (var key in assign({}, props[propName], shapeTypes)) {
733 var checker = shapeTypes[key];
734 if (has(shapeTypes, key) && typeof checker !== "function") return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
735 if (!checker) return new PropTypeError("Invalid " + location + " `" + propFullName + "` key `" + key + "` supplied to `" + componentName + "`.\nBad object: " + JSON.stringify(props[propName], null, " ") + "\nValid keys: " + JSON.stringify(Object.keys(shapeTypes), null, " "));
736 var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
737 if (error) return error;
738 }
739 return null;
740 }
741 return createChainableTypeChecker(validate);
742 }
743 function isNode(propValue) {
744 switch (typeof propValue) {
745 case "number":
746 case "string":
747 case "undefined": return true;
748 case "boolean": return !propValue;
749 case "object":
750 if (Array.isArray(propValue)) return propValue.every(isNode);
751 if (propValue === null || isValidElement(propValue)) return true;
752 var iteratorFn = getIteratorFn(propValue);
753 if (iteratorFn) {
754 var iterator = iteratorFn.call(propValue);
755 var step;
756 if (iteratorFn !== propValue.entries) {
757 while (!(step = iterator.next()).done) if (!isNode(step.value)) return false;
758 } else while (!(step = iterator.next()).done) {
759 var entry = step.value;
760 if (entry) {
761 if (!isNode(entry[1])) return false;
762 }
763 }
764 } else return false;
765 return true;
766 default: return false;
767 }
768 }
769 function isSymbol(propType, propValue) {
770 if (propType === "symbol") return true;
771 if (!propValue) return false;
772 if (propValue["@@toStringTag"] === "Symbol") return true;
773 if (typeof Symbol === "function" && propValue instanceof Symbol) return true;
774 return false;
775 }
776 function getPropType(propValue) {
777 var propType = typeof propValue;
778 if (Array.isArray(propValue)) return "array";
779 if (propValue instanceof RegExp) return "object";
780 if (isSymbol(propType, propValue)) return "symbol";
781 return propType;
782 }
783 function getPreciseType(propValue) {
784 if (typeof propValue === "undefined" || propValue === null) return "" + propValue;
785 var propType = getPropType(propValue);
786 if (propType === "object") {
787 if (propValue instanceof Date) return "date";
788 else if (propValue instanceof RegExp) return "regexp";
789 }
790 return propType;
791 }
792 function getPostfixForTypeWarning(value) {
793 var type = getPreciseType(value);
794 switch (type) {
795 case "array":
796 case "object": return "an " + type;
797 case "boolean":
798 case "date":
799 case "regexp": return "a " + type;
800 default: return type;
801 }
802 }
803 function getClassName(propValue) {
804 if (!propValue.constructor || !propValue.constructor.name) return ANONYMOUS;
805 return propValue.constructor.name;
806 }
807 ReactPropTypes.checkPropTypes = checkPropTypes;
808 ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
809 ReactPropTypes.PropTypes = ReactPropTypes;
810 return ReactPropTypes;
811 };
812 }));
813
814 //#endregion
815 //#region node_modules/prop-types/index.js
816 var require_prop_types = /* @__PURE__ */ __commonJSMin(((exports, module) => {
817 var ReactIs = require_react_is();
818 var throwOnDirectAccess = true;
819 module.exports = require_factoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess);
820 }));
821
822 //#endregion
823 //#region node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
824 var import_prop_types = /* @__PURE__ */ __toESM(require_prop_types());
825 function _arrayWithHoles(r) {
826 if (Array.isArray(r)) return r;
827 }
828
829 //#endregion
830 //#region node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
831 function _iterableToArrayLimit(r, l) {
832 var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
833 if (null != t) {
834 var e;
835 var n;
836 var i;
837 var u;
838 var a = [];
839 var f = !0;
840 var o = !1;
841 try {
842 if (i = (t = t.call(r)).next, 0 === l) {
843 if (Object(t) !== t) return;
844 f = !1;
845 } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
846 } catch (r) {
847 o = !0, n = r;
848 } finally {
849 try {
850 if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
851 } finally {
852 if (o) throw n;
853 }
854 }
855 return a;
856 }
857 }
858
859 //#endregion
860 //#region node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
861 function _arrayLikeToArray(r, a) {
862 (null == a || a > r.length) && (a = r.length);
863 for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
864 return n;
865 }
866
867 //#endregion
868 //#region node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
869 function _unsupportedIterableToArray(r, a) {
870 if (r) {
871 if ("string" == typeof r) return _arrayLikeToArray(r, a);
872 var t = {}.toString.call(r).slice(8, -1);
873 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;
874 }
875 }
876
877 //#endregion
878 //#region node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
879 function _nonIterableRest() {
880 throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
881 }
882
883 //#endregion
884 //#region node_modules/@babel/runtime/helpers/esm/slicedToArray.js
885 function _slicedToArray(r, e) {
886 return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
887 }
888
889 //#endregion
890 //#region node_modules/@babel/runtime/helpers/esm/classCallCheck.js
891 function _classCallCheck(a, n) {
892 if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
893 }
894
895 //#endregion
896 //#region node_modules/@babel/runtime/helpers/esm/typeof.js
897 function _typeof(o) {
898 "@babel/helpers - typeof";
899 return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
900 return typeof o;
901 } : function(o) {
902 return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
903 }, _typeof(o);
904 }
905
906 //#endregion
907 //#region node_modules/@babel/runtime/helpers/esm/toPrimitive.js
908 function toPrimitive(t, r) {
909 if ("object" != _typeof(t) || !t) return t;
910 var e = t[Symbol.toPrimitive];
911 if (void 0 !== e) {
912 var i = e.call(t, r || "default");
913 if ("object" != _typeof(i)) return i;
914 throw new TypeError("@@toPrimitive must return a primitive value.");
915 }
916 return ("string" === r ? String : Number)(t);
917 }
918
919 //#endregion
920 //#region node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
921 function toPropertyKey(t) {
922 var i = toPrimitive(t, "string");
923 return "symbol" == _typeof(i) ? i : i + "";
924 }
925
926 //#endregion
927 //#region node_modules/@babel/runtime/helpers/esm/createClass.js
928 function _defineProperties(e, r) {
929 for (var t = 0; t < r.length; t++) {
930 var o = r[t];
931 o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o);
932 }
933 }
934 function _createClass(e, r, t) {
935 return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e;
936 }
937
938 //#endregion
939 //#region modules/editor-one/assets/js/sidebar-navigation/classes/menu-active-state-resolver.js
940 var MenuActiveStateResolver = /*#__PURE__*/ function() {
941 function MenuActiveStateResolver(activeMenuSlug, activeChildSlug) {
942 _classCallCheck(this, MenuActiveStateResolver);
943 this.activeMenuSlug = activeMenuSlug;
944 this.activeChildSlug = activeChildSlug;
945 }
946 return _createClass(MenuActiveStateResolver, [{
947 key: "isMenuActive",
948 value: function isMenuActive(item) {
949 return item.slug === this.activeMenuSlug;
950 }
951 }, {
952 key: "isChildActive",
953 value: function isChildActive(childItem) {
954 return childItem.slug === this.activeChildSlug;
955 }
956 }]);
957 }();
958
959 //#endregion
960 //#region node_modules/@babel/runtime/helpers/esm/defineProperty.js
961 function _defineProperty(e, r, t) {
962 return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
963 value: t,
964 enumerable: !0,
965 configurable: !0,
966 writable: !0
967 }) : e[r] = t, e;
968 }
969
970 //#endregion
971 //#region assets/dev/js/editor/utils/editor-one-events.js
972 function ownKeys(e, r) {
973 var t = Object.keys(e);
974 if (Object.getOwnPropertySymbols) {
975 var o = Object.getOwnPropertySymbols(e);
976 r && (o = o.filter(function(r) {
977 return Object.getOwnPropertyDescriptor(e, r).enumerable;
978 })), t.push.apply(t, o);
979 }
980 return t;
981 }
982 function _objectSpread(e) {
983 for (var r = 1; r < arguments.length; r++) {
984 var t = null != arguments[r] ? arguments[r] : {};
985 r % 2 ? ownKeys(Object(t), !0).forEach(function(r) {
986 _defineProperty(e, r, t[r]);
987 }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r) {
988 Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
989 });
990 }
991 return e;
992 }
993 var EditorOneEventManager = /*#__PURE__*/ function() {
994 function EditorOneEventManager() {
995 _classCallCheck(this, EditorOneEventManager);
996 }
997 return _createClass(EditorOneEventManager, null, [
998 {
999 key: "getEventsManager",
1000 value: function getEventsManager() {
1001 var _elementorCommon;
1002 return (_elementorCommon = elementorCommon) === null || _elementorCommon === void 0 ? void 0 : _elementorCommon.eventsManager;
1003 }
1004 },
1005 {
1006 key: "getConfig",
1007 value: function getConfig() {
1008 var _this$getEventsManage;
1009 return (_this$getEventsManage = this.getEventsManager()) === null || _this$getEventsManage === void 0 ? void 0 : _this$getEventsManage.config;
1010 }
1011 },
1012 {
1013 key: "canSendEvents",
1014 value: function canSendEvents() {
1015 var _elementorCommon2;
1016 return ((_elementorCommon2 = elementorCommon) === null || _elementorCommon2 === void 0 || (_elementorCommon2 = _elementorCommon2.config) === null || _elementorCommon2 === void 0 || (_elementorCommon2 = _elementorCommon2.editor_events) === null || _elementorCommon2 === void 0 ? void 0 : _elementorCommon2.can_send_events) || false;
1017 }
1018 },
1019 {
1020 key: "isEventsManagerAvailable",
1021 value: function isEventsManagerAvailable() {
1022 var eventsManager = this.getEventsManager();
1023 return eventsManager && "function" === typeof eventsManager.dispatchEvent;
1024 }
1025 },
1026 {
1027 key: "dispatchEvent",
1028 value: function dispatchEvent(eventName, payload) {
1029 try {
1030 if (!this.isEventsManagerAvailable() || !this.canSendEvents()) return false;
1031 this.getEventsManager().dispatchEvent(eventName, payload);
1032 return true;
1033 } catch (error) {
1034 return false;
1035 }
1036 }
1037 },
1038 {
1039 key: "toLowerSnake",
1040 value: function toLowerSnake(value) {
1041 if (!value || "string" !== typeof value) return value;
1042 return value.replace(/\s+/g, "_").toLowerCase();
1043 }
1044 },
1045 {
1046 key: "decodeHtmlEntities",
1047 value: function decodeHtmlEntities(text) {
1048 if (!text || "string" !== typeof text) return text;
1049 return new DOMParser().parseFromString(text, "text/html").body.textContent || text;
1050 }
1051 },
1052 {
1053 key: "isInEditorContext",
1054 value: function isInEditorContext() {
1055 var _window$elementor;
1056 return "undefined" !== typeof window.elementor && !!((_window$elementor = window.elementor) !== null && _window$elementor !== void 0 && _window$elementor.documents);
1057 }
1058 },
1059 {
1060 key: "getFinderContext",
1061 value: function getFinderContext() {
1062 var _config$appTypes;
1063 var _config$appTypes2;
1064 var _config$locations;
1065 var _config$locations2;
1066 var config = this.getConfig();
1067 var isEditor = this.isInEditorContext();
1068 return {
1069 windowName: isEditor ? config === null || config === void 0 || (_config$appTypes = config.appTypes) === null || _config$appTypes === void 0 ? void 0 : _config$appTypes.editor : config === null || config === void 0 || (_config$appTypes2 = config.appTypes) === null || _config$appTypes2 === void 0 ? void 0 : _config$appTypes2.wpAdmin,
1070 targetLocation: this.toLowerSnake(isEditor ? config === null || config === void 0 || (_config$locations = config.locations) === null || _config$locations === void 0 ? void 0 : _config$locations.topBar : config === null || config === void 0 || (_config$locations2 = config.locations) === null || _config$locations2 === void 0 ? void 0 : _config$locations2.sidebar)
1071 };
1072 }
1073 },
1074 {
1075 key: "createBasePayload",
1076 value: function createBasePayload() {
1077 var _config$appTypes$edit;
1078 var _config$appTypes3;
1079 var overrides = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1080 var config = this.getConfig();
1081 return _objectSpread({ window_name: (_config$appTypes$edit = config === null || config === void 0 || (_config$appTypes3 = config.appTypes) === null || _config$appTypes3 === void 0 ? void 0 : _config$appTypes3.editor) !== null && _config$appTypes$edit !== void 0 ? _config$appTypes$edit : "editor" }, overrides);
1082 }
1083 },
1084 {
1085 key: "sendTopBarPublishDropdown",
1086 value: function sendTopBarPublishDropdown(targetName) {
1087 var _config$names;
1088 var _config$triggers;
1089 var _config$targetTypes;
1090 var _config$interactionRe;
1091 var _config$locations3;
1092 var _config$secondaryLoca;
1093 var _config$targetTypes2;
1094 var config = this.getConfig();
1095 return this.dispatchEvent(config === null || config === void 0 || (_config$names = config.names) === null || _config$names === void 0 || (_config$names = _config$names.editorOne) === null || _config$names === void 0 ? void 0 : _config$names.topBarPublishDropdown, this.createBasePayload({
1096 interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers = config.triggers) === null || _config$triggers === void 0 ? void 0 : _config$triggers.click),
1097 target_type: config === null || config === void 0 || (_config$targetTypes = config.targetTypes) === null || _config$targetTypes === void 0 ? void 0 : _config$targetTypes.dropdownItem,
1098 target_name: targetName,
1099 interaction_result: config === null || config === void 0 || (_config$interactionRe = config.interactionResults) === null || _config$interactionRe === void 0 ? void 0 : _config$interactionRe.actionSelected,
1100 target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations3 = config.locations) === null || _config$locations3 === void 0 ? void 0 : _config$locations3.topBar),
1101 location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca = config.secondaryLocations) === null || _config$secondaryLoca === void 0 ? void 0 : _config$secondaryLoca.publishDropdown),
1102 location_l2: config === null || config === void 0 || (_config$targetTypes2 = config.targetTypes) === null || _config$targetTypes2 === void 0 ? void 0 : _config$targetTypes2.dropdownItem,
1103 interaction_description: "User selected an action from the publish dropdown"
1104 }));
1105 }
1106 },
1107 {
1108 key: "sendTopBarPageList",
1109 value: function sendTopBarPageList(targetName) {
1110 var _config$names2;
1111 var _config$triggers2;
1112 var _config$targetTypes3;
1113 var _config$interactionRe2;
1114 var _config$interactionRe3;
1115 var _config$locations4;
1116 var _config$secondaryLoca2;
1117 var _config$targetTypes4;
1118 var isCreate = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
1119 var config = this.getConfig();
1120 return this.dispatchEvent(config === null || config === void 0 || (_config$names2 = config.names) === null || _config$names2 === void 0 || (_config$names2 = _config$names2.editorOne) === null || _config$names2 === void 0 ? void 0 : _config$names2.topBarPageList, this.createBasePayload({
1121 interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers2 = config.triggers) === null || _config$triggers2 === void 0 ? void 0 : _config$triggers2.click),
1122 target_type: config === null || config === void 0 || (_config$targetTypes3 = config.targetTypes) === null || _config$targetTypes3 === void 0 ? void 0 : _config$targetTypes3.dropdownItem,
1123 target_name: targetName,
1124 interaction_result: isCreate ? config === null || config === void 0 || (_config$interactionRe2 = config.interactionResults) === null || _config$interactionRe2 === void 0 ? void 0 : _config$interactionRe2.create : config === null || config === void 0 || (_config$interactionRe3 = config.interactionResults) === null || _config$interactionRe3 === void 0 ? void 0 : _config$interactionRe3.navigate,
1125 target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations4 = config.locations) === null || _config$locations4 === void 0 ? void 0 : _config$locations4.topBar),
1126 location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca2 = config.secondaryLocations) === null || _config$secondaryLoca2 === void 0 ? void 0 : _config$secondaryLoca2.pageListDropdown),
1127 location_l2: config === null || config === void 0 || (_config$targetTypes4 = config.targetTypes) === null || _config$targetTypes4 === void 0 ? void 0 : _config$targetTypes4.dropdownItem,
1128 interaction_description: "User selected an action from the page list dropdown"
1129 }));
1130 }
1131 },
1132 {
1133 key: "sendSiteSettingsSession",
1134 value: function sendSiteSettingsSession(_ref) {
1135 var _config$names3;
1136 var _config$triggers3;
1137 var _config$interactionRe4;
1138 var _config$locations5;
1139 var _config$secondaryLoca3;
1140 var targetType = _ref.targetType;
1141 var _ref$visitedItems = _ref.visitedItems;
1142 var visitedItems = _ref$visitedItems === void 0 ? [] : _ref$visitedItems;
1143 var _ref$savedItems = _ref.savedItems;
1144 var savedItems = _ref$savedItems === void 0 ? [] : _ref$savedItems;
1145 var state = _ref.state;
1146 var config = this.getConfig();
1147 return this.dispatchEvent(config === null || config === void 0 || (_config$names3 = config.names) === null || _config$names3 === void 0 || (_config$names3 = _config$names3.editorOne) === null || _config$names3 === void 0 ? void 0 : _config$names3.siteSettingsSession, this.createBasePayload({
1148 interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers3 = config.triggers) === null || _config$triggers3 === void 0 ? void 0 : _config$triggers3.click),
1149 target_type: targetType,
1150 target_name: "site_settings",
1151 interaction_result: config === null || config === void 0 || (_config$interactionRe4 = config.interactionResults) === null || _config$interactionRe4 === void 0 ? void 0 : _config$interactionRe4.sessionEnd,
1152 target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations5 = config.locations) === null || _config$locations5 === void 0 ? void 0 : _config$locations5.leftPanel),
1153 location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca3 = config.secondaryLocations) === null || _config$secondaryLoca3 === void 0 ? void 0 : _config$secondaryLoca3.siteSettings),
1154 interaction_description: "Records areas visited as part of the site setting session",
1155 metadata: {
1156 visited_items: visitedItems,
1157 saved_items: savedItems
1158 },
1159 state
1160 }));
1161 }
1162 },
1163 {
1164 key: "sendELibraryNav",
1165 value: function sendELibraryNav(tabName) {
1166 var _config$names4;
1167 var _config$triggers4;
1168 var _config$targetTypes5;
1169 var _config$interactionRe5;
1170 var _config$locations6;
1171 var _config$secondaryLoca4;
1172 var config = this.getConfig();
1173 return this.dispatchEvent(config === null || config === void 0 || (_config$names4 = config.names) === null || _config$names4 === void 0 || (_config$names4 = _config$names4.editorOne) === null || _config$names4 === void 0 ? void 0 : _config$names4.eLibraryNav, this.createBasePayload({
1174 interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers4 = config.triggers) === null || _config$triggers4 === void 0 ? void 0 : _config$triggers4.tabSelect),
1175 target_type: config === null || config === void 0 || (_config$targetTypes5 = config.targetTypes) === null || _config$targetTypes5 === void 0 ? void 0 : _config$targetTypes5.tab,
1176 target_name: this.toLowerSnake(tabName),
1177 interaction_result: config === null || config === void 0 || (_config$interactionRe5 = config.interactionResults) === null || _config$interactionRe5 === void 0 ? void 0 : _config$interactionRe5.tabChanged,
1178 target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations6 = config.locations) === null || _config$locations6 === void 0 ? void 0 : _config$locations6.elementorLibrary),
1179 location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca4 = config.secondaryLocations) === null || _config$secondaryLoca4 === void 0 ? void 0 : _config$secondaryLoca4.libraryTabs),
1180 interaction_description: "User navigates within elementor library"
1181 }));
1182 }
1183 },
1184 {
1185 key: "sendELibraryInsert",
1186 value: function sendELibraryInsert(_ref2) {
1187 var _config$triggers5;
1188 var _config$targetTypes6;
1189 var _config$interactionRe6;
1190 var _config$locations7;
1191 var _config$secondaryLoca5;
1192 var _config$names5;
1193 var assetId = _ref2.assetId;
1194 var assetName = _ref2.assetName;
1195 var libraryType = _ref2.libraryType;
1196 var _ref2$proRequired = _ref2.proRequired;
1197 var proRequired = _ref2$proRequired === void 0 ? false : _ref2$proRequired;
1198 var config = this.getConfig();
1199 var payload = this.createBasePayload({
1200 interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers5 = config.triggers) === null || _config$triggers5 === void 0 ? void 0 : _config$triggers5.insert),
1201 target_type: config === null || config === void 0 || (_config$targetTypes6 = config.targetTypes) === null || _config$targetTypes6 === void 0 ? void 0 : _config$targetTypes6.button,
1202 target_name: String(assetId),
1203 interaction_result: config === null || config === void 0 || (_config$interactionRe6 = config.interactionResults) === null || _config$interactionRe6 === void 0 ? void 0 : _config$interactionRe6.assetInserted,
1204 target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations7 = config.locations) === null || _config$locations7 === void 0 ? void 0 : _config$locations7.elementorLibrary),
1205 location_l1: this.toLowerSnake(libraryType),
1206 location_l2: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca5 = config.secondaryLocations) === null || _config$secondaryLoca5 === void 0 ? void 0 : _config$secondaryLoca5.assetCard),
1207 interaction_description: "User inserts block/pages from elementor library",
1208 metadata: {
1209 template_id: String(assetId),
1210 template_name: this.decodeHtmlEntities(assetName) || ""
1211 }
1212 });
1213 if (proRequired) payload.state = "pro_plan_required";
1214 return this.dispatchEvent(config === null || config === void 0 || (_config$names5 = config.names) === null || _config$names5 === void 0 || (_config$names5 = _config$names5.editorOne) === null || _config$names5 === void 0 ? void 0 : _config$names5.eLibraryInsert, payload);
1215 }
1216 },
1217 {
1218 key: "sendELibraryFavorite",
1219 value: function sendELibraryFavorite(_ref3) {
1220 var _config$triggers6;
1221 var _config$targetTypes7;
1222 var _config$interactionRe7;
1223 var _config$locations8;
1224 var _config$secondaryLoca6;
1225 var _config$names6;
1226 var assetId = _ref3.assetId;
1227 var assetName = _ref3.assetName;
1228 var libraryType = _ref3.libraryType;
1229 var isFavorite = _ref3.isFavorite;
1230 var _ref3$proRequired = _ref3.proRequired;
1231 var proRequired = _ref3$proRequired === void 0 ? false : _ref3$proRequired;
1232 var config = this.getConfig();
1233 var payload = this.createBasePayload({
1234 interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers6 = config.triggers) === null || _config$triggers6 === void 0 ? void 0 : _config$triggers6.click),
1235 target_type: config === null || config === void 0 || (_config$targetTypes7 = config.targetTypes) === null || _config$targetTypes7 === void 0 ? void 0 : _config$targetTypes7.toggle,
1236 target_name: String(assetId),
1237 interaction_result: config === null || config === void 0 || (_config$interactionRe7 = config.interactionResults) === null || _config$interactionRe7 === void 0 ? void 0 : _config$interactionRe7.assetFavorite,
1238 target_value: Boolean(isFavorite),
1239 target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations8 = config.locations) === null || _config$locations8 === void 0 ? void 0 : _config$locations8.elementorLibrary),
1240 location_l1: this.toLowerSnake(libraryType),
1241 location_l2: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca6 = config.secondaryLocations) === null || _config$secondaryLoca6 === void 0 ? void 0 : _config$secondaryLoca6.assetCard),
1242 interaction_description: "User favorite block/pages from elementor library",
1243 metadata: {
1244 template_id: String(assetId),
1245 template_name: this.decodeHtmlEntities(assetName) || ""
1246 }
1247 });
1248 if (proRequired) payload.state = "pro_plan_required";
1249 return this.dispatchEvent(config === null || config === void 0 || (_config$names6 = config.names) === null || _config$names6 === void 0 || (_config$names6 = _config$names6.editorOne) === null || _config$names6 === void 0 ? void 0 : _config$names6.eLibraryFavorite, payload);
1250 }
1251 },
1252 {
1253 key: "sendELibraryGenerateAi",
1254 value: function sendELibraryGenerateAi(_ref4) {
1255 var _config$names7;
1256 var _config$triggers7;
1257 var _config$targetTypes8;
1258 var _config$interactionRe8;
1259 var _config$locations9;
1260 var _config$secondaryLoca7;
1261 var assetId = _ref4.assetId;
1262 var assetName = _ref4.assetName;
1263 var libraryType = _ref4.libraryType;
1264 var config = this.getConfig();
1265 return this.dispatchEvent(config === null || config === void 0 || (_config$names7 = config.names) === null || _config$names7 === void 0 || (_config$names7 = _config$names7.editorOne) === null || _config$names7 === void 0 ? void 0 : _config$names7.eLibraryGenerateAi, this.createBasePayload({
1266 interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers7 = config.triggers) === null || _config$triggers7 === void 0 ? void 0 : _config$triggers7.click),
1267 target_type: config === null || config === void 0 || (_config$targetTypes8 = config.targetTypes) === null || _config$targetTypes8 === void 0 ? void 0 : _config$targetTypes8.button,
1268 target_name: String(assetId),
1269 interaction_result: config === null || config === void 0 || (_config$interactionRe8 = config.interactionResults) === null || _config$interactionRe8 === void 0 ? void 0 : _config$interactionRe8.aiGenerate,
1270 target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations9 = config.locations) === null || _config$locations9 === void 0 ? void 0 : _config$locations9.elementorLibrary),
1271 location_l1: this.toLowerSnake(libraryType),
1272 location_l2: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca7 = config.secondaryLocations) === null || _config$secondaryLoca7 === void 0 ? void 0 : _config$secondaryLoca7.assetCard),
1273 interaction_description: "User generated block/page based on a library asset",
1274 metadata: {
1275 template_id: String(assetId),
1276 template_name: this.decodeHtmlEntities(assetName) || ""
1277 }
1278 }));
1279 }
1280 },
1281 {
1282 key: "sendFinderSearchInput",
1283 value: function sendFinderSearchInput(_ref5) {
1284 var _config$triggers8;
1285 var _config$targetTypes9;
1286 var _config$interactionRe9;
1287 var _config$interactionRe0;
1288 var _config$secondaryLoca8;
1289 var _config$names8;
1290 var resultsCount = _ref5.resultsCount;
1291 var _ref5$searchTerm = _ref5.searchTerm;
1292 var searchTerm = _ref5$searchTerm === void 0 ? null : _ref5$searchTerm;
1293 var config = this.getConfig();
1294 var hasResults = resultsCount > 0;
1295 var finderContext = this.getFinderContext();
1296 var payload = this.createBasePayload({
1297 window_name: finderContext.windowName,
1298 interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers8 = config.triggers) === null || _config$triggers8 === void 0 ? void 0 : _config$triggers8.typing),
1299 target_type: config === null || config === void 0 || (_config$targetTypes9 = config.targetTypes) === null || _config$targetTypes9 === void 0 ? void 0 : _config$targetTypes9.searchInput,
1300 target_name: "finder",
1301 interaction_result: hasResults ? config === null || config === void 0 || (_config$interactionRe9 = config.interactionResults) === null || _config$interactionRe9 === void 0 ? void 0 : _config$interactionRe9.resultsUpdated : config === null || config === void 0 || (_config$interactionRe0 = config.interactionResults) === null || _config$interactionRe0 === void 0 ? void 0 : _config$interactionRe0.noResults,
1302 target_location: finderContext.targetLocation,
1303 location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca8 = config.secondaryLocations) === null || _config$secondaryLoca8 === void 0 ? void 0 : _config$secondaryLoca8.finder),
1304 interaction_description: "Finder search input, follows debounce behavior",
1305 metadata: { results_count: resultsCount }
1306 });
1307 if (!hasResults && searchTerm) payload.metadata.search_term = searchTerm;
1308 return this.dispatchEvent(config === null || config === void 0 || (_config$names8 = config.names) === null || _config$names8 === void 0 || (_config$names8 = _config$names8.editorOne) === null || _config$names8 === void 0 ? void 0 : _config$names8.finderSearchInput, payload);
1309 }
1310 },
1311 {
1312 key: "sendFinderResultSelect",
1313 value: function sendFinderResultSelect(choice) {
1314 var _config$names9;
1315 var _config$triggers9;
1316 var _config$targetTypes0;
1317 var _config$interactionRe1;
1318 var _config$secondaryLoca9;
1319 var _config$secondaryLoca0;
1320 var config = this.getConfig();
1321 var finderContext = this.getFinderContext();
1322 return this.dispatchEvent(config === null || config === void 0 || (_config$names9 = config.names) === null || _config$names9 === void 0 || (_config$names9 = _config$names9.editorOne) === null || _config$names9 === void 0 ? void 0 : _config$names9.finderResultSelect, this.createBasePayload({
1323 window_name: finderContext.windowName,
1324 interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers9 = config.triggers) === null || _config$triggers9 === void 0 ? void 0 : _config$triggers9.click),
1325 target_type: config === null || config === void 0 || (_config$targetTypes0 = config.targetTypes) === null || _config$targetTypes0 === void 0 ? void 0 : _config$targetTypes0.searchResult,
1326 target_name: choice,
1327 interaction_result: config === null || config === void 0 || (_config$interactionRe1 = config.interactionResults) === null || _config$interactionRe1 === void 0 ? void 0 : _config$interactionRe1.selected,
1328 target_location: finderContext.targetLocation,
1329 location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca9 = config.secondaryLocations) === null || _config$secondaryLoca9 === void 0 ? void 0 : _config$secondaryLoca9.finder),
1330 location_l2: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca0 = config.secondaryLocations) === null || _config$secondaryLoca0 === void 0 ? void 0 : _config$secondaryLoca0.finderResults),
1331 interaction_description: "Finder search results was selected"
1332 }));
1333 }
1334 },
1335 {
1336 key: "sendCanvasEmptyBoxAction",
1337 value: function sendCanvasEmptyBoxAction(_ref6) {
1338 var _config$triggers0;
1339 var _config$targetTypes1;
1340 var _config$interactionRe10;
1341 var _config$locations0;
1342 var _config$secondaryLoca1;
1343 var _config$names0;
1344 var targetName = _ref6.targetName;
1345 var _ref6$metadata = _ref6.metadata;
1346 var metadata = _ref6$metadata === void 0 ? {} : _ref6$metadata;
1347 var _ref6$containerCreate = _ref6.containerCreated;
1348 var containerCreated = _ref6$containerCreate === void 0 ? null : _ref6$containerCreate;
1349 var config = this.getConfig();
1350 var payload = this.createBasePayload({
1351 interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers0 = config.triggers) === null || _config$triggers0 === void 0 ? void 0 : _config$triggers0.click),
1352 target_type: config === null || config === void 0 || (_config$targetTypes1 = config.targetTypes) === null || _config$targetTypes1 === void 0 ? void 0 : _config$targetTypes1.buttons,
1353 target_name: targetName,
1354 interaction_result: config === null || config === void 0 || (_config$interactionRe10 = config.interactionResults) === null || _config$interactionRe10 === void 0 ? void 0 : _config$interactionRe10.selected,
1355 target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations0 = config.locations) === null || _config$locations0 === void 0 ? void 0 : _config$locations0.canvas),
1356 location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca1 = config.secondaryLocations) === null || _config$secondaryLoca1 === void 0 ? void 0 : _config$secondaryLoca1.emptyBox),
1357 interaction_description: "Empty box on canvas actions"
1358 });
1359 if (Object.keys(metadata).length > 0) payload.metadata = metadata;
1360 if (containerCreated !== null) payload.state = containerCreated;
1361 return this.dispatchEvent(config === null || config === void 0 || (_config$names0 = config.names) === null || _config$names0 === void 0 || (_config$names0 = _config$names0.editorOne) === null || _config$names0 === void 0 ? void 0 : _config$names0.canvasEmptyBoxAction, payload);
1362 }
1363 },
1364 {
1365 key: "sendWidgetPanelSearch",
1366 value: function sendWidgetPanelSearch(_ref7) {
1367 var _config$triggers1;
1368 var _config$targetTypes10;
1369 var _config$interactionRe11;
1370 var _config$interactionRe12;
1371 var _config$locations1;
1372 var _config$locations10;
1373 var _config$secondaryLoca10;
1374 var _config$names1;
1375 var resultsCount = _ref7.resultsCount;
1376 var _ref7$userInput = _ref7.userInput;
1377 var userInput = _ref7$userInput === void 0 ? null : _ref7$userInput;
1378 var config = this.getConfig();
1379 var hasResults = resultsCount > 0;
1380 var payload = this.createBasePayload({
1381 interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers1 = config.triggers) === null || _config$triggers1 === void 0 ? void 0 : _config$triggers1.typing),
1382 target_type: config === null || config === void 0 || (_config$targetTypes10 = config.targetTypes) === null || _config$targetTypes10 === void 0 ? void 0 : _config$targetTypes10.searchWidget,
1383 target_name: "search_widget",
1384 interaction_result: hasResults ? config === null || config === void 0 || (_config$interactionRe11 = config.interactionResults) === null || _config$interactionRe11 === void 0 ? void 0 : _config$interactionRe11.resultsUpdated : config === null || config === void 0 || (_config$interactionRe12 = config.interactionResults) === null || _config$interactionRe12 === void 0 ? void 0 : _config$interactionRe12.noResults,
1385 target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations1 = config.locations) === null || _config$locations1 === void 0 ? void 0 : _config$locations1.leftPanel),
1386 location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$locations10 = config.locations) === null || _config$locations10 === void 0 ? void 0 : _config$locations10.widgetPanel),
1387 location_l2: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca10 = config.secondaryLocations) === null || _config$secondaryLoca10 === void 0 ? void 0 : _config$secondaryLoca10.searchBar),
1388 interaction_description: "Widget search input, follows debounce behavior"
1389 });
1390 if (!hasResults && userInput) payload.metadata = { user_input: userInput };
1391 return this.dispatchEvent(config === null || config === void 0 || (_config$names1 = config.names) === null || _config$names1 === void 0 || (_config$names1 = _config$names1.editorOne) === null || _config$names1 === void 0 ? void 0 : _config$names1.widgetPanelSearch, payload);
1392 }
1393 },
1394 {
1395 key: "createWpDashPayload",
1396 value: function createWpDashPayload() {
1397 var _config$appTypes$wpDa;
1398 var _config$appTypes4;
1399 var _config$locations11;
1400 var overrides = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1401 var config = this.getConfig();
1402 return this.createBasePayload(_objectSpread({
1403 window_name: (_config$appTypes$wpDa = config === null || config === void 0 || (_config$appTypes4 = config.appTypes) === null || _config$appTypes4 === void 0 ? void 0 : _config$appTypes4.wpDash) !== null && _config$appTypes$wpDa !== void 0 ? _config$appTypes$wpDa : "wpdash",
1404 target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations11 = config.locations) === null || _config$locations11 === void 0 ? void 0 : _config$locations11.wpDashAdmin),
1405 location_l2: ""
1406 }, overrides));
1407 }
1408 },
1409 {
1410 key: "sendWpDashElementorMenuClick",
1411 value: function sendWpDashElementorMenuClick() {
1412 var _config$names10;
1413 var _config$triggers10;
1414 var _config$targetTypes11;
1415 var _config$interactionRe13;
1416 var _config$secondaryLoca11;
1417 var config = this.getConfig();
1418 return this.dispatchEvent(config === null || config === void 0 || (_config$names10 = config.names) === null || _config$names10 === void 0 || (_config$names10 = _config$names10.editorOne) === null || _config$names10 === void 0 ? void 0 : _config$names10.wpDashElementorMenuClick, this.createWpDashPayload({
1419 interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers10 = config.triggers) === null || _config$triggers10 === void 0 ? void 0 : _config$triggers10.click),
1420 target_type: config === null || config === void 0 || (_config$targetTypes11 = config.targetTypes) === null || _config$targetTypes11 === void 0 ? void 0 : _config$targetTypes11.wpDashAdminMenuItem,
1421 target_name: "elementor_menu_item",
1422 interaction_result: config === null || config === void 0 || (_config$interactionRe13 = config.interactionResults) === null || _config$interactionRe13 === void 0 ? void 0 : _config$interactionRe13.elementorSideMenuOpened,
1423 location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca11 = config.secondaryLocations) === null || _config$secondaryLoca11 === void 0 ? void 0 : _config$secondaryLoca11.wpDashElementorCoreMenu),
1424 interaction_description: "core_user_clicked_elementor_menu_item"
1425 }));
1426 }
1427 },
1428 {
1429 key: "sendWpDashEditorSubMenuHover",
1430 value: function sendWpDashEditorSubMenuHover() {
1431 var _config$names11;
1432 var _config$triggers11;
1433 var _config$targetTypes12;
1434 var _config$interactionRe14;
1435 var _config$secondaryLoca12;
1436 var config = this.getConfig();
1437 return this.dispatchEvent(config === null || config === void 0 || (_config$names11 = config.names) === null || _config$names11 === void 0 || (_config$names11 = _config$names11.editorOne) === null || _config$names11 === void 0 ? void 0 : _config$names11.wpDashEditorSubMenuHover, this.createWpDashPayload({
1438 interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers11 = config.triggers) === null || _config$triggers11 === void 0 ? void 0 : _config$triggers11.hover),
1439 target_type: config === null || config === void 0 || (_config$targetTypes12 = config.targetTypes) === null || _config$targetTypes12 === void 0 ? void 0 : _config$targetTypes12.wpDashEditorMenu,
1440 target_name: "wpdash_editor_sub_menu",
1441 interaction_result: config === null || config === void 0 || (_config$interactionRe14 = config.interactionResults) === null || _config$interactionRe14 === void 0 ? void 0 : _config$interactionRe14.editorSubMenuOpened,
1442 location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca12 = config.secondaryLocations) === null || _config$secondaryLoca12 === void 0 ? void 0 : _config$secondaryLoca12.wpDashElementorCoreSubMenu),
1443 interaction_description: "core_user_hovered_sub_menu"
1444 }));
1445 }
1446 },
1447 {
1448 key: "sendWpDashThemeBuilderClick",
1449 value: function sendWpDashThemeBuilderClick() {
1450 var _config$names12;
1451 var _config$triggers12;
1452 var _config$targetTypes13;
1453 var _config$interactionRe15;
1454 var _config$secondaryLoca13;
1455 var config = this.getConfig();
1456 return this.dispatchEvent(config === null || config === void 0 || (_config$names12 = config.names) === null || _config$names12 === void 0 || (_config$names12 = _config$names12.editorOne) === null || _config$names12 === void 0 ? void 0 : _config$names12.wpDashThemeBuilderClick, this.createWpDashPayload({
1457 interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers12 = config.triggers) === null || _config$triggers12 === void 0 ? void 0 : _config$triggers12.click),
1458 target_type: config === null || config === void 0 || (_config$targetTypes13 = config.targetTypes) === null || _config$targetTypes13 === void 0 ? void 0 : _config$targetTypes13.wpDashSubMenuItem,
1459 target_name: "theme_builder_menu_item",
1460 interaction_result: config === null || config === void 0 || (_config$interactionRe15 = config.interactionResults) === null || _config$interactionRe15 === void 0 ? void 0 : _config$interactionRe15.themeBuilderPromotionWindow,
1461 location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca13 = config.secondaryLocations) === null || _config$secondaryLoca13 === void 0 ? void 0 : _config$secondaryLoca13.wpDashThemeBuilder),
1462 interaction_description: "core_user_clicked_theme_builder_menu_item"
1463 }));
1464 }
1465 },
1466 {
1467 key: "sendSidebarMenuItemClicked",
1468 value: function sendSidebarMenuItemClicked(_ref8) {
1469 var eventId = _ref8.eventId;
1470 var groupEventId = _ref8.groupEventId;
1471 try {
1472 var _config$windowNames;
1473 var _config$triggers13;
1474 var _config$targetTypes14;
1475 var _config$interactionRe16;
1476 var _config$locations12;
1477 var _config$names13;
1478 var config = this.getConfig();
1479 var payload = this.createBasePayload({
1480 window_name: config === null || config === void 0 || (_config$windowNames = config.windowNames) === null || _config$windowNames === void 0 ? void 0 : _config$windowNames.sidebarMenu,
1481 interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers13 = config.triggers) === null || _config$triggers13 === void 0 ? void 0 : _config$triggers13.click),
1482 target_type: config === null || config === void 0 || (_config$targetTypes14 = config.targetTypes) === null || _config$targetTypes14 === void 0 ? void 0 : _config$targetTypes14.link,
1483 target_name: eventId,
1484 interaction_result: config === null || config === void 0 || (_config$interactionRe16 = config.interactionResults) === null || _config$interactionRe16 === void 0 ? void 0 : _config$interactionRe16.pageOpened,
1485 target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations12 = config.locations) === null || _config$locations12 === void 0 ? void 0 : _config$locations12.sidebar)
1486 });
1487 if (groupEventId) payload.location_l1 = groupEventId;
1488 return this.dispatchEvent(config === null || config === void 0 || (_config$names13 = config.names) === null || _config$names13 === void 0 || (_config$names13 = _config$names13.editorOne) === null || _config$names13 === void 0 ? void 0 : _config$names13.sidebarMenuItemClicked, payload);
1489 } catch (error) {
1490 return false;
1491 }
1492 }
1493 },
1494 {
1495 key: "sendSidebarMenuGroupToggled",
1496 value: function sendSidebarMenuGroupToggled(_ref9) {
1497 var eventId = _ref9.eventId;
1498 var isExpanded = _ref9.isExpanded;
1499 try {
1500 var _config$interactionRe17;
1501 var _config$interactionRe18;
1502 var _config$names14;
1503 var _config$windowNames2;
1504 var _config$triggers14;
1505 var _config$targetTypes15;
1506 var _config$locations13;
1507 var config = this.getConfig();
1508 var interactionResult = isExpanded ? config === null || config === void 0 || (_config$interactionRe17 = config.interactionResults) === null || _config$interactionRe17 === void 0 ? void 0 : _config$interactionRe17.expanded : config === null || config === void 0 || (_config$interactionRe18 = config.interactionResults) === null || _config$interactionRe18 === void 0 ? void 0 : _config$interactionRe18.collapsed;
1509 return this.dispatchEvent(config === null || config === void 0 || (_config$names14 = config.names) === null || _config$names14 === void 0 || (_config$names14 = _config$names14.editorOne) === null || _config$names14 === void 0 ? void 0 : _config$names14.sidebarMenuGroupToggled, this.createBasePayload({
1510 window_name: config === null || config === void 0 || (_config$windowNames2 = config.windowNames) === null || _config$windowNames2 === void 0 ? void 0 : _config$windowNames2.sidebarMenu,
1511 interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers14 = config.triggers) === null || _config$triggers14 === void 0 ? void 0 : _config$triggers14.click),
1512 target_type: config === null || config === void 0 || (_config$targetTypes15 = config.targetTypes) === null || _config$targetTypes15 === void 0 ? void 0 : _config$targetTypes15.toggle,
1513 target_name: eventId,
1514 interaction_result: interactionResult,
1515 target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations13 = config.locations) === null || _config$locations13 === void 0 ? void 0 : _config$locations13.sidebar)
1516 }));
1517 } catch (error) {
1518 return false;
1519 }
1520 }
1521 }
1522 ]);
1523 }();
1524
1525 //#endregion
1526 //#region modules/editor-one/assets/js/sidebar-navigation/components/icons/tool.js
1527 var ToolIcon = function ToolIcon(props) {
1528 return /*#__PURE__*/ react.default.createElement(_elementor_ui.SvgIcon, _extends({
1529 width: "20",
1530 height: "20",
1531 viewBox: "0 0 20 20",
1532 fill: "none"
1533 }, props), /*#__PURE__*/ react.default.createElement("path", {
1534 d: "M5.83329 8.33354H8.33329V5.83354L5.41663 2.91687C6.34965 2.47127 7.39788 2.32588 8.41696 2.50072C9.43604 2.67557 10.3759 3.16205 11.107 3.89318C11.8381 4.62431 12.3246 5.56412 12.4994 6.58321C12.6743 7.60229 12.5289 8.65051 12.0833 9.58354L17.0833 14.5835C17.4148 14.9151 17.6011 15.3647 17.6011 15.8335C17.6011 16.3024 17.4148 16.752 17.0833 17.0835C16.7518 17.4151 16.3021 17.6013 15.8333 17.6013C15.3645 17.6013 14.9148 17.4151 14.5833 17.0835L9.58329 12.0835C8.65027 12.5291 7.60204 12.6745 6.58296 12.4997C5.56388 12.3248 4.62407 11.8384 3.89294 11.1072C3.16181 10.3761 2.67533 9.43628 2.50048 8.4172C2.32563 7.39812 2.47102 6.3499 2.91663 5.41687L5.83329 8.33354Z",
1535 fill: "none",
1536 stroke: "currentColor",
1537 strokeWidth: "1.2",
1538 strokeLinecap: "round",
1539 strokeLinejoin: "round"
1540 }));
1541 };
1542
1543 //#endregion
1544 //#region modules/editor-one/assets/js/sidebar-navigation/components/shared/icon-map.js
1545 var ICON_MAP = {
1546 adjustments: _elementor_icons_AdjustmentsIcon.default,
1547 folder: _elementor_icons_FolderIcon.default,
1548 home: _elementor_icons_RocketIcon.default,
1549 send: _elementor_icons_SendIcon.default,
1550 settings: _elementor_icons_SettingsIcon.default,
1551 tool: ToolIcon,
1552 users: _elementor_icons_UsersIcon.default,
1553 extension: _elementor_icons_PlugIcon.default,
1554 "file-settings": _elementor_icons_FileSettingsIcon.default
1555 };
1556 var DEFAULT_ICON = _elementor_icons_HomeIcon.default;
1557
1558 //#endregion
1559 //#region modules/editor-one/assets/js/shared/is-rtl.js
1560 function isRTL() {
1561 var _elementorCommon$conf;
1562 var _elementorCommon;
1563 return (_elementorCommon$conf = (_elementorCommon = elementorCommon) === null || _elementorCommon === void 0 || (_elementorCommon = _elementorCommon.config) === null || _elementorCommon === void 0 ? void 0 : _elementorCommon.isRTL) !== null && _elementorCommon$conf !== void 0 ? _elementorCommon$conf : false;
1564 }
1565
1566 //#endregion
1567 //#region modules/editor-one/assets/js/sidebar-navigation/components/shared/styled-components.js
1568 var NavContainer = (0, _elementor_ui.styled)(_elementor_ui.Box)(function(_ref) {
1569 var theme = _ref.theme;
1570 return {
1571 display: "flex",
1572 flexDirection: "column",
1573 height: "100%",
1574 backgroundColor: theme.palette.background.paper,
1575 borderInlineEnd: "1px solid ".concat(theme.palette.divider)
1576 };
1577 });
1578 var SiteIconBox = (0, _elementor_ui.styled)(_elementor_ui.Box)(function(_ref2) {
1579 var theme = _ref2.theme;
1580 return {
1581 width: 40,
1582 height: 40,
1583 borderRadius: theme.shape.borderRadius * 2,
1584 border: "1px solid ".concat(theme.palette.divider),
1585 display: "flex",
1586 alignItems: "center",
1587 justifyContent: "center",
1588 backgroundColor: theme.palette.background.paper,
1589 color: theme.palette.action.active,
1590 "& svg": { fontSize: 24 }
1591 };
1592 });
1593 var CollapseButton = (0, _elementor_ui.styled)(_elementor_ui.IconButton, { shouldForwardProp: function shouldForwardProp(prop) {
1594 return prop !== "expanded";
1595 } })(function(_ref3) {
1596 var theme = _ref3.theme;
1597 var expanded = _ref3.expanded;
1598 var isRtlLanguage = isRTL();
1599 var transform = "none";
1600 if (expanded && isRtlLanguage) transform = "rotate(180deg) scaleX(-1)";
1601 else if (expanded) transform = "rotate(180deg)";
1602 else if (isRtlLanguage) transform = "scaleX(-1)";
1603 return {
1604 position: "absolute",
1605 insetInlineEnd: -28,
1606 bottom: -12,
1607 width: 24,
1608 height: 24,
1609 backgroundColor: theme.palette.background.paper,
1610 border: "1px solid ".concat(theme.palette.divider),
1611 color: theme.palette.action.active,
1612 zIndex: 1,
1613 "&:hover": { backgroundColor: theme.palette.background.paper },
1614 "& svg": {
1615 fontSize: 16,
1616 transform
1617 }
1618 };
1619 });
1620 var ScrollableContent = (0, _elementor_ui.styled)(_elementor_ui.Box)({
1621 flex: 1,
1622 overflowY: "auto",
1623 overflowX: "hidden"
1624 });
1625 var MenuList = (0, _elementor_ui.styled)(_elementor_ui.List)(function(_ref4) {
1626 return { padding: _ref4.theme.spacing(2) };
1627 });
1628 var MenuItemButton = (0, _elementor_ui.styled)(_elementor_ui.ListItemButton)(function(_ref5) {
1629 var theme = _ref5.theme;
1630 return {
1631 paddingLeft: theme.spacing(1),
1632 paddingRight: theme.spacing(1),
1633 marginBottom: 0,
1634 paddingBottom: theme.spacing(.5),
1635 whiteSpace: "nowrap",
1636 justifyContent: "center",
1637 borderRadius: 4
1638 };
1639 });
1640 var MenuIcon = (0, _elementor_ui.styled)(_elementor_ui.ListItemIcon)(function(_ref6) {
1641 return {
1642 minWidth: "auto",
1643 color: _ref6.theme.palette.text.primary,
1644 margin: 0,
1645 display: "flex",
1646 justifyContent: "center",
1647 "& svg": { fontSize: 20 }
1648 };
1649 });
1650 var ChildMenuItemButton = (0, _elementor_ui.styled)(_elementor_ui.ListItemButton)(function(_ref7) {
1651 var theme = _ref7.theme;
1652 return {
1653 paddingLeft: theme.spacing(6),
1654 paddingRight: theme.spacing(2),
1655 minHeight: 32,
1656 whiteSpace: "nowrap",
1657 borderRadius: 4
1658 };
1659 });
1660 var ChildListItem = (0, _elementor_ui.styled)(_elementor_ui.ListItem)({ maxHeight: 32 });
1661 var ExpandIcon = (0, _elementor_ui.styled)(_elementor_icons_ChevronDownSmallIcon.default, { shouldForwardProp: function shouldForwardProp(prop) {
1662 return prop !== "expanded";
1663 } })(function(_ref8) {
1664 return {
1665 fontSize: 20,
1666 transform: _ref8.expanded ? "rotate(180deg)" : "rotate(0deg)",
1667 transition: "transform 0.2s"
1668 };
1669 });
1670 var CollapsedMenuItemContainer = (0, _elementor_ui.styled)(_elementor_ui.Box)(function(_ref9) {
1671 return {
1672 display: "flex",
1673 justifyContent: "center",
1674 marginBottom: _ref9.theme.spacing(.5)
1675 };
1676 });
1677 var CollapsedIconButton = (0, _elementor_ui.styled)(_elementor_ui.IconButton, { shouldForwardProp: function shouldForwardProp(prop) {
1678 return prop !== "isHighlighted";
1679 } })(function(_ref0) {
1680 var theme = _ref0.theme;
1681 var isHighlighted = _ref0.isHighlighted;
1682 return {
1683 width: 36,
1684 height: 36,
1685 borderRadius: theme.shape.borderRadius,
1686 backgroundColor: isHighlighted ? theme.palette.action.selected : "transparent",
1687 color: theme.palette.text.primary,
1688 "&:hover": { backgroundColor: theme.palette.action.hover },
1689 "& svg": { fontSize: 20 }
1690 };
1691 });
1692 var PopoverTitle = (0, _elementor_ui.styled)(_elementor_ui.ListSubheader)(function(_ref1) {
1693 return {
1694 color: _ref1.theme.palette.text.tertiary,
1695 fontSize: 12,
1696 fontWeight: 400,
1697 height: 28
1698 };
1699 });
1700 var PopoverContent = (0, _elementor_ui.styled)(_elementor_ui.Box)(function(_ref10) {
1701 var theme = _ref10.theme;
1702 return {
1703 paddingTop: theme.spacing(1),
1704 paddingBottom: theme.spacing(1)
1705 };
1706 });
1707 var CollapsedHeaderContainer = (0, _elementor_ui.styled)(_elementor_ui.Box)(function(_ref11) {
1708 var theme = _ref11.theme;
1709 return {
1710 position: "relative",
1711 display: "flex",
1712 justifyContent: "center",
1713 alignItems: "center",
1714 height: 80,
1715 marginLeft: theme.spacing(2),
1716 marginRight: theme.spacing(2),
1717 borderBottom: "1px solid ".concat(theme.palette.divider)
1718 };
1719 });
1720 var PopoverListItemButton = (0, _elementor_ui.styled)(_elementor_ui.ListItemButton)(function(_ref12) {
1721 var theme = _ref12.theme;
1722 return {
1723 paddingLeft: theme.spacing(2),
1724 paddingRight: theme.spacing(2),
1725 paddingTop: theme.spacing(.5),
1726 paddingBottom: theme.spacing(.5),
1727 borderRadius: 4
1728 };
1729 });
1730 var StyledPopover = (0, _elementor_ui.styled)(_elementor_ui.Popover)(function(_ref13) {
1731 var theme = _ref13.theme;
1732 return {
1733 pointerEvents: "none",
1734 "& .MuiPaper-root": {
1735 marginLeft: theme.spacing(1),
1736 minWidth: 180,
1737 borderRadius: theme.shape.borderRadius,
1738 pointerEvents: "auto"
1739 }
1740 };
1741 });
1742
1743 //#endregion
1744 //#region modules/editor-one/assets/js/sidebar-navigation/components/collapsed-menu/collapsed-menu-item-popover.js
1745 var CollapsedMenuItemPopover = function CollapsedMenuItemPopover(_ref) {
1746 var item = _ref.item;
1747 var children = _ref.children;
1748 var activeChildSlug = _ref.activeChildSlug;
1749 var isPopoverOpen = _ref.isPopoverOpen;
1750 var anchorEl = _ref.anchorEl;
1751 var onClose = _ref.onClose;
1752 var IconComponent = _ref.IconComponent;
1753 var isActive = _ref.isActive;
1754 var onMouseEnter = _ref.onMouseEnter;
1755 var anchorRef = _ref.anchorRef;
1756 var handleChildClick = function handleChildClick(childItem) {
1757 EditorOneEventManager.sendSidebarMenuItemClicked({
1758 eventId: childItem.event_id,
1759 groupEventId: item.event_id
1760 });
1761 };
1762 return /*#__PURE__*/ react.default.createElement(_elementor_ui.ListItem, {
1763 disablePadding: true,
1764 dense: true,
1765 disableGutters: true,
1766 onMouseEnter,
1767 ref: anchorRef
1768 }, /*#__PURE__*/ react.default.createElement(MenuItemButton, {
1769 selected: isActive || isPopoverOpen,
1770 sx: { height: 36 }
1771 }, /*#__PURE__*/ react.default.createElement(MenuIcon, null, /*#__PURE__*/ react.default.createElement(IconComponent, null))), /*#__PURE__*/ react.default.createElement(StyledPopover, {
1772 open: isPopoverOpen,
1773 anchorEl,
1774 onClose,
1775 anchorOrigin: {
1776 vertical: "top",
1777 horizontal: "right"
1778 },
1779 transformOrigin: {
1780 vertical: "top",
1781 horizontal: "left"
1782 },
1783 slotProps: { paper: { onMouseLeave: onClose } },
1784 disableRestoreFocus: true,
1785 hideBackdrop: true
1786 }, /*#__PURE__*/ react.default.createElement(PopoverContent, null, /*#__PURE__*/ react.default.createElement(_elementor_ui.List, {
1787 disablePadding: true,
1788 dense: true
1789 }, /*#__PURE__*/ react.default.createElement(PopoverTitle, null, item.label), children.map(function(childItem) {
1790 return /*#__PURE__*/ react.default.createElement(_elementor_ui.ListItem, {
1791 key: childItem.slug,
1792 disablePadding: true,
1793 disableGutters: true,
1794 dense: true,
1795 sx: { height: 28 }
1796 }, /*#__PURE__*/ react.default.createElement(PopoverListItemButton, {
1797 component: "a",
1798 href: childItem.url,
1799 onClick: function onClick() {
1800 return handleChildClick(childItem);
1801 },
1802 selected: childItem.slug === activeChildSlug
1803 }, /*#__PURE__*/ react.default.createElement(_elementor_ui.ListItemText, {
1804 primary: childItem.label,
1805 primaryTypographyProps: { variant: "body2" }
1806 })));
1807 })))));
1808 };
1809 CollapsedMenuItemPopover.propTypes = {
1810 item: import_prop_types.default.object.isRequired,
1811 children: import_prop_types.default.array.isRequired,
1812 activeChildSlug: import_prop_types.default.string.isRequired,
1813 isPopoverOpen: import_prop_types.default.bool.isRequired,
1814 anchorEl: import_prop_types.default.object,
1815 onClose: import_prop_types.default.func.isRequired,
1816 IconComponent: import_prop_types.default.elementType.isRequired,
1817 isActive: import_prop_types.default.bool.isRequired,
1818 onMouseEnter: import_prop_types.default.func.isRequired,
1819 anchorRef: import_prop_types.default.oneOfType([import_prop_types.default.func, import_prop_types.default.object]).isRequired
1820 };
1821
1822 //#endregion
1823 //#region modules/editor-one/assets/js/sidebar-navigation/components/collapsed-menu/collapsed-menu-item-tooltip.js
1824 var CollapsedMenuItemTooltip = function CollapsedMenuItemTooltip(_ref) {
1825 var item = _ref.item;
1826 var isActive = _ref.isActive;
1827 var onClick = _ref.onClick;
1828 var IconComponent = _ref.IconComponent;
1829 var onMouseEnter = _ref.onMouseEnter;
1830 var isRtlLanguage = isRTL();
1831 return /*#__PURE__*/ react.default.createElement(_elementor_ui.ListItem, {
1832 disablePadding: true,
1833 dense: true,
1834 disableGutters: true,
1835 onMouseEnter
1836 }, /*#__PURE__*/ react.default.createElement(_elementor_ui.Tooltip, {
1837 title: item.label,
1838 placement: isRtlLanguage ? "left" : "right"
1839 }, /*#__PURE__*/ react.default.createElement(MenuItemButton, {
1840 onClick,
1841 selected: isActive,
1842 sx: { height: 36 }
1843 }, /*#__PURE__*/ react.default.createElement(MenuIcon, null, /*#__PURE__*/ react.default.createElement(IconComponent, null)))));
1844 };
1845 CollapsedMenuItemTooltip.propTypes = {
1846 item: import_prop_types.default.object.isRequired,
1847 isActive: import_prop_types.default.bool.isRequired,
1848 onClick: import_prop_types.default.func.isRequired,
1849 IconComponent: import_prop_types.default.elementType.isRequired,
1850 onMouseEnter: import_prop_types.default.func.isRequired
1851 };
1852
1853 //#endregion
1854 //#region modules/editor-one/assets/js/sidebar-navigation/components/collapsed-menu/sidebar-collapsed-menu-item.js
1855 var SidebarCollapsedMenuItem = function SidebarCollapsedMenuItem(_ref) {
1856 var item = _ref.item;
1857 var isActive = _ref.isActive;
1858 var _ref$children = _ref.children;
1859 var children = _ref$children === void 0 ? null : _ref$children;
1860 var activeChildSlug = _ref.activeChildSlug;
1861 var isPopoverOpen = _ref.isPopoverOpen;
1862 var onOpenPopover = _ref.onOpenPopover;
1863 var onClosePopover = _ref.onClosePopover;
1864 var _useState2 = _slicedToArray((0, react.useState)(null), 2);
1865 var anchorEl = _useState2[0];
1866 var setAnchorEl = _useState2[1];
1867 var hasChildren = !!(children !== null && children !== void 0 && children.length);
1868 var IconComponent = ICON_MAP[item.icon] || DEFAULT_ICON;
1869 var handleMouseEnter = function handleMouseEnter() {
1870 if (hasChildren) onOpenPopover(item.slug);
1871 else onClosePopover();
1872 };
1873 return /*#__PURE__*/ react.default.createElement(react.default.Fragment, null, hasChildren ? /*#__PURE__*/ react.default.createElement(CollapsedMenuItemPopover, {
1874 item,
1875 children,
1876 activeChildSlug,
1877 isPopoverOpen,
1878 anchorEl,
1879 onClose: onClosePopover,
1880 IconComponent,
1881 isActive,
1882 onMouseEnter: handleMouseEnter,
1883 anchorRef: setAnchorEl
1884 }) : /*#__PURE__*/ react.default.createElement(CollapsedMenuItemTooltip, {
1885 item,
1886 isActive,
1887 onClick: function handleClick() {
1888 if (!hasChildren) {
1889 EditorOneEventManager.sendSidebarMenuItemClicked({ eventId: item.event_id });
1890 window.location.href = item.url;
1891 }
1892 },
1893 IconComponent,
1894 onMouseEnter: handleMouseEnter
1895 }));
1896 };
1897 SidebarCollapsedMenuItem.propTypes = {
1898 item: import_prop_types.default.object.isRequired,
1899 isActive: import_prop_types.default.bool.isRequired,
1900 children: import_prop_types.default.array,
1901 activeChildSlug: import_prop_types.default.string.isRequired,
1902 isPopoverOpen: import_prop_types.default.bool.isRequired,
1903 onOpenPopover: import_prop_types.default.func.isRequired,
1904 onClosePopover: import_prop_types.default.func.isRequired
1905 };
1906
1907 //#endregion
1908 //#region modules/editor-one/assets/js/sidebar-navigation/components/collapsed-menu/sidebar-collapsed-menu.js
1909 var SidebarCollapsedMenu = function SidebarCollapsedMenu(_ref) {
1910 var menuItems = _ref.menuItems;
1911 var level4Groups = _ref.level4Groups;
1912 var activeMenuSlug = _ref.activeMenuSlug;
1913 var activeChildSlug = _ref.activeChildSlug;
1914 var _useState2 = _slicedToArray((0, react.useState)(null), 2);
1915 var openPopoverSlug = _useState2[0];
1916 var setOpenPopoverSlug = _useState2[1];
1917 var activeStateResolver = (0, react.useMemo)(function() {
1918 return new MenuActiveStateResolver(activeMenuSlug, activeChildSlug);
1919 }, [activeMenuSlug, activeChildSlug]);
1920 var getChildren = function getChildren(item) {
1921 if (!item.group_id) return null;
1922 var group = level4Groups[item.group_id];
1923 if (!group || !group.items || !group.items.length) return null;
1924 return group.items;
1925 };
1926 var handleOpenPopover = (0, react.useCallback)(function(slug) {
1927 setOpenPopoverSlug(slug);
1928 }, []);
1929 var handleClosePopover = (0, react.useCallback)(function() {
1930 setOpenPopoverSlug(null);
1931 }, []);
1932 return /*#__PURE__*/ react.default.createElement(MenuList, {
1933 isCollapsed: true,
1934 onMouseLeave: handleClosePopover
1935 }, menuItems.map(function(item) {
1936 return /*#__PURE__*/ react.default.createElement(react.default.Fragment, null, item.has_divider_before && /*#__PURE__*/ react.default.createElement(_elementor_ui.Divider, {
1937 key: "divider-".concat(item.slug),
1938 sx: { my: 1 }
1939 }), /*#__PURE__*/ react.default.createElement(SidebarCollapsedMenuItem, {
1940 key: item.slug,
1941 item,
1942 isActive: activeStateResolver.isMenuActive(item),
1943 children: getChildren(item),
1944 activeChildSlug,
1945 isPopoverOpen: openPopoverSlug === item.slug,
1946 onOpenPopover: handleOpenPopover,
1947 onClosePopover: handleClosePopover
1948 }));
1949 }));
1950 };
1951 SidebarCollapsedMenu.propTypes = {
1952 menuItems: import_prop_types.default.array.isRequired,
1953 level4Groups: import_prop_types.default.object.isRequired,
1954 activeMenuSlug: import_prop_types.default.string.isRequired,
1955 activeChildSlug: import_prop_types.default.string.isRequired
1956 };
1957
1958 //#endregion
1959 //#region modules/editor-one/assets/js/sidebar-navigation/components/cta/styled-components.js
1960 var CtaContainer = (0, _elementor_ui.styled)(_elementor_ui.Box)(function(_ref) {
1961 return { padding: _ref.theme.spacing(2) };
1962 });
1963 var CtaButton = (0, _elementor_ui.styled)(_elementor_ui.Button)({
1964 justifyContent: "center",
1965 whiteSpace: "nowrap"
1966 });
1967 var CollapsedCtaContainer = (0, _elementor_ui.styled)(_elementor_ui.Box)(function(_ref2) {
1968 return {
1969 padding: _ref2.theme.spacing(2),
1970 display: "flex",
1971 justifyContent: "center",
1972 alignItems: "center"
1973 };
1974 });
1975 var CollapsedCtaButton = (0, _elementor_ui.styled)("button")(function(_ref3) {
1976 var theme = _ref3.theme;
1977 return {
1978 border: "1px solid ".concat(theme.palette.promotion.main),
1979 borderRadius: 999,
1980 width: 24,
1981 height: 24,
1982 padding: 0,
1983 display: "flex",
1984 alignItems: "center",
1985 justifyContent: "center",
1986 background: "transparent",
1987 cursor: "pointer",
1988 color: theme.palette.promotion.main,
1989 transition: "all 0.2s ease-in-out",
1990 whiteSpace: "nowrap",
1991 "&:hover": { background: theme.palette.promotion.hover },
1992 "& svg": {
1993 width: 18,
1994 height: 18,
1995 fill: theme.palette.promotion.main
1996 }
1997 };
1998 });
1999
2000 //#endregion
2001 //#region modules/editor-one/assets/js/sidebar-navigation/components/cta/sidebar-upgrade-cta.js
2002 var SidebarUpgradeCta = function SidebarUpgradeCta(_ref) {
2003 var upgradeUrl = _ref.upgradeUrl;
2004 var upgradeText = _ref.upgradeText;
2005 var hasPro = _ref.hasPro;
2006 var collapsed = _ref.collapsed;
2007 if (true === hasPro || "1" === hasPro || "true" === hasPro) return null;
2008 var handleUpgradeClick = function handleUpgradeClick() {
2009 window.open(upgradeUrl, "_blank");
2010 };
2011 if (collapsed) return /*#__PURE__*/ react.default.createElement(CollapsedCtaContainer, null, /*#__PURE__*/ react.default.createElement(CollapsedCtaButton, { onClick: handleUpgradeClick }, /*#__PURE__*/ react.default.createElement(_elementor_icons.CrownFilledIcon, null)));
2012 return /*#__PURE__*/ react.default.createElement(CtaContainer, null, /*#__PURE__*/ react.default.createElement(CtaButton, {
2013 startIcon: /*#__PURE__*/ react.default.createElement(_elementor_icons.CrownFilledIcon, null),
2014 onClick: handleUpgradeClick,
2015 variant: "outlined",
2016 color: "promotion",
2017 fullWidth: true
2018 }, upgradeText));
2019 };
2020 SidebarUpgradeCta.propTypes = {
2021 upgradeUrl: import_prop_types.default.string.isRequired,
2022 upgradeText: import_prop_types.default.string.isRequired,
2023 hasPro: import_prop_types.default.oneOfType([import_prop_types.default.bool, import_prop_types.default.string]).isRequired,
2024 collapsed: import_prop_types.default.bool
2025 };
2026
2027 //#endregion
2028 //#region modules/editor-one/assets/js/sidebar-navigation/components/header/styled-components.js
2029 var HeaderContainer = (0, _elementor_ui.styled)(_elementor_ui.Box)(function(_ref) {
2030 var theme = _ref.theme;
2031 return {
2032 position: "relative",
2033 marginLeft: theme.spacing(2),
2034 marginRight: theme.spacing(2),
2035 height: 80,
2036 borderBottom: "1px solid ".concat(theme.palette.divider),
2037 display: "flex",
2038 alignItems: "center"
2039 };
2040 });
2041 var HeaderContent = (0, _elementor_ui.styled)(_elementor_ui.Box)(function(_ref2) {
2042 return {
2043 display: "flex",
2044 alignItems: "center",
2045 gap: _ref2.theme.spacing(1.5),
2046 flex: 1
2047 };
2048 });
2049 var SiteTitle = (0, _elementor_ui.styled)(_elementor_ui.Typography)({
2050 fontWeight: 500,
2051 flex: 1
2052 });
2053 var SearchButton = (0, _elementor_ui.styled)(_elementor_ui.IconButton)(function(_ref3) {
2054 return {
2055 fontSize: 20,
2056 color: _ref3.theme.palette.action.active
2057 };
2058 });
2059
2060 //#endregion
2061 //#region modules/editor-one/assets/js/sidebar-navigation/components/header/sidebar-header.js
2062 var SidebarHeader = function SidebarHeader(_ref) {
2063 var siteTitle = _ref.siteTitle;
2064 var onCollapse = _ref.onCollapse;
2065 return /*#__PURE__*/ react.default.createElement(HeaderContainer, null, /*#__PURE__*/ react.default.createElement(HeaderContent, null, /*#__PURE__*/ react.default.createElement(SiteIconBox, null, /*#__PURE__*/ react.default.createElement(EditorIcon, null)), /*#__PURE__*/ react.default.createElement(SiteTitle, { variant: "subtitle1" }, siteTitle), /*#__PURE__*/ react.default.createElement(SearchButton, { onClick: function finderAction() {
2066 $e.route("finder");
2067 } }, /*#__PURE__*/ react.default.createElement(_elementor_icons_SearchIcon.default, null))), /*#__PURE__*/ react.default.createElement(CollapseButton, {
2068 onClick: onCollapse,
2069 size: "small",
2070 expanded: true
2071 }, /*#__PURE__*/ react.default.createElement(_elementor_icons_ChevronRightIcon.default, null)));
2072 };
2073 SidebarHeader.propTypes = {
2074 siteTitle: import_prop_types.default.string.isRequired,
2075 onCollapse: import_prop_types.default.func.isRequired
2076 };
2077
2078 //#endregion
2079 //#region modules/editor-one/assets/js/sidebar-navigation/components/menu/sidebar-menu-item.js
2080 var STORAGE_KEY_PREFIX = "elementor_sidebar_menu_expanded_v2_";
2081 var SidebarMenuItem = function SidebarMenuItem(_ref) {
2082 var item = _ref.item;
2083 var isActive = _ref.isActive;
2084 var children = _ref.children;
2085 var activeChildSlug = _ref.activeChildSlug;
2086 var hasChildren = !!(children !== null && children !== void 0 && children.length);
2087 var IconComponent = ICON_MAP[item.icon] || DEFAULT_ICON;
2088 var _useState2 = _slicedToArray((0, react.useState)(function() {
2089 if (!hasChildren) return false;
2090 var storageKey = "".concat(STORAGE_KEY_PREFIX).concat(item.slug);
2091 if (children.some(function(child) {
2092 return child.slug === activeChildSlug;
2093 })) {
2094 localStorage.setItem(storageKey, "true");
2095 return true;
2096 }
2097 var stored = localStorage.getItem(storageKey);
2098 if (null === stored) return true;
2099 return "true" === stored;
2100 }), 2);
2101 var isExpanded = _useState2[0];
2102 var setIsExpanded = _useState2[1];
2103 var handleClick = (0, react.useCallback)(function() {
2104 if (hasChildren) {
2105 var newState = !isExpanded;
2106 setIsExpanded(newState);
2107 localStorage.setItem("".concat(STORAGE_KEY_PREFIX).concat(item.slug), String(newState));
2108 EditorOneEventManager.sendSidebarMenuGroupToggled({
2109 eventId: item.event_id,
2110 isExpanded: newState
2111 });
2112 return;
2113 }
2114 EditorOneEventManager.sendSidebarMenuItemClicked({ eventId: item.event_id });
2115 window.location.href = item.url;
2116 }, [
2117 hasChildren,
2118 isExpanded,
2119 item.event_id,
2120 item.slug,
2121 item.url
2122 ]);
2123 var handleChildClick = (0, react.useCallback)(function(childItem) {
2124 EditorOneEventManager.sendSidebarMenuItemClicked({
2125 eventId: childItem.event_id,
2126 groupEventId: item.event_id
2127 });
2128 }, [item.event_id]);
2129 return /*#__PURE__*/ react.default.createElement(react.default.Fragment, null, /*#__PURE__*/ react.default.createElement(_elementor_ui.ListItem, {
2130 disablePadding: true,
2131 dense: true,
2132 disableGutters: true
2133 }, /*#__PURE__*/ react.default.createElement(MenuItemButton, {
2134 onClick: handleClick,
2135 selected: isActive && !hasChildren
2136 }, /*#__PURE__*/ react.default.createElement(MenuIcon, null, /*#__PURE__*/ react.default.createElement(IconComponent, null)), /*#__PURE__*/ react.default.createElement(_elementor_ui.ListItemText, {
2137 primary: item.label,
2138 primaryTypographyProps: { variant: "body2" }
2139 }), hasChildren && /*#__PURE__*/ react.default.createElement(ExpandIcon, { expanded: isExpanded }))), hasChildren && /*#__PURE__*/ react.default.createElement(_elementor_ui.Collapse, {
2140 in: isExpanded,
2141 timeout: "auto",
2142 unmountOnExit: true
2143 }, /*#__PURE__*/ react.default.createElement(_elementor_ui.List, { disablePadding: true }, children.map(function(childItem) {
2144 return /*#__PURE__*/ react.default.createElement(ChildListItem, {
2145 key: childItem.slug,
2146 disablePadding: true,
2147 dense: true,
2148 disableGutters: true
2149 }, /*#__PURE__*/ react.default.createElement(ChildMenuItemButton, {
2150 component: "a",
2151 href: childItem.url,
2152 onClick: function onClick() {
2153 return handleChildClick(childItem);
2154 },
2155 selected: childItem.slug === activeChildSlug
2156 }, /*#__PURE__*/ react.default.createElement(_elementor_ui.ListItemText, {
2157 primary: childItem.label,
2158 primaryTypographyProps: {
2159 variant: "body2",
2160 color: "text.secondary"
2161 }
2162 })));
2163 }))));
2164 };
2165 SidebarMenuItem.propTypes = {
2166 item: import_prop_types.default.object.isRequired,
2167 isActive: import_prop_types.default.bool.isRequired,
2168 children: import_prop_types.default.array,
2169 activeChildSlug: import_prop_types.default.string.isRequired
2170 };
2171
2172 //#endregion
2173 //#region modules/editor-one/assets/js/sidebar-navigation/components/menu/sidebar-menu.js
2174 var SidebarMenu = function SidebarMenu(_ref) {
2175 var menuItems = _ref.menuItems;
2176 var level4Groups = _ref.level4Groups;
2177 var activeMenuSlug = _ref.activeMenuSlug;
2178 var activeChildSlug = _ref.activeChildSlug;
2179 var activeStateResolver = (0, react.useMemo)(function() {
2180 return new MenuActiveStateResolver(activeMenuSlug, activeChildSlug);
2181 }, [activeMenuSlug, activeChildSlug]);
2182 var getChildren = function getChildren(item) {
2183 if (!item.group_id) return null;
2184 var group = level4Groups[item.group_id];
2185 if (!group || !group.items || !group.items.length) return null;
2186 return group.items;
2187 };
2188 return /*#__PURE__*/ react.default.createElement(MenuList, null, menuItems.map(function(item) {
2189 return /*#__PURE__*/ react.default.createElement(react.Fragment, { key: item.slug }, item.has_divider_before && /*#__PURE__*/ react.default.createElement(_elementor_ui.Divider, { sx: { my: 1 } }), /*#__PURE__*/ react.default.createElement(SidebarMenuItem, {
2190 item,
2191 isActive: activeStateResolver.isMenuActive(item),
2192 activeChildSlug
2193 }, getChildren(item)));
2194 }));
2195 };
2196 SidebarMenu.propTypes = {
2197 menuItems: import_prop_types.default.array.isRequired,
2198 level4Groups: import_prop_types.default.object.isRequired,
2199 activeMenuSlug: import_prop_types.default.string.isRequired,
2200 activeChildSlug: import_prop_types.default.string.isRequired
2201 };
2202
2203 //#endregion
2204 //#region modules/editor-one/assets/js/sidebar-navigation/components/hooks/use-sidebar-collapse.js
2205 var STORAGE_KEY = "elementor_sidebar_collapsed";
2206 var AUTO_COLLAPSE_BREAKPOINT = 960;
2207 var TRANSITION_DURATION = 300;
2208 var useSidebarCollapse = function useSidebarCollapse() {
2209 var _useState2 = _slicedToArray((0, react.useState)(function() {
2210 var stored = localStorage.getItem(STORAGE_KEY);
2211 if (null !== stored) return "true" === stored;
2212 return window.innerWidth <= AUTO_COLLAPSE_BREAKPOINT;
2213 }), 2);
2214 var isCollapsed = _useState2[0];
2215 var setIsCollapsed = _useState2[1];
2216 (0, react.useEffect)(function() {
2217 var mediaQuery = window.matchMedia("(max-width: ".concat(AUTO_COLLAPSE_BREAKPOINT, "px)"));
2218 var handleResize = function handleResize(e) {
2219 if (e.matches) setIsCollapsed(true);
2220 else setIsCollapsed("true" === localStorage.getItem(STORAGE_KEY));
2221 };
2222 mediaQuery.addEventListener("change", handleResize);
2223 return function() {
2224 return mediaQuery.removeEventListener("change", handleResize);
2225 };
2226 }, []);
2227 var toggleCollapse = (0, react.useCallback)(function() {
2228 var newState = !isCollapsed;
2229 var body = document.body;
2230 body.classList.add("e-sidebar-transitioning");
2231 setIsCollapsed(newState);
2232 localStorage.setItem(STORAGE_KEY, String(newState));
2233 setTimeout(function() {
2234 body.classList.remove("e-sidebar-transitioning");
2235 }, TRANSITION_DURATION);
2236 }, [isCollapsed]);
2237 (0, react.useEffect)(function() {
2238 var container = document.getElementById("editor-one-sidebar-navigation");
2239 var body = document.body;
2240 if (isCollapsed) {
2241 container === null || container === void 0 || container.classList.add("e-sidebar-collapsed");
2242 body.classList.add("e-sidebar-is-collapsed");
2243 } else {
2244 container === null || container === void 0 || container.classList.remove("e-sidebar-collapsed");
2245 body.classList.remove("e-sidebar-is-collapsed");
2246 }
2247 }, [isCollapsed]);
2248 return {
2249 isCollapsed,
2250 toggleCollapse
2251 };
2252 };
2253
2254 //#endregion
2255 //#region modules/editor-one/assets/js/sidebar-navigation/components/hooks/use-admin-menu-offset.js
2256 var ADMIN_MENU_WRAP_ID = "adminmenuwrap";
2257 var WPCONTENT_ID = "wpcontent";
2258 var EDITOR_ONE_TOP_BAR_ID = "editor-one-top-bar";
2259 var WPADMINBAR_ID = "wpadminbar";
2260 var INITIALIZED_DATA_ATTR = "data-editor-one-offset-initialized";
2261 var WPFOOTER_ID = "wpfooter";
2262 var WPBODY_CONTENT_ID = "wpbody-content";
2263 var useAdminMenuOffset = function useAdminMenuOffset() {
2264 var cleanupRef = (0, react.useRef)(null);
2265 (0, react.useEffect)(function() {
2266 var adminMenuWrap = document.getElementById(ADMIN_MENU_WRAP_ID);
2267 var wpcontent = document.getElementById(WPCONTENT_ID);
2268 if (!adminMenuWrap || !wpcontent || wpcontent.hasAttribute(INITIALIZED_DATA_ATTR)) return;
2269 var wpfooter = document.getElementById(WPFOOTER_ID);
2270 var wpbodyContent = document.getElementById(WPBODY_CONTENT_ID);
2271 wpbodyContent === null || wpbodyContent === void 0 || wpbodyContent.insertBefore(wpfooter, wpbodyContent.querySelector(":scope > .clear"));
2272 var wpAdminBar = document.getElementById(WPADMINBAR_ID);
2273 var updateOffset = function updateOffset() {
2274 var _document$getElementB;
2275 var _wpAdminBar$clientHei;
2276 var _topBarHeader$clientH;
2277 var topBarHeader = (_document$getElementB = document.getElementById(EDITOR_ONE_TOP_BAR_ID)) === null || _document$getElementB === void 0 ? void 0 : _document$getElementB.querySelector(":scope > header");
2278 var isRtlLanguage = isRTL();
2279 var rect = adminMenuWrap.getBoundingClientRect();
2280 var offset = isRtlLanguage ? document.documentElement.clientWidth - rect.left : rect.right;
2281 var adminBarHeightPx = "".concat((_wpAdminBar$clientHei = wpAdminBar === null || wpAdminBar === void 0 ? void 0 : wpAdminBar.clientHeight) !== null && _wpAdminBar$clientHei !== void 0 ? _wpAdminBar$clientHei : 0, "px");
2282 var topBarHeaderHeightPx = "".concat((_topBarHeader$clientH = topBarHeader === null || topBarHeader === void 0 ? void 0 : topBarHeader.clientHeight) !== null && _topBarHeader$clientH !== void 0 ? _topBarHeader$clientH : 0, "px");
2283 wpcontent.style.setProperty("--editor-one-sidebar-left-offset", "".concat(offset, "px"));
2284 wpcontent.style.setProperty("--e-admin-bar-height", adminBarHeightPx);
2285 wpcontent.style.setProperty("--e-top-bar-header-height", topBarHeaderHeightPx);
2286 };
2287 updateOffset();
2288 var resizeObserver = new ResizeObserver(updateOffset);
2289 resizeObserver.observe(wpcontent);
2290 var topBar = document.getElementById(EDITOR_ONE_TOP_BAR_ID);
2291 if (topBar) resizeObserver.observe(topBar);
2292 window.addEventListener("resize", updateOffset);
2293 wpcontent.setAttribute(INITIALIZED_DATA_ATTR, "true");
2294 cleanupRef.current = function() {
2295 resizeObserver.disconnect();
2296 window.removeEventListener("resize", updateOffset);
2297 wpcontent.removeAttribute(INITIALIZED_DATA_ATTR);
2298 };
2299 return function() {
2300 if (cleanupRef.current) {
2301 cleanupRef.current();
2302 cleanupRef.current = null;
2303 }
2304 };
2305 }, []);
2306 };
2307
2308 //#endregion
2309 //#region modules/editor-one/assets/js/sidebar-navigation/components/sidebar-navigation.js
2310 var SidebarNavigation = function SidebarNavigation(_ref) {
2311 var config = _ref.config;
2312 var _useSidebarCollapse = useSidebarCollapse();
2313 var isCollapsed = _useSidebarCollapse.isCollapsed;
2314 var toggleCollapse = _useSidebarCollapse.toggleCollapse;
2315 useAdminMenuOffset();
2316 if (isCollapsed) return /*#__PURE__*/ react.default.createElement(NavContainer, {
2317 component: "nav",
2318 collapsed: true
2319 }, /*#__PURE__*/ react.default.createElement(CollapsedHeaderContainer, null, /*#__PURE__*/ react.default.createElement(SiteIconBox, null, /*#__PURE__*/ react.default.createElement(EditorIcon, null)), /*#__PURE__*/ react.default.createElement(CollapseButton, {
2320 onClick: toggleCollapse,
2321 size: "small"
2322 }, /*#__PURE__*/ react.default.createElement(_elementor_icons_ChevronRightIcon.default, null))), /*#__PURE__*/ react.default.createElement(ScrollableContent, null, /*#__PURE__*/ react.default.createElement(SidebarCollapsedMenu, {
2323 menuItems: config.menuItems,
2324 level4Groups: config.level4Groups,
2325 activeMenuSlug: config.activeMenuSlug,
2326 activeChildSlug: config.activeChildSlug
2327 })), /*#__PURE__*/ react.default.createElement(_elementor_ui.Divider, null), /*#__PURE__*/ react.default.createElement(SidebarUpgradeCta, {
2328 upgradeUrl: config.upgradeUrl,
2329 upgradeText: config.upgradeText,
2330 hasPro: config.hasPro,
2331 collapsed: true
2332 }));
2333 return /*#__PURE__*/ react.default.createElement(NavContainer, { component: "nav" }, /*#__PURE__*/ react.default.createElement(SidebarHeader, {
2334 siteTitle: config.siteTitle,
2335 onCollapse: toggleCollapse
2336 }), /*#__PURE__*/ react.default.createElement(ScrollableContent, null, /*#__PURE__*/ react.default.createElement(SidebarMenu, {
2337 menuItems: config.menuItems,
2338 level4Groups: config.level4Groups,
2339 activeMenuSlug: config.activeMenuSlug,
2340 activeChildSlug: config.activeChildSlug
2341 })), /*#__PURE__*/ react.default.createElement(_elementor_ui.Divider, null), /*#__PURE__*/ react.default.createElement(SidebarUpgradeCta, {
2342 upgradeUrl: config.upgradeUrl,
2343 upgradeText: config.upgradeText,
2344 hasPro: config.hasPro
2345 }));
2346 };
2347 SidebarNavigation.propTypes = { config: import_prop_types.default.object.isRequired };
2348
2349 //#endregion
2350 //#region modules/editor-one/assets/js/sidebar-navigation/app.js
2351 var App = function App(_ref) {
2352 var config = _ref.config;
2353 var isRtlLanguage = isRTL();
2354 return /*#__PURE__*/ react.default.createElement(_elementor_ui.DirectionProvider, { rtl: isRtlLanguage }, /*#__PURE__*/ react.default.createElement(_elementor_ui.LocalizationProvider, null, /*#__PURE__*/ react.default.createElement(_elementor_ui.ThemeProvider, { colorScheme: "light" }, /*#__PURE__*/ react.default.createElement(SidebarNavigation, { config }))));
2355 };
2356 App.propTypes = { config: import_prop_types.default.object.isRequired };
2357 var rootElement = document.getElementById("editor-one-sidebar-navigation");
2358 if (rootElement && window.editorOneSidebarConfig) react_default.render(/*#__PURE__*/ react.default.createElement(App, { config: window.editorOneSidebarConfig }), rootElement);
2359
2360 //#endregion
2361 })(React, ReactDOM, elementorV2.ui, elementorV2.icons['ChevronRightIcon'], elementorV2.icons['AdjustmentsIcon'], elementorV2.icons['FolderIcon'], elementorV2.icons['RocketIcon'], elementorV2.icons['HomeIcon'], elementorV2.icons['SendIcon'], elementorV2.icons['SettingsIcon'], elementorV2.icons['UsersIcon'], elementorV2.icons['PlugIcon'], elementorV2.icons['FileSettingsIcon'], elementorV2.icons['ChevronDownSmallIcon'], elementorV2.icons, elementorV2.icons['SearchIcon']);
2362 //# sourceMappingURL=editor-one-sidebar-navigation.js.map