[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/js/dist/ -> element.js (source)

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


Generated : Thu Nov 21 08:20:01 2024 Cross-referenced by PHPXref