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.js

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

4,061 lines 164.8 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 /***/ "../assets/dev/js/utils/react.js":
6 /*!***************************************!*\
7 !*** ../assets/dev/js/utils/react.js ***!
8 \***************************************/
9 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
10
11 "use strict";
12
13
14 var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js");
15 Object.defineProperty(exports, "__esModule", ({
16 value: true
17 }));
18 exports["default"] = void 0;
19 var React = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
20 var ReactDOM = _interopRequireWildcard(__webpack_require__(/*! react-dom */ "react-dom"));
21 var _client = __webpack_require__(/*! react-dom/client */ "../node_modules/react-dom/client.js");
22 function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
23 function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
24 /**
25 * Support conditional rendering of a React App to the DOM, based on the React version.
26 * We use `createRoot` when available, but fallback to `ReactDOM.render` for older versions.
27 *
28 * @param { React.ReactElement } app The app to render.
29 * @param { HTMLElement } domElement The DOM element to render the app into.
30 *
31 * @return {{ unmount: () => void }} The unmount function.
32 */
33 function render(app, domElement) {
34 var unmountFunction;
35 try {
36 var root = (0, _client.createRoot)(domElement);
37 root.render(app);
38 unmountFunction = function unmountFunction() {
39 root.unmount();
40 };
41 } catch (e) {
42 // eslint-disable-next-line react/no-deprecated
43 ReactDOM.render(app, domElement);
44 unmountFunction = function unmountFunction() {
45 // eslint-disable-next-line react/no-deprecated
46 ReactDOM.unmountComponentAtNode(domElement);
47 };
48 }
49 return {
50 unmount: unmountFunction
51 };
52 }
53 var _default = exports["default"] = {
54 render: render
55 };
56
57 /***/ }),
58
59 /***/ "../modules/atomic-opt-in/assets/js/opt-in-page/opt-in-api.js":
60 /*!********************************************************************!*\
61 !*** ../modules/atomic-opt-in/assets/js/opt-in-page/opt-in-api.js ***!
62 \********************************************************************/
63 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
64
65 "use strict";
66
67
68 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
69 Object.defineProperty(exports, "__esModule", ({
70 value: true
71 }));
72 exports.triggerOptOut = exports.triggerOptIn = void 0;
73 var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js"));
74 var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js"));
75 var triggerOptIn = exports.triggerOptIn = /*#__PURE__*/function () {
76 var _ref = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
77 return _regenerator.default.wrap(function _callee$(_context) {
78 while (1) switch (_context.prev = _context.next) {
79 case 0:
80 return _context.abrupt("return", elementorCommon.ajax.addRequest('editor_v4_opt_in'));
81 case 1:
82 case "end":
83 return _context.stop();
84 }
85 }, _callee);
86 }));
87 return function triggerOptIn() {
88 return _ref.apply(this, arguments);
89 };
90 }();
91 var triggerOptOut = exports.triggerOptOut = /*#__PURE__*/function () {
92 var _ref2 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() {
93 return _regenerator.default.wrap(function _callee2$(_context2) {
94 while (1) switch (_context2.prev = _context2.next) {
95 case 0:
96 return _context2.abrupt("return", elementorCommon.ajax.addRequest('editor_v4_opt_out'));
97 case 1:
98 case "end":
99 return _context2.stop();
100 }
101 }, _callee2);
102 }));
103 return function triggerOptOut() {
104 return _ref2.apply(this, arguments);
105 };
106 }();
107
108 /***/ }),
109
110 /***/ "../modules/atomic-opt-in/assets/js/opt-in-page/opt-in-content.js":
111 /*!************************************************************************!*\
112 !*** ../modules/atomic-opt-in/assets/js/opt-in-page/opt-in-content.js ***!
113 \************************************************************************/
114 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
115
116 "use strict";
117 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
118
119
120 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
121 Object.defineProperty(exports, "__esModule", ({
122 value: true
123 }));
124 exports.TextNode = exports.ContentListItem = exports.ContentList = exports.AdvantagesListItem = exports.AdvantagesList = void 0;
125 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
126 var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "../node_modules/@babel/runtime/helpers/extends.js"));
127 var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "../node_modules/@babel/runtime/helpers/objectWithoutProperties.js"));
128 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
129 var _icons = __webpack_require__(/*! @elementor/icons */ "@elementor/icons");
130 var _excluded = ["children"],
131 _excluded2 = ["children"],
132 _excluded3 = ["children"],
133 _excluded4 = ["children"],
134 _excluded5 = ["children"];
135 var TextNode = exports.TextNode = function TextNode(_ref) {
136 var children = _ref.children,
137 props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
138 return /*#__PURE__*/_react.default.createElement(_ui.Typography, (0, _extends2.default)({
139 color: "text.primary"
140 }, props), children);
141 };
142 TextNode.propTypes = {
143 children: PropTypes.node
144 };
145 var ContentList = exports.ContentList = function ContentList(_ref2) {
146 var children = _ref2.children,
147 props = (0, _objectWithoutProperties2.default)(_ref2, _excluded2);
148 return /*#__PURE__*/_react.default.createElement(_ui.Box, (0, _extends2.default)({
149 component: "ul",
150 sx: {
151 my: 0
152 }
153 }, props), children);
154 };
155 ContentList.propTypes = {
156 children: PropTypes.node
157 };
158 var ContentListItem = exports.ContentListItem = function ContentListItem(_ref3) {
159 var children = _ref3.children,
160 props = (0, _objectWithoutProperties2.default)(_ref3, _excluded3);
161 return /*#__PURE__*/_react.default.createElement(TextNode, (0, _extends2.default)({
162 component: "li",
163 sx: {
164 listStyle: 'disc',
165 marginInlineStart: 3
166 }
167 }, props), children);
168 };
169 ContentListItem.propTypes = {
170 children: PropTypes.node
171 };
172 var AdvantagesList = exports.AdvantagesList = function AdvantagesList(_ref4) {
173 var children = _ref4.children,
174 props = (0, _objectWithoutProperties2.default)(_ref4, _excluded4);
175 return /*#__PURE__*/_react.default.createElement(_ui.Box, (0, _extends2.default)({
176 component: "ul",
177 sx: {
178 display: 'flex',
179 flexDirection: 'column',
180 gap: 0.5,
181 my: 0
182 }
183 }, props), children);
184 };
185 AdvantagesList.propTypes = {
186 children: PropTypes.node
187 };
188 var AdvantagesListItem = exports.AdvantagesListItem = function AdvantagesListItem(_ref5) {
189 var children = _ref5.children,
190 props = (0, _objectWithoutProperties2.default)(_ref5, _excluded5);
191 return /*#__PURE__*/_react.default.createElement(TextNode, (0, _extends2.default)({
192 component: "li",
193 sx: {
194 listStyle: 'none',
195 marginInlineStart: 0,
196 lineHeight: '150%',
197 display: 'flex',
198 alignItems: 'flex-start',
199 gap: 0.5
200 }
201 }, props), /*#__PURE__*/_react.default.createElement(_icons.CheckIcon, {
202 fontSize: "small"
203 }), children);
204 };
205 AdvantagesListItem.propTypes = {
206 children: PropTypes.node
207 };
208
209 /***/ }),
210
211 /***/ "../modules/atomic-opt-in/assets/js/opt-in-page/opt-in-img-placeholders.js":
212 /*!*********************************************************************************!*\
213 !*** ../modules/atomic-opt-in/assets/js/opt-in-page/opt-in-img-placeholders.js ***!
214 \*********************************************************************************/
215 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
216
217 "use strict";
218
219
220 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
221 Object.defineProperty(exports, "__esModule", ({
222 value: true
223 }));
224 exports.ImageSquarePlaceholder = exports.ImageLandscapePlaceholder = void 0;
225 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
226 var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "../node_modules/@babel/runtime/helpers/extends.js"));
227 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
228 var ImageLandscapePlaceholder = exports.ImageLandscapePlaceholder = function ImageLandscapePlaceholder(props) {
229 return /*#__PURE__*/_react.default.createElement(_ui.SvgIcon, (0, _extends2.default)({
230 viewBox: "0 0 600 260"
231 }, props), /*#__PURE__*/_react.default.createElement("rect", {
232 x: "0",
233 y: "0",
234 width: "600",
235 height: "260",
236 fill: "#d9d9d9"
237 }));
238 };
239 var ImageSquarePlaceholder = exports.ImageSquarePlaceholder = function ImageSquarePlaceholder(props) {
240 return /*#__PURE__*/_react.default.createElement(_ui.SvgIcon, (0, _extends2.default)({
241 viewBox: "0 0 500 500"
242 }, props), /*#__PURE__*/_react.default.createElement("rect", {
243 x: "0",
244 y: "0",
245 width: "500",
246 height: "500",
247 fill: "#d9d9d9"
248 }));
249 };
250
251 /***/ }),
252
253 /***/ "../modules/atomic-opt-in/assets/js/opt-in-page/opt-in-message.js":
254 /*!************************************************************************!*\
255 !*** ../modules/atomic-opt-in/assets/js/opt-in-page/opt-in-message.js ***!
256 \************************************************************************/
257 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
258
259 "use strict";
260 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
261
262
263 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
264 Object.defineProperty(exports, "__esModule", ({
265 value: true
266 }));
267 exports.Message = void 0;
268 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
269 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
270 var _icons = __webpack_require__(/*! @elementor/icons */ "@elementor/icons");
271 var Message = exports.Message = function Message(_ref) {
272 var action = _ref.action,
273 children = _ref.children,
274 _ref$severity = _ref.severity,
275 severity = _ref$severity === void 0 ? 'message' : _ref$severity,
276 onClose = _ref.onClose;
277 return /*#__PURE__*/_react.default.createElement(_ui.Snackbar, {
278 open: true,
279 autoHideDuration: 4000,
280 anchorOrigin: {
281 vertical: 'bottom',
282 horizontal: 'right'
283 },
284 onClose: onClose
285 }, 'message' !== severity ? /*#__PURE__*/_react.default.createElement(_ui.Alert, {
286 variant: "filled",
287 severity: severity,
288 onClose: onClose
289 }, children) : /*#__PURE__*/_react.default.createElement(_ui.SnackbarContent, {
290 message: /*#__PURE__*/_react.default.createElement(_ui.Stack, {
291 direction: "row",
292 gap: 1.5,
293 alignItems: "center"
294 }, /*#__PURE__*/_react.default.createElement(_icons.CircleCheckFilledIcon, null), children),
295 action: /*#__PURE__*/_react.default.createElement(_ui.Stack, {
296 direction: "row",
297 spacing: 1,
298 alignItems: "center"
299 }, action, /*#__PURE__*/_react.default.createElement(_ui.IconButton, {
300 color: "inherit",
301 size: "small",
302 onClick: onClose
303 }, /*#__PURE__*/_react.default.createElement(_icons.XIcon, {
304 fontSize: "small"
305 })))
306 }));
307 };
308 Message.propTypes = {
309 action: PropTypes.node,
310 children: PropTypes.node,
311 severity: PropTypes.oneOf(['message', 'success', 'warning', 'error']),
312 onClose: PropTypes.func
313 };
314
315 /***/ }),
316
317 /***/ "../modules/atomic-opt-in/assets/js/opt-in-page/opt-in-terms.js":
318 /*!**********************************************************************!*\
319 !*** ../modules/atomic-opt-in/assets/js/opt-in-page/opt-in-terms.js ***!
320 \**********************************************************************/
321 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
322
323 "use strict";
324 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
325
326
327 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
328 var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js");
329 Object.defineProperty(exports, "__esModule", ({
330 value: true
331 }));
332 exports.Terms = void 0;
333 var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "../node_modules/@babel/runtime/helpers/extends.js"));
334 var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
335 var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "../node_modules/@babel/runtime/helpers/objectWithoutProperties.js"));
336 var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
337 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
338 var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
339 var _optInContent = __webpack_require__(/*! ./opt-in-content */ "../modules/atomic-opt-in/assets/js/opt-in-page/opt-in-content.js");
340 var _DialogHeaderGroup = _interopRequireDefault(__webpack_require__(/*! @elementor/ui/DialogHeaderGroup */ "@elementor/ui/DialogHeaderGroup"));
341 var _DialogHeader = _interopRequireDefault(__webpack_require__(/*! @elementor/ui/DialogHeader */ "@elementor/ui/DialogHeader"));
342 var _excluded = ["onClose", "onSubmit", "isEnrolled"];
343 function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
344 function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
345 var i18n = {
346 header: (0, _i18n.__)('Editor V4', 'elementor'),
347 chip: (0, _i18n.__)('Alpha', 'elementor'),
348 checkboxText: (0, _i18n.__)('I’ve read and understood.', 'elementor'),
349 optIn: {
350 titleText: (0, _i18n.__)('You are about to enable Editor V4 features!', 'elementor'),
351 introText: (0, _i18n.__)('By activating, you’ll get early 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'),
352 notesHeader: (0, _i18n.__)(' Important notes:', 'elementor'),
353 notes: {
354 alphaPrefix: (0, _i18n.__)('Editor V4 is currently in alpha, ', 'elementor'),
355 details: [(0, _i18n.__)('and development is still in progress. Do not use it on live sites - use a staging or development environment instead.', 'elementor'), (0, _i18n.__)('When you activate Editor V4, you’ll also be activating Containers, the Top Bar, and Nested Elements. You can turn them back off by going to WP Admin > Elementor > Settings > Features.', 'elementor')]
356 },
357 activateButton: (0, _i18n.__)('Activate', 'elementor'),
358 cancelButton: (0, _i18n.__)('Cancel', 'elementor')
359 },
360 optOut: {
361 titleText: (0, _i18n.__)('You’re deactivating Editor V4', 'elementor'),
362 introText: (0, _i18n.__)('We hope you enjoyed testing and building with these new features.', 'elementor'),
363 notesHeader: (0, _i18n.__)('Keep in mind:', 'elementor'),
364 notes: {
365 details: [(0, _i18n.__)('By deactivating, you’ll lose all Editor V4 features, and any content you created with V4-specific features will no longer be available or appear on your site.', 'elementor'), (0, _i18n.__)('Containers, the Top Bar, and Nested Elements will stay in their current status.', 'elementor')]
366 },
367 activateButton: (0, _i18n.__)('Deactivate V4', 'elementor'),
368 cancelButton: (0, _i18n.__)('Cancel', 'elementor')
369 }
370 };
371 var Terms = exports.Terms = function Terms(_ref) {
372 var onClose = _ref.onClose,
373 onSubmit = _ref.onSubmit,
374 isEnrolled = _ref.isEnrolled,
375 props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
376 var _useState = (0, _react.useState)(false),
377 _useState2 = (0, _slicedToArray2.default)(_useState, 2),
378 checked = _useState2[0],
379 setChecked = _useState2[1];
380 var handleCheckboxChange = function handleCheckboxChange() {
381 setChecked(function (prev) {
382 return !prev;
383 });
384 };
385 var handleSubmit = function handleSubmit() {
386 if (checked) {
387 onSubmit();
388 }
389 };
390 var currentState = isEnrolled ? 'optOut' : 'optIn';
391 return /*#__PURE__*/_react.default.createElement(_ui.Dialog, (0, _extends2.default)({}, props, {
392 open: true,
393 onClose: onClose
394 }), /*#__PURE__*/_react.default.createElement(_DialogHeader.default, null, /*#__PURE__*/_react.default.createElement(_DialogHeaderGroup.default, null, /*#__PURE__*/_react.default.createElement(_ui.DialogTitle, null, i18n.header), /*#__PURE__*/_react.default.createElement(_ui.Chip, {
395 label: i18n.chip,
396 color: "secondary",
397 variant: "filled",
398 size: "small"
399 }))), /*#__PURE__*/_react.default.createElement(_ui.DialogContent, {
400 dividers: true
401 }, /*#__PURE__*/_react.default.createElement(_ui.Stack, {
402 gap: 2.5
403 }, /*#__PURE__*/_react.default.createElement(_ui.Stack, {
404 gap: 1
405 }, /*#__PURE__*/_react.default.createElement(_optInContent.TextNode, {
406 align: "center",
407 variant: "h6"
408 }, i18n[currentState].titleText), /*#__PURE__*/_react.default.createElement(_optInContent.TextNode, {
409 align: "center",
410 variant: "body2"
411 }, i18n[currentState].introText)), /*#__PURE__*/_react.default.createElement(_ui.Stack, {
412 gap: 1
413 }, /*#__PURE__*/_react.default.createElement(_optInContent.TextNode, {
414 variant: "body2"
415 }, i18n[currentState].notesHeader), /*#__PURE__*/_react.default.createElement(_optInContent.ContentList, null, /*#__PURE__*/_react.default.createElement(_optInContent.ContentListItem, {
416 variant: "body2"
417 }, !isEnrolled && /*#__PURE__*/_react.default.createElement(_optInContent.TextNode, {
418 variant: "subtitle2",
419 component: "span"
420 }, i18n.optIn.notes.alphaPrefix), i18n[currentState].notes.details[0]), i18n[currentState].notes.details.slice(1).map(function (entry, index) {
421 return /*#__PURE__*/_react.default.createElement(_optInContent.ContentListItem, {
422 key: index,
423 variant: "body2"
424 }, entry);
425 }))), /*#__PURE__*/_react.default.createElement(_ui.FormControlLabel, {
426 control: /*#__PURE__*/_react.default.createElement(_ui.Checkbox, {
427 checked: !!checked,
428 onChange: handleCheckboxChange,
429 color: "secondary",
430 size: "small"
431 }),
432 label: /*#__PURE__*/_react.default.createElement(_optInContent.TextNode, {
433 variant: "body2"
434 }, i18n.checkboxText)
435 }))), /*#__PURE__*/_react.default.createElement(_ui.DialogActions, null, /*#__PURE__*/_react.default.createElement(_ui.Button, {
436 variant: "text",
437 color: "secondary",
438 onClick: onClose
439 }, i18n[currentState].cancelButton), /*#__PURE__*/_react.default.createElement(_ui.Button, {
440 disabled: !checked,
441 variant: "contained",
442 onClick: handleSubmit
443 }, i18n[currentState].activateButton)));
444 };
445 Terms.propTypes = {
446 onClose: PropTypes.func,
447 onSubmit: PropTypes.func,
448 isEnrolled: PropTypes.bool
449 };
450
451 /***/ }),
452
453 /***/ "../modules/atomic-opt-in/assets/js/opt-in-page/opt-in.js":
454 /*!****************************************************************!*\
455 !*** ../modules/atomic-opt-in/assets/js/opt-in-page/opt-in.js ***!
456 \****************************************************************/
457 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
458
459 "use strict";
460 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
461
462
463 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
464 var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js");
465 Object.defineProperty(exports, "__esModule", ({
466 value: true
467 }));
468 exports.OptIn = void 0;
469 var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
470 var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
471 var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
472 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
473 var _icons = __webpack_require__(/*! @elementor/icons */ "@elementor/icons");
474 var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
475 var _optInContent = __webpack_require__(/*! ./opt-in-content */ "../modules/atomic-opt-in/assets/js/opt-in-page/opt-in-content.js");
476 var _optInImgPlaceholders = __webpack_require__(/*! ./opt-in-img-placeholders */ "../modules/atomic-opt-in/assets/js/opt-in-page/opt-in-img-placeholders.js");
477 var _optInMessage = __webpack_require__(/*! ./opt-in-message */ "../modules/atomic-opt-in/assets/js/opt-in-page/opt-in-message.js");
478 var _optInApi = __webpack_require__(/*! ./opt-in-api */ "../modules/atomic-opt-in/assets/js/opt-in-page/opt-in-api.js");
479 var _dompurify = _interopRequireDefault(__webpack_require__(/*! dompurify */ "../node_modules/dompurify/dist/purify.cjs.js"));
480 var _optInTerms = __webpack_require__(/*! ./opt-in-terms */ "../modules/atomic-opt-in/assets/js/opt-in-page/opt-in-terms.js");
481 var _elementorSettingsEdi;
482 function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
483 function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
484 function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
485 function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
486 var decodeHtmlUrl = function decodeHtmlUrl(html) {
487 var textarea = document.createElement('textarea');
488 textarea.innerHTML = html;
489 return textarea.value;
490 };
491 var OPT_IN_MSG = 'e-editor-v4-opt-in-message';
492 var OPT_OUT_MSG = 'e-editor-v4-opt-out-message';
493 var i18n = {
494 title: (0, _i18n.__)('The road to Editor V4', 'elementor'),
495 chip: (0, _i18n.__)('Alpha', 'elementor'),
496 welcomeText: (0, _i18n.__)('Welcome to a new era of web creation with Editor V4. It’s faster, more flexible, and built with a fresh approach to structure & styling.', 'elementor'),
497 advantagesHeader: (0, _i18n.__)('Here’s what’s inside the alpha version:', 'elementor'),
498 advantages: [(0, _i18n.__)('Unparalleled performance - Cleaner code & a lighter CSS footprint.', 'elementor'), (0, _i18n.__)('Professional tools at your fingertips - classes and states.', 'elementor'), (0, _i18n.__)('Consistent styling experience - A unified Style tab for all elements.', 'elementor'), (0, _i18n.__)('Fully responsive design - Customize any style property per screen.', 'elementor')],
499 andMore: (0, _i18n.__)('And much more!', 'elementor'),
500 readMore: (0, _i18n.__)('Learn more', 'elementor'),
501 warning: (0, _i18n.__)('Editor V4 is still in alpha and should not be used on live sites yet.', 'elementor'),
502 feedback: (0, _i18n.__)('We’d love your feedback!', 'elementor'),
503 overToGithub: (0, _i18n.__)('Head over to Github', 'elementor'),
504 tellUsWhy: (0, _i18n.__)('Tell us why', 'elementor'),
505 image: (0, _i18n.__)('Editor V4', 'elementor'),
506 buttons: {
507 tryOut: (0, _i18n.__)('Try out the new experience', 'elementor'),
508 optIn: (0, _i18n.__)('Activate the new experience', 'elementor'),
509 optOut: (0, _i18n.__)('Deactivate V4', 'elementor')
510 },
511 messages: {
512 optInSuccess: (0, _i18n.__)('Welcome! You’ve got the newest version of the editor.', 'elementor'),
513 optOut: (0, _i18n.__)('You’ve deactivated the new Editor. Have feedback?', 'elementor'),
514 error: (0, _i18n.__)('Ouch, there was a glitch. Try activating V4 again soon.', 'elementor')
515 }
516 };
517 var optInLinks = {
518 feedbackUrl: 'https://go.elementor.com/wp-dash-opt-in-v4-feedback/',
519 readMoreUrl: 'https://go.elementor.com/wp-dash-opt-in-v4-help-center/',
520 tryOutUrl: _dompurify.default.sanitize(decodeHtmlUrl((_elementorSettingsEdi = elementorSettingsEditor4OptIn) === null || _elementorSettingsEdi === void 0 || (_elementorSettingsEdi = _elementorSettingsEdi.urls) === null || _elementorSettingsEdi === void 0 ? void 0 : _elementorSettingsEdi.start_building)) || '#'
521 };
522 var optInImages = {
523 square: {
524 src: 'https://assets.elementor.com/v4-promotion/v1/images/v4_opt_in_500.png',
525 sx: {
526 width: '100%',
527 maxHeight: '507px',
528 maxWidth: 'sm',
529 height: 'auto',
530 mx: 'auto',
531 borderRadius: 2
532 }
533 },
534 landscape: {
535 src: 'https://assets.elementor.com/v4-promotion/v1/images/v4_opt_in_260.png',
536 sx: {
537 width: '100%',
538 height: 'auto',
539 maxHeight: '260px',
540 mx: 'auto',
541 maxWidth: 'sm',
542 borderRadius: 2
543 }
544 }
545 };
546 var OptIn = exports.OptIn = function OptIn(_ref) {
547 var _state$features;
548 var state = _ref.state;
549 var _useState = (0, _react.useState)(false),
550 _useState2 = (0, _slicedToArray2.default)(_useState, 2),
551 showTerms = _useState2[0],
552 setShowTerms = _useState2[1];
553 var _useState3 = (0, _react.useState)(''),
554 _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
555 optInMessage = _useState4[0],
556 setOptInMessage = _useState4[1];
557 var _useState5 = (0, _react.useState)(''),
558 _useState6 = (0, _slicedToArray2.default)(_useState5, 2),
559 optOutMessage = _useState6[0],
560 setOptOutMessage = _useState6[1];
561 var _useState7 = (0, _react.useState)(''),
562 _useState8 = (0, _slicedToArray2.default)(_useState7, 2),
563 errorMessage = _useState8[0],
564 setErrorMessage = _useState8[1];
565 (0, _react.useEffect)(function () {
566 var optInMsg = sessionStorage.getItem(OPT_IN_MSG);
567 var optOutMsg = sessionStorage.getItem(OPT_OUT_MSG);
568 if (optInMsg) {
569 setTimeout(function () {
570 setOptInMessage(optInMsg);
571 }, 100);
572 sessionStorage.removeItem(OPT_IN_MSG);
573 }
574 if (optOutMsg) {
575 setTimeout(function () {
576 setOptOutMessage(optOutMsg);
577 }, 100);
578 sessionStorage.removeItem(OPT_OUT_MSG);
579 }
580 }, []);
581 var maybeOptIn = function maybeOptIn() {
582 (0, _optInApi.triggerOptIn)().then(function () {
583 sessionStorage.setItem(OPT_IN_MSG, i18n.messages.optInSuccess);
584 window.location.reload();
585 }).catch(function () {
586 setErrorMessage(i18n.messages.error);
587 });
588 };
589 var maybeOptOut = function maybeOptOut() {
590 (0, _optInApi.triggerOptOut)().then(function () {
591 sessionStorage.setItem(OPT_OUT_MSG, i18n.messages.optOut);
592 window.location.reload();
593 }).catch(function () {
594 setErrorMessage(i18n.messages.error);
595 });
596 };
597 var handlePopoverClose = function handlePopoverClose() {
598 setShowTerms(false);
599 };
600 var isEnrolled = !!(state !== null && state !== void 0 && (_state$features = state.features) !== null && _state$features !== void 0 && _state$features.editor_v4);
601 return /*#__PURE__*/_react.default.createElement(_ui.Container, {
602 maxWidth: "xl",
603 sx: {
604 marginBlockStart: 2.5,
605 display: 'flex',
606 flexBasis: '100%',
607 gap: 3,
608 flexDirection: {
609 xs: 'column-reverse',
610 md: 'row'
611 }
612 }
613 }, /*#__PURE__*/_react.default.createElement(_ui.Stack, {
614 sx: {
615 flex: 1,
616 maxWidth: {
617 md: '507px',
618 sm: '600px'
619 },
620 gap: 2.5,
621 mx: 'auto'
622 }
623 }, /*#__PURE__*/_react.default.createElement(_ui.Stack, {
624 direction: "row",
625 alignItems: "center",
626 gap: 1
627 }, /*#__PURE__*/_react.default.createElement(_optInContent.TextNode, {
628 variant: "h4",
629 width: "fit-content"
630 }, i18n.title), /*#__PURE__*/_react.default.createElement(_ui.Chip, {
631 size: "small",
632 color: "secondary",
633 variant: "filled",
634 label: i18n.chip
635 })), /*#__PURE__*/_react.default.createElement(_ui.Stack, {
636 direction: "column",
637 gap: 3
638 }, /*#__PURE__*/_react.default.createElement(_ui.Box, null, /*#__PURE__*/_react.default.createElement(_optInContent.TextNode, null, i18n.welcomeText)), /*#__PURE__*/_react.default.createElement(_ui.Box, null, /*#__PURE__*/_react.default.createElement(_optInContent.TextNode, {
639 variant: "subtitle1",
640 sx: {
641 mb: 1.5
642 }
643 }, i18n.advantagesHeader), /*#__PURE__*/_react.default.createElement(_optInContent.AdvantagesList, null, i18n.advantages.map(function (entry, i) {
644 return /*#__PURE__*/_react.default.createElement(_optInContent.AdvantagesListItem, {
645 key: i
646 }, entry);
647 }), /*#__PURE__*/_react.default.createElement(_optInContent.AdvantagesListItem, {
648 key: i18n.advantages.length
649 }, i18n.andMore, " ", /*#__PURE__*/_react.default.createElement(_ui.Link, {
650 color: "text.primary",
651 href: optInLinks.readMoreUrl,
652 target: "_blank"
653 }, i18n.readMore))))), /*#__PURE__*/_react.default.createElement(_ui.Stack, {
654 direction: "row",
655 alignItems: "self-start",
656 gap: 0.5,
657 sx: {
658 mb: 2.5
659 }
660 }, /*#__PURE__*/_react.default.createElement(_icons.AlertTriangleIcon, {
661 color: "action"
662 }), /*#__PURE__*/_react.default.createElement(_ui.Box, null, /*#__PURE__*/_react.default.createElement(_optInContent.TextNode, null, i18n.warning))), /*#__PURE__*/_react.default.createElement(_ui.Stack, {
663 direction: "column",
664 width: "clamp(240px, max(340px, 75%), 340px)",
665 maxWidth: "100%",
666 gap: 2
667 }, !isEnrolled ? /*#__PURE__*/_react.default.createElement(_ui.Button, {
668 onClick: function onClick() {
669 setShowTerms(true);
670 },
671 size: "large",
672 color: "primary",
673 variant: "contained",
674 sx: {
675 flexGrow: 1
676 }
677 }, i18n.buttons.optIn) : /*#__PURE__*/_react.default.createElement(_ui.Button, {
678 onClick: function onClick() {
679 return window.location.href = optInLinks.tryOutUrl;
680 },
681 size: "large",
682 color: "primary",
683 variant: "contained",
684 sx: {
685 flexGrow: 1
686 }
687 }, i18n.buttons.tryOut), /*#__PURE__*/_react.default.createElement(_ui.Button, {
688 onClick: function onClick() {
689 setShowTerms(true);
690 },
691 size: "large",
692 color: "secondary",
693 variant: "outlined",
694 sx: {
695 flexGrow: 1,
696 visibility: isEnrolled ? 'visible' : 'hidden'
697 }
698 }, i18n.buttons.optOut)), /*#__PURE__*/_react.default.createElement(_optInContent.TextNode, null, i18n.feedback, " ", /*#__PURE__*/_react.default.createElement(_ui.Link, {
699 underline: "hover",
700 href: optInLinks.feedbackUrl,
701 target: "_blank"
702 }, i18n.overToGithub))), /*#__PURE__*/_react.default.createElement(_ui.Stack, {
703 sx: {
704 flex: 1,
705 px: 0,
706 maxWidth: {
707 md: '507px',
708 sm: '600px'
709 },
710 mx: 'auto'
711 }
712 }, optInImages.square.src ? /*#__PURE__*/_react.default.createElement(_ui.Image, {
713 src: optInImages.square.src,
714 alt: i18n.image,
715 sx: _objectSpread(_objectSpread({}, optInImages.square.sx), {}, {
716 display: {
717 xs: 'none',
718 md: 'block'
719 }
720 })
721 }) : /*#__PURE__*/_react.default.createElement(_optInImgPlaceholders.ImageSquarePlaceholder, {
722 sx: _objectSpread(_objectSpread({}, optInImages.square.sx), {}, {
723 display: {
724 xs: 'none',
725 md: 'block'
726 }
727 })
728 }), optInImages.landscape.src ? /*#__PURE__*/_react.default.createElement(_ui.Image, {
729 src: optInImages.landscape.src,
730 alt: i18n.image,
731 sx: _objectSpread(_objectSpread({}, optInImages.landscape.sx), {}, {
732 display: {
733 xs: 'block',
734 md: 'none'
735 }
736 })
737 }) : /*#__PURE__*/_react.default.createElement(_optInImgPlaceholders.ImageLandscapePlaceholder, {
738 sx: _objectSpread(_objectSpread({}, optInImages.landscape.sx), {}, {
739 display: {
740 xs: 'block',
741 md: 'none'
742 }
743 })
744 })), showTerms && /*#__PURE__*/_react.default.createElement(_optInTerms.Terms, {
745 onClose: handlePopoverClose,
746 onSubmit: isEnrolled ? maybeOptOut : maybeOptIn,
747 isEnrolled: isEnrolled
748 }), optInMessage && /*#__PURE__*/_react.default.createElement(_optInMessage.Message, {
749 onClose: function onClose() {
750 return setOptInMessage('');
751 }
752 }, optInMessage), optOutMessage && /*#__PURE__*/_react.default.createElement(_optInMessage.Message, {
753 onClose: function onClose() {
754 return setOptOutMessage('');
755 },
756 action: /*#__PURE__*/_react.default.createElement(_ui.Link, {
757 href: optInLinks.feedbackUrl,
758 target: "_blank",
759 color: "inherit",
760 sx: {
761 cursor: 'pointer',
762 textDecoration: 'none',
763 pl: 3
764 }
765 }, i18n.tellUsWhy)
766 }, optOutMessage), errorMessage && /*#__PURE__*/_react.default.createElement(_optInMessage.Message, {
767 severity: "error",
768 onClose: function onClose() {
769 return setErrorMessage('');
770 }
771 }, errorMessage));
772 };
773 OptIn.propTypes = {
774 state: PropTypes.shape({
775 features: PropTypes.shape({
776 editor_v4: PropTypes.bool
777 })
778 }).isRequired
779 };
780
781 /***/ }),
782
783 /***/ "../node_modules/dompurify/dist/purify.cjs.js":
784 /*!****************************************************!*\
785 !*** ../node_modules/dompurify/dist/purify.cjs.js ***!
786 \****************************************************/
787 /***/ ((module) => {
788
789 "use strict";
790 /*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */
791
792
793
794 const {
795 entries,
796 setPrototypeOf,
797 isFrozen,
798 getPrototypeOf,
799 getOwnPropertyDescriptor
800 } = Object;
801 let {
802 freeze,
803 seal,
804 create
805 } = Object; // eslint-disable-line import/no-mutable-exports
806 let {
807 apply,
808 construct
809 } = typeof Reflect !== 'undefined' && Reflect;
810 if (!freeze) {
811 freeze = function freeze(x) {
812 return x;
813 };
814 }
815 if (!seal) {
816 seal = function seal(x) {
817 return x;
818 };
819 }
820 if (!apply) {
821 apply = function apply(fun, thisValue, args) {
822 return fun.apply(thisValue, args);
823 };
824 }
825 if (!construct) {
826 construct = function construct(Func, args) {
827 return new Func(...args);
828 };
829 }
830 const arrayForEach = unapply(Array.prototype.forEach);
831 const arrayLastIndexOf = unapply(Array.prototype.lastIndexOf);
832 const arrayPop = unapply(Array.prototype.pop);
833 const arrayPush = unapply(Array.prototype.push);
834 const arraySplice = unapply(Array.prototype.splice);
835 const stringToLowerCase = unapply(String.prototype.toLowerCase);
836 const stringToString = unapply(String.prototype.toString);
837 const stringMatch = unapply(String.prototype.match);
838 const stringReplace = unapply(String.prototype.replace);
839 const stringIndexOf = unapply(String.prototype.indexOf);
840 const stringTrim = unapply(String.prototype.trim);
841 const objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);
842 const regExpTest = unapply(RegExp.prototype.test);
843 const typeErrorCreate = unconstruct(TypeError);
844 /**
845 * Creates a new function that calls the given function with a specified thisArg and arguments.
846 *
847 * @param func - The function to be wrapped and called.
848 * @returns A new function that calls the given function with a specified thisArg and arguments.
849 */
850 function unapply(func) {
851 return function (thisArg) {
852 if (thisArg instanceof RegExp) {
853 thisArg.lastIndex = 0;
854 }
855 for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
856 args[_key - 1] = arguments[_key];
857 }
858 return apply(func, thisArg, args);
859 };
860 }
861 /**
862 * Creates a new function that constructs an instance of the given constructor function with the provided arguments.
863 *
864 * @param func - The constructor function to be wrapped and called.
865 * @returns A new function that constructs an instance of the given constructor function with the provided arguments.
866 */
867 function unconstruct(func) {
868 return function () {
869 for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
870 args[_key2] = arguments[_key2];
871 }
872 return construct(func, args);
873 };
874 }
875 /**
876 * Add properties to a lookup table
877 *
878 * @param set - The set to which elements will be added.
879 * @param array - The array containing elements to be added to the set.
880 * @param transformCaseFunc - An optional function to transform the case of each element before adding to the set.
881 * @returns The modified set with added elements.
882 */
883 function addToSet(set, array) {
884 let transformCaseFunc = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : stringToLowerCase;
885 if (setPrototypeOf) {
886 // Make 'in' and truthy checks like Boolean(set.constructor)
887 // independent of any properties defined on Object.prototype.
888 // Prevent prototype setters from intercepting set as a this value.
889 setPrototypeOf(set, null);
890 }
891 let l = array.length;
892 while (l--) {
893 let element = array[l];
894 if (typeof element === 'string') {
895 const lcElement = transformCaseFunc(element);
896 if (lcElement !== element) {
897 // Config presets (e.g. tags.js, attrs.js) are immutable.
898 if (!isFrozen(array)) {
899 array[l] = lcElement;
900 }
901 element = lcElement;
902 }
903 }
904 set[element] = true;
905 }
906 return set;
907 }
908 /**
909 * Clean up an array to harden against CSPP
910 *
911 * @param array - The array to be cleaned.
912 * @returns The cleaned version of the array
913 */
914 function cleanArray(array) {
915 for (let index = 0; index < array.length; index++) {
916 const isPropertyExist = objectHasOwnProperty(array, index);
917 if (!isPropertyExist) {
918 array[index] = null;
919 }
920 }
921 return array;
922 }
923 /**
924 * Shallow clone an object
925 *
926 * @param object - The object to be cloned.
927 * @returns A new object that copies the original.
928 */
929 function clone(object) {
930 const newObject = create(null);
931 for (const [property, value] of entries(object)) {
932 const isPropertyExist = objectHasOwnProperty(object, property);
933 if (isPropertyExist) {
934 if (Array.isArray(value)) {
935 newObject[property] = cleanArray(value);
936 } else if (value && typeof value === 'object' && value.constructor === Object) {
937 newObject[property] = clone(value);
938 } else {
939 newObject[property] = value;
940 }
941 }
942 }
943 return newObject;
944 }
945 /**
946 * This method automatically checks if the prop is function or getter and behaves accordingly.
947 *
948 * @param object - The object to look up the getter function in its prototype chain.
949 * @param prop - The property name for which to find the getter function.
950 * @returns The getter function found in the prototype chain or a fallback function.
951 */
952 function lookupGetter(object, prop) {
953 while (object !== null) {
954 const desc = getOwnPropertyDescriptor(object, prop);
955 if (desc) {
956 if (desc.get) {
957 return unapply(desc.get);
958 }
959 if (typeof desc.value === 'function') {
960 return unapply(desc.value);
961 }
962 }
963 object = getPrototypeOf(object);
964 }
965 function fallbackValue() {
966 return null;
967 }
968 return fallbackValue;
969 }
970
971 const html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']);
972 const svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);
973 const svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']);
974 // List of SVG elements that are disallowed by default.
975 // We still need to know them so that we can do namespace
976 // checks properly in case one wants to add them to
977 // allow-list.
978 const svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);
979 const mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover', 'mprescripts']);
980 // Similarly to SVG, we want to know all MathML elements,
981 // even those that we disallow by default.
982 const mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);
983 const text = freeze(['#text']);
984
985 const html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'popover', 'popovertarget', 'popovertargetaction', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'wrap', 'xmlns', 'slot']);
986 const svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'amplitude', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'exponent', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'intercept', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'slope', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'tablevalues', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);
987 const mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);
988 const xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);
989
990 // eslint-disable-next-line unicorn/better-regex
991 const MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode
992 const ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm);
993 const TMPLIT_EXPR = seal(/\$\{[\w\W]*/gm); // eslint-disable-line unicorn/better-regex
994 const DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]+$/); // eslint-disable-line no-useless-escape
995 const ARIA_ATTR = seal(/^aria-[\-\w]+$/); // eslint-disable-line no-useless-escape
996 const IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i // eslint-disable-line no-useless-escape
997 );
998 const IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i);
999 const ATTR_WHITESPACE = seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g // eslint-disable-line no-control-regex
1000 );
1001 const DOCTYPE_NAME = seal(/^html$/i);
1002 const CUSTOM_ELEMENT = seal(/^[a-z][.\w]*(-[.\w]+)+$/i);
1003
1004 var EXPRESSIONS = /*#__PURE__*/Object.freeze({
1005 __proto__: null,
1006 ARIA_ATTR: ARIA_ATTR,
1007 ATTR_WHITESPACE: ATTR_WHITESPACE,
1008 CUSTOM_ELEMENT: CUSTOM_ELEMENT,
1009 DATA_ATTR: DATA_ATTR,
1010 DOCTYPE_NAME: DOCTYPE_NAME,
1011 ERB_EXPR: ERB_EXPR,
1012 IS_ALLOWED_URI: IS_ALLOWED_URI,
1013 IS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA,
1014 MUSTACHE_EXPR: MUSTACHE_EXPR,
1015 TMPLIT_EXPR: TMPLIT_EXPR
1016 });
1017
1018 /* eslint-disable @typescript-eslint/indent */
1019 // https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType
1020 const NODE_TYPE = {
1021 element: 1,
1022 attribute: 2,
1023 text: 3,
1024 cdataSection: 4,
1025 entityReference: 5,
1026 // Deprecated
1027 entityNode: 6,
1028 // Deprecated
1029 progressingInstruction: 7,
1030 comment: 8,
1031 document: 9,
1032 documentType: 10,
1033 documentFragment: 11,
1034 notation: 12 // Deprecated
1035 };
1036 const getGlobal = function getGlobal() {
1037 return typeof window === 'undefined' ? null : window;
1038 };
1039 /**
1040 * Creates a no-op policy for internal use only.
1041 * Don't export this function outside this module!
1042 * @param trustedTypes The policy factory.
1043 * @param purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).
1044 * @return The policy created (or null, if Trusted Types
1045 * are not supported or creating the policy failed).
1046 */
1047 const _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, purifyHostElement) {
1048 if (typeof trustedTypes !== 'object' || typeof trustedTypes.createPolicy !== 'function') {
1049 return null;
1050 }
1051 // Allow the callers to control the unique policy name
1052 // by adding a data-tt-policy-suffix to the script element with the DOMPurify.
1053 // Policy creation with duplicate names throws in Trusted Types.
1054 let suffix = null;
1055 const ATTR_NAME = 'data-tt-policy-suffix';
1056 if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {
1057 suffix = purifyHostElement.getAttribute(ATTR_NAME);
1058 }
1059 const policyName = 'dompurify' + (suffix ? '#' + suffix : '');
1060 try {
1061 return trustedTypes.createPolicy(policyName, {
1062 createHTML(html) {
1063 return html;
1064 },
1065 createScriptURL(scriptUrl) {
1066 return scriptUrl;
1067 }
1068 });
1069 } catch (_) {
1070 // Policy creation failed (most likely another DOMPurify script has
1071 // already run). Skip creating the policy, as this will only cause errors
1072 // if TT are enforced.
1073 console.warn('TrustedTypes policy ' + policyName + ' could not be created.');
1074 return null;
1075 }
1076 };
1077 const _createHooksMap = function _createHooksMap() {
1078 return {
1079 afterSanitizeAttributes: [],
1080 afterSanitizeElements: [],
1081 afterSanitizeShadowDOM: [],
1082 beforeSanitizeAttributes: [],
1083 beforeSanitizeElements: [],
1084 beforeSanitizeShadowDOM: [],
1085 uponSanitizeAttribute: [],
1086 uponSanitizeElement: [],
1087 uponSanitizeShadowNode: []
1088 };
1089 };
1090 function createDOMPurify() {
1091 let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();
1092 const DOMPurify = root => createDOMPurify(root);
1093 DOMPurify.version = '3.2.6';
1094 DOMPurify.removed = [];
1095 if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {
1096 // Not running in a browser, provide a factory function
1097 // so that you can pass your own Window
1098 DOMPurify.isSupported = false;
1099 return DOMPurify;
1100 }
1101 let {
1102 document
1103 } = window;
1104 const originalDocument = document;
1105 const currentScript = originalDocument.currentScript;
1106 const {
1107 DocumentFragment,
1108 HTMLTemplateElement,
1109 Node,
1110 Element,
1111 NodeFilter,
1112 NamedNodeMap = window.NamedNodeMap || window.MozNamedAttrMap,
1113 HTMLFormElement,
1114 DOMParser,
1115 trustedTypes
1116 } = window;
1117 const ElementPrototype = Element.prototype;
1118 const cloneNode = lookupGetter(ElementPrototype, 'cloneNode');
1119 const remove = lookupGetter(ElementPrototype, 'remove');
1120 const getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');
1121 const getChildNodes = lookupGetter(ElementPrototype, 'childNodes');
1122 const getParentNode = lookupGetter(ElementPrototype, 'parentNode');
1123 // As per issue #47, the web-components registry is inherited by a
1124 // new document created via createHTMLDocument. As per the spec
1125 // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)
1126 // a new empty registry is used when creating a template contents owner
1127 // document, so we use that as our parent document to ensure nothing
1128 // is inherited.
1129 if (typeof HTMLTemplateElement === 'function') {
1130 const template = document.createElement('template');
1131 if (template.content && template.content.ownerDocument) {
1132 document = template.content.ownerDocument;
1133 }
1134 }
1135 let trustedTypesPolicy;
1136 let emptyHTML = '';
1137 const {
1138 implementation,
1139 createNodeIterator,
1140 createDocumentFragment,
1141 getElementsByTagName
1142 } = document;
1143 const {
1144 importNode
1145 } = originalDocument;
1146 let hooks = _createHooksMap();
1147 /**
1148 * Expose whether this browser supports running the full DOMPurify.
1149 */
1150 DOMPurify.isSupported = typeof entries === 'function' && typeof getParentNode === 'function' && implementation && implementation.createHTMLDocument !== undefined;
1151 const {
1152 MUSTACHE_EXPR,
1153 ERB_EXPR,
1154 TMPLIT_EXPR,
1155 DATA_ATTR,
1156 ARIA_ATTR,
1157 IS_SCRIPT_OR_DATA,
1158 ATTR_WHITESPACE,
1159 CUSTOM_ELEMENT
1160 } = EXPRESSIONS;
1161 let {
1162 IS_ALLOWED_URI: IS_ALLOWED_URI$1
1163 } = EXPRESSIONS;
1164 /**
1165 * We consider the elements and attributes below to be safe. Ideally
1166 * don't add any new ones but feel free to remove unwanted ones.
1167 */
1168 /* allowed element names */
1169 let ALLOWED_TAGS = null;
1170 const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]);
1171 /* Allowed attribute names */
1172 let ALLOWED_ATTR = null;
1173 const DEFAULT_ALLOWED_ATTR = addToSet({}, [...html, ...svg, ...mathMl, ...xml]);
1174 /*
1175 * Configure how DOMPurify should handle custom elements and their attributes as well as customized built-in elements.
1176 * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)
1177 * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)
1178 * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.
1179 */
1180 let CUSTOM_ELEMENT_HANDLING = Object.seal(create(null, {
1181 tagNameCheck: {
1182 writable: true,
1183 configurable: false,
1184 enumerable: true,
1185 value: null
1186 },
1187 attributeNameCheck: {
1188 writable: true,
1189 configurable: false,
1190 enumerable: true,
1191 value: null
1192 },
1193 allowCustomizedBuiltInElements: {
1194 writable: true,
1195 configurable: false,
1196 enumerable: true,
1197 value: false
1198 }
1199 }));
1200 /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */
1201 let FORBID_TAGS = null;
1202 /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */
1203 let FORBID_ATTR = null;
1204 /* Decide if ARIA attributes are okay */
1205 let ALLOW_ARIA_ATTR = true;
1206 /* Decide if custom data attributes are okay */
1207 let ALLOW_DATA_ATTR = true;
1208 /* Decide if unknown protocols are okay */
1209 let ALLOW_UNKNOWN_PROTOCOLS = false;
1210 /* Decide if self-closing tags in attributes are allowed.
1211 * Usually removed due to a mXSS issue in jQuery 3.0 */
1212 let ALLOW_SELF_CLOSE_IN_ATTR = true;
1213 /* Output should be safe for common template engines.
1214 * This means, DOMPurify removes data attributes, mustaches and ERB
1215 */
1216 let SAFE_FOR_TEMPLATES = false;
1217 /* Output should be safe even for XML used within HTML and alike.
1218 * This means, DOMPurify removes comments when containing risky content.
1219 */
1220 let SAFE_FOR_XML = true;
1221 /* Decide if document with <html>... should be returned */
1222 let WHOLE_DOCUMENT = false;
1223 /* Track whether config is already set on this instance of DOMPurify. */
1224 let SET_CONFIG = false;
1225 /* Decide if all elements (e.g. style, script) must be children of
1226 * document.body. By default, browsers might move them to document.head */
1227 let FORCE_BODY = false;
1228 /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html
1229 * string (or a TrustedHTML object if Trusted Types are supported).
1230 * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead
1231 */
1232 let RETURN_DOM = false;
1233 /* Decide if a DOM `DocumentFragment` should be returned, instead of a html
1234 * string (or a TrustedHTML object if Trusted Types are supported) */
1235 let RETURN_DOM_FRAGMENT = false;
1236 /* Try to return a Trusted Type object instead of a string, return a string in
1237 * case Trusted Types are not supported */
1238 let RETURN_TRUSTED_TYPE = false;
1239 /* Output should be free from DOM clobbering attacks?
1240 * This sanitizes markups named with colliding, clobberable built-in DOM APIs.
1241 */
1242 let SANITIZE_DOM = true;
1243 /* Achieve full DOM Clobbering protection by isolating the namespace of named
1244 * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.
1245 *
1246 * HTML/DOM spec rules that enable DOM Clobbering:
1247 * - Named Access on Window (§7.3.3)
1248 * - DOM Tree Accessors (§3.1.5)
1249 * - Form Element Parent-Child Relations (§4.10.3)
1250 * - Iframe srcdoc / Nested WindowProxies (§4.8.5)
1251 * - HTMLCollection (§4.2.10.2)
1252 *
1253 * Namespace isolation is implemented by prefixing `id` and `name` attributes
1254 * with a constant string, i.e., `user-content-`
1255 */
1256 let SANITIZE_NAMED_PROPS = false;
1257 const SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';
1258 /* Keep element content when removing element? */
1259 let KEEP_CONTENT = true;
1260 /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead
1261 * of importing it into a new Document and returning a sanitized copy */
1262 let IN_PLACE = false;
1263 /* Allow usage of profiles like html, svg and mathMl */
1264 let USE_PROFILES = {};
1265 /* Tags to ignore content of when KEEP_CONTENT is true */
1266 let FORBID_CONTENTS = null;
1267 const DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);
1268 /* Tags that are safe for data: URIs */
1269 let DATA_URI_TAGS = null;
1270 const DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);
1271 /* Attributes safe for values like "javascript:" */
1272 let URI_SAFE_ATTRIBUTES = null;
1273 const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);
1274 const MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
1275 const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
1276 const HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
1277 /* Document namespace */
1278 let NAMESPACE = HTML_NAMESPACE;
1279 let IS_EMPTY_INPUT = false;
1280 /* Allowed XHTML+XML namespaces */
1281 let ALLOWED_NAMESPACES = null;
1282 const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);
1283 let MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);
1284 let HTML_INTEGRATION_POINTS = addToSet({}, ['annotation-xml']);
1285 // Certain elements are allowed in both SVG and HTML
1286 // namespace. We need to specify them explicitly
1287 // so that they don't get erroneously deleted from
1288 // HTML namespace.
1289 const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);
1290 /* Parsing of strict XHTML documents */
1291 let PARSER_MEDIA_TYPE = null;
1292 const SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];
1293 const DEFAULT_PARSER_MEDIA_TYPE = 'text/html';
1294 let transformCaseFunc = null;
1295 /* Keep a reference to config to pass to hooks */
1296 let CONFIG = null;
1297 /* Ideally, do not touch anything below this line */
1298 /* ______________________________________________ */
1299 const formElement = document.createElement('form');
1300 const isRegexOrFunction = function isRegexOrFunction(testValue) {
1301 return testValue instanceof RegExp || testValue instanceof Function;
1302 };
1303 /**
1304 * _parseConfig
1305 *
1306 * @param cfg optional config literal
1307 */
1308 // eslint-disable-next-line complexity
1309 const _parseConfig = function _parseConfig() {
1310 let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1311 if (CONFIG && CONFIG === cfg) {
1312 return;
1313 }
1314 /* Shield configuration object from tampering */
1315 if (!cfg || typeof cfg !== 'object') {
1316 cfg = {};
1317 }
1318 /* Shield configuration object from prototype pollution */
1319 cfg = clone(cfg);
1320 PARSER_MEDIA_TYPE =
1321 // eslint-disable-next-line unicorn/prefer-includes
1322 SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;
1323 // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.
1324 transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase;
1325 /* Set configuration parameters */
1326 ALLOWED_TAGS = objectHasOwnProperty(cfg, 'ALLOWED_TAGS') ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;
1327 ALLOWED_ATTR = objectHasOwnProperty(cfg, 'ALLOWED_ATTR') ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;
1328 ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, 'ALLOWED_NAMESPACES') ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;
1329 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;
1330 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;
1331 FORBID_CONTENTS = objectHasOwnProperty(cfg, 'FORBID_CONTENTS') ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
1332 FORBID_TAGS = objectHasOwnProperty(cfg, 'FORBID_TAGS') ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : clone({});
1333 FORBID_ATTR = objectHasOwnProperty(cfg, 'FORBID_ATTR') ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : clone({});
1334 USE_PROFILES = objectHasOwnProperty(cfg, 'USE_PROFILES') ? cfg.USE_PROFILES : false;
1335 ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true
1336 ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true
1337 ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false
1338 ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true
1339 SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false
1340 SAFE_FOR_XML = cfg.SAFE_FOR_XML !== false; // Default true
1341 WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false
1342 RETURN_DOM = cfg.RETURN_DOM || false; // Default false
1343 RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false
1344 RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false
1345 FORCE_BODY = cfg.FORCE_BODY || false; // Default false
1346 SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true
1347 SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false
1348 KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true
1349 IN_PLACE = cfg.IN_PLACE || false; // Default false
1350 IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI;
1351 NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;
1352 MATHML_TEXT_INTEGRATION_POINTS = cfg.MATHML_TEXT_INTEGRATION_POINTS || MATHML_TEXT_INTEGRATION_POINTS;
1353 HTML_INTEGRATION_POINTS = cfg.HTML_INTEGRATION_POINTS || HTML_INTEGRATION_POINTS;
1354 CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};
1355 if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {
1356 CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;
1357 }
1358 if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {
1359 CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;
1360 }
1361 if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === 'boolean') {
1362 CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;
1363 }
1364 if (SAFE_FOR_TEMPLATES) {
1365 ALLOW_DATA_ATTR = false;
1366 }
1367 if (RETURN_DOM_FRAGMENT) {
1368 RETURN_DOM = true;
1369 }
1370 /* Parse profile info */
1371 if (USE_PROFILES) {
1372 ALLOWED_TAGS = addToSet({}, text);
1373 ALLOWED_ATTR = [];
1374 if (USE_PROFILES.html === true) {
1375 addToSet(ALLOWED_TAGS, html$1);
1376 addToSet(ALLOWED_ATTR, html);
1377 }
1378 if (USE_PROFILES.svg === true) {
1379 addToSet(ALLOWED_TAGS, svg$1);
1380 addToSet(ALLOWED_ATTR, svg);
1381 addToSet(ALLOWED_ATTR, xml);
1382 }
1383 if (USE_PROFILES.svgFilters === true) {
1384 addToSet(ALLOWED_TAGS, svgFilters);
1385 addToSet(ALLOWED_ATTR, svg);
1386 addToSet(ALLOWED_ATTR, xml);
1387 }
1388 if (USE_PROFILES.mathMl === true) {
1389 addToSet(ALLOWED_TAGS, mathMl$1);
1390 addToSet(ALLOWED_ATTR, mathMl);
1391 addToSet(ALLOWED_ATTR, xml);
1392 }
1393 }
1394 /* Merge configuration parameters */
1395 if (cfg.ADD_TAGS) {
1396 if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
1397 ALLOWED_TAGS = clone(ALLOWED_TAGS);
1398 }
1399 addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
1400 }
1401 if (cfg.ADD_ATTR) {
1402 if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
1403 ALLOWED_ATTR = clone(ALLOWED_ATTR);
1404 }
1405 addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
1406 }
1407 if (cfg.ADD_URI_SAFE_ATTR) {
1408 addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);
1409 }
1410 if (cfg.FORBID_CONTENTS) {
1411 if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
1412 FORBID_CONTENTS = clone(FORBID_CONTENTS);
1413 }
1414 addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);
1415 }
1416 /* Add #text in case KEEP_CONTENT is set to true */
1417 if (KEEP_CONTENT) {
1418 ALLOWED_TAGS['#text'] = true;
1419 }
1420 /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */
1421 if (WHOLE_DOCUMENT) {
1422 addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);
1423 }
1424 /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */
1425 if (ALLOWED_TAGS.table) {
1426 addToSet(ALLOWED_TAGS, ['tbody']);
1427 delete FORBID_TAGS.tbody;
1428 }
1429 if (cfg.TRUSTED_TYPES_POLICY) {
1430 if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== 'function') {
1431 throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
1432 }
1433 if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== 'function') {
1434 throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
1435 }
1436 // Overwrite existing TrustedTypes policy.
1437 trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;
1438 // Sign local variables required by `sanitize`.
1439 emptyHTML = trustedTypesPolicy.createHTML('');
1440 } else {
1441 // Uninitialized policy, attempt to initialize the internal dompurify policy.
1442 if (trustedTypesPolicy === undefined) {
1443 trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);
1444 }
1445 // If creating the internal policy succeeded sign internal variables.
1446 if (trustedTypesPolicy !== null && typeof emptyHTML === 'string') {
1447 emptyHTML = trustedTypesPolicy.createHTML('');
1448 }
1449 }
1450 // Prevent further manipulation of configuration.
1451 // Not available in IE8, Safari 5, etc.
1452 if (freeze) {
1453 freeze(cfg);
1454 }
1455 CONFIG = cfg;
1456 };
1457 /* Keep track of all possible SVG and MathML tags
1458 * so that we can perform the namespace checks
1459 * correctly. */
1460 const ALL_SVG_TAGS = addToSet({}, [...svg$1, ...svgFilters, ...svgDisallowed]);
1461 const ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]);
1462 /**
1463 * @param element a DOM element whose namespace is being checked
1464 * @returns Return false if the element has a
1465 * namespace that a spec-compliant parser would never
1466 * return. Return true otherwise.
1467 */
1468 const _checkValidNamespace = function _checkValidNamespace(element) {
1469 let parent = getParentNode(element);
1470 // In JSDOM, if we're inside shadow DOM, then parentNode
1471 // can be null. We just simulate parent in this case.
1472 if (!parent || !parent.tagName) {
1473 parent = {
1474 namespaceURI: NAMESPACE,
1475 tagName: 'template'
1476 };
1477 }
1478 const tagName = stringToLowerCase(element.tagName);
1479 const parentTagName = stringToLowerCase(parent.tagName);
1480 if (!ALLOWED_NAMESPACES[element.namespaceURI]) {
1481 return false;
1482 }
1483 if (element.namespaceURI === SVG_NAMESPACE) {
1484 // The only way to switch from HTML namespace to SVG
1485 // is via <svg>. If it happens via any other tag, then
1486 // it should be killed.
1487 if (parent.namespaceURI === HTML_NAMESPACE) {
1488 return tagName === 'svg';
1489 }
1490 // The only way to switch from MathML to SVG is via`
1491 // svg if parent is either <annotation-xml> or MathML
1492 // text integration points.
1493 if (parent.namespaceURI === MATHML_NAMESPACE) {
1494 return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);
1495 }
1496 // We only allow elements that are defined in SVG
1497 // spec. All others are disallowed in SVG namespace.
1498 return Boolean(ALL_SVG_TAGS[tagName]);
1499 }
1500 if (element.namespaceURI === MATHML_NAMESPACE) {
1501 // The only way to switch from HTML namespace to MathML
1502 // is via <math>. If it happens via any other tag, then
1503 // it should be killed.
1504 if (parent.namespaceURI === HTML_NAMESPACE) {
1505 return tagName === 'math';
1506 }
1507 // The only way to switch from SVG to MathML is via
1508 // <math> and HTML integration points
1509 if (parent.namespaceURI === SVG_NAMESPACE) {
1510 return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];
1511 }
1512 // We only allow elements that are defined in MathML
1513 // spec. All others are disallowed in MathML namespace.
1514 return Boolean(ALL_MATHML_TAGS[tagName]);
1515 }
1516 if (element.namespaceURI === HTML_NAMESPACE) {
1517 // The only way to switch from SVG to HTML is via
1518 // HTML integration points, and from MathML to HTML
1519 // is via MathML text integration points
1520 if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {
1521 return false;
1522 }
1523 if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {
1524 return false;
1525 }
1526 // We disallow tags that are specific for MathML
1527 // or SVG and should never appear in HTML namespace
1528 return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);
1529 }
1530 // For XHTML and XML documents that support custom namespaces
1531 if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && ALLOWED_NAMESPACES[element.namespaceURI]) {
1532 return true;
1533 }
1534 // The code should never reach this place (this means
1535 // that the element somehow got namespace that is not
1536 // HTML, SVG, MathML or allowed via ALLOWED_NAMESPACES).
1537 // Return false just in case.
1538 return false;
1539 };
1540 /**
1541 * _forceRemove
1542 *
1543 * @param node a DOM node
1544 */
1545 const _forceRemove = function _forceRemove(node) {
1546 arrayPush(DOMPurify.removed, {
1547 element: node
1548 });
1549 try {
1550 // eslint-disable-next-line unicorn/prefer-dom-node-remove
1551 getParentNode(node).removeChild(node);
1552 } catch (_) {
1553 remove(node);
1554 }
1555 };
1556 /**
1557 * _removeAttribute
1558 *
1559 * @param name an Attribute name
1560 * @param element a DOM node
1561 */
1562 const _removeAttribute = function _removeAttribute(name, element) {
1563 try {
1564 arrayPush(DOMPurify.removed, {
1565 attribute: element.getAttributeNode(name),
1566 from: element
1567 });
1568 } catch (_) {
1569 arrayPush(DOMPurify.removed, {
1570 attribute: null,
1571 from: element
1572 });
1573 }
1574 element.removeAttribute(name);
1575 // We void attribute values for unremovable "is" attributes
1576 if (name === 'is') {
1577 if (RETURN_DOM || RETURN_DOM_FRAGMENT) {
1578 try {
1579 _forceRemove(element);
1580 } catch (_) {}
1581 } else {
1582 try {
1583 element.setAttribute(name, '');
1584 } catch (_) {}
1585 }
1586 }
1587 };
1588 /**
1589 * _initDocument
1590 *
1591 * @param dirty - a string of dirty markup
1592 * @return a DOM, filled with the dirty markup
1593 */
1594 const _initDocument = function _initDocument(dirty) {
1595 /* Create a HTML document */
1596 let doc = null;
1597 let leadingWhitespace = null;
1598 if (FORCE_BODY) {
1599 dirty = '<remove></remove>' + dirty;
1600 } else {
1601 /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */
1602 const matches = stringMatch(dirty, /^[\r\n\t ]+/);
1603 leadingWhitespace = matches && matches[0];
1604 }
1605 if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && NAMESPACE === HTML_NAMESPACE) {
1606 // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)
1607 dirty = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + dirty + '</body></html>';
1608 }
1609 const dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;
1610 /*
1611 * Use the DOMParser API by default, fallback later if needs be
1612 * DOMParser not work for svg when has multiple root element.
1613 */
1614 if (NAMESPACE === HTML_NAMESPACE) {
1615 try {
1616 doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);
1617 } catch (_) {}
1618 }
1619 /* Use createHTMLDocument in case DOMParser is not available */
1620 if (!doc || !doc.documentElement) {
1621 doc = implementation.createDocument(NAMESPACE, 'template', null);
1622 try {
1623 doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;
1624 } catch (_) {
1625 // Syntax error if dirtyPayload is invalid xml
1626 }
1627 }
1628 const body = doc.body || doc.documentElement;
1629 if (dirty && leadingWhitespace) {
1630 body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);
1631 }
1632 /* Work on whole document or just its body */
1633 if (NAMESPACE === HTML_NAMESPACE) {
1634 return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];
1635 }
1636 return WHOLE_DOCUMENT ? doc.documentElement : body;
1637 };
1638 /**
1639 * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.
1640 *
1641 * @param root The root element or node to start traversing on.
1642 * @return The created NodeIterator
1643 */
1644 const _createNodeIterator = function _createNodeIterator(root) {
1645 return createNodeIterator.call(root.ownerDocument || root, root,
1646 // eslint-disable-next-line no-bitwise
1647 NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null);
1648 };
1649 /**
1650 * _isClobbered
1651 *
1652 * @param element element to check for clobbering attacks
1653 * @return true if clobbered, false if safe
1654 */
1655 const _isClobbered = function _isClobbered(element) {
1656 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');
1657 };
1658 /**
1659 * Checks whether the given object is a DOM node.
1660 *
1661 * @param value object to check whether it's a DOM node
1662 * @return true is object is a DOM node
1663 */
1664 const _isNode = function _isNode(value) {
1665 return typeof Node === 'function' && value instanceof Node;
1666 };
1667 function _executeHooks(hooks, currentNode, data) {
1668 arrayForEach(hooks, hook => {
1669 hook.call(DOMPurify, currentNode, data, CONFIG);
1670 });
1671 }
1672 /**
1673 * _sanitizeElements
1674 *
1675 * @protect nodeName
1676 * @protect textContent
1677 * @protect removeChild
1678 * @param currentNode to check for permission to exist
1679 * @return true if node was killed, false if left alive
1680 */
1681 const _sanitizeElements = function _sanitizeElements(currentNode) {
1682 let content = null;
1683 /* Execute a hook if present */
1684 _executeHooks(hooks.beforeSanitizeElements, currentNode, null);
1685 /* Check if element is clobbered or can clobber */
1686 if (_isClobbered(currentNode)) {
1687 _forceRemove(currentNode);
1688 return true;
1689 }
1690 /* Now let's check the element's type and name */
1691 const tagName = transformCaseFunc(currentNode.nodeName);
1692 /* Execute a hook if present */
1693 _executeHooks(hooks.uponSanitizeElement, currentNode, {
1694 tagName,
1695 allowedTags: ALLOWED_TAGS
1696 });
1697 /* Detect mXSS attempts abusing namespace confusion */
1698 if (SAFE_FOR_XML && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\w!]/g, currentNode.innerHTML) && regExpTest(/<[/\w!]/g, currentNode.textContent)) {
1699 _forceRemove(currentNode);
1700 return true;
1701 }
1702 /* Remove any occurrence of processing instructions */
1703 if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {
1704 _forceRemove(currentNode);
1705 return true;
1706 }
1707 /* Remove any kind of possibly harmful comments */
1708 if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, currentNode.data)) {
1709 _forceRemove(currentNode);
1710 return true;
1711 }
1712 /* Remove element if anything forbids its presence */
1713 if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
1714 /* Check if we have a custom element to handle */
1715 if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {
1716 if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {
1717 return false;
1718 }
1719 if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) {
1720 return false;
1721 }
1722 }
1723 /* Keep content except for bad-listed elements */
1724 if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {
1725 const parentNode = getParentNode(currentNode) || currentNode.parentNode;
1726 const childNodes = getChildNodes(currentNode) || currentNode.childNodes;
1727 if (childNodes && parentNode) {
1728 const childCount = childNodes.length;
1729 for (let i = childCount - 1; i >= 0; --i) {
1730 const childClone = cloneNode(childNodes[i], true);
1731 childClone.__removalCount = (currentNode.__removalCount || 0) + 1;
1732 parentNode.insertBefore(childClone, getNextSibling(currentNode));
1733 }
1734 }
1735 }
1736 _forceRemove(currentNode);
1737 return true;
1738 }
1739 /* Check whether element has a valid namespace */
1740 if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {
1741 _forceRemove(currentNode);
1742 return true;
1743 }
1744 /* Make sure that older browsers don't get fallback-tag mXSS */
1745 if ((tagName === 'noscript' || tagName === 'noembed' || tagName === 'noframes') && regExpTest(/<\/no(script|embed|frames)/i, currentNode.innerHTML)) {
1746 _forceRemove(currentNode);
1747 return true;
1748 }
1749 /* Sanitize element content to be template-safe */
1750 if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {
1751 /* Get the element's text content */
1752 content = currentNode.textContent;
1753 arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {
1754 content = stringReplace(content, expr, ' ');
1755 });
1756 if (currentNode.textContent !== content) {
1757 arrayPush(DOMPurify.removed, {
1758 element: currentNode.cloneNode()
1759 });
1760 currentNode.textContent = content;
1761 }
1762 }
1763 /* Execute a hook if present */
1764 _executeHooks(hooks.afterSanitizeElements, currentNode, null);
1765 return false;
1766 };
1767 /**
1768 * _isValidAttribute
1769 *
1770 * @param lcTag Lowercase tag name of containing element.
1771 * @param lcName Lowercase attribute name.
1772 * @param value Attribute value.
1773 * @return Returns true if `value` is valid, otherwise false.
1774 */
1775 // eslint-disable-next-line complexity
1776 const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {
1777 /* Make sure attribute cannot clobber */
1778 if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {
1779 return false;
1780 }
1781 /* Allow valid data-* attributes: At least one character after "-"
1782 (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)
1783 XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)
1784 We don't need to check the value; it's always URI safe. */
1785 if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR, lcName)) ; else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {
1786 if (
1787 // First condition does a very basic check if a) it's basically a valid custom element tagname AND
1788 // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
1789 // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
1790 _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)) ||
1791 // Alternative, second condition checks if it's an `is`-attribute, AND
1792 // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
1793 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))) ; else {
1794 return false;
1795 }
1796 /* Check value is safe. First, is attr inert? If so, is safe */
1797 } else if (URI_SAFE_ATTRIBUTES[lcName]) ; else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ; else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if (value) {
1798 return false;
1799 } else ;
1800 return true;
1801 };
1802 /**
1803 * _isBasicCustomElement
1804 * checks if at least one dash is included in tagName, and it's not the first char
1805 * for more sophisticated checking see https://github.com/sindresorhus/validate-element-name
1806 *
1807 * @param tagName name of the tag of the node to sanitize
1808 * @returns Returns true if the tag name meets the basic criteria for a custom element, otherwise false.
1809 */
1810 const _isBasicCustomElement = function _isBasicCustomElement(tagName) {
1811 return tagName !== 'annotation-xml' && stringMatch(tagName, CUSTOM_ELEMENT);
1812 };
1813 /**
1814 * _sanitizeAttributes
1815 *
1816 * @protect attributes
1817 * @protect nodeName
1818 * @protect removeAttribute
1819 * @protect setAttribute
1820 *
1821 * @param currentNode to sanitize
1822 */
1823 const _sanitizeAttributes = function _sanitizeAttributes(currentNode) {
1824 /* Execute a hook if present */
1825 _executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);
1826 const {
1827 attributes
1828 } = currentNode;
1829 /* Check if we have attributes; if not we might have a text node */
1830 if (!attributes || _isClobbered(currentNode)) {
1831 return;
1832 }
1833 const hookEvent = {
1834 attrName: '',
1835 attrValue: '',
1836 keepAttr: true,
1837 allowedAttributes: ALLOWED_ATTR,
1838 forceKeepAttr: undefined
1839 };
1840 let l = attributes.length;
1841 /* Go backwards over all attributes; safely remove bad ones */
1842 while (l--) {
1843 const attr = attributes[l];
1844 const {
1845 name,
1846 namespaceURI,
1847 value: attrValue
1848 } = attr;
1849 const lcName = transformCaseFunc(name);
1850 const initValue = attrValue;
1851 let value = name === 'value' ? initValue : stringTrim(initValue);
1852 /* Execute a hook if present */
1853 hookEvent.attrName = lcName;
1854 hookEvent.attrValue = value;
1855 hookEvent.keepAttr = true;
1856 hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set
1857 _executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent);
1858 value = hookEvent.attrValue;
1859 /* Full DOM Clobbering protection via namespace isolation,
1860 * Prefix id and name attributes with `user-content-`
1861 */
1862 if (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name')) {
1863 // Remove the attribute with this value
1864 _removeAttribute(name, currentNode);
1865 // Prefix the value and later re-create the attribute with the sanitized value
1866 value = SANITIZE_NAMED_PROPS_PREFIX + value;
1867 }
1868 /* Work around a security issue with comments inside attributes */
1869 if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|title)/i, value)) {
1870 _removeAttribute(name, currentNode);
1871 continue;
1872 }
1873 /* Did the hooks approve of the attribute? */
1874 if (hookEvent.forceKeepAttr) {
1875 continue;
1876 }
1877 /* Did the hooks approve of the attribute? */
1878 if (!hookEvent.keepAttr) {
1879 _removeAttribute(name, currentNode);
1880 continue;
1881 }
1882 /* Work around a security issue in jQuery 3.0 */
1883 if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\/>/i, value)) {
1884 _removeAttribute(name, currentNode);
1885 continue;
1886 }
1887 /* Sanitize attribute content to be template-safe */
1888 if (SAFE_FOR_TEMPLATES) {
1889 arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {
1890 value = stringReplace(value, expr, ' ');
1891 });
1892 }
1893 /* Is `value` valid for this attribute? */
1894 const lcTag = transformCaseFunc(currentNode.nodeName);
1895 if (!_isValidAttribute(lcTag, lcName, value)) {
1896 _removeAttribute(name, currentNode);
1897 continue;
1898 }
1899 /* Handle attributes that require Trusted Types */
1900 if (trustedTypesPolicy && typeof trustedTypes === 'object' && typeof trustedTypes.getAttributeType === 'function') {
1901 if (namespaceURI) ; else {
1902 switch (trustedTypes.getAttributeType(lcTag, lcName)) {
1903 case 'TrustedHTML':
1904 {
1905 value = trustedTypesPolicy.createHTML(value);
1906 break;
1907 }
1908 case 'TrustedScriptURL':
1909 {
1910 value = trustedTypesPolicy.createScriptURL(value);
1911 break;
1912 }
1913 }
1914 }
1915 }
1916 /* Handle invalid data-* attribute set by try-catching it */
1917 if (value !== initValue) {
1918 try {
1919 if (namespaceURI) {
1920 currentNode.setAttributeNS(namespaceURI, name, value);
1921 } else {
1922 /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. "x-schema". */
1923 currentNode.setAttribute(name, value);
1924 }
1925 if (_isClobbered(currentNode)) {
1926 _forceRemove(currentNode);
1927 } else {
1928 arrayPop(DOMPurify.removed);
1929 }
1930 } catch (_) {
1931 _removeAttribute(name, currentNode);
1932 }
1933 }
1934 }
1935 /* Execute a hook if present */
1936 _executeHooks(hooks.afterSanitizeAttributes, currentNode, null);
1937 };
1938 /**
1939 * _sanitizeShadowDOM
1940 *
1941 * @param fragment to iterate over recursively
1942 */
1943 const _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) {
1944 let shadowNode = null;
1945 const shadowIterator = _createNodeIterator(fragment);
1946 /* Execute a hook if present */
1947 _executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);
1948 while (shadowNode = shadowIterator.nextNode()) {
1949 /* Execute a hook if present */
1950 _executeHooks(hooks.uponSanitizeShadowNode, shadowNode, null);
1951 /* Sanitize tags and elements */
1952 _sanitizeElements(shadowNode);
1953 /* Check attributes next */
1954 _sanitizeAttributes(shadowNode);
1955 /* Deep shadow DOM detected */
1956 if (shadowNode.content instanceof DocumentFragment) {
1957 _sanitizeShadowDOM(shadowNode.content);
1958 }
1959 }
1960 /* Execute a hook if present */
1961 _executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);
1962 };
1963 // eslint-disable-next-line complexity
1964 DOMPurify.sanitize = function (dirty) {
1965 let cfg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1966 let body = null;
1967 let importedNode = null;
1968 let currentNode = null;
1969 let returnNode = null;
1970 /* Make sure we have a string to sanitize.
1971 DO NOT return early, as this will return the wrong type if
1972 the user has requested a DOM object rather than a string */
1973 IS_EMPTY_INPUT = !dirty;
1974 if (IS_EMPTY_INPUT) {
1975 dirty = '<!-->';
1976 }
1977 /* Stringify, in case dirty is an object */
1978 if (typeof dirty !== 'string' && !_isNode(dirty)) {
1979 if (typeof dirty.toString === 'function') {
1980 dirty = dirty.toString();
1981 if (typeof dirty !== 'string') {
1982 throw typeErrorCreate('dirty is not a string, aborting');
1983 }
1984 } else {
1985 throw typeErrorCreate('toString is not a function');
1986 }
1987 }
1988 /* Return dirty HTML if DOMPurify cannot run */
1989 if (!DOMPurify.isSupported) {
1990 return dirty;
1991 }
1992 /* Assign config vars */
1993 if (!SET_CONFIG) {
1994 _parseConfig(cfg);
1995 }
1996 /* Clean up removed elements */
1997 DOMPurify.removed = [];
1998 /* Check if dirty is correctly typed for IN_PLACE */
1999 if (typeof dirty === 'string') {
2000 IN_PLACE = false;
2001 }
2002 if (IN_PLACE) {
2003 /* Do some early pre-sanitization to avoid unsafe root nodes */
2004 if (dirty.nodeName) {
2005 const tagName = transformCaseFunc(dirty.nodeName);
2006 if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
2007 throw typeErrorCreate('root node is forbidden and cannot be sanitized in-place');
2008 }
2009 }
2010 } else if (dirty instanceof Node) {
2011 /* If dirty is a DOM element, append to an empty document to avoid
2012 elements being stripped by the parser */
2013 body = _initDocument('<!---->');
2014 importedNode = body.ownerDocument.importNode(dirty, true);
2015 if (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === 'BODY') {
2016 /* Node is already a body, use as is */
2017 body = importedNode;
2018 } else if (importedNode.nodeName === 'HTML') {
2019 body = importedNode;
2020 } else {
2021 // eslint-disable-next-line unicorn/prefer-dom-node-append
2022 body.appendChild(importedNode);
2023 }
2024 } else {
2025 /* Exit directly if we have nothing to do */
2026 if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT &&
2027 // eslint-disable-next-line unicorn/prefer-includes
2028 dirty.indexOf('<') === -1) {
2029 return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;
2030 }
2031 /* Initialize the document to work on */
2032 body = _initDocument(dirty);
2033 /* Check we have a DOM node from the data */
2034 if (!body) {
2035 return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : '';
2036 }
2037 }
2038 /* Remove first element node (ours) if FORCE_BODY is set */
2039 if (body && FORCE_BODY) {
2040 _forceRemove(body.firstChild);
2041 }
2042 /* Get node iterator */
2043 const nodeIterator = _createNodeIterator(IN_PLACE ? dirty : body);
2044 /* Now start iterating over the created document */
2045 while (currentNode = nodeIterator.nextNode()) {
2046 /* Sanitize tags and elements */
2047 _sanitizeElements(currentNode);
2048 /* Check attributes next */
2049 _sanitizeAttributes(currentNode);
2050 /* Shadow DOM detected, sanitize it */
2051 if (currentNode.content instanceof DocumentFragment) {
2052 _sanitizeShadowDOM(currentNode.content);
2053 }
2054 }
2055 /* If we sanitized `dirty` in-place, return it. */
2056 if (IN_PLACE) {
2057 return dirty;
2058 }
2059 /* Return sanitized string or DOM */
2060 if (RETURN_DOM) {
2061 if (RETURN_DOM_FRAGMENT) {
2062 returnNode = createDocumentFragment.call(body.ownerDocument);
2063 while (body.firstChild) {
2064 // eslint-disable-next-line unicorn/prefer-dom-node-append
2065 returnNode.appendChild(body.firstChild);
2066 }
2067 } else {
2068 returnNode = body;
2069 }
2070 if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) {
2071 /*
2072 AdoptNode() is not used because internal state is not reset
2073 (e.g. the past names map of a HTMLFormElement), this is safe
2074 in theory but we would rather not risk another attack vector.
2075 The state that is cloned by importNode() is explicitly defined
2076 by the specs.
2077 */
2078 returnNode = importNode.call(originalDocument, returnNode, true);
2079 }
2080 return returnNode;
2081 }
2082 let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;
2083 /* Serialize doctype if allowed */
2084 if (WHOLE_DOCUMENT && ALLOWED_TAGS['!doctype'] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {
2085 serializedHTML = '<!DOCTYPE ' + body.ownerDocument.doctype.name + '>\n' + serializedHTML;
2086 }
2087 /* Sanitize final string template-safe */
2088 if (SAFE_FOR_TEMPLATES) {
2089 arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {
2090 serializedHTML = stringReplace(serializedHTML, expr, ' ');
2091 });
2092 }
2093 return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;
2094 };
2095 DOMPurify.setConfig = function () {
2096 let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2097 _parseConfig(cfg);
2098 SET_CONFIG = true;
2099 };
2100 DOMPurify.clearConfig = function () {
2101 CONFIG = null;
2102 SET_CONFIG = false;
2103 };
2104 DOMPurify.isValidAttribute = function (tag, attr, value) {
2105 /* Initialize shared config vars if necessary. */
2106 if (!CONFIG) {
2107 _parseConfig({});
2108 }
2109 const lcTag = transformCaseFunc(tag);
2110 const lcName = transformCaseFunc(attr);
2111 return _isValidAttribute(lcTag, lcName, value);
2112 };
2113 DOMPurify.addHook = function (entryPoint, hookFunction) {
2114 if (typeof hookFunction !== 'function') {
2115 return;
2116 }
2117 arrayPush(hooks[entryPoint], hookFunction);
2118 };
2119 DOMPurify.removeHook = function (entryPoint, hookFunction) {
2120 if (hookFunction !== undefined) {
2121 const index = arrayLastIndexOf(hooks[entryPoint], hookFunction);
2122 return index === -1 ? undefined : arraySplice(hooks[entryPoint], index, 1)[0];
2123 }
2124 return arrayPop(hooks[entryPoint]);
2125 };
2126 DOMPurify.removeHooks = function (entryPoint) {
2127 hooks[entryPoint] = [];
2128 };
2129 DOMPurify.removeAllHooks = function () {
2130 hooks = _createHooksMap();
2131 };
2132 return DOMPurify;
2133 }
2134 var purify = createDOMPurify();
2135
2136 module.exports = purify;
2137 //# sourceMappingURL=purify.cjs.js.map
2138
2139
2140 /***/ }),
2141
2142 /***/ "../node_modules/object-assign/index.js":
2143 /*!**********************************************!*\
2144 !*** ../node_modules/object-assign/index.js ***!
2145 \**********************************************/
2146 /***/ ((module) => {
2147
2148 "use strict";
2149 /*
2150 object-assign
2151 (c) Sindre Sorhus
2152 @license MIT
2153 */
2154
2155
2156 /* eslint-disable no-unused-vars */
2157 var getOwnPropertySymbols = Object.getOwnPropertySymbols;
2158 var hasOwnProperty = Object.prototype.hasOwnProperty;
2159 var propIsEnumerable = Object.prototype.propertyIsEnumerable;
2160
2161 function toObject(val) {
2162 if (val === null || val === undefined) {
2163 throw new TypeError('Object.assign cannot be called with null or undefined');
2164 }
2165
2166 return Object(val);
2167 }
2168
2169 function shouldUseNative() {
2170 try {
2171 if (!Object.assign) {
2172 return false;
2173 }
2174
2175 // Detect buggy property enumeration order in older V8 versions.
2176
2177 // https://bugs.chromium.org/p/v8/issues/detail?id=4118
2178 var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
2179 test1[5] = 'de';
2180 if (Object.getOwnPropertyNames(test1)[0] === '5') {
2181 return false;
2182 }
2183
2184 // https://bugs.chromium.org/p/v8/issues/detail?id=3056
2185 var test2 = {};
2186 for (var i = 0; i < 10; i++) {
2187 test2['_' + String.fromCharCode(i)] = i;
2188 }
2189 var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
2190 return test2[n];
2191 });
2192 if (order2.join('') !== '0123456789') {
2193 return false;
2194 }
2195
2196 // https://bugs.chromium.org/p/v8/issues/detail?id=3056
2197 var test3 = {};
2198 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
2199 test3[letter] = letter;
2200 });
2201 if (Object.keys(Object.assign({}, test3)).join('') !==
2202 'abcdefghijklmnopqrst') {
2203 return false;
2204 }
2205
2206 return true;
2207 } catch (err) {
2208 // We don't expect any of the above to throw, but better to be safe.
2209 return false;
2210 }
2211 }
2212
2213 module.exports = shouldUseNative() ? Object.assign : function (target, source) {
2214 var from;
2215 var to = toObject(target);
2216 var symbols;
2217
2218 for (var s = 1; s < arguments.length; s++) {
2219 from = Object(arguments[s]);
2220
2221 for (var key in from) {
2222 if (hasOwnProperty.call(from, key)) {
2223 to[key] = from[key];
2224 }
2225 }
2226
2227 if (getOwnPropertySymbols) {
2228 symbols = getOwnPropertySymbols(from);
2229 for (var i = 0; i < symbols.length; i++) {
2230 if (propIsEnumerable.call(from, symbols[i])) {
2231 to[symbols[i]] = from[symbols[i]];
2232 }
2233 }
2234 }
2235 }
2236
2237 return to;
2238 };
2239
2240
2241 /***/ }),
2242
2243 /***/ "../node_modules/prop-types/checkPropTypes.js":
2244 /*!****************************************************!*\
2245 !*** ../node_modules/prop-types/checkPropTypes.js ***!
2246 \****************************************************/
2247 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2248
2249 "use strict";
2250 /**
2251 * Copyright (c) 2013-present, Facebook, Inc.
2252 *
2253 * This source code is licensed under the MIT license found in the
2254 * LICENSE file in the root directory of this source tree.
2255 */
2256
2257
2258
2259 var printWarning = function() {};
2260
2261 if (true) {
2262 var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "../node_modules/prop-types/lib/ReactPropTypesSecret.js");
2263 var loggedTypeFailures = {};
2264 var has = __webpack_require__(/*! ./lib/has */ "../node_modules/prop-types/lib/has.js");
2265
2266 printWarning = function(text) {
2267 var message = 'Warning: ' + text;
2268 if (typeof console !== 'undefined') {
2269 console.error(message);
2270 }
2271 try {
2272 // --- Welcome to debugging React ---
2273 // This error was thrown as a convenience so that you can use this stack
2274 // to find the callsite that caused this warning to fire.
2275 throw new Error(message);
2276 } catch (x) { /**/ }
2277 };
2278 }
2279
2280 /**
2281 * Assert that the values match with the type specs.
2282 * Error messages are memorized and will only be shown once.
2283 *
2284 * @param {object} typeSpecs Map of name to a ReactPropType
2285 * @param {object} values Runtime values that need to be type-checked
2286 * @param {string} location e.g. "prop", "context", "child context"
2287 * @param {string} componentName Name of the component for error messages.
2288 * @param {?Function} getStack Returns the component stack.
2289 * @private
2290 */
2291 function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
2292 if (true) {
2293 for (var typeSpecName in typeSpecs) {
2294 if (has(typeSpecs, typeSpecName)) {
2295 var error;
2296 // Prop type validation may throw. In case they do, we don't want to
2297 // fail the render phase where it didn't fail before. So we log it.
2298 // After these have been cleaned up, we'll let them throw.
2299 try {
2300 // This is intentionally an invariant that gets caught. It's the same
2301 // behavior as without this statement except with a better message.
2302 if (typeof typeSpecs[typeSpecName] !== 'function') {
2303 var err = Error(
2304 (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
2305 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
2306 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
2307 );
2308 err.name = 'Invariant Violation';
2309 throw err;
2310 }
2311 error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
2312 } catch (ex) {
2313 error = ex;
2314 }
2315 if (error && !(error instanceof Error)) {
2316 printWarning(
2317 (componentName || 'React class') + ': type specification of ' +
2318 location + ' `' + typeSpecName + '` is invalid; the type checker ' +
2319 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
2320 'You may have forgotten to pass an argument to the type checker ' +
2321 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
2322 'shape all require an argument).'
2323 );
2324 }
2325 if (error instanceof Error && !(error.message in loggedTypeFailures)) {
2326 // Only monitor this failure once because there tends to be a lot of the
2327 // same error.
2328 loggedTypeFailures[error.message] = true;
2329
2330 var stack = getStack ? getStack() : '';
2331
2332 printWarning(
2333 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
2334 );
2335 }
2336 }
2337 }
2338 }
2339 }
2340
2341 /**
2342 * Resets warning cache when testing.
2343 *
2344 * @private
2345 */
2346 checkPropTypes.resetWarningCache = function() {
2347 if (true) {
2348 loggedTypeFailures = {};
2349 }
2350 }
2351
2352 module.exports = checkPropTypes;
2353
2354
2355 /***/ }),
2356
2357 /***/ "../node_modules/prop-types/factoryWithTypeCheckers.js":
2358 /*!*************************************************************!*\
2359 !*** ../node_modules/prop-types/factoryWithTypeCheckers.js ***!
2360 \*************************************************************/
2361 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2362
2363 "use strict";
2364 /**
2365 * Copyright (c) 2013-present, Facebook, Inc.
2366 *
2367 * This source code is licensed under the MIT license found in the
2368 * LICENSE file in the root directory of this source tree.
2369 */
2370
2371
2372
2373 var ReactIs = __webpack_require__(/*! react-is */ "../node_modules/prop-types/node_modules/react-is/index.js");
2374 var assign = __webpack_require__(/*! object-assign */ "../node_modules/object-assign/index.js");
2375
2376 var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "../node_modules/prop-types/lib/ReactPropTypesSecret.js");
2377 var has = __webpack_require__(/*! ./lib/has */ "../node_modules/prop-types/lib/has.js");
2378 var checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ "../node_modules/prop-types/checkPropTypes.js");
2379
2380 var printWarning = function() {};
2381
2382 if (true) {
2383 printWarning = function(text) {
2384 var message = 'Warning: ' + text;
2385 if (typeof console !== 'undefined') {
2386 console.error(message);
2387 }
2388 try {
2389 // --- Welcome to debugging React ---
2390 // This error was thrown as a convenience so that you can use this stack
2391 // to find the callsite that caused this warning to fire.
2392 throw new Error(message);
2393 } catch (x) {}
2394 };
2395 }
2396
2397 function emptyFunctionThatReturnsNull() {
2398 return null;
2399 }
2400
2401 module.exports = function(isValidElement, throwOnDirectAccess) {
2402 /* global Symbol */
2403 var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
2404 var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
2405
2406 /**
2407 * Returns the iterator method function contained on the iterable object.
2408 *
2409 * Be sure to invoke the function with the iterable as context:
2410 *
2411 * var iteratorFn = getIteratorFn(myIterable);
2412 * if (iteratorFn) {
2413 * var iterator = iteratorFn.call(myIterable);
2414 * ...
2415 * }
2416 *
2417 * @param {?object} maybeIterable
2418 * @return {?function}
2419 */
2420 function getIteratorFn(maybeIterable) {
2421 var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
2422 if (typeof iteratorFn === 'function') {
2423 return iteratorFn;
2424 }
2425 }
2426
2427 /**
2428 * Collection of methods that allow declaration and validation of props that are
2429 * supplied to React components. Example usage:
2430 *
2431 * var Props = require('ReactPropTypes');
2432 * var MyArticle = React.createClass({
2433 * propTypes: {
2434 * // An optional string prop named "description".
2435 * description: Props.string,
2436 *
2437 * // A required enum prop named "category".
2438 * category: Props.oneOf(['News','Photos']).isRequired,
2439 *
2440 * // A prop named "dialog" that requires an instance of Dialog.
2441 * dialog: Props.instanceOf(Dialog).isRequired
2442 * },
2443 * render: function() { ... }
2444 * });
2445 *
2446 * A more formal specification of how these methods are used:
2447 *
2448 * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
2449 * decl := ReactPropTypes.{type}(.isRequired)?
2450 *
2451 * Each and every declaration produces a function with the same signature. This
2452 * allows the creation of custom validation functions. For example:
2453 *
2454 * var MyLink = React.createClass({
2455 * propTypes: {
2456 * // An optional string or URI prop named "href".
2457 * href: function(props, propName, componentName) {
2458 * var propValue = props[propName];
2459 * if (propValue != null && typeof propValue !== 'string' &&
2460 * !(propValue instanceof URI)) {
2461 * return new Error(
2462 * 'Expected a string or an URI for ' + propName + ' in ' +
2463 * componentName
2464 * );
2465 * }
2466 * }
2467 * },
2468 * render: function() {...}
2469 * });
2470 *
2471 * @internal
2472 */
2473
2474 var ANONYMOUS = '<<anonymous>>';
2475
2476 // Important!
2477 // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
2478 var ReactPropTypes = {
2479 array: createPrimitiveTypeChecker('array'),
2480 bigint: createPrimitiveTypeChecker('bigint'),
2481 bool: createPrimitiveTypeChecker('boolean'),
2482 func: createPrimitiveTypeChecker('function'),
2483 number: createPrimitiveTypeChecker('number'),
2484 object: createPrimitiveTypeChecker('object'),
2485 string: createPrimitiveTypeChecker('string'),
2486 symbol: createPrimitiveTypeChecker('symbol'),
2487
2488 any: createAnyTypeChecker(),
2489 arrayOf: createArrayOfTypeChecker,
2490 element: createElementTypeChecker(),
2491 elementType: createElementTypeTypeChecker(),
2492 instanceOf: createInstanceTypeChecker,
2493 node: createNodeChecker(),
2494 objectOf: createObjectOfTypeChecker,
2495 oneOf: createEnumTypeChecker,
2496 oneOfType: createUnionTypeChecker,
2497 shape: createShapeTypeChecker,
2498 exact: createStrictShapeTypeChecker,
2499 };
2500
2501 /**
2502 * inlined Object.is polyfill to avoid requiring consumers ship their own
2503 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
2504 */
2505 /*eslint-disable no-self-compare*/
2506 function is(x, y) {
2507 // SameValue algorithm
2508 if (x === y) {
2509 // Steps 1-5, 7-10
2510 // Steps 6.b-6.e: +0 != -0
2511 return x !== 0 || 1 / x === 1 / y;
2512 } else {
2513 // Step 6.a: NaN == NaN
2514 return x !== x && y !== y;
2515 }
2516 }
2517 /*eslint-enable no-self-compare*/
2518
2519 /**
2520 * We use an Error-like object for backward compatibility as people may call
2521 * PropTypes directly and inspect their output. However, we don't use real
2522 * Errors anymore. We don't inspect their stack anyway, and creating them
2523 * is prohibitively expensive if they are created too often, such as what
2524 * happens in oneOfType() for any type before the one that matched.
2525 */
2526 function PropTypeError(message, data) {
2527 this.message = message;
2528 this.data = data && typeof data === 'object' ? data: {};
2529 this.stack = '';
2530 }
2531 // Make `instanceof Error` still work for returned errors.
2532 PropTypeError.prototype = Error.prototype;
2533
2534 function createChainableTypeChecker(validate) {
2535 if (true) {
2536 var manualPropTypeCallCache = {};
2537 var manualPropTypeWarningCount = 0;
2538 }
2539 function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
2540 componentName = componentName || ANONYMOUS;
2541 propFullName = propFullName || propName;
2542
2543 if (secret !== ReactPropTypesSecret) {
2544 if (throwOnDirectAccess) {
2545 // New behavior only for users of `prop-types` package
2546 var err = new Error(
2547 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
2548 'Use `PropTypes.checkPropTypes()` to call them. ' +
2549 'Read more at http://fb.me/use-check-prop-types'
2550 );
2551 err.name = 'Invariant Violation';
2552 throw err;
2553 } else if ( true && typeof console !== 'undefined') {
2554 // Old behavior for people using React.PropTypes
2555 var cacheKey = componentName + ':' + propName;
2556 if (
2557 !manualPropTypeCallCache[cacheKey] &&
2558 // Avoid spamming the console because they are often not actionable except for lib authors
2559 manualPropTypeWarningCount < 3
2560 ) {
2561 printWarning(
2562 'You are manually calling a React.PropTypes validation ' +
2563 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
2564 'and will throw in the standalone `prop-types` package. ' +
2565 'You may be seeing this warning due to a third-party PropTypes ' +
2566 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
2567 );
2568 manualPropTypeCallCache[cacheKey] = true;
2569 manualPropTypeWarningCount++;
2570 }
2571 }
2572 }
2573 if (props[propName] == null) {
2574 if (isRequired) {
2575 if (props[propName] === null) {
2576 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
2577 }
2578 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
2579 }
2580 return null;
2581 } else {
2582 return validate(props, propName, componentName, location, propFullName);
2583 }
2584 }
2585
2586 var chainedCheckType = checkType.bind(null, false);
2587 chainedCheckType.isRequired = checkType.bind(null, true);
2588
2589 return chainedCheckType;
2590 }
2591
2592 function createPrimitiveTypeChecker(expectedType) {
2593 function validate(props, propName, componentName, location, propFullName, secret) {
2594 var propValue = props[propName];
2595 var propType = getPropType(propValue);
2596 if (propType !== expectedType) {
2597 // `propValue` being instance of, say, date/regexp, pass the 'object'
2598 // check, but we can offer a more precise error message here rather than
2599 // 'of type `object`'.
2600 var preciseType = getPreciseType(propValue);
2601
2602 return new PropTypeError(
2603 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
2604 {expectedType: expectedType}
2605 );
2606 }
2607 return null;
2608 }
2609 return createChainableTypeChecker(validate);
2610 }
2611
2612 function createAnyTypeChecker() {
2613 return createChainableTypeChecker(emptyFunctionThatReturnsNull);
2614 }
2615
2616 function createArrayOfTypeChecker(typeChecker) {
2617 function validate(props, propName, componentName, location, propFullName) {
2618 if (typeof typeChecker !== 'function') {
2619 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
2620 }
2621 var propValue = props[propName];
2622 if (!Array.isArray(propValue)) {
2623 var propType = getPropType(propValue);
2624 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
2625 }
2626 for (var i = 0; i < propValue.length; i++) {
2627 var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
2628 if (error instanceof Error) {
2629 return error;
2630 }
2631 }
2632 return null;
2633 }
2634 return createChainableTypeChecker(validate);
2635 }
2636
2637 function createElementTypeChecker() {
2638 function validate(props, propName, componentName, location, propFullName) {
2639 var propValue = props[propName];
2640 if (!isValidElement(propValue)) {
2641 var propType = getPropType(propValue);
2642 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
2643 }
2644 return null;
2645 }
2646 return createChainableTypeChecker(validate);
2647 }
2648
2649 function createElementTypeTypeChecker() {
2650 function validate(props, propName, componentName, location, propFullName) {
2651 var propValue = props[propName];
2652 if (!ReactIs.isValidElementType(propValue)) {
2653 var propType = getPropType(propValue);
2654 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
2655 }
2656 return null;
2657 }
2658 return createChainableTypeChecker(validate);
2659 }
2660
2661 function createInstanceTypeChecker(expectedClass) {
2662 function validate(props, propName, componentName, location, propFullName) {
2663 if (!(props[propName] instanceof expectedClass)) {
2664 var expectedClassName = expectedClass.name || ANONYMOUS;
2665 var actualClassName = getClassName(props[propName]);
2666 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
2667 }
2668 return null;
2669 }
2670 return createChainableTypeChecker(validate);
2671 }
2672
2673 function createEnumTypeChecker(expectedValues) {
2674 if (!Array.isArray(expectedValues)) {
2675 if (true) {
2676 if (arguments.length > 1) {
2677 printWarning(
2678 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
2679 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
2680 );
2681 } else {
2682 printWarning('Invalid argument supplied to oneOf, expected an array.');
2683 }
2684 }
2685 return emptyFunctionThatReturnsNull;
2686 }
2687
2688 function validate(props, propName, componentName, location, propFullName) {
2689 var propValue = props[propName];
2690 for (var i = 0; i < expectedValues.length; i++) {
2691 if (is(propValue, expectedValues[i])) {
2692 return null;
2693 }
2694 }
2695
2696 var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
2697 var type = getPreciseType(value);
2698 if (type === 'symbol') {
2699 return String(value);
2700 }
2701 return value;
2702 });
2703 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
2704 }
2705 return createChainableTypeChecker(validate);
2706 }
2707
2708 function createObjectOfTypeChecker(typeChecker) {
2709 function validate(props, propName, componentName, location, propFullName) {
2710 if (typeof typeChecker !== 'function') {
2711 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
2712 }
2713 var propValue = props[propName];
2714 var propType = getPropType(propValue);
2715 if (propType !== 'object') {
2716 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
2717 }
2718 for (var key in propValue) {
2719 if (has(propValue, key)) {
2720 var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
2721 if (error instanceof Error) {
2722 return error;
2723 }
2724 }
2725 }
2726 return null;
2727 }
2728 return createChainableTypeChecker(validate);
2729 }
2730
2731 function createUnionTypeChecker(arrayOfTypeCheckers) {
2732 if (!Array.isArray(arrayOfTypeCheckers)) {
2733 true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : 0;
2734 return emptyFunctionThatReturnsNull;
2735 }
2736
2737 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
2738 var checker = arrayOfTypeCheckers[i];
2739 if (typeof checker !== 'function') {
2740 printWarning(
2741 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
2742 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
2743 );
2744 return emptyFunctionThatReturnsNull;
2745 }
2746 }
2747
2748 function validate(props, propName, componentName, location, propFullName) {
2749 var expectedTypes = [];
2750 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
2751 var checker = arrayOfTypeCheckers[i];
2752 var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
2753 if (checkerResult == null) {
2754 return null;
2755 }
2756 if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
2757 expectedTypes.push(checkerResult.data.expectedType);
2758 }
2759 }
2760 var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
2761 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
2762 }
2763 return createChainableTypeChecker(validate);
2764 }
2765
2766 function createNodeChecker() {
2767 function validate(props, propName, componentName, location, propFullName) {
2768 if (!isNode(props[propName])) {
2769 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
2770 }
2771 return null;
2772 }
2773 return createChainableTypeChecker(validate);
2774 }
2775
2776 function invalidValidatorError(componentName, location, propFullName, key, type) {
2777 return new PropTypeError(
2778 (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
2779 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
2780 );
2781 }
2782
2783 function createShapeTypeChecker(shapeTypes) {
2784 function validate(props, propName, componentName, location, propFullName) {
2785 var propValue = props[propName];
2786 var propType = getPropType(propValue);
2787 if (propType !== 'object') {
2788 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
2789 }
2790 for (var key in shapeTypes) {
2791 var checker = shapeTypes[key];
2792 if (typeof checker !== 'function') {
2793 return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
2794 }
2795 var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
2796 if (error) {
2797 return error;
2798 }
2799 }
2800 return null;
2801 }
2802 return createChainableTypeChecker(validate);
2803 }
2804
2805 function createStrictShapeTypeChecker(shapeTypes) {
2806 function validate(props, propName, componentName, location, propFullName) {
2807 var propValue = props[propName];
2808 var propType = getPropType(propValue);
2809 if (propType !== 'object') {
2810 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
2811 }
2812 // We need to check all keys in case some are required but missing from props.
2813 var allKeys = assign({}, props[propName], shapeTypes);
2814 for (var key in allKeys) {
2815 var checker = shapeTypes[key];
2816 if (has(shapeTypes, key) && typeof checker !== 'function') {
2817 return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
2818 }
2819 if (!checker) {
2820 return new PropTypeError(
2821 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
2822 '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
2823 '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
2824 );
2825 }
2826 var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
2827 if (error) {
2828 return error;
2829 }
2830 }
2831 return null;
2832 }
2833
2834 return createChainableTypeChecker(validate);
2835 }
2836
2837 function isNode(propValue) {
2838 switch (typeof propValue) {
2839 case 'number':
2840 case 'string':
2841 case 'undefined':
2842 return true;
2843 case 'boolean':
2844 return !propValue;
2845 case 'object':
2846 if (Array.isArray(propValue)) {
2847 return propValue.every(isNode);
2848 }
2849 if (propValue === null || isValidElement(propValue)) {
2850 return true;
2851 }
2852
2853 var iteratorFn = getIteratorFn(propValue);
2854 if (iteratorFn) {
2855 var iterator = iteratorFn.call(propValue);
2856 var step;
2857 if (iteratorFn !== propValue.entries) {
2858 while (!(step = iterator.next()).done) {
2859 if (!isNode(step.value)) {
2860 return false;
2861 }
2862 }
2863 } else {
2864 // Iterator will provide entry [k,v] tuples rather than values.
2865 while (!(step = iterator.next()).done) {
2866 var entry = step.value;
2867 if (entry) {
2868 if (!isNode(entry[1])) {
2869 return false;
2870 }
2871 }
2872 }
2873 }
2874 } else {
2875 return false;
2876 }
2877
2878 return true;
2879 default:
2880 return false;
2881 }
2882 }
2883
2884 function isSymbol(propType, propValue) {
2885 // Native Symbol.
2886 if (propType === 'symbol') {
2887 return true;
2888 }
2889
2890 // falsy value can't be a Symbol
2891 if (!propValue) {
2892 return false;
2893 }
2894
2895 // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
2896 if (propValue['@@toStringTag'] === 'Symbol') {
2897 return true;
2898 }
2899
2900 // Fallback for non-spec compliant Symbols which are polyfilled.
2901 if (typeof Symbol === 'function' && propValue instanceof Symbol) {
2902 return true;
2903 }
2904
2905 return false;
2906 }
2907
2908 // Equivalent of `typeof` but with special handling for array and regexp.
2909 function getPropType(propValue) {
2910 var propType = typeof propValue;
2911 if (Array.isArray(propValue)) {
2912 return 'array';
2913 }
2914 if (propValue instanceof RegExp) {
2915 // Old webkits (at least until Android 4.0) return 'function' rather than
2916 // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
2917 // passes PropTypes.object.
2918 return 'object';
2919 }
2920 if (isSymbol(propType, propValue)) {
2921 return 'symbol';
2922 }
2923 return propType;
2924 }
2925
2926 // This handles more types than `getPropType`. Only used for error messages.
2927 // See `createPrimitiveTypeChecker`.
2928 function getPreciseType(propValue) {
2929 if (typeof propValue === 'undefined' || propValue === null) {
2930 return '' + propValue;
2931 }
2932 var propType = getPropType(propValue);
2933 if (propType === 'object') {
2934 if (propValue instanceof Date) {
2935 return 'date';
2936 } else if (propValue instanceof RegExp) {
2937 return 'regexp';
2938 }
2939 }
2940 return propType;
2941 }
2942
2943 // Returns a string that is postfixed to a warning about an invalid type.
2944 // For example, "undefined" or "of type array"
2945 function getPostfixForTypeWarning(value) {
2946 var type = getPreciseType(value);
2947 switch (type) {
2948 case 'array':
2949 case 'object':
2950 return 'an ' + type;
2951 case 'boolean':
2952 case 'date':
2953 case 'regexp':
2954 return 'a ' + type;
2955 default:
2956 return type;
2957 }
2958 }
2959
2960 // Returns class name of the object, if any.
2961 function getClassName(propValue) {
2962 if (!propValue.constructor || !propValue.constructor.name) {
2963 return ANONYMOUS;
2964 }
2965 return propValue.constructor.name;
2966 }
2967
2968 ReactPropTypes.checkPropTypes = checkPropTypes;
2969 ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
2970 ReactPropTypes.PropTypes = ReactPropTypes;
2971
2972 return ReactPropTypes;
2973 };
2974
2975
2976 /***/ }),
2977
2978 /***/ "../node_modules/prop-types/index.js":
2979 /*!*******************************************!*\
2980 !*** ../node_modules/prop-types/index.js ***!
2981 \*******************************************/
2982 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2983
2984 /**
2985 * Copyright (c) 2013-present, Facebook, Inc.
2986 *
2987 * This source code is licensed under the MIT license found in the
2988 * LICENSE file in the root directory of this source tree.
2989 */
2990
2991 if (true) {
2992 var ReactIs = __webpack_require__(/*! react-is */ "../node_modules/prop-types/node_modules/react-is/index.js");
2993
2994 // By explicitly using `prop-types` you are opting into new development behavior.
2995 // http://fb.me/prop-types-in-prod
2996 var throwOnDirectAccess = true;
2997 module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "../node_modules/prop-types/factoryWithTypeCheckers.js")(ReactIs.isElement, throwOnDirectAccess);
2998 } else {}
2999
3000
3001 /***/ }),
3002
3003 /***/ "../node_modules/prop-types/lib/ReactPropTypesSecret.js":
3004 /*!**************************************************************!*\
3005 !*** ../node_modules/prop-types/lib/ReactPropTypesSecret.js ***!
3006 \**************************************************************/
3007 /***/ ((module) => {
3008
3009 "use strict";
3010 /**
3011 * Copyright (c) 2013-present, Facebook, Inc.
3012 *
3013 * This source code is licensed under the MIT license found in the
3014 * LICENSE file in the root directory of this source tree.
3015 */
3016
3017
3018
3019 var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
3020
3021 module.exports = ReactPropTypesSecret;
3022
3023
3024 /***/ }),
3025
3026 /***/ "../node_modules/prop-types/lib/has.js":
3027 /*!*********************************************!*\
3028 !*** ../node_modules/prop-types/lib/has.js ***!
3029 \*********************************************/
3030 /***/ ((module) => {
3031
3032 module.exports = Function.call.bind(Object.prototype.hasOwnProperty);
3033
3034
3035 /***/ }),
3036
3037 /***/ "../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js":
3038 /*!************************************************************************************!*\
3039 !*** ../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js ***!
3040 \************************************************************************************/
3041 /***/ ((__unused_webpack_module, exports) => {
3042
3043 "use strict";
3044 /** @license React v16.13.1
3045 * react-is.development.js
3046 *
3047 * Copyright (c) Facebook, Inc. and its affiliates.
3048 *
3049 * This source code is licensed under the MIT license found in the
3050 * LICENSE file in the root directory of this source tree.
3051 */
3052
3053
3054
3055
3056
3057 if (true) {
3058 (function() {
3059 'use strict';
3060
3061 // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
3062 // nor polyfill, then a plain number is used for performance.
3063 var hasSymbol = typeof Symbol === 'function' && Symbol.for;
3064 var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
3065 var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
3066 var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
3067 var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
3068 var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
3069 var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
3070 var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
3071 // (unstable) APIs that have been removed. Can we remove the symbols?
3072
3073 var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
3074 var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
3075 var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
3076 var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
3077 var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
3078 var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
3079 var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
3080 var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
3081 var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
3082 var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
3083 var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
3084
3085 function isValidElementType(type) {
3086 return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
3087 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);
3088 }
3089
3090 function typeOf(object) {
3091 if (typeof object === 'object' && object !== null) {
3092 var $$typeof = object.$$typeof;
3093
3094 switch ($$typeof) {
3095 case REACT_ELEMENT_TYPE:
3096 var type = object.type;
3097
3098 switch (type) {
3099 case REACT_ASYNC_MODE_TYPE:
3100 case REACT_CONCURRENT_MODE_TYPE:
3101 case REACT_FRAGMENT_TYPE:
3102 case REACT_PROFILER_TYPE:
3103 case REACT_STRICT_MODE_TYPE:
3104 case REACT_SUSPENSE_TYPE:
3105 return type;
3106
3107 default:
3108 var $$typeofType = type && type.$$typeof;
3109
3110 switch ($$typeofType) {
3111 case REACT_CONTEXT_TYPE:
3112 case REACT_FORWARD_REF_TYPE:
3113 case REACT_LAZY_TYPE:
3114 case REACT_MEMO_TYPE:
3115 case REACT_PROVIDER_TYPE:
3116 return $$typeofType;
3117
3118 default:
3119 return $$typeof;
3120 }
3121
3122 }
3123
3124 case REACT_PORTAL_TYPE:
3125 return $$typeof;
3126 }
3127 }
3128
3129 return undefined;
3130 } // AsyncMode is deprecated along with isAsyncMode
3131
3132 var AsyncMode = REACT_ASYNC_MODE_TYPE;
3133 var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
3134 var ContextConsumer = REACT_CONTEXT_TYPE;
3135 var ContextProvider = REACT_PROVIDER_TYPE;
3136 var Element = REACT_ELEMENT_TYPE;
3137 var ForwardRef = REACT_FORWARD_REF_TYPE;
3138 var Fragment = REACT_FRAGMENT_TYPE;
3139 var Lazy = REACT_LAZY_TYPE;
3140 var Memo = REACT_MEMO_TYPE;
3141 var Portal = REACT_PORTAL_TYPE;
3142 var Profiler = REACT_PROFILER_TYPE;
3143 var StrictMode = REACT_STRICT_MODE_TYPE;
3144 var Suspense = REACT_SUSPENSE_TYPE;
3145 var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
3146
3147 function isAsyncMode(object) {
3148 {
3149 if (!hasWarnedAboutDeprecatedIsAsyncMode) {
3150 hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
3151
3152 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.');
3153 }
3154 }
3155
3156 return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
3157 }
3158 function isConcurrentMode(object) {
3159 return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
3160 }
3161 function isContextConsumer(object) {
3162 return typeOf(object) === REACT_CONTEXT_TYPE;
3163 }
3164 function isContextProvider(object) {
3165 return typeOf(object) === REACT_PROVIDER_TYPE;
3166 }
3167 function isElement(object) {
3168 return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
3169 }
3170 function isForwardRef(object) {
3171 return typeOf(object) === REACT_FORWARD_REF_TYPE;
3172 }
3173 function isFragment(object) {
3174 return typeOf(object) === REACT_FRAGMENT_TYPE;
3175 }
3176 function isLazy(object) {
3177 return typeOf(object) === REACT_LAZY_TYPE;
3178 }
3179 function isMemo(object) {
3180 return typeOf(object) === REACT_MEMO_TYPE;
3181 }
3182 function isPortal(object) {
3183 return typeOf(object) === REACT_PORTAL_TYPE;
3184 }
3185 function isProfiler(object) {
3186 return typeOf(object) === REACT_PROFILER_TYPE;
3187 }
3188 function isStrictMode(object) {
3189 return typeOf(object) === REACT_STRICT_MODE_TYPE;
3190 }
3191 function isSuspense(object) {
3192 return typeOf(object) === REACT_SUSPENSE_TYPE;
3193 }
3194
3195 exports.AsyncMode = AsyncMode;
3196 exports.ConcurrentMode = ConcurrentMode;
3197 exports.ContextConsumer = ContextConsumer;
3198 exports.ContextProvider = ContextProvider;
3199 exports.Element = Element;
3200 exports.ForwardRef = ForwardRef;
3201 exports.Fragment = Fragment;
3202 exports.Lazy = Lazy;
3203 exports.Memo = Memo;
3204 exports.Portal = Portal;
3205 exports.Profiler = Profiler;
3206 exports.StrictMode = StrictMode;
3207 exports.Suspense = Suspense;
3208 exports.isAsyncMode = isAsyncMode;
3209 exports.isConcurrentMode = isConcurrentMode;
3210 exports.isContextConsumer = isContextConsumer;
3211 exports.isContextProvider = isContextProvider;
3212 exports.isElement = isElement;
3213 exports.isForwardRef = isForwardRef;
3214 exports.isFragment = isFragment;
3215 exports.isLazy = isLazy;
3216 exports.isMemo = isMemo;
3217 exports.isPortal = isPortal;
3218 exports.isProfiler = isProfiler;
3219 exports.isStrictMode = isStrictMode;
3220 exports.isSuspense = isSuspense;
3221 exports.isValidElementType = isValidElementType;
3222 exports.typeOf = typeOf;
3223 })();
3224 }
3225
3226
3227 /***/ }),
3228
3229 /***/ "../node_modules/prop-types/node_modules/react-is/index.js":
3230 /*!*****************************************************************!*\
3231 !*** ../node_modules/prop-types/node_modules/react-is/index.js ***!
3232 \*****************************************************************/
3233 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3234
3235 "use strict";
3236
3237
3238 if (false) {} else {
3239 module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js");
3240 }
3241
3242
3243 /***/ }),
3244
3245 /***/ "../node_modules/react-dom/client.js":
3246 /*!*******************************************!*\
3247 !*** ../node_modules/react-dom/client.js ***!
3248 \*******************************************/
3249 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
3250
3251 "use strict";
3252
3253
3254 var m = __webpack_require__(/*! react-dom */ "react-dom");
3255 if (false) {} else {
3256 var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
3257 exports.createRoot = function(c, o) {
3258 i.usingClientEntryPoint = true;
3259 try {
3260 return m.createRoot(c, o);
3261 } finally {
3262 i.usingClientEntryPoint = false;
3263 }
3264 };
3265 exports.hydrateRoot = function(c, h, o) {
3266 i.usingClientEntryPoint = true;
3267 try {
3268 return m.hydrateRoot(c, h, o);
3269 } finally {
3270 i.usingClientEntryPoint = false;
3271 }
3272 };
3273 }
3274
3275
3276 /***/ }),
3277
3278 /***/ "react":
3279 /*!************************!*\
3280 !*** external "React" ***!
3281 \************************/
3282 /***/ ((module) => {
3283
3284 "use strict";
3285 module.exports = React;
3286
3287 /***/ }),
3288
3289 /***/ "react-dom":
3290 /*!***************************!*\
3291 !*** external "ReactDOM" ***!
3292 \***************************/
3293 /***/ ((module) => {
3294
3295 "use strict";
3296 module.exports = ReactDOM;
3297
3298 /***/ }),
3299
3300 /***/ "@elementor/icons":
3301 /*!************************************!*\
3302 !*** external "elementorV2.icons" ***!
3303 \************************************/
3304 /***/ ((module) => {
3305
3306 "use strict";
3307 module.exports = elementorV2.icons;
3308
3309 /***/ }),
3310
3311 /***/ "@elementor/ui":
3312 /*!*********************************!*\
3313 !*** external "elementorV2.ui" ***!
3314 \*********************************/
3315 /***/ ((module) => {
3316
3317 "use strict";
3318 module.exports = elementorV2.ui;
3319
3320 /***/ }),
3321
3322 /***/ "@elementor/ui/DialogHeader":
3323 /*!*************************************************!*\
3324 !*** external "elementorV2.ui['DialogHeader']" ***!
3325 \*************************************************/
3326 /***/ ((module) => {
3327
3328 "use strict";
3329 module.exports = elementorV2.ui['DialogHeader'];
3330
3331 /***/ }),
3332
3333 /***/ "@elementor/ui/DialogHeaderGroup":
3334 /*!******************************************************!*\
3335 !*** external "elementorV2.ui['DialogHeaderGroup']" ***!
3336 \******************************************************/
3337 /***/ ((module) => {
3338
3339 "use strict";
3340 module.exports = elementorV2.ui['DialogHeaderGroup'];
3341
3342 /***/ }),
3343
3344 /***/ "@wordpress/i18n":
3345 /*!**************************!*\
3346 !*** external "wp.i18n" ***!
3347 \**************************/
3348 /***/ ((module) => {
3349
3350 "use strict";
3351 module.exports = wp.i18n;
3352
3353 /***/ }),
3354
3355 /***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js":
3356 /*!******************************************************************!*\
3357 !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
3358 \******************************************************************/
3359 /***/ ((module) => {
3360
3361 function _arrayLikeToArray(r, a) {
3362 (null == a || a > r.length) && (a = r.length);
3363 for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
3364 return n;
3365 }
3366 module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
3367
3368 /***/ }),
3369
3370 /***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js":
3371 /*!****************************************************************!*\
3372 !*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
3373 \****************************************************************/
3374 /***/ ((module) => {
3375
3376 function _arrayWithHoles(r) {
3377 if (Array.isArray(r)) return r;
3378 }
3379 module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
3380
3381 /***/ }),
3382
3383 /***/ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js":
3384 /*!******************************************************************!*\
3385 !*** ../node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
3386 \******************************************************************/
3387 /***/ ((module) => {
3388
3389 function asyncGeneratorStep(n, t, e, r, o, a, c) {
3390 try {
3391 var i = n[a](c),
3392 u = i.value;
3393 } catch (n) {
3394 return void e(n);
3395 }
3396 i.done ? t(u) : Promise.resolve(u).then(r, o);
3397 }
3398 function _asyncToGenerator(n) {
3399 return function () {
3400 var t = this,
3401 e = arguments;
3402 return new Promise(function (r, o) {
3403 var a = n.apply(t, e);
3404 function _next(n) {
3405 asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
3406 }
3407 function _throw(n) {
3408 asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
3409 }
3410 _next(void 0);
3411 });
3412 };
3413 }
3414 module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
3415
3416 /***/ }),
3417
3418 /***/ "../node_modules/@babel/runtime/helpers/defineProperty.js":
3419 /*!****************************************************************!*\
3420 !*** ../node_modules/@babel/runtime/helpers/defineProperty.js ***!
3421 \****************************************************************/
3422 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3423
3424 var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js");
3425 function _defineProperty(e, r, t) {
3426 return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
3427 value: t,
3428 enumerable: !0,
3429 configurable: !0,
3430 writable: !0
3431 }) : e[r] = t, e;
3432 }
3433 module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
3434
3435 /***/ }),
3436
3437 /***/ "../node_modules/@babel/runtime/helpers/extends.js":
3438 /*!*********************************************************!*\
3439 !*** ../node_modules/@babel/runtime/helpers/extends.js ***!
3440 \*********************************************************/
3441 /***/ ((module) => {
3442
3443 function _extends() {
3444 return module.exports = _extends = Object.assign ? Object.assign.bind() : function (n) {
3445 for (var e = 1; e < arguments.length; e++) {
3446 var t = arguments[e];
3447 for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
3448 }
3449 return n;
3450 }, module.exports.__esModule = true, module.exports["default"] = module.exports, _extends.apply(null, arguments);
3451 }
3452 module.exports = _extends, module.exports.__esModule = true, module.exports["default"] = module.exports;
3453
3454 /***/ }),
3455
3456 /***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js":
3457 /*!***********************************************************************!*\
3458 !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
3459 \***********************************************************************/
3460 /***/ ((module) => {
3461
3462 function _interopRequireDefault(e) {
3463 return e && e.__esModule ? e : {
3464 "default": e
3465 };
3466 }
3467 module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
3468
3469 /***/ }),
3470
3471 /***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js":
3472 /*!**********************************************************************!*\
3473 !*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
3474 \**********************************************************************/
3475 /***/ ((module) => {
3476
3477 function _iterableToArrayLimit(r, l) {
3478 var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
3479 if (null != t) {
3480 var e,
3481 n,
3482 i,
3483 u,
3484 a = [],
3485 f = !0,
3486 o = !1;
3487 try {
3488 if (i = (t = t.call(r)).next, 0 === l) {
3489 if (Object(t) !== t) return;
3490 f = !1;
3491 } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
3492 } catch (r) {
3493 o = !0, n = r;
3494 } finally {
3495 try {
3496 if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
3497 } finally {
3498 if (o) throw n;
3499 }
3500 }
3501 return a;
3502 }
3503 }
3504 module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
3505
3506 /***/ }),
3507
3508 /***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js":
3509 /*!*****************************************************************!*\
3510 !*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
3511 \*****************************************************************/
3512 /***/ ((module) => {
3513
3514 function _nonIterableRest() {
3515 throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3516 }
3517 module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
3518
3519 /***/ }),
3520
3521 /***/ "../node_modules/@babel/runtime/helpers/objectWithoutProperties.js":
3522 /*!*************************************************************************!*\
3523 !*** ../node_modules/@babel/runtime/helpers/objectWithoutProperties.js ***!
3524 \*************************************************************************/
3525 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3526
3527 var objectWithoutPropertiesLoose = __webpack_require__(/*! ./objectWithoutPropertiesLoose.js */ "../node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js");
3528 function _objectWithoutProperties(e, t) {
3529 if (null == e) return {};
3530 var o,
3531 r,
3532 i = objectWithoutPropertiesLoose(e, t);
3533 if (Object.getOwnPropertySymbols) {
3534 var s = Object.getOwnPropertySymbols(e);
3535 for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
3536 }
3537 return i;
3538 }
3539 module.exports = _objectWithoutProperties, module.exports.__esModule = true, module.exports["default"] = module.exports;
3540
3541 /***/ }),
3542
3543 /***/ "../node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js":
3544 /*!******************************************************************************!*\
3545 !*** ../node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js ***!
3546 \******************************************************************************/
3547 /***/ ((module) => {
3548
3549 function _objectWithoutPropertiesLoose(r, e) {
3550 if (null == r) return {};
3551 var t = {};
3552 for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
3553 if (e.includes(n)) continue;
3554 t[n] = r[n];
3555 }
3556 return t;
3557 }
3558 module.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports["default"] = module.exports;
3559
3560 /***/ }),
3561
3562 /***/ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js":
3563 /*!********************************************************************!*\
3564 !*** ../node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***!
3565 \********************************************************************/
3566 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3567
3568 var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]);
3569 function _regeneratorRuntime() {
3570 "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
3571 module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
3572 return e;
3573 }, module.exports.__esModule = true, module.exports["default"] = module.exports;
3574 var t,
3575 e = {},
3576 r = Object.prototype,
3577 n = r.hasOwnProperty,
3578 o = Object.defineProperty || function (t, e, r) {
3579 t[e] = r.value;
3580 },
3581 i = "function" == typeof Symbol ? Symbol : {},
3582 a = i.iterator || "@@iterator",
3583 c = i.asyncIterator || "@@asyncIterator",
3584 u = i.toStringTag || "@@toStringTag";
3585 function define(t, e, r) {
3586 return Object.defineProperty(t, e, {
3587 value: r,
3588 enumerable: !0,
3589 configurable: !0,
3590 writable: !0
3591 }), t[e];
3592 }
3593 try {
3594 define({}, "");
3595 } catch (t) {
3596 define = function define(t, e, r) {
3597 return t[e] = r;
3598 };
3599 }
3600 function wrap(t, e, r, n) {
3601 var i = e && e.prototype instanceof Generator ? e : Generator,
3602 a = Object.create(i.prototype),
3603 c = new Context(n || []);
3604 return o(a, "_invoke", {
3605 value: makeInvokeMethod(t, r, c)
3606 }), a;
3607 }
3608 function tryCatch(t, e, r) {
3609 try {
3610 return {
3611 type: "normal",
3612 arg: t.call(e, r)
3613 };
3614 } catch (t) {
3615 return {
3616 type: "throw",
3617 arg: t
3618 };
3619 }
3620 }
3621 e.wrap = wrap;
3622 var h = "suspendedStart",
3623 l = "suspendedYield",
3624 f = "executing",
3625 s = "completed",
3626 y = {};
3627 function Generator() {}
3628 function GeneratorFunction() {}
3629 function GeneratorFunctionPrototype() {}
3630 var p = {};
3631 define(p, a, function () {
3632 return this;
3633 });
3634 var d = Object.getPrototypeOf,
3635 v = d && d(d(values([])));
3636 v && v !== r && n.call(v, a) && (p = v);
3637 var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
3638 function defineIteratorMethods(t) {
3639 ["next", "throw", "return"].forEach(function (e) {
3640 define(t, e, function (t) {
3641 return this._invoke(e, t);
3642 });
3643 });
3644 }
3645 function AsyncIterator(t, e) {
3646 function invoke(r, o, i, a) {
3647 var c = tryCatch(t[r], t, o);
3648 if ("throw" !== c.type) {
3649 var u = c.arg,
3650 h = u.value;
3651 return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
3652 invoke("next", t, i, a);
3653 }, function (t) {
3654 invoke("throw", t, i, a);
3655 }) : e.resolve(h).then(function (t) {
3656 u.value = t, i(u);
3657 }, function (t) {
3658 return invoke("throw", t, i, a);
3659 });
3660 }
3661 a(c.arg);
3662 }
3663 var r;
3664 o(this, "_invoke", {
3665 value: function value(t, n) {
3666 function callInvokeWithMethodAndArg() {
3667 return new e(function (e, r) {
3668 invoke(t, n, e, r);
3669 });
3670 }
3671 return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
3672 }
3673 });
3674 }
3675 function makeInvokeMethod(e, r, n) {
3676 var o = h;
3677 return function (i, a) {
3678 if (o === f) throw Error("Generator is already running");
3679 if (o === s) {
3680 if ("throw" === i) throw a;
3681 return {
3682 value: t,
3683 done: !0
3684 };
3685 }
3686 for (n.method = i, n.arg = a;;) {
3687 var c = n.delegate;
3688 if (c) {
3689 var u = maybeInvokeDelegate(c, n);
3690 if (u) {
3691 if (u === y) continue;
3692 return u;
3693 }
3694 }
3695 if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
3696 if (o === h) throw o = s, n.arg;
3697 n.dispatchException(n.arg);
3698 } else "return" === n.method && n.abrupt("return", n.arg);
3699 o = f;
3700 var p = tryCatch(e, r, n);
3701 if ("normal" === p.type) {
3702 if (o = n.done ? s : l, p.arg === y) continue;
3703 return {
3704 value: p.arg,
3705 done: n.done
3706 };
3707 }
3708 "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
3709 }
3710 };
3711 }
3712 function maybeInvokeDelegate(e, r) {
3713 var n = r.method,
3714 o = e.iterator[n];
3715 if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
3716 var i = tryCatch(o, e.iterator, r.arg);
3717 if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
3718 var a = i.arg;
3719 return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
3720 }
3721 function pushTryEntry(t) {
3722 var e = {
3723 tryLoc: t[0]
3724 };
3725 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
3726 }
3727 function resetTryEntry(t) {
3728 var e = t.completion || {};
3729 e.type = "normal", delete e.arg, t.completion = e;
3730 }
3731 function Context(t) {
3732 this.tryEntries = [{
3733 tryLoc: "root"
3734 }], t.forEach(pushTryEntry, this), this.reset(!0);
3735 }
3736 function values(e) {
3737 if (e || "" === e) {
3738 var r = e[a];
3739 if (r) return r.call(e);
3740 if ("function" == typeof e.next) return e;
3741 if (!isNaN(e.length)) {
3742 var o = -1,
3743 i = function next() {
3744 for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
3745 return next.value = t, next.done = !0, next;
3746 };
3747 return i.next = i;
3748 }
3749 }
3750 throw new TypeError(_typeof(e) + " is not iterable");
3751 }
3752 return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
3753 value: GeneratorFunctionPrototype,
3754 configurable: !0
3755 }), o(GeneratorFunctionPrototype, "constructor", {
3756 value: GeneratorFunction,
3757 configurable: !0
3758 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
3759 var e = "function" == typeof t && t.constructor;
3760 return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
3761 }, e.mark = function (t) {
3762 return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
3763 }, e.awrap = function (t) {
3764 return {
3765 __await: t
3766 };
3767 }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
3768 return this;
3769 }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
3770 void 0 === i && (i = Promise);
3771 var a = new AsyncIterator(wrap(t, r, n, o), i);
3772 return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
3773 return t.done ? t.value : a.next();
3774 });
3775 }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
3776 return this;
3777 }), define(g, "toString", function () {
3778 return "[object Generator]";
3779 }), e.keys = function (t) {
3780 var e = Object(t),
3781 r = [];
3782 for (var n in e) r.push(n);
3783 return r.reverse(), function next() {
3784 for (; r.length;) {
3785 var t = r.pop();
3786 if (t in e) return next.value = t, next.done = !1, next;
3787 }
3788 return next.done = !0, next;
3789 };
3790 }, e.values = values, Context.prototype = {
3791 constructor: Context,
3792 reset: function reset(e) {
3793 if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
3794 },
3795 stop: function stop() {
3796 this.done = !0;
3797 var t = this.tryEntries[0].completion;
3798 if ("throw" === t.type) throw t.arg;
3799 return this.rval;
3800 },
3801 dispatchException: function dispatchException(e) {
3802 if (this.done) throw e;
3803 var r = this;
3804 function handle(n, o) {
3805 return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
3806 }
3807 for (var o = this.tryEntries.length - 1; o >= 0; --o) {
3808 var i = this.tryEntries[o],
3809 a = i.completion;
3810 if ("root" === i.tryLoc) return handle("end");
3811 if (i.tryLoc <= this.prev) {
3812 var c = n.call(i, "catchLoc"),
3813 u = n.call(i, "finallyLoc");
3814 if (c && u) {
3815 if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
3816 if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
3817 } else if (c) {
3818 if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
3819 } else {
3820 if (!u) throw Error("try statement without catch or finally");
3821 if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
3822 }
3823 }
3824 }
3825 },
3826 abrupt: function abrupt(t, e) {
3827 for (var r = this.tryEntries.length - 1; r >= 0; --r) {
3828 var o = this.tryEntries[r];
3829 if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
3830 var i = o;
3831 break;
3832 }
3833 }
3834 i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
3835 var a = i ? i.completion : {};
3836 return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
3837 },
3838 complete: function complete(t, e) {
3839 if ("throw" === t.type) throw t.arg;
3840 return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
3841 },
3842 finish: function finish(t) {
3843 for (var e = this.tryEntries.length - 1; e >= 0; --e) {
3844 var r = this.tryEntries[e];
3845 if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
3846 }
3847 },
3848 "catch": function _catch(t) {
3849 for (var e = this.tryEntries.length - 1; e >= 0; --e) {
3850 var r = this.tryEntries[e];
3851 if (r.tryLoc === t) {
3852 var n = r.completion;
3853 if ("throw" === n.type) {
3854 var o = n.arg;
3855 resetTryEntry(r);
3856 }
3857 return o;
3858 }
3859 }
3860 throw Error("illegal catch attempt");
3861 },
3862 delegateYield: function delegateYield(e, r, n) {
3863 return this.delegate = {
3864 iterator: values(e),
3865 resultName: r,
3866 nextLoc: n
3867 }, "next" === this.method && (this.arg = t), y;
3868 }
3869 }, e;
3870 }
3871 module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
3872
3873 /***/ }),
3874
3875 /***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js":
3876 /*!***************************************************************!*\
3877 !*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***!
3878 \***************************************************************/
3879 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3880
3881 var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js");
3882 var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js");
3883 var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js");
3884 var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js");
3885 function _slicedToArray(r, e) {
3886 return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest();
3887 }
3888 module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
3889
3890 /***/ }),
3891
3892 /***/ "../node_modules/@babel/runtime/helpers/toPrimitive.js":
3893 /*!*************************************************************!*\
3894 !*** ../node_modules/@babel/runtime/helpers/toPrimitive.js ***!
3895 \*************************************************************/
3896 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3897
3898 var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]);
3899 function toPrimitive(t, r) {
3900 if ("object" != _typeof(t) || !t) return t;
3901 var e = t[Symbol.toPrimitive];
3902 if (void 0 !== e) {
3903 var i = e.call(t, r || "default");
3904 if ("object" != _typeof(i)) return i;
3905 throw new TypeError("@@toPrimitive must return a primitive value.");
3906 }
3907 return ("string" === r ? String : Number)(t);
3908 }
3909 module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
3910
3911 /***/ }),
3912
3913 /***/ "../node_modules/@babel/runtime/helpers/toPropertyKey.js":
3914 /*!***************************************************************!*\
3915 !*** ../node_modules/@babel/runtime/helpers/toPropertyKey.js ***!
3916 \***************************************************************/
3917 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3918
3919 var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]);
3920 var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ "../node_modules/@babel/runtime/helpers/toPrimitive.js");
3921 function toPropertyKey(t) {
3922 var i = toPrimitive(t, "string");
3923 return "symbol" == _typeof(i) ? i : i + "";
3924 }
3925 module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
3926
3927 /***/ }),
3928
3929 /***/ "../node_modules/@babel/runtime/helpers/typeof.js":
3930 /*!********************************************************!*\
3931 !*** ../node_modules/@babel/runtime/helpers/typeof.js ***!
3932 \********************************************************/
3933 /***/ ((module) => {
3934
3935 function _typeof(o) {
3936 "@babel/helpers - typeof";
3937
3938 return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
3939 return typeof o;
3940 } : function (o) {
3941 return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
3942 }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o);
3943 }
3944 module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
3945
3946 /***/ }),
3947
3948 /***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js":
3949 /*!****************************************************************************!*\
3950 !*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
3951 \****************************************************************************/
3952 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3953
3954 var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js");
3955 function _unsupportedIterableToArray(r, a) {
3956 if (r) {
3957 if ("string" == typeof r) return arrayLikeToArray(r, a);
3958 var t = {}.toString.call(r).slice(8, -1);
3959 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;
3960 }
3961 }
3962 module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
3963
3964 /***/ }),
3965
3966 /***/ "../node_modules/@babel/runtime/regenerator/index.js":
3967 /*!***********************************************************!*\
3968 !*** ../node_modules/@babel/runtime/regenerator/index.js ***!
3969 \***********************************************************/
3970 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3971
3972 // TODO(Babel 8): Remove this file.
3973
3974 var runtime = __webpack_require__(/*! ../helpers/regeneratorRuntime */ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js")();
3975 module.exports = runtime;
3976
3977 // Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
3978 try {
3979 regeneratorRuntime = runtime;
3980 } catch (accidentalStrictMode) {
3981 if (typeof globalThis === "object") {
3982 globalThis.regeneratorRuntime = runtime;
3983 } else {
3984 Function("r", "regeneratorRuntime = r")(runtime);
3985 }
3986 }
3987
3988
3989 /***/ })
3990
3991 /******/ });
3992 /************************************************************************/
3993 /******/ // The module cache
3994 /******/ var __webpack_module_cache__ = {};
3995 /******/
3996 /******/ // The require function
3997 /******/ function __webpack_require__(moduleId) {
3998 /******/ // Check if module is in cache
3999 /******/ var cachedModule = __webpack_module_cache__[moduleId];
4000 /******/ if (cachedModule !== undefined) {
4001 /******/ return cachedModule.exports;
4002 /******/ }
4003 /******/ // Create a new module (and put it into the cache)
4004 /******/ var module = __webpack_module_cache__[moduleId] = {
4005 /******/ // no module.id needed
4006 /******/ // no module.loaded needed
4007 /******/ exports: {}
4008 /******/ };
4009 /******/
4010 /******/ // Execute the module function
4011 /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
4012 /******/
4013 /******/ // Return the exports of the module
4014 /******/ return module.exports;
4015 /******/ }
4016 /******/
4017 /************************************************************************/
4018 var __webpack_exports__ = {};
4019 // This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
4020 (() => {
4021 "use strict";
4022 /*!*************************************************************!*\
4023 !*** ../modules/atomic-opt-in/assets/js/opt-in-page/app.js ***!
4024 \*************************************************************/
4025 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
4026
4027
4028 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
4029 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
4030 var _react2 = _interopRequireDefault(__webpack_require__(/*! elementor-utils/react */ "../assets/dev/js/utils/react.js"));
4031 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
4032 var _optIn = __webpack_require__(/*! ./opt-in */ "../modules/atomic-opt-in/assets/js/opt-in-page/opt-in.js");
4033 var App = function App(props) {
4034 return /*#__PURE__*/_react.default.createElement(_ui.DirectionProvider, {
4035 rtl: props.isRTL
4036 }, /*#__PURE__*/_react.default.createElement(_ui.LocalizationProvider, null, /*#__PURE__*/_react.default.createElement(_ui.ThemeProvider, {
4037 colorScheme: 'light'
4038 }, /*#__PURE__*/_react.default.createElement(_optIn.OptIn, {
4039 state: props === null || props === void 0 ? void 0 : props.state
4040 }))));
4041 };
4042 App.propTypes = {
4043 isRTL: PropTypes.bool,
4044 state: PropTypes.object
4045 };
4046 var init = function init() {
4047 var rootElement = document.querySelector('#page-editor-v4-opt-in');
4048 if (!rootElement) {
4049 return;
4050 }
4051 _react2.default.render(/*#__PURE__*/_react.default.createElement(App, {
4052 isRTL: !!elementorCommon.config.isRTL,
4053 state: elementorSettingsEditor4OptIn
4054 }), rootElement);
4055 };
4056 init();
4057 })();
4058
4059 /******/ })()
4060 ;
4061 //# sourceMappingURL=editor-v4-opt-in.js.map