PluginProbe
Elementor Website Builder – more than just a page builder / 4.3.1
Elementor Website Builder – more than just a page builder v4.3.1
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 4.0.8 All 454 releases
elementor / assets / js / editor-v4-opt-in.js

editor-v4-opt-in.js in Elementor Website Builder – more than just a page builder 4.3.1, at assets/js/editor-v4-opt-in.js

3,431 lines 120.1 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, _wordpress_i18n, _elementor_icons, _elementor_ui_DialogHeaderGroup, _elementor_ui_DialogHeader) {
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_ui_DialogHeaderGroup = __toESM(_elementor_ui_DialogHeaderGroup);
38 _elementor_ui_DialogHeader = __toESM(_elementor_ui_DialogHeader);
39
40 //#region node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js
41 /** @license React v16.13.1
42 * react-is.development.js
43 *
44 * Copyright (c) Facebook, Inc. and its affiliates.
45 *
46 * This source code is licensed under the MIT license found in the
47 * LICENSE file in the root directory of this source tree.
48 */
49 var require_react_is_development = /* @__PURE__ */ __commonJSMin(((exports) => {
50 (function() {
51 "use strict";
52 var hasSymbol = typeof Symbol === "function" && Symbol.for;
53 var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for("react.element") : 60103;
54 var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for("react.portal") : 60106;
55 var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for("react.fragment") : 60107;
56 var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for("react.strict_mode") : 60108;
57 var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for("react.profiler") : 60114;
58 var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for("react.provider") : 60109;
59 var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for("react.context") : 60110;
60 var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for("react.async_mode") : 60111;
61 var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for("react.concurrent_mode") : 60111;
62 var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for("react.forward_ref") : 60112;
63 var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for("react.suspense") : 60113;
64 var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for("react.suspense_list") : 60120;
65 var REACT_MEMO_TYPE = hasSymbol ? Symbol.for("react.memo") : 60115;
66 var REACT_LAZY_TYPE = hasSymbol ? Symbol.for("react.lazy") : 60116;
67 var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for("react.block") : 60121;
68 var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for("react.fundamental") : 60117;
69 var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for("react.responder") : 60118;
70 var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for("react.scope") : 60119;
71 function isValidElementType(type) {
72 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);
73 }
74 function typeOf(object) {
75 if (typeof object === "object" && object !== null) {
76 var $$typeof = object.$$typeof;
77 switch ($$typeof) {
78 case REACT_ELEMENT_TYPE:
79 var type = object.type;
80 switch (type) {
81 case REACT_ASYNC_MODE_TYPE:
82 case REACT_CONCURRENT_MODE_TYPE:
83 case REACT_FRAGMENT_TYPE:
84 case REACT_PROFILER_TYPE:
85 case REACT_STRICT_MODE_TYPE:
86 case REACT_SUSPENSE_TYPE: return type;
87 default:
88 var $$typeofType = type && type.$$typeof;
89 switch ($$typeofType) {
90 case REACT_CONTEXT_TYPE:
91 case REACT_FORWARD_REF_TYPE:
92 case REACT_LAZY_TYPE:
93 case REACT_MEMO_TYPE:
94 case REACT_PROVIDER_TYPE: return $$typeofType;
95 default: return $$typeof;
96 }
97 }
98 case REACT_PORTAL_TYPE: return $$typeof;
99 }
100 }
101 }
102 var AsyncMode = REACT_ASYNC_MODE_TYPE;
103 var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
104 var ContextConsumer = REACT_CONTEXT_TYPE;
105 var ContextProvider = REACT_PROVIDER_TYPE;
106 var Element = REACT_ELEMENT_TYPE;
107 var ForwardRef = REACT_FORWARD_REF_TYPE;
108 var Fragment = REACT_FRAGMENT_TYPE;
109 var Lazy = REACT_LAZY_TYPE;
110 var Memo = REACT_MEMO_TYPE;
111 var Portal = REACT_PORTAL_TYPE;
112 var Profiler = REACT_PROFILER_TYPE;
113 var StrictMode = REACT_STRICT_MODE_TYPE;
114 var Suspense = REACT_SUSPENSE_TYPE;
115 var hasWarnedAboutDeprecatedIsAsyncMode = false;
116 function isAsyncMode(object) {
117 if (!hasWarnedAboutDeprecatedIsAsyncMode) {
118 hasWarnedAboutDeprecatedIsAsyncMode = true;
119 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.");
120 }
121 return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
122 }
123 function isConcurrentMode(object) {
124 return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
125 }
126 function isContextConsumer(object) {
127 return typeOf(object) === REACT_CONTEXT_TYPE;
128 }
129 function isContextProvider(object) {
130 return typeOf(object) === REACT_PROVIDER_TYPE;
131 }
132 function isElement(object) {
133 return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
134 }
135 function isForwardRef(object) {
136 return typeOf(object) === REACT_FORWARD_REF_TYPE;
137 }
138 function isFragment(object) {
139 return typeOf(object) === REACT_FRAGMENT_TYPE;
140 }
141 function isLazy(object) {
142 return typeOf(object) === REACT_LAZY_TYPE;
143 }
144 function isMemo(object) {
145 return typeOf(object) === REACT_MEMO_TYPE;
146 }
147 function isPortal(object) {
148 return typeOf(object) === REACT_PORTAL_TYPE;
149 }
150 function isProfiler(object) {
151 return typeOf(object) === REACT_PROFILER_TYPE;
152 }
153 function isStrictMode(object) {
154 return typeOf(object) === REACT_STRICT_MODE_TYPE;
155 }
156 function isSuspense(object) {
157 return typeOf(object) === REACT_SUSPENSE_TYPE;
158 }
159 exports.AsyncMode = AsyncMode;
160 exports.ConcurrentMode = ConcurrentMode;
161 exports.ContextConsumer = ContextConsumer;
162 exports.ContextProvider = ContextProvider;
163 exports.Element = Element;
164 exports.ForwardRef = ForwardRef;
165 exports.Fragment = Fragment;
166 exports.Lazy = Lazy;
167 exports.Memo = Memo;
168 exports.Portal = Portal;
169 exports.Profiler = Profiler;
170 exports.StrictMode = StrictMode;
171 exports.Suspense = Suspense;
172 exports.isAsyncMode = isAsyncMode;
173 exports.isConcurrentMode = isConcurrentMode;
174 exports.isContextConsumer = isContextConsumer;
175 exports.isContextProvider = isContextProvider;
176 exports.isElement = isElement;
177 exports.isForwardRef = isForwardRef;
178 exports.isFragment = isFragment;
179 exports.isLazy = isLazy;
180 exports.isMemo = isMemo;
181 exports.isPortal = isPortal;
182 exports.isProfiler = isProfiler;
183 exports.isStrictMode = isStrictMode;
184 exports.isSuspense = isSuspense;
185 exports.isValidElementType = isValidElementType;
186 exports.typeOf = typeOf;
187 })();
188 }));
189
190 //#endregion
191 //#region node_modules/prop-types/node_modules/react-is/index.js
192 var require_react_is = /* @__PURE__ */ __commonJSMin(((exports, module) => {
193 module.exports = require_react_is_development();
194 }));
195
196 //#endregion
197 //#region node_modules/object-assign/index.js
198 /*
199 object-assign
200 (c) Sindre Sorhus
201 @license MIT
202 */
203 var require_object_assign = /* @__PURE__ */ __commonJSMin(((exports, module) => {
204 var getOwnPropertySymbols = Object.getOwnPropertySymbols;
205 var hasOwnProperty = Object.prototype.hasOwnProperty;
206 var propIsEnumerable = Object.prototype.propertyIsEnumerable;
207 function toObject(val) {
208 if (val === null || val === void 0) throw new TypeError("Object.assign cannot be called with null or undefined");
209 return Object(val);
210 }
211 function shouldUseNative() {
212 try {
213 if (!Object.assign) return false;
214 var test1 = /* @__PURE__ */ new String("abc");
215 test1[5] = "de";
216 if (Object.getOwnPropertyNames(test1)[0] === "5") return false;
217 var test2 = {};
218 for (var i = 0; i < 10; i++) test2["_" + String.fromCharCode(i)] = i;
219 if (Object.getOwnPropertyNames(test2).map(function(n) {
220 return test2[n];
221 }).join("") !== "0123456789") return false;
222 var test3 = {};
223 "abcdefghijklmnopqrst".split("").forEach(function(letter) {
224 test3[letter] = letter;
225 });
226 if (Object.keys(Object.assign({}, test3)).join("") !== "abcdefghijklmnopqrst") return false;
227 return true;
228 } catch (err) {
229 return false;
230 }
231 }
232 module.exports = shouldUseNative() ? Object.assign : function(target, source) {
233 var from;
234 var to = toObject(target);
235 var symbols;
236 for (var s = 1; s < arguments.length; s++) {
237 from = Object(arguments[s]);
238 for (var key in from) if (hasOwnProperty.call(from, key)) to[key] = from[key];
239 if (getOwnPropertySymbols) {
240 symbols = getOwnPropertySymbols(from);
241 for (var i = 0; i < symbols.length; i++) if (propIsEnumerable.call(from, symbols[i])) to[symbols[i]] = from[symbols[i]];
242 }
243 }
244 return to;
245 };
246 }));
247
248 //#endregion
249 //#region node_modules/prop-types/lib/ReactPropTypesSecret.js
250 /**
251 * Copyright (c) 2013-present, Facebook, Inc.
252 *
253 * This source code is licensed under the MIT license found in the
254 * LICENSE file in the root directory of this source tree.
255 */
256 var require_ReactPropTypesSecret = /* @__PURE__ */ __commonJSMin(((exports, module) => {
257 var ReactPropTypesSecret = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
258 module.exports = ReactPropTypesSecret;
259 }));
260
261 //#endregion
262 //#region node_modules/prop-types/lib/has.js
263 var require_has = /* @__PURE__ */ __commonJSMin(((exports, module) => {
264 module.exports = Function.call.bind(Object.prototype.hasOwnProperty);
265 }));
266
267 //#endregion
268 //#region node_modules/prop-types/checkPropTypes.js
269 /**
270 * Copyright (c) 2013-present, Facebook, Inc.
271 *
272 * This source code is licensed under the MIT license found in the
273 * LICENSE file in the root directory of this source tree.
274 */
275 var require_checkPropTypes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
276 var printWarning = function() {};
277 var ReactPropTypesSecret = require_ReactPropTypesSecret();
278 var loggedTypeFailures = {};
279 var has = require_has();
280 printWarning = function(text) {
281 var message = "Warning: " + text;
282 if (typeof console !== "undefined") console.error(message);
283 try {
284 throw new Error(message);
285 } catch (x) {}
286 };
287 /**
288 * Assert that the values match with the type specs.
289 * Error messages are memorized and will only be shown once.
290 *
291 * @param {object} typeSpecs Map of name to a ReactPropType
292 * @param {object} values Runtime values that need to be type-checked
293 * @param {string} location e.g. "prop", "context", "child context"
294 * @param {string} componentName Name of the component for error messages.
295 * @param {?Function} getStack Returns the component stack.
296 * @private
297 */
298 function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
299 for (var typeSpecName in typeSpecs) if (has(typeSpecs, typeSpecName)) {
300 var error;
301 try {
302 if (typeof typeSpecs[typeSpecName] !== "function") {
303 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`.");
304 err.name = "Invariant Violation";
305 throw err;
306 }
307 error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
308 } catch (ex) {
309 error = ex;
310 }
311 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).");
312 if (error instanceof Error && !(error.message in loggedTypeFailures)) {
313 loggedTypeFailures[error.message] = true;
314 var stack = getStack ? getStack() : "";
315 printWarning("Failed " + location + " type: " + error.message + (stack != null ? stack : ""));
316 }
317 }
318 }
319 /**
320 * Resets warning cache when testing.
321 *
322 * @private
323 */
324 checkPropTypes.resetWarningCache = function() {
325 loggedTypeFailures = {};
326 };
327 module.exports = checkPropTypes;
328 }));
329
330 //#endregion
331 //#region node_modules/prop-types/factoryWithTypeCheckers.js
332 /**
333 * Copyright (c) 2013-present, Facebook, Inc.
334 *
335 * This source code is licensed under the MIT license found in the
336 * LICENSE file in the root directory of this source tree.
337 */
338 var require_factoryWithTypeCheckers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
339 var ReactIs = require_react_is();
340 var assign = require_object_assign();
341 var ReactPropTypesSecret = require_ReactPropTypesSecret();
342 var has = require_has();
343 var checkPropTypes = require_checkPropTypes();
344 var printWarning = function() {};
345 printWarning = function(text) {
346 var message = "Warning: " + text;
347 if (typeof console !== "undefined") console.error(message);
348 try {
349 throw new Error(message);
350 } catch (x) {}
351 };
352 function emptyFunctionThatReturnsNull() {
353 return null;
354 }
355 module.exports = function(isValidElement, throwOnDirectAccess) {
356 var ITERATOR_SYMBOL = typeof Symbol === "function" && Symbol.iterator;
357 var FAUX_ITERATOR_SYMBOL = "@@iterator";
358 /**
359 * Returns the iterator method function contained on the iterable object.
360 *
361 * Be sure to invoke the function with the iterable as context:
362 *
363 * var iteratorFn = getIteratorFn(myIterable);
364 * if (iteratorFn) {
365 * var iterator = iteratorFn.call(myIterable);
366 * ...
367 * }
368 *
369 * @param {?object} maybeIterable
370 * @return {?function}
371 */
372 function getIteratorFn(maybeIterable) {
373 var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
374 if (typeof iteratorFn === "function") return iteratorFn;
375 }
376 /**
377 * Collection of methods that allow declaration and validation of props that are
378 * supplied to React components. Example usage:
379 *
380 * var Props = require('ReactPropTypes');
381 * var MyArticle = React.createClass({
382 * propTypes: {
383 * // An optional string prop named "description".
384 * description: Props.string,
385 *
386 * // A required enum prop named "category".
387 * category: Props.oneOf(['News','Photos']).isRequired,
388 *
389 * // A prop named "dialog" that requires an instance of Dialog.
390 * dialog: Props.instanceOf(Dialog).isRequired
391 * },
392 * render: function() { ... }
393 * });
394 *
395 * A more formal specification of how these methods are used:
396 *
397 * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
398 * decl := ReactPropTypes.{type}(.isRequired)?
399 *
400 * Each and every declaration produces a function with the same signature. This
401 * allows the creation of custom validation functions. For example:
402 *
403 * var MyLink = React.createClass({
404 * propTypes: {
405 * // An optional string or URI prop named "href".
406 * href: function(props, propName, componentName) {
407 * var propValue = props[propName];
408 * if (propValue != null && typeof propValue !== 'string' &&
409 * !(propValue instanceof URI)) {
410 * return new Error(
411 * 'Expected a string or an URI for ' + propName + ' in ' +
412 * componentName
413 * );
414 * }
415 * }
416 * },
417 * render: function() {...}
418 * });
419 *
420 * @internal
421 */
422 var ANONYMOUS = "<<anonymous>>";
423 var ReactPropTypes = {
424 array: createPrimitiveTypeChecker("array"),
425 bigint: createPrimitiveTypeChecker("bigint"),
426 bool: createPrimitiveTypeChecker("boolean"),
427 func: createPrimitiveTypeChecker("function"),
428 number: createPrimitiveTypeChecker("number"),
429 object: createPrimitiveTypeChecker("object"),
430 string: createPrimitiveTypeChecker("string"),
431 symbol: createPrimitiveTypeChecker("symbol"),
432 any: createAnyTypeChecker(),
433 arrayOf: createArrayOfTypeChecker,
434 element: createElementTypeChecker(),
435 elementType: createElementTypeTypeChecker(),
436 instanceOf: createInstanceTypeChecker,
437 node: createNodeChecker(),
438 objectOf: createObjectOfTypeChecker,
439 oneOf: createEnumTypeChecker,
440 oneOfType: createUnionTypeChecker,
441 shape: createShapeTypeChecker,
442 exact: createStrictShapeTypeChecker
443 };
444 /**
445 * inlined Object.is polyfill to avoid requiring consumers ship their own
446 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
447 */
448 function is(x, y) {
449 if (x === y) return x !== 0 || 1 / x === 1 / y;
450 else return x !== x && y !== y;
451 }
452 /**
453 * We use an Error-like object for backward compatibility as people may call
454 * PropTypes directly and inspect their output. However, we don't use real
455 * Errors anymore. We don't inspect their stack anyway, and creating them
456 * is prohibitively expensive if they are created too often, such as what
457 * happens in oneOfType() for any type before the one that matched.
458 */
459 function PropTypeError(message, data) {
460 this.message = message;
461 this.data = data && typeof data === "object" ? data : {};
462 this.stack = "";
463 }
464 PropTypeError.prototype = Error.prototype;
465 function createChainableTypeChecker(validate) {
466 var manualPropTypeCallCache = {};
467 var manualPropTypeWarningCount = 0;
468 function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
469 componentName = componentName || ANONYMOUS;
470 propFullName = propFullName || propName;
471 if (secret !== ReactPropTypesSecret) {
472 if (throwOnDirectAccess) {
473 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");
474 err.name = "Invariant Violation";
475 throw err;
476 } else if (typeof console !== "undefined") {
477 var cacheKey = componentName + ":" + propName;
478 if (!manualPropTypeCallCache[cacheKey] && manualPropTypeWarningCount < 3) {
479 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.");
480 manualPropTypeCallCache[cacheKey] = true;
481 manualPropTypeWarningCount++;
482 }
483 }
484 }
485 if (props[propName] == null) {
486 if (isRequired) {
487 if (props[propName] === null) return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required " + ("in `" + componentName + "`, but its value is `null`."));
488 return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required in " + ("`" + componentName + "`, but its value is `undefined`."));
489 }
490 return null;
491 } else return validate(props, propName, componentName, location, propFullName);
492 }
493 var chainedCheckType = checkType.bind(null, false);
494 chainedCheckType.isRequired = checkType.bind(null, true);
495 return chainedCheckType;
496 }
497 function createPrimitiveTypeChecker(expectedType) {
498 function validate(props, propName, componentName, location, propFullName, secret) {
499 var propValue = props[propName];
500 if (getPropType(propValue) !== expectedType) {
501 var preciseType = getPreciseType(propValue);
502 return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + preciseType + "` supplied to `" + componentName + "`, expected ") + ("`" + expectedType + "`."), { expectedType });
503 }
504 return null;
505 }
506 return createChainableTypeChecker(validate);
507 }
508 function createAnyTypeChecker() {
509 return createChainableTypeChecker(emptyFunctionThatReturnsNull);
510 }
511 function createArrayOfTypeChecker(typeChecker) {
512 function validate(props, propName, componentName, location, propFullName) {
513 if (typeof typeChecker !== "function") return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside arrayOf.");
514 var propValue = props[propName];
515 if (!Array.isArray(propValue)) {
516 var propType = getPropType(propValue);
517 return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an array."));
518 }
519 for (var i = 0; i < propValue.length; i++) {
520 var error = typeChecker(propValue, i, componentName, location, propFullName + "[" + i + "]", ReactPropTypesSecret);
521 if (error instanceof Error) return error;
522 }
523 return null;
524 }
525 return createChainableTypeChecker(validate);
526 }
527 function createElementTypeChecker() {
528 function validate(props, propName, componentName, location, propFullName) {
529 var propValue = props[propName];
530 if (!isValidElement(propValue)) {
531 var propType = getPropType(propValue);
532 return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement."));
533 }
534 return null;
535 }
536 return createChainableTypeChecker(validate);
537 }
538 function createElementTypeTypeChecker() {
539 function validate(props, propName, componentName, location, propFullName) {
540 var propValue = props[propName];
541 if (!ReactIs.isValidElementType(propValue)) {
542 var propType = getPropType(propValue);
543 return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement type."));
544 }
545 return null;
546 }
547 return createChainableTypeChecker(validate);
548 }
549 function createInstanceTypeChecker(expectedClass) {
550 function validate(props, propName, componentName, location, propFullName) {
551 if (!(props[propName] instanceof expectedClass)) {
552 var expectedClassName = expectedClass.name || ANONYMOUS;
553 var actualClassName = getClassName(props[propName]);
554 return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + actualClassName + "` supplied to `" + componentName + "`, expected ") + ("instance of `" + expectedClassName + "`."));
555 }
556 return null;
557 }
558 return createChainableTypeChecker(validate);
559 }
560 function createEnumTypeChecker(expectedValues) {
561 if (!Array.isArray(expectedValues)) {
562 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]).");
563 else printWarning("Invalid argument supplied to oneOf, expected an array.");
564 return emptyFunctionThatReturnsNull;
565 }
566 function validate(props, propName, componentName, location, propFullName) {
567 var propValue = props[propName];
568 for (var i = 0; i < expectedValues.length; i++) if (is(propValue, expectedValues[i])) return null;
569 var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
570 if (getPreciseType(value) === "symbol") return String(value);
571 return value;
572 });
573 return new PropTypeError("Invalid " + location + " `" + propFullName + "` of value `" + String(propValue) + "` " + ("supplied to `" + componentName + "`, expected one of " + valuesString + "."));
574 }
575 return createChainableTypeChecker(validate);
576 }
577 function createObjectOfTypeChecker(typeChecker) {
578 function validate(props, propName, componentName, location, propFullName) {
579 if (typeof typeChecker !== "function") return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside objectOf.");
580 var propValue = props[propName];
581 var propType = getPropType(propValue);
582 if (propType !== "object") return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an object."));
583 for (var key in propValue) if (has(propValue, key)) {
584 var error = typeChecker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
585 if (error instanceof Error) return error;
586 }
587 return null;
588 }
589 return createChainableTypeChecker(validate);
590 }
591 function createUnionTypeChecker(arrayOfTypeCheckers) {
592 if (!Array.isArray(arrayOfTypeCheckers)) {
593 printWarning("Invalid argument supplied to oneOfType, expected an instance of array.");
594 return emptyFunctionThatReturnsNull;
595 }
596 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
597 var checker = arrayOfTypeCheckers[i];
598 if (typeof checker !== "function") {
599 printWarning("Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + getPostfixForTypeWarning(checker) + " at index " + i + ".");
600 return emptyFunctionThatReturnsNull;
601 }
602 }
603 function validate(props, propName, componentName, location, propFullName) {
604 var expectedTypes = [];
605 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
606 var checker = arrayOfTypeCheckers[i];
607 var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
608 if (checkerResult == null) return null;
609 if (checkerResult.data && has(checkerResult.data, "expectedType")) expectedTypes.push(checkerResult.data.expectedType);
610 }
611 var expectedTypesMessage = expectedTypes.length > 0 ? ", expected one of type [" + expectedTypes.join(", ") + "]" : "";
612 return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`" + expectedTypesMessage + "."));
613 }
614 return createChainableTypeChecker(validate);
615 }
616 function createNodeChecker() {
617 function validate(props, propName, componentName, location, propFullName) {
618 if (!isNode(props[propName])) return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`, expected a ReactNode."));
619 return null;
620 }
621 return createChainableTypeChecker(validate);
622 }
623 function invalidValidatorError(componentName, location, propFullName, key, type) {
624 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 + "`.");
625 }
626 function createShapeTypeChecker(shapeTypes) {
627 function validate(props, propName, componentName, location, propFullName) {
628 var propValue = props[propName];
629 var propType = getPropType(propValue);
630 if (propType !== "object") return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
631 for (var key in shapeTypes) {
632 var checker = shapeTypes[key];
633 if (typeof checker !== "function") return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
634 var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
635 if (error) return error;
636 }
637 return null;
638 }
639 return createChainableTypeChecker(validate);
640 }
641 function createStrictShapeTypeChecker(shapeTypes) {
642 function validate(props, propName, componentName, location, propFullName) {
643 var propValue = props[propName];
644 var propType = getPropType(propValue);
645 if (propType !== "object") return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
646 for (var key in assign({}, props[propName], shapeTypes)) {
647 var checker = shapeTypes[key];
648 if (has(shapeTypes, key) && typeof checker !== "function") return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
649 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, " "));
650 var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
651 if (error) return error;
652 }
653 return null;
654 }
655 return createChainableTypeChecker(validate);
656 }
657 function isNode(propValue) {
658 switch (typeof propValue) {
659 case "number":
660 case "string":
661 case "undefined": return true;
662 case "boolean": return !propValue;
663 case "object":
664 if (Array.isArray(propValue)) return propValue.every(isNode);
665 if (propValue === null || isValidElement(propValue)) return true;
666 var iteratorFn = getIteratorFn(propValue);
667 if (iteratorFn) {
668 var iterator = iteratorFn.call(propValue);
669 var step;
670 if (iteratorFn !== propValue.entries) {
671 while (!(step = iterator.next()).done) if (!isNode(step.value)) return false;
672 } else while (!(step = iterator.next()).done) {
673 var entry = step.value;
674 if (entry) {
675 if (!isNode(entry[1])) return false;
676 }
677 }
678 } else return false;
679 return true;
680 default: return false;
681 }
682 }
683 function isSymbol(propType, propValue) {
684 if (propType === "symbol") return true;
685 if (!propValue) return false;
686 if (propValue["@@toStringTag"] === "Symbol") return true;
687 if (typeof Symbol === "function" && propValue instanceof Symbol) return true;
688 return false;
689 }
690 function getPropType(propValue) {
691 var propType = typeof propValue;
692 if (Array.isArray(propValue)) return "array";
693 if (propValue instanceof RegExp) return "object";
694 if (isSymbol(propType, propValue)) return "symbol";
695 return propType;
696 }
697 function getPreciseType(propValue) {
698 if (typeof propValue === "undefined" || propValue === null) return "" + propValue;
699 var propType = getPropType(propValue);
700 if (propType === "object") {
701 if (propValue instanceof Date) return "date";
702 else if (propValue instanceof RegExp) return "regexp";
703 }
704 return propType;
705 }
706 function getPostfixForTypeWarning(value) {
707 var type = getPreciseType(value);
708 switch (type) {
709 case "array":
710 case "object": return "an " + type;
711 case "boolean":
712 case "date":
713 case "regexp": return "a " + type;
714 default: return type;
715 }
716 }
717 function getClassName(propValue) {
718 if (!propValue.constructor || !propValue.constructor.name) return ANONYMOUS;
719 return propValue.constructor.name;
720 }
721 ReactPropTypes.checkPropTypes = checkPropTypes;
722 ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
723 ReactPropTypes.PropTypes = ReactPropTypes;
724 return ReactPropTypes;
725 };
726 }));
727
728 //#endregion
729 //#region node_modules/prop-types/index.js
730 var require_prop_types = /* @__PURE__ */ __commonJSMin(((exports, module) => {
731 var ReactIs = require_react_is();
732 var throwOnDirectAccess = true;
733 module.exports = require_factoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess);
734 }));
735
736 //#endregion
737 //#region node_modules/react-dom/client.js
738 var require_client = /* @__PURE__ */ __commonJSMin(((exports) => {
739 var m = (globalThis.ReactDOM);
740 var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
741 exports.createRoot = function(c, o) {
742 i.usingClientEntryPoint = true;
743 try {
744 return m.createRoot(c, o);
745 } finally {
746 i.usingClientEntryPoint = false;
747 }
748 };
749 }));
750
751 //#endregion
752 //#region assets/dev/js/utils/react.js
753 var import_prop_types = /* @__PURE__ */ __toESM(require_prop_types());
754 var import_client = require_client();
755 /**
756 * Support conditional rendering of a React App to the DOM, based on the React version.
757 * We use `createRoot` when available, but fallback to `ReactDOM.render` for older versions.
758 *
759 * @param {Promise.resolve(React).ReactElement} app The app to render.
760 * @param {HTMLElement} domElement The DOM element to render the app into.
761 *
762 * @return {{ unmount: () => void }} The unmount function.
763 */
764 function render(app, domElement) {
765 var unmountFunction;
766 try {
767 var root = (0, import_client.createRoot)(domElement);
768 root.render(app);
769 unmountFunction = function unmountFunction() {
770 root.unmount();
771 };
772 } catch (e) {
773 react_dom.render(app, domElement);
774 unmountFunction = function unmountFunction() {
775 react_dom.unmountComponentAtNode(domElement);
776 };
777 }
778 return { unmount: unmountFunction };
779 }
780 var react_default = { render };
781
782 //#endregion
783 //#region node_modules/@babel/runtime/helpers/esm/typeof.js
784 function _typeof(o) {
785 "@babel/helpers - typeof";
786 return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
787 return typeof o;
788 } : function(o) {
789 return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
790 }, _typeof(o);
791 }
792
793 //#endregion
794 //#region node_modules/@babel/runtime/helpers/esm/toPrimitive.js
795 function toPrimitive(t, r) {
796 if ("object" != _typeof(t) || !t) return t;
797 var e = t[Symbol.toPrimitive];
798 if (void 0 !== e) {
799 var i = e.call(t, r || "default");
800 if ("object" != _typeof(i)) return i;
801 throw new TypeError("@@toPrimitive must return a primitive value.");
802 }
803 return ("string" === r ? String : Number)(t);
804 }
805
806 //#endregion
807 //#region node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
808 function toPropertyKey(t) {
809 var i = toPrimitive(t, "string");
810 return "symbol" == _typeof(i) ? i : i + "";
811 }
812
813 //#endregion
814 //#region node_modules/@babel/runtime/helpers/esm/defineProperty.js
815 function _defineProperty(e, r, t) {
816 return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
817 value: t,
818 enumerable: !0,
819 configurable: !0,
820 writable: !0
821 }) : e[r] = t, e;
822 }
823
824 //#endregion
825 //#region node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
826 function _arrayWithHoles(r) {
827 if (Array.isArray(r)) return r;
828 }
829
830 //#endregion
831 //#region node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
832 function _iterableToArrayLimit(r, l) {
833 var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
834 if (null != t) {
835 var e;
836 var n;
837 var i;
838 var u;
839 var a = [];
840 var f = !0;
841 var o = !1;
842 try {
843 if (i = (t = t.call(r)).next, 0 === l) {
844 if (Object(t) !== t) return;
845 f = !1;
846 } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
847 } catch (r) {
848 o = !0, n = r;
849 } finally {
850 try {
851 if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
852 } finally {
853 if (o) throw n;
854 }
855 }
856 return a;
857 }
858 }
859
860 //#endregion
861 //#region node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
862 function _arrayLikeToArray(r, a) {
863 (null == a || a > r.length) && (a = r.length);
864 for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
865 return n;
866 }
867
868 //#endregion
869 //#region node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
870 function _unsupportedIterableToArray(r, a) {
871 if (r) {
872 if ("string" == typeof r) return _arrayLikeToArray(r, a);
873 var t = {}.toString.call(r).slice(8, -1);
874 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;
875 }
876 }
877
878 //#endregion
879 //#region node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
880 function _nonIterableRest() {
881 throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
882 }
883
884 //#endregion
885 //#region node_modules/@babel/runtime/helpers/esm/slicedToArray.js
886 function _slicedToArray(r, e) {
887 return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
888 }
889
890 //#endregion
891 //#region node_modules/@babel/runtime/helpers/esm/extends.js
892 function _extends() {
893 return _extends = Object.assign ? Object.assign.bind() : function(n) {
894 for (var e = 1; e < arguments.length; e++) {
895 var t = arguments[e];
896 for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
897 }
898 return n;
899 }, _extends.apply(null, arguments);
900 }
901
902 //#endregion
903 //#region node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
904 function _objectWithoutPropertiesLoose(r, e) {
905 if (null == r) return {};
906 var t = {};
907 for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
908 if (-1 !== e.indexOf(n)) continue;
909 t[n] = r[n];
910 }
911 return t;
912 }
913
914 //#endregion
915 //#region node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
916 function _objectWithoutProperties(e, t) {
917 if (null == e) return {};
918 var o;
919 var r;
920 var i = _objectWithoutPropertiesLoose(e, t);
921 if (Object.getOwnPropertySymbols) {
922 var n = Object.getOwnPropertySymbols(e);
923 for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
924 }
925 return i;
926 }
927
928 //#endregion
929 //#region modules/atomic-opt-in/assets/js/opt-in-page/opt-in-content.js
930 var _excluded$1 = ["children"];
931 var _excluded2 = ["children"];
932 var _excluded3 = ["children"];
933 var _excluded4 = ["children"];
934 var _excluded5 = ["children"];
935 var TextNode = function TextNode(_ref) {
936 var children = _ref.children;
937 var props = _objectWithoutProperties(_ref, _excluded$1);
938 return /*#__PURE__*/ react.default.createElement(_elementor_ui.Typography, _extends({ color: "text.primary" }, props), children);
939 };
940 TextNode.propTypes = { children: import_prop_types.default.node };
941 var ContentList = function ContentList(_ref2) {
942 var children = _ref2.children;
943 var props = _objectWithoutProperties(_ref2, _excluded2);
944 return /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, _extends({
945 component: "ul",
946 sx: { listStyle: "disc" }
947 }, props), children);
948 };
949 ContentList.propTypes = { children: import_prop_types.default.node };
950 var ContentListItem = function ContentListItem(_ref3) {
951 var children = _ref3.children;
952 var props = _objectWithoutProperties(_ref3, _excluded3);
953 return /*#__PURE__*/ react.default.createElement(TextNode, _extends({ component: "li" }, props), children);
954 };
955 ContentListItem.propTypes = { children: import_prop_types.default.node };
956 var AdvantagesList = function AdvantagesList(_ref4) {
957 var children = _ref4.children;
958 var props = _objectWithoutProperties(_ref4, _excluded4);
959 return /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, _extends({
960 component: "ul",
961 sx: { marginInlineStart: 2 }
962 }, props), children);
963 };
964 AdvantagesList.propTypes = { children: import_prop_types.default.node };
965 var AdvantagesListItem = function AdvantagesListItem(_ref5) {
966 var children = _ref5.children;
967 var props = _objectWithoutProperties(_ref5, _excluded5);
968 return /*#__PURE__*/ react.default.createElement(TextNode, _extends({
969 component: "li",
970 sx: {
971 lineHeight: "150%",
972 listStyle: "disc"
973 }
974 }, props), children);
975 };
976 AdvantagesListItem.propTypes = { children: import_prop_types.default.node };
977
978 //#endregion
979 //#region modules/atomic-opt-in/assets/js/opt-in-page/opt-in-img-placeholders.js
980 var ImageLandscapePlaceholder = function ImageLandscapePlaceholder(props) {
981 return /*#__PURE__*/ react.default.createElement(_elementor_ui.SvgIcon, _extends({ viewBox: "0 0 600 260" }, props), /*#__PURE__*/ react.default.createElement("rect", {
982 x: "0",
983 y: "0",
984 width: "600",
985 height: "260",
986 fill: "#d9d9d9"
987 }));
988 };
989 var ImageSquarePlaceholder = function ImageSquarePlaceholder(props) {
990 return /*#__PURE__*/ react.default.createElement(_elementor_ui.SvgIcon, _extends({ viewBox: "0 0 500 500" }, props), /*#__PURE__*/ react.default.createElement("rect", {
991 x: "0",
992 y: "0",
993 width: "500",
994 height: "500",
995 fill: "#d9d9d9"
996 }));
997 };
998
999 //#endregion
1000 //#region modules/atomic-opt-in/assets/js/opt-in-page/opt-in-message.js
1001 var Message = function Message(_ref) {
1002 var action = _ref.action;
1003 var children = _ref.children;
1004 var _ref$severity = _ref.severity;
1005 var severity = _ref$severity === void 0 ? "message" : _ref$severity;
1006 var onClose = _ref.onClose;
1007 return /*#__PURE__*/ react.default.createElement(_elementor_ui.Snackbar, {
1008 open: true,
1009 autoHideDuration: 4e3,
1010 anchorOrigin: {
1011 vertical: "bottom",
1012 horizontal: "center"
1013 },
1014 onClose
1015 }, "message" !== severity ? /*#__PURE__*/ react.default.createElement(_elementor_ui.Alert, {
1016 variant: "filled",
1017 severity,
1018 onClose
1019 }, children) : /*#__PURE__*/ react.default.createElement(_elementor_ui.SnackbarContent, {
1020 message: /*#__PURE__*/ react.default.createElement(_elementor_ui.Stack, {
1021 direction: "row",
1022 gap: 1.5,
1023 alignItems: "center"
1024 }, /*#__PURE__*/ react.default.createElement(_elementor_icons.CircleCheckFilledIcon, null), children),
1025 action: /*#__PURE__*/ react.default.createElement(_elementor_ui.Stack, {
1026 direction: "row",
1027 spacing: 1,
1028 alignItems: "center"
1029 }, action, /*#__PURE__*/ react.default.createElement(_elementor_ui.IconButton, {
1030 color: "inherit",
1031 size: "small",
1032 onClick: onClose
1033 }, /*#__PURE__*/ react.default.createElement(_elementor_icons.XIcon, { fontSize: "small" })))
1034 }));
1035 };
1036 Message.propTypes = {
1037 action: import_prop_types.default.node,
1038 children: import_prop_types.default.node,
1039 severity: import_prop_types.default.oneOf([
1040 "message",
1041 "success",
1042 "warning",
1043 "error"
1044 ]),
1045 onClose: import_prop_types.default.func
1046 };
1047
1048 //#endregion
1049 //#region node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
1050 function asyncGeneratorStep(n, t, e, r, o, a, c) {
1051 try {
1052 var i = n[a](c);
1053 var u = i.value;
1054 } catch (n) {
1055 e(n);
1056 return;
1057 }
1058 i.done ? t(u) : Promise.resolve(u).then(r, o);
1059 }
1060 function _asyncToGenerator(n) {
1061 return function() {
1062 var t = this;
1063 var e = arguments;
1064 return new Promise(function(r, o) {
1065 var a = n.apply(t, e);
1066 function _next(n) {
1067 asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
1068 }
1069 function _throw(n) {
1070 asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
1071 }
1072 _next(void 0);
1073 });
1074 };
1075 }
1076
1077 //#endregion
1078 //#region node_modules/@babel/runtime/helpers/OverloadYield.js
1079 var require_OverloadYield = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1080 function _OverloadYield(e, d) {
1081 this.v = e, this.k = d;
1082 }
1083 module.exports = _OverloadYield, module.exports.__esModule = true, module.exports["default"] = module.exports;
1084 }));
1085
1086 //#endregion
1087 //#region node_modules/@babel/runtime/helpers/regeneratorDefine.js
1088 var require_regeneratorDefine = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1089 function _regeneratorDefine(e, r, n, t) {
1090 var i = Object.defineProperty;
1091 try {
1092 i({}, "", {});
1093 } catch (e) {
1094 i = 0;
1095 }
1096 module.exports = _regeneratorDefine = function regeneratorDefine(e, r, n, t) {
1097 function o(r, n) {
1098 _regeneratorDefine(e, r, function(e) {
1099 return this._invoke(r, n, e);
1100 });
1101 }
1102 r ? i ? i(e, r, {
1103 value: n,
1104 enumerable: !t,
1105 configurable: !t,
1106 writable: !t
1107 }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2));
1108 }, module.exports.__esModule = true, module.exports["default"] = module.exports, _regeneratorDefine(e, r, n, t);
1109 }
1110 module.exports = _regeneratorDefine, module.exports.__esModule = true, module.exports["default"] = module.exports;
1111 }));
1112
1113 //#endregion
1114 //#region node_modules/@babel/runtime/helpers/regenerator.js
1115 var require_regenerator$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1116 var regeneratorDefine = require_regeneratorDefine();
1117 function _regenerator() {
1118 /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
1119 var e;
1120 var t;
1121 var r = "function" == typeof Symbol ? Symbol : {};
1122 var n = r.iterator || "@@iterator";
1123 var o = r.toStringTag || "@@toStringTag";
1124 function i(r, n, o, i) {
1125 var c = n && n.prototype instanceof Generator ? n : Generator;
1126 var u = Object.create(c.prototype);
1127 return regeneratorDefine(u, "_invoke", function(r, n, o) {
1128 var i;
1129 var c;
1130 var u;
1131 var f = 0;
1132 var p = o || [];
1133 var y = !1;
1134 var G = {
1135 p: 0,
1136 n: 0,
1137 v: e,
1138 a: d,
1139 f: d.bind(e, 4),
1140 d: function d(t, r) {
1141 return i = t, c = 0, u = e, G.n = r, a;
1142 }
1143 };
1144 function d(r, n) {
1145 for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) {
1146 var o;
1147 var i = p[t];
1148 var d = G.p;
1149 var l = i[2];
1150 r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0));
1151 }
1152 if (o || r > 1) return a;
1153 throw y = !0, n;
1154 }
1155 return function(o, p, l) {
1156 if (f > 1) throw TypeError("Generator is already running");
1157 for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) {
1158 i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u);
1159 try {
1160 if (f = 2, i) {
1161 if (c || (o = "next"), t = i[o]) {
1162 if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object");
1163 if (!t.done) return t;
1164 u = t.value, c < 2 && (c = 0);
1165 } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1);
1166 i = e;
1167 } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break;
1168 } catch (t) {
1169 i = e, c = 1, u = t;
1170 } finally {
1171 f = 1;
1172 }
1173 }
1174 return {
1175 value: t,
1176 done: y
1177 };
1178 };
1179 }(r, o, i), !0), u;
1180 }
1181 var a = {};
1182 function Generator() {}
1183 function GeneratorFunction() {}
1184 function GeneratorFunctionPrototype() {}
1185 t = Object.getPrototypeOf;
1186 var c = [][n] ? t(t([][n]())) : (regeneratorDefine(t = {}, n, function() {
1187 return this;
1188 }), t);
1189 var u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c);
1190 function f(e) {
1191 return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e;
1192 }
1193 return GeneratorFunction.prototype = GeneratorFunctionPrototype, regeneratorDefine(u, "constructor", GeneratorFunctionPrototype), regeneratorDefine(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", regeneratorDefine(GeneratorFunctionPrototype, o, "GeneratorFunction"), regeneratorDefine(u), regeneratorDefine(u, o, "Generator"), regeneratorDefine(u, n, function() {
1194 return this;
1195 }), regeneratorDefine(u, "toString", function() {
1196 return "[object Generator]";
1197 }), (module.exports = _regenerator = function _regenerator() {
1198 return {
1199 w: i,
1200 m: f
1201 };
1202 }, module.exports.__esModule = true, module.exports["default"] = module.exports)();
1203 }
1204 module.exports = _regenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
1205 }));
1206
1207 //#endregion
1208 //#region node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js
1209 var require_regeneratorAsyncIterator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1210 var OverloadYield = require_OverloadYield();
1211 var regeneratorDefine = require_regeneratorDefine();
1212 function AsyncIterator(t, e) {
1213 function n(r, o, i, f) {
1214 try {
1215 var c = t[r](o);
1216 var u = c.value;
1217 return u instanceof OverloadYield ? e.resolve(u.v).then(function(t) {
1218 n("next", t, i, f);
1219 }, function(t) {
1220 n("throw", t, i, f);
1221 }) : e.resolve(u).then(function(t) {
1222 c.value = t, i(c);
1223 }, function(t) {
1224 return n("throw", t, i, f);
1225 });
1226 } catch (t) {
1227 f(t);
1228 }
1229 }
1230 var r;
1231 this.next || (regeneratorDefine(AsyncIterator.prototype), regeneratorDefine(AsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function() {
1232 return this;
1233 })), regeneratorDefine(this, "_invoke", function(t, o, i) {
1234 function f() {
1235 return new e(function(e, r) {
1236 n(t, i, e, r);
1237 });
1238 }
1239 return r = r ? r.then(f, f) : f();
1240 }, !0);
1241 }
1242 module.exports = AsyncIterator, module.exports.__esModule = true, module.exports["default"] = module.exports;
1243 }));
1244
1245 //#endregion
1246 //#region node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js
1247 var require_regeneratorAsyncGen = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1248 var regenerator = require_regenerator$1();
1249 var regeneratorAsyncIterator = require_regeneratorAsyncIterator();
1250 function _regeneratorAsyncGen(r, e, t, o, n) {
1251 return new regeneratorAsyncIterator(regenerator().w(r, e, t, o), n || Promise);
1252 }
1253 module.exports = _regeneratorAsyncGen, module.exports.__esModule = true, module.exports["default"] = module.exports;
1254 }));
1255
1256 //#endregion
1257 //#region node_modules/@babel/runtime/helpers/regeneratorAsync.js
1258 var require_regeneratorAsync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1259 var regeneratorAsyncGen = require_regeneratorAsyncGen();
1260 function _regeneratorAsync(n, e, r, t, o) {
1261 var a = regeneratorAsyncGen(n, e, r, t, o);
1262 return a.next().then(function(n) {
1263 return n.done ? n.value : a.next();
1264 });
1265 }
1266 module.exports = _regeneratorAsync, module.exports.__esModule = true, module.exports["default"] = module.exports;
1267 }));
1268
1269 //#endregion
1270 //#region node_modules/@babel/runtime/helpers/regeneratorKeys.js
1271 var require_regeneratorKeys = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1272 function _regeneratorKeys(e) {
1273 var n = Object(e);
1274 var r = [];
1275 for (var t in n) r.unshift(t);
1276 return function e() {
1277 for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e;
1278 return e.done = !0, e;
1279 };
1280 }
1281 module.exports = _regeneratorKeys, module.exports.__esModule = true, module.exports["default"] = module.exports;
1282 }));
1283
1284 //#endregion
1285 //#region node_modules/@babel/runtime/helpers/typeof.js
1286 var require_typeof = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1287 function _typeof(o) {
1288 "@babel/helpers - typeof";
1289 return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
1290 return typeof o;
1291 } : function(o) {
1292 return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
1293 }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o);
1294 }
1295 module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
1296 }));
1297
1298 //#endregion
1299 //#region node_modules/@babel/runtime/helpers/regeneratorValues.js
1300 var require_regeneratorValues = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1301 var _typeof = require_typeof()["default"];
1302 function _regeneratorValues(e) {
1303 if (null != e) {
1304 var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"];
1305 var r = 0;
1306 if (t) return t.call(e);
1307 if ("function" == typeof e.next) return e;
1308 if (!isNaN(e.length)) return { next: function next() {
1309 return e && r >= e.length && (e = void 0), {
1310 value: e && e[r++],
1311 done: !e
1312 };
1313 } };
1314 }
1315 throw new TypeError(_typeof(e) + " is not iterable");
1316 }
1317 module.exports = _regeneratorValues, module.exports.__esModule = true, module.exports["default"] = module.exports;
1318 }));
1319
1320 //#endregion
1321 //#region node_modules/@babel/runtime/helpers/regeneratorRuntime.js
1322 var require_regeneratorRuntime = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1323 var OverloadYield = require_OverloadYield();
1324 var regenerator = require_regenerator$1();
1325 var regeneratorAsync = require_regeneratorAsync();
1326 var regeneratorAsyncGen = require_regeneratorAsyncGen();
1327 var regeneratorAsyncIterator = require_regeneratorAsyncIterator();
1328 var regeneratorKeys = require_regeneratorKeys();
1329 var regeneratorValues = require_regeneratorValues();
1330 function _regeneratorRuntime() {
1331 "use strict";
1332 var r = regenerator();
1333 var e = r.m(_regeneratorRuntime);
1334 var t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor;
1335 function n(r) {
1336 var e = "function" == typeof r && r.constructor;
1337 return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name));
1338 }
1339 var o = {
1340 "throw": 1,
1341 "return": 2,
1342 "break": 3,
1343 "continue": 3
1344 };
1345 function a(r) {
1346 var e;
1347 var t;
1348 return function(n) {
1349 e || (e = {
1350 stop: function stop() {
1351 return t(n.a, 2);
1352 },
1353 "catch": function _catch() {
1354 return n.v;
1355 },
1356 abrupt: function abrupt(r, e) {
1357 return t(n.a, o[r], e);
1358 },
1359 delegateYield: function delegateYield(r, o, a) {
1360 return e.resultName = o, t(n.d, regeneratorValues(r), a);
1361 },
1362 finish: function finish(r) {
1363 return t(n.f, r);
1364 }
1365 }, t = function t(r, _t, o) {
1366 n.p = e.prev, n.n = e.next;
1367 try {
1368 return r(_t, o);
1369 } finally {
1370 e.next = n.n;
1371 }
1372 }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n;
1373 try {
1374 return r.call(this, e);
1375 } finally {
1376 n.p = e.prev, n.n = e.next;
1377 }
1378 };
1379 }
1380 return (module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
1381 return {
1382 wrap: function wrap(e, t, n, o) {
1383 return r.w(a(e), t, n, o && o.reverse());
1384 },
1385 isGeneratorFunction: n,
1386 mark: r.m,
1387 awrap: function awrap(r, e) {
1388 return new OverloadYield(r, e);
1389 },
1390 AsyncIterator: regeneratorAsyncIterator,
1391 async: function async(r, e, t, o, u) {
1392 return (n(e) ? regeneratorAsyncGen : regeneratorAsync)(a(r), e, t, o, u);
1393 },
1394 keys: regeneratorKeys,
1395 values: regeneratorValues
1396 };
1397 }, module.exports.__esModule = true, module.exports["default"] = module.exports)();
1398 }
1399 module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
1400 }));
1401
1402 //#endregion
1403 //#region node_modules/@babel/runtime/regenerator/index.js
1404 var require_regenerator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1405 var runtime = require_regeneratorRuntime()();
1406 module.exports = runtime;
1407 try {
1408 regeneratorRuntime = runtime;
1409 } catch (accidentalStrictMode) {
1410 if (typeof globalThis === "object") globalThis.regeneratorRuntime = runtime;
1411 else Function("r", "regeneratorRuntime = r")(runtime);
1412 }
1413 }));
1414
1415 //#endregion
1416 //#region modules/atomic-opt-in/assets/js/opt-in-page/opt-in-api.js
1417 var import_regenerator = /* @__PURE__ */ __toESM(require_regenerator());
1418 var triggerOptIn = /*#__PURE__*/ function() {
1419 var _ref = _asyncToGenerator(/*#__PURE__*/ import_regenerator.default.mark(function _callee() {
1420 return import_regenerator.default.wrap(function(_context) {
1421 while (1) switch (_context.prev = _context.next) {
1422 case 0: return _context.abrupt("return", elementorCommon.ajax.addRequest("editor_v4_opt_in"));
1423 case 1:
1424 case "end": return _context.stop();
1425 }
1426 }, _callee);
1427 }));
1428 return function triggerOptIn() {
1429 return _ref.apply(this, arguments);
1430 };
1431 }();
1432 var triggerOptOut = /*#__PURE__*/ function() {
1433 var _ref2 = _asyncToGenerator(/*#__PURE__*/ import_regenerator.default.mark(function _callee2() {
1434 return import_regenerator.default.wrap(function(_context2) {
1435 while (1) switch (_context2.prev = _context2.next) {
1436 case 0: return _context2.abrupt("return", elementorCommon.ajax.addRequest("editor_v4_opt_out"));
1437 case 1:
1438 case "end": return _context2.stop();
1439 }
1440 }, _callee2);
1441 }));
1442 return function triggerOptOut() {
1443 return _ref2.apply(this, arguments);
1444 };
1445 }();
1446
1447 //#endregion
1448 //#region node_modules/dompurify/dist/purify.es.mjs
1449 /*! @license DOMPurify 3.3.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.0/LICENSE */
1450 var { entries, setPrototypeOf, isFrozen, getPrototypeOf, getOwnPropertyDescriptor } = Object;
1451 var { freeze, seal, create } = Object;
1452 var { apply, construct } = typeof Reflect !== "undefined" && Reflect;
1453 if (!freeze) freeze = function freeze(x) {
1454 return x;
1455 };
1456 if (!seal) seal = function seal(x) {
1457 return x;
1458 };
1459 if (!apply) apply = function apply(func, thisArg) {
1460 for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) args[_key - 2] = arguments[_key];
1461 return func.apply(thisArg, args);
1462 };
1463 if (!construct) construct = function construct(Func) {
1464 for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) args[_key2 - 1] = arguments[_key2];
1465 return new Func(...args);
1466 };
1467 var arrayForEach = unapply(Array.prototype.forEach);
1468 var arrayLastIndexOf = unapply(Array.prototype.lastIndexOf);
1469 var arrayPop = unapply(Array.prototype.pop);
1470 var arrayPush = unapply(Array.prototype.push);
1471 var arraySplice = unapply(Array.prototype.splice);
1472 var stringToLowerCase = unapply(String.prototype.toLowerCase);
1473 var stringToString = unapply(String.prototype.toString);
1474 var stringMatch = unapply(String.prototype.match);
1475 var stringReplace = unapply(String.prototype.replace);
1476 var stringIndexOf = unapply(String.prototype.indexOf);
1477 var stringTrim = unapply(String.prototype.trim);
1478 var objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);
1479 var regExpTest = unapply(RegExp.prototype.test);
1480 var typeErrorCreate = unconstruct(TypeError);
1481 /**
1482 * Creates a new function that calls the given function with a specified thisArg and arguments.
1483 *
1484 * @param func - The function to be wrapped and called.
1485 * @returns A new function that calls the given function with a specified thisArg and arguments.
1486 */
1487 function unapply(func) {
1488 return function(thisArg) {
1489 if (thisArg instanceof RegExp) thisArg.lastIndex = 0;
1490 for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) args[_key3 - 1] = arguments[_key3];
1491 return apply(func, thisArg, args);
1492 };
1493 }
1494 /**
1495 * Creates a new function that constructs an instance of the given constructor function with the provided arguments.
1496 *
1497 * @param func - The constructor function to be wrapped and called.
1498 * @returns A new function that constructs an instance of the given constructor function with the provided arguments.
1499 */
1500 function unconstruct(Func) {
1501 return function() {
1502 for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) args[_key4] = arguments[_key4];
1503 return construct(Func, args);
1504 };
1505 }
1506 /**
1507 * Add properties to a lookup table
1508 *
1509 * @param set - The set to which elements will be added.
1510 * @param array - The array containing elements to be added to the set.
1511 * @param transformCaseFunc - An optional function to transform the case of each element before adding to the set.
1512 * @returns The modified set with added elements.
1513 */
1514 function addToSet(set, array) {
1515 let transformCaseFunc = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : stringToLowerCase;
1516 if (setPrototypeOf) setPrototypeOf(set, null);
1517 let l = array.length;
1518 while (l--) {
1519 let element = array[l];
1520 if (typeof element === "string") {
1521 const lcElement = transformCaseFunc(element);
1522 if (lcElement !== element) {
1523 if (!isFrozen(array)) array[l] = lcElement;
1524 element = lcElement;
1525 }
1526 }
1527 set[element] = true;
1528 }
1529 return set;
1530 }
1531 /**
1532 * Clean up an array to harden against CSPP
1533 *
1534 * @param array - The array to be cleaned.
1535 * @returns The cleaned version of the array
1536 */
1537 function cleanArray(array) {
1538 for (let index = 0; index < array.length; index++) if (!objectHasOwnProperty(array, index)) array[index] = null;
1539 return array;
1540 }
1541 /**
1542 * Shallow clone an object
1543 *
1544 * @param object - The object to be cloned.
1545 * @returns A new object that copies the original.
1546 */
1547 function clone(object) {
1548 const newObject = create(null);
1549 for (const [property, value] of entries(object)) if (objectHasOwnProperty(object, property)) if (Array.isArray(value)) newObject[property] = cleanArray(value);
1550 else if (value && typeof value === "object" && value.constructor === Object) newObject[property] = clone(value);
1551 else newObject[property] = value;
1552 return newObject;
1553 }
1554 /**
1555 * This method automatically checks if the prop is function or getter and behaves accordingly.
1556 *
1557 * @param object - The object to look up the getter function in its prototype chain.
1558 * @param prop - The property name for which to find the getter function.
1559 * @returns The getter function found in the prototype chain or a fallback function.
1560 */
1561 function lookupGetter(object, prop) {
1562 while (object !== null) {
1563 const desc = getOwnPropertyDescriptor(object, prop);
1564 if (desc) {
1565 if (desc.get) return unapply(desc.get);
1566 if (typeof desc.value === "function") return unapply(desc.value);
1567 }
1568 object = getPrototypeOf(object);
1569 }
1570 function fallbackValue() {
1571 return null;
1572 }
1573 return fallbackValue;
1574 }
1575 var html$1 = freeze([
1576 "a",
1577 "abbr",
1578 "acronym",
1579 "address",
1580 "area",
1581 "article",
1582 "aside",
1583 "audio",
1584 "b",
1585 "bdi",
1586 "bdo",
1587 "big",
1588 "blink",
1589 "blockquote",
1590 "body",
1591 "br",
1592 "button",
1593 "canvas",
1594 "caption",
1595 "center",
1596 "cite",
1597 "code",
1598 "col",
1599 "colgroup",
1600 "content",
1601 "data",
1602 "datalist",
1603 "dd",
1604 "decorator",
1605 "del",
1606 "details",
1607 "dfn",
1608 "dialog",
1609 "dir",
1610 "div",
1611 "dl",
1612 "dt",
1613 "element",
1614 "em",
1615 "fieldset",
1616 "figcaption",
1617 "figure",
1618 "font",
1619 "footer",
1620 "form",
1621 "h1",
1622 "h2",
1623 "h3",
1624 "h4",
1625 "h5",
1626 "h6",
1627 "head",
1628 "header",
1629 "hgroup",
1630 "hr",
1631 "html",
1632 "i",
1633 "img",
1634 "input",
1635 "ins",
1636 "kbd",
1637 "label",
1638 "legend",
1639 "li",
1640 "main",
1641 "map",
1642 "mark",
1643 "marquee",
1644 "menu",
1645 "menuitem",
1646 "meter",
1647 "nav",
1648 "nobr",
1649 "ol",
1650 "optgroup",
1651 "option",
1652 "output",
1653 "p",
1654 "picture",
1655 "pre",
1656 "progress",
1657 "q",
1658 "rp",
1659 "rt",
1660 "ruby",
1661 "s",
1662 "samp",
1663 "search",
1664 "section",
1665 "select",
1666 "shadow",
1667 "slot",
1668 "small",
1669 "source",
1670 "spacer",
1671 "span",
1672 "strike",
1673 "strong",
1674 "style",
1675 "sub",
1676 "summary",
1677 "sup",
1678 "table",
1679 "tbody",
1680 "td",
1681 "template",
1682 "textarea",
1683 "tfoot",
1684 "th",
1685 "thead",
1686 "time",
1687 "tr",
1688 "track",
1689 "tt",
1690 "u",
1691 "ul",
1692 "var",
1693 "video",
1694 "wbr"
1695 ]);
1696 var svg$1 = freeze([
1697 "svg",
1698 "a",
1699 "altglyph",
1700 "altglyphdef",
1701 "altglyphitem",
1702 "animatecolor",
1703 "animatemotion",
1704 "animatetransform",
1705 "circle",
1706 "clippath",
1707 "defs",
1708 "desc",
1709 "ellipse",
1710 "enterkeyhint",
1711 "exportparts",
1712 "filter",
1713 "font",
1714 "g",
1715 "glyph",
1716 "glyphref",
1717 "hkern",
1718 "image",
1719 "inputmode",
1720 "line",
1721 "lineargradient",
1722 "marker",
1723 "mask",
1724 "metadata",
1725 "mpath",
1726 "part",
1727 "path",
1728 "pattern",
1729 "polygon",
1730 "polyline",
1731 "radialgradient",
1732 "rect",
1733 "stop",
1734 "style",
1735 "switch",
1736 "symbol",
1737 "text",
1738 "textpath",
1739 "title",
1740 "tref",
1741 "tspan",
1742 "view",
1743 "vkern"
1744 ]);
1745 var svgFilters = freeze([
1746 "feBlend",
1747 "feColorMatrix",
1748 "feComponentTransfer",
1749 "feComposite",
1750 "feConvolveMatrix",
1751 "feDiffuseLighting",
1752 "feDisplacementMap",
1753 "feDistantLight",
1754 "feDropShadow",
1755 "feFlood",
1756 "feFuncA",
1757 "feFuncB",
1758 "feFuncG",
1759 "feFuncR",
1760 "feGaussianBlur",
1761 "feImage",
1762 "feMerge",
1763 "feMergeNode",
1764 "feMorphology",
1765 "feOffset",
1766 "fePointLight",
1767 "feSpecularLighting",
1768 "feSpotLight",
1769 "feTile",
1770 "feTurbulence"
1771 ]);
1772 var svgDisallowed = freeze([
1773 "animate",
1774 "color-profile",
1775 "cursor",
1776 "discard",
1777 "font-face",
1778 "font-face-format",
1779 "font-face-name",
1780 "font-face-src",
1781 "font-face-uri",
1782 "foreignobject",
1783 "hatch",
1784 "hatchpath",
1785 "mesh",
1786 "meshgradient",
1787 "meshpatch",
1788 "meshrow",
1789 "missing-glyph",
1790 "script",
1791 "set",
1792 "solidcolor",
1793 "unknown",
1794 "use"
1795 ]);
1796 var mathMl$1 = freeze([
1797 "math",
1798 "menclose",
1799 "merror",
1800 "mfenced",
1801 "mfrac",
1802 "mglyph",
1803 "mi",
1804 "mlabeledtr",
1805 "mmultiscripts",
1806 "mn",
1807 "mo",
1808 "mover",
1809 "mpadded",
1810 "mphantom",
1811 "mroot",
1812 "mrow",
1813 "ms",
1814 "mspace",
1815 "msqrt",
1816 "mstyle",
1817 "msub",
1818 "msup",
1819 "msubsup",
1820 "mtable",
1821 "mtd",
1822 "mtext",
1823 "mtr",
1824 "munder",
1825 "munderover",
1826 "mprescripts"
1827 ]);
1828 var mathMlDisallowed = freeze([
1829 "maction",
1830 "maligngroup",
1831 "malignmark",
1832 "mlongdiv",
1833 "mscarries",
1834 "mscarry",
1835 "msgroup",
1836 "mstack",
1837 "msline",
1838 "msrow",
1839 "semantics",
1840 "annotation",
1841 "annotation-xml",
1842 "mprescripts",
1843 "none"
1844 ]);
1845 var text = freeze(["#text"]);
1846 var html = freeze([
1847 "accept",
1848 "action",
1849 "align",
1850 "alt",
1851 "autocapitalize",
1852 "autocomplete",
1853 "autopictureinpicture",
1854 "autoplay",
1855 "background",
1856 "bgcolor",
1857 "border",
1858 "capture",
1859 "cellpadding",
1860 "cellspacing",
1861 "checked",
1862 "cite",
1863 "class",
1864 "clear",
1865 "color",
1866 "cols",
1867 "colspan",
1868 "controls",
1869 "controlslist",
1870 "coords",
1871 "crossorigin",
1872 "datetime",
1873 "decoding",
1874 "default",
1875 "dir",
1876 "disabled",
1877 "disablepictureinpicture",
1878 "disableremoteplayback",
1879 "download",
1880 "draggable",
1881 "enctype",
1882 "enterkeyhint",
1883 "exportparts",
1884 "face",
1885 "for",
1886 "headers",
1887 "height",
1888 "hidden",
1889 "high",
1890 "href",
1891 "hreflang",
1892 "id",
1893 "inert",
1894 "inputmode",
1895 "integrity",
1896 "ismap",
1897 "kind",
1898 "label",
1899 "lang",
1900 "list",
1901 "loading",
1902 "loop",
1903 "low",
1904 "max",
1905 "maxlength",
1906 "media",
1907 "method",
1908 "min",
1909 "minlength",
1910 "multiple",
1911 "muted",
1912 "name",
1913 "nonce",
1914 "noshade",
1915 "novalidate",
1916 "nowrap",
1917 "open",
1918 "optimum",
1919 "part",
1920 "pattern",
1921 "placeholder",
1922 "playsinline",
1923 "popover",
1924 "popovertarget",
1925 "popovertargetaction",
1926 "poster",
1927 "preload",
1928 "pubdate",
1929 "radiogroup",
1930 "readonly",
1931 "rel",
1932 "required",
1933 "rev",
1934 "reversed",
1935 "role",
1936 "rows",
1937 "rowspan",
1938 "spellcheck",
1939 "scope",
1940 "selected",
1941 "shape",
1942 "size",
1943 "sizes",
1944 "slot",
1945 "span",
1946 "srclang",
1947 "start",
1948 "src",
1949 "srcset",
1950 "step",
1951 "style",
1952 "summary",
1953 "tabindex",
1954 "title",
1955 "translate",
1956 "type",
1957 "usemap",
1958 "valign",
1959 "value",
1960 "width",
1961 "wrap",
1962 "xmlns",
1963 "slot"
1964 ]);
1965 var svg = freeze([
1966 "accent-height",
1967 "accumulate",
1968 "additive",
1969 "alignment-baseline",
1970 "amplitude",
1971 "ascent",
1972 "attributename",
1973 "attributetype",
1974 "azimuth",
1975 "basefrequency",
1976 "baseline-shift",
1977 "begin",
1978 "bias",
1979 "by",
1980 "class",
1981 "clip",
1982 "clippathunits",
1983 "clip-path",
1984 "clip-rule",
1985 "color",
1986 "color-interpolation",
1987 "color-interpolation-filters",
1988 "color-profile",
1989 "color-rendering",
1990 "cx",
1991 "cy",
1992 "d",
1993 "dx",
1994 "dy",
1995 "diffuseconstant",
1996 "direction",
1997 "display",
1998 "divisor",
1999 "dur",
2000 "edgemode",
2001 "elevation",
2002 "end",
2003 "exponent",
2004 "fill",
2005 "fill-opacity",
2006 "fill-rule",
2007 "filter",
2008 "filterunits",
2009 "flood-color",
2010 "flood-opacity",
2011 "font-family",
2012 "font-size",
2013 "font-size-adjust",
2014 "font-stretch",
2015 "font-style",
2016 "font-variant",
2017 "font-weight",
2018 "fx",
2019 "fy",
2020 "g1",
2021 "g2",
2022 "glyph-name",
2023 "glyphref",
2024 "gradientunits",
2025 "gradienttransform",
2026 "height",
2027 "href",
2028 "id",
2029 "image-rendering",
2030 "in",
2031 "in2",
2032 "intercept",
2033 "k",
2034 "k1",
2035 "k2",
2036 "k3",
2037 "k4",
2038 "kerning",
2039 "keypoints",
2040 "keysplines",
2041 "keytimes",
2042 "lang",
2043 "lengthadjust",
2044 "letter-spacing",
2045 "kernelmatrix",
2046 "kernelunitlength",
2047 "lighting-color",
2048 "local",
2049 "marker-end",
2050 "marker-mid",
2051 "marker-start",
2052 "markerheight",
2053 "markerunits",
2054 "markerwidth",
2055 "maskcontentunits",
2056 "maskunits",
2057 "max",
2058 "mask",
2059 "mask-type",
2060 "media",
2061 "method",
2062 "mode",
2063 "min",
2064 "name",
2065 "numoctaves",
2066 "offset",
2067 "operator",
2068 "opacity",
2069 "order",
2070 "orient",
2071 "orientation",
2072 "origin",
2073 "overflow",
2074 "paint-order",
2075 "path",
2076 "pathlength",
2077 "patterncontentunits",
2078 "patterntransform",
2079 "patternunits",
2080 "points",
2081 "preservealpha",
2082 "preserveaspectratio",
2083 "primitiveunits",
2084 "r",
2085 "rx",
2086 "ry",
2087 "radius",
2088 "refx",
2089 "refy",
2090 "repeatcount",
2091 "repeatdur",
2092 "restart",
2093 "result",
2094 "rotate",
2095 "scale",
2096 "seed",
2097 "shape-rendering",
2098 "slope",
2099 "specularconstant",
2100 "specularexponent",
2101 "spreadmethod",
2102 "startoffset",
2103 "stddeviation",
2104 "stitchtiles",
2105 "stop-color",
2106 "stop-opacity",
2107 "stroke-dasharray",
2108 "stroke-dashoffset",
2109 "stroke-linecap",
2110 "stroke-linejoin",
2111 "stroke-miterlimit",
2112 "stroke-opacity",
2113 "stroke",
2114 "stroke-width",
2115 "style",
2116 "surfacescale",
2117 "systemlanguage",
2118 "tabindex",
2119 "tablevalues",
2120 "targetx",
2121 "targety",
2122 "transform",
2123 "transform-origin",
2124 "text-anchor",
2125 "text-decoration",
2126 "text-rendering",
2127 "textlength",
2128 "type",
2129 "u1",
2130 "u2",
2131 "unicode",
2132 "values",
2133 "viewbox",
2134 "visibility",
2135 "version",
2136 "vert-adv-y",
2137 "vert-origin-x",
2138 "vert-origin-y",
2139 "width",
2140 "word-spacing",
2141 "wrap",
2142 "writing-mode",
2143 "xchannelselector",
2144 "ychannelselector",
2145 "x",
2146 "x1",
2147 "x2",
2148 "xmlns",
2149 "y",
2150 "y1",
2151 "y2",
2152 "z",
2153 "zoomandpan"
2154 ]);
2155 var mathMl = freeze([
2156 "accent",
2157 "accentunder",
2158 "align",
2159 "bevelled",
2160 "close",
2161 "columnsalign",
2162 "columnlines",
2163 "columnspan",
2164 "denomalign",
2165 "depth",
2166 "dir",
2167 "display",
2168 "displaystyle",
2169 "encoding",
2170 "fence",
2171 "frame",
2172 "height",
2173 "href",
2174 "id",
2175 "largeop",
2176 "length",
2177 "linethickness",
2178 "lspace",
2179 "lquote",
2180 "mathbackground",
2181 "mathcolor",
2182 "mathsize",
2183 "mathvariant",
2184 "maxsize",
2185 "minsize",
2186 "movablelimits",
2187 "notation",
2188 "numalign",
2189 "open",
2190 "rowalign",
2191 "rowlines",
2192 "rowspacing",
2193 "rowspan",
2194 "rspace",
2195 "rquote",
2196 "scriptlevel",
2197 "scriptminsize",
2198 "scriptsizemultiplier",
2199 "selection",
2200 "separator",
2201 "separators",
2202 "stretchy",
2203 "subscriptshift",
2204 "supscriptshift",
2205 "symmetric",
2206 "voffset",
2207 "width",
2208 "xmlns"
2209 ]);
2210 var xml = freeze([
2211 "xlink:href",
2212 "xml:id",
2213 "xlink:title",
2214 "xml:space",
2215 "xmlns:xlink"
2216 ]);
2217 var MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm);
2218 var ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm);
2219 var TMPLIT_EXPR = seal(/\$\{[\w\W]*/gm);
2220 var DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]+$/);
2221 var ARIA_ATTR = seal(/^aria-[\-\w]+$/);
2222 var IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i);
2223 var IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i);
2224 var ATTR_WHITESPACE = seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g);
2225 var DOCTYPE_NAME = seal(/^html$/i);
2226 var CUSTOM_ELEMENT = seal(/^[a-z][.\w]*(-[.\w]+)+$/i);
2227 var EXPRESSIONS = /*#__PURE__*/ Object.freeze({
2228 __proto__: null,
2229 ARIA_ATTR,
2230 ATTR_WHITESPACE,
2231 CUSTOM_ELEMENT,
2232 DATA_ATTR,
2233 DOCTYPE_NAME,
2234 ERB_EXPR,
2235 IS_ALLOWED_URI,
2236 IS_SCRIPT_OR_DATA,
2237 MUSTACHE_EXPR,
2238 TMPLIT_EXPR
2239 });
2240 var NODE_TYPE = {
2241 element: 1,
2242 attribute: 2,
2243 text: 3,
2244 cdataSection: 4,
2245 entityReference: 5,
2246 entityNode: 6,
2247 progressingInstruction: 7,
2248 comment: 8,
2249 document: 9,
2250 documentType: 10,
2251 documentFragment: 11,
2252 notation: 12
2253 };
2254 var getGlobal = function getGlobal() {
2255 return typeof window === "undefined" ? null : window;
2256 };
2257 /**
2258 * Creates a no-op policy for internal use only.
2259 * Don't export this function outside this module!
2260 * @param trustedTypes The policy factory.
2261 * @param purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).
2262 * @return The policy created (or null, if Trusted Types
2263 * are not supported or creating the policy failed).
2264 */
2265 var _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, purifyHostElement) {
2266 if (typeof trustedTypes !== "object" || typeof trustedTypes.createPolicy !== "function") return null;
2267 let suffix = null;
2268 const ATTR_NAME = "data-tt-policy-suffix";
2269 if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) suffix = purifyHostElement.getAttribute(ATTR_NAME);
2270 const policyName = "dompurify" + (suffix ? "#" + suffix : "");
2271 try {
2272 return trustedTypes.createPolicy(policyName, {
2273 createHTML(html) {
2274 return html;
2275 },
2276 createScriptURL(scriptUrl) {
2277 return scriptUrl;
2278 }
2279 });
2280 } catch (_) {
2281 console.warn("TrustedTypes policy " + policyName + " could not be created.");
2282 return null;
2283 }
2284 };
2285 var _createHooksMap = function _createHooksMap() {
2286 return {
2287 afterSanitizeAttributes: [],
2288 afterSanitizeElements: [],
2289 afterSanitizeShadowDOM: [],
2290 beforeSanitizeAttributes: [],
2291 beforeSanitizeElements: [],
2292 beforeSanitizeShadowDOM: [],
2293 uponSanitizeAttribute: [],
2294 uponSanitizeElement: [],
2295 uponSanitizeShadowNode: []
2296 };
2297 };
2298 function createDOMPurify() {
2299 let window = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal();
2300 const DOMPurify = (root) => createDOMPurify(root);
2301 DOMPurify.version = "3.3.0";
2302 DOMPurify.removed = [];
2303 if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {
2304 DOMPurify.isSupported = false;
2305 return DOMPurify;
2306 }
2307 let { document } = window;
2308 const originalDocument = document;
2309 const currentScript = originalDocument.currentScript;
2310 const { DocumentFragment, HTMLTemplateElement, Node, Element, NodeFilter, NamedNodeMap = window.NamedNodeMap || window.MozNamedAttrMap, HTMLFormElement, DOMParser, trustedTypes } = window;
2311 const ElementPrototype = Element.prototype;
2312 const cloneNode = lookupGetter(ElementPrototype, "cloneNode");
2313 const remove = lookupGetter(ElementPrototype, "remove");
2314 const getNextSibling = lookupGetter(ElementPrototype, "nextSibling");
2315 const getChildNodes = lookupGetter(ElementPrototype, "childNodes");
2316 const getParentNode = lookupGetter(ElementPrototype, "parentNode");
2317 if (typeof HTMLTemplateElement === "function") {
2318 const template = document.createElement("template");
2319 if (template.content && template.content.ownerDocument) document = template.content.ownerDocument;
2320 }
2321 let trustedTypesPolicy;
2322 let emptyHTML = "";
2323 const { implementation, createNodeIterator, createDocumentFragment, getElementsByTagName } = document;
2324 const { importNode } = originalDocument;
2325 let hooks = _createHooksMap();
2326 /**
2327 * Expose whether this browser supports running the full DOMPurify.
2328 */
2329 DOMPurify.isSupported = typeof entries === "function" && typeof getParentNode === "function" && implementation && implementation.createHTMLDocument !== void 0;
2330 const { MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR, DATA_ATTR, ARIA_ATTR, IS_SCRIPT_OR_DATA, ATTR_WHITESPACE, CUSTOM_ELEMENT } = EXPRESSIONS;
2331 let { IS_ALLOWED_URI: IS_ALLOWED_URI$1 } = EXPRESSIONS;
2332 /**
2333 * We consider the elements and attributes below to be safe. Ideally
2334 * don't add any new ones but feel free to remove unwanted ones.
2335 */
2336 let ALLOWED_TAGS = null;
2337 const DEFAULT_ALLOWED_TAGS = addToSet({}, [
2338 ...html$1,
2339 ...svg$1,
2340 ...svgFilters,
2341 ...mathMl$1,
2342 ...text
2343 ]);
2344 let ALLOWED_ATTR = null;
2345 const DEFAULT_ALLOWED_ATTR = addToSet({}, [
2346 ...html,
2347 ...svg,
2348 ...mathMl,
2349 ...xml
2350 ]);
2351 let CUSTOM_ELEMENT_HANDLING = Object.seal(create(null, {
2352 tagNameCheck: {
2353 writable: true,
2354 configurable: false,
2355 enumerable: true,
2356 value: null
2357 },
2358 attributeNameCheck: {
2359 writable: true,
2360 configurable: false,
2361 enumerable: true,
2362 value: null
2363 },
2364 allowCustomizedBuiltInElements: {
2365 writable: true,
2366 configurable: false,
2367 enumerable: true,
2368 value: false
2369 }
2370 }));
2371 let FORBID_TAGS = null;
2372 let FORBID_ATTR = null;
2373 const EXTRA_ELEMENT_HANDLING = Object.seal(create(null, {
2374 tagCheck: {
2375 writable: true,
2376 configurable: false,
2377 enumerable: true,
2378 value: null
2379 },
2380 attributeCheck: {
2381 writable: true,
2382 configurable: false,
2383 enumerable: true,
2384 value: null
2385 }
2386 }));
2387 let ALLOW_ARIA_ATTR = true;
2388 let ALLOW_DATA_ATTR = true;
2389 let ALLOW_UNKNOWN_PROTOCOLS = false;
2390 let ALLOW_SELF_CLOSE_IN_ATTR = true;
2391 let SAFE_FOR_TEMPLATES = false;
2392 let SAFE_FOR_XML = true;
2393 let WHOLE_DOCUMENT = false;
2394 let SET_CONFIG = false;
2395 let FORCE_BODY = false;
2396 let RETURN_DOM = false;
2397 let RETURN_DOM_FRAGMENT = false;
2398 let RETURN_TRUSTED_TYPE = false;
2399 let SANITIZE_DOM = true;
2400 let SANITIZE_NAMED_PROPS = false;
2401 const SANITIZE_NAMED_PROPS_PREFIX = "user-content-";
2402 let KEEP_CONTENT = true;
2403 let IN_PLACE = false;
2404 let USE_PROFILES = {};
2405 let FORBID_CONTENTS = null;
2406 const DEFAULT_FORBID_CONTENTS = addToSet({}, [
2407 "annotation-xml",
2408 "audio",
2409 "colgroup",
2410 "desc",
2411 "foreignobject",
2412 "head",
2413 "iframe",
2414 "math",
2415 "mi",
2416 "mn",
2417 "mo",
2418 "ms",
2419 "mtext",
2420 "noembed",
2421 "noframes",
2422 "noscript",
2423 "plaintext",
2424 "script",
2425 "style",
2426 "svg",
2427 "template",
2428 "thead",
2429 "title",
2430 "video",
2431 "xmp"
2432 ]);
2433 let DATA_URI_TAGS = null;
2434 const DEFAULT_DATA_URI_TAGS = addToSet({}, [
2435 "audio",
2436 "video",
2437 "img",
2438 "source",
2439 "image",
2440 "track"
2441 ]);
2442 let URI_SAFE_ATTRIBUTES = null;
2443 const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, [
2444 "alt",
2445 "class",
2446 "for",
2447 "id",
2448 "label",
2449 "name",
2450 "pattern",
2451 "placeholder",
2452 "role",
2453 "summary",
2454 "title",
2455 "value",
2456 "style",
2457 "xmlns"
2458 ]);
2459 const MATHML_NAMESPACE = "http://www.w3.org/1998/Math/MathML";
2460 const SVG_NAMESPACE = "http://www.w3.org/2000/svg";
2461 const HTML_NAMESPACE = "http://www.w3.org/1999/xhtml";
2462 let NAMESPACE = HTML_NAMESPACE;
2463 let IS_EMPTY_INPUT = false;
2464 let ALLOWED_NAMESPACES = null;
2465 const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [
2466 MATHML_NAMESPACE,
2467 SVG_NAMESPACE,
2468 HTML_NAMESPACE
2469 ], stringToString);
2470 let MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, [
2471 "mi",
2472 "mo",
2473 "mn",
2474 "ms",
2475 "mtext"
2476 ]);
2477 let HTML_INTEGRATION_POINTS = addToSet({}, ["annotation-xml"]);
2478 const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, [
2479 "title",
2480 "style",
2481 "font",
2482 "a",
2483 "script"
2484 ]);
2485 let PARSER_MEDIA_TYPE = null;
2486 const SUPPORTED_PARSER_MEDIA_TYPES = ["application/xhtml+xml", "text/html"];
2487 const DEFAULT_PARSER_MEDIA_TYPE = "text/html";
2488 let transformCaseFunc = null;
2489 let CONFIG = null;
2490 const formElement = document.createElement("form");
2491 const isRegexOrFunction = function isRegexOrFunction(testValue) {
2492 return testValue instanceof RegExp || testValue instanceof Function;
2493 };
2494 /**
2495 * _parseConfig
2496 *
2497 * @param cfg optional config literal
2498 */
2499 const _parseConfig = function _parseConfig() {
2500 let cfg = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2501 if (CONFIG && CONFIG === cfg) return;
2502 if (!cfg || typeof cfg !== "object") cfg = {};
2503 cfg = clone(cfg);
2504 PARSER_MEDIA_TYPE = SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;
2505 transformCaseFunc = PARSER_MEDIA_TYPE === "application/xhtml+xml" ? stringToString : stringToLowerCase;
2506 ALLOWED_TAGS = objectHasOwnProperty(cfg, "ALLOWED_TAGS") ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;
2507 ALLOWED_ATTR = objectHasOwnProperty(cfg, "ALLOWED_ATTR") ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;
2508 ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, "ALLOWED_NAMESPACES") ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;
2509 URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, "ADD_URI_SAFE_ATTR") ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR, transformCaseFunc) : DEFAULT_URI_SAFE_ATTRIBUTES;
2510 DATA_URI_TAGS = objectHasOwnProperty(cfg, "ADD_DATA_URI_TAGS") ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS, transformCaseFunc) : DEFAULT_DATA_URI_TAGS;
2511 FORBID_CONTENTS = objectHasOwnProperty(cfg, "FORBID_CONTENTS") ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
2512 FORBID_TAGS = objectHasOwnProperty(cfg, "FORBID_TAGS") ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : clone({});
2513 FORBID_ATTR = objectHasOwnProperty(cfg, "FORBID_ATTR") ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : clone({});
2514 USE_PROFILES = objectHasOwnProperty(cfg, "USE_PROFILES") ? cfg.USE_PROFILES : false;
2515 ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false;
2516 ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false;
2517 ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false;
2518 ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false;
2519 SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false;
2520 SAFE_FOR_XML = cfg.SAFE_FOR_XML !== false;
2521 WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false;
2522 RETURN_DOM = cfg.RETURN_DOM || false;
2523 RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false;
2524 RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false;
2525 FORCE_BODY = cfg.FORCE_BODY || false;
2526 SANITIZE_DOM = cfg.SANITIZE_DOM !== false;
2527 SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false;
2528 KEEP_CONTENT = cfg.KEEP_CONTENT !== false;
2529 IN_PLACE = cfg.IN_PLACE || false;
2530 IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI;
2531 NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;
2532 MATHML_TEXT_INTEGRATION_POINTS = cfg.MATHML_TEXT_INTEGRATION_POINTS || MATHML_TEXT_INTEGRATION_POINTS;
2533 HTML_INTEGRATION_POINTS = cfg.HTML_INTEGRATION_POINTS || HTML_INTEGRATION_POINTS;
2534 CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};
2535 if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;
2536 if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;
2537 if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === "boolean") CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;
2538 if (SAFE_FOR_TEMPLATES) ALLOW_DATA_ATTR = false;
2539 if (RETURN_DOM_FRAGMENT) RETURN_DOM = true;
2540 if (USE_PROFILES) {
2541 ALLOWED_TAGS = addToSet({}, text);
2542 ALLOWED_ATTR = [];
2543 if (USE_PROFILES.html === true) {
2544 addToSet(ALLOWED_TAGS, html$1);
2545 addToSet(ALLOWED_ATTR, html);
2546 }
2547 if (USE_PROFILES.svg === true) {
2548 addToSet(ALLOWED_TAGS, svg$1);
2549 addToSet(ALLOWED_ATTR, svg);
2550 addToSet(ALLOWED_ATTR, xml);
2551 }
2552 if (USE_PROFILES.svgFilters === true) {
2553 addToSet(ALLOWED_TAGS, svgFilters);
2554 addToSet(ALLOWED_ATTR, svg);
2555 addToSet(ALLOWED_ATTR, xml);
2556 }
2557 if (USE_PROFILES.mathMl === true) {
2558 addToSet(ALLOWED_TAGS, mathMl$1);
2559 addToSet(ALLOWED_ATTR, mathMl);
2560 addToSet(ALLOWED_ATTR, xml);
2561 }
2562 }
2563 if (cfg.ADD_TAGS) if (typeof cfg.ADD_TAGS === "function") EXTRA_ELEMENT_HANDLING.tagCheck = cfg.ADD_TAGS;
2564 else {
2565 if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) ALLOWED_TAGS = clone(ALLOWED_TAGS);
2566 addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
2567 }
2568 if (cfg.ADD_ATTR) if (typeof cfg.ADD_ATTR === "function") EXTRA_ELEMENT_HANDLING.attributeCheck = cfg.ADD_ATTR;
2569 else {
2570 if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) ALLOWED_ATTR = clone(ALLOWED_ATTR);
2571 addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
2572 }
2573 if (cfg.ADD_URI_SAFE_ATTR) addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);
2574 if (cfg.FORBID_CONTENTS) {
2575 if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) FORBID_CONTENTS = clone(FORBID_CONTENTS);
2576 addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);
2577 }
2578 if (KEEP_CONTENT) ALLOWED_TAGS["#text"] = true;
2579 if (WHOLE_DOCUMENT) addToSet(ALLOWED_TAGS, [
2580 "html",
2581 "head",
2582 "body"
2583 ]);
2584 if (ALLOWED_TAGS.table) {
2585 addToSet(ALLOWED_TAGS, ["tbody"]);
2586 delete FORBID_TAGS.tbody;
2587 }
2588 if (cfg.TRUSTED_TYPES_POLICY) {
2589 if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== "function") throw typeErrorCreate("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
2590 if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== "function") throw typeErrorCreate("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
2591 trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;
2592 emptyHTML = trustedTypesPolicy.createHTML("");
2593 } else {
2594 if (trustedTypesPolicy === void 0) trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);
2595 if (trustedTypesPolicy !== null && typeof emptyHTML === "string") emptyHTML = trustedTypesPolicy.createHTML("");
2596 }
2597 if (freeze) freeze(cfg);
2598 CONFIG = cfg;
2599 };
2600 const ALL_SVG_TAGS = addToSet({}, [
2601 ...svg$1,
2602 ...svgFilters,
2603 ...svgDisallowed
2604 ]);
2605 const ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]);
2606 /**
2607 * @param element a DOM element whose namespace is being checked
2608 * @returns Return false if the element has a
2609 * namespace that a spec-compliant parser would never
2610 * return. Return true otherwise.
2611 */
2612 const _checkValidNamespace = function _checkValidNamespace(element) {
2613 let parent = getParentNode(element);
2614 if (!parent || !parent.tagName) parent = {
2615 namespaceURI: NAMESPACE,
2616 tagName: "template"
2617 };
2618 const tagName = stringToLowerCase(element.tagName);
2619 const parentTagName = stringToLowerCase(parent.tagName);
2620 if (!ALLOWED_NAMESPACES[element.namespaceURI]) return false;
2621 if (element.namespaceURI === SVG_NAMESPACE) {
2622 if (parent.namespaceURI === HTML_NAMESPACE) return tagName === "svg";
2623 if (parent.namespaceURI === MATHML_NAMESPACE) return tagName === "svg" && (parentTagName === "annotation-xml" || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);
2624 return Boolean(ALL_SVG_TAGS[tagName]);
2625 }
2626 if (element.namespaceURI === MATHML_NAMESPACE) {
2627 if (parent.namespaceURI === HTML_NAMESPACE) return tagName === "math";
2628 if (parent.namespaceURI === SVG_NAMESPACE) return tagName === "math" && HTML_INTEGRATION_POINTS[parentTagName];
2629 return Boolean(ALL_MATHML_TAGS[tagName]);
2630 }
2631 if (element.namespaceURI === HTML_NAMESPACE) {
2632 if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) return false;
2633 if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) return false;
2634 return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);
2635 }
2636 if (PARSER_MEDIA_TYPE === "application/xhtml+xml" && ALLOWED_NAMESPACES[element.namespaceURI]) return true;
2637 return false;
2638 };
2639 /**
2640 * _forceRemove
2641 *
2642 * @param node a DOM node
2643 */
2644 const _forceRemove = function _forceRemove(node) {
2645 arrayPush(DOMPurify.removed, { element: node });
2646 try {
2647 getParentNode(node).removeChild(node);
2648 } catch (_) {
2649 remove(node);
2650 }
2651 };
2652 /**
2653 * _removeAttribute
2654 *
2655 * @param name an Attribute name
2656 * @param element a DOM node
2657 */
2658 const _removeAttribute = function _removeAttribute(name, element) {
2659 try {
2660 arrayPush(DOMPurify.removed, {
2661 attribute: element.getAttributeNode(name),
2662 from: element
2663 });
2664 } catch (_) {
2665 arrayPush(DOMPurify.removed, {
2666 attribute: null,
2667 from: element
2668 });
2669 }
2670 element.removeAttribute(name);
2671 if (name === "is") if (RETURN_DOM || RETURN_DOM_FRAGMENT) try {
2672 _forceRemove(element);
2673 } catch (_) {}
2674 else try {
2675 element.setAttribute(name, "");
2676 } catch (_) {}
2677 };
2678 /**
2679 * _initDocument
2680 *
2681 * @param dirty - a string of dirty markup
2682 * @return a DOM, filled with the dirty markup
2683 */
2684 const _initDocument = function _initDocument(dirty) {
2685 let doc = null;
2686 let leadingWhitespace = null;
2687 if (FORCE_BODY) dirty = "<remove></remove>" + dirty;
2688 else {
2689 const matches = stringMatch(dirty, /^[\r\n\t ]+/);
2690 leadingWhitespace = matches && matches[0];
2691 }
2692 if (PARSER_MEDIA_TYPE === "application/xhtml+xml" && NAMESPACE === HTML_NAMESPACE) dirty = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + dirty + "</body></html>";
2693 const dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;
2694 if (NAMESPACE === HTML_NAMESPACE) try {
2695 doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);
2696 } catch (_) {}
2697 if (!doc || !doc.documentElement) {
2698 doc = implementation.createDocument(NAMESPACE, "template", null);
2699 try {
2700 doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;
2701 } catch (_) {}
2702 }
2703 const body = doc.body || doc.documentElement;
2704 if (dirty && leadingWhitespace) body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);
2705 if (NAMESPACE === HTML_NAMESPACE) return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? "html" : "body")[0];
2706 return WHOLE_DOCUMENT ? doc.documentElement : body;
2707 };
2708 /**
2709 * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.
2710 *
2711 * @param root The root element or node to start traversing on.
2712 * @return The created NodeIterator
2713 */
2714 const _createNodeIterator = function _createNodeIterator(root) {
2715 return createNodeIterator.call(root.ownerDocument || root, root, NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null);
2716 };
2717 /**
2718 * _isClobbered
2719 *
2720 * @param element element to check for clobbering attacks
2721 * @return true if clobbered, false if safe
2722 */
2723 const _isClobbered = function _isClobbered(element) {
2724 return element instanceof HTMLFormElement && (typeof element.nodeName !== "string" || typeof element.textContent !== "string" || typeof element.removeChild !== "function" || !(element.attributes instanceof NamedNodeMap) || typeof element.removeAttribute !== "function" || typeof element.setAttribute !== "function" || typeof element.namespaceURI !== "string" || typeof element.insertBefore !== "function" || typeof element.hasChildNodes !== "function");
2725 };
2726 /**
2727 * Checks whether the given object is a DOM node.
2728 *
2729 * @param value object to check whether it's a DOM node
2730 * @return true is object is a DOM node
2731 */
2732 const _isNode = function _isNode(value) {
2733 return typeof Node === "function" && value instanceof Node;
2734 };
2735 function _executeHooks(hooks, currentNode, data) {
2736 arrayForEach(hooks, (hook) => {
2737 hook.call(DOMPurify, currentNode, data, CONFIG);
2738 });
2739 }
2740 /**
2741 * _sanitizeElements
2742 *
2743 * @protect nodeName
2744 * @protect textContent
2745 * @protect removeChild
2746 * @param currentNode to check for permission to exist
2747 * @return true if node was killed, false if left alive
2748 */
2749 const _sanitizeElements = function _sanitizeElements(currentNode) {
2750 let content = null;
2751 _executeHooks(hooks.beforeSanitizeElements, currentNode, null);
2752 if (_isClobbered(currentNode)) {
2753 _forceRemove(currentNode);
2754 return true;
2755 }
2756 const tagName = transformCaseFunc(currentNode.nodeName);
2757 _executeHooks(hooks.uponSanitizeElement, currentNode, {
2758 tagName,
2759 allowedTags: ALLOWED_TAGS
2760 });
2761 if (SAFE_FOR_XML && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\w!]/g, currentNode.innerHTML) && regExpTest(/<[/\w!]/g, currentNode.textContent)) {
2762 _forceRemove(currentNode);
2763 return true;
2764 }
2765 if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {
2766 _forceRemove(currentNode);
2767 return true;
2768 }
2769 if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, currentNode.data)) {
2770 _forceRemove(currentNode);
2771 return true;
2772 }
2773 if (!(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName])) {
2774 if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {
2775 if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) return false;
2776 if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) return false;
2777 }
2778 if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {
2779 const parentNode = getParentNode(currentNode) || currentNode.parentNode;
2780 const childNodes = getChildNodes(currentNode) || currentNode.childNodes;
2781 if (childNodes && parentNode) {
2782 const childCount = childNodes.length;
2783 for (let i = childCount - 1; i >= 0; --i) {
2784 const childClone = cloneNode(childNodes[i], true);
2785 childClone.__removalCount = (currentNode.__removalCount || 0) + 1;
2786 parentNode.insertBefore(childClone, getNextSibling(currentNode));
2787 }
2788 }
2789 }
2790 _forceRemove(currentNode);
2791 return true;
2792 }
2793 if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {
2794 _forceRemove(currentNode);
2795 return true;
2796 }
2797 if ((tagName === "noscript" || tagName === "noembed" || tagName === "noframes") && regExpTest(/<\/no(script|embed|frames)/i, currentNode.innerHTML)) {
2798 _forceRemove(currentNode);
2799 return true;
2800 }
2801 if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {
2802 content = currentNode.textContent;
2803 arrayForEach([
2804 MUSTACHE_EXPR,
2805 ERB_EXPR,
2806 TMPLIT_EXPR
2807 ], (expr) => {
2808 content = stringReplace(content, expr, " ");
2809 });
2810 if (currentNode.textContent !== content) {
2811 arrayPush(DOMPurify.removed, { element: currentNode.cloneNode() });
2812 currentNode.textContent = content;
2813 }
2814 }
2815 _executeHooks(hooks.afterSanitizeElements, currentNode, null);
2816 return false;
2817 };
2818 /**
2819 * _isValidAttribute
2820 *
2821 * @param lcTag Lowercase tag name of containing element.
2822 * @param lcName Lowercase attribute name.
2823 * @param value Attribute value.
2824 * @return Returns true if `value` is valid, otherwise false.
2825 */
2826 const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {
2827 if (SANITIZE_DOM && (lcName === "id" || lcName === "name") && (value in document || value in formElement)) return false;
2828 if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR, lcName));
2829 else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR, lcName));
2830 else if (EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function && EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag));
2831 else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) if (_isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName, lcTag)) || lcName === "is" && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value)));
2832 else return false;
2833 else if (URI_SAFE_ATTRIBUTES[lcName]);
2834 else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE, "")));
2835 else if ((lcName === "src" || lcName === "xlink:href" || lcName === "href") && lcTag !== "script" && stringIndexOf(value, "data:") === 0 && DATA_URI_TAGS[lcTag]);
2836 else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA, stringReplace(value, ATTR_WHITESPACE, "")));
2837 else if (value) return false;
2838 return true;
2839 };
2840 /**
2841 * _isBasicCustomElement
2842 * checks if at least one dash is included in tagName, and it's not the first char
2843 * for more sophisticated checking see https://github.com/sindresorhus/validate-element-name
2844 *
2845 * @param tagName name of the tag of the node to sanitize
2846 * @returns Returns true if the tag name meets the basic criteria for a custom element, otherwise false.
2847 */
2848 const _isBasicCustomElement = function _isBasicCustomElement(tagName) {
2849 return tagName !== "annotation-xml" && stringMatch(tagName, CUSTOM_ELEMENT);
2850 };
2851 /**
2852 * _sanitizeAttributes
2853 *
2854 * @protect attributes
2855 * @protect nodeName
2856 * @protect removeAttribute
2857 * @protect setAttribute
2858 *
2859 * @param currentNode to sanitize
2860 */
2861 const _sanitizeAttributes = function _sanitizeAttributes(currentNode) {
2862 _executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);
2863 const { attributes } = currentNode;
2864 if (!attributes || _isClobbered(currentNode)) return;
2865 const hookEvent = {
2866 attrName: "",
2867 attrValue: "",
2868 keepAttr: true,
2869 allowedAttributes: ALLOWED_ATTR,
2870 forceKeepAttr: void 0
2871 };
2872 let l = attributes.length;
2873 while (l--) {
2874 const { name, namespaceURI, value: attrValue } = attributes[l];
2875 const lcName = transformCaseFunc(name);
2876 const initValue = attrValue;
2877 let value = name === "value" ? initValue : stringTrim(initValue);
2878 hookEvent.attrName = lcName;
2879 hookEvent.attrValue = value;
2880 hookEvent.keepAttr = true;
2881 hookEvent.forceKeepAttr = void 0;
2882 _executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent);
2883 value = hookEvent.attrValue;
2884 if (SANITIZE_NAMED_PROPS && (lcName === "id" || lcName === "name")) {
2885 _removeAttribute(name, currentNode);
2886 value = SANITIZE_NAMED_PROPS_PREFIX + value;
2887 }
2888 if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|title|textarea)/i, value)) {
2889 _removeAttribute(name, currentNode);
2890 continue;
2891 }
2892 if (lcName === "attributename" && stringMatch(value, "href")) {
2893 _removeAttribute(name, currentNode);
2894 continue;
2895 }
2896 if (hookEvent.forceKeepAttr) continue;
2897 if (!hookEvent.keepAttr) {
2898 _removeAttribute(name, currentNode);
2899 continue;
2900 }
2901 if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\/>/i, value)) {
2902 _removeAttribute(name, currentNode);
2903 continue;
2904 }
2905 if (SAFE_FOR_TEMPLATES) arrayForEach([
2906 MUSTACHE_EXPR,
2907 ERB_EXPR,
2908 TMPLIT_EXPR
2909 ], (expr) => {
2910 value = stringReplace(value, expr, " ");
2911 });
2912 const lcTag = transformCaseFunc(currentNode.nodeName);
2913 if (!_isValidAttribute(lcTag, lcName, value)) {
2914 _removeAttribute(name, currentNode);
2915 continue;
2916 }
2917 if (trustedTypesPolicy && typeof trustedTypes === "object" && typeof trustedTypes.getAttributeType === "function") if (namespaceURI);
2918 else switch (trustedTypes.getAttributeType(lcTag, lcName)) {
2919 case "TrustedHTML":
2920 value = trustedTypesPolicy.createHTML(value);
2921 break;
2922 case "TrustedScriptURL":
2923 value = trustedTypesPolicy.createScriptURL(value);
2924 break;
2925 }
2926 if (value !== initValue) try {
2927 if (namespaceURI) currentNode.setAttributeNS(namespaceURI, name, value);
2928 else currentNode.setAttribute(name, value);
2929 if (_isClobbered(currentNode)) _forceRemove(currentNode);
2930 else arrayPop(DOMPurify.removed);
2931 } catch (_) {
2932 _removeAttribute(name, currentNode);
2933 }
2934 }
2935 _executeHooks(hooks.afterSanitizeAttributes, currentNode, null);
2936 };
2937 /**
2938 * _sanitizeShadowDOM
2939 *
2940 * @param fragment to iterate over recursively
2941 */
2942 const _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) {
2943 let shadowNode = null;
2944 const shadowIterator = _createNodeIterator(fragment);
2945 _executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);
2946 while (shadowNode = shadowIterator.nextNode()) {
2947 _executeHooks(hooks.uponSanitizeShadowNode, shadowNode, null);
2948 _sanitizeElements(shadowNode);
2949 _sanitizeAttributes(shadowNode);
2950 if (shadowNode.content instanceof DocumentFragment) _sanitizeShadowDOM(shadowNode.content);
2951 }
2952 _executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);
2953 };
2954 DOMPurify.sanitize = function(dirty) {
2955 let cfg = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2956 let body = null;
2957 let importedNode = null;
2958 let currentNode = null;
2959 let returnNode = null;
2960 IS_EMPTY_INPUT = !dirty;
2961 if (IS_EMPTY_INPUT) dirty = "<!-->";
2962 if (typeof dirty !== "string" && !_isNode(dirty)) if (typeof dirty.toString === "function") {
2963 dirty = dirty.toString();
2964 if (typeof dirty !== "string") throw typeErrorCreate("dirty is not a string, aborting");
2965 } else throw typeErrorCreate("toString is not a function");
2966 if (!DOMPurify.isSupported) return dirty;
2967 if (!SET_CONFIG) _parseConfig(cfg);
2968 DOMPurify.removed = [];
2969 if (typeof dirty === "string") IN_PLACE = false;
2970 if (IN_PLACE) {
2971 if (dirty.nodeName) {
2972 const tagName = transformCaseFunc(dirty.nodeName);
2973 if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
2974 }
2975 } else if (dirty instanceof Node) {
2976 body = _initDocument("<!---->");
2977 importedNode = body.ownerDocument.importNode(dirty, true);
2978 if (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === "BODY") body = importedNode;
2979 else if (importedNode.nodeName === "HTML") body = importedNode;
2980 else body.appendChild(importedNode);
2981 } else {
2982 if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT && dirty.indexOf("<") === -1) return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;
2983 body = _initDocument(dirty);
2984 if (!body) return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : "";
2985 }
2986 if (body && FORCE_BODY) _forceRemove(body.firstChild);
2987 const nodeIterator = _createNodeIterator(IN_PLACE ? dirty : body);
2988 while (currentNode = nodeIterator.nextNode()) {
2989 _sanitizeElements(currentNode);
2990 _sanitizeAttributes(currentNode);
2991 if (currentNode.content instanceof DocumentFragment) _sanitizeShadowDOM(currentNode.content);
2992 }
2993 if (IN_PLACE) return dirty;
2994 if (RETURN_DOM) {
2995 if (RETURN_DOM_FRAGMENT) {
2996 returnNode = createDocumentFragment.call(body.ownerDocument);
2997 while (body.firstChild) returnNode.appendChild(body.firstChild);
2998 } else returnNode = body;
2999 if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) returnNode = importNode.call(originalDocument, returnNode, true);
3000 return returnNode;
3001 }
3002 let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;
3003 if (WHOLE_DOCUMENT && ALLOWED_TAGS["!doctype"] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) serializedHTML = "<!DOCTYPE " + body.ownerDocument.doctype.name + ">\n" + serializedHTML;
3004 if (SAFE_FOR_TEMPLATES) arrayForEach([
3005 MUSTACHE_EXPR,
3006 ERB_EXPR,
3007 TMPLIT_EXPR
3008 ], (expr) => {
3009 serializedHTML = stringReplace(serializedHTML, expr, " ");
3010 });
3011 return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;
3012 };
3013 DOMPurify.setConfig = function() {
3014 let cfg = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
3015 _parseConfig(cfg);
3016 SET_CONFIG = true;
3017 };
3018 DOMPurify.clearConfig = function() {
3019 CONFIG = null;
3020 SET_CONFIG = false;
3021 };
3022 DOMPurify.isValidAttribute = function(tag, attr, value) {
3023 if (!CONFIG) _parseConfig({});
3024 const lcTag = transformCaseFunc(tag);
3025 const lcName = transformCaseFunc(attr);
3026 return _isValidAttribute(lcTag, lcName, value);
3027 };
3028 DOMPurify.addHook = function(entryPoint, hookFunction) {
3029 if (typeof hookFunction !== "function") return;
3030 arrayPush(hooks[entryPoint], hookFunction);
3031 };
3032 DOMPurify.removeHook = function(entryPoint, hookFunction) {
3033 if (hookFunction !== void 0) {
3034 const index = arrayLastIndexOf(hooks[entryPoint], hookFunction);
3035 return index === -1 ? void 0 : arraySplice(hooks[entryPoint], index, 1)[0];
3036 }
3037 return arrayPop(hooks[entryPoint]);
3038 };
3039 DOMPurify.removeHooks = function(entryPoint) {
3040 hooks[entryPoint] = [];
3041 };
3042 DOMPurify.removeAllHooks = function() {
3043 hooks = _createHooksMap();
3044 };
3045 return DOMPurify;
3046 }
3047 var purify = createDOMPurify();
3048
3049 //#endregion
3050 //#region modules/atomic-opt-in/assets/js/opt-in-page/opt-in-terms.js
3051 var _excluded = [
3052 "onClose",
3053 "onSubmit",
3054 "isEnrolled"
3055 ];
3056 var i18n$1 = {
3057 header: (0, _wordpress_i18n.__)("Atomic Editor", "elementor"),
3058 checkboxText: (0, _wordpress_i18n.__)("I’ve read and understood.", "elementor"),
3059 optIn: {
3060 titleText: (0, _wordpress_i18n.__)("You are about to enable Atomic Editor features!", "elementor"),
3061 introText: (0, _wordpress_i18n.__)("By activating, you’ll get access to the next generation of Elementor’s Editor. This is your chance to explore new capabilities and help shape the future of Elementor! ", "elementor"),
3062 details: [(0, _wordpress_i18n.__)("When you activate, you’ll also be activating Containers and Nested Elements. You can turn them back off by going to: WP Admin > Elementor > Settings > Features.", "elementor")],
3063 activateButton: (0, _wordpress_i18n.__)("Activate", "elementor"),
3064 cancelButton: (0, _wordpress_i18n.__)("Cancel", "elementor")
3065 },
3066 optOut: {
3067 titleText: (0, _wordpress_i18n.__)("You're about to lose all content created with Atomic features", "elementor"),
3068 details: [(0, _wordpress_i18n.__)("By deactivating, you’ll lose all Atomic Elements, Classes and Variables. Any content you created with these features will no longer be available or appear on your site.", "elementor"), (0, _wordpress_i18n.__)("Containers and Nested Elements will stay in their current status.", "elementor")],
3069 activateButton: (0, _wordpress_i18n.__)("Deactivate", "elementor"),
3070 cancelButton: (0, _wordpress_i18n.__)("Cancel", "elementor")
3071 }
3072 };
3073 var Terms = function Terms(_ref) {
3074 var onClose = _ref.onClose;
3075 var onSubmit = _ref.onSubmit;
3076 var isEnrolled = _ref.isEnrolled;
3077 var props = _objectWithoutProperties(_ref, _excluded);
3078 var _useState2 = _slicedToArray((0, react.useState)(false), 2);
3079 var checked = _useState2[0];
3080 var setChecked = _useState2[1];
3081 var handleCheckboxChange = function handleCheckboxChange() {
3082 setChecked(function(prev) {
3083 return !prev;
3084 });
3085 };
3086 var handleSubmit = function handleSubmit() {
3087 if (checked) onSubmit();
3088 };
3089 var currentState = isEnrolled ? "optOut" : "optIn";
3090 return /*#__PURE__*/ react.default.createElement(_elementor_ui.Dialog, _extends({}, props, {
3091 open: true,
3092 onClose,
3093 maxWidth: "md"
3094 }), /*#__PURE__*/ react.default.createElement(_elementor_ui_DialogHeader.default, null, /*#__PURE__*/ react.default.createElement(_elementor_ui_DialogHeaderGroup.default, null, /*#__PURE__*/ react.default.createElement(_elementor_ui.DialogTitle, null, i18n$1.header))), /*#__PURE__*/ react.default.createElement(_elementor_ui.DialogContent, { dividers: true }, /*#__PURE__*/ react.default.createElement(_elementor_ui.Stack, { gap: 2.5 }, /*#__PURE__*/ react.default.createElement(_elementor_ui.Stack, {
3095 gap: 1.5,
3096 sx: {
3097 mx: 2,
3098 maxWidth: "550px"
3099 }
3100 }, /*#__PURE__*/ react.default.createElement(TextNode, {
3101 align: "center",
3102 variant: "h6"
3103 }, i18n$1[currentState].titleText), i18n$1[currentState].introText && /*#__PURE__*/ react.default.createElement(TextNode, {
3104 align: "center",
3105 variant: "body3"
3106 }, i18n$1[currentState].introText)), /*#__PURE__*/ react.default.createElement(_elementor_ui.Stack, null, /*#__PURE__*/ react.default.createElement(ContentList, { sx: {
3107 mx: 3,
3108 maxWidth: "550px"
3109 } }, i18n$1[currentState].details.map(function(entry, index) {
3110 return /*#__PURE__*/ react.default.createElement(ContentListItem, {
3111 key: index,
3112 variant: "body3"
3113 }, entry);
3114 }))), /*#__PURE__*/ react.default.createElement(_elementor_ui.FormControlLabel, {
3115 control: /*#__PURE__*/ react.default.createElement(_elementor_ui.Checkbox, {
3116 checked: !!checked,
3117 onChange: handleCheckboxChange,
3118 color: "secondary",
3119 size: "small"
3120 }),
3121 label: /*#__PURE__*/ react.default.createElement(TextNode, { variant: "body2" }, i18n$1.checkboxText)
3122 }))), /*#__PURE__*/ react.default.createElement(_elementor_ui.DialogActions, null, /*#__PURE__*/ react.default.createElement(_elementor_ui.Button, {
3123 variant: "text",
3124 color: "secondary",
3125 onClick: onClose
3126 }, i18n$1[currentState].cancelButton), /*#__PURE__*/ react.default.createElement(_elementor_ui.Button, {
3127 disabled: !checked,
3128 variant: "contained",
3129 onClick: handleSubmit
3130 }, i18n$1[currentState].activateButton)));
3131 };
3132 Terms.propTypes = {
3133 onClose: import_prop_types.default.func,
3134 onSubmit: import_prop_types.default.func,
3135 isEnrolled: import_prop_types.default.bool
3136 };
3137
3138 //#endregion
3139 //#region modules/atomic-opt-in/assets/js/opt-in-page/opt-in.js
3140 var _elementorSettingsEdi;
3141 function ownKeys(e, r) {
3142 var t = Object.keys(e);
3143 if (Object.getOwnPropertySymbols) {
3144 var o = Object.getOwnPropertySymbols(e);
3145 r && (o = o.filter(function(r) {
3146 return Object.getOwnPropertyDescriptor(e, r).enumerable;
3147 })), t.push.apply(t, o);
3148 }
3149 return t;
3150 }
3151 function _objectSpread(e) {
3152 for (var r = 1; r < arguments.length; r++) {
3153 var t = null != arguments[r] ? arguments[r] : {};
3154 r % 2 ? ownKeys(Object(t), !0).forEach(function(r) {
3155 _defineProperty(e, r, t[r]);
3156 }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r) {
3157 Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
3158 });
3159 }
3160 return e;
3161 }
3162 var decodeHtmlUrl = function decodeHtmlUrl(html) {
3163 var textarea = document.createElement("textarea");
3164 textarea.innerHTML = html;
3165 return textarea.value;
3166 };
3167 var OPT_IN_MSG = "e-editor-v4-opt-in-message";
3168 var OPT_OUT_MSG = "e-editor-v4-opt-out-message";
3169 var i18n = {
3170 title: (0, _wordpress_i18n.__)("Activate Atomic Editor features", "elementor"),
3171 welcomeText: (0, _wordpress_i18n.__)("The Atomic Editor presents a new generation of high-performance, flexible building blocks designed for less bloat and precise styling with a unified interface.", "elementor"),
3172 advantages: [
3173 [(0, _wordpress_i18n.__)("Combine legacy widgets & new elements", "elementor"), (0, _wordpress_i18n.__)("Your current and new workflows work together on the same page.", "elementor")],
3174 [(0, _wordpress_i18n.__)("Build reusable design systems", "elementor"), (0, _wordpress_i18n.__)("Classes, Variables and Components give you a clear path for scale.", "elementor")],
3175 [(0, _wordpress_i18n.__)("Consistent styling experience", "elementor"), (0, _wordpress_i18n.__)("A unified Style tab for all Atomic Elements with full control over responsive design.", "elementor")],
3176 [(0, _wordpress_i18n.__)("Unparalleled performance", "elementor"), (0, _wordpress_i18n.__)("Cleaner code and a lighter CSS footprint with single-div wrappers.", "elementor")]
3177 ],
3178 andMore: (0, _wordpress_i18n.__)("And much more!", "elementor"),
3179 readMore: (0, _wordpress_i18n.__)("Learn more", "elementor"),
3180 feedback: (0, _wordpress_i18n.__)("We’d love your feedback!", "elementor"),
3181 overToGithub: (0, _wordpress_i18n.__)("Head over to Github", "elementor"),
3182 tellUsWhy: (0, _wordpress_i18n.__)("Tell us why", "elementor"),
3183 image: (0, _wordpress_i18n.__)("Editor V4", "elementor"),
3184 buttons: {
3185 tryOut: (0, _wordpress_i18n.__)("Try out the new experience", "elementor"),
3186 optIn: (0, _wordpress_i18n.__)("Activate the new experience", "elementor"),
3187 optOut: (0, _wordpress_i18n.__)("Deactivate", "elementor")
3188 },
3189 messages: {
3190 optInSuccess: (0, _wordpress_i18n.__)("Welcome! You’ve got the newest version of the editor.", "elementor"),
3191 optOut: (0, _wordpress_i18n.__)("You’ve deactivated the new Editor. Have feedback?", "elementor"),
3192 error: (0, _wordpress_i18n.__)("Ouch, there was a glitch. Try activating again soon.", "elementor")
3193 }
3194 };
3195 var optInLinks = {
3196 feedbackUrl: "https://go.elementor.com/wp-dash-opt-in-v4-feedback/",
3197 readMoreUrl: "https://go.elementor.com/wp-dash-opt-in-v4-help-center/",
3198 tryOutUrl: purify.sanitize(decodeHtmlUrl((_elementorSettingsEdi = elementorSettingsEditor4OptIn) === null || _elementorSettingsEdi === void 0 || (_elementorSettingsEdi = _elementorSettingsEdi.urls) === null || _elementorSettingsEdi === void 0 ? void 0 : _elementorSettingsEdi.start_building)) || "#"
3199 };
3200 var optInImages = {
3201 square: {
3202 src: "https://assets.elementor.com/v4-promotion/v1/images/v4_opt_in_500.png",
3203 sx: {
3204 width: "100%",
3205 maxHeight: "507px",
3206 maxWidth: "sm",
3207 height: "auto",
3208 mx: "auto",
3209 borderRadius: 2
3210 }
3211 },
3212 landscape: {
3213 src: "https://assets.elementor.com/v4-promotion/v1/images/v4_opt_in_260.png",
3214 sx: {
3215 width: "100%",
3216 height: "auto",
3217 maxHeight: "260px",
3218 mx: "auto",
3219 maxWidth: "sm",
3220 borderRadius: 2
3221 }
3222 }
3223 };
3224 var OptIn = function OptIn(_ref) {
3225 var _state$features;
3226 var state = _ref.state;
3227 var _useState2 = _slicedToArray((0, react.useState)(false), 2);
3228 var showTerms = _useState2[0];
3229 var setShowTerms = _useState2[1];
3230 var _useState4 = _slicedToArray((0, react.useState)(""), 2);
3231 var optInMessage = _useState4[0];
3232 var setOptInMessage = _useState4[1];
3233 var _useState6 = _slicedToArray((0, react.useState)(""), 2);
3234 var optOutMessage = _useState6[0];
3235 var setOptOutMessage = _useState6[1];
3236 var _useState8 = _slicedToArray((0, react.useState)(""), 2);
3237 var errorMessage = _useState8[0];
3238 var setErrorMessage = _useState8[1];
3239 (0, react.useEffect)(function() {
3240 var optInMsg = sessionStorage.getItem(OPT_IN_MSG);
3241 var optOutMsg = sessionStorage.getItem(OPT_OUT_MSG);
3242 if (optInMsg) {
3243 setTimeout(function() {
3244 setOptInMessage(optInMsg);
3245 }, 100);
3246 sessionStorage.removeItem(OPT_IN_MSG);
3247 }
3248 if (optOutMsg) {
3249 setTimeout(function() {
3250 setOptOutMessage(optOutMsg);
3251 }, 100);
3252 sessionStorage.removeItem(OPT_OUT_MSG);
3253 }
3254 }, []);
3255 var maybeOptIn = function maybeOptIn() {
3256 triggerOptIn().then(function() {
3257 sessionStorage.setItem(OPT_IN_MSG, i18n.messages.optInSuccess);
3258 window.location.reload();
3259 }).catch(function() {
3260 setErrorMessage(i18n.messages.error);
3261 });
3262 };
3263 var maybeOptOut = function maybeOptOut() {
3264 triggerOptOut().then(function() {
3265 sessionStorage.setItem(OPT_OUT_MSG, i18n.messages.optOut);
3266 window.location.reload();
3267 }).catch(function() {
3268 setErrorMessage(i18n.messages.error);
3269 });
3270 };
3271 var handlePopoverClose = function handlePopoverClose() {
3272 setShowTerms(false);
3273 };
3274 var isEnrolled = !!(state !== null && state !== void 0 && (_state$features = state.features) !== null && _state$features !== void 0 && _state$features.editor_v4);
3275 return /*#__PURE__*/ react.default.createElement(_elementor_ui.Container, {
3276 maxWidth: "xl",
3277 sx: {
3278 marginBlockStart: 2.5,
3279 display: "flex",
3280 flexBasis: "100%",
3281 gap: 3,
3282 flexDirection: {
3283 xs: "column-reverse",
3284 md: "row"
3285 }
3286 }
3287 }, /*#__PURE__*/ react.default.createElement(_elementor_ui.Stack, { sx: {
3288 flex: 1,
3289 maxWidth: {
3290 md: "580px",
3291 sm: "600px"
3292 },
3293 gap: 2.5,
3294 mx: "auto"
3295 } }, /*#__PURE__*/ react.default.createElement(TextNode, {
3296 variant: "h4",
3297 width: "fit-content"
3298 }, /*#__PURE__*/ react.default.createElement("span", null, i18n.title)), /*#__PURE__*/ react.default.createElement(_elementor_ui.Stack, {
3299 direction: "column",
3300 gap: 1
3301 }, /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, null, /*#__PURE__*/ react.default.createElement(TextNode, null, i18n.welcomeText)), /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, null, /*#__PURE__*/ react.default.createElement(AdvantagesList, { sx: { gap: .5 } }, i18n.advantages.map(function(entry, i) {
3302 return /*#__PURE__*/ react.default.createElement(AdvantagesListItem, { key: i }, /*#__PURE__*/ react.default.createElement("b", null, entry[0]), " - ", entry[1]);
3303 }), /*#__PURE__*/ react.default.createElement(AdvantagesListItem, { key: i18n.advantages.length }, i18n.andMore, " ", /*#__PURE__*/ react.default.createElement(_elementor_ui.Link, {
3304 color: "text.primary",
3305 href: optInLinks.readMoreUrl,
3306 target: "_blank"
3307 }, i18n.readMore))))), /*#__PURE__*/ react.default.createElement(_elementor_ui.Stack, {
3308 direction: "column",
3309 width: "clamp(240px, max(340px, 75%), 340px)",
3310 maxWidth: "100%",
3311 gap: 2
3312 }, !isEnrolled ? /*#__PURE__*/ react.default.createElement(_elementor_ui.Button, {
3313 onClick: function onClick() {
3314 setShowTerms(true);
3315 },
3316 size: "large",
3317 color: "primary",
3318 variant: "contained",
3319 sx: { flexGrow: 1 }
3320 }, i18n.buttons.optIn) : /*#__PURE__*/ react.default.createElement(_elementor_ui.Button, {
3321 onClick: function onClick() {
3322 return window.location.href = optInLinks.tryOutUrl;
3323 },
3324 size: "large",
3325 color: "primary",
3326 variant: "contained",
3327 sx: { flexGrow: 1 }
3328 }, i18n.buttons.tryOut), /*#__PURE__*/ react.default.createElement(_elementor_ui.Button, {
3329 onClick: function onClick() {
3330 setShowTerms(true);
3331 },
3332 size: "large",
3333 color: "secondary",
3334 variant: "outlined",
3335 sx: {
3336 flexGrow: 1,
3337 visibility: isEnrolled ? "visible" : "hidden"
3338 }
3339 }, i18n.buttons.optOut)), /*#__PURE__*/ react.default.createElement(TextNode, null, i18n.feedback, " ", /*#__PURE__*/ react.default.createElement(_elementor_ui.Link, {
3340 underline: "hover",
3341 href: optInLinks.feedbackUrl,
3342 target: "_blank"
3343 }, i18n.overToGithub))), /*#__PURE__*/ react.default.createElement(_elementor_ui.Stack, { sx: {
3344 flex: 1,
3345 px: 0,
3346 maxWidth: {
3347 md: "507px",
3348 sm: "600px"
3349 },
3350 mx: "auto"
3351 } }, optInImages.square.src ? /*#__PURE__*/ react.default.createElement(_elementor_ui.Image, {
3352 src: optInImages.square.src,
3353 alt: i18n.image,
3354 sx: _objectSpread(_objectSpread({}, optInImages.square.sx), {}, { display: {
3355 xs: "none",
3356 md: "block"
3357 } })
3358 }) : /*#__PURE__*/ react.default.createElement(ImageSquarePlaceholder, { sx: _objectSpread(_objectSpread({}, optInImages.square.sx), {}, { display: {
3359 xs: "none",
3360 md: "block"
3361 } }) }), optInImages.landscape.src ? /*#__PURE__*/ react.default.createElement(_elementor_ui.Image, {
3362 src: optInImages.landscape.src,
3363 alt: i18n.image,
3364 sx: _objectSpread(_objectSpread({}, optInImages.landscape.sx), {}, { display: {
3365 xs: "block",
3366 md: "none"
3367 } })
3368 }) : /*#__PURE__*/ react.default.createElement(ImageLandscapePlaceholder, { sx: _objectSpread(_objectSpread({}, optInImages.landscape.sx), {}, { display: {
3369 xs: "block",
3370 md: "none"
3371 } }) })), showTerms && /*#__PURE__*/ react.default.createElement(Terms, {
3372 onClose: handlePopoverClose,
3373 onSubmit: isEnrolled ? maybeOptOut : maybeOptIn,
3374 isEnrolled
3375 }), optInMessage && /*#__PURE__*/ react.default.createElement(Message, {
3376 onClose: function onClose() {
3377 return setOptInMessage("");
3378 },
3379 action: /*#__PURE__*/ react.default.createElement(_elementor_ui.Link, {
3380 href: optInLinks.tryOutUrl,
3381 color: "#FFFFFF",
3382 sx: {
3383 cursor: "pointer",
3384 textDecoration: "none",
3385 pl: 3
3386 }
3387 }, i18n.buttons.tryOut)
3388 }, optInMessage), optOutMessage && /*#__PURE__*/ react.default.createElement(Message, {
3389 onClose: function onClose() {
3390 return setOptOutMessage("");
3391 },
3392 action: /*#__PURE__*/ react.default.createElement(_elementor_ui.Link, {
3393 href: optInLinks.feedbackUrl,
3394 target: "_blank",
3395 color: "#FFFFFF",
3396 sx: {
3397 cursor: "pointer",
3398 textDecoration: "none",
3399 pl: 3
3400 }
3401 }, i18n.tellUsWhy)
3402 }, optOutMessage), errorMessage && /*#__PURE__*/ react.default.createElement(Message, {
3403 severity: "error",
3404 onClose: function onClose() {
3405 return setErrorMessage("");
3406 }
3407 }, errorMessage));
3408 };
3409 OptIn.propTypes = { state: import_prop_types.default.shape({ features: import_prop_types.default.shape({ editor_v4: import_prop_types.default.bool }) }).isRequired };
3410
3411 //#endregion
3412 //#region modules/atomic-opt-in/assets/js/opt-in-page/app.js
3413 var App = function App(props) {
3414 return /*#__PURE__*/ react.default.createElement(_elementor_ui.DirectionProvider, { rtl: props.isRTL }, /*#__PURE__*/ react.default.createElement(_elementor_ui.LocalizationProvider, null, /*#__PURE__*/ react.default.createElement(_elementor_ui.ThemeProvider, { colorScheme: "light" }, /*#__PURE__*/ react.default.createElement(OptIn, { state: props === null || props === void 0 ? void 0 : props.state }))));
3415 };
3416 App.propTypes = {
3417 isRTL: import_prop_types.default.bool,
3418 state: import_prop_types.default.object
3419 };
3420 (function init() {
3421 var rootElement = document.querySelector("#page-editor-v4-opt-in");
3422 if (!rootElement) return;
3423 react_default.render(/*#__PURE__*/ react.default.createElement(App, {
3424 isRTL: !!elementorCommon.config.isRTL,
3425 state: elementorSettingsEditor4OptIn
3426 }), rootElement);
3427 })();
3428
3429 //#endregion
3430 })(React, ReactDOM, elementorV2.ui, wp.i18n, elementorV2.icons, elementorV2.ui['DialogHeaderGroup'], elementorV2.ui['DialogHeader']);
3431 //# sourceMappingURL=editor-v4-opt-in.js.map