wp/wp-includes/js/dist/element.js
changeset 21 48c4eec2b7e6
parent 19 3d72ae0968f4
child 22 8c2e4d02f4ef
equal deleted inserted replaced
20:7b1b88e27a20 21:48c4eec2b7e6
     1 /******/ (function() { // webpackBootstrap
     1 /******/ (() => { // webpackBootstrap
     2 /******/ 	"use strict";
     2 /******/ 	"use strict";
     3 /******/ 	// The require scope
     3 /******/ 	var __webpack_modules__ = ({
     4 /******/ 	var __webpack_require__ = {};
     4 
       
     5 /***/ 4140:
       
     6 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
       
     7 
       
     8 
       
     9 
       
    10 var m = __webpack_require__(5795);
       
    11 if (true) {
       
    12   exports.H = m.createRoot;
       
    13   exports.c = m.hydrateRoot;
       
    14 } else { var i; }
       
    15 
       
    16 
       
    17 /***/ }),
       
    18 
       
    19 /***/ 5795:
       
    20 /***/ ((module) => {
       
    21 
       
    22 module.exports = window["ReactDOM"];
       
    23 
       
    24 /***/ })
       
    25 
       
    26 /******/ 	});
       
    27 /************************************************************************/
       
    28 /******/ 	// The module cache
       
    29 /******/ 	var __webpack_module_cache__ = {};
       
    30 /******/ 	
       
    31 /******/ 	// The require function
       
    32 /******/ 	function __webpack_require__(moduleId) {
       
    33 /******/ 		// Check if module is in cache
       
    34 /******/ 		var cachedModule = __webpack_module_cache__[moduleId];
       
    35 /******/ 		if (cachedModule !== undefined) {
       
    36 /******/ 			return cachedModule.exports;
       
    37 /******/ 		}
       
    38 /******/ 		// Create a new module (and put it into the cache)
       
    39 /******/ 		var module = __webpack_module_cache__[moduleId] = {
       
    40 /******/ 			// no module.id needed
       
    41 /******/ 			// no module.loaded needed
       
    42 /******/ 			exports: {}
       
    43 /******/ 		};
       
    44 /******/ 	
       
    45 /******/ 		// Execute the module function
       
    46 /******/ 		__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
       
    47 /******/ 	
       
    48 /******/ 		// Return the exports of the module
       
    49 /******/ 		return module.exports;
       
    50 /******/ 	}
     5 /******/ 	
    51 /******/ 	
     6 /************************************************************************/
    52 /************************************************************************/
     7 /******/ 	/* webpack/runtime/define property getters */
    53 /******/ 	/* webpack/runtime/define property getters */
     8 /******/ 	!function() {
    54 /******/ 	(() => {
     9 /******/ 		// define getter functions for harmony exports
    55 /******/ 		// define getter functions for harmony exports
    10 /******/ 		__webpack_require__.d = function(exports, definition) {
    56 /******/ 		__webpack_require__.d = (exports, definition) => {
    11 /******/ 			for(var key in definition) {
    57 /******/ 			for(var key in definition) {
    12 /******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
    58 /******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
    13 /******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
    59 /******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
    14 /******/ 				}
    60 /******/ 				}
    15 /******/ 			}
    61 /******/ 			}
    16 /******/ 		};
    62 /******/ 		};
    17 /******/ 	}();
    63 /******/ 	})();
    18 /******/ 	
    64 /******/ 	
    19 /******/ 	/* webpack/runtime/hasOwnProperty shorthand */
    65 /******/ 	/* webpack/runtime/hasOwnProperty shorthand */
    20 /******/ 	!function() {
    66 /******/ 	(() => {
    21 /******/ 		__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
    67 /******/ 		__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
    22 /******/ 	}();
    68 /******/ 	})();
    23 /******/ 	
    69 /******/ 	
    24 /******/ 	/* webpack/runtime/make namespace object */
    70 /******/ 	/* webpack/runtime/make namespace object */
    25 /******/ 	!function() {
    71 /******/ 	(() => {
    26 /******/ 		// define __esModule on exports
    72 /******/ 		// define __esModule on exports
    27 /******/ 		__webpack_require__.r = function(exports) {
    73 /******/ 		__webpack_require__.r = (exports) => {
    28 /******/ 			if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
    74 /******/ 			if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
    29 /******/ 				Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
    75 /******/ 				Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
    30 /******/ 			}
    76 /******/ 			}
    31 /******/ 			Object.defineProperty(exports, '__esModule', { value: true });
    77 /******/ 			Object.defineProperty(exports, '__esModule', { value: true });
    32 /******/ 		};
    78 /******/ 		};
    33 /******/ 	}();
    79 /******/ 	})();
    34 /******/ 	
    80 /******/ 	
    35 /************************************************************************/
    81 /************************************************************************/
    36 var __webpack_exports__ = {};
    82 var __webpack_exports__ = {};
       
    83 // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
       
    84 (() => {
    37 // ESM COMPAT FLAG
    85 // ESM COMPAT FLAG
    38 __webpack_require__.r(__webpack_exports__);
    86 __webpack_require__.r(__webpack_exports__);
    39 
    87 
    40 // EXPORTS
    88 // EXPORTS
    41 __webpack_require__.d(__webpack_exports__, {
    89 __webpack_require__.d(__webpack_exports__, {
    42   "Children": function() { return /* reexport */ external_React_namespaceObject.Children; },
    90   Children: () => (/* reexport */ external_React_namespaceObject.Children),
    43   "Component": function() { return /* reexport */ external_React_namespaceObject.Component; },
    91   Component: () => (/* reexport */ external_React_namespaceObject.Component),
    44   "Fragment": function() { return /* reexport */ external_React_namespaceObject.Fragment; },
    92   Fragment: () => (/* reexport */ external_React_namespaceObject.Fragment),
    45   "Platform": function() { return /* reexport */ platform; },
    93   Platform: () => (/* reexport */ platform),
    46   "RawHTML": function() { return /* reexport */ RawHTML; },
    94   PureComponent: () => (/* reexport */ external_React_namespaceObject.PureComponent),
    47   "StrictMode": function() { return /* reexport */ external_React_namespaceObject.StrictMode; },
    95   RawHTML: () => (/* reexport */ RawHTML),
    48   "Suspense": function() { return /* reexport */ external_React_namespaceObject.Suspense; },
    96   StrictMode: () => (/* reexport */ external_React_namespaceObject.StrictMode),
    49   "cloneElement": function() { return /* reexport */ external_React_namespaceObject.cloneElement; },
    97   Suspense: () => (/* reexport */ external_React_namespaceObject.Suspense),
    50   "concatChildren": function() { return /* reexport */ concatChildren; },
    98   cloneElement: () => (/* reexport */ external_React_namespaceObject.cloneElement),
    51   "createContext": function() { return /* reexport */ external_React_namespaceObject.createContext; },
    99   concatChildren: () => (/* reexport */ concatChildren),
    52   "createElement": function() { return /* reexport */ external_React_namespaceObject.createElement; },
   100   createContext: () => (/* reexport */ external_React_namespaceObject.createContext),
    53   "createInterpolateElement": function() { return /* reexport */ create_interpolate_element; },
   101   createElement: () => (/* reexport */ external_React_namespaceObject.createElement),
    54   "createPortal": function() { return /* reexport */ external_ReactDOM_namespaceObject.createPortal; },
   102   createInterpolateElement: () => (/* reexport */ create_interpolate_element),
    55   "createRef": function() { return /* reexport */ external_React_namespaceObject.createRef; },
   103   createPortal: () => (/* reexport */ external_ReactDOM_.createPortal),
    56   "findDOMNode": function() { return /* reexport */ external_ReactDOM_namespaceObject.findDOMNode; },
   104   createRef: () => (/* reexport */ external_React_namespaceObject.createRef),
    57   "forwardRef": function() { return /* reexport */ external_React_namespaceObject.forwardRef; },
   105   createRoot: () => (/* reexport */ client/* createRoot */.H),
    58   "isEmptyElement": function() { return /* reexport */ isEmptyElement; },
   106   findDOMNode: () => (/* reexport */ external_ReactDOM_.findDOMNode),
    59   "isValidElement": function() { return /* reexport */ external_React_namespaceObject.isValidElement; },
   107   flushSync: () => (/* reexport */ external_ReactDOM_.flushSync),
    60   "lazy": function() { return /* reexport */ external_React_namespaceObject.lazy; },
   108   forwardRef: () => (/* reexport */ external_React_namespaceObject.forwardRef),
    61   "memo": function() { return /* reexport */ external_React_namespaceObject.memo; },
   109   hydrate: () => (/* reexport */ external_ReactDOM_.hydrate),
    62   "render": function() { return /* reexport */ external_ReactDOM_namespaceObject.render; },
   110   hydrateRoot: () => (/* reexport */ client/* hydrateRoot */.c),
    63   "renderToString": function() { return /* reexport */ serialize; },
   111   isEmptyElement: () => (/* reexport */ isEmptyElement),
    64   "switchChildrenNodeName": function() { return /* reexport */ switchChildrenNodeName; },
   112   isValidElement: () => (/* reexport */ external_React_namespaceObject.isValidElement),
    65   "unmountComponentAtNode": function() { return /* reexport */ external_ReactDOM_namespaceObject.unmountComponentAtNode; },
   113   lazy: () => (/* reexport */ external_React_namespaceObject.lazy),
    66   "useCallback": function() { return /* reexport */ external_React_namespaceObject.useCallback; },
   114   memo: () => (/* reexport */ external_React_namespaceObject.memo),
    67   "useContext": function() { return /* reexport */ external_React_namespaceObject.useContext; },
   115   render: () => (/* reexport */ external_ReactDOM_.render),
    68   "useDebugValue": function() { return /* reexport */ external_React_namespaceObject.useDebugValue; },
   116   renderToString: () => (/* reexport */ serialize),
    69   "useEffect": function() { return /* reexport */ external_React_namespaceObject.useEffect; },
   117   startTransition: () => (/* reexport */ external_React_namespaceObject.startTransition),
    70   "useImperativeHandle": function() { return /* reexport */ external_React_namespaceObject.useImperativeHandle; },
   118   switchChildrenNodeName: () => (/* reexport */ switchChildrenNodeName),
    71   "useLayoutEffect": function() { return /* reexport */ external_React_namespaceObject.useLayoutEffect; },
   119   unmountComponentAtNode: () => (/* reexport */ external_ReactDOM_.unmountComponentAtNode),
    72   "useMemo": function() { return /* reexport */ external_React_namespaceObject.useMemo; },
   120   useCallback: () => (/* reexport */ external_React_namespaceObject.useCallback),
    73   "useReducer": function() { return /* reexport */ external_React_namespaceObject.useReducer; },
   121   useContext: () => (/* reexport */ external_React_namespaceObject.useContext),
    74   "useRef": function() { return /* reexport */ external_React_namespaceObject.useRef; },
   122   useDebugValue: () => (/* reexport */ external_React_namespaceObject.useDebugValue),
    75   "useState": function() { return /* reexport */ external_React_namespaceObject.useState; }
   123   useDeferredValue: () => (/* reexport */ external_React_namespaceObject.useDeferredValue),
       
   124   useEffect: () => (/* reexport */ external_React_namespaceObject.useEffect),
       
   125   useId: () => (/* reexport */ external_React_namespaceObject.useId),
       
   126   useImperativeHandle: () => (/* reexport */ external_React_namespaceObject.useImperativeHandle),
       
   127   useInsertionEffect: () => (/* reexport */ external_React_namespaceObject.useInsertionEffect),
       
   128   useLayoutEffect: () => (/* reexport */ external_React_namespaceObject.useLayoutEffect),
       
   129   useMemo: () => (/* reexport */ external_React_namespaceObject.useMemo),
       
   130   useReducer: () => (/* reexport */ external_React_namespaceObject.useReducer),
       
   131   useRef: () => (/* reexport */ external_React_namespaceObject.useRef),
       
   132   useState: () => (/* reexport */ external_React_namespaceObject.useState),
       
   133   useSyncExternalStore: () => (/* reexport */ external_React_namespaceObject.useSyncExternalStore),
       
   134   useTransition: () => (/* reexport */ external_React_namespaceObject.useTransition)
    76 });
   135 });
    77 
   136 
    78 ;// CONCATENATED MODULE: external "React"
   137 ;// CONCATENATED MODULE: external "React"
    79 var external_React_namespaceObject = window["React"];
   138 const external_React_namespaceObject = window["React"];
    80 ;// CONCATENATED MODULE: ./node_modules/@wordpress/element/build-module/create-interpolate-element.js
   139 ;// CONCATENATED MODULE: ./node_modules/@wordpress/element/build-module/create-interpolate-element.js
    81 /**
   140 /**
    82  * Internal dependencies
   141  * Internal dependencies
    83  */
   142  */
    84 
   143 
    85 /** @typedef {import('./react').WPElement} WPElement */
   144 
       
   145 /**
       
   146  * Object containing a React element.
       
   147  *
       
   148  * @typedef {import('react').ReactElement} Element
       
   149  */
    86 
   150 
    87 let indoc, offset, output, stack;
   151 let indoc, offset, output, stack;
       
   152 
    88 /**
   153 /**
    89  * Matches tags in the localized string
   154  * Matches tags in the localized string
    90  *
   155  *
    91  * This is used for extracting the tag pattern groups for parsing the localized
   156  * This is used for extracting the tag pattern groups for parsing the localized
    92  * string and along with the map converting it to a react element.
   157  * string and along with the map converting it to a react element.
    93  *
   158  *
    94  * There are four references extracted using this tokenizer:
   159  * There are four references extracted using this tokenizer:
    95  *
   160  *
    96  * match: Full match of the tag (i.e. <strong>, </strong>, <br/>)
   161  * match: Full match of the tag (i.e. <strong>, </strong>, <br/>)
    97  * isClosing: The closing slash, it it exists.
   162  * isClosing: The closing slash, if it exists.
    98  * name: The name portion of the tag (strong, br) (if )
   163  * name: The name portion of the tag (strong, br) (if )
    99  * isSelfClosed: The slash on a self closing tag, if it exists.
   164  * isSelfClosed: The slash on a self closing tag, if it exists.
   100  *
   165  *
   101  * @type {RegExp}
   166  * @type {RegExp}
   102  */
   167  */
   103 
       
   104 const tokenizer = /<(\/)?(\w+)\s*(\/)?>/g;
   168 const tokenizer = /<(\/)?(\w+)\s*(\/)?>/g;
       
   169 
   105 /**
   170 /**
   106  * The stack frame tracking parse progress.
   171  * The stack frame tracking parse progress.
   107  *
   172  *
   108  * @typedef Frame
   173  * @typedef Frame
   109  *
   174  *
   110  * @property {WPElement}   element            A parent element which may still have
   175  * @property {Element}   element            A parent element which may still have
   111  * @property {number}      tokenStart         Offset at which parent element first
   176  * @property {number}    tokenStart         Offset at which parent element first
   112  *                                            appears.
   177  *                                          appears.
   113  * @property {number}      tokenLength        Length of string marking start of parent
   178  * @property {number}    tokenLength        Length of string marking start of parent
   114  *                                            element.
   179  *                                          element.
   115  * @property {number}      [prevOffset]       Running offset at which parsing should
   180  * @property {number}    [prevOffset]       Running offset at which parsing should
   116  *                                            continue.
   181  *                                          continue.
   117  * @property {number}      [leadingTextStart] Offset at which last closing element
   182  * @property {number}    [leadingTextStart] Offset at which last closing element
   118  *                                            finished, used for finding text between
   183  *                                          finished, used for finding text between
   119  *                                            elements.
   184  *                                          elements.
   120  * @property {WPElement[]} children           Children.
   185  * @property {Element[]} children           Children.
   121  */
   186  */
   122 
   187 
   123 /**
   188 /**
   124  * Tracks recursive-descent parse state.
   189  * Tracks recursive-descent parse state.
   125  *
   190  *
   126  * This is a Stack frame holding parent elements until all children have been
   191  * This is a Stack frame holding parent elements until all children have been
   127  * parsed.
   192  * parsed.
   128  *
   193  *
   129  * @private
   194  * @private
   130  * @param {WPElement} element            A parent element which may still have
   195  * @param {Element} element            A parent element which may still have
   131  *                                       nested children not yet parsed.
   196  *                                     nested children not yet parsed.
   132  * @param {number}    tokenStart         Offset at which parent element first
   197  * @param {number}  tokenStart         Offset at which parent element first
   133  *                                       appears.
   198  *                                     appears.
   134  * @param {number}    tokenLength        Length of string marking start of parent
   199  * @param {number}  tokenLength        Length of string marking start of parent
   135  *                                       element.
   200  *                                     element.
   136  * @param {number}    [prevOffset]       Running offset at which parsing should
   201  * @param {number}  [prevOffset]       Running offset at which parsing should
   137  *                                       continue.
   202  *                                     continue.
   138  * @param {number}    [leadingTextStart] Offset at which last closing element
   203  * @param {number}  [leadingTextStart] Offset at which last closing element
   139  *                                       finished, used for finding text between
   204  *                                     finished, used for finding text between
   140  *                                       elements.
   205  *                                     elements.
   141  *
   206  *
   142  * @return {Frame} The stack frame tracking parse progress.
   207  * @return {Frame} The stack frame tracking parse progress.
   143  */
   208  */
   144 
       
   145 function createFrame(element, tokenStart, tokenLength, prevOffset, leadingTextStart) {
   209 function createFrame(element, tokenStart, tokenLength, prevOffset, leadingTextStart) {
   146   return {
   210   return {
   147     element,
   211     element,
   148     tokenStart,
   212     tokenStart,
   149     tokenLength,
   213     tokenLength,
   150     prevOffset,
   214     prevOffset,
   151     leadingTextStart,
   215     leadingTextStart,
   152     children: []
   216     children: []
   153   };
   217   };
   154 }
   218 }
       
   219 
   155 /**
   220 /**
   156  * This function creates an interpolated element from a passed in string with
   221  * This function creates an interpolated element from a passed in string with
   157  * specific tags matching how the string should be converted to an element via
   222  * specific tags matching how the string should be converted to an element via
   158  * the conversion map value.
   223  * the conversion map value.
   159  *
   224  *
   171  *     a: <a href={ 'https://github.com' } />,
   236  *     a: <a href={ 'https://github.com' } />,
   172  *     CustomComponentB: <CustomComponent />,
   237  *     CustomComponentB: <CustomComponent />,
   173  * }
   238  * }
   174  * ```
   239  * ```
   175  *
   240  *
   176  * @param {string} interpolatedString The interpolation string to be parsed.
   241  * @param {string}                  interpolatedString The interpolation string to be parsed.
   177  * @param {Object} conversionMap      The map used to convert the string to
   242  * @param {Record<string, Element>} conversionMap      The map used to convert the string to
   178  *                                    a react element.
   243  *                                                     a react element.
   179  * @throws {TypeError}
   244  * @throws {TypeError}
   180  * @return {WPElement}  A wp element.
   245  * @return {Element}  A wp element.
   181  */
   246  */
   182 
       
   183 
       
   184 const createInterpolateElement = (interpolatedString, conversionMap) => {
   247 const createInterpolateElement = (interpolatedString, conversionMap) => {
   185   indoc = interpolatedString;
   248   indoc = interpolatedString;
   186   offset = 0;
   249   offset = 0;
   187   output = [];
   250   output = [];
   188   stack = [];
   251   stack = [];
   189   tokenizer.lastIndex = 0;
   252   tokenizer.lastIndex = 0;
   190 
       
   191   if (!isValidConversionMap(conversionMap)) {
   253   if (!isValidConversionMap(conversionMap)) {
   192     throw new TypeError('The conversionMap provided is not valid. It must be an object with values that are WPElements');
   254     throw new TypeError('The conversionMap provided is not valid. It must be an object with values that are React Elements');
   193   }
   255   }
   194 
   256   do {
   195   do {// twiddle our thumbs
   257     // twiddle our thumbs
   196   } while (proceed(conversionMap));
   258   } while (proceed(conversionMap));
   197 
       
   198   return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, ...output);
   259   return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, ...output);
   199 };
   260 };
       
   261 
   200 /**
   262 /**
   201  * Validate conversion map.
   263  * Validate conversion map.
   202  *
   264  *
   203  * A map is considered valid if it's an object and every value in the object
   265  * A map is considered valid if it's an object and every value in the object
   204  * is a WPElement
   266  * is a React Element
   205  *
   267  *
   206  * @private
   268  * @private
   207  *
   269  *
   208  * @param {Object} conversionMap The map being validated.
   270  * @param {Object} conversionMap The map being validated.
   209  *
   271  *
   210  * @return {boolean}  True means the map is valid.
   272  * @return {boolean}  True means the map is valid.
   211  */
   273  */
   212 
       
   213 
       
   214 const isValidConversionMap = conversionMap => {
   274 const isValidConversionMap = conversionMap => {
   215   const isObject = typeof conversionMap === 'object';
   275   const isObject = typeof conversionMap === 'object';
   216   const values = isObject && Object.values(conversionMap);
   276   const values = isObject && Object.values(conversionMap);
   217   return isObject && values.length && values.every(element => (0,external_React_namespaceObject.isValidElement)(element));
   277   return isObject && values.length && values.every(element => (0,external_React_namespaceObject.isValidElement)(element));
   218 };
   278 };
       
   279 
   219 /**
   280 /**
   220  * This is the iterator over the matches in the string.
   281  * This is the iterator over the matches in the string.
   221  *
   282  *
   222  * @private
   283  * @private
   223  *
   284  *
   224  * @param {Object} conversionMap The conversion map for the string.
   285  * @param {Object} conversionMap The conversion map for the string.
   225  *
   286  *
   226  * @return {boolean} true for continuing to iterate, false for finished.
   287  * @return {boolean} true for continuing to iterate, false for finished.
   227  */
   288  */
   228 
       
   229 
       
   230 function proceed(conversionMap) {
   289 function proceed(conversionMap) {
   231   const next = nextToken();
   290   const next = nextToken();
   232   const [tokenType, name, startOffset, tokenLength] = next;
   291   const [tokenType, name, startOffset, tokenLength] = next;
   233   const stackDepth = stack.length;
   292   const stackDepth = stack.length;
   234   const leadingTextStart = startOffset > offset ? offset : null;
   293   const leadingTextStart = startOffset > offset ? offset : null;
   235 
       
   236   if (!conversionMap[name]) {
   294   if (!conversionMap[name]) {
   237     addText();
   295     addText();
   238     return false;
   296     return false;
   239   }
   297   }
   240 
       
   241   switch (tokenType) {
   298   switch (tokenType) {
   242     case 'no-more-tokens':
   299     case 'no-more-tokens':
   243       if (stackDepth !== 0) {
   300       if (stackDepth !== 0) {
   244         const {
   301         const {
   245           leadingTextStart: stackLeadingText,
   302           leadingTextStart: stackLeadingText,
   246           tokenStart
   303           tokenStart
   247         } = stack.pop();
   304         } = stack.pop();
   248         output.push(indoc.substr(stackLeadingText, tokenStart));
   305         output.push(indoc.substr(stackLeadingText, tokenStart));
   249       }
   306       }
   250 
       
   251       addText();
   307       addText();
   252       return false;
   308       return false;
   253 
       
   254     case 'self-closed':
   309     case 'self-closed':
   255       if (0 === stackDepth) {
   310       if (0 === stackDepth) {
   256         if (null !== leadingTextStart) {
   311         if (null !== leadingTextStart) {
   257           output.push(indoc.substr(leadingTextStart, startOffset - leadingTextStart));
   312           output.push(indoc.substr(leadingTextStart, startOffset - leadingTextStart));
   258         }
   313         }
   259 
       
   260         output.push(conversionMap[name]);
   314         output.push(conversionMap[name]);
   261         offset = startOffset + tokenLength;
   315         offset = startOffset + tokenLength;
   262         return true;
   316         return true;
   263       } // Otherwise we found an inner element.
   317       }
   264 
   318 
   265 
   319       // Otherwise we found an inner element.
   266       addChild(createFrame(conversionMap[name], startOffset, tokenLength));
   320       addChild(createFrame(conversionMap[name], startOffset, tokenLength));
   267       offset = startOffset + tokenLength;
   321       offset = startOffset + tokenLength;
   268       return true;
   322       return true;
   269 
       
   270     case 'opener':
   323     case 'opener':
   271       stack.push(createFrame(conversionMap[name], startOffset, tokenLength, startOffset + tokenLength, leadingTextStart));
   324       stack.push(createFrame(conversionMap[name], startOffset, tokenLength, startOffset + tokenLength, leadingTextStart));
   272       offset = startOffset + tokenLength;
   325       offset = startOffset + tokenLength;
   273       return true;
   326       return true;
   274 
       
   275     case 'closer':
   327     case 'closer':
   276       // If we're not nesting then this is easy - close the block.
   328       // If we're not nesting then this is easy - close the block.
   277       if (1 === stackDepth) {
   329       if (1 === stackDepth) {
   278         closeOuterElement(startOffset);
   330         closeOuterElement(startOffset);
   279         offset = startOffset + tokenLength;
   331         offset = startOffset + tokenLength;
   280         return true;
   332         return true;
   281       } // Otherwise we're nested and we have to close out the current
   333       }
       
   334 
       
   335       // Otherwise we're nested and we have to close out the current
   282       // block and add it as a innerBlock to the parent.
   336       // block and add it as a innerBlock to the parent.
   283 
       
   284 
       
   285       const stackTop = stack.pop();
   337       const stackTop = stack.pop();
   286       const text = indoc.substr(stackTop.prevOffset, startOffset - stackTop.prevOffset);
   338       const text = indoc.substr(stackTop.prevOffset, startOffset - stackTop.prevOffset);
   287       stackTop.children.push(text);
   339       stackTop.children.push(text);
   288       stackTop.prevOffset = startOffset + tokenLength;
   340       stackTop.prevOffset = startOffset + tokenLength;
   289       const frame = createFrame(stackTop.element, stackTop.tokenStart, stackTop.tokenLength, startOffset + tokenLength);
   341       const frame = createFrame(stackTop.element, stackTop.tokenStart, stackTop.tokenLength, startOffset + tokenLength);
   290       frame.children = stackTop.children;
   342       frame.children = stackTop.children;
   291       addChild(frame);
   343       addChild(frame);
   292       offset = startOffset + tokenLength;
   344       offset = startOffset + tokenLength;
   293       return true;
   345       return true;
   294 
       
   295     default:
   346     default:
   296       addText();
   347       addText();
   297       return false;
   348       return false;
   298   }
   349   }
   299 }
   350 }
       
   351 
   300 /**
   352 /**
   301  * Grabs the next token match in the string and returns it's details.
   353  * Grabs the next token match in the string and returns it's details.
   302  *
   354  *
   303  * @private
   355  * @private
   304  *
   356  *
   305  * @return {Array}  An array of details for the token matched.
   357  * @return {Array}  An array of details for the token matched.
   306  */
   358  */
   307 
       
   308 
       
   309 function nextToken() {
   359 function nextToken() {
   310   const matches = tokenizer.exec(indoc); // We have no more tokens.
   360   const matches = tokenizer.exec(indoc);
   311 
   361   // We have no more tokens.
   312   if (null === matches) {
   362   if (null === matches) {
   313     return ['no-more-tokens'];
   363     return ['no-more-tokens'];
   314   }
   364   }
   315 
       
   316   const startedAt = matches.index;
   365   const startedAt = matches.index;
   317   const [match, isClosing, name, isSelfClosed] = matches;
   366   const [match, isClosing, name, isSelfClosed] = matches;
   318   const length = match.length;
   367   const length = match.length;
   319 
       
   320   if (isSelfClosed) {
   368   if (isSelfClosed) {
   321     return ['self-closed', name, startedAt, length];
   369     return ['self-closed', name, startedAt, length];
   322   }
   370   }
   323 
       
   324   if (isClosing) {
   371   if (isClosing) {
   325     return ['closer', name, startedAt, length];
   372     return ['closer', name, startedAt, length];
   326   }
   373   }
   327 
       
   328   return ['opener', name, startedAt, length];
   374   return ['opener', name, startedAt, length];
   329 }
   375 }
       
   376 
   330 /**
   377 /**
   331  * Pushes text extracted from the indoc string to the output stack given the
   378  * Pushes text extracted from the indoc string to the output stack given the
   332  * current rawLength value and offset (if rawLength is provided ) or the
   379  * current rawLength value and offset (if rawLength is provided ) or the
   333  * indoc.length and offset.
   380  * indoc.length and offset.
   334  *
   381  *
   335  * @private
   382  * @private
   336  */
   383  */
   337 
       
   338 
       
   339 function addText() {
   384 function addText() {
   340   const length = indoc.length - offset;
   385   const length = indoc.length - offset;
   341 
       
   342   if (0 === length) {
   386   if (0 === length) {
   343     return;
   387     return;
   344   }
   388   }
   345 
       
   346   output.push(indoc.substr(offset, length));
   389   output.push(indoc.substr(offset, length));
   347 }
   390 }
       
   391 
   348 /**
   392 /**
   349  * Pushes a child element to the associated parent element's children for the
   393  * Pushes a child element to the associated parent element's children for the
   350  * parent currently active in the stack.
   394  * parent currently active in the stack.
   351  *
   395  *
   352  * @private
   396  * @private
   353  *
   397  *
   354  * @param {Frame} frame The Frame containing the child element and it's
   398  * @param {Frame} frame The Frame containing the child element and it's
   355  *                      token information.
   399  *                      token information.
   356  */
   400  */
   357 
       
   358 
       
   359 function addChild(frame) {
   401 function addChild(frame) {
   360   const {
   402   const {
   361     element,
   403     element,
   362     tokenStart,
   404     tokenStart,
   363     tokenLength,
   405     tokenLength,
   364     prevOffset,
   406     prevOffset,
   365     children
   407     children
   366   } = frame;
   408   } = frame;
   367   const parent = stack[stack.length - 1];
   409   const parent = stack[stack.length - 1];
   368   const text = indoc.substr(parent.prevOffset, tokenStart - parent.prevOffset);
   410   const text = indoc.substr(parent.prevOffset, tokenStart - parent.prevOffset);
   369 
       
   370   if (text) {
   411   if (text) {
   371     parent.children.push(text);
   412     parent.children.push(text);
   372   }
   413   }
   373 
       
   374   parent.children.push((0,external_React_namespaceObject.cloneElement)(element, null, ...children));
   414   parent.children.push((0,external_React_namespaceObject.cloneElement)(element, null, ...children));
   375   parent.prevOffset = prevOffset ? prevOffset : tokenStart + tokenLength;
   415   parent.prevOffset = prevOffset ? prevOffset : tokenStart + tokenLength;
   376 }
   416 }
       
   417 
   377 /**
   418 /**
   378  * This is called for closing tags. It creates the element currently active in
   419  * This is called for closing tags. It creates the element currently active in
   379  * the stack.
   420  * the stack.
   380  *
   421  *
   381  * @private
   422  * @private
   384  *                           begins in the string. If this is greater than the
   425  *                           begins in the string. If this is greater than the
   385  *                           prevOffset attached to the element, then this
   426  *                           prevOffset attached to the element, then this
   386  *                           helps capture any remaining nested text nodes in
   427  *                           helps capture any remaining nested text nodes in
   387  *                           the element.
   428  *                           the element.
   388  */
   429  */
   389 
       
   390 
       
   391 function closeOuterElement(endOffset) {
   430 function closeOuterElement(endOffset) {
   392   const {
   431   const {
   393     element,
   432     element,
   394     leadingTextStart,
   433     leadingTextStart,
   395     prevOffset,
   434     prevOffset,
   396     tokenStart,
   435     tokenStart,
   397     children
   436     children
   398   } = stack.pop();
   437   } = stack.pop();
   399   const text = endOffset ? indoc.substr(prevOffset, endOffset - prevOffset) : indoc.substr(prevOffset);
   438   const text = endOffset ? indoc.substr(prevOffset, endOffset - prevOffset) : indoc.substr(prevOffset);
   400 
       
   401   if (text) {
   439   if (text) {
   402     children.push(text);
   440     children.push(text);
   403   }
   441   }
   404 
       
   405   if (null !== leadingTextStart) {
   442   if (null !== leadingTextStart) {
   406     output.push(indoc.substr(leadingTextStart, tokenStart - leadingTextStart));
   443     output.push(indoc.substr(leadingTextStart, tokenStart - leadingTextStart));
   407   }
   444   }
   408 
       
   409   output.push((0,external_React_namespaceObject.cloneElement)(element, null, ...children));
   445   output.push((0,external_React_namespaceObject.cloneElement)(element, null, ...children));
   410 }
   446 }
   411 
   447 /* harmony default export */ const create_interpolate_element = (createInterpolateElement);
   412 /* harmony default export */ var create_interpolate_element = (createInterpolateElement);
   448 
   413 
       
   414 ;// CONCATENATED MODULE: external "lodash"
       
   415 var external_lodash_namespaceObject = window["lodash"];
       
   416 ;// CONCATENATED MODULE: ./node_modules/@wordpress/element/build-module/react.js
   449 ;// CONCATENATED MODULE: ./node_modules/@wordpress/element/build-module/react.js
   417 /**
   450 /**
   418  * External dependencies
   451  * External dependencies
   419  */
   452  */
   420 // eslint-disable-next-line @typescript-eslint/no-restricted-imports
   453 // eslint-disable-next-line @typescript-eslint/no-restricted-imports
   421 
   454 
   422 
   455 
   423 /**
   456 /**
   424  * Object containing a React element.
   457  * Object containing a React element.
   425  *
   458  *
   426  * @typedef {import('react').ReactElement} WPElement
   459  * @typedef {import('react').ReactElement} Element
   427  */
   460  */
   428 
   461 
   429 /**
   462 /**
   430  * Object containing a React component.
   463  * Object containing a React component.
   431  *
   464  *
   432  * @typedef {import('react').ComponentType} WPComponent
   465  * @typedef {import('react').ComponentType} ComponentType
   433  */
   466  */
   434 
   467 
   435 /**
   468 /**
   436  * Object containing a React synthetic event.
   469  * Object containing a React synthetic event.
   437  *
   470  *
   438  * @typedef {import('react').SyntheticEvent} WPSyntheticEvent
   471  * @typedef {import('react').SyntheticEvent} SyntheticEvent
       
   472  */
       
   473 
       
   474 /**
       
   475  * Object containing a React synthetic event.
       
   476  *
       
   477  * @template T
       
   478  * @typedef {import('react').RefObject<T>} RefObject<T>
   439  */
   479  */
   440 
   480 
   441 /**
   481 /**
   442  * Object that provides utilities for dealing with React children.
   482  * Object that provides utilities for dealing with React children.
   443  */
   483  */
   444 
   484 
   445 
   485 
   446 /**
   486 /**
   447  * Creates a copy of an element with extended props.
   487  * Creates a copy of an element with extended props.
   448  *
   488  *
   449  * @param {WPElement} element Element
   489  * @param {Element} element Element
   450  * @param {?Object}   props   Props to apply to cloned element
   490  * @param {?Object} props   Props to apply to cloned element
   451  *
   491  *
   452  * @return {WPElement} Cloned element.
   492  * @return {Element} Cloned element.
   453  */
   493  */
   454 
   494 
   455 
   495 
   456 /**
   496 /**
   457  * A base class to create WordPress Components (Refs, state and lifecycle hooks)
   497  * A base class to create WordPress Components (Refs, state and lifecycle hooks)
   473  *
   513  *
   474  * @param {?(string|Function)} type     Tag name or element creator
   514  * @param {?(string|Function)} type     Tag name or element creator
   475  * @param {Object}             props    Element properties, either attribute
   515  * @param {Object}             props    Element properties, either attribute
   476  *                                      set to apply to DOM node or values to
   516  *                                      set to apply to DOM node or values to
   477  *                                      pass through to element creator
   517  *                                      pass through to element creator
   478  * @param {...WPElement}       children Descendant elements
   518  * @param {...Element}         children Descendant elements
   479  *
   519  *
   480  * @return {WPElement} Element.
   520  * @return {Element} Element.
   481  */
   521  */
   482 
   522 
   483 
   523 
   484 /**
   524 /**
   485  * Returns an object tracking a reference to a rendered element via its
   525  * Returns an object tracking a reference to a rendered element via its
   497  * component which forwards its ref.
   537  * component which forwards its ref.
   498  *
   538  *
   499  * @param {Function} forwarder Function passed `props` and `ref`, expected to
   539  * @param {Function} forwarder Function passed `props` and `ref`, expected to
   500  *                             return an element.
   540  *                             return an element.
   501  *
   541  *
   502  * @return {WPComponent} Enhanced component.
   542  * @return {Component} Enhanced component.
   503  */
   543  */
   504 
   544 
   505 
   545 
   506 /**
   546 /**
   507  * A component which renders its children without any wrapping element.
   547  * A component which renders its children without any wrapping element.
   508  */
   548  */
   509 
   549 
   510 
   550 
   511 /**
   551 /**
   512  * Checks if an object is a valid WPElement.
   552  * Checks if an object is a valid React Element.
   513  *
   553  *
   514  * @param {Object} objectToCheck The object to be checked.
   554  * @param {Object} objectToCheck The object to be checked.
   515  *
   555  *
   516  * @return {boolean} true if objectToTest is a valid WPElement and false otherwise.
   556  * @return {boolean} true if objectToTest is a valid React Element and false otherwise.
   517  */
   557  */
   518 
   558 
   519 
   559 
   520 /**
   560 /**
   521  * @see https://reactjs.org/docs/react-api.html#reactmemo
   561  * @see https://reactjs.org/docs/react-api.html#reactmemo
   541  * @see https://reactjs.org/docs/hooks-reference.html#usedebugvalue
   581  * @see https://reactjs.org/docs/hooks-reference.html#usedebugvalue
   542  */
   582  */
   543 
   583 
   544 
   584 
   545 /**
   585 /**
       
   586  * @see https://reactjs.org/docs/hooks-reference.html#usedeferredvalue
       
   587  */
       
   588 
       
   589 
       
   590 /**
   546  * @see https://reactjs.org/docs/hooks-reference.html#useeffect
   591  * @see https://reactjs.org/docs/hooks-reference.html#useeffect
   547  */
   592  */
   548 
   593 
   549 
   594 
   550 /**
   595 /**
       
   596  * @see https://reactjs.org/docs/hooks-reference.html#useid
       
   597  */
       
   598 
       
   599 
       
   600 /**
   551  * @see https://reactjs.org/docs/hooks-reference.html#useimperativehandle
   601  * @see https://reactjs.org/docs/hooks-reference.html#useimperativehandle
   552  */
   602  */
   553 
   603 
   554 
   604 
   555 /**
   605 /**
       
   606  * @see https://reactjs.org/docs/hooks-reference.html#useinsertioneffect
       
   607  */
       
   608 
       
   609 
       
   610 /**
   556  * @see https://reactjs.org/docs/hooks-reference.html#uselayouteffect
   611  * @see https://reactjs.org/docs/hooks-reference.html#uselayouteffect
   557  */
   612  */
   558 
   613 
   559 
   614 
   560 /**
   615 /**
   576  * @see https://reactjs.org/docs/hooks-reference.html#usestate
   631  * @see https://reactjs.org/docs/hooks-reference.html#usestate
   577  */
   632  */
   578 
   633 
   579 
   634 
   580 /**
   635 /**
       
   636  * @see https://reactjs.org/docs/hooks-reference.html#usesyncexternalstore
       
   637  */
       
   638 
       
   639 
       
   640 /**
       
   641  * @see https://reactjs.org/docs/hooks-reference.html#usetransition
       
   642  */
       
   643 
       
   644 
       
   645 /**
       
   646  * @see https://reactjs.org/docs/react-api.html#starttransition
       
   647  */
       
   648 
       
   649 
       
   650 /**
   581  * @see https://reactjs.org/docs/react-api.html#reactlazy
   651  * @see https://reactjs.org/docs/react-api.html#reactlazy
   582  */
   652  */
   583 
   653 
   584 
   654 
   585 /**
   655 /**
   586  * @see https://reactjs.org/docs/react-api.html#reactsuspense
   656  * @see https://reactjs.org/docs/react-api.html#reactsuspense
   587  */
   657  */
   588 
   658 
   589 
   659 
   590 /**
   660 /**
       
   661  * @see https://reactjs.org/docs/react-api.html#reactpurecomponent
       
   662  */
       
   663 
       
   664 
       
   665 /**
   591  * Concatenate two or more React children objects.
   666  * Concatenate two or more React children objects.
   592  *
   667  *
   593  * @param {...?Object} childrenArguments Array of children arguments (array of arrays/strings/objects) to concatenate.
   668  * @param {...?Object} childrenArguments Array of children arguments (array of arrays/strings/objects) to concatenate.
   594  *
   669  *
   595  * @return {Array} The concatenated value.
   670  * @return {Array} The concatenated value.
   596  */
   671  */
   597 
   672 function concatChildren(...childrenArguments) {
   598 function concatChildren() {
       
   599   for (var _len = arguments.length, childrenArguments = new Array(_len), _key = 0; _key < _len; _key++) {
       
   600     childrenArguments[_key] = arguments[_key];
       
   601   }
       
   602 
       
   603   return childrenArguments.reduce((accumulator, children, i) => {
   673   return childrenArguments.reduce((accumulator, children, i) => {
   604     external_React_namespaceObject.Children.forEach(children, (child, j) => {
   674     external_React_namespaceObject.Children.forEach(children, (child, j) => {
   605       if (child && 'string' !== typeof child) {
   675       if (child && 'string' !== typeof child) {
   606         child = (0,external_React_namespaceObject.cloneElement)(child, {
   676         child = (0,external_React_namespaceObject.cloneElement)(child, {
   607           key: [i, j].join()
   677           key: [i, j].join()
   608         });
   678         });
   609       }
   679       }
   610 
       
   611       accumulator.push(child);
   680       accumulator.push(child);
   612     });
   681     });
   613     return accumulator;
   682     return accumulator;
   614   }, []);
   683   }, []);
   615 }
   684 }
       
   685 
   616 /**
   686 /**
   617  * Switches the nodeName of all the elements in the children object.
   687  * Switches the nodeName of all the elements in the children object.
   618  *
   688  *
   619  * @param {?Object} children Children object.
   689  * @param {?Object} children Children object.
   620  * @param {string}  nodeName Node name.
   690  * @param {string}  nodeName Node name.
   621  *
   691  *
   622  * @return {?Object} The updated children object.
   692  * @return {?Object} The updated children object.
   623  */
   693  */
   624 
       
   625 function switchChildrenNodeName(children, nodeName) {
   694 function switchChildrenNodeName(children, nodeName) {
   626   return children && external_React_namespaceObject.Children.map(children, (elt, index) => {
   695   return children && external_React_namespaceObject.Children.map(children, (elt, index) => {
   627     if ((0,external_lodash_namespaceObject.isString)(elt)) {
   696     if (typeof elt?.valueOf() === 'string') {
   628       return (0,external_React_namespaceObject.createElement)(nodeName, {
   697       return (0,external_React_namespaceObject.createElement)(nodeName, {
   629         key: index
   698         key: index
   630       }, elt);
   699       }, elt);
   631     }
   700     }
   632 
       
   633     const {
   701     const {
   634       children: childrenProp,
   702       children: childrenProp,
   635       ...props
   703       ...props
   636     } = elt.props;
   704     } = elt.props;
   637     return (0,external_React_namespaceObject.createElement)(nodeName, {
   705     return (0,external_React_namespaceObject.createElement)(nodeName, {
   639       ...props
   707       ...props
   640     }, childrenProp);
   708     }, childrenProp);
   641   });
   709   });
   642 }
   710 }
   643 
   711 
   644 ;// CONCATENATED MODULE: external "ReactDOM"
   712 // EXTERNAL MODULE: external "ReactDOM"
   645 var external_ReactDOM_namespaceObject = window["ReactDOM"];
   713 var external_ReactDOM_ = __webpack_require__(5795);
       
   714 // EXTERNAL MODULE: ./node_modules/react-dom/client.js
       
   715 var client = __webpack_require__(4140);
   646 ;// CONCATENATED MODULE: ./node_modules/@wordpress/element/build-module/react-platform.js
   716 ;// CONCATENATED MODULE: ./node_modules/@wordpress/element/build-module/react-platform.js
   647 /**
   717 /**
   648  * External dependencies
   718  * External dependencies
   649  */
   719  */
   650 
   720 
       
   721 
       
   722 
   651 /**
   723 /**
   652  * Creates a portal into which a component can be rendered.
   724  * Creates a portal into which a component can be rendered.
   653  *
   725  *
   654  * @see https://github.com/facebook/react/issues/10309#issuecomment-318433235
   726  * @see https://github.com/facebook/react/issues/10309#issuecomment-318433235
   655  *
   727  *
   656  * @param {import('./react').WPElement} child     Any renderable child, such as an element,
   728  * @param {import('react').ReactElement} child     Any renderable child, such as an element,
   657  *                                                string, or fragment.
   729  *                                                 string, or fragment.
   658  * @param {HTMLElement}                 container DOM node into which element should be rendered.
   730  * @param {HTMLElement}                  container DOM node into which element should be rendered.
   659  */
   731  */
   660 
   732 
   661 
   733 
   662 /**
   734 /**
   663  * Finds the dom node of a React component.
   735  * Finds the dom node of a React component.
   664  *
   736  *
   665  * @param {import('./react').WPComponent} component Component's instance.
   737  * @param {import('react').ComponentType} component Component's instance.
       
   738  */
       
   739 
       
   740 
       
   741 /**
       
   742  * Forces React to flush any updates inside the provided callback synchronously.
       
   743  *
       
   744  * @param {Function} callback Callback to run synchronously.
   666  */
   745  */
   667 
   746 
   668 
   747 
   669 /**
   748 /**
   670  * Renders a given element into the target DOM node.
   749  * Renders a given element into the target DOM node.
   671  *
   750  *
   672  * @param {import('./react').WPElement} element Element to render.
   751  * @deprecated since WordPress 6.2.0. Use `createRoot` instead.
   673  * @param {HTMLElement}                 target  DOM node into which element should be rendered.
   752  * @see https://react.dev/reference/react-dom/render
       
   753  */
       
   754 
       
   755 
       
   756 /**
       
   757  * Hydrates a given element into the target DOM node.
       
   758  *
       
   759  * @deprecated since WordPress 6.2.0. Use `hydrateRoot` instead.
       
   760  * @see https://react.dev/reference/react-dom/hydrate
       
   761  */
       
   762 
       
   763 
       
   764 /**
       
   765  * Creates a new React root for the target DOM node.
       
   766  *
       
   767  * @since 6.2.0 Introduced in WordPress core.
       
   768  * @see https://react.dev/reference/react-dom/client/createRoot
       
   769  */
       
   770 
       
   771 
       
   772 /**
       
   773  * Creates a new React root for the target DOM node and hydrates it with a pre-generated markup.
       
   774  *
       
   775  * @since 6.2.0 Introduced in WordPress core.
       
   776  * @see https://react.dev/reference/react-dom/client/hydrateRoot
   674  */
   777  */
   675 
   778 
   676 
   779 
   677 /**
   780 /**
   678  * Removes any mounted element from the target DOM node.
   781  * Removes any mounted element from the target DOM node.
   679  *
   782  *
   680  * @param {Element} target DOM node in which element is to be removed
   783  * @deprecated since WordPress 6.2.0. Use `root.unmount()` instead.
   681  */
   784  * @see https://react.dev/reference/react-dom/unmountComponentAtNode
   682 
   785  */
   683 
   786 
   684 
   787 
   685 ;// CONCATENATED MODULE: ./node_modules/@wordpress/element/build-module/utils.js
   788 ;// CONCATENATED MODULE: ./node_modules/@wordpress/element/build-module/utils.js
   686 /**
       
   687  * External dependencies
       
   688  */
       
   689 
       
   690 /**
   789 /**
   691  * Checks if the provided WP element is empty.
   790  * Checks if the provided WP element is empty.
   692  *
   791  *
   693  * @param {*} element WP element to check.
   792  * @param {*} element WP element to check.
   694  * @return {boolean} True when an element is considered empty.
   793  * @return {boolean} True when an element is considered empty.
   695  */
   794  */
   696 
       
   697 const isEmptyElement = element => {
   795 const isEmptyElement = element => {
   698   if ((0,external_lodash_namespaceObject.isNumber)(element)) {
   796   if (typeof element === 'number') {
   699     return false;
   797     return false;
   700   }
   798   }
   701 
   799   if (typeof element?.valueOf() === 'string' || Array.isArray(element)) {
   702   if ((0,external_lodash_namespaceObject.isString)(element) || (0,external_lodash_namespaceObject.isArray)(element)) {
       
   703     return !element.length;
   800     return !element.length;
   704   }
   801   }
   705 
       
   706   return !element;
   802   return !element;
   707 };
   803 };
   708 
   804 
   709 ;// CONCATENATED MODULE: ./node_modules/@wordpress/element/build-module/platform.js
   805 ;// CONCATENATED MODULE: ./node_modules/@wordpress/element/build-module/platform.js
   710 /**
   806 /**
   724  * Component used to detect the current Platform being used.
   820  * Component used to detect the current Platform being used.
   725  * Use Platform.OS === 'web' to detect if running on web enviroment.
   821  * Use Platform.OS === 'web' to detect if running on web enviroment.
   726  *
   822  *
   727  * This is the same concept as the React Native implementation.
   823  * This is the same concept as the React Native implementation.
   728  *
   824  *
   729  * @see https://facebook.github.io/react-native/docs/platform-specific-code#platform-module
   825  * @see https://reactnative.dev/docs/platform-specific-code#platform-module
   730  *
   826  *
   731  * Here is an example of how to use the select method:
   827  * Here is an example of how to use the select method:
   732  * @example
   828  * @example
   733  * ```js
   829  * ```js
   734  * import { Platform } from '@wordpress/element';
   830  * import { Platform } from '@wordpress/element';
   737  *   native: __( 'Add media' ),
   833  *   native: __( 'Add media' ),
   738  *   web: __( 'Drag images, upload new ones or select files from your library.' ),
   834  *   web: __( 'Drag images, upload new ones or select files from your library.' ),
   739  * } );
   835  * } );
   740  * ```
   836  * ```
   741  */
   837  */
   742 
   838 /* harmony default export */ const platform = (Platform);
   743 /* harmony default export */ var platform = (Platform);
   839 
       
   840 ;// CONCATENATED MODULE: ./node_modules/is-plain-object/dist/is-plain-object.mjs
       
   841 /*!
       
   842  * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
       
   843  *
       
   844  * Copyright (c) 2014-2017, Jon Schlinkert.
       
   845  * Released under the MIT License.
       
   846  */
       
   847 
       
   848 function isObject(o) {
       
   849   return Object.prototype.toString.call(o) === '[object Object]';
       
   850 }
       
   851 
       
   852 function isPlainObject(o) {
       
   853   var ctor,prot;
       
   854 
       
   855   if (isObject(o) === false) return false;
       
   856 
       
   857   // If has modified constructor
       
   858   ctor = o.constructor;
       
   859   if (ctor === undefined) return true;
       
   860 
       
   861   // If has modified prototype
       
   862   prot = ctor.prototype;
       
   863   if (isObject(prot) === false) return false;
       
   864 
       
   865   // If constructor does not have an Object-specific method
       
   866   if (prot.hasOwnProperty('isPrototypeOf') === false) {
       
   867     return false;
       
   868   }
       
   869 
       
   870   // Most likely a plain Object
       
   871   return true;
       
   872 }
       
   873 
       
   874 
       
   875 
       
   876 ;// CONCATENATED MODULE: ./node_modules/tslib/tslib.es6.mjs
       
   877 /******************************************************************************
       
   878 Copyright (c) Microsoft Corporation.
       
   879 
       
   880 Permission to use, copy, modify, and/or distribute this software for any
       
   881 purpose with or without fee is hereby granted.
       
   882 
       
   883 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
       
   884 REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
       
   885 AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
       
   886 INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
       
   887 LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
       
   888 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
       
   889 PERFORMANCE OF THIS SOFTWARE.
       
   890 ***************************************************************************** */
       
   891 /* global Reflect, Promise, SuppressedError, Symbol */
       
   892 
       
   893 var extendStatics = function(d, b) {
       
   894   extendStatics = Object.setPrototypeOf ||
       
   895       ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
       
   896       function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
       
   897   return extendStatics(d, b);
       
   898 };
       
   899 
       
   900 function __extends(d, b) {
       
   901   if (typeof b !== "function" && b !== null)
       
   902       throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
       
   903   extendStatics(d, b);
       
   904   function __() { this.constructor = d; }
       
   905   d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
       
   906 }
       
   907 
       
   908 var __assign = function() {
       
   909   __assign = Object.assign || function __assign(t) {
       
   910       for (var s, i = 1, n = arguments.length; i < n; i++) {
       
   911           s = arguments[i];
       
   912           for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
       
   913       }
       
   914       return t;
       
   915   }
       
   916   return __assign.apply(this, arguments);
       
   917 }
       
   918 
       
   919 function __rest(s, e) {
       
   920   var t = {};
       
   921   for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
       
   922       t[p] = s[p];
       
   923   if (s != null && typeof Object.getOwnPropertySymbols === "function")
       
   924       for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
       
   925           if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
       
   926               t[p[i]] = s[p[i]];
       
   927       }
       
   928   return t;
       
   929 }
       
   930 
       
   931 function __decorate(decorators, target, key, desc) {
       
   932   var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
       
   933   if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
       
   934   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;
       
   935   return c > 3 && r && Object.defineProperty(target, key, r), r;
       
   936 }
       
   937 
       
   938 function __param(paramIndex, decorator) {
       
   939   return function (target, key) { decorator(target, key, paramIndex); }
       
   940 }
       
   941 
       
   942 function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
       
   943   function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
       
   944   var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
       
   945   var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
       
   946   var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
       
   947   var _, done = false;
       
   948   for (var i = decorators.length - 1; i >= 0; i--) {
       
   949       var context = {};
       
   950       for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
       
   951       for (var p in contextIn.access) context.access[p] = contextIn.access[p];
       
   952       context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
       
   953       var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
       
   954       if (kind === "accessor") {
       
   955           if (result === void 0) continue;
       
   956           if (result === null || typeof result !== "object") throw new TypeError("Object expected");
       
   957           if (_ = accept(result.get)) descriptor.get = _;
       
   958           if (_ = accept(result.set)) descriptor.set = _;
       
   959           if (_ = accept(result.init)) initializers.unshift(_);
       
   960       }
       
   961       else if (_ = accept(result)) {
       
   962           if (kind === "field") initializers.unshift(_);
       
   963           else descriptor[key] = _;
       
   964       }
       
   965   }
       
   966   if (target) Object.defineProperty(target, contextIn.name, descriptor);
       
   967   done = true;
       
   968 };
       
   969 
       
   970 function __runInitializers(thisArg, initializers, value) {
       
   971   var useValue = arguments.length > 2;
       
   972   for (var i = 0; i < initializers.length; i++) {
       
   973       value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
       
   974   }
       
   975   return useValue ? value : void 0;
       
   976 };
       
   977 
       
   978 function __propKey(x) {
       
   979   return typeof x === "symbol" ? x : "".concat(x);
       
   980 };
       
   981 
       
   982 function __setFunctionName(f, name, prefix) {
       
   983   if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
       
   984   return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
       
   985 };
       
   986 
       
   987 function __metadata(metadataKey, metadataValue) {
       
   988   if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
       
   989 }
       
   990 
       
   991 function __awaiter(thisArg, _arguments, P, generator) {
       
   992   function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
       
   993   return new (P || (P = Promise))(function (resolve, reject) {
       
   994       function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
       
   995       function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
       
   996       function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
       
   997       step((generator = generator.apply(thisArg, _arguments || [])).next());
       
   998   });
       
   999 }
       
  1000 
       
  1001 function __generator(thisArg, body) {
       
  1002   var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
       
  1003   return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
       
  1004   function verb(n) { return function (v) { return step([n, v]); }; }
       
  1005   function step(op) {
       
  1006       if (f) throw new TypeError("Generator is already executing.");
       
  1007       while (g && (g = 0, op[0] && (_ = 0)), _) try {
       
  1008           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;
       
  1009           if (y = 0, t) op = [op[0] & 2, t.value];
       
  1010           switch (op[0]) {
       
  1011               case 0: case 1: t = op; break;
       
  1012               case 4: _.label++; return { value: op[1], done: false };
       
  1013               case 5: _.label++; y = op[1]; op = [0]; continue;
       
  1014               case 7: op = _.ops.pop(); _.trys.pop(); continue;
       
  1015               default:
       
  1016                   if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
       
  1017                   if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
       
  1018                   if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
       
  1019                   if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
       
  1020                   if (t[2]) _.ops.pop();
       
  1021                   _.trys.pop(); continue;
       
  1022           }
       
  1023           op = body.call(thisArg, _);
       
  1024       } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
       
  1025       if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
       
  1026   }
       
  1027 }
       
  1028 
       
  1029 var __createBinding = Object.create ? (function(o, m, k, k2) {
       
  1030   if (k2 === undefined) k2 = k;
       
  1031   var desc = Object.getOwnPropertyDescriptor(m, k);
       
  1032   if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
       
  1033       desc = { enumerable: true, get: function() { return m[k]; } };
       
  1034   }
       
  1035   Object.defineProperty(o, k2, desc);
       
  1036 }) : (function(o, m, k, k2) {
       
  1037   if (k2 === undefined) k2 = k;
       
  1038   o[k2] = m[k];
       
  1039 });
       
  1040 
       
  1041 function __exportStar(m, o) {
       
  1042   for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
       
  1043 }
       
  1044 
       
  1045 function __values(o) {
       
  1046   var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
       
  1047   if (m) return m.call(o);
       
  1048   if (o && typeof o.length === "number") return {
       
  1049       next: function () {
       
  1050           if (o && i >= o.length) o = void 0;
       
  1051           return { value: o && o[i++], done: !o };
       
  1052       }
       
  1053   };
       
  1054   throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
       
  1055 }
       
  1056 
       
  1057 function __read(o, n) {
       
  1058   var m = typeof Symbol === "function" && o[Symbol.iterator];
       
  1059   if (!m) return o;
       
  1060   var i = m.call(o), r, ar = [], e;
       
  1061   try {
       
  1062       while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
       
  1063   }
       
  1064   catch (error) { e = { error: error }; }
       
  1065   finally {
       
  1066       try {
       
  1067           if (r && !r.done && (m = i["return"])) m.call(i);
       
  1068       }
       
  1069       finally { if (e) throw e.error; }
       
  1070   }
       
  1071   return ar;
       
  1072 }
       
  1073 
       
  1074 /** @deprecated */
       
  1075 function __spread() {
       
  1076   for (var ar = [], i = 0; i < arguments.length; i++)
       
  1077       ar = ar.concat(__read(arguments[i]));
       
  1078   return ar;
       
  1079 }
       
  1080 
       
  1081 /** @deprecated */
       
  1082 function __spreadArrays() {
       
  1083   for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
       
  1084   for (var r = Array(s), k = 0, i = 0; i < il; i++)
       
  1085       for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
       
  1086           r[k] = a[j];
       
  1087   return r;
       
  1088 }
       
  1089 
       
  1090 function __spreadArray(to, from, pack) {
       
  1091   if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
       
  1092       if (ar || !(i in from)) {
       
  1093           if (!ar) ar = Array.prototype.slice.call(from, 0, i);
       
  1094           ar[i] = from[i];
       
  1095       }
       
  1096   }
       
  1097   return to.concat(ar || Array.prototype.slice.call(from));
       
  1098 }
       
  1099 
       
  1100 function __await(v) {
       
  1101   return this instanceof __await ? (this.v = v, this) : new __await(v);
       
  1102 }
       
  1103 
       
  1104 function __asyncGenerator(thisArg, _arguments, generator) {
       
  1105   if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
       
  1106   var g = generator.apply(thisArg, _arguments || []), i, q = [];
       
  1107   return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
       
  1108   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); }); }; }
       
  1109   function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
       
  1110   function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
       
  1111   function fulfill(value) { resume("next", value); }
       
  1112   function reject(value) { resume("throw", value); }
       
  1113   function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
       
  1114 }
       
  1115 
       
  1116 function __asyncDelegator(o) {
       
  1117   var i, p;
       
  1118   return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
       
  1119   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; }
       
  1120 }
       
  1121 
       
  1122 function __asyncValues(o) {
       
  1123   if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
       
  1124   var m = o[Symbol.asyncIterator], i;
       
  1125   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);
       
  1126   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); }); }; }
       
  1127   function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
       
  1128 }
       
  1129 
       
  1130 function __makeTemplateObject(cooked, raw) {
       
  1131   if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
       
  1132   return cooked;
       
  1133 };
       
  1134 
       
  1135 var __setModuleDefault = Object.create ? (function(o, v) {
       
  1136   Object.defineProperty(o, "default", { enumerable: true, value: v });
       
  1137 }) : function(o, v) {
       
  1138   o["default"] = v;
       
  1139 };
       
  1140 
       
  1141 function __importStar(mod) {
       
  1142   if (mod && mod.__esModule) return mod;
       
  1143   var result = {};
       
  1144   if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
       
  1145   __setModuleDefault(result, mod);
       
  1146   return result;
       
  1147 }
       
  1148 
       
  1149 function __importDefault(mod) {
       
  1150   return (mod && mod.__esModule) ? mod : { default: mod };
       
  1151 }
       
  1152 
       
  1153 function __classPrivateFieldGet(receiver, state, kind, f) {
       
  1154   if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
       
  1155   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");
       
  1156   return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
       
  1157 }
       
  1158 
       
  1159 function __classPrivateFieldSet(receiver, state, value, kind, f) {
       
  1160   if (kind === "m") throw new TypeError("Private method is not writable");
       
  1161   if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
       
  1162   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");
       
  1163   return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
       
  1164 }
       
  1165 
       
  1166 function __classPrivateFieldIn(state, receiver) {
       
  1167   if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
       
  1168   return typeof state === "function" ? receiver === state : state.has(receiver);
       
  1169 }
       
  1170 
       
  1171 function __addDisposableResource(env, value, async) {
       
  1172   if (value !== null && value !== void 0) {
       
  1173     if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
       
  1174     var dispose;
       
  1175     if (async) {
       
  1176         if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
       
  1177         dispose = value[Symbol.asyncDispose];
       
  1178     }
       
  1179     if (dispose === void 0) {
       
  1180         if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
       
  1181         dispose = value[Symbol.dispose];
       
  1182     }
       
  1183     if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
       
  1184     env.stack.push({ value: value, dispose: dispose, async: async });
       
  1185   }
       
  1186   else if (async) {
       
  1187     env.stack.push({ async: true });
       
  1188   }
       
  1189   return value;
       
  1190 }
       
  1191 
       
  1192 var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
       
  1193   var e = new Error(message);
       
  1194   return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
       
  1195 };
       
  1196 
       
  1197 function __disposeResources(env) {
       
  1198   function fail(e) {
       
  1199     env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
       
  1200     env.hasError = true;
       
  1201   }
       
  1202   function next() {
       
  1203     while (env.stack.length) {
       
  1204       var rec = env.stack.pop();
       
  1205       try {
       
  1206         var result = rec.dispose && rec.dispose.call(rec.value);
       
  1207         if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
       
  1208       }
       
  1209       catch (e) {
       
  1210           fail(e);
       
  1211       }
       
  1212     }
       
  1213     if (env.hasError) throw env.error;
       
  1214   }
       
  1215   return next();
       
  1216 }
       
  1217 
       
  1218 /* harmony default export */ const tslib_es6 = ({
       
  1219   __extends,
       
  1220   __assign,
       
  1221   __rest,
       
  1222   __decorate,
       
  1223   __param,
       
  1224   __metadata,
       
  1225   __awaiter,
       
  1226   __generator,
       
  1227   __createBinding,
       
  1228   __exportStar,
       
  1229   __values,
       
  1230   __read,
       
  1231   __spread,
       
  1232   __spreadArrays,
       
  1233   __spreadArray,
       
  1234   __await,
       
  1235   __asyncGenerator,
       
  1236   __asyncDelegator,
       
  1237   __asyncValues,
       
  1238   __makeTemplateObject,
       
  1239   __importStar,
       
  1240   __importDefault,
       
  1241   __classPrivateFieldGet,
       
  1242   __classPrivateFieldSet,
       
  1243   __classPrivateFieldIn,
       
  1244   __addDisposableResource,
       
  1245   __disposeResources,
       
  1246 });
       
  1247 
       
  1248 ;// CONCATENATED MODULE: ./node_modules/lower-case/dist.es2015/index.js
       
  1249 /**
       
  1250  * Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt
       
  1251  */
       
  1252 var SUPPORTED_LOCALE = {
       
  1253     tr: {
       
  1254         regexp: /\u0130|\u0049|\u0049\u0307/g,
       
  1255         map: {
       
  1256             İ: "\u0069",
       
  1257             I: "\u0131",
       
  1258             İ: "\u0069",
       
  1259         },
       
  1260     },
       
  1261     az: {
       
  1262         regexp: /\u0130/g,
       
  1263         map: {
       
  1264             İ: "\u0069",
       
  1265             I: "\u0131",
       
  1266             İ: "\u0069",
       
  1267         },
       
  1268     },
       
  1269     lt: {
       
  1270         regexp: /\u0049|\u004A|\u012E|\u00CC|\u00CD|\u0128/g,
       
  1271         map: {
       
  1272             I: "\u0069\u0307",
       
  1273             J: "\u006A\u0307",
       
  1274             Į: "\u012F\u0307",
       
  1275             Ì: "\u0069\u0307\u0300",
       
  1276             Í: "\u0069\u0307\u0301",
       
  1277             Ĩ: "\u0069\u0307\u0303",
       
  1278         },
       
  1279     },
       
  1280 };
       
  1281 /**
       
  1282  * Localized lower case.
       
  1283  */
       
  1284 function localeLowerCase(str, locale) {
       
  1285     var lang = SUPPORTED_LOCALE[locale.toLowerCase()];
       
  1286     if (lang)
       
  1287         return lowerCase(str.replace(lang.regexp, function (m) { return lang.map[m]; }));
       
  1288     return lowerCase(str);
       
  1289 }
       
  1290 /**
       
  1291  * Lower case as a function.
       
  1292  */
       
  1293 function lowerCase(str) {
       
  1294     return str.toLowerCase();
       
  1295 }
       
  1296 
       
  1297 ;// CONCATENATED MODULE: ./node_modules/no-case/dist.es2015/index.js
       
  1298 
       
  1299 // Support camel case ("camelCase" -> "camel Case" and "CAMELCase" -> "CAMEL Case").
       
  1300 var DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];
       
  1301 // Remove all non-word characters.
       
  1302 var DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;
       
  1303 /**
       
  1304  * Normalize the string into something other libraries can manipulate easier.
       
  1305  */
       
  1306 function noCase(input, options) {
       
  1307     if (options === void 0) { options = {}; }
       
  1308     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 ? lowerCase : _c, _d = options.delimiter, delimiter = _d === void 0 ? " " : _d;
       
  1309     var result = replace(replace(input, splitRegexp, "$1\0$2"), stripRegexp, "\0");
       
  1310     var start = 0;
       
  1311     var end = result.length;
       
  1312     // Trim the delimiter from around the output string.
       
  1313     while (result.charAt(start) === "\0")
       
  1314         start++;
       
  1315     while (result.charAt(end - 1) === "\0")
       
  1316         end--;
       
  1317     // Transform each token independently.
       
  1318     return result.slice(start, end).split("\0").map(transform).join(delimiter);
       
  1319 }
       
  1320 /**
       
  1321  * Replace `re` in the input string with the replacement value.
       
  1322  */
       
  1323 function replace(input, re, value) {
       
  1324     if (re instanceof RegExp)
       
  1325         return input.replace(re, value);
       
  1326     return re.reduce(function (input, re) { return input.replace(re, value); }, input);
       
  1327 }
       
  1328 
       
  1329 ;// CONCATENATED MODULE: ./node_modules/dot-case/dist.es2015/index.js
       
  1330 
       
  1331 
       
  1332 function dotCase(input, options) {
       
  1333     if (options === void 0) { options = {}; }
       
  1334     return noCase(input, __assign({ delimiter: "." }, options));
       
  1335 }
       
  1336 
       
  1337 ;// CONCATENATED MODULE: ./node_modules/param-case/dist.es2015/index.js
       
  1338 
       
  1339 
       
  1340 function paramCase(input, options) {
       
  1341     if (options === void 0) { options = {}; }
       
  1342     return dotCase(input, __assign({ delimiter: "-" }, options));
       
  1343 }
   744 
  1344 
   745 ;// CONCATENATED MODULE: external ["wp","escapeHtml"]
  1345 ;// CONCATENATED MODULE: external ["wp","escapeHtml"]
   746 var external_wp_escapeHtml_namespaceObject = window["wp"]["escapeHtml"];
  1346 const external_wp_escapeHtml_namespaceObject = window["wp"]["escapeHtml"];
   747 ;// CONCATENATED MODULE: ./node_modules/@wordpress/element/build-module/raw-html.js
  1347 ;// CONCATENATED MODULE: ./node_modules/@wordpress/element/build-module/raw-html.js
   748 /**
  1348 /**
   749  * Internal dependencies
  1349  * Internal dependencies
   750  */
  1350  */
   751  // Disable reason: JSDoc linter doesn't seem to parse the union (`&`) correctly.
  1351 
   752 
  1352 
   753 /** @typedef {{children: string} & import('react').ComponentPropsWithoutRef<'div'>} RawHTMLProps */
  1353 /** @typedef {{children: string} & import('react').ComponentPropsWithoutRef<'div'>} RawHTMLProps */
   754 
  1354 
   755 /**
  1355 /**
   756  * Component used as equivalent of Fragment with unescaped HTML, in cases where
  1356  * Component used as equivalent of Fragment with unescaped HTML, in cases where
   762  *                             of strings. Other props will be passed through
  1362  *                             of strings. Other props will be passed through
   763  *                             to the div wrapper.
  1363  *                             to the div wrapper.
   764  *
  1364  *
   765  * @return {JSX.Element} Dangerously-rendering component.
  1365  * @return {JSX.Element} Dangerously-rendering component.
   766  */
  1366  */
   767 
  1367 function RawHTML({
   768 function RawHTML(_ref) {
  1368   children,
   769   let {
  1369   ...props
   770     children,
  1370 }) {
   771     ...props
  1371   let rawHtml = '';
   772   } = _ref;
  1372 
   773   let rawHtml = ''; // Cast children as an array, and concatenate each element if it is a string.
  1373   // Cast children as an array, and concatenate each element if it is a string.
   774 
       
   775   external_React_namespaceObject.Children.toArray(children).forEach(child => {
  1374   external_React_namespaceObject.Children.toArray(children).forEach(child => {
   776     if (typeof child === 'string' && child.trim() !== '') {
  1375     if (typeof child === 'string' && child.trim() !== '') {
   777       rawHtml += child;
  1376       rawHtml += child;
   778     }
  1377     }
   779   }); // The `div` wrapper will be stripped by the `renderElement` serializer in
  1378   });
       
  1379 
       
  1380   // The `div` wrapper will be stripped by the `renderElement` serializer in
   780   // `./serialize.js` unless there are non-children props present.
  1381   // `./serialize.js` unless there are non-children props present.
   781 
       
   782   return (0,external_React_namespaceObject.createElement)('div', {
  1382   return (0,external_React_namespaceObject.createElement)('div', {
   783     dangerouslySetInnerHTML: {
  1383     dangerouslySetInnerHTML: {
   784       __html: rawHtml
  1384       __html: rawHtml
   785     },
  1385     },
   786     ...props
  1386     ...props
   817 
  1417 
   818 /**
  1418 /**
   819  * External dependencies
  1419  * External dependencies
   820  */
  1420  */
   821 
  1421 
       
  1422 
       
  1423 
   822 /**
  1424 /**
   823  * WordPress dependencies
  1425  * WordPress dependencies
   824  */
  1426  */
   825 
  1427 
   826 
  1428 
   828  * Internal dependencies
  1430  * Internal dependencies
   829  */
  1431  */
   830 
  1432 
   831 
  1433 
   832 
  1434 
   833 /** @typedef {import('./react').WPElement} WPElement */
  1435 /** @typedef {import('react').ReactElement} ReactElement */
   834 
  1436 
   835 const {
  1437 const {
   836   Provider,
  1438   Provider,
   837   Consumer
  1439   Consumer
   838 } = (0,external_React_namespaceObject.createContext)(undefined);
  1440 } = (0,external_React_namespaceObject.createContext)(undefined);
   839 const ForwardRef = (0,external_React_namespaceObject.forwardRef)(() => {
  1441 const ForwardRef = (0,external_React_namespaceObject.forwardRef)(() => {
   840   return null;
  1442   return null;
   841 });
  1443 });
       
  1444 
   842 /**
  1445 /**
   843  * Valid attribute types.
  1446  * Valid attribute types.
   844  *
  1447  *
   845  * @type {Set<string>}
  1448  * @type {Set<string>}
   846  */
  1449  */
   847 
       
   848 const ATTRIBUTES_TYPES = new Set(['string', 'boolean', 'number']);
  1450 const ATTRIBUTES_TYPES = new Set(['string', 'boolean', 'number']);
       
  1451 
   849 /**
  1452 /**
   850  * Element tags which can be self-closing.
  1453  * Element tags which can be self-closing.
   851  *
  1454  *
   852  * @type {Set<string>}
  1455  * @type {Set<string>}
   853  */
  1456  */
   854 
       
   855 const SELF_CLOSING_TAGS = new Set(['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr']);
  1457 const SELF_CLOSING_TAGS = new Set(['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr']);
       
  1458 
   856 /**
  1459 /**
   857  * Boolean attributes are attributes whose presence as being assigned is
  1460  * Boolean attributes are attributes whose presence as being assigned is
   858  * meaningful, even if only empty.
  1461  * meaningful, even if only empty.
   859  *
  1462  *
   860  * See: https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#boolean-attributes
  1463  * See: https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#boolean-attributes
   866  *         [ tr.firstChild.textContent.trim() ]: true
  1469  *         [ tr.firstChild.textContent.trim() ]: true
   867  *     } ), {} ) ).sort();
  1470  *     } ), {} ) ).sort();
   868  *
  1471  *
   869  * @type {Set<string>}
  1472  * @type {Set<string>}
   870  */
  1473  */
   871 
       
   872 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']);
  1474 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']);
       
  1475 
   873 /**
  1476 /**
   874  * Enumerated attributes are attributes which must be of a specific value form.
  1477  * Enumerated attributes are attributes which must be of a specific value form.
   875  * Like boolean attributes, these are meaningful if specified, even if not of a
  1478  * Like boolean attributes, these are meaningful if specified, even if not of a
   876  * valid enumerated value.
  1479  * valid enumerated value.
   877  *
  1480  *
   888  *
  1491  *
   889  *  - `alt`: https://blog.whatwg.org/omit-alt
  1492  *  - `alt`: https://blog.whatwg.org/omit-alt
   890  *
  1493  *
   891  * @type {Set<string>}
  1494  * @type {Set<string>}
   892  */
  1495  */
   893 
       
   894 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']);
  1496 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']);
       
  1497 
   895 /**
  1498 /**
   896  * Set of CSS style properties which support assignment of unitless numbers.
  1499  * Set of CSS style properties which support assignment of unitless numbers.
   897  * Used in rendering of style properties, where `px` unit is assumed unless
  1500  * Used in rendering of style properties, where `px` unit is assumed unless
   898  * property is included in this set or value is zero.
  1501  * property is included in this set or value is zero.
   899  *
  1502  *
   908  *     .map( ( [ key ] ) => key )
  1511  *     .map( ( [ key ] ) => key )
   909  *     .sort();
  1512  *     .sort();
   910  *
  1513  *
   911  * @type {Set<string>}
  1514  * @type {Set<string>}
   912  */
  1515  */
   913 
       
   914 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']);
  1516 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']);
       
  1517 
   915 /**
  1518 /**
   916  * Returns true if the specified string is prefixed by one of an array of
  1519  * Returns true if the specified string is prefixed by one of an array of
   917  * possible prefixes.
  1520  * possible prefixes.
   918  *
  1521  *
   919  * @param {string}   string   String to check.
  1522  * @param {string}   string   String to check.
   920  * @param {string[]} prefixes Possible prefixes.
  1523  * @param {string[]} prefixes Possible prefixes.
   921  *
  1524  *
   922  * @return {boolean} Whether string has prefix.
  1525  * @return {boolean} Whether string has prefix.
   923  */
  1526  */
   924 
       
   925 function hasPrefix(string, prefixes) {
  1527 function hasPrefix(string, prefixes) {
   926   return prefixes.some(prefix => string.indexOf(prefix) === 0);
  1528   return prefixes.some(prefix => string.indexOf(prefix) === 0);
   927 }
  1529 }
       
  1530 
   928 /**
  1531 /**
   929  * Returns true if the given prop name should be ignored in attributes
  1532  * Returns true if the given prop name should be ignored in attributes
   930  * serialization, or false otherwise.
  1533  * serialization, or false otherwise.
   931  *
  1534  *
   932  * @param {string} attribute Attribute to check.
  1535  * @param {string} attribute Attribute to check.
   933  *
  1536  *
   934  * @return {boolean} Whether attribute should be ignored.
  1537  * @return {boolean} Whether attribute should be ignored.
   935  */
  1538  */
   936 
       
   937 function isInternalAttribute(attribute) {
  1539 function isInternalAttribute(attribute) {
   938   return 'key' === attribute || 'children' === attribute;
  1540   return 'key' === attribute || 'children' === attribute;
   939 }
  1541 }
       
  1542 
   940 /**
  1543 /**
   941  * Returns the normal form of the element's attribute value for HTML.
  1544  * Returns the normal form of the element's attribute value for HTML.
   942  *
  1545  *
   943  * @param {string} attribute Attribute name.
  1546  * @param {string} attribute Attribute name.
   944  * @param {*}      value     Non-normalized attribute value.
  1547  * @param {*}      value     Non-normalized attribute value.
   945  *
  1548  *
   946  * @return {*} Normalized attribute value.
  1549  * @return {*} Normalized attribute value.
   947  */
  1550  */
   948 
       
   949 
       
   950 function getNormalAttributeValue(attribute, value) {
  1551 function getNormalAttributeValue(attribute, value) {
   951   switch (attribute) {
  1552   switch (attribute) {
   952     case 'style':
  1553     case 'style':
   953       return renderStyle(value);
  1554       return renderStyle(value);
   954   }
  1555   }
   955 
       
   956   return value;
  1556   return value;
   957 }
  1557 }
   958 /**
  1558 /**
   959  * This is a map of all SVG attributes that have dashes. Map(lower case prop => dashed lower case attribute).
  1559  * This is a map of all SVG attributes that have dashes. Map(lower case prop => dashed lower case attribute).
   960  * We need this to render e.g strokeWidth as stroke-width.
  1560  * We need this to render e.g strokeWidth as stroke-width.
   961  *
  1561  *
   962  * List from: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute.
  1562  * List from: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute.
   963  */
  1563  */
   964 
       
   965 
       
   966 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) => {
  1564 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) => {
   967   // The keys are lower-cased for more robust lookup.
  1565   // The keys are lower-cased for more robust lookup.
   968   map[attribute.toLowerCase()] = attribute;
  1566   map[attribute.toLowerCase()] = attribute;
   969   return map;
  1567   return map;
   970 }, {});
  1568 }, {});
       
  1569 
   971 /**
  1570 /**
   972  * This is a map of all case-sensitive SVG attributes. Map(lowercase key => proper case attribute).
  1571  * This is a map of all case-sensitive SVG attributes. Map(lowercase key => proper case attribute).
   973  * The keys are lower-cased for more robust lookup.
  1572  * The keys are lower-cased for more robust lookup.
   974  * Note that this list only contains attributes that contain at least one capital letter.
  1573  * Note that this list only contains attributes that contain at least one capital letter.
   975  * Lowercase attributes don't need mapping, since we lowercase all attributes by default.
  1574  * Lowercase attributes don't need mapping, since we lowercase all attributes by default.
   976  */
  1575  */
   977 
       
   978 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) => {
  1576 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) => {
   979   // The keys are lower-cased for more robust lookup.
  1577   // The keys are lower-cased for more robust lookup.
   980   map[attribute.toLowerCase()] = attribute;
  1578   map[attribute.toLowerCase()] = attribute;
   981   return map;
  1579   return map;
   982 }, {});
  1580 }, {});
       
  1581 
   983 /**
  1582 /**
   984  * This is a map of all SVG attributes that have colons.
  1583  * This is a map of all SVG attributes that have colons.
   985  * Keys are lower-cased and stripped of their colons for more robust lookup.
  1584  * Keys are lower-cased and stripped of their colons for more robust lookup.
   986  */
  1585  */
   987 
       
   988 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) => {
  1586 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) => {
   989   map[attribute.replace(':', '').toLowerCase()] = attribute;
  1587   map[attribute.replace(':', '').toLowerCase()] = attribute;
   990   return map;
  1588   return map;
   991 }, {});
  1589 }, {});
       
  1590 
   992 /**
  1591 /**
   993  * Returns the normal form of the element's attribute name for HTML.
  1592  * Returns the normal form of the element's attribute name for HTML.
   994  *
  1593  *
   995  * @param {string} attribute Non-normalized attribute name.
  1594  * @param {string} attribute Non-normalized attribute name.
   996  *
  1595  *
   997  * @return {string} Normalized attribute name.
  1596  * @return {string} Normalized attribute name.
   998  */
  1597  */
   999 
       
  1000 function getNormalAttributeName(attribute) {
  1598 function getNormalAttributeName(attribute) {
  1001   switch (attribute) {
  1599   switch (attribute) {
  1002     case 'htmlFor':
  1600     case 'htmlFor':
  1003       return 'for';
  1601       return 'for';
  1004 
       
  1005     case 'className':
  1602     case 'className':
  1006       return 'class';
  1603       return 'class';
  1007   }
  1604   }
  1008 
       
  1009   const attributeLowerCase = attribute.toLowerCase();
  1605   const attributeLowerCase = attribute.toLowerCase();
  1010 
       
  1011   if (CASE_SENSITIVE_SVG_ATTRIBUTES[attributeLowerCase]) {
  1606   if (CASE_SENSITIVE_SVG_ATTRIBUTES[attributeLowerCase]) {
  1012     return CASE_SENSITIVE_SVG_ATTRIBUTES[attributeLowerCase];
  1607     return CASE_SENSITIVE_SVG_ATTRIBUTES[attributeLowerCase];
  1013   } else if (SVG_ATTRIBUTE_WITH_DASHES_LIST[attributeLowerCase]) {
  1608   } else if (SVG_ATTRIBUTE_WITH_DASHES_LIST[attributeLowerCase]) {
  1014     return (0,external_lodash_namespaceObject.kebabCase)(SVG_ATTRIBUTE_WITH_DASHES_LIST[attributeLowerCase]);
  1609     return paramCase(SVG_ATTRIBUTE_WITH_DASHES_LIST[attributeLowerCase]);
  1015   } else if (SVG_ATTRIBUTES_WITH_COLONS[attributeLowerCase]) {
  1610   } else if (SVG_ATTRIBUTES_WITH_COLONS[attributeLowerCase]) {
  1016     return SVG_ATTRIBUTES_WITH_COLONS[attributeLowerCase];
  1611     return SVG_ATTRIBUTES_WITH_COLONS[attributeLowerCase];
  1017   }
  1612   }
  1018 
       
  1019   return attributeLowerCase;
  1613   return attributeLowerCase;
  1020 }
  1614 }
       
  1615 
  1021 /**
  1616 /**
  1022  * Returns the normal form of the style property name for HTML.
  1617  * Returns the normal form of the style property name for HTML.
  1023  *
  1618  *
  1024  * - Converts property names to kebab-case, e.g. 'backgroundColor' → 'background-color'
  1619  * - Converts property names to kebab-case, e.g. 'backgroundColor' → 'background-color'
  1025  * - Leaves custom attributes alone, e.g. '--myBackgroundColor' → '--myBackgroundColor'
  1620  * - Leaves custom attributes alone, e.g. '--myBackgroundColor' → '--myBackgroundColor'
  1027  *
  1622  *
  1028  * @param {string} property Property name.
  1623  * @param {string} property Property name.
  1029  *
  1624  *
  1030  * @return {string} Normalized property name.
  1625  * @return {string} Normalized property name.
  1031  */
  1626  */
  1032 
       
  1033 
       
  1034 function getNormalStylePropertyName(property) {
  1627 function getNormalStylePropertyName(property) {
  1035   if ((0,external_lodash_namespaceObject.startsWith)(property, '--')) {
  1628   if (property.startsWith('--')) {
  1036     return property;
  1629     return property;
  1037   }
  1630   }
  1038 
       
  1039   if (hasPrefix(property, ['ms', 'O', 'Moz', 'Webkit'])) {
  1631   if (hasPrefix(property, ['ms', 'O', 'Moz', 'Webkit'])) {
  1040     return '-' + (0,external_lodash_namespaceObject.kebabCase)(property);
  1632     return '-' + paramCase(property);
  1041   }
  1633   }
  1042 
  1634   return paramCase(property);
  1043   return (0,external_lodash_namespaceObject.kebabCase)(property);
  1635 }
  1044 }
  1636 
  1045 /**
  1637 /**
  1046  * Returns the normal form of the style property value for HTML. Appends a
  1638  * Returns the normal form of the style property value for HTML. Appends a
  1047  * default pixel unit if numeric, not a unitless property, and not zero.
  1639  * default pixel unit if numeric, not a unitless property, and not zero.
  1048  *
  1640  *
  1049  * @param {string} property Property name.
  1641  * @param {string} property Property name.
  1050  * @param {*}      value    Non-normalized property value.
  1642  * @param {*}      value    Non-normalized property value.
  1051  *
  1643  *
  1052  * @return {*} Normalized property value.
  1644  * @return {*} Normalized property value.
  1053  */
  1645  */
  1054 
       
  1055 
       
  1056 function getNormalStylePropertyValue(property, value) {
  1646 function getNormalStylePropertyValue(property, value) {
  1057   if (typeof value === 'number' && 0 !== value && !CSS_PROPERTIES_SUPPORTS_UNITLESS.has(property)) {
  1647   if (typeof value === 'number' && 0 !== value && !CSS_PROPERTIES_SUPPORTS_UNITLESS.has(property)) {
  1058     return value + 'px';
  1648     return value + 'px';
  1059   }
  1649   }
  1060 
       
  1061   return value;
  1650   return value;
  1062 }
  1651 }
       
  1652 
  1063 /**
  1653 /**
  1064  * Serializes a React element to string.
  1654  * Serializes a React element to string.
  1065  *
  1655  *
  1066  * @param {import('react').ReactNode} element         Element to serialize.
  1656  * @param {import('react').ReactNode} element         Element to serialize.
  1067  * @param {Object}                    [context]       Context object.
  1657  * @param {Object}                    [context]       Context object.
  1068  * @param {Object}                    [legacyContext] Legacy context object.
  1658  * @param {Object}                    [legacyContext] Legacy context object.
  1069  *
  1659  *
  1070  * @return {string} Serialized element.
  1660  * @return {string} Serialized element.
  1071  */
  1661  */
  1072 
  1662 function renderElement(element, context, legacyContext = {}) {
  1073 
       
  1074 function renderElement(element, context) {
       
  1075   let legacyContext = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
       
  1076 
       
  1077   if (null === element || undefined === element || false === element) {
  1663   if (null === element || undefined === element || false === element) {
  1078     return '';
  1664     return '';
  1079   }
  1665   }
  1080 
       
  1081   if (Array.isArray(element)) {
  1666   if (Array.isArray(element)) {
  1082     return renderChildren(element, context, legacyContext);
  1667     return renderChildren(element, context, legacyContext);
  1083   }
  1668   }
  1084 
       
  1085   switch (typeof element) {
  1669   switch (typeof element) {
  1086     case 'string':
  1670     case 'string':
  1087       return (0,external_wp_escapeHtml_namespaceObject.escapeHTML)(element);
  1671       return (0,external_wp_escapeHtml_namespaceObject.escapeHTML)(element);
  1088 
       
  1089     case 'number':
  1672     case 'number':
  1090       return element.toString();
  1673       return element.toString();
  1091   }
  1674   }
  1092 
       
  1093   const {
  1675   const {
  1094     type,
  1676     type,
  1095     props
  1677     props
  1096   } =
  1678   } = /** @type {{type?: any, props?: any}} */
  1097   /** @type {{type?: any, props?: any}} */
       
  1098   element;
  1679   element;
  1099 
       
  1100   switch (type) {
  1680   switch (type) {
  1101     case external_React_namespaceObject.StrictMode:
  1681     case external_React_namespaceObject.StrictMode:
  1102     case external_React_namespaceObject.Fragment:
  1682     case external_React_namespaceObject.Fragment:
  1103       return renderChildren(props.children, context, legacyContext);
  1683       return renderChildren(props.children, context, legacyContext);
  1104 
       
  1105     case RawHTML:
  1684     case RawHTML:
  1106       const {
  1685       const {
  1107         children,
  1686         children,
  1108         ...wrapperProps
  1687         ...wrapperProps
  1109       } = props;
  1688       } = props;
  1110       return renderNativeComponent((0,external_lodash_namespaceObject.isEmpty)(wrapperProps) ? null : 'div', { ...wrapperProps,
  1689       return renderNativeComponent(!Object.keys(wrapperProps).length ? null : 'div', {
       
  1690         ...wrapperProps,
  1111         dangerouslySetInnerHTML: {
  1691         dangerouslySetInnerHTML: {
  1112           __html: children
  1692           __html: children
  1113         }
  1693         }
  1114       }, context, legacyContext);
  1694       }, context, legacyContext);
  1115   }
  1695   }
  1116 
       
  1117   switch (typeof type) {
  1696   switch (typeof type) {
  1118     case 'string':
  1697     case 'string':
  1119       return renderNativeComponent(type, props, context, legacyContext);
  1698       return renderNativeComponent(type, props, context, legacyContext);
  1120 
       
  1121     case 'function':
  1699     case 'function':
  1122       if (type.prototype && typeof type.prototype.render === 'function') {
  1700       if (type.prototype && typeof type.prototype.render === 'function') {
  1123         return renderComponent(type, props, context, legacyContext);
  1701         return renderComponent(type, props, context, legacyContext);
  1124       }
  1702       }
  1125 
       
  1126       return renderElement(type(props, legacyContext), context, legacyContext);
  1703       return renderElement(type(props, legacyContext), context, legacyContext);
  1127   }
  1704   }
  1128 
       
  1129   switch (type && type.$$typeof) {
  1705   switch (type && type.$$typeof) {
  1130     case Provider.$$typeof:
  1706     case Provider.$$typeof:
  1131       return renderChildren(props.children, props.value, legacyContext);
  1707       return renderChildren(props.children, props.value, legacyContext);
  1132 
       
  1133     case Consumer.$$typeof:
  1708     case Consumer.$$typeof:
  1134       return renderElement(props.children(context || type._currentValue), context, legacyContext);
  1709       return renderElement(props.children(context || type._currentValue), context, legacyContext);
  1135 
       
  1136     case ForwardRef.$$typeof:
  1710     case ForwardRef.$$typeof:
  1137       return renderElement(type.render(props), context, legacyContext);
  1711       return renderElement(type.render(props), context, legacyContext);
  1138   }
  1712   }
  1139 
       
  1140   return '';
  1713   return '';
  1141 }
  1714 }
       
  1715 
  1142 /**
  1716 /**
  1143  * Serializes a native component type to string.
  1717  * Serializes a native component type to string.
  1144  *
  1718  *
  1145  * @param {?string} type            Native component type to serialize, or null if
  1719  * @param {?string} type            Native component type to serialize, or null if
  1146  *                                  rendering as fragment of children content.
  1720  *                                  rendering as fragment of children content.
  1148  * @param {Object}  [context]       Context object.
  1722  * @param {Object}  [context]       Context object.
  1149  * @param {Object}  [legacyContext] Legacy context object.
  1723  * @param {Object}  [legacyContext] Legacy context object.
  1150  *
  1724  *
  1151  * @return {string} Serialized element.
  1725  * @return {string} Serialized element.
  1152  */
  1726  */
  1153 
  1727 function renderNativeComponent(type, props, context, legacyContext = {}) {
  1154 function renderNativeComponent(type, props, context) {
       
  1155   let legacyContext = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
       
  1156   let content = '';
  1728   let content = '';
  1157 
       
  1158   if (type === 'textarea' && props.hasOwnProperty('value')) {
  1729   if (type === 'textarea' && props.hasOwnProperty('value')) {
  1159     // Textarea children can be assigned as value prop. If it is, render in
  1730     // Textarea children can be assigned as value prop. If it is, render in
  1160     // place of children. Ensure to omit so it is not assigned as attribute
  1731     // place of children. Ensure to omit so it is not assigned as attribute
  1161     // as well.
  1732     // as well.
  1162     content = renderChildren(props.value, context, legacyContext);
  1733     content = renderChildren(props.value, context, legacyContext);
  1163     props = (0,external_lodash_namespaceObject.omit)(props, 'value');
  1734     const {
       
  1735       value,
       
  1736       ...restProps
       
  1737     } = props;
       
  1738     props = restProps;
  1164   } else if (props.dangerouslySetInnerHTML && typeof props.dangerouslySetInnerHTML.__html === 'string') {
  1739   } else if (props.dangerouslySetInnerHTML && typeof props.dangerouslySetInnerHTML.__html === 'string') {
  1165     // Dangerous content is left unescaped.
  1740     // Dangerous content is left unescaped.
  1166     content = props.dangerouslySetInnerHTML.__html;
  1741     content = props.dangerouslySetInnerHTML.__html;
  1167   } else if (typeof props.children !== 'undefined') {
  1742   } else if (typeof props.children !== 'undefined') {
  1168     content = renderChildren(props.children, context, legacyContext);
  1743     content = renderChildren(props.children, context, legacyContext);
  1169   }
  1744   }
  1170 
       
  1171   if (!type) {
  1745   if (!type) {
  1172     return content;
  1746     return content;
  1173   }
  1747   }
  1174 
       
  1175   const attributes = renderAttributes(props);
  1748   const attributes = renderAttributes(props);
  1176 
       
  1177   if (SELF_CLOSING_TAGS.has(type)) {
  1749   if (SELF_CLOSING_TAGS.has(type)) {
  1178     return '<' + type + attributes + '/>';
  1750     return '<' + type + attributes + '/>';
  1179   }
  1751   }
  1180 
       
  1181   return '<' + type + attributes + '>' + content + '</' + type + '>';
  1752   return '<' + type + attributes + '>' + content + '</' + type + '>';
  1182 }
  1753 }
  1183 /** @typedef {import('./react').WPComponent} WPComponent */
  1754 
       
  1755 /** @typedef {import('react').ComponentType} ComponentType */
  1184 
  1756 
  1185 /**
  1757 /**
  1186  * Serializes a non-native component type to string.
  1758  * Serializes a non-native component type to string.
  1187  *
  1759  *
  1188  * @param {WPComponent} Component       Component type to serialize.
  1760  * @param {ComponentType} Component       Component type to serialize.
  1189  * @param {Object}      props           Props object.
  1761  * @param {Object}        props           Props object.
  1190  * @param {Object}      [context]       Context object.
  1762  * @param {Object}        [context]       Context object.
  1191  * @param {Object}      [legacyContext] Legacy context object.
  1763  * @param {Object}        [legacyContext] Legacy context object.
  1192  *
  1764  *
  1193  * @return {string} Serialized element
  1765  * @return {string} Serialized element
  1194  */
  1766  */
  1195 
  1767 function renderComponent(Component, props, context, legacyContext = {}) {
  1196 function renderComponent(Component, props, context) {
  1768   const instance = new ( /** @type {import('react').ComponentClass} */
  1197   let legacyContext = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
  1769   Component)(props, legacyContext);
  1198   const instance = new
  1770   if (typeof
  1199   /** @type {import('react').ComponentClass} */
  1771   // Ignore reason: Current prettier reformats parens and mangles type assertion
  1200   Component(props, legacyContext);
       
  1201 
       
  1202   if (typeof // Ignore reason: Current prettier reformats parens and mangles type assertion
       
  1203   // prettier-ignore
  1772   // prettier-ignore
  1204 
       
  1205   /** @type {{getChildContext?: () => unknown}} */
  1773   /** @type {{getChildContext?: () => unknown}} */
  1206   instance.getChildContext === 'function') {
  1774   instance.getChildContext === 'function') {
  1207     Object.assign(legacyContext,
  1775     Object.assign(legacyContext, /** @type {{getChildContext?: () => unknown}} */instance.getChildContext());
  1208     /** @type {{getChildContext?: () => unknown}} */
  1776   }
  1209     instance.getChildContext());
       
  1210   }
       
  1211 
       
  1212   const html = renderElement(instance.render(), context, legacyContext);
  1777   const html = renderElement(instance.render(), context, legacyContext);
  1213   return html;
  1778   return html;
  1214 }
  1779 }
       
  1780 
  1215 /**
  1781 /**
  1216  * Serializes an array of children to string.
  1782  * Serializes an array of children to string.
  1217  *
  1783  *
  1218  * @param {import('react').ReactNodeArray} children        Children to serialize.
  1784  * @param {import('react').ReactNodeArray} children        Children to serialize.
  1219  * @param {Object}                         [context]       Context object.
  1785  * @param {Object}                         [context]       Context object.
  1220  * @param {Object}                         [legacyContext] Legacy context object.
  1786  * @param {Object}                         [legacyContext] Legacy context object.
  1221  *
  1787  *
  1222  * @return {string} Serialized children.
  1788  * @return {string} Serialized children.
  1223  */
  1789  */
  1224 
  1790 function renderChildren(children, context, legacyContext = {}) {
  1225 function renderChildren(children, context) {
       
  1226   let legacyContext = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
       
  1227   let result = '';
  1791   let result = '';
  1228   children = (0,external_lodash_namespaceObject.castArray)(children);
  1792   children = Array.isArray(children) ? children : [children];
  1229 
       
  1230   for (let i = 0; i < children.length; i++) {
  1793   for (let i = 0; i < children.length; i++) {
  1231     const child = children[i];
  1794     const child = children[i];
  1232     result += renderElement(child, context, legacyContext);
  1795     result += renderElement(child, context, legacyContext);
  1233   }
  1796   }
  1234 
       
  1235   return result;
  1797   return result;
  1236 }
  1798 }
       
  1799 
  1237 /**
  1800 /**
  1238  * Renders a props object as a string of HTML attributes.
  1801  * Renders a props object as a string of HTML attributes.
  1239  *
  1802  *
  1240  * @param {Object} props Props object.
  1803  * @param {Object} props Props object.
  1241  *
  1804  *
  1242  * @return {string} Attributes string.
  1805  * @return {string} Attributes string.
  1243  */
  1806  */
  1244 
       
  1245 
       
  1246 function renderAttributes(props) {
  1807 function renderAttributes(props) {
  1247   let result = '';
  1808   let result = '';
  1248 
       
  1249   for (const key in props) {
  1809   for (const key in props) {
  1250     const attribute = getNormalAttributeName(key);
  1810     const attribute = getNormalAttributeName(key);
  1251 
       
  1252     if (!(0,external_wp_escapeHtml_namespaceObject.isValidAttributeName)(attribute)) {
  1811     if (!(0,external_wp_escapeHtml_namespaceObject.isValidAttributeName)(attribute)) {
  1253       continue;
  1812       continue;
  1254     }
  1813     }
  1255 
  1814     let value = getNormalAttributeValue(key, props[key]);
  1256     let value = getNormalAttributeValue(key, props[key]); // If value is not of serializeable type, skip.
  1815 
  1257 
  1816     // If value is not of serializable type, skip.
  1258     if (!ATTRIBUTES_TYPES.has(typeof value)) {
  1817     if (!ATTRIBUTES_TYPES.has(typeof value)) {
  1259       continue;
  1818       continue;
  1260     } // Don't render internal attribute names.
  1819     }
  1261 
  1820 
  1262 
  1821     // Don't render internal attribute names.
  1263     if (isInternalAttribute(key)) {
  1822     if (isInternalAttribute(key)) {
  1264       continue;
  1823       continue;
  1265     }
  1824     }
  1266 
  1825     const isBooleanAttribute = BOOLEAN_ATTRIBUTES.has(attribute);
  1267     const isBooleanAttribute = BOOLEAN_ATTRIBUTES.has(attribute); // Boolean attribute should be omitted outright if its value is false.
  1826 
  1268 
  1827     // Boolean attribute should be omitted outright if its value is false.
  1269     if (isBooleanAttribute && value === false) {
  1828     if (isBooleanAttribute && value === false) {
  1270       continue;
  1829       continue;
  1271     }
  1830     }
  1272 
  1831     const isMeaningfulAttribute = isBooleanAttribute || hasPrefix(key, ['data-', 'aria-']) || ENUMERATED_ATTRIBUTES.has(attribute);
  1273     const isMeaningfulAttribute = isBooleanAttribute || hasPrefix(key, ['data-', 'aria-']) || ENUMERATED_ATTRIBUTES.has(attribute); // Only write boolean value as attribute if meaningful.
  1832 
  1274 
  1833     // Only write boolean value as attribute if meaningful.
  1275     if (typeof value === 'boolean' && !isMeaningfulAttribute) {
  1834     if (typeof value === 'boolean' && !isMeaningfulAttribute) {
  1276       continue;
  1835       continue;
  1277     }
  1836     }
  1278 
  1837     result += ' ' + attribute;
  1279     result += ' ' + attribute; // Boolean attributes should write attribute name, but without value.
  1838 
       
  1839     // Boolean attributes should write attribute name, but without value.
  1280     // Mere presence of attribute name is effective truthiness.
  1840     // Mere presence of attribute name is effective truthiness.
  1281 
       
  1282     if (isBooleanAttribute) {
  1841     if (isBooleanAttribute) {
  1283       continue;
  1842       continue;
  1284     }
  1843     }
  1285 
       
  1286     if (typeof value === 'string') {
  1844     if (typeof value === 'string') {
  1287       value = (0,external_wp_escapeHtml_namespaceObject.escapeAttribute)(value);
  1845       value = (0,external_wp_escapeHtml_namespaceObject.escapeAttribute)(value);
  1288     }
  1846     }
  1289 
       
  1290     result += '="' + value + '"';
  1847     result += '="' + value + '"';
  1291   }
  1848   }
  1292 
       
  1293   return result;
  1849   return result;
  1294 }
  1850 }
       
  1851 
  1295 /**
  1852 /**
  1296  * Renders a style object as a string attribute value.
  1853  * Renders a style object as a string attribute value.
  1297  *
  1854  *
  1298  * @param {Object} style Style object.
  1855  * @param {Object} style Style object.
  1299  *
  1856  *
  1300  * @return {string} Style attribute value.
  1857  * @return {string} Style attribute value.
  1301  */
  1858  */
  1302 
       
  1303 function renderStyle(style) {
  1859 function renderStyle(style) {
  1304   // Only generate from object, e.g. tolerate string value.
  1860   // Only generate from object, e.g. tolerate string value.
  1305   if (!(0,external_lodash_namespaceObject.isPlainObject)(style)) {
  1861   if (!isPlainObject(style)) {
  1306     return style;
  1862     return style;
  1307   }
  1863   }
  1308 
       
  1309   let result;
  1864   let result;
  1310 
       
  1311   for (const property in style) {
  1865   for (const property in style) {
  1312     const value = style[property];
  1866     const value = style[property];
  1313 
       
  1314     if (null === value || undefined === value) {
  1867     if (null === value || undefined === value) {
  1315       continue;
  1868       continue;
  1316     }
  1869     }
  1317 
       
  1318     if (result) {
  1870     if (result) {
  1319       result += ';';
  1871       result += ';';
  1320     } else {
  1872     } else {
  1321       result = '';
  1873       result = '';
  1322     }
  1874     }
  1323 
       
  1324     const normalName = getNormalStylePropertyName(property);
  1875     const normalName = getNormalStylePropertyName(property);
  1325     const normalValue = getNormalStylePropertyValue(property, value);
  1876     const normalValue = getNormalStylePropertyValue(property, value);
  1326     result += normalName + ':' + normalValue;
  1877     result += normalName + ':' + normalValue;
  1327   }
  1878   }
  1328 
       
  1329   return result;
  1879   return result;
  1330 }
  1880 }
  1331 /* harmony default export */ var serialize = (renderElement);
  1881 /* harmony default export */ const serialize = (renderElement);
  1332 
  1882 
  1333 ;// CONCATENATED MODULE: ./node_modules/@wordpress/element/build-module/index.js
  1883 ;// CONCATENATED MODULE: ./node_modules/@wordpress/element/build-module/index.js
  1334 
  1884 
  1335 
  1885 
  1336 
  1886 
  1337 
  1887 
  1338 
  1888 
  1339 
  1889 
  1340 
  1890 
       
  1891 
       
  1892 })();
  1341 
  1893 
  1342 (window.wp = window.wp || {}).element = __webpack_exports__;
  1894 (window.wp = window.wp || {}).element = __webpack_exports__;
  1343 /******/ })()
  1895 /******/ })()
  1344 ;
  1896 ;