PluginProbe
Elementor Website Builder – more than just a page builder / 3.30.0-beta1
Elementor Website Builder – more than just a page builder v3.30.0-beta1
4.3.4 4.3.3 4.3.2 4.3.1 4.3.0 4.3.0-beta3 4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 All 457 releases
elementor / assets / js / editor-v4-opt-in-alphachip.js

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

1,639 lines 58.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /*! elementor - v3.30.0 - 10-06-2025 */
2 /******/ (() => { // webpackBootstrap
3 /******/ var __webpack_modules__ = ({
4
5 /***/ "../modules/atomic-opt-in/assets/js/panel-chip/app-manager.js":
6 /*!********************************************************************!*\
7 !*** ../modules/atomic-opt-in/assets/js/panel-chip/app-manager.js ***!
8 \********************************************************************/
9 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
10
11 "use strict";
12
13
14 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
15 Object.defineProperty(exports, "__esModule", ({
16 value: true
17 }));
18 exports.AppManager = void 0;
19 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
20 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
21 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
22 var _app = _interopRequireDefault(__webpack_require__(/*! ./app */ "../modules/atomic-opt-in/assets/js/panel-chip/app.js"));
23 var _client = __webpack_require__(/*! react-dom/client */ "../node_modules/react-dom/client.js");
24 var AppManager = exports.AppManager = /*#__PURE__*/function () {
25 function AppManager() {
26 (0, _classCallCheck2.default)(this, AppManager);
27 this.popover = null;
28 this.onRoute = function () {};
29 this.unbindIframeEvents = function () {};
30 }
31 return (0, _createClass2.default)(AppManager, [{
32 key: "mount",
33 value: function mount(targetNode, selectors) {
34 var _elementor,
35 _elementor$getPrefere,
36 _this = this;
37 if (this.popover) {
38 return;
39 }
40 var wrapperElement = targetNode === null || targetNode === void 0 ? void 0 : targetNode.closest(selectors.wrapperElement);
41 var rootElement = wrapperElement === null || wrapperElement === void 0 ? void 0 : wrapperElement.querySelector(selectors.reactAnchor);
42 if (!rootElement) {
43 return;
44 }
45 this.attachEditorEventListeners();
46 this.popover = (0, _client.createRoot)(rootElement);
47 var colorScheme = ((_elementor = elementor) === null || _elementor === void 0 || (_elementor$getPrefere = _elementor.getPreferences) === null || _elementor$getPrefere === void 0 ? void 0 : _elementor$getPrefere.call(_elementor, 'ui_theme')) || 'auto';
48 var isRTL = elementorCommon.config.isRTL;
49 this.popover.render(/*#__PURE__*/_react.default.createElement(_app.default, {
50 colorScheme: colorScheme,
51 isRTL: isRTL,
52 onClose: function onClose() {
53 return _this.unmount();
54 }
55 }));
56 }
57 }, {
58 key: "unmount",
59 value: function unmount() {
60 if (this.popover) {
61 this.detachEditorEventListeners();
62 this.popover.unmount();
63 this.unbindIframeEvents();
64 }
65 this.popover = null;
66 }
67 }, {
68 key: "setupIframeEventListeners",
69 value: function setupIframeEventListeners() {
70 var _this2 = this;
71 var previewIframe = document.getElementById('elementor-preview-iframe');
72 if (previewIframe) {
73 var iframeDocument = previewIframe.contentWindow.document;
74 var handleClick = function handleClick() {
75 return _this2.unmount();
76 };
77 iframeDocument.addEventListener('click', handleClick);
78 iframeDocument.addEventListener('keydown', handleClick);
79 this.unbindIframeEvents = function () {
80 iframeDocument.removeEventListener('click', handleClick);
81 iframeDocument.removeEventListener('keydown', handleClick);
82 };
83 }
84 }
85 }, {
86 key: "setupRouteListener",
87 value: function setupRouteListener() {
88 var _this3 = this;
89 this.onRoute = function (component, route) {
90 if (route !== 'panel/elements/categories' && route !== 'panel/editor/content') {
91 return;
92 }
93 _this3.unmount();
94 };
95 $e.routes.on('run:after', this.onRoute);
96 }
97 }, {
98 key: "attachEditorEventListeners",
99 value: function attachEditorEventListeners() {
100 this.setupIframeEventListeners();
101 this.setupRouteListener();
102 }
103 }, {
104 key: "detachEditorEventListeners",
105 value: function detachEditorEventListeners() {
106 $e.routes.off('run:after', this.onRoute);
107 }
108 }]);
109 }();
110
111 /***/ }),
112
113 /***/ "../modules/atomic-opt-in/assets/js/panel-chip/app.js":
114 /*!************************************************************!*\
115 !*** ../modules/atomic-opt-in/assets/js/panel-chip/app.js ***!
116 \************************************************************/
117 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
118
119 "use strict";
120 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
121
122
123 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
124 Object.defineProperty(exports, "__esModule", ({
125 value: true
126 }));
127 exports["default"] = void 0;
128 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
129 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
130 var _popoverCard = _interopRequireDefault(__webpack_require__(/*! ./components/popover-card */ "../modules/atomic-opt-in/assets/js/panel-chip/components/popover-card.js"));
131 var App = function App(props) {
132 return /*#__PURE__*/_react.default.createElement(_ui.DirectionProvider, {
133 rtl: props.isRTL
134 }, /*#__PURE__*/_react.default.createElement(_ui.LocalizationProvider, null, /*#__PURE__*/_react.default.createElement(_ui.ThemeProvider, {
135 colorScheme: props.colorScheme,
136 palette: "unstable"
137 }, /*#__PURE__*/_react.default.createElement(_ui.Infotip, {
138 content: /*#__PURE__*/_react.default.createElement(_popoverCard.default, {
139 doClose: props.onClose
140 }),
141 placement: "right",
142 arrow: true,
143 open: true,
144 disableHoverListener: true,
145 PopperProps: {
146 modifiers: [{
147 name: 'offset',
148 options: {
149 offset: [-24, 8]
150 }
151 }]
152 }
153 }, /*#__PURE__*/_react.default.createElement("span", null)))));
154 };
155 App.propTypes = {
156 colorScheme: PropTypes.oneOf(['auto', 'light', 'dark']),
157 isRTL: PropTypes.bool,
158 onClose: PropTypes.func.isRequired
159 };
160 var _default = exports["default"] = App;
161
162 /***/ }),
163
164 /***/ "../modules/atomic-opt-in/assets/js/panel-chip/components/popover-card.js":
165 /*!********************************************************************************!*\
166 !*** ../modules/atomic-opt-in/assets/js/panel-chip/components/popover-card.js ***!
167 \********************************************************************************/
168 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
169
170 "use strict";
171 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
172
173
174 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
175 Object.defineProperty(exports, "__esModule", ({
176 value: true
177 }));
178 exports["default"] = void 0;
179 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
180 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
181 var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
182 var popoverData = {
183 image: 'https://assets.elementor.com/v4-promotion/v1/images/v4_chip.png',
184 image_alt: (0, _i18n.__)('Elementor V4', 'elementor'),
185 title: (0, _i18n.__)('Elementor V4', 'elementor'),
186 description: [(0, _i18n.__)('You’ve got powerful new tools with Editor V4. But, keep in mind that this is an early release, so don’t use it on live sites yet.', 'elementor')],
187 upgrade_text: (0, _i18n.__)('Learn more', 'elementor'),
188 upgrade_url: 'https://go.elementor.com/wp-dash-opt-in-v4-help-center/'
189 };
190 var PopoverCard = function PopoverCard(_ref) {
191 var doClose = _ref.doClose;
192 var title = popoverData === null || popoverData === void 0 ? void 0 : popoverData.title,
193 description = popoverData === null || popoverData === void 0 ? void 0 : popoverData.description,
194 imgSrc = popoverData === null || popoverData === void 0 ? void 0 : popoverData.image,
195 imgAlt = popoverData === null || popoverData === void 0 ? void 0 : popoverData.image_alt,
196 ctaText = popoverData === null || popoverData === void 0 ? void 0 : popoverData.upgrade_text,
197 ctaUrl = popoverData === null || popoverData === void 0 ? void 0 : popoverData.upgrade_url;
198 var redirectHandler = function redirectHandler() {
199 window.open(ctaUrl, '_blank');
200 return doClose();
201 };
202 return /*#__PURE__*/_react.default.createElement(_ui.ClickAwayListener, {
203 disableReactTree: true,
204 mouseEvent: "onMouseDown",
205 touchEvent: "onTouchStart",
206 onClickAway: doClose
207 }, /*#__PURE__*/_react.default.createElement(_ui.Box, {
208 sx: {
209 width: 296
210 },
211 "data-testid": "e-popover-card"
212 }, /*#__PURE__*/_react.default.createElement(_ui.Stack, {
213 direction: "row",
214 alignItems: "center",
215 py: 1,
216 px: 2
217 }, /*#__PURE__*/_react.default.createElement(_ui.Typography, {
218 variant: "subtitle2"
219 }, title), /*#__PURE__*/_react.default.createElement(_ui.CloseButton, {
220 edge: "end",
221 sx: {
222 ml: 'auto'
223 },
224 slotProps: {
225 icon: {
226 fontSize: 'small'
227 }
228 },
229 onClick: doClose
230 })), /*#__PURE__*/_react.default.createElement(_ui.Image, {
231 src: imgSrc,
232 alt: imgAlt,
233 sx: {
234 height: 150,
235 width: '100%'
236 }
237 }), /*#__PURE__*/_react.default.createElement(_ui.Stack, {
238 px: 2
239 }, 1 === description.length ? /*#__PURE__*/_react.default.createElement(_ui.Typography, {
240 variant: "body2",
241 color: "secondary",
242 sx: {
243 pt: 1.5,
244 pb: 1
245 }
246 }, description[0]) : /*#__PURE__*/_react.default.createElement(_ui.List, {
247 sx: {
248 pl: 2
249 }
250 }, description.map(function (text, index) {
251 return /*#__PURE__*/_react.default.createElement(_ui.ListItem, {
252 key: index,
253 sx: {
254 listStyle: 'disc',
255 display: 'list-item',
256 color: 'text.secondary',
257 p: 0
258 }
259 }, /*#__PURE__*/_react.default.createElement(_ui.Typography, {
260 variant: "body2",
261 color: "secondary"
262 }, text));
263 }))), /*#__PURE__*/_react.default.createElement(_ui.Stack, {
264 pt: 1,
265 pb: 1.5,
266 px: 2
267 }, /*#__PURE__*/_react.default.createElement(_ui.Button, {
268 variant: "contained",
269 size: "small",
270 color: "accent",
271 onClick: redirectHandler,
272 sx: {
273 ml: 'auto'
274 }
275 }, ctaText))));
276 };
277 PopoverCard.propTypes = {
278 doClose: PropTypes.func
279 };
280 var _default = exports["default"] = PopoverCard;
281
282 /***/ }),
283
284 /***/ "../node_modules/object-assign/index.js":
285 /*!**********************************************!*\
286 !*** ../node_modules/object-assign/index.js ***!
287 \**********************************************/
288 /***/ ((module) => {
289
290 "use strict";
291 /*
292 object-assign
293 (c) Sindre Sorhus
294 @license MIT
295 */
296
297
298 /* eslint-disable no-unused-vars */
299 var getOwnPropertySymbols = Object.getOwnPropertySymbols;
300 var hasOwnProperty = Object.prototype.hasOwnProperty;
301 var propIsEnumerable = Object.prototype.propertyIsEnumerable;
302
303 function toObject(val) {
304 if (val === null || val === undefined) {
305 throw new TypeError('Object.assign cannot be called with null or undefined');
306 }
307
308 return Object(val);
309 }
310
311 function shouldUseNative() {
312 try {
313 if (!Object.assign) {
314 return false;
315 }
316
317 // Detect buggy property enumeration order in older V8 versions.
318
319 // https://bugs.chromium.org/p/v8/issues/detail?id=4118
320 var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
321 test1[5] = 'de';
322 if (Object.getOwnPropertyNames(test1)[0] === '5') {
323 return false;
324 }
325
326 // https://bugs.chromium.org/p/v8/issues/detail?id=3056
327 var test2 = {};
328 for (var i = 0; i < 10; i++) {
329 test2['_' + String.fromCharCode(i)] = i;
330 }
331 var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
332 return test2[n];
333 });
334 if (order2.join('') !== '0123456789') {
335 return false;
336 }
337
338 // https://bugs.chromium.org/p/v8/issues/detail?id=3056
339 var test3 = {};
340 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
341 test3[letter] = letter;
342 });
343 if (Object.keys(Object.assign({}, test3)).join('') !==
344 'abcdefghijklmnopqrst') {
345 return false;
346 }
347
348 return true;
349 } catch (err) {
350 // We don't expect any of the above to throw, but better to be safe.
351 return false;
352 }
353 }
354
355 module.exports = shouldUseNative() ? Object.assign : function (target, source) {
356 var from;
357 var to = toObject(target);
358 var symbols;
359
360 for (var s = 1; s < arguments.length; s++) {
361 from = Object(arguments[s]);
362
363 for (var key in from) {
364 if (hasOwnProperty.call(from, key)) {
365 to[key] = from[key];
366 }
367 }
368
369 if (getOwnPropertySymbols) {
370 symbols = getOwnPropertySymbols(from);
371 for (var i = 0; i < symbols.length; i++) {
372 if (propIsEnumerable.call(from, symbols[i])) {
373 to[symbols[i]] = from[symbols[i]];
374 }
375 }
376 }
377 }
378
379 return to;
380 };
381
382
383 /***/ }),
384
385 /***/ "../node_modules/prop-types/checkPropTypes.js":
386 /*!****************************************************!*\
387 !*** ../node_modules/prop-types/checkPropTypes.js ***!
388 \****************************************************/
389 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
390
391 "use strict";
392 /**
393 * Copyright (c) 2013-present, Facebook, Inc.
394 *
395 * This source code is licensed under the MIT license found in the
396 * LICENSE file in the root directory of this source tree.
397 */
398
399
400
401 var printWarning = function() {};
402
403 if (true) {
404 var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "../node_modules/prop-types/lib/ReactPropTypesSecret.js");
405 var loggedTypeFailures = {};
406 var has = __webpack_require__(/*! ./lib/has */ "../node_modules/prop-types/lib/has.js");
407
408 printWarning = function(text) {
409 var message = 'Warning: ' + text;
410 if (typeof console !== 'undefined') {
411 console.error(message);
412 }
413 try {
414 // --- Welcome to debugging React ---
415 // This error was thrown as a convenience so that you can use this stack
416 // to find the callsite that caused this warning to fire.
417 throw new Error(message);
418 } catch (x) { /**/ }
419 };
420 }
421
422 /**
423 * Assert that the values match with the type specs.
424 * Error messages are memorized and will only be shown once.
425 *
426 * @param {object} typeSpecs Map of name to a ReactPropType
427 * @param {object} values Runtime values that need to be type-checked
428 * @param {string} location e.g. "prop", "context", "child context"
429 * @param {string} componentName Name of the component for error messages.
430 * @param {?Function} getStack Returns the component stack.
431 * @private
432 */
433 function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
434 if (true) {
435 for (var typeSpecName in typeSpecs) {
436 if (has(typeSpecs, typeSpecName)) {
437 var error;
438 // Prop type validation may throw. In case they do, we don't want to
439 // fail the render phase where it didn't fail before. So we log it.
440 // After these have been cleaned up, we'll let them throw.
441 try {
442 // This is intentionally an invariant that gets caught. It's the same
443 // behavior as without this statement except with a better message.
444 if (typeof typeSpecs[typeSpecName] !== 'function') {
445 var err = Error(
446 (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
447 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
448 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
449 );
450 err.name = 'Invariant Violation';
451 throw err;
452 }
453 error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
454 } catch (ex) {
455 error = ex;
456 }
457 if (error && !(error instanceof Error)) {
458 printWarning(
459 (componentName || 'React class') + ': type specification of ' +
460 location + ' `' + typeSpecName + '` is invalid; the type checker ' +
461 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
462 'You may have forgotten to pass an argument to the type checker ' +
463 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
464 'shape all require an argument).'
465 );
466 }
467 if (error instanceof Error && !(error.message in loggedTypeFailures)) {
468 // Only monitor this failure once because there tends to be a lot of the
469 // same error.
470 loggedTypeFailures[error.message] = true;
471
472 var stack = getStack ? getStack() : '';
473
474 printWarning(
475 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
476 );
477 }
478 }
479 }
480 }
481 }
482
483 /**
484 * Resets warning cache when testing.
485 *
486 * @private
487 */
488 checkPropTypes.resetWarningCache = function() {
489 if (true) {
490 loggedTypeFailures = {};
491 }
492 }
493
494 module.exports = checkPropTypes;
495
496
497 /***/ }),
498
499 /***/ "../node_modules/prop-types/factoryWithTypeCheckers.js":
500 /*!*************************************************************!*\
501 !*** ../node_modules/prop-types/factoryWithTypeCheckers.js ***!
502 \*************************************************************/
503 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
504
505 "use strict";
506 /**
507 * Copyright (c) 2013-present, Facebook, Inc.
508 *
509 * This source code is licensed under the MIT license found in the
510 * LICENSE file in the root directory of this source tree.
511 */
512
513
514
515 var ReactIs = __webpack_require__(/*! react-is */ "../node_modules/prop-types/node_modules/react-is/index.js");
516 var assign = __webpack_require__(/*! object-assign */ "../node_modules/object-assign/index.js");
517
518 var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "../node_modules/prop-types/lib/ReactPropTypesSecret.js");
519 var has = __webpack_require__(/*! ./lib/has */ "../node_modules/prop-types/lib/has.js");
520 var checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ "../node_modules/prop-types/checkPropTypes.js");
521
522 var printWarning = function() {};
523
524 if (true) {
525 printWarning = function(text) {
526 var message = 'Warning: ' + text;
527 if (typeof console !== 'undefined') {
528 console.error(message);
529 }
530 try {
531 // --- Welcome to debugging React ---
532 // This error was thrown as a convenience so that you can use this stack
533 // to find the callsite that caused this warning to fire.
534 throw new Error(message);
535 } catch (x) {}
536 };
537 }
538
539 function emptyFunctionThatReturnsNull() {
540 return null;
541 }
542
543 module.exports = function(isValidElement, throwOnDirectAccess) {
544 /* global Symbol */
545 var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
546 var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
547
548 /**
549 * Returns the iterator method function contained on the iterable object.
550 *
551 * Be sure to invoke the function with the iterable as context:
552 *
553 * var iteratorFn = getIteratorFn(myIterable);
554 * if (iteratorFn) {
555 * var iterator = iteratorFn.call(myIterable);
556 * ...
557 * }
558 *
559 * @param {?object} maybeIterable
560 * @return {?function}
561 */
562 function getIteratorFn(maybeIterable) {
563 var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
564 if (typeof iteratorFn === 'function') {
565 return iteratorFn;
566 }
567 }
568
569 /**
570 * Collection of methods that allow declaration and validation of props that are
571 * supplied to React components. Example usage:
572 *
573 * var Props = require('ReactPropTypes');
574 * var MyArticle = React.createClass({
575 * propTypes: {
576 * // An optional string prop named "description".
577 * description: Props.string,
578 *
579 * // A required enum prop named "category".
580 * category: Props.oneOf(['News','Photos']).isRequired,
581 *
582 * // A prop named "dialog" that requires an instance of Dialog.
583 * dialog: Props.instanceOf(Dialog).isRequired
584 * },
585 * render: function() { ... }
586 * });
587 *
588 * A more formal specification of how these methods are used:
589 *
590 * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
591 * decl := ReactPropTypes.{type}(.isRequired)?
592 *
593 * Each and every declaration produces a function with the same signature. This
594 * allows the creation of custom validation functions. For example:
595 *
596 * var MyLink = React.createClass({
597 * propTypes: {
598 * // An optional string or URI prop named "href".
599 * href: function(props, propName, componentName) {
600 * var propValue = props[propName];
601 * if (propValue != null && typeof propValue !== 'string' &&
602 * !(propValue instanceof URI)) {
603 * return new Error(
604 * 'Expected a string or an URI for ' + propName + ' in ' +
605 * componentName
606 * );
607 * }
608 * }
609 * },
610 * render: function() {...}
611 * });
612 *
613 * @internal
614 */
615
616 var ANONYMOUS = '<<anonymous>>';
617
618 // Important!
619 // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
620 var ReactPropTypes = {
621 array: createPrimitiveTypeChecker('array'),
622 bigint: createPrimitiveTypeChecker('bigint'),
623 bool: createPrimitiveTypeChecker('boolean'),
624 func: createPrimitiveTypeChecker('function'),
625 number: createPrimitiveTypeChecker('number'),
626 object: createPrimitiveTypeChecker('object'),
627 string: createPrimitiveTypeChecker('string'),
628 symbol: createPrimitiveTypeChecker('symbol'),
629
630 any: createAnyTypeChecker(),
631 arrayOf: createArrayOfTypeChecker,
632 element: createElementTypeChecker(),
633 elementType: createElementTypeTypeChecker(),
634 instanceOf: createInstanceTypeChecker,
635 node: createNodeChecker(),
636 objectOf: createObjectOfTypeChecker,
637 oneOf: createEnumTypeChecker,
638 oneOfType: createUnionTypeChecker,
639 shape: createShapeTypeChecker,
640 exact: createStrictShapeTypeChecker,
641 };
642
643 /**
644 * inlined Object.is polyfill to avoid requiring consumers ship their own
645 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
646 */
647 /*eslint-disable no-self-compare*/
648 function is(x, y) {
649 // SameValue algorithm
650 if (x === y) {
651 // Steps 1-5, 7-10
652 // Steps 6.b-6.e: +0 != -0
653 return x !== 0 || 1 / x === 1 / y;
654 } else {
655 // Step 6.a: NaN == NaN
656 return x !== x && y !== y;
657 }
658 }
659 /*eslint-enable no-self-compare*/
660
661 /**
662 * We use an Error-like object for backward compatibility as people may call
663 * PropTypes directly and inspect their output. However, we don't use real
664 * Errors anymore. We don't inspect their stack anyway, and creating them
665 * is prohibitively expensive if they are created too often, such as what
666 * happens in oneOfType() for any type before the one that matched.
667 */
668 function PropTypeError(message, data) {
669 this.message = message;
670 this.data = data && typeof data === 'object' ? data: {};
671 this.stack = '';
672 }
673 // Make `instanceof Error` still work for returned errors.
674 PropTypeError.prototype = Error.prototype;
675
676 function createChainableTypeChecker(validate) {
677 if (true) {
678 var manualPropTypeCallCache = {};
679 var manualPropTypeWarningCount = 0;
680 }
681 function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
682 componentName = componentName || ANONYMOUS;
683 propFullName = propFullName || propName;
684
685 if (secret !== ReactPropTypesSecret) {
686 if (throwOnDirectAccess) {
687 // New behavior only for users of `prop-types` package
688 var err = new Error(
689 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
690 'Use `PropTypes.checkPropTypes()` to call them. ' +
691 'Read more at http://fb.me/use-check-prop-types'
692 );
693 err.name = 'Invariant Violation';
694 throw err;
695 } else if ( true && typeof console !== 'undefined') {
696 // Old behavior for people using React.PropTypes
697 var cacheKey = componentName + ':' + propName;
698 if (
699 !manualPropTypeCallCache[cacheKey] &&
700 // Avoid spamming the console because they are often not actionable except for lib authors
701 manualPropTypeWarningCount < 3
702 ) {
703 printWarning(
704 'You are manually calling a React.PropTypes validation ' +
705 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
706 'and will throw in the standalone `prop-types` package. ' +
707 'You may be seeing this warning due to a third-party PropTypes ' +
708 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
709 );
710 manualPropTypeCallCache[cacheKey] = true;
711 manualPropTypeWarningCount++;
712 }
713 }
714 }
715 if (props[propName] == null) {
716 if (isRequired) {
717 if (props[propName] === null) {
718 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
719 }
720 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
721 }
722 return null;
723 } else {
724 return validate(props, propName, componentName, location, propFullName);
725 }
726 }
727
728 var chainedCheckType = checkType.bind(null, false);
729 chainedCheckType.isRequired = checkType.bind(null, true);
730
731 return chainedCheckType;
732 }
733
734 function createPrimitiveTypeChecker(expectedType) {
735 function validate(props, propName, componentName, location, propFullName, secret) {
736 var propValue = props[propName];
737 var propType = getPropType(propValue);
738 if (propType !== expectedType) {
739 // `propValue` being instance of, say, date/regexp, pass the 'object'
740 // check, but we can offer a more precise error message here rather than
741 // 'of type `object`'.
742 var preciseType = getPreciseType(propValue);
743
744 return new PropTypeError(
745 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
746 {expectedType: expectedType}
747 );
748 }
749 return null;
750 }
751 return createChainableTypeChecker(validate);
752 }
753
754 function createAnyTypeChecker() {
755 return createChainableTypeChecker(emptyFunctionThatReturnsNull);
756 }
757
758 function createArrayOfTypeChecker(typeChecker) {
759 function validate(props, propName, componentName, location, propFullName) {
760 if (typeof typeChecker !== 'function') {
761 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
762 }
763 var propValue = props[propName];
764 if (!Array.isArray(propValue)) {
765 var propType = getPropType(propValue);
766 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
767 }
768 for (var i = 0; i < propValue.length; i++) {
769 var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
770 if (error instanceof Error) {
771 return error;
772 }
773 }
774 return null;
775 }
776 return createChainableTypeChecker(validate);
777 }
778
779 function createElementTypeChecker() {
780 function validate(props, propName, componentName, location, propFullName) {
781 var propValue = props[propName];
782 if (!isValidElement(propValue)) {
783 var propType = getPropType(propValue);
784 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
785 }
786 return null;
787 }
788 return createChainableTypeChecker(validate);
789 }
790
791 function createElementTypeTypeChecker() {
792 function validate(props, propName, componentName, location, propFullName) {
793 var propValue = props[propName];
794 if (!ReactIs.isValidElementType(propValue)) {
795 var propType = getPropType(propValue);
796 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
797 }
798 return null;
799 }
800 return createChainableTypeChecker(validate);
801 }
802
803 function createInstanceTypeChecker(expectedClass) {
804 function validate(props, propName, componentName, location, propFullName) {
805 if (!(props[propName] instanceof expectedClass)) {
806 var expectedClassName = expectedClass.name || ANONYMOUS;
807 var actualClassName = getClassName(props[propName]);
808 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
809 }
810 return null;
811 }
812 return createChainableTypeChecker(validate);
813 }
814
815 function createEnumTypeChecker(expectedValues) {
816 if (!Array.isArray(expectedValues)) {
817 if (true) {
818 if (arguments.length > 1) {
819 printWarning(
820 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
821 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
822 );
823 } else {
824 printWarning('Invalid argument supplied to oneOf, expected an array.');
825 }
826 }
827 return emptyFunctionThatReturnsNull;
828 }
829
830 function validate(props, propName, componentName, location, propFullName) {
831 var propValue = props[propName];
832 for (var i = 0; i < expectedValues.length; i++) {
833 if (is(propValue, expectedValues[i])) {
834 return null;
835 }
836 }
837
838 var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
839 var type = getPreciseType(value);
840 if (type === 'symbol') {
841 return String(value);
842 }
843 return value;
844 });
845 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
846 }
847 return createChainableTypeChecker(validate);
848 }
849
850 function createObjectOfTypeChecker(typeChecker) {
851 function validate(props, propName, componentName, location, propFullName) {
852 if (typeof typeChecker !== 'function') {
853 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
854 }
855 var propValue = props[propName];
856 var propType = getPropType(propValue);
857 if (propType !== 'object') {
858 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
859 }
860 for (var key in propValue) {
861 if (has(propValue, key)) {
862 var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
863 if (error instanceof Error) {
864 return error;
865 }
866 }
867 }
868 return null;
869 }
870 return createChainableTypeChecker(validate);
871 }
872
873 function createUnionTypeChecker(arrayOfTypeCheckers) {
874 if (!Array.isArray(arrayOfTypeCheckers)) {
875 true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : 0;
876 return emptyFunctionThatReturnsNull;
877 }
878
879 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
880 var checker = arrayOfTypeCheckers[i];
881 if (typeof checker !== 'function') {
882 printWarning(
883 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
884 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
885 );
886 return emptyFunctionThatReturnsNull;
887 }
888 }
889
890 function validate(props, propName, componentName, location, propFullName) {
891 var expectedTypes = [];
892 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
893 var checker = arrayOfTypeCheckers[i];
894 var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
895 if (checkerResult == null) {
896 return null;
897 }
898 if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
899 expectedTypes.push(checkerResult.data.expectedType);
900 }
901 }
902 var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
903 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
904 }
905 return createChainableTypeChecker(validate);
906 }
907
908 function createNodeChecker() {
909 function validate(props, propName, componentName, location, propFullName) {
910 if (!isNode(props[propName])) {
911 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
912 }
913 return null;
914 }
915 return createChainableTypeChecker(validate);
916 }
917
918 function invalidValidatorError(componentName, location, propFullName, key, type) {
919 return new PropTypeError(
920 (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
921 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
922 );
923 }
924
925 function createShapeTypeChecker(shapeTypes) {
926 function validate(props, propName, componentName, location, propFullName) {
927 var propValue = props[propName];
928 var propType = getPropType(propValue);
929 if (propType !== 'object') {
930 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
931 }
932 for (var key in shapeTypes) {
933 var checker = shapeTypes[key];
934 if (typeof checker !== 'function') {
935 return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
936 }
937 var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
938 if (error) {
939 return error;
940 }
941 }
942 return null;
943 }
944 return createChainableTypeChecker(validate);
945 }
946
947 function createStrictShapeTypeChecker(shapeTypes) {
948 function validate(props, propName, componentName, location, propFullName) {
949 var propValue = props[propName];
950 var propType = getPropType(propValue);
951 if (propType !== 'object') {
952 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
953 }
954 // We need to check all keys in case some are required but missing from props.
955 var allKeys = assign({}, props[propName], shapeTypes);
956 for (var key in allKeys) {
957 var checker = shapeTypes[key];
958 if (has(shapeTypes, key) && typeof checker !== 'function') {
959 return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
960 }
961 if (!checker) {
962 return new PropTypeError(
963 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
964 '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
965 '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
966 );
967 }
968 var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
969 if (error) {
970 return error;
971 }
972 }
973 return null;
974 }
975
976 return createChainableTypeChecker(validate);
977 }
978
979 function isNode(propValue) {
980 switch (typeof propValue) {
981 case 'number':
982 case 'string':
983 case 'undefined':
984 return true;
985 case 'boolean':
986 return !propValue;
987 case 'object':
988 if (Array.isArray(propValue)) {
989 return propValue.every(isNode);
990 }
991 if (propValue === null || isValidElement(propValue)) {
992 return true;
993 }
994
995 var iteratorFn = getIteratorFn(propValue);
996 if (iteratorFn) {
997 var iterator = iteratorFn.call(propValue);
998 var step;
999 if (iteratorFn !== propValue.entries) {
1000 while (!(step = iterator.next()).done) {
1001 if (!isNode(step.value)) {
1002 return false;
1003 }
1004 }
1005 } else {
1006 // Iterator will provide entry [k,v] tuples rather than values.
1007 while (!(step = iterator.next()).done) {
1008 var entry = step.value;
1009 if (entry) {
1010 if (!isNode(entry[1])) {
1011 return false;
1012 }
1013 }
1014 }
1015 }
1016 } else {
1017 return false;
1018 }
1019
1020 return true;
1021 default:
1022 return false;
1023 }
1024 }
1025
1026 function isSymbol(propType, propValue) {
1027 // Native Symbol.
1028 if (propType === 'symbol') {
1029 return true;
1030 }
1031
1032 // falsy value can't be a Symbol
1033 if (!propValue) {
1034 return false;
1035 }
1036
1037 // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
1038 if (propValue['@@toStringTag'] === 'Symbol') {
1039 return true;
1040 }
1041
1042 // Fallback for non-spec compliant Symbols which are polyfilled.
1043 if (typeof Symbol === 'function' && propValue instanceof Symbol) {
1044 return true;
1045 }
1046
1047 return false;
1048 }
1049
1050 // Equivalent of `typeof` but with special handling for array and regexp.
1051 function getPropType(propValue) {
1052 var propType = typeof propValue;
1053 if (Array.isArray(propValue)) {
1054 return 'array';
1055 }
1056 if (propValue instanceof RegExp) {
1057 // Old webkits (at least until Android 4.0) return 'function' rather than
1058 // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
1059 // passes PropTypes.object.
1060 return 'object';
1061 }
1062 if (isSymbol(propType, propValue)) {
1063 return 'symbol';
1064 }
1065 return propType;
1066 }
1067
1068 // This handles more types than `getPropType`. Only used for error messages.
1069 // See `createPrimitiveTypeChecker`.
1070 function getPreciseType(propValue) {
1071 if (typeof propValue === 'undefined' || propValue === null) {
1072 return '' + propValue;
1073 }
1074 var propType = getPropType(propValue);
1075 if (propType === 'object') {
1076 if (propValue instanceof Date) {
1077 return 'date';
1078 } else if (propValue instanceof RegExp) {
1079 return 'regexp';
1080 }
1081 }
1082 return propType;
1083 }
1084
1085 // Returns a string that is postfixed to a warning about an invalid type.
1086 // For example, "undefined" or "of type array"
1087 function getPostfixForTypeWarning(value) {
1088 var type = getPreciseType(value);
1089 switch (type) {
1090 case 'array':
1091 case 'object':
1092 return 'an ' + type;
1093 case 'boolean':
1094 case 'date':
1095 case 'regexp':
1096 return 'a ' + type;
1097 default:
1098 return type;
1099 }
1100 }
1101
1102 // Returns class name of the object, if any.
1103 function getClassName(propValue) {
1104 if (!propValue.constructor || !propValue.constructor.name) {
1105 return ANONYMOUS;
1106 }
1107 return propValue.constructor.name;
1108 }
1109
1110 ReactPropTypes.checkPropTypes = checkPropTypes;
1111 ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
1112 ReactPropTypes.PropTypes = ReactPropTypes;
1113
1114 return ReactPropTypes;
1115 };
1116
1117
1118 /***/ }),
1119
1120 /***/ "../node_modules/prop-types/index.js":
1121 /*!*******************************************!*\
1122 !*** ../node_modules/prop-types/index.js ***!
1123 \*******************************************/
1124 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1125
1126 /**
1127 * Copyright (c) 2013-present, Facebook, Inc.
1128 *
1129 * This source code is licensed under the MIT license found in the
1130 * LICENSE file in the root directory of this source tree.
1131 */
1132
1133 if (true) {
1134 var ReactIs = __webpack_require__(/*! react-is */ "../node_modules/prop-types/node_modules/react-is/index.js");
1135
1136 // By explicitly using `prop-types` you are opting into new development behavior.
1137 // http://fb.me/prop-types-in-prod
1138 var throwOnDirectAccess = true;
1139 module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "../node_modules/prop-types/factoryWithTypeCheckers.js")(ReactIs.isElement, throwOnDirectAccess);
1140 } else {}
1141
1142
1143 /***/ }),
1144
1145 /***/ "../node_modules/prop-types/lib/ReactPropTypesSecret.js":
1146 /*!**************************************************************!*\
1147 !*** ../node_modules/prop-types/lib/ReactPropTypesSecret.js ***!
1148 \**************************************************************/
1149 /***/ ((module) => {
1150
1151 "use strict";
1152 /**
1153 * Copyright (c) 2013-present, Facebook, Inc.
1154 *
1155 * This source code is licensed under the MIT license found in the
1156 * LICENSE file in the root directory of this source tree.
1157 */
1158
1159
1160
1161 var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
1162
1163 module.exports = ReactPropTypesSecret;
1164
1165
1166 /***/ }),
1167
1168 /***/ "../node_modules/prop-types/lib/has.js":
1169 /*!*********************************************!*\
1170 !*** ../node_modules/prop-types/lib/has.js ***!
1171 \*********************************************/
1172 /***/ ((module) => {
1173
1174 module.exports = Function.call.bind(Object.prototype.hasOwnProperty);
1175
1176
1177 /***/ }),
1178
1179 /***/ "../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js":
1180 /*!************************************************************************************!*\
1181 !*** ../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js ***!
1182 \************************************************************************************/
1183 /***/ ((__unused_webpack_module, exports) => {
1184
1185 "use strict";
1186 /** @license React v16.13.1
1187 * react-is.development.js
1188 *
1189 * Copyright (c) Facebook, Inc. and its affiliates.
1190 *
1191 * This source code is licensed under the MIT license found in the
1192 * LICENSE file in the root directory of this source tree.
1193 */
1194
1195
1196
1197
1198
1199 if (true) {
1200 (function() {
1201 'use strict';
1202
1203 // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
1204 // nor polyfill, then a plain number is used for performance.
1205 var hasSymbol = typeof Symbol === 'function' && Symbol.for;
1206 var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
1207 var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
1208 var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
1209 var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
1210 var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
1211 var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
1212 var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
1213 // (unstable) APIs that have been removed. Can we remove the symbols?
1214
1215 var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
1216 var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
1217 var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
1218 var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
1219 var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
1220 var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
1221 var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
1222 var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
1223 var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
1224 var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
1225 var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
1226
1227 function isValidElementType(type) {
1228 return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
1229 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);
1230 }
1231
1232 function typeOf(object) {
1233 if (typeof object === 'object' && object !== null) {
1234 var $$typeof = object.$$typeof;
1235
1236 switch ($$typeof) {
1237 case REACT_ELEMENT_TYPE:
1238 var type = object.type;
1239
1240 switch (type) {
1241 case REACT_ASYNC_MODE_TYPE:
1242 case REACT_CONCURRENT_MODE_TYPE:
1243 case REACT_FRAGMENT_TYPE:
1244 case REACT_PROFILER_TYPE:
1245 case REACT_STRICT_MODE_TYPE:
1246 case REACT_SUSPENSE_TYPE:
1247 return type;
1248
1249 default:
1250 var $$typeofType = type && type.$$typeof;
1251
1252 switch ($$typeofType) {
1253 case REACT_CONTEXT_TYPE:
1254 case REACT_FORWARD_REF_TYPE:
1255 case REACT_LAZY_TYPE:
1256 case REACT_MEMO_TYPE:
1257 case REACT_PROVIDER_TYPE:
1258 return $$typeofType;
1259
1260 default:
1261 return $$typeof;
1262 }
1263
1264 }
1265
1266 case REACT_PORTAL_TYPE:
1267 return $$typeof;
1268 }
1269 }
1270
1271 return undefined;
1272 } // AsyncMode is deprecated along with isAsyncMode
1273
1274 var AsyncMode = REACT_ASYNC_MODE_TYPE;
1275 var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
1276 var ContextConsumer = REACT_CONTEXT_TYPE;
1277 var ContextProvider = REACT_PROVIDER_TYPE;
1278 var Element = REACT_ELEMENT_TYPE;
1279 var ForwardRef = REACT_FORWARD_REF_TYPE;
1280 var Fragment = REACT_FRAGMENT_TYPE;
1281 var Lazy = REACT_LAZY_TYPE;
1282 var Memo = REACT_MEMO_TYPE;
1283 var Portal = REACT_PORTAL_TYPE;
1284 var Profiler = REACT_PROFILER_TYPE;
1285 var StrictMode = REACT_STRICT_MODE_TYPE;
1286 var Suspense = REACT_SUSPENSE_TYPE;
1287 var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
1288
1289 function isAsyncMode(object) {
1290 {
1291 if (!hasWarnedAboutDeprecatedIsAsyncMode) {
1292 hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
1293
1294 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.');
1295 }
1296 }
1297
1298 return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
1299 }
1300 function isConcurrentMode(object) {
1301 return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
1302 }
1303 function isContextConsumer(object) {
1304 return typeOf(object) === REACT_CONTEXT_TYPE;
1305 }
1306 function isContextProvider(object) {
1307 return typeOf(object) === REACT_PROVIDER_TYPE;
1308 }
1309 function isElement(object) {
1310 return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
1311 }
1312 function isForwardRef(object) {
1313 return typeOf(object) === REACT_FORWARD_REF_TYPE;
1314 }
1315 function isFragment(object) {
1316 return typeOf(object) === REACT_FRAGMENT_TYPE;
1317 }
1318 function isLazy(object) {
1319 return typeOf(object) === REACT_LAZY_TYPE;
1320 }
1321 function isMemo(object) {
1322 return typeOf(object) === REACT_MEMO_TYPE;
1323 }
1324 function isPortal(object) {
1325 return typeOf(object) === REACT_PORTAL_TYPE;
1326 }
1327 function isProfiler(object) {
1328 return typeOf(object) === REACT_PROFILER_TYPE;
1329 }
1330 function isStrictMode(object) {
1331 return typeOf(object) === REACT_STRICT_MODE_TYPE;
1332 }
1333 function isSuspense(object) {
1334 return typeOf(object) === REACT_SUSPENSE_TYPE;
1335 }
1336
1337 exports.AsyncMode = AsyncMode;
1338 exports.ConcurrentMode = ConcurrentMode;
1339 exports.ContextConsumer = ContextConsumer;
1340 exports.ContextProvider = ContextProvider;
1341 exports.Element = Element;
1342 exports.ForwardRef = ForwardRef;
1343 exports.Fragment = Fragment;
1344 exports.Lazy = Lazy;
1345 exports.Memo = Memo;
1346 exports.Portal = Portal;
1347 exports.Profiler = Profiler;
1348 exports.StrictMode = StrictMode;
1349 exports.Suspense = Suspense;
1350 exports.isAsyncMode = isAsyncMode;
1351 exports.isConcurrentMode = isConcurrentMode;
1352 exports.isContextConsumer = isContextConsumer;
1353 exports.isContextProvider = isContextProvider;
1354 exports.isElement = isElement;
1355 exports.isForwardRef = isForwardRef;
1356 exports.isFragment = isFragment;
1357 exports.isLazy = isLazy;
1358 exports.isMemo = isMemo;
1359 exports.isPortal = isPortal;
1360 exports.isProfiler = isProfiler;
1361 exports.isStrictMode = isStrictMode;
1362 exports.isSuspense = isSuspense;
1363 exports.isValidElementType = isValidElementType;
1364 exports.typeOf = typeOf;
1365 })();
1366 }
1367
1368
1369 /***/ }),
1370
1371 /***/ "../node_modules/prop-types/node_modules/react-is/index.js":
1372 /*!*****************************************************************!*\
1373 !*** ../node_modules/prop-types/node_modules/react-is/index.js ***!
1374 \*****************************************************************/
1375 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1376
1377 "use strict";
1378
1379
1380 if (false) {} else {
1381 module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js");
1382 }
1383
1384
1385 /***/ }),
1386
1387 /***/ "../node_modules/react-dom/client.js":
1388 /*!*******************************************!*\
1389 !*** ../node_modules/react-dom/client.js ***!
1390 \*******************************************/
1391 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1392
1393 "use strict";
1394
1395
1396 var m = __webpack_require__(/*! react-dom */ "react-dom");
1397 if (false) {} else {
1398 var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
1399 exports.createRoot = function(c, o) {
1400 i.usingClientEntryPoint = true;
1401 try {
1402 return m.createRoot(c, o);
1403 } finally {
1404 i.usingClientEntryPoint = false;
1405 }
1406 };
1407 exports.hydrateRoot = function(c, h, o) {
1408 i.usingClientEntryPoint = true;
1409 try {
1410 return m.hydrateRoot(c, h, o);
1411 } finally {
1412 i.usingClientEntryPoint = false;
1413 }
1414 };
1415 }
1416
1417
1418 /***/ }),
1419
1420 /***/ "react":
1421 /*!************************!*\
1422 !*** external "React" ***!
1423 \************************/
1424 /***/ ((module) => {
1425
1426 "use strict";
1427 module.exports = React;
1428
1429 /***/ }),
1430
1431 /***/ "react-dom":
1432 /*!***************************!*\
1433 !*** external "ReactDOM" ***!
1434 \***************************/
1435 /***/ ((module) => {
1436
1437 "use strict";
1438 module.exports = ReactDOM;
1439
1440 /***/ }),
1441
1442 /***/ "@elementor/ui":
1443 /*!*********************************!*\
1444 !*** external "elementorV2.ui" ***!
1445 \*********************************/
1446 /***/ ((module) => {
1447
1448 "use strict";
1449 module.exports = elementorV2.ui;
1450
1451 /***/ }),
1452
1453 /***/ "@wordpress/i18n":
1454 /*!**************************!*\
1455 !*** external "wp.i18n" ***!
1456 \**************************/
1457 /***/ ((module) => {
1458
1459 "use strict";
1460 module.exports = wp.i18n;
1461
1462 /***/ }),
1463
1464 /***/ "../node_modules/@babel/runtime/helpers/classCallCheck.js":
1465 /*!****************************************************************!*\
1466 !*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***!
1467 \****************************************************************/
1468 /***/ ((module) => {
1469
1470 function _classCallCheck(a, n) {
1471 if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
1472 }
1473 module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
1474
1475 /***/ }),
1476
1477 /***/ "../node_modules/@babel/runtime/helpers/createClass.js":
1478 /*!*************************************************************!*\
1479 !*** ../node_modules/@babel/runtime/helpers/createClass.js ***!
1480 \*************************************************************/
1481 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1482
1483 var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js");
1484 function _defineProperties(e, r) {
1485 for (var t = 0; t < r.length; t++) {
1486 var o = r[t];
1487 o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o);
1488 }
1489 }
1490 function _createClass(e, r, t) {
1491 return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
1492 writable: !1
1493 }), e;
1494 }
1495 module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
1496
1497 /***/ }),
1498
1499 /***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js":
1500 /*!***********************************************************************!*\
1501 !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
1502 \***********************************************************************/
1503 /***/ ((module) => {
1504
1505 function _interopRequireDefault(e) {
1506 return e && e.__esModule ? e : {
1507 "default": e
1508 };
1509 }
1510 module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
1511
1512 /***/ }),
1513
1514 /***/ "../node_modules/@babel/runtime/helpers/toPrimitive.js":
1515 /*!*************************************************************!*\
1516 !*** ../node_modules/@babel/runtime/helpers/toPrimitive.js ***!
1517 \*************************************************************/
1518 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1519
1520 var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]);
1521 function toPrimitive(t, r) {
1522 if ("object" != _typeof(t) || !t) return t;
1523 var e = t[Symbol.toPrimitive];
1524 if (void 0 !== e) {
1525 var i = e.call(t, r || "default");
1526 if ("object" != _typeof(i)) return i;
1527 throw new TypeError("@@toPrimitive must return a primitive value.");
1528 }
1529 return ("string" === r ? String : Number)(t);
1530 }
1531 module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
1532
1533 /***/ }),
1534
1535 /***/ "../node_modules/@babel/runtime/helpers/toPropertyKey.js":
1536 /*!***************************************************************!*\
1537 !*** ../node_modules/@babel/runtime/helpers/toPropertyKey.js ***!
1538 \***************************************************************/
1539 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1540
1541 var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]);
1542 var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ "../node_modules/@babel/runtime/helpers/toPrimitive.js");
1543 function toPropertyKey(t) {
1544 var i = toPrimitive(t, "string");
1545 return "symbol" == _typeof(i) ? i : i + "";
1546 }
1547 module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
1548
1549 /***/ }),
1550
1551 /***/ "../node_modules/@babel/runtime/helpers/typeof.js":
1552 /*!********************************************************!*\
1553 !*** ../node_modules/@babel/runtime/helpers/typeof.js ***!
1554 \********************************************************/
1555 /***/ ((module) => {
1556
1557 function _typeof(o) {
1558 "@babel/helpers - typeof";
1559
1560 return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
1561 return typeof o;
1562 } : function (o) {
1563 return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
1564 }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o);
1565 }
1566 module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
1567
1568 /***/ })
1569
1570 /******/ });
1571 /************************************************************************/
1572 /******/ // The module cache
1573 /******/ var __webpack_module_cache__ = {};
1574 /******/
1575 /******/ // The require function
1576 /******/ function __webpack_require__(moduleId) {
1577 /******/ // Check if module is in cache
1578 /******/ var cachedModule = __webpack_module_cache__[moduleId];
1579 /******/ if (cachedModule !== undefined) {
1580 /******/ return cachedModule.exports;
1581 /******/ }
1582 /******/ // Create a new module (and put it into the cache)
1583 /******/ var module = __webpack_module_cache__[moduleId] = {
1584 /******/ // no module.id needed
1585 /******/ // no module.loaded needed
1586 /******/ exports: {}
1587 /******/ };
1588 /******/
1589 /******/ // Execute the module function
1590 /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
1591 /******/
1592 /******/ // Return the exports of the module
1593 /******/ return module.exports;
1594 /******/ }
1595 /******/
1596 /************************************************************************/
1597 var __webpack_exports__ = {};
1598 // This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
1599 (() => {
1600 "use strict";
1601 /*!*******************************************************************!*\
1602 !*** ../modules/atomic-opt-in/assets/js/panel-chip/panel-chip.js ***!
1603 \*******************************************************************/
1604
1605
1606 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1607 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
1608 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
1609 var _appManager = __webpack_require__(/*! ./app-manager */ "../modules/atomic-opt-in/assets/js/panel-chip/app-manager.js");
1610 var AlphaChipApp = /*#__PURE__*/function () {
1611 function AlphaChipApp() {
1612 (0, _classCallCheck2.default)(this, AlphaChipApp);
1613 this.appManager = new _appManager.AppManager();
1614 this.initializeListener();
1615 }
1616 return (0, _createClass2.default)(AlphaChipApp, [{
1617 key: "initializeListener",
1618 value: function initializeListener() {
1619 var _this = this;
1620 document.addEventListener('alphachip:open', function (event) {
1621 var targetElement = event.detail.target;
1622 var chipElement = targetElement === null || targetElement === void 0 ? void 0 : targetElement.find('.elementor-panel-heading-category-chip')[0];
1623 if (!chipElement) {
1624 return;
1625 }
1626 _this.appManager.mount(chipElement, {
1627 wrapperElement: '.elementor-panel-category-title',
1628 reactAnchor: '.e-promotion-react-wrapper'
1629 });
1630 });
1631 }
1632 }]);
1633 }();
1634 new AlphaChipApp();
1635 })();
1636
1637 /******/ })()
1638 ;
1639 //# sourceMappingURL=editor-v4-opt-in-alphachip.js.map