PluginProbe
Elementor Website Builder – more than just a page builder / 3.26.1
Elementor Website Builder – more than just a page builder v3.26.1
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 / e-wc-product-editor.js

e-wc-product-editor.js in Elementor Website Builder – more than just a page builder 3.26.1, at assets/js/e-wc-product-editor.js

3,071 lines 121.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /*! elementor - v3.26.0 - 19-12-2024 */
2 /******/ (() => { // webpackBootstrap
3 /******/ var __webpack_modules__ = ({
4
5 /***/ "../node_modules/@wordpress/element/build-module/create-interpolate-element.js":
6 /*!*************************************************************************************!*\
7 !*** ../node_modules/@wordpress/element/build-module/create-interpolate-element.js ***!
8 \*************************************************************************************/
9 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
10
11 "use strict";
12 __webpack_require__.r(__webpack_exports__);
13 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
14 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
15 /* harmony export */ });
16 /* harmony import */ var _react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./react */ "react");
17 /* harmony import */ var _react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_react__WEBPACK_IMPORTED_MODULE_0__);
18 /**
19 * Internal dependencies
20 */
21
22
23 /**
24 * Object containing a React element.
25 *
26 * @typedef {import('react').ReactElement} Element
27 */
28
29 let indoc, offset, output, stack;
30
31 /**
32 * Matches tags in the localized string
33 *
34 * This is used for extracting the tag pattern groups for parsing the localized
35 * string and along with the map converting it to a react element.
36 *
37 * There are four references extracted using this tokenizer:
38 *
39 * match: Full match of the tag (i.e. <strong>, </strong>, <br/>)
40 * isClosing: The closing slash, if it exists.
41 * name: The name portion of the tag (strong, br) (if )
42 * isSelfClosed: The slash on a self closing tag, if it exists.
43 *
44 * @type {RegExp}
45 */
46 const tokenizer = /<(\/)?(\w+)\s*(\/)?>/g;
47
48 /**
49 * The stack frame tracking parse progress.
50 *
51 * @typedef Frame
52 *
53 * @property {Element} element A parent element which may still have
54 * @property {number} tokenStart Offset at which parent element first
55 * appears.
56 * @property {number} tokenLength Length of string marking start of parent
57 * element.
58 * @property {number} [prevOffset] Running offset at which parsing should
59 * continue.
60 * @property {number} [leadingTextStart] Offset at which last closing element
61 * finished, used for finding text between
62 * elements.
63 * @property {Element[]} children Children.
64 */
65
66 /**
67 * Tracks recursive-descent parse state.
68 *
69 * This is a Stack frame holding parent elements until all children have been
70 * parsed.
71 *
72 * @private
73 * @param {Element} element A parent element which may still have
74 * nested children not yet parsed.
75 * @param {number} tokenStart Offset at which parent element first
76 * appears.
77 * @param {number} tokenLength Length of string marking start of parent
78 * element.
79 * @param {number} [prevOffset] Running offset at which parsing should
80 * continue.
81 * @param {number} [leadingTextStart] Offset at which last closing element
82 * finished, used for finding text between
83 * elements.
84 *
85 * @return {Frame} The stack frame tracking parse progress.
86 */
87 function createFrame(element, tokenStart, tokenLength, prevOffset, leadingTextStart) {
88 return {
89 element,
90 tokenStart,
91 tokenLength,
92 prevOffset,
93 leadingTextStart,
94 children: []
95 };
96 }
97
98 /**
99 * This function creates an interpolated element from a passed in string with
100 * specific tags matching how the string should be converted to an element via
101 * the conversion map value.
102 *
103 * @example
104 * For example, for the given string:
105 *
106 * "This is a <span>string</span> with <a>a link</a> and a self-closing
107 * <CustomComponentB/> tag"
108 *
109 * You would have something like this as the conversionMap value:
110 *
111 * ```js
112 * {
113 * span: <span />,
114 * a: <a href={ 'https://github.com' } />,
115 * CustomComponentB: <CustomComponent />,
116 * }
117 * ```
118 *
119 * @param {string} interpolatedString The interpolation string to be parsed.
120 * @param {Record<string, Element>} conversionMap The map used to convert the string to
121 * a react element.
122 * @throws {TypeError}
123 * @return {Element} A wp element.
124 */
125 const createInterpolateElement = (interpolatedString, conversionMap) => {
126 indoc = interpolatedString;
127 offset = 0;
128 output = [];
129 stack = [];
130 tokenizer.lastIndex = 0;
131 if (!isValidConversionMap(conversionMap)) {
132 throw new TypeError('The conversionMap provided is not valid. It must be an object with values that are React Elements');
133 }
134 do {
135 // twiddle our thumbs
136 } while (proceed(conversionMap));
137 return (0,_react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, ...output);
138 };
139
140 /**
141 * Validate conversion map.
142 *
143 * A map is considered valid if it's an object and every value in the object
144 * is a React Element
145 *
146 * @private
147 *
148 * @param {Object} conversionMap The map being validated.
149 *
150 * @return {boolean} True means the map is valid.
151 */
152 const isValidConversionMap = conversionMap => {
153 const isObject = typeof conversionMap === 'object';
154 const values = isObject && Object.values(conversionMap);
155 return isObject && values.length && values.every(element => (0,_react__WEBPACK_IMPORTED_MODULE_0__.isValidElement)(element));
156 };
157
158 /**
159 * This is the iterator over the matches in the string.
160 *
161 * @private
162 *
163 * @param {Object} conversionMap The conversion map for the string.
164 *
165 * @return {boolean} true for continuing to iterate, false for finished.
166 */
167 function proceed(conversionMap) {
168 const next = nextToken();
169 const [tokenType, name, startOffset, tokenLength] = next;
170 const stackDepth = stack.length;
171 const leadingTextStart = startOffset > offset ? offset : null;
172 if (!conversionMap[name]) {
173 addText();
174 return false;
175 }
176 switch (tokenType) {
177 case 'no-more-tokens':
178 if (stackDepth !== 0) {
179 const {
180 leadingTextStart: stackLeadingText,
181 tokenStart
182 } = stack.pop();
183 output.push(indoc.substr(stackLeadingText, tokenStart));
184 }
185 addText();
186 return false;
187 case 'self-closed':
188 if (0 === stackDepth) {
189 if (null !== leadingTextStart) {
190 output.push(indoc.substr(leadingTextStart, startOffset - leadingTextStart));
191 }
192 output.push(conversionMap[name]);
193 offset = startOffset + tokenLength;
194 return true;
195 }
196
197 // Otherwise we found an inner element.
198 addChild(createFrame(conversionMap[name], startOffset, tokenLength));
199 offset = startOffset + tokenLength;
200 return true;
201 case 'opener':
202 stack.push(createFrame(conversionMap[name], startOffset, tokenLength, startOffset + tokenLength, leadingTextStart));
203 offset = startOffset + tokenLength;
204 return true;
205 case 'closer':
206 // If we're not nesting then this is easy - close the block.
207 if (1 === stackDepth) {
208 closeOuterElement(startOffset);
209 offset = startOffset + tokenLength;
210 return true;
211 }
212
213 // Otherwise we're nested and we have to close out the current
214 // block and add it as a innerBlock to the parent.
215 const stackTop = stack.pop();
216 const text = indoc.substr(stackTop.prevOffset, startOffset - stackTop.prevOffset);
217 stackTop.children.push(text);
218 stackTop.prevOffset = startOffset + tokenLength;
219 const frame = createFrame(stackTop.element, stackTop.tokenStart, stackTop.tokenLength, startOffset + tokenLength);
220 frame.children = stackTop.children;
221 addChild(frame);
222 offset = startOffset + tokenLength;
223 return true;
224 default:
225 addText();
226 return false;
227 }
228 }
229
230 /**
231 * Grabs the next token match in the string and returns it's details.
232 *
233 * @private
234 *
235 * @return {Array} An array of details for the token matched.
236 */
237 function nextToken() {
238 const matches = tokenizer.exec(indoc);
239 // We have no more tokens.
240 if (null === matches) {
241 return ['no-more-tokens'];
242 }
243 const startedAt = matches.index;
244 const [match, isClosing, name, isSelfClosed] = matches;
245 const length = match.length;
246 if (isSelfClosed) {
247 return ['self-closed', name, startedAt, length];
248 }
249 if (isClosing) {
250 return ['closer', name, startedAt, length];
251 }
252 return ['opener', name, startedAt, length];
253 }
254
255 /**
256 * Pushes text extracted from the indoc string to the output stack given the
257 * current rawLength value and offset (if rawLength is provided ) or the
258 * indoc.length and offset.
259 *
260 * @private
261 */
262 function addText() {
263 const length = indoc.length - offset;
264 if (0 === length) {
265 return;
266 }
267 output.push(indoc.substr(offset, length));
268 }
269
270 /**
271 * Pushes a child element to the associated parent element's children for the
272 * parent currently active in the stack.
273 *
274 * @private
275 *
276 * @param {Frame} frame The Frame containing the child element and it's
277 * token information.
278 */
279 function addChild(frame) {
280 const {
281 element,
282 tokenStart,
283 tokenLength,
284 prevOffset,
285 children
286 } = frame;
287 const parent = stack[stack.length - 1];
288 const text = indoc.substr(parent.prevOffset, tokenStart - parent.prevOffset);
289 if (text) {
290 parent.children.push(text);
291 }
292 parent.children.push((0,_react__WEBPACK_IMPORTED_MODULE_0__.cloneElement)(element, null, ...children));
293 parent.prevOffset = prevOffset ? prevOffset : tokenStart + tokenLength;
294 }
295
296 /**
297 * This is called for closing tags. It creates the element currently active in
298 * the stack.
299 *
300 * @private
301 *
302 * @param {number} endOffset Offset at which the closing tag for the element
303 * begins in the string. If this is greater than the
304 * prevOffset attached to the element, then this
305 * helps capture any remaining nested text nodes in
306 * the element.
307 */
308 function closeOuterElement(endOffset) {
309 const {
310 element,
311 leadingTextStart,
312 prevOffset,
313 tokenStart,
314 children
315 } = stack.pop();
316 const text = endOffset ? indoc.substr(prevOffset, endOffset - prevOffset) : indoc.substr(prevOffset);
317 if (text) {
318 children.push(text);
319 }
320 if (null !== leadingTextStart) {
321 output.push(indoc.substr(leadingTextStart, tokenStart - leadingTextStart));
322 }
323 output.push((0,_react__WEBPACK_IMPORTED_MODULE_0__.cloneElement)(element, null, ...children));
324 }
325 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (createInterpolateElement);
326 //# sourceMappingURL=create-interpolate-element.js.map
327
328 /***/ }),
329
330 /***/ "../node_modules/@wordpress/element/build-module/index.js":
331 /*!****************************************************************!*\
332 !*** ../node_modules/@wordpress/element/build-module/index.js ***!
333 \****************************************************************/
334 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
335
336 "use strict";
337 __webpack_require__.r(__webpack_exports__);
338 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
339 /* harmony export */ Children: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.Children),
340 /* harmony export */ Component: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.Component),
341 /* harmony export */ Fragment: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.Fragment),
342 /* harmony export */ Platform: () => (/* reexport safe */ _platform__WEBPACK_IMPORTED_MODULE_4__["default"]),
343 /* harmony export */ PureComponent: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.PureComponent),
344 /* harmony export */ RawHTML: () => (/* reexport safe */ _raw_html__WEBPACK_IMPORTED_MODULE_6__["default"]),
345 /* harmony export */ StrictMode: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.StrictMode),
346 /* harmony export */ Suspense: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.Suspense),
347 /* harmony export */ cloneElement: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.cloneElement),
348 /* harmony export */ concatChildren: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.concatChildren),
349 /* harmony export */ createContext: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.createContext),
350 /* harmony export */ createElement: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.createElement),
351 /* harmony export */ createInterpolateElement: () => (/* reexport safe */ _create_interpolate_element__WEBPACK_IMPORTED_MODULE_0__["default"]),
352 /* harmony export */ createPortal: () => (/* reexport safe */ _react_platform__WEBPACK_IMPORTED_MODULE_2__.createPortal),
353 /* harmony export */ createRef: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.createRef),
354 /* harmony export */ createRoot: () => (/* reexport safe */ _react_platform__WEBPACK_IMPORTED_MODULE_2__.createRoot),
355 /* harmony export */ findDOMNode: () => (/* reexport safe */ _react_platform__WEBPACK_IMPORTED_MODULE_2__.findDOMNode),
356 /* harmony export */ flushSync: () => (/* reexport safe */ _react_platform__WEBPACK_IMPORTED_MODULE_2__.flushSync),
357 /* harmony export */ forwardRef: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.forwardRef),
358 /* harmony export */ hydrate: () => (/* reexport safe */ _react_platform__WEBPACK_IMPORTED_MODULE_2__.hydrate),
359 /* harmony export */ hydrateRoot: () => (/* reexport safe */ _react_platform__WEBPACK_IMPORTED_MODULE_2__.hydrateRoot),
360 /* harmony export */ isEmptyElement: () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_3__.isEmptyElement),
361 /* harmony export */ isValidElement: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.isValidElement),
362 /* harmony export */ lazy: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.lazy),
363 /* harmony export */ memo: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.memo),
364 /* harmony export */ render: () => (/* reexport safe */ _react_platform__WEBPACK_IMPORTED_MODULE_2__.render),
365 /* harmony export */ renderToString: () => (/* reexport safe */ _serialize__WEBPACK_IMPORTED_MODULE_5__["default"]),
366 /* harmony export */ startTransition: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.startTransition),
367 /* harmony export */ switchChildrenNodeName: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.switchChildrenNodeName),
368 /* harmony export */ unmountComponentAtNode: () => (/* reexport safe */ _react_platform__WEBPACK_IMPORTED_MODULE_2__.unmountComponentAtNode),
369 /* harmony export */ useCallback: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useCallback),
370 /* harmony export */ useContext: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useContext),
371 /* harmony export */ useDebugValue: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useDebugValue),
372 /* harmony export */ useDeferredValue: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useDeferredValue),
373 /* harmony export */ useEffect: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useEffect),
374 /* harmony export */ useId: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useId),
375 /* harmony export */ useImperativeHandle: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useImperativeHandle),
376 /* harmony export */ useInsertionEffect: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useInsertionEffect),
377 /* harmony export */ useLayoutEffect: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useLayoutEffect),
378 /* harmony export */ useMemo: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useMemo),
379 /* harmony export */ useReducer: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useReducer),
380 /* harmony export */ useRef: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useRef),
381 /* harmony export */ useState: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useState),
382 /* harmony export */ useSyncExternalStore: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useSyncExternalStore),
383 /* harmony export */ useTransition: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useTransition)
384 /* harmony export */ });
385 /* harmony import */ var _create_interpolate_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./create-interpolate-element */ "../node_modules/@wordpress/element/build-module/create-interpolate-element.js");
386 /* harmony import */ var _react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./react */ "../node_modules/@wordpress/element/build-module/react.js");
387 /* harmony import */ var _react_platform__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./react-platform */ "../node_modules/@wordpress/element/build-module/react-platform.js");
388 /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils */ "../node_modules/@wordpress/element/build-module/utils.js");
389 /* harmony import */ var _platform__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./platform */ "../node_modules/@wordpress/element/build-module/platform.js");
390 /* harmony import */ var _serialize__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./serialize */ "../node_modules/@wordpress/element/build-module/serialize.js");
391 /* harmony import */ var _raw_html__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./raw-html */ "../node_modules/@wordpress/element/build-module/raw-html.js");
392
393
394
395
396
397
398
399 //# sourceMappingURL=index.js.map
400
401 /***/ }),
402
403 /***/ "../node_modules/@wordpress/element/build-module/platform.js":
404 /*!*******************************************************************!*\
405 !*** ../node_modules/@wordpress/element/build-module/platform.js ***!
406 \*******************************************************************/
407 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
408
409 "use strict";
410 __webpack_require__.r(__webpack_exports__);
411 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
412 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
413 /* harmony export */ });
414 /**
415 * Parts of this source were derived and modified from react-native-web,
416 * released under the MIT license.
417 *
418 * Copyright (c) 2016-present, Nicolas Gallagher.
419 * Copyright (c) 2015-present, Facebook, Inc.
420 *
421 */
422 const Platform = {
423 OS: 'web',
424 select: spec => 'web' in spec ? spec.web : spec.default,
425 isWeb: true
426 };
427 /**
428 * Component used to detect the current Platform being used.
429 * Use Platform.OS === 'web' to detect if running on web enviroment.
430 *
431 * This is the same concept as the React Native implementation.
432 *
433 * @see https://reactnative.dev/docs/platform-specific-code#platform-module
434 *
435 * Here is an example of how to use the select method:
436 * @example
437 * ```js
438 * import { Platform } from '@wordpress/element';
439 *
440 * const placeholderLabel = Platform.select( {
441 * native: __( 'Add media' ),
442 * web: __( 'Drag images, upload new ones or select files from your library.' ),
443 * } );
444 * ```
445 */
446 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Platform);
447 //# sourceMappingURL=platform.js.map
448
449 /***/ }),
450
451 /***/ "../node_modules/@wordpress/element/build-module/raw-html.js":
452 /*!*******************************************************************!*\
453 !*** ../node_modules/@wordpress/element/build-module/raw-html.js ***!
454 \*******************************************************************/
455 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
456
457 "use strict";
458 __webpack_require__.r(__webpack_exports__);
459 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
460 /* harmony export */ "default": () => (/* binding */ RawHTML)
461 /* harmony export */ });
462 /* harmony import */ var _react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./react */ "react");
463 /* harmony import */ var _react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_react__WEBPACK_IMPORTED_MODULE_0__);
464 /**
465 * Internal dependencies
466 */
467
468
469 /** @typedef {{children: string} & import('react').ComponentPropsWithoutRef<'div'>} RawHTMLProps */
470
471 /**
472 * Component used as equivalent of Fragment with unescaped HTML, in cases where
473 * it is desirable to render dangerous HTML without needing a wrapper element.
474 * To preserve additional props, a `div` wrapper _will_ be created if any props
475 * aside from `children` are passed.
476 *
477 * @param {RawHTMLProps} props Children should be a string of HTML or an array
478 * of strings. Other props will be passed through
479 * to the div wrapper.
480 *
481 * @return {JSX.Element} Dangerously-rendering component.
482 */
483 function RawHTML({
484 children,
485 ...props
486 }) {
487 let rawHtml = '';
488
489 // Cast children as an array, and concatenate each element if it is a string.
490 _react__WEBPACK_IMPORTED_MODULE_0__.Children.toArray(children).forEach(child => {
491 if (typeof child === 'string' && child.trim() !== '') {
492 rawHtml += child;
493 }
494 });
495
496 // The `div` wrapper will be stripped by the `renderElement` serializer in
497 // `./serialize.js` unless there are non-children props present.
498 return (0,_react__WEBPACK_IMPORTED_MODULE_0__.createElement)('div', {
499 dangerouslySetInnerHTML: {
500 __html: rawHtml
501 },
502 ...props
503 });
504 }
505 //# sourceMappingURL=raw-html.js.map
506
507 /***/ }),
508
509 /***/ "../node_modules/@wordpress/element/build-module/react-platform.js":
510 /*!*************************************************************************!*\
511 !*** ../node_modules/@wordpress/element/build-module/react-platform.js ***!
512 \*************************************************************************/
513 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
514
515 "use strict";
516 __webpack_require__.r(__webpack_exports__);
517 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
518 /* harmony export */ createPortal: () => (/* reexport safe */ react_dom__WEBPACK_IMPORTED_MODULE_0__.createPortal),
519 /* harmony export */ createRoot: () => (/* reexport safe */ react_dom_client__WEBPACK_IMPORTED_MODULE_1__.createRoot),
520 /* harmony export */ findDOMNode: () => (/* reexport safe */ react_dom__WEBPACK_IMPORTED_MODULE_0__.findDOMNode),
521 /* harmony export */ flushSync: () => (/* reexport safe */ react_dom__WEBPACK_IMPORTED_MODULE_0__.flushSync),
522 /* harmony export */ hydrate: () => (/* reexport safe */ react_dom__WEBPACK_IMPORTED_MODULE_0__.hydrate),
523 /* harmony export */ hydrateRoot: () => (/* reexport safe */ react_dom_client__WEBPACK_IMPORTED_MODULE_1__.hydrateRoot),
524 /* harmony export */ render: () => (/* reexport safe */ react_dom__WEBPACK_IMPORTED_MODULE_0__.render),
525 /* harmony export */ unmountComponentAtNode: () => (/* reexport safe */ react_dom__WEBPACK_IMPORTED_MODULE_0__.unmountComponentAtNode)
526 /* harmony export */ });
527 /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-dom */ "react-dom");
528 /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_0__);
529 /* harmony import */ var react_dom_client__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom/client */ "../node_modules/react-dom/client.js");
530 /**
531 * External dependencies
532 */
533
534
535
536 /**
537 * Creates a portal into which a component can be rendered.
538 *
539 * @see https://github.com/facebook/react/issues/10309#issuecomment-318433235
540 *
541 * @param {import('react').ReactElement} child Any renderable child, such as an element,
542 * string, or fragment.
543 * @param {HTMLElement} container DOM node into which element should be rendered.
544 */
545
546
547 /**
548 * Finds the dom node of a React component.
549 *
550 * @param {import('react').ComponentType} component Component's instance.
551 */
552
553
554 /**
555 * Forces React to flush any updates inside the provided callback synchronously.
556 *
557 * @param {Function} callback Callback to run synchronously.
558 */
559
560
561 /**
562 * Renders a given element into the target DOM node.
563 *
564 * @deprecated since WordPress 6.2.0. Use `createRoot` instead.
565 * @see https://react.dev/reference/react-dom/render
566 */
567
568
569 /**
570 * Hydrates a given element into the target DOM node.
571 *
572 * @deprecated since WordPress 6.2.0. Use `hydrateRoot` instead.
573 * @see https://react.dev/reference/react-dom/hydrate
574 */
575
576
577 /**
578 * Creates a new React root for the target DOM node.
579 *
580 * @since 6.2.0 Introduced in WordPress core.
581 * @see https://react.dev/reference/react-dom/client/createRoot
582 */
583
584
585 /**
586 * Creates a new React root for the target DOM node and hydrates it with a pre-generated markup.
587 *
588 * @since 6.2.0 Introduced in WordPress core.
589 * @see https://react.dev/reference/react-dom/client/hydrateRoot
590 */
591
592
593 /**
594 * Removes any mounted element from the target DOM node.
595 *
596 * @deprecated since WordPress 6.2.0. Use `root.unmount()` instead.
597 * @see https://react.dev/reference/react-dom/unmountComponentAtNode
598 */
599
600 //# sourceMappingURL=react-platform.js.map
601
602 /***/ }),
603
604 /***/ "../node_modules/@wordpress/element/build-module/react.js":
605 /*!****************************************************************!*\
606 !*** ../node_modules/@wordpress/element/build-module/react.js ***!
607 \****************************************************************/
608 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
609
610 "use strict";
611 __webpack_require__.r(__webpack_exports__);
612 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
613 /* harmony export */ Children: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.Children),
614 /* harmony export */ Component: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.Component),
615 /* harmony export */ Fragment: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.Fragment),
616 /* harmony export */ PureComponent: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.PureComponent),
617 /* harmony export */ StrictMode: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.StrictMode),
618 /* harmony export */ Suspense: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.Suspense),
619 /* harmony export */ cloneElement: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.cloneElement),
620 /* harmony export */ concatChildren: () => (/* binding */ concatChildren),
621 /* harmony export */ createContext: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.createContext),
622 /* harmony export */ createElement: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.createElement),
623 /* harmony export */ createRef: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.createRef),
624 /* harmony export */ forwardRef: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.forwardRef),
625 /* harmony export */ isValidElement: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.isValidElement),
626 /* harmony export */ lazy: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.lazy),
627 /* harmony export */ memo: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.memo),
628 /* harmony export */ startTransition: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.startTransition),
629 /* harmony export */ switchChildrenNodeName: () => (/* binding */ switchChildrenNodeName),
630 /* harmony export */ useCallback: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useCallback),
631 /* harmony export */ useContext: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useContext),
632 /* harmony export */ useDebugValue: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useDebugValue),
633 /* harmony export */ useDeferredValue: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useDeferredValue),
634 /* harmony export */ useEffect: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useEffect),
635 /* harmony export */ useId: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useId),
636 /* harmony export */ useImperativeHandle: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useImperativeHandle),
637 /* harmony export */ useInsertionEffect: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useInsertionEffect),
638 /* harmony export */ useLayoutEffect: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect),
639 /* harmony export */ useMemo: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useMemo),
640 /* harmony export */ useReducer: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useReducer),
641 /* harmony export */ useRef: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useRef),
642 /* harmony export */ useState: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useState),
643 /* harmony export */ useSyncExternalStore: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useSyncExternalStore),
644 /* harmony export */ useTransition: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useTransition)
645 /* harmony export */ });
646 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
647 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
648 /**
649 * External dependencies
650 */
651 // eslint-disable-next-line @typescript-eslint/no-restricted-imports
652
653
654 /**
655 * Object containing a React element.
656 *
657 * @typedef {import('react').ReactElement} Element
658 */
659
660 /**
661 * Object containing a React component.
662 *
663 * @typedef {import('react').ComponentType} ComponentType
664 */
665
666 /**
667 * Object containing a React synthetic event.
668 *
669 * @typedef {import('react').SyntheticEvent} SyntheticEvent
670 */
671
672 /**
673 * Object containing a React synthetic event.
674 *
675 * @template T
676 * @typedef {import('react').RefObject<T>} RefObject<T>
677 */
678
679 /**
680 * Object that provides utilities for dealing with React children.
681 */
682
683
684 /**
685 * Creates a copy of an element with extended props.
686 *
687 * @param {Element} element Element
688 * @param {?Object} props Props to apply to cloned element
689 *
690 * @return {Element} Cloned element.
691 */
692
693
694 /**
695 * A base class to create WordPress Components (Refs, state and lifecycle hooks)
696 */
697
698
699 /**
700 * Creates a context object containing two components: a provider and consumer.
701 *
702 * @param {Object} defaultValue A default data stored in the context.
703 *
704 * @return {Object} Context object.
705 */
706
707
708 /**
709 * Returns a new element of given type. Type can be either a string tag name or
710 * another function which itself returns an element.
711 *
712 * @param {?(string|Function)} type Tag name or element creator
713 * @param {Object} props Element properties, either attribute
714 * set to apply to DOM node or values to
715 * pass through to element creator
716 * @param {...Element} children Descendant elements
717 *
718 * @return {Element} Element.
719 */
720
721
722 /**
723 * Returns an object tracking a reference to a rendered element via its
724 * `current` property as either a DOMElement or Element, dependent upon the
725 * type of element rendered with the ref attribute.
726 *
727 * @return {Object} Ref object.
728 */
729
730
731 /**
732 * Component enhancer used to enable passing a ref to its wrapped component.
733 * Pass a function argument which receives `props` and `ref` as its arguments,
734 * returning an element using the forwarded ref. The return value is a new
735 * component which forwards its ref.
736 *
737 * @param {Function} forwarder Function passed `props` and `ref`, expected to
738 * return an element.
739 *
740 * @return {Component} Enhanced component.
741 */
742
743
744 /**
745 * A component which renders its children without any wrapping element.
746 */
747
748
749 /**
750 * Checks if an object is a valid React Element.
751 *
752 * @param {Object} objectToCheck The object to be checked.
753 *
754 * @return {boolean} true if objectToTest is a valid React Element and false otherwise.
755 */
756
757
758 /**
759 * @see https://reactjs.org/docs/react-api.html#reactmemo
760 */
761
762
763 /**
764 * Component that activates additional checks and warnings for its descendants.
765 */
766
767
768 /**
769 * @see https://reactjs.org/docs/hooks-reference.html#usecallback
770 */
771
772
773 /**
774 * @see https://reactjs.org/docs/hooks-reference.html#usecontext
775 */
776
777
778 /**
779 * @see https://reactjs.org/docs/hooks-reference.html#usedebugvalue
780 */
781
782
783 /**
784 * @see https://reactjs.org/docs/hooks-reference.html#usedeferredvalue
785 */
786
787
788 /**
789 * @see https://reactjs.org/docs/hooks-reference.html#useeffect
790 */
791
792
793 /**
794 * @see https://reactjs.org/docs/hooks-reference.html#useid
795 */
796
797
798 /**
799 * @see https://reactjs.org/docs/hooks-reference.html#useimperativehandle
800 */
801
802
803 /**
804 * @see https://reactjs.org/docs/hooks-reference.html#useinsertioneffect
805 */
806
807
808 /**
809 * @see https://reactjs.org/docs/hooks-reference.html#uselayouteffect
810 */
811
812
813 /**
814 * @see https://reactjs.org/docs/hooks-reference.html#usememo
815 */
816
817
818 /**
819 * @see https://reactjs.org/docs/hooks-reference.html#usereducer
820 */
821
822
823 /**
824 * @see https://reactjs.org/docs/hooks-reference.html#useref
825 */
826
827
828 /**
829 * @see https://reactjs.org/docs/hooks-reference.html#usestate
830 */
831
832
833 /**
834 * @see https://reactjs.org/docs/hooks-reference.html#usesyncexternalstore
835 */
836
837
838 /**
839 * @see https://reactjs.org/docs/hooks-reference.html#usetransition
840 */
841
842
843 /**
844 * @see https://reactjs.org/docs/react-api.html#starttransition
845 */
846
847
848 /**
849 * @see https://reactjs.org/docs/react-api.html#reactlazy
850 */
851
852
853 /**
854 * @see https://reactjs.org/docs/react-api.html#reactsuspense
855 */
856
857
858 /**
859 * @see https://reactjs.org/docs/react-api.html#reactpurecomponent
860 */
861
862
863 /**
864 * Concatenate two or more React children objects.
865 *
866 * @param {...?Object} childrenArguments Array of children arguments (array of arrays/strings/objects) to concatenate.
867 *
868 * @return {Array} The concatenated value.
869 */
870 function concatChildren(...childrenArguments) {
871 return childrenArguments.reduce((accumulator, children, i) => {
872 react__WEBPACK_IMPORTED_MODULE_0__.Children.forEach(children, (child, j) => {
873 if (child && 'string' !== typeof child) {
874 child = (0,react__WEBPACK_IMPORTED_MODULE_0__.cloneElement)(child, {
875 key: [i, j].join()
876 });
877 }
878 accumulator.push(child);
879 });
880 return accumulator;
881 }, []);
882 }
883
884 /**
885 * Switches the nodeName of all the elements in the children object.
886 *
887 * @param {?Object} children Children object.
888 * @param {string} nodeName Node name.
889 *
890 * @return {?Object} The updated children object.
891 */
892 function switchChildrenNodeName(children, nodeName) {
893 return children && react__WEBPACK_IMPORTED_MODULE_0__.Children.map(children, (elt, index) => {
894 if (typeof elt?.valueOf() === 'string') {
895 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(nodeName, {
896 key: index
897 }, elt);
898 }
899 const {
900 children: childrenProp,
901 ...props
902 } = elt.props;
903 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(nodeName, {
904 key: index,
905 ...props
906 }, childrenProp);
907 });
908 }
909 //# sourceMappingURL=react.js.map
910
911 /***/ }),
912
913 /***/ "../node_modules/@wordpress/element/build-module/serialize.js":
914 /*!********************************************************************!*\
915 !*** ../node_modules/@wordpress/element/build-module/serialize.js ***!
916 \********************************************************************/
917 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
918
919 "use strict";
920 __webpack_require__.r(__webpack_exports__);
921 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
922 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
923 /* harmony export */ hasPrefix: () => (/* binding */ hasPrefix),
924 /* harmony export */ renderAttributes: () => (/* binding */ renderAttributes),
925 /* harmony export */ renderComponent: () => (/* binding */ renderComponent),
926 /* harmony export */ renderElement: () => (/* binding */ renderElement),
927 /* harmony export */ renderNativeComponent: () => (/* binding */ renderNativeComponent),
928 /* harmony export */ renderStyle: () => (/* binding */ renderStyle)
929 /* harmony export */ });
930 /* harmony import */ var is_plain_object__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! is-plain-object */ "../node_modules/@wordpress/element/node_modules/is-plain-object/dist/is-plain-object.mjs");
931 /* harmony import */ var change_case__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! change-case */ "../node_modules/param-case/dist.es2015/index.js");
932 /* harmony import */ var _wordpress_escape_html__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/escape-html */ "../node_modules/@wordpress/escape-html/build-module/index.js");
933 /* harmony import */ var _react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./react */ "react");
934 /* harmony import */ var _react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_react__WEBPACK_IMPORTED_MODULE_1__);
935 /* harmony import */ var _raw_html__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./raw-html */ "../node_modules/@wordpress/element/build-module/raw-html.js");
936 /**
937 * Parts of this source were derived and modified from fast-react-render,
938 * released under the MIT license.
939 *
940 * https://github.com/alt-j/fast-react-render
941 *
942 * Copyright (c) 2016 Andrey Morozov
943 *
944 * Permission is hereby granted, free of charge, to any person obtaining a copy
945 * of this software and associated documentation files (the "Software"), to deal
946 * in the Software without restriction, including without limitation the rights
947 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
948 * copies of the Software, and to permit persons to whom the Software is
949 * furnished to do so, subject to the following conditions:
950 *
951 * The above copyright notice and this permission notice shall be included in
952 * all copies or substantial portions of the Software.
953 *
954 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
955 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
956 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
957 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
958 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
959 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
960 * THE SOFTWARE.
961 */
962
963 /**
964 * External dependencies
965 */
966
967
968
969 /**
970 * WordPress dependencies
971 */
972
973
974 /**
975 * Internal dependencies
976 */
977
978
979
980 /** @typedef {import('react').ReactElement} ReactElement */
981
982 const {
983 Provider,
984 Consumer
985 } = (0,_react__WEBPACK_IMPORTED_MODULE_1__.createContext)(undefined);
986 const ForwardRef = (0,_react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(() => {
987 return null;
988 });
989
990 /**
991 * Valid attribute types.
992 *
993 * @type {Set<string>}
994 */
995 const ATTRIBUTES_TYPES = new Set(['string', 'boolean', 'number']);
996
997 /**
998 * Element tags which can be self-closing.
999 *
1000 * @type {Set<string>}
1001 */
1002 const SELF_CLOSING_TAGS = new Set(['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr']);
1003
1004 /**
1005 * Boolean attributes are attributes whose presence as being assigned is
1006 * meaningful, even if only empty.
1007 *
1008 * See: https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#boolean-attributes
1009 * Extracted from: https://html.spec.whatwg.org/multipage/indices.html#attributes-3
1010 *
1011 * Object.keys( [ ...document.querySelectorAll( '#attributes-1 > tbody > tr' ) ]
1012 * .filter( ( tr ) => tr.lastChild.textContent.indexOf( 'Boolean attribute' ) !== -1 )
1013 * .reduce( ( result, tr ) => Object.assign( result, {
1014 * [ tr.firstChild.textContent.trim() ]: true
1015 * } ), {} ) ).sort();
1016 *
1017 * @type {Set<string>}
1018 */
1019 const BOOLEAN_ATTRIBUTES = new Set(['allowfullscreen', 'allowpaymentrequest', 'allowusermedia', 'async', 'autofocus', 'autoplay', 'checked', 'controls', 'default', 'defer', 'disabled', 'download', 'formnovalidate', 'hidden', 'ismap', 'itemscope', 'loop', 'multiple', 'muted', 'nomodule', 'novalidate', 'open', 'playsinline', 'readonly', 'required', 'reversed', 'selected', 'typemustmatch']);
1020
1021 /**
1022 * Enumerated attributes are attributes which must be of a specific value form.
1023 * Like boolean attributes, these are meaningful if specified, even if not of a
1024 * valid enumerated value.
1025 *
1026 * See: https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#enumerated-attribute
1027 * Extracted from: https://html.spec.whatwg.org/multipage/indices.html#attributes-3
1028 *
1029 * Object.keys( [ ...document.querySelectorAll( '#attributes-1 > tbody > tr' ) ]
1030 * .filter( ( tr ) => /^("(.+?)";?\s*)+/.test( tr.lastChild.textContent.trim() ) )
1031 * .reduce( ( result, tr ) => Object.assign( result, {
1032 * [ tr.firstChild.textContent.trim() ]: true
1033 * } ), {} ) ).sort();
1034 *
1035 * Some notable omissions:
1036 *
1037 * - `alt`: https://blog.whatwg.org/omit-alt
1038 *
1039 * @type {Set<string>}
1040 */
1041 const ENUMERATED_ATTRIBUTES = new Set(['autocapitalize', 'autocomplete', 'charset', 'contenteditable', 'crossorigin', 'decoding', 'dir', 'draggable', 'enctype', 'formenctype', 'formmethod', 'http-equiv', 'inputmode', 'kind', 'method', 'preload', 'scope', 'shape', 'spellcheck', 'translate', 'type', 'wrap']);
1042
1043 /**
1044 * Set of CSS style properties which support assignment of unitless numbers.
1045 * Used in rendering of style properties, where `px` unit is assumed unless
1046 * property is included in this set or value is zero.
1047 *
1048 * Generated via:
1049 *
1050 * Object.entries( document.createElement( 'div' ).style )
1051 * .filter( ( [ key ] ) => (
1052 * ! /^(webkit|ms|moz)/.test( key ) &&
1053 * ( e.style[ key ] = 10 ) &&
1054 * e.style[ key ] === '10'
1055 * ) )
1056 * .map( ( [ key ] ) => key )
1057 * .sort();
1058 *
1059 * @type {Set<string>}
1060 */
1061 const CSS_PROPERTIES_SUPPORTS_UNITLESS = new Set(['animation', 'animationIterationCount', 'baselineShift', 'borderImageOutset', 'borderImageSlice', 'borderImageWidth', 'columnCount', 'cx', 'cy', 'fillOpacity', 'flexGrow', 'flexShrink', 'floodOpacity', 'fontWeight', 'gridColumnEnd', 'gridColumnStart', 'gridRowEnd', 'gridRowStart', 'lineHeight', 'opacity', 'order', 'orphans', 'r', 'rx', 'ry', 'shapeImageThreshold', 'stopOpacity', 'strokeDasharray', 'strokeDashoffset', 'strokeMiterlimit', 'strokeOpacity', 'strokeWidth', 'tabSize', 'widows', 'x', 'y', 'zIndex', 'zoom']);
1062
1063 /**
1064 * Returns true if the specified string is prefixed by one of an array of
1065 * possible prefixes.
1066 *
1067 * @param {string} string String to check.
1068 * @param {string[]} prefixes Possible prefixes.
1069 *
1070 * @return {boolean} Whether string has prefix.
1071 */
1072 function hasPrefix(string, prefixes) {
1073 return prefixes.some(prefix => string.indexOf(prefix) === 0);
1074 }
1075
1076 /**
1077 * Returns true if the given prop name should be ignored in attributes
1078 * serialization, or false otherwise.
1079 *
1080 * @param {string} attribute Attribute to check.
1081 *
1082 * @return {boolean} Whether attribute should be ignored.
1083 */
1084 function isInternalAttribute(attribute) {
1085 return 'key' === attribute || 'children' === attribute;
1086 }
1087
1088 /**
1089 * Returns the normal form of the element's attribute value for HTML.
1090 *
1091 * @param {string} attribute Attribute name.
1092 * @param {*} value Non-normalized attribute value.
1093 *
1094 * @return {*} Normalized attribute value.
1095 */
1096 function getNormalAttributeValue(attribute, value) {
1097 switch (attribute) {
1098 case 'style':
1099 return renderStyle(value);
1100 }
1101 return value;
1102 }
1103 /**
1104 * This is a map of all SVG attributes that have dashes. Map(lower case prop => dashed lower case attribute).
1105 * We need this to render e.g strokeWidth as stroke-width.
1106 *
1107 * List from: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute.
1108 */
1109 const SVG_ATTRIBUTE_WITH_DASHES_LIST = ['accentHeight', 'alignmentBaseline', 'arabicForm', 'baselineShift', 'capHeight', 'clipPath', 'clipRule', 'colorInterpolation', 'colorInterpolationFilters', 'colorProfile', 'colorRendering', 'dominantBaseline', 'enableBackground', 'fillOpacity', 'fillRule', 'floodColor', 'floodOpacity', 'fontFamily', 'fontSize', 'fontSizeAdjust', 'fontStretch', 'fontStyle', 'fontVariant', 'fontWeight', 'glyphName', 'glyphOrientationHorizontal', 'glyphOrientationVertical', 'horizAdvX', 'horizOriginX', 'imageRendering', 'letterSpacing', 'lightingColor', 'markerEnd', 'markerMid', 'markerStart', 'overlinePosition', 'overlineThickness', 'paintOrder', 'panose1', 'pointerEvents', 'renderingIntent', 'shapeRendering', 'stopColor', 'stopOpacity', 'strikethroughPosition', 'strikethroughThickness', 'strokeDasharray', 'strokeDashoffset', 'strokeLinecap', 'strokeLinejoin', 'strokeMiterlimit', 'strokeOpacity', 'strokeWidth', 'textAnchor', 'textDecoration', 'textRendering', 'underlinePosition', 'underlineThickness', 'unicodeBidi', 'unicodeRange', 'unitsPerEm', 'vAlphabetic', 'vHanging', 'vIdeographic', 'vMathematical', 'vectorEffect', 'vertAdvY', 'vertOriginX', 'vertOriginY', 'wordSpacing', 'writingMode', 'xmlnsXlink', 'xHeight'].reduce((map, attribute) => {
1110 // The keys are lower-cased for more robust lookup.
1111 map[attribute.toLowerCase()] = attribute;
1112 return map;
1113 }, {});
1114
1115 /**
1116 * This is a map of all case-sensitive SVG attributes. Map(lowercase key => proper case attribute).
1117 * The keys are lower-cased for more robust lookup.
1118 * Note that this list only contains attributes that contain at least one capital letter.
1119 * Lowercase attributes don't need mapping, since we lowercase all attributes by default.
1120 */
1121 const CASE_SENSITIVE_SVG_ATTRIBUTES = ['allowReorder', 'attributeName', 'attributeType', 'autoReverse', 'baseFrequency', 'baseProfile', 'calcMode', 'clipPathUnits', 'contentScriptType', 'contentStyleType', 'diffuseConstant', 'edgeMode', 'externalResourcesRequired', 'filterRes', 'filterUnits', 'glyphRef', 'gradientTransform', 'gradientUnits', 'kernelMatrix', 'kernelUnitLength', 'keyPoints', 'keySplines', 'keyTimes', 'lengthAdjust', 'limitingConeAngle', 'markerHeight', 'markerUnits', 'markerWidth', 'maskContentUnits', 'maskUnits', 'numOctaves', 'pathLength', 'patternContentUnits', 'patternTransform', 'patternUnits', 'pointsAtX', 'pointsAtY', 'pointsAtZ', 'preserveAlpha', 'preserveAspectRatio', 'primitiveUnits', 'refX', 'refY', 'repeatCount', 'repeatDur', 'requiredExtensions', 'requiredFeatures', 'specularConstant', 'specularExponent', 'spreadMethod', 'startOffset', 'stdDeviation', 'stitchTiles', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'surfaceScale', 'systemLanguage', 'tableValues', 'targetX', 'targetY', 'textLength', 'viewBox', 'viewTarget', 'xChannelSelector', 'yChannelSelector'].reduce((map, attribute) => {
1122 // The keys are lower-cased for more robust lookup.
1123 map[attribute.toLowerCase()] = attribute;
1124 return map;
1125 }, {});
1126
1127 /**
1128 * This is a map of all SVG attributes that have colons.
1129 * Keys are lower-cased and stripped of their colons for more robust lookup.
1130 */
1131 const SVG_ATTRIBUTES_WITH_COLONS = ['xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type', 'xml:base', 'xml:lang', 'xml:space', 'xmlns:xlink'].reduce((map, attribute) => {
1132 map[attribute.replace(':', '').toLowerCase()] = attribute;
1133 return map;
1134 }, {});
1135
1136 /**
1137 * Returns the normal form of the element's attribute name for HTML.
1138 *
1139 * @param {string} attribute Non-normalized attribute name.
1140 *
1141 * @return {string} Normalized attribute name.
1142 */
1143 function getNormalAttributeName(attribute) {
1144 switch (attribute) {
1145 case 'htmlFor':
1146 return 'for';
1147 case 'className':
1148 return 'class';
1149 }
1150 const attributeLowerCase = attribute.toLowerCase();
1151 if (CASE_SENSITIVE_SVG_ATTRIBUTES[attributeLowerCase]) {
1152 return CASE_SENSITIVE_SVG_ATTRIBUTES[attributeLowerCase];
1153 } else if (SVG_ATTRIBUTE_WITH_DASHES_LIST[attributeLowerCase]) {
1154 return (0,change_case__WEBPACK_IMPORTED_MODULE_2__.paramCase)(SVG_ATTRIBUTE_WITH_DASHES_LIST[attributeLowerCase]);
1155 } else if (SVG_ATTRIBUTES_WITH_COLONS[attributeLowerCase]) {
1156 return SVG_ATTRIBUTES_WITH_COLONS[attributeLowerCase];
1157 }
1158 return attributeLowerCase;
1159 }
1160
1161 /**
1162 * Returns the normal form of the style property name for HTML.
1163 *
1164 * - Converts property names to kebab-case, e.g. 'backgroundColor' → 'background-color'
1165 * - Leaves custom attributes alone, e.g. '--myBackgroundColor' → '--myBackgroundColor'
1166 * - Converts vendor-prefixed property names to -kebab-case, e.g. 'MozTransform' → '-moz-transform'
1167 *
1168 * @param {string} property Property name.
1169 *
1170 * @return {string} Normalized property name.
1171 */
1172 function getNormalStylePropertyName(property) {
1173 if (property.startsWith('--')) {
1174 return property;
1175 }
1176 if (hasPrefix(property, ['ms', 'O', 'Moz', 'Webkit'])) {
1177 return '-' + (0,change_case__WEBPACK_IMPORTED_MODULE_2__.paramCase)(property);
1178 }
1179 return (0,change_case__WEBPACK_IMPORTED_MODULE_2__.paramCase)(property);
1180 }
1181
1182 /**
1183 * Returns the normal form of the style property value for HTML. Appends a
1184 * default pixel unit if numeric, not a unitless property, and not zero.
1185 *
1186 * @param {string} property Property name.
1187 * @param {*} value Non-normalized property value.
1188 *
1189 * @return {*} Normalized property value.
1190 */
1191 function getNormalStylePropertyValue(property, value) {
1192 if (typeof value === 'number' && 0 !== value && !CSS_PROPERTIES_SUPPORTS_UNITLESS.has(property)) {
1193 return value + 'px';
1194 }
1195 return value;
1196 }
1197
1198 /**
1199 * Serializes a React element to string.
1200 *
1201 * @param {import('react').ReactNode} element Element to serialize.
1202 * @param {Object} [context] Context object.
1203 * @param {Object} [legacyContext] Legacy context object.
1204 *
1205 * @return {string} Serialized element.
1206 */
1207 function renderElement(element, context, legacyContext = {}) {
1208 if (null === element || undefined === element || false === element) {
1209 return '';
1210 }
1211 if (Array.isArray(element)) {
1212 return renderChildren(element, context, legacyContext);
1213 }
1214 switch (typeof element) {
1215 case 'string':
1216 return (0,_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_3__.escapeHTML)(element);
1217 case 'number':
1218 return element.toString();
1219 }
1220 const {
1221 type,
1222 props
1223 } = /** @type {{type?: any, props?: any}} */
1224 element;
1225 switch (type) {
1226 case _react__WEBPACK_IMPORTED_MODULE_1__.StrictMode:
1227 case _react__WEBPACK_IMPORTED_MODULE_1__.Fragment:
1228 return renderChildren(props.children, context, legacyContext);
1229 case _raw_html__WEBPACK_IMPORTED_MODULE_4__["default"]:
1230 const {
1231 children,
1232 ...wrapperProps
1233 } = props;
1234 return renderNativeComponent(!Object.keys(wrapperProps).length ? null : 'div', {
1235 ...wrapperProps,
1236 dangerouslySetInnerHTML: {
1237 __html: children
1238 }
1239 }, context, legacyContext);
1240 }
1241 switch (typeof type) {
1242 case 'string':
1243 return renderNativeComponent(type, props, context, legacyContext);
1244 case 'function':
1245 if (type.prototype && typeof type.prototype.render === 'function') {
1246 return renderComponent(type, props, context, legacyContext);
1247 }
1248 return renderElement(type(props, legacyContext), context, legacyContext);
1249 }
1250 switch (type && type.$$typeof) {
1251 case Provider.$$typeof:
1252 return renderChildren(props.children, props.value, legacyContext);
1253 case Consumer.$$typeof:
1254 return renderElement(props.children(context || type._currentValue), context, legacyContext);
1255 case ForwardRef.$$typeof:
1256 return renderElement(type.render(props), context, legacyContext);
1257 }
1258 return '';
1259 }
1260
1261 /**
1262 * Serializes a native component type to string.
1263 *
1264 * @param {?string} type Native component type to serialize, or null if
1265 * rendering as fragment of children content.
1266 * @param {Object} props Props object.
1267 * @param {Object} [context] Context object.
1268 * @param {Object} [legacyContext] Legacy context object.
1269 *
1270 * @return {string} Serialized element.
1271 */
1272 function renderNativeComponent(type, props, context, legacyContext = {}) {
1273 let content = '';
1274 if (type === 'textarea' && props.hasOwnProperty('value')) {
1275 // Textarea children can be assigned as value prop. If it is, render in
1276 // place of children. Ensure to omit so it is not assigned as attribute
1277 // as well.
1278 content = renderChildren(props.value, context, legacyContext);
1279 const {
1280 value,
1281 ...restProps
1282 } = props;
1283 props = restProps;
1284 } else if (props.dangerouslySetInnerHTML && typeof props.dangerouslySetInnerHTML.__html === 'string') {
1285 // Dangerous content is left unescaped.
1286 content = props.dangerouslySetInnerHTML.__html;
1287 } else if (typeof props.children !== 'undefined') {
1288 content = renderChildren(props.children, context, legacyContext);
1289 }
1290 if (!type) {
1291 return content;
1292 }
1293 const attributes = renderAttributes(props);
1294 if (SELF_CLOSING_TAGS.has(type)) {
1295 return '<' + type + attributes + '/>';
1296 }
1297 return '<' + type + attributes + '>' + content + '</' + type + '>';
1298 }
1299
1300 /** @typedef {import('react').ComponentType} ComponentType */
1301
1302 /**
1303 * Serializes a non-native component type to string.
1304 *
1305 * @param {ComponentType} Component Component type to serialize.
1306 * @param {Object} props Props object.
1307 * @param {Object} [context] Context object.
1308 * @param {Object} [legacyContext] Legacy context object.
1309 *
1310 * @return {string} Serialized element
1311 */
1312 function renderComponent(Component, props, context, legacyContext = {}) {
1313 const instance = new ( /** @type {import('react').ComponentClass} */
1314 Component)(props, legacyContext);
1315 if (typeof
1316 // Ignore reason: Current prettier reformats parens and mangles type assertion
1317 // prettier-ignore
1318 /** @type {{getChildContext?: () => unknown}} */
1319 instance.getChildContext === 'function') {
1320 Object.assign(legacyContext, /** @type {{getChildContext?: () => unknown}} */instance.getChildContext());
1321 }
1322 const html = renderElement(instance.render(), context, legacyContext);
1323 return html;
1324 }
1325
1326 /**
1327 * Serializes an array of children to string.
1328 *
1329 * @param {import('react').ReactNodeArray} children Children to serialize.
1330 * @param {Object} [context] Context object.
1331 * @param {Object} [legacyContext] Legacy context object.
1332 *
1333 * @return {string} Serialized children.
1334 */
1335 function renderChildren(children, context, legacyContext = {}) {
1336 let result = '';
1337 children = Array.isArray(children) ? children : [children];
1338 for (let i = 0; i < children.length; i++) {
1339 const child = children[i];
1340 result += renderElement(child, context, legacyContext);
1341 }
1342 return result;
1343 }
1344
1345 /**
1346 * Renders a props object as a string of HTML attributes.
1347 *
1348 * @param {Object} props Props object.
1349 *
1350 * @return {string} Attributes string.
1351 */
1352 function renderAttributes(props) {
1353 let result = '';
1354 for (const key in props) {
1355 const attribute = getNormalAttributeName(key);
1356 if (!(0,_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_3__.isValidAttributeName)(attribute)) {
1357 continue;
1358 }
1359 let value = getNormalAttributeValue(key, props[key]);
1360
1361 // If value is not of serializeable type, skip.
1362 if (!ATTRIBUTES_TYPES.has(typeof value)) {
1363 continue;
1364 }
1365
1366 // Don't render internal attribute names.
1367 if (isInternalAttribute(key)) {
1368 continue;
1369 }
1370 const isBooleanAttribute = BOOLEAN_ATTRIBUTES.has(attribute);
1371
1372 // Boolean attribute should be omitted outright if its value is false.
1373 if (isBooleanAttribute && value === false) {
1374 continue;
1375 }
1376 const isMeaningfulAttribute = isBooleanAttribute || hasPrefix(key, ['data-', 'aria-']) || ENUMERATED_ATTRIBUTES.has(attribute);
1377
1378 // Only write boolean value as attribute if meaningful.
1379 if (typeof value === 'boolean' && !isMeaningfulAttribute) {
1380 continue;
1381 }
1382 result += ' ' + attribute;
1383
1384 // Boolean attributes should write attribute name, but without value.
1385 // Mere presence of attribute name is effective truthiness.
1386 if (isBooleanAttribute) {
1387 continue;
1388 }
1389 if (typeof value === 'string') {
1390 value = (0,_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_3__.escapeAttribute)(value);
1391 }
1392 result += '="' + value + '"';
1393 }
1394 return result;
1395 }
1396
1397 /**
1398 * Renders a style object as a string attribute value.
1399 *
1400 * @param {Object} style Style object.
1401 *
1402 * @return {string} Style attribute value.
1403 */
1404 function renderStyle(style) {
1405 // Only generate from object, e.g. tolerate string value.
1406 if (!(0,is_plain_object__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(style)) {
1407 return style;
1408 }
1409 let result;
1410 for (const property in style) {
1411 const value = style[property];
1412 if (null === value || undefined === value) {
1413 continue;
1414 }
1415 if (result) {
1416 result += ';';
1417 } else {
1418 result = '';
1419 }
1420 const normalName = getNormalStylePropertyName(property);
1421 const normalValue = getNormalStylePropertyValue(property, value);
1422 result += normalName + ':' + normalValue;
1423 }
1424 return result;
1425 }
1426 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (renderElement);
1427 //# sourceMappingURL=serialize.js.map
1428
1429 /***/ }),
1430
1431 /***/ "../node_modules/@wordpress/element/build-module/utils.js":
1432 /*!****************************************************************!*\
1433 !*** ../node_modules/@wordpress/element/build-module/utils.js ***!
1434 \****************************************************************/
1435 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1436
1437 "use strict";
1438 __webpack_require__.r(__webpack_exports__);
1439 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1440 /* harmony export */ isEmptyElement: () => (/* binding */ isEmptyElement)
1441 /* harmony export */ });
1442 /**
1443 * Checks if the provided WP element is empty.
1444 *
1445 * @param {*} element WP element to check.
1446 * @return {boolean} True when an element is considered empty.
1447 */
1448 const isEmptyElement = element => {
1449 if (typeof element === 'number') {
1450 return false;
1451 }
1452 if (typeof element?.valueOf() === 'string' || Array.isArray(element)) {
1453 return !element.length;
1454 }
1455 return !element;
1456 };
1457 //# sourceMappingURL=utils.js.map
1458
1459 /***/ }),
1460
1461 /***/ "../node_modules/@wordpress/escape-html/build-module/escape-greater.js":
1462 /*!*****************************************************************************!*\
1463 !*** ../node_modules/@wordpress/escape-html/build-module/escape-greater.js ***!
1464 \*****************************************************************************/
1465 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1466
1467 "use strict";
1468 __webpack_require__.r(__webpack_exports__);
1469 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1470 /* harmony export */ "default": () => (/* binding */ __unstableEscapeGreaterThan)
1471 /* harmony export */ });
1472 /**
1473 * Returns a string with greater-than sign replaced.
1474 *
1475 * Note that if a resolution for Trac#45387 comes to fruition, it is no longer
1476 * necessary for `__unstableEscapeGreaterThan` to exist.
1477 *
1478 * See: https://core.trac.wordpress.org/ticket/45387
1479 *
1480 * @param {string} value Original string.
1481 *
1482 * @return {string} Escaped string.
1483 */
1484 function __unstableEscapeGreaterThan(value) {
1485 return value.replace(/>/g, '&gt;');
1486 }
1487 //# sourceMappingURL=escape-greater.js.map
1488
1489 /***/ }),
1490
1491 /***/ "../node_modules/@wordpress/escape-html/build-module/index.js":
1492 /*!********************************************************************!*\
1493 !*** ../node_modules/@wordpress/escape-html/build-module/index.js ***!
1494 \********************************************************************/
1495 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1496
1497 "use strict";
1498 __webpack_require__.r(__webpack_exports__);
1499 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1500 /* harmony export */ escapeAmpersand: () => (/* binding */ escapeAmpersand),
1501 /* harmony export */ escapeAttribute: () => (/* binding */ escapeAttribute),
1502 /* harmony export */ escapeEditableHTML: () => (/* binding */ escapeEditableHTML),
1503 /* harmony export */ escapeHTML: () => (/* binding */ escapeHTML),
1504 /* harmony export */ escapeLessThan: () => (/* binding */ escapeLessThan),
1505 /* harmony export */ escapeQuotationMark: () => (/* binding */ escapeQuotationMark),
1506 /* harmony export */ isValidAttributeName: () => (/* binding */ isValidAttributeName)
1507 /* harmony export */ });
1508 /* harmony import */ var _escape_greater__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./escape-greater */ "../node_modules/@wordpress/escape-html/build-module/escape-greater.js");
1509 /**
1510 * Internal dependencies
1511 */
1512
1513
1514 /**
1515 * Regular expression matching invalid attribute names.
1516 *
1517 * "Attribute names must consist of one or more characters other than controls,
1518 * U+0020 SPACE, U+0022 ("), U+0027 ('), U+003E (>), U+002F (/), U+003D (=),
1519 * and noncharacters."
1520 *
1521 * @see https://html.spec.whatwg.org/multipage/syntax.html#attributes-2
1522 *
1523 * @type {RegExp}
1524 */
1525 const REGEXP_INVALID_ATTRIBUTE_NAME = /[\u007F-\u009F "'>/="\uFDD0-\uFDEF]/;
1526
1527 /**
1528 * Returns a string with ampersands escaped. Note that this is an imperfect
1529 * implementation, where only ampersands which do not appear as a pattern of
1530 * named, decimal, or hexadecimal character references are escaped. Invalid
1531 * named references (i.e. ambiguous ampersand) are still permitted.
1532 *
1533 * @see https://w3c.github.io/html/syntax.html#character-references
1534 * @see https://w3c.github.io/html/syntax.html#ambiguous-ampersand
1535 * @see https://w3c.github.io/html/syntax.html#named-character-references
1536 *
1537 * @param {string} value Original string.
1538 *
1539 * @return {string} Escaped string.
1540 */
1541 function escapeAmpersand(value) {
1542 return value.replace(/&(?!([a-z0-9]+|#[0-9]+|#x[a-f0-9]+);)/gi, '&amp;');
1543 }
1544
1545 /**
1546 * Returns a string with quotation marks replaced.
1547 *
1548 * @param {string} value Original string.
1549 *
1550 * @return {string} Escaped string.
1551 */
1552 function escapeQuotationMark(value) {
1553 return value.replace(/"/g, '&quot;');
1554 }
1555
1556 /**
1557 * Returns a string with less-than sign replaced.
1558 *
1559 * @param {string} value Original string.
1560 *
1561 * @return {string} Escaped string.
1562 */
1563 function escapeLessThan(value) {
1564 return value.replace(/</g, '&lt;');
1565 }
1566
1567 /**
1568 * Returns an escaped attribute value.
1569 *
1570 * @see https://w3c.github.io/html/syntax.html#elements-attributes
1571 *
1572 * "[...] the text cannot contain an ambiguous ampersand [...] must not contain
1573 * any literal U+0022 QUOTATION MARK characters (")"
1574 *
1575 * Note we also escape the greater than symbol, as this is used by wptexturize to
1576 * split HTML strings. This is a WordPress specific fix
1577 *
1578 * Note that if a resolution for Trac#45387 comes to fruition, it is no longer
1579 * necessary for `__unstableEscapeGreaterThan` to be used.
1580 *
1581 * See: https://core.trac.wordpress.org/ticket/45387
1582 *
1583 * @param {string} value Attribute value.
1584 *
1585 * @return {string} Escaped attribute value.
1586 */
1587 function escapeAttribute(value) {
1588 return (0,_escape_greater__WEBPACK_IMPORTED_MODULE_0__["default"])(escapeQuotationMark(escapeAmpersand(value)));
1589 }
1590
1591 /**
1592 * Returns an escaped HTML element value.
1593 *
1594 * @see https://w3c.github.io/html/syntax.html#writing-html-documents-elements
1595 *
1596 * "the text must not contain the character U+003C LESS-THAN SIGN (<) or an
1597 * ambiguous ampersand."
1598 *
1599 * @param {string} value Element value.
1600 *
1601 * @return {string} Escaped HTML element value.
1602 */
1603 function escapeHTML(value) {
1604 return escapeLessThan(escapeAmpersand(value));
1605 }
1606
1607 /**
1608 * Returns an escaped Editable HTML element value. This is different from
1609 * `escapeHTML`, because for editable HTML, ALL ampersands must be escaped in
1610 * order to render the content correctly on the page.
1611 *
1612 * @param {string} value Element value.
1613 *
1614 * @return {string} Escaped HTML element value.
1615 */
1616 function escapeEditableHTML(value) {
1617 return escapeLessThan(value.replace(/&/g, '&amp;'));
1618 }
1619
1620 /**
1621 * Returns true if the given attribute name is valid, or false otherwise.
1622 *
1623 * @param {string} name Attribute name to test.
1624 *
1625 * @return {boolean} Whether attribute is valid.
1626 */
1627 function isValidAttributeName(name) {
1628 return !REGEXP_INVALID_ATTRIBUTE_NAME.test(name);
1629 }
1630 //# sourceMappingURL=index.js.map
1631
1632 /***/ }),
1633
1634 /***/ "../node_modules/dot-case/dist.es2015/index.js":
1635 /*!*****************************************************!*\
1636 !*** ../node_modules/dot-case/dist.es2015/index.js ***!
1637 \*****************************************************/
1638 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1639
1640 "use strict";
1641 __webpack_require__.r(__webpack_exports__);
1642 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1643 /* harmony export */ dotCase: () => (/* binding */ dotCase)
1644 /* harmony export */ });
1645 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ "../node_modules/dot-case/node_modules/tslib/tslib.es6.mjs");
1646 /* harmony import */ var no_case__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! no-case */ "../node_modules/no-case/dist.es2015/index.js");
1647
1648
1649 function dotCase(input, options) {
1650 if (options === void 0) { options = {}; }
1651 return (0,no_case__WEBPACK_IMPORTED_MODULE_0__.noCase)(input, (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)({ delimiter: "." }, options));
1652 }
1653 //# sourceMappingURL=index.js.map
1654
1655 /***/ }),
1656
1657 /***/ "../node_modules/lower-case/dist.es2015/index.js":
1658 /*!*******************************************************!*\
1659 !*** ../node_modules/lower-case/dist.es2015/index.js ***!
1660 \*******************************************************/
1661 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1662
1663 "use strict";
1664 __webpack_require__.r(__webpack_exports__);
1665 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1666 /* harmony export */ localeLowerCase: () => (/* binding */ localeLowerCase),
1667 /* harmony export */ lowerCase: () => (/* binding */ lowerCase)
1668 /* harmony export */ });
1669 /**
1670 * Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt
1671 */
1672 var SUPPORTED_LOCALE = {
1673 tr: {
1674 regexp: /\u0130|\u0049|\u0049\u0307/g,
1675 map: {
1676 İ: "\u0069",
1677 I: "\u0131",
1678 İ: "\u0069",
1679 },
1680 },
1681 az: {
1682 regexp: /\u0130/g,
1683 map: {
1684 İ: "\u0069",
1685 I: "\u0131",
1686 İ: "\u0069",
1687 },
1688 },
1689 lt: {
1690 regexp: /\u0049|\u004A|\u012E|\u00CC|\u00CD|\u0128/g,
1691 map: {
1692 I: "\u0069\u0307",
1693 J: "\u006A\u0307",
1694 Į: "\u012F\u0307",
1695 Ì: "\u0069\u0307\u0300",
1696 Í: "\u0069\u0307\u0301",
1697 Ĩ: "\u0069\u0307\u0303",
1698 },
1699 },
1700 };
1701 /**
1702 * Localized lower case.
1703 */
1704 function localeLowerCase(str, locale) {
1705 var lang = SUPPORTED_LOCALE[locale.toLowerCase()];
1706 if (lang)
1707 return lowerCase(str.replace(lang.regexp, function (m) { return lang.map[m]; }));
1708 return lowerCase(str);
1709 }
1710 /**
1711 * Lower case as a function.
1712 */
1713 function lowerCase(str) {
1714 return str.toLowerCase();
1715 }
1716 //# sourceMappingURL=index.js.map
1717
1718 /***/ }),
1719
1720 /***/ "../node_modules/no-case/dist.es2015/index.js":
1721 /*!****************************************************!*\
1722 !*** ../node_modules/no-case/dist.es2015/index.js ***!
1723 \****************************************************/
1724 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1725
1726 "use strict";
1727 __webpack_require__.r(__webpack_exports__);
1728 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1729 /* harmony export */ noCase: () => (/* binding */ noCase)
1730 /* harmony export */ });
1731 /* harmony import */ var lower_case__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lower-case */ "../node_modules/lower-case/dist.es2015/index.js");
1732
1733 // Support camel case ("camelCase" -> "camel Case" and "CAMELCase" -> "CAMEL Case").
1734 var DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];
1735 // Remove all non-word characters.
1736 var DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;
1737 /**
1738 * Normalize the string into something other libraries can manipulate easier.
1739 */
1740 function noCase(input, options) {
1741 if (options === void 0) { options = {}; }
1742 var _a = options.splitRegexp, splitRegexp = _a === void 0 ? DEFAULT_SPLIT_REGEXP : _a, _b = options.stripRegexp, stripRegexp = _b === void 0 ? DEFAULT_STRIP_REGEXP : _b, _c = options.transform, transform = _c === void 0 ? lower_case__WEBPACK_IMPORTED_MODULE_0__.lowerCase : _c, _d = options.delimiter, delimiter = _d === void 0 ? " " : _d;
1743 var result = replace(replace(input, splitRegexp, "$1\0$2"), stripRegexp, "\0");
1744 var start = 0;
1745 var end = result.length;
1746 // Trim the delimiter from around the output string.
1747 while (result.charAt(start) === "\0")
1748 start++;
1749 while (result.charAt(end - 1) === "\0")
1750 end--;
1751 // Transform each token independently.
1752 return result.slice(start, end).split("\0").map(transform).join(delimiter);
1753 }
1754 /**
1755 * Replace `re` in the input string with the replacement value.
1756 */
1757 function replace(input, re, value) {
1758 if (re instanceof RegExp)
1759 return input.replace(re, value);
1760 return re.reduce(function (input, re) { return input.replace(re, value); }, input);
1761 }
1762 //# sourceMappingURL=index.js.map
1763
1764 /***/ }),
1765
1766 /***/ "../node_modules/param-case/dist.es2015/index.js":
1767 /*!*******************************************************!*\
1768 !*** ../node_modules/param-case/dist.es2015/index.js ***!
1769 \*******************************************************/
1770 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1771
1772 "use strict";
1773 __webpack_require__.r(__webpack_exports__);
1774 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1775 /* harmony export */ paramCase: () => (/* binding */ paramCase)
1776 /* harmony export */ });
1777 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ "../node_modules/param-case/node_modules/tslib/tslib.es6.mjs");
1778 /* harmony import */ var dot_case__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! dot-case */ "../node_modules/dot-case/dist.es2015/index.js");
1779
1780
1781 function paramCase(input, options) {
1782 if (options === void 0) { options = {}; }
1783 return (0,dot_case__WEBPACK_IMPORTED_MODULE_0__.dotCase)(input, (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)({ delimiter: "-" }, options));
1784 }
1785 //# sourceMappingURL=index.js.map
1786
1787 /***/ }),
1788
1789 /***/ "../node_modules/react-dom/client.js":
1790 /*!*******************************************!*\
1791 !*** ../node_modules/react-dom/client.js ***!
1792 \*******************************************/
1793 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1794
1795 "use strict";
1796
1797
1798 var m = __webpack_require__(/*! react-dom */ "react-dom");
1799 if (false) {} else {
1800 var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
1801 exports.createRoot = function(c, o) {
1802 i.usingClientEntryPoint = true;
1803 try {
1804 return m.createRoot(c, o);
1805 } finally {
1806 i.usingClientEntryPoint = false;
1807 }
1808 };
1809 exports.hydrateRoot = function(c, h, o) {
1810 i.usingClientEntryPoint = true;
1811 try {
1812 return m.hydrateRoot(c, h, o);
1813 } finally {
1814 i.usingClientEntryPoint = false;
1815 }
1816 };
1817 }
1818
1819
1820 /***/ }),
1821
1822 /***/ "react":
1823 /*!************************!*\
1824 !*** external "React" ***!
1825 \************************/
1826 /***/ ((module) => {
1827
1828 "use strict";
1829 module.exports = React;
1830
1831 /***/ }),
1832
1833 /***/ "react-dom":
1834 /*!***************************!*\
1835 !*** external "ReactDOM" ***!
1836 \***************************/
1837 /***/ ((module) => {
1838
1839 "use strict";
1840 module.exports = ReactDOM;
1841
1842 /***/ }),
1843
1844 /***/ "@woocommerce/admin-layout":
1845 /*!*********************************!*\
1846 !*** external "wc.adminLayout" ***!
1847 \*********************************/
1848 /***/ ((module) => {
1849
1850 "use strict";
1851 module.exports = wc.adminLayout;
1852
1853 /***/ }),
1854
1855 /***/ "@wordpress/components":
1856 /*!********************************!*\
1857 !*** external "wp.components" ***!
1858 \********************************/
1859 /***/ ((module) => {
1860
1861 "use strict";
1862 module.exports = wp.components;
1863
1864 /***/ }),
1865
1866 /***/ "@wordpress/core-data":
1867 /*!******************************!*\
1868 !*** external "wp.coreData" ***!
1869 \******************************/
1870 /***/ ((module) => {
1871
1872 "use strict";
1873 module.exports = wp.coreData;
1874
1875 /***/ }),
1876
1877 /***/ "@wordpress/data":
1878 /*!**************************!*\
1879 !*** external "wp.data" ***!
1880 \**************************/
1881 /***/ ((module) => {
1882
1883 "use strict";
1884 module.exports = wp.data;
1885
1886 /***/ }),
1887
1888 /***/ "@wordpress/i18n":
1889 /*!**************************!*\
1890 !*** external "wp.i18n" ***!
1891 \**************************/
1892 /***/ ((module) => {
1893
1894 "use strict";
1895 module.exports = wp.i18n;
1896
1897 /***/ }),
1898
1899 /***/ "@wordpress/plugins":
1900 /*!*****************************!*\
1901 !*** external "wp.plugins" ***!
1902 \*****************************/
1903 /***/ ((module) => {
1904
1905 "use strict";
1906 module.exports = wp.plugins;
1907
1908 /***/ }),
1909
1910 /***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js":
1911 /*!******************************************************************!*\
1912 !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
1913 \******************************************************************/
1914 /***/ ((module) => {
1915
1916 function _arrayLikeToArray(r, a) {
1917 (null == a || a > r.length) && (a = r.length);
1918 for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
1919 return n;
1920 }
1921 module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
1922
1923 /***/ }),
1924
1925 /***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js":
1926 /*!****************************************************************!*\
1927 !*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
1928 \****************************************************************/
1929 /***/ ((module) => {
1930
1931 function _arrayWithHoles(r) {
1932 if (Array.isArray(r)) return r;
1933 }
1934 module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
1935
1936 /***/ }),
1937
1938 /***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js":
1939 /*!***********************************************************************!*\
1940 !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
1941 \***********************************************************************/
1942 /***/ ((module) => {
1943
1944 function _interopRequireDefault(e) {
1945 return e && e.__esModule ? e : {
1946 "default": e
1947 };
1948 }
1949 module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
1950
1951 /***/ }),
1952
1953 /***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js":
1954 /*!**********************************************************************!*\
1955 !*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
1956 \**********************************************************************/
1957 /***/ ((module) => {
1958
1959 function _iterableToArrayLimit(r, l) {
1960 var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
1961 if (null != t) {
1962 var e,
1963 n,
1964 i,
1965 u,
1966 a = [],
1967 f = !0,
1968 o = !1;
1969 try {
1970 if (i = (t = t.call(r)).next, 0 === l) {
1971 if (Object(t) !== t) return;
1972 f = !1;
1973 } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
1974 } catch (r) {
1975 o = !0, n = r;
1976 } finally {
1977 try {
1978 if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
1979 } finally {
1980 if (o) throw n;
1981 }
1982 }
1983 return a;
1984 }
1985 }
1986 module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
1987
1988 /***/ }),
1989
1990 /***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js":
1991 /*!*****************************************************************!*\
1992 !*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
1993 \*****************************************************************/
1994 /***/ ((module) => {
1995
1996 function _nonIterableRest() {
1997 throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1998 }
1999 module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
2000
2001 /***/ }),
2002
2003 /***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js":
2004 /*!***************************************************************!*\
2005 !*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***!
2006 \***************************************************************/
2007 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2008
2009 var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js");
2010 var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js");
2011 var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js");
2012 var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js");
2013 function _slicedToArray(r, e) {
2014 return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest();
2015 }
2016 module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
2017
2018 /***/ }),
2019
2020 /***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js":
2021 /*!****************************************************************************!*\
2022 !*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
2023 \****************************************************************************/
2024 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2025
2026 var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js");
2027 function _unsupportedIterableToArray(r, a) {
2028 if (r) {
2029 if ("string" == typeof r) return arrayLikeToArray(r, a);
2030 var t = {}.toString.call(r).slice(8, -1);
2031 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;
2032 }
2033 }
2034 module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
2035
2036 /***/ }),
2037
2038 /***/ "../node_modules/@wordpress/element/node_modules/is-plain-object/dist/is-plain-object.mjs":
2039 /*!************************************************************************************************!*\
2040 !*** ../node_modules/@wordpress/element/node_modules/is-plain-object/dist/is-plain-object.mjs ***!
2041 \************************************************************************************************/
2042 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
2043
2044 "use strict";
2045 __webpack_require__.r(__webpack_exports__);
2046 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2047 /* harmony export */ isPlainObject: () => (/* binding */ isPlainObject)
2048 /* harmony export */ });
2049 /*!
2050 * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
2051 *
2052 * Copyright (c) 2014-2017, Jon Schlinkert.
2053 * Released under the MIT License.
2054 */
2055
2056 function isObject(o) {
2057 return Object.prototype.toString.call(o) === '[object Object]';
2058 }
2059
2060 function isPlainObject(o) {
2061 var ctor,prot;
2062
2063 if (isObject(o) === false) return false;
2064
2065 // If has modified constructor
2066 ctor = o.constructor;
2067 if (ctor === undefined) return true;
2068
2069 // If has modified prototype
2070 prot = ctor.prototype;
2071 if (isObject(prot) === false) return false;
2072
2073 // If constructor does not have an Object-specific method
2074 if (prot.hasOwnProperty('isPrototypeOf') === false) {
2075 return false;
2076 }
2077
2078 // Most likely a plain Object
2079 return true;
2080 }
2081
2082
2083
2084
2085 /***/ }),
2086
2087 /***/ "../node_modules/dot-case/node_modules/tslib/tslib.es6.mjs":
2088 /*!*****************************************************************!*\
2089 !*** ../node_modules/dot-case/node_modules/tslib/tslib.es6.mjs ***!
2090 \*****************************************************************/
2091 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
2092
2093 "use strict";
2094 __webpack_require__.r(__webpack_exports__);
2095 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2096 /* harmony export */ __addDisposableResource: () => (/* binding */ __addDisposableResource),
2097 /* harmony export */ __assign: () => (/* binding */ __assign),
2098 /* harmony export */ __asyncDelegator: () => (/* binding */ __asyncDelegator),
2099 /* harmony export */ __asyncGenerator: () => (/* binding */ __asyncGenerator),
2100 /* harmony export */ __asyncValues: () => (/* binding */ __asyncValues),
2101 /* harmony export */ __await: () => (/* binding */ __await),
2102 /* harmony export */ __awaiter: () => (/* binding */ __awaiter),
2103 /* harmony export */ __classPrivateFieldGet: () => (/* binding */ __classPrivateFieldGet),
2104 /* harmony export */ __classPrivateFieldIn: () => (/* binding */ __classPrivateFieldIn),
2105 /* harmony export */ __classPrivateFieldSet: () => (/* binding */ __classPrivateFieldSet),
2106 /* harmony export */ __createBinding: () => (/* binding */ __createBinding),
2107 /* harmony export */ __decorate: () => (/* binding */ __decorate),
2108 /* harmony export */ __disposeResources: () => (/* binding */ __disposeResources),
2109 /* harmony export */ __esDecorate: () => (/* binding */ __esDecorate),
2110 /* harmony export */ __exportStar: () => (/* binding */ __exportStar),
2111 /* harmony export */ __extends: () => (/* binding */ __extends),
2112 /* harmony export */ __generator: () => (/* binding */ __generator),
2113 /* harmony export */ __importDefault: () => (/* binding */ __importDefault),
2114 /* harmony export */ __importStar: () => (/* binding */ __importStar),
2115 /* harmony export */ __makeTemplateObject: () => (/* binding */ __makeTemplateObject),
2116 /* harmony export */ __metadata: () => (/* binding */ __metadata),
2117 /* harmony export */ __param: () => (/* binding */ __param),
2118 /* harmony export */ __propKey: () => (/* binding */ __propKey),
2119 /* harmony export */ __read: () => (/* binding */ __read),
2120 /* harmony export */ __rest: () => (/* binding */ __rest),
2121 /* harmony export */ __runInitializers: () => (/* binding */ __runInitializers),
2122 /* harmony export */ __setFunctionName: () => (/* binding */ __setFunctionName),
2123 /* harmony export */ __spread: () => (/* binding */ __spread),
2124 /* harmony export */ __spreadArray: () => (/* binding */ __spreadArray),
2125 /* harmony export */ __spreadArrays: () => (/* binding */ __spreadArrays),
2126 /* harmony export */ __values: () => (/* binding */ __values),
2127 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
2128 /* harmony export */ });
2129 /******************************************************************************
2130 Copyright (c) Microsoft Corporation.
2131
2132 Permission to use, copy, modify, and/or distribute this software for any
2133 purpose with or without fee is hereby granted.
2134
2135 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
2136 REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
2137 AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
2138 INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
2139 LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
2140 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
2141 PERFORMANCE OF THIS SOFTWARE.
2142 ***************************************************************************** */
2143 /* global Reflect, Promise, SuppressedError, Symbol */
2144
2145 var extendStatics = function(d, b) {
2146 extendStatics = Object.setPrototypeOf ||
2147 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
2148 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
2149 return extendStatics(d, b);
2150 };
2151
2152 function __extends(d, b) {
2153 if (typeof b !== "function" && b !== null)
2154 throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
2155 extendStatics(d, b);
2156 function __() { this.constructor = d; }
2157 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
2158 }
2159
2160 var __assign = function() {
2161 __assign = Object.assign || function __assign(t) {
2162 for (var s, i = 1, n = arguments.length; i < n; i++) {
2163 s = arguments[i];
2164 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
2165 }
2166 return t;
2167 }
2168 return __assign.apply(this, arguments);
2169 }
2170
2171 function __rest(s, e) {
2172 var t = {};
2173 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
2174 t[p] = s[p];
2175 if (s != null && typeof Object.getOwnPropertySymbols === "function")
2176 for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
2177 if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
2178 t[p[i]] = s[p[i]];
2179 }
2180 return t;
2181 }
2182
2183 function __decorate(decorators, target, key, desc) {
2184 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2185 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
2186 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
2187 return c > 3 && r && Object.defineProperty(target, key, r), r;
2188 }
2189
2190 function __param(paramIndex, decorator) {
2191 return function (target, key) { decorator(target, key, paramIndex); }
2192 }
2193
2194 function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
2195 function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
2196 var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
2197 var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
2198 var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
2199 var _, done = false;
2200 for (var i = decorators.length - 1; i >= 0; i--) {
2201 var context = {};
2202 for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
2203 for (var p in contextIn.access) context.access[p] = contextIn.access[p];
2204 context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
2205 var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
2206 if (kind === "accessor") {
2207 if (result === void 0) continue;
2208 if (result === null || typeof result !== "object") throw new TypeError("Object expected");
2209 if (_ = accept(result.get)) descriptor.get = _;
2210 if (_ = accept(result.set)) descriptor.set = _;
2211 if (_ = accept(result.init)) initializers.unshift(_);
2212 }
2213 else if (_ = accept(result)) {
2214 if (kind === "field") initializers.unshift(_);
2215 else descriptor[key] = _;
2216 }
2217 }
2218 if (target) Object.defineProperty(target, contextIn.name, descriptor);
2219 done = true;
2220 };
2221
2222 function __runInitializers(thisArg, initializers, value) {
2223 var useValue = arguments.length > 2;
2224 for (var i = 0; i < initializers.length; i++) {
2225 value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
2226 }
2227 return useValue ? value : void 0;
2228 };
2229
2230 function __propKey(x) {
2231 return typeof x === "symbol" ? x : "".concat(x);
2232 };
2233
2234 function __setFunctionName(f, name, prefix) {
2235 if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
2236 return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
2237 };
2238
2239 function __metadata(metadataKey, metadataValue) {
2240 if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
2241 }
2242
2243 function __awaiter(thisArg, _arguments, P, generator) {
2244 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
2245 return new (P || (P = Promise))(function (resolve, reject) {
2246 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
2247 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
2248 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
2249 step((generator = generator.apply(thisArg, _arguments || [])).next());
2250 });
2251 }
2252
2253 function __generator(thisArg, body) {
2254 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
2255 return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
2256 function verb(n) { return function (v) { return step([n, v]); }; }
2257 function step(op) {
2258 if (f) throw new TypeError("Generator is already executing.");
2259 while (g && (g = 0, op[0] && (_ = 0)), _) try {
2260 if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
2261 if (y = 0, t) op = [op[0] & 2, t.value];
2262 switch (op[0]) {
2263 case 0: case 1: t = op; break;
2264 case 4: _.label++; return { value: op[1], done: false };
2265 case 5: _.label++; y = op[1]; op = [0]; continue;
2266 case 7: op = _.ops.pop(); _.trys.pop(); continue;
2267 default:
2268 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
2269 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
2270 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
2271 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
2272 if (t[2]) _.ops.pop();
2273 _.trys.pop(); continue;
2274 }
2275 op = body.call(thisArg, _);
2276 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
2277 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
2278 }
2279 }
2280
2281 var __createBinding = Object.create ? (function(o, m, k, k2) {
2282 if (k2 === undefined) k2 = k;
2283 var desc = Object.getOwnPropertyDescriptor(m, k);
2284 if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
2285 desc = { enumerable: true, get: function() { return m[k]; } };
2286 }
2287 Object.defineProperty(o, k2, desc);
2288 }) : (function(o, m, k, k2) {
2289 if (k2 === undefined) k2 = k;
2290 o[k2] = m[k];
2291 });
2292
2293 function __exportStar(m, o) {
2294 for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
2295 }
2296
2297 function __values(o) {
2298 var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
2299 if (m) return m.call(o);
2300 if (o && typeof o.length === "number") return {
2301 next: function () {
2302 if (o && i >= o.length) o = void 0;
2303 return { value: o && o[i++], done: !o };
2304 }
2305 };
2306 throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
2307 }
2308
2309 function __read(o, n) {
2310 var m = typeof Symbol === "function" && o[Symbol.iterator];
2311 if (!m) return o;
2312 var i = m.call(o), r, ar = [], e;
2313 try {
2314 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
2315 }
2316 catch (error) { e = { error: error }; }
2317 finally {
2318 try {
2319 if (r && !r.done && (m = i["return"])) m.call(i);
2320 }
2321 finally { if (e) throw e.error; }
2322 }
2323 return ar;
2324 }
2325
2326 /** @deprecated */
2327 function __spread() {
2328 for (var ar = [], i = 0; i < arguments.length; i++)
2329 ar = ar.concat(__read(arguments[i]));
2330 return ar;
2331 }
2332
2333 /** @deprecated */
2334 function __spreadArrays() {
2335 for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
2336 for (var r = Array(s), k = 0, i = 0; i < il; i++)
2337 for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
2338 r[k] = a[j];
2339 return r;
2340 }
2341
2342 function __spreadArray(to, from, pack) {
2343 if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
2344 if (ar || !(i in from)) {
2345 if (!ar) ar = Array.prototype.slice.call(from, 0, i);
2346 ar[i] = from[i];
2347 }
2348 }
2349 return to.concat(ar || Array.prototype.slice.call(from));
2350 }
2351
2352 function __await(v) {
2353 return this instanceof __await ? (this.v = v, this) : new __await(v);
2354 }
2355
2356 function __asyncGenerator(thisArg, _arguments, generator) {
2357 if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
2358 var g = generator.apply(thisArg, _arguments || []), i, q = [];
2359 return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
2360 function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
2361 function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
2362 function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
2363 function fulfill(value) { resume("next", value); }
2364 function reject(value) { resume("throw", value); }
2365 function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
2366 }
2367
2368 function __asyncDelegator(o) {
2369 var i, p;
2370 return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
2371 function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
2372 }
2373
2374 function __asyncValues(o) {
2375 if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
2376 var m = o[Symbol.asyncIterator], i;
2377 return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
2378 function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
2379 function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
2380 }
2381
2382 function __makeTemplateObject(cooked, raw) {
2383 if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
2384 return cooked;
2385 };
2386
2387 var __setModuleDefault = Object.create ? (function(o, v) {
2388 Object.defineProperty(o, "default", { enumerable: true, value: v });
2389 }) : function(o, v) {
2390 o["default"] = v;
2391 };
2392
2393 function __importStar(mod) {
2394 if (mod && mod.__esModule) return mod;
2395 var result = {};
2396 if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
2397 __setModuleDefault(result, mod);
2398 return result;
2399 }
2400
2401 function __importDefault(mod) {
2402 return (mod && mod.__esModule) ? mod : { default: mod };
2403 }
2404
2405 function __classPrivateFieldGet(receiver, state, kind, f) {
2406 if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
2407 if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
2408 return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
2409 }
2410
2411 function __classPrivateFieldSet(receiver, state, value, kind, f) {
2412 if (kind === "m") throw new TypeError("Private method is not writable");
2413 if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
2414 if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
2415 return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
2416 }
2417
2418 function __classPrivateFieldIn(state, receiver) {
2419 if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
2420 return typeof state === "function" ? receiver === state : state.has(receiver);
2421 }
2422
2423 function __addDisposableResource(env, value, async) {
2424 if (value !== null && value !== void 0) {
2425 if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
2426 var dispose;
2427 if (async) {
2428 if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
2429 dispose = value[Symbol.asyncDispose];
2430 }
2431 if (dispose === void 0) {
2432 if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
2433 dispose = value[Symbol.dispose];
2434 }
2435 if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
2436 env.stack.push({ value: value, dispose: dispose, async: async });
2437 }
2438 else if (async) {
2439 env.stack.push({ async: true });
2440 }
2441 return value;
2442 }
2443
2444 var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
2445 var e = new Error(message);
2446 return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
2447 };
2448
2449 function __disposeResources(env) {
2450 function fail(e) {
2451 env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
2452 env.hasError = true;
2453 }
2454 function next() {
2455 while (env.stack.length) {
2456 var rec = env.stack.pop();
2457 try {
2458 var result = rec.dispose && rec.dispose.call(rec.value);
2459 if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
2460 }
2461 catch (e) {
2462 fail(e);
2463 }
2464 }
2465 if (env.hasError) throw env.error;
2466 }
2467 return next();
2468 }
2469
2470 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
2471 __extends,
2472 __assign,
2473 __rest,
2474 __decorate,
2475 __param,
2476 __metadata,
2477 __awaiter,
2478 __generator,
2479 __createBinding,
2480 __exportStar,
2481 __values,
2482 __read,
2483 __spread,
2484 __spreadArrays,
2485 __spreadArray,
2486 __await,
2487 __asyncGenerator,
2488 __asyncDelegator,
2489 __asyncValues,
2490 __makeTemplateObject,
2491 __importStar,
2492 __importDefault,
2493 __classPrivateFieldGet,
2494 __classPrivateFieldSet,
2495 __classPrivateFieldIn,
2496 __addDisposableResource,
2497 __disposeResources,
2498 });
2499
2500
2501 /***/ }),
2502
2503 /***/ "../node_modules/param-case/node_modules/tslib/tslib.es6.mjs":
2504 /*!*******************************************************************!*\
2505 !*** ../node_modules/param-case/node_modules/tslib/tslib.es6.mjs ***!
2506 \*******************************************************************/
2507 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
2508
2509 "use strict";
2510 __webpack_require__.r(__webpack_exports__);
2511 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2512 /* harmony export */ __addDisposableResource: () => (/* binding */ __addDisposableResource),
2513 /* harmony export */ __assign: () => (/* binding */ __assign),
2514 /* harmony export */ __asyncDelegator: () => (/* binding */ __asyncDelegator),
2515 /* harmony export */ __asyncGenerator: () => (/* binding */ __asyncGenerator),
2516 /* harmony export */ __asyncValues: () => (/* binding */ __asyncValues),
2517 /* harmony export */ __await: () => (/* binding */ __await),
2518 /* harmony export */ __awaiter: () => (/* binding */ __awaiter),
2519 /* harmony export */ __classPrivateFieldGet: () => (/* binding */ __classPrivateFieldGet),
2520 /* harmony export */ __classPrivateFieldIn: () => (/* binding */ __classPrivateFieldIn),
2521 /* harmony export */ __classPrivateFieldSet: () => (/* binding */ __classPrivateFieldSet),
2522 /* harmony export */ __createBinding: () => (/* binding */ __createBinding),
2523 /* harmony export */ __decorate: () => (/* binding */ __decorate),
2524 /* harmony export */ __disposeResources: () => (/* binding */ __disposeResources),
2525 /* harmony export */ __esDecorate: () => (/* binding */ __esDecorate),
2526 /* harmony export */ __exportStar: () => (/* binding */ __exportStar),
2527 /* harmony export */ __extends: () => (/* binding */ __extends),
2528 /* harmony export */ __generator: () => (/* binding */ __generator),
2529 /* harmony export */ __importDefault: () => (/* binding */ __importDefault),
2530 /* harmony export */ __importStar: () => (/* binding */ __importStar),
2531 /* harmony export */ __makeTemplateObject: () => (/* binding */ __makeTemplateObject),
2532 /* harmony export */ __metadata: () => (/* binding */ __metadata),
2533 /* harmony export */ __param: () => (/* binding */ __param),
2534 /* harmony export */ __propKey: () => (/* binding */ __propKey),
2535 /* harmony export */ __read: () => (/* binding */ __read),
2536 /* harmony export */ __rest: () => (/* binding */ __rest),
2537 /* harmony export */ __runInitializers: () => (/* binding */ __runInitializers),
2538 /* harmony export */ __setFunctionName: () => (/* binding */ __setFunctionName),
2539 /* harmony export */ __spread: () => (/* binding */ __spread),
2540 /* harmony export */ __spreadArray: () => (/* binding */ __spreadArray),
2541 /* harmony export */ __spreadArrays: () => (/* binding */ __spreadArrays),
2542 /* harmony export */ __values: () => (/* binding */ __values),
2543 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
2544 /* harmony export */ });
2545 /******************************************************************************
2546 Copyright (c) Microsoft Corporation.
2547
2548 Permission to use, copy, modify, and/or distribute this software for any
2549 purpose with or without fee is hereby granted.
2550
2551 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
2552 REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
2553 AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
2554 INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
2555 LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
2556 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
2557 PERFORMANCE OF THIS SOFTWARE.
2558 ***************************************************************************** */
2559 /* global Reflect, Promise, SuppressedError, Symbol */
2560
2561 var extendStatics = function(d, b) {
2562 extendStatics = Object.setPrototypeOf ||
2563 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
2564 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
2565 return extendStatics(d, b);
2566 };
2567
2568 function __extends(d, b) {
2569 if (typeof b !== "function" && b !== null)
2570 throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
2571 extendStatics(d, b);
2572 function __() { this.constructor = d; }
2573 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
2574 }
2575
2576 var __assign = function() {
2577 __assign = Object.assign || function __assign(t) {
2578 for (var s, i = 1, n = arguments.length; i < n; i++) {
2579 s = arguments[i];
2580 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
2581 }
2582 return t;
2583 }
2584 return __assign.apply(this, arguments);
2585 }
2586
2587 function __rest(s, e) {
2588 var t = {};
2589 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
2590 t[p] = s[p];
2591 if (s != null && typeof Object.getOwnPropertySymbols === "function")
2592 for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
2593 if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
2594 t[p[i]] = s[p[i]];
2595 }
2596 return t;
2597 }
2598
2599 function __decorate(decorators, target, key, desc) {
2600 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2601 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
2602 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
2603 return c > 3 && r && Object.defineProperty(target, key, r), r;
2604 }
2605
2606 function __param(paramIndex, decorator) {
2607 return function (target, key) { decorator(target, key, paramIndex); }
2608 }
2609
2610 function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
2611 function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
2612 var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
2613 var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
2614 var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
2615 var _, done = false;
2616 for (var i = decorators.length - 1; i >= 0; i--) {
2617 var context = {};
2618 for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
2619 for (var p in contextIn.access) context.access[p] = contextIn.access[p];
2620 context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
2621 var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
2622 if (kind === "accessor") {
2623 if (result === void 0) continue;
2624 if (result === null || typeof result !== "object") throw new TypeError("Object expected");
2625 if (_ = accept(result.get)) descriptor.get = _;
2626 if (_ = accept(result.set)) descriptor.set = _;
2627 if (_ = accept(result.init)) initializers.unshift(_);
2628 }
2629 else if (_ = accept(result)) {
2630 if (kind === "field") initializers.unshift(_);
2631 else descriptor[key] = _;
2632 }
2633 }
2634 if (target) Object.defineProperty(target, contextIn.name, descriptor);
2635 done = true;
2636 };
2637
2638 function __runInitializers(thisArg, initializers, value) {
2639 var useValue = arguments.length > 2;
2640 for (var i = 0; i < initializers.length; i++) {
2641 value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
2642 }
2643 return useValue ? value : void 0;
2644 };
2645
2646 function __propKey(x) {
2647 return typeof x === "symbol" ? x : "".concat(x);
2648 };
2649
2650 function __setFunctionName(f, name, prefix) {
2651 if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
2652 return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
2653 };
2654
2655 function __metadata(metadataKey, metadataValue) {
2656 if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
2657 }
2658
2659 function __awaiter(thisArg, _arguments, P, generator) {
2660 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
2661 return new (P || (P = Promise))(function (resolve, reject) {
2662 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
2663 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
2664 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
2665 step((generator = generator.apply(thisArg, _arguments || [])).next());
2666 });
2667 }
2668
2669 function __generator(thisArg, body) {
2670 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
2671 return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
2672 function verb(n) { return function (v) { return step([n, v]); }; }
2673 function step(op) {
2674 if (f) throw new TypeError("Generator is already executing.");
2675 while (g && (g = 0, op[0] && (_ = 0)), _) try {
2676 if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
2677 if (y = 0, t) op = [op[0] & 2, t.value];
2678 switch (op[0]) {
2679 case 0: case 1: t = op; break;
2680 case 4: _.label++; return { value: op[1], done: false };
2681 case 5: _.label++; y = op[1]; op = [0]; continue;
2682 case 7: op = _.ops.pop(); _.trys.pop(); continue;
2683 default:
2684 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
2685 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
2686 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
2687 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
2688 if (t[2]) _.ops.pop();
2689 _.trys.pop(); continue;
2690 }
2691 op = body.call(thisArg, _);
2692 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
2693 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
2694 }
2695 }
2696
2697 var __createBinding = Object.create ? (function(o, m, k, k2) {
2698 if (k2 === undefined) k2 = k;
2699 var desc = Object.getOwnPropertyDescriptor(m, k);
2700 if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
2701 desc = { enumerable: true, get: function() { return m[k]; } };
2702 }
2703 Object.defineProperty(o, k2, desc);
2704 }) : (function(o, m, k, k2) {
2705 if (k2 === undefined) k2 = k;
2706 o[k2] = m[k];
2707 });
2708
2709 function __exportStar(m, o) {
2710 for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
2711 }
2712
2713 function __values(o) {
2714 var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
2715 if (m) return m.call(o);
2716 if (o && typeof o.length === "number") return {
2717 next: function () {
2718 if (o && i >= o.length) o = void 0;
2719 return { value: o && o[i++], done: !o };
2720 }
2721 };
2722 throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
2723 }
2724
2725 function __read(o, n) {
2726 var m = typeof Symbol === "function" && o[Symbol.iterator];
2727 if (!m) return o;
2728 var i = m.call(o), r, ar = [], e;
2729 try {
2730 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
2731 }
2732 catch (error) { e = { error: error }; }
2733 finally {
2734 try {
2735 if (r && !r.done && (m = i["return"])) m.call(i);
2736 }
2737 finally { if (e) throw e.error; }
2738 }
2739 return ar;
2740 }
2741
2742 /** @deprecated */
2743 function __spread() {
2744 for (var ar = [], i = 0; i < arguments.length; i++)
2745 ar = ar.concat(__read(arguments[i]));
2746 return ar;
2747 }
2748
2749 /** @deprecated */
2750 function __spreadArrays() {
2751 for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
2752 for (var r = Array(s), k = 0, i = 0; i < il; i++)
2753 for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
2754 r[k] = a[j];
2755 return r;
2756 }
2757
2758 function __spreadArray(to, from, pack) {
2759 if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
2760 if (ar || !(i in from)) {
2761 if (!ar) ar = Array.prototype.slice.call(from, 0, i);
2762 ar[i] = from[i];
2763 }
2764 }
2765 return to.concat(ar || Array.prototype.slice.call(from));
2766 }
2767
2768 function __await(v) {
2769 return this instanceof __await ? (this.v = v, this) : new __await(v);
2770 }
2771
2772 function __asyncGenerator(thisArg, _arguments, generator) {
2773 if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
2774 var g = generator.apply(thisArg, _arguments || []), i, q = [];
2775 return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
2776 function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
2777 function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
2778 function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
2779 function fulfill(value) { resume("next", value); }
2780 function reject(value) { resume("throw", value); }
2781 function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
2782 }
2783
2784 function __asyncDelegator(o) {
2785 var i, p;
2786 return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
2787 function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
2788 }
2789
2790 function __asyncValues(o) {
2791 if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
2792 var m = o[Symbol.asyncIterator], i;
2793 return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
2794 function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
2795 function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
2796 }
2797
2798 function __makeTemplateObject(cooked, raw) {
2799 if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
2800 return cooked;
2801 };
2802
2803 var __setModuleDefault = Object.create ? (function(o, v) {
2804 Object.defineProperty(o, "default", { enumerable: true, value: v });
2805 }) : function(o, v) {
2806 o["default"] = v;
2807 };
2808
2809 function __importStar(mod) {
2810 if (mod && mod.__esModule) return mod;
2811 var result = {};
2812 if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
2813 __setModuleDefault(result, mod);
2814 return result;
2815 }
2816
2817 function __importDefault(mod) {
2818 return (mod && mod.__esModule) ? mod : { default: mod };
2819 }
2820
2821 function __classPrivateFieldGet(receiver, state, kind, f) {
2822 if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
2823 if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
2824 return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
2825 }
2826
2827 function __classPrivateFieldSet(receiver, state, value, kind, f) {
2828 if (kind === "m") throw new TypeError("Private method is not writable");
2829 if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
2830 if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
2831 return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
2832 }
2833
2834 function __classPrivateFieldIn(state, receiver) {
2835 if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
2836 return typeof state === "function" ? receiver === state : state.has(receiver);
2837 }
2838
2839 function __addDisposableResource(env, value, async) {
2840 if (value !== null && value !== void 0) {
2841 if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
2842 var dispose;
2843 if (async) {
2844 if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
2845 dispose = value[Symbol.asyncDispose];
2846 }
2847 if (dispose === void 0) {
2848 if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
2849 dispose = value[Symbol.dispose];
2850 }
2851 if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
2852 env.stack.push({ value: value, dispose: dispose, async: async });
2853 }
2854 else if (async) {
2855 env.stack.push({ async: true });
2856 }
2857 return value;
2858 }
2859
2860 var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
2861 var e = new Error(message);
2862 return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
2863 };
2864
2865 function __disposeResources(env) {
2866 function fail(e) {
2867 env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
2868 env.hasError = true;
2869 }
2870 function next() {
2871 while (env.stack.length) {
2872 var rec = env.stack.pop();
2873 try {
2874 var result = rec.dispose && rec.dispose.call(rec.value);
2875 if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
2876 }
2877 catch (e) {
2878 fail(e);
2879 }
2880 }
2881 if (env.hasError) throw env.error;
2882 }
2883 return next();
2884 }
2885
2886 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
2887 __extends,
2888 __assign,
2889 __rest,
2890 __decorate,
2891 __param,
2892 __metadata,
2893 __awaiter,
2894 __generator,
2895 __createBinding,
2896 __exportStar,
2897 __values,
2898 __read,
2899 __spread,
2900 __spreadArrays,
2901 __spreadArray,
2902 __await,
2903 __asyncGenerator,
2904 __asyncDelegator,
2905 __asyncValues,
2906 __makeTemplateObject,
2907 __importStar,
2908 __importDefault,
2909 __classPrivateFieldGet,
2910 __classPrivateFieldSet,
2911 __classPrivateFieldIn,
2912 __addDisposableResource,
2913 __disposeResources,
2914 });
2915
2916
2917 /***/ })
2918
2919 /******/ });
2920 /************************************************************************/
2921 /******/ // The module cache
2922 /******/ var __webpack_module_cache__ = {};
2923 /******/
2924 /******/ // The require function
2925 /******/ function __webpack_require__(moduleId) {
2926 /******/ // Check if module is in cache
2927 /******/ var cachedModule = __webpack_module_cache__[moduleId];
2928 /******/ if (cachedModule !== undefined) {
2929 /******/ return cachedModule.exports;
2930 /******/ }
2931 /******/ // Create a new module (and put it into the cache)
2932 /******/ var module = __webpack_module_cache__[moduleId] = {
2933 /******/ // no module.id needed
2934 /******/ // no module.loaded needed
2935 /******/ exports: {}
2936 /******/ };
2937 /******/
2938 /******/ // Execute the module function
2939 /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
2940 /******/
2941 /******/ // Return the exports of the module
2942 /******/ return module.exports;
2943 /******/ }
2944 /******/
2945 /************************************************************************/
2946 /******/ /* webpack/runtime/compat get default export */
2947 /******/ (() => {
2948 /******/ // getDefaultExport function for compatibility with non-harmony modules
2949 /******/ __webpack_require__.n = (module) => {
2950 /******/ var getter = module && module.__esModule ?
2951 /******/ () => (module['default']) :
2952 /******/ () => (module);
2953 /******/ __webpack_require__.d(getter, { a: getter });
2954 /******/ return getter;
2955 /******/ };
2956 /******/ })();
2957 /******/
2958 /******/ /* webpack/runtime/define property getters */
2959 /******/ (() => {
2960 /******/ // define getter functions for harmony exports
2961 /******/ __webpack_require__.d = (exports, definition) => {
2962 /******/ for(var key in definition) {
2963 /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
2964 /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
2965 /******/ }
2966 /******/ }
2967 /******/ };
2968 /******/ })();
2969 /******/
2970 /******/ /* webpack/runtime/hasOwnProperty shorthand */
2971 /******/ (() => {
2972 /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
2973 /******/ })();
2974 /******/
2975 /******/ /* webpack/runtime/make namespace object */
2976 /******/ (() => {
2977 /******/ // define __esModule on exports
2978 /******/ __webpack_require__.r = (exports) => {
2979 /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
2980 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2981 /******/ }
2982 /******/ Object.defineProperty(exports, '__esModule', { value: true });
2983 /******/ };
2984 /******/ })();
2985 /******/
2986 /************************************************************************/
2987 var __webpack_exports__ = {};
2988 // This entry need to be wrapped in an IIFE because it need to be in strict mode.
2989 (() => {
2990 "use strict";
2991 /*!*********************************************************************!*\
2992 !*** ../modules/wc-product-editor/assets/js/e-wc-product-editor.js ***!
2993 \*********************************************************************/
2994
2995
2996 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
2997 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
2998 var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
2999 var _element = __webpack_require__(/*! @wordpress/element */ "../node_modules/@wordpress/element/build-module/index.js");
3000 var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
3001 var _data = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
3002 var _coreData = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data");
3003 var _components = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
3004 var _plugins = __webpack_require__(/*! @wordpress/plugins */ "@wordpress/plugins");
3005 var _adminLayout = __webpack_require__(/*! @woocommerce/admin-layout */ "@woocommerce/admin-layout");
3006 function EditWithElementorButton() {
3007 var _useState = (0, _element.useState)(false),
3008 _useState2 = (0, _slicedToArray2.default)(_useState, 2),
3009 isRedirecting = _useState2[0],
3010 setIsRedirecting = _useState2[1];
3011 var productId = (0, _coreData.useEntityId)('postType', 'product');
3012 var _useDispatch = (0, _data.useDispatch)('core'),
3013 saveEntityRecord = _useDispatch.saveEntityRecord;
3014 var postStatus = (0, _data.useSelect)(function (select) {
3015 var _select$getEditedEnti;
3016 return (_select$getEditedEnti = select('core').getEditedEntityRecord('postType', 'product', productId)) === null || _select$getEditedEnti === void 0 ? void 0 : _select$getEditedEnti.status;
3017 }, [productId]);
3018 var isSaving = wp.data.select('core/editor').isSavingPost();
3019 (0, _element.useEffect)(function () {
3020 if (isRedirecting && !isSaving) {
3021 redirectToElementor();
3022 }
3023 }, [isRedirecting, isSaving]);
3024 var handleClick = function handleClick() {
3025 if ('auto-draft' === postStatus) {
3026 saveEntityRecord('postType', 'product', {
3027 id: productId,
3028 name: "Elementor #".concat(productId),
3029 status: 'draft'
3030 }).then(function () {
3031 setIsRedirecting(true);
3032 }).catch(function () {});
3033 } else {
3034 setIsRedirecting(true);
3035 }
3036 };
3037 var redirectToElementor = function redirectToElementor() {
3038 window.location.href = getEditUrl();
3039 };
3040 var getEditUrl = function getEditUrl() {
3041 var url = new URL(ElementorWCProductEditorSettings.editLink);
3042 url.searchParams.set('post', productId);
3043 url.searchParams.set('action', 'elementor');
3044 return url.toString();
3045 };
3046 return /*#__PURE__*/_react.default.createElement(_adminLayout.WooHeaderItem, {
3047 name: "product"
3048 }, /*#__PURE__*/_react.default.createElement(_components.Button, {
3049 variant: "primary",
3050 onClick: handleClick,
3051 style: {
3052 display: 'flex',
3053 alignItems: 'center'
3054 }
3055 }, /*#__PURE__*/_react.default.createElement("i", {
3056 className: "eicon-elementor-square",
3057 "aria-hidden": "true",
3058 style: {
3059 paddingInlineEnd: '8px'
3060 }
3061 }), (0, _i18n.__)('Edit with Elementor', 'elementor')));
3062 }
3063 (0, _plugins.registerPlugin)('elementor-header-item', {
3064 render: EditWithElementorButton,
3065 scope: 'woocommerce-product-block-editor'
3066 });
3067 })();
3068
3069 /******/ })()
3070 ;
3071 //# sourceMappingURL=e-wc-product-editor.js.map