[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

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

   1  /******/ (() => { // webpackBootstrap
   2  /******/     "use strict";
   3  /******/     // The require scope
   4  /******/     var __webpack_require__ = {};
   5  /******/     
   6  /************************************************************************/
   7  /******/     /* webpack/runtime/define property getters */
   8  /******/     (() => {
   9  /******/         // define getter functions for harmony exports
  10  /******/         __webpack_require__.d = (exports, definition) => {
  11  /******/             for(var key in definition) {
  12  /******/                 if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
  13  /******/                     Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
  14  /******/                 }
  15  /******/             }
  16  /******/         };
  17  /******/     })();
  18  /******/     
  19  /******/     /* webpack/runtime/hasOwnProperty shorthand */
  20  /******/     (() => {
  21  /******/         __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
  22  /******/     })();
  23  /******/     
  24  /******/     /* webpack/runtime/make namespace object */
  25  /******/     (() => {
  26  /******/         // define __esModule on exports
  27  /******/         __webpack_require__.r = (exports) => {
  28  /******/             if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  29  /******/                 Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  30  /******/             }
  31  /******/             Object.defineProperty(exports, '__esModule', { value: true });
  32  /******/         };
  33  /******/     })();
  34  /******/     
  35  /************************************************************************/
  36  var __webpack_exports__ = {};
  37  // ESM COMPAT FLAG
  38  __webpack_require__.r(__webpack_exports__);
  39  
  40  // EXPORTS
  41  __webpack_require__.d(__webpack_exports__, {
  42    duplicatePattern: () => (/* reexport */ duplicate_pattern),
  43    duplicatePost: () => (/* reexport */ duplicate_post),
  44    duplicatePostNative: () => (/* reexport */ duplicate_post_native),
  45    exportPattern: () => (/* reexport */ export_pattern),
  46    exportPatternNative: () => (/* reexport */ export_pattern_native),
  47    orderField: () => (/* reexport */ order),
  48    permanentlyDeletePost: () => (/* reexport */ permanently_delete_post),
  49    reorderPage: () => (/* reexport */ reorder_page),
  50    reorderPageNative: () => (/* reexport */ reorder_page_native),
  51    titleField: () => (/* reexport */ title),
  52    viewPost: () => (/* reexport */ view_post),
  53    viewPostRevisions: () => (/* reexport */ view_post_revisions)
  54  });
  55  
  56  ;// CONCATENATED MODULE: external ["wp","i18n"]
  57  const external_wp_i18n_namespaceObject = window["wp"]["i18n"];
  58  ;// CONCATENATED MODULE: external ["wp","htmlEntities"]
  59  const external_wp_htmlEntities_namespaceObject = window["wp"]["htmlEntities"];
  60  ;// CONCATENATED MODULE: ./node_modules/@wordpress/fields/build-module/actions/utils.js
  61  /**
  62   * WordPress dependencies
  63   */
  64  
  65  
  66  /**
  67   * Internal dependencies
  68   */
  69  
  70  const TEMPLATE_POST_TYPE = 'wp_template';
  71  const TEMPLATE_PART_POST_TYPE = 'wp_template_part';
  72  const TEMPLATE_ORIGINS = {
  73    custom: 'custom',
  74    theme: 'theme',
  75    plugin: 'plugin'
  76  };
  77  function isTemplate(post) {
  78    return post.type === TEMPLATE_POST_TYPE;
  79  }
  80  function isTemplatePart(post) {
  81    return post.type === TEMPLATE_PART_POST_TYPE;
  82  }
  83  function isTemplateOrTemplatePart(p) {
  84    return p.type === TEMPLATE_POST_TYPE || p.type === TEMPLATE_PART_POST_TYPE;
  85  }
  86  function getItemTitle(item) {
  87    if (typeof item.title === 'string') {
  88      return (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(item.title);
  89    }
  90    if ('rendered' in item.title) {
  91      return (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(item.title.rendered);
  92    }
  93    if ('raw' in item.title) {
  94      return (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(item.title.raw);
  95    }
  96    return '';
  97  }
  98  
  99  /**
 100   * Check if a template is removable.
 101   *
 102   * @param template The template entity to check.
 103   * @return Whether the template is removable.
 104   */
 105  function isTemplateRemovable(template) {
 106    if (!template) {
 107      return false;
 108    }
 109    // In patterns list page we map the templates parts to a different object
 110    // than the one returned from the endpoint. This is why we need to check for
 111    // two props whether is custom or has a theme file.
 112    return [template.source, template.source].includes(TEMPLATE_ORIGINS.custom) && !Boolean(template.type === 'wp_template' && template?.plugin) && !template.has_theme_file;
 113  }
 114  
 115  ;// CONCATENATED MODULE: ./node_modules/@wordpress/fields/build-module/fields/title/index.js
 116  /**
 117   * WordPress dependencies
 118   */
 119  
 120  
 121  
 122  /**
 123   * Internal dependencies
 124   */
 125  
 126  
 127  const titleField = {
 128    type: 'text',
 129    id: 'title',
 130    label: (0,external_wp_i18n_namespaceObject.__)('Title'),
 131    placeholder: (0,external_wp_i18n_namespaceObject.__)('No title'),
 132    getValue: ({
 133      item
 134    }) => getItemTitle(item)
 135  };
 136  /* harmony default export */ const title = (titleField);
 137  
 138  ;// CONCATENATED MODULE: ./node_modules/@wordpress/fields/build-module/fields/order/index.js
 139  /**
 140   * WordPress dependencies
 141   */
 142  
 143  
 144  /**
 145   * Internal dependencies
 146   */
 147  
 148  const orderField = {
 149    type: 'integer',
 150    id: 'menu_order',
 151    label: (0,external_wp_i18n_namespaceObject.__)('Order'),
 152    description: (0,external_wp_i18n_namespaceObject.__)('Determines the order of pages.')
 153  };
 154  /* harmony default export */ const order = (orderField);
 155  
 156  ;// CONCATENATED MODULE: ./node_modules/@wordpress/fields/build-module/fields/index.js
 157  
 158  
 159  
 160  ;// CONCATENATED MODULE: external ["wp","primitives"]
 161  const external_wp_primitives_namespaceObject = window["wp"]["primitives"];
 162  ;// CONCATENATED MODULE: external "ReactJSXRuntime"
 163  const external_ReactJSXRuntime_namespaceObject = window["ReactJSXRuntime"];
 164  ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/external.js
 165  /**
 166   * WordPress dependencies
 167   */
 168  
 169  
 170  const external = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
 171    xmlns: "http://www.w3.org/2000/svg",
 172    viewBox: "0 0 24 24",
 173    children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
 174      d: "M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"
 175    })
 176  });
 177  /* harmony default export */ const library_external = (external);
 178  
 179  ;// CONCATENATED MODULE: ./node_modules/@wordpress/fields/build-module/actions/base-post/view-post.js
 180  /**
 181   * WordPress dependencies
 182   */
 183  
 184  
 185  
 186  /**
 187   * Internal dependencies
 188   */
 189  
 190  const viewPost = {
 191    id: 'view-post',
 192    label: (0,external_wp_i18n_namespaceObject._x)('View', 'verb'),
 193    isPrimary: true,
 194    icon: library_external,
 195    isEligible(post) {
 196      return post.status !== 'trash';
 197    },
 198    callback(posts, {
 199      onActionPerformed
 200    }) {
 201      const post = posts[0];
 202      window.open(post?.link, '_blank');
 203      if (onActionPerformed) {
 204        onActionPerformed(posts);
 205      }
 206    }
 207  };
 208  /* harmony default export */ const view_post = (viewPost);
 209  
 210  ;// CONCATENATED MODULE: external ["wp","data"]
 211  const external_wp_data_namespaceObject = window["wp"]["data"];
 212  ;// CONCATENATED MODULE: external ["wp","coreData"]
 213  const external_wp_coreData_namespaceObject = window["wp"]["coreData"];
 214  ;// CONCATENATED MODULE: external ["wp","notices"]
 215  const external_wp_notices_namespaceObject = window["wp"]["notices"];
 216  ;// CONCATENATED MODULE: external ["wp","element"]
 217  const external_wp_element_namespaceObject = window["wp"]["element"];
 218  ;// CONCATENATED MODULE: ./node_modules/@wordpress/dataviews/build-module/field-types/integer.js
 219  /**
 220   * Internal dependencies
 221   */
 222  
 223  function sort(a, b, direction) {
 224    return direction === 'asc' ? a - b : b - a;
 225  }
 226  function isValid(value, context) {
 227    // TODO: this implicitely means the value is required.
 228    if (value === '') {
 229      return false;
 230    }
 231    if (!Number.isInteger(Number(value))) {
 232      return false;
 233    }
 234    if (context?.elements) {
 235      const validValues = context?.elements.map(f => f.value);
 236      if (!validValues.includes(Number(value))) {
 237        return false;
 238      }
 239    }
 240    return true;
 241  }
 242  /* harmony default export */ const integer = ({
 243    sort,
 244    isValid,
 245    Edit: 'integer'
 246  });
 247  
 248  ;// CONCATENATED MODULE: ./node_modules/@wordpress/dataviews/build-module/field-types/text.js
 249  /**
 250   * Internal dependencies
 251   */
 252  
 253  function text_sort(valueA, valueB, direction) {
 254    return direction === 'asc' ? valueA.localeCompare(valueB) : valueB.localeCompare(valueA);
 255  }
 256  function text_isValid(value, context) {
 257    if (context?.elements) {
 258      const validValues = context?.elements?.map(f => f.value);
 259      if (!validValues.includes(value)) {
 260        return false;
 261      }
 262    }
 263    return true;
 264  }
 265  /* harmony default export */ const field_types_text = ({
 266    sort: text_sort,
 267    isValid: text_isValid,
 268    Edit: 'text'
 269  });
 270  
 271  ;// CONCATENATED MODULE: ./node_modules/@wordpress/dataviews/build-module/field-types/datetime.js
 272  /**
 273   * Internal dependencies
 274   */
 275  
 276  function datetime_sort(a, b, direction) {
 277    const timeA = new Date(a).getTime();
 278    const timeB = new Date(b).getTime();
 279    return direction === 'asc' ? timeA - timeB : timeB - timeA;
 280  }
 281  function datetime_isValid(value, context) {
 282    if (context?.elements) {
 283      const validValues = context?.elements.map(f => f.value);
 284      if (!validValues.includes(value)) {
 285        return false;
 286      }
 287    }
 288    return true;
 289  }
 290  /* harmony default export */ const datetime = ({
 291    sort: datetime_sort,
 292    isValid: datetime_isValid,
 293    Edit: 'datetime'
 294  });
 295  
 296  ;// CONCATENATED MODULE: ./node_modules/@wordpress/dataviews/build-module/field-types/index.js
 297  /**
 298   * Internal dependencies
 299   */
 300  
 301  
 302  
 303  
 304  
 305  /**
 306   *
 307   * @param {FieldType} type The field type definition to get.
 308   *
 309   * @return A field type definition.
 310   */
 311  function getFieldTypeDefinition(type) {
 312    if ('integer' === type) {
 313      return integer;
 314    }
 315    if ('text' === type) {
 316      return field_types_text;
 317    }
 318    if ('datetime' === type) {
 319      return datetime;
 320    }
 321    return {
 322      sort: (a, b, direction) => {
 323        if (typeof a === 'number' && typeof b === 'number') {
 324          return direction === 'asc' ? a - b : b - a;
 325        }
 326        return direction === 'asc' ? a.localeCompare(b) : b.localeCompare(a);
 327      },
 328      isValid: (value, context) => {
 329        if (context?.elements) {
 330          const validValues = context?.elements?.map(f => f.value);
 331          if (!validValues.includes(value)) {
 332            return false;
 333          }
 334        }
 335        return true;
 336      },
 337      Edit: () => null
 338    };
 339  }
 340  
 341  ;// CONCATENATED MODULE: external ["wp","components"]
 342  const external_wp_components_namespaceObject = window["wp"]["components"];
 343  ;// CONCATENATED MODULE: ./node_modules/@wordpress/dataviews/build-module/dataform-controls/datetime.js
 344  /**
 345   * WordPress dependencies
 346   */
 347  
 348  
 349  
 350  /**
 351   * Internal dependencies
 352   */
 353  
 354  
 355  function DateTime({
 356    data,
 357    field,
 358    onChange,
 359    hideLabelFromVision
 360  }) {
 361    const {
 362      id,
 363      label
 364    } = field;
 365    const value = field.getValue({
 366      item: data
 367    });
 368    const onChangeControl = (0,external_wp_element_namespaceObject.useCallback)(newValue => onChange({
 369      [id]: newValue
 370    }), [id, onChange]);
 371    return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("fieldset", {
 372      className: "dataviews-controls__datetime",
 373      children: [!hideLabelFromVision && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.BaseControl.VisualLabel, {
 374        as: "legend",
 375        children: label
 376      }), hideLabelFromVision && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.VisuallyHidden, {
 377        as: "legend",
 378        children: label
 379      }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TimePicker, {
 380        currentTime: value,
 381        onChange: onChangeControl,
 382        hideLabelFromVision: true
 383      })]
 384    });
 385  }
 386  
 387  ;// CONCATENATED MODULE: ./node_modules/@wordpress/dataviews/build-module/dataform-controls/integer.js
 388  /**
 389   * WordPress dependencies
 390   */
 391  
 392  
 393  
 394  /**
 395   * Internal dependencies
 396   */
 397  
 398  function Integer({
 399    data,
 400    field,
 401    onChange,
 402    hideLabelFromVision
 403  }) {
 404    var _field$getValue;
 405    const {
 406      id,
 407      label,
 408      description
 409    } = field;
 410    const value = (_field$getValue = field.getValue({
 411      item: data
 412    })) !== null && _field$getValue !== void 0 ? _field$getValue : '';
 413    const onChangeControl = (0,external_wp_element_namespaceObject.useCallback)(newValue => onChange({
 414      [id]: Number(newValue)
 415    }), [id, onChange]);
 416    return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalNumberControl, {
 417      label: label,
 418      help: description,
 419      value: value,
 420      onChange: onChangeControl,
 421      __next40pxDefaultSize: true,
 422      hideLabelFromVision: hideLabelFromVision
 423    });
 424  }
 425  
 426  ;// CONCATENATED MODULE: ./node_modules/@wordpress/dataviews/build-module/dataform-controls/radio.js
 427  /**
 428   * WordPress dependencies
 429   */
 430  
 431  
 432  
 433  /**
 434   * Internal dependencies
 435   */
 436  
 437  function Radio({
 438    data,
 439    field,
 440    onChange,
 441    hideLabelFromVision
 442  }) {
 443    const {
 444      id,
 445      label
 446    } = field;
 447    const value = field.getValue({
 448      item: data
 449    });
 450    const onChangeControl = (0,external_wp_element_namespaceObject.useCallback)(newValue => onChange({
 451      [id]: newValue
 452    }), [id, onChange]);
 453    if (field.elements) {
 454      return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.RadioControl, {
 455        label: label,
 456        onChange: onChangeControl,
 457        options: field.elements,
 458        selected: value,
 459        hideLabelFromVision: hideLabelFromVision
 460      });
 461    }
 462    return null;
 463  }
 464  
 465  ;// CONCATENATED MODULE: ./node_modules/@wordpress/dataviews/build-module/dataform-controls/select.js
 466  /**
 467   * WordPress dependencies
 468   */
 469  
 470  
 471  
 472  
 473  /**
 474   * Internal dependencies
 475   */
 476  
 477  function Select({
 478    data,
 479    field,
 480    onChange,
 481    hideLabelFromVision
 482  }) {
 483    var _field$getValue, _field$elements;
 484    const {
 485      id,
 486      label
 487    } = field;
 488    const value = (_field$getValue = field.getValue({
 489      item: data
 490    })) !== null && _field$getValue !== void 0 ? _field$getValue : '';
 491    const onChangeControl = (0,external_wp_element_namespaceObject.useCallback)(newValue => onChange({
 492      [id]: newValue
 493    }), [id, onChange]);
 494    const elements = [
 495    /*
 496     * Value can be undefined when:
 497     *
 498     * - the field is not required
 499     * - in bulk editing
 500     *
 501     */
 502    {
 503      label: (0,external_wp_i18n_namespaceObject.__)('Select item'),
 504      value: ''
 505    }, ...((_field$elements = field?.elements) !== null && _field$elements !== void 0 ? _field$elements : [])];
 506    return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SelectControl, {
 507      label: label,
 508      value: value,
 509      options: elements,
 510      onChange: onChangeControl,
 511      __next40pxDefaultSize: true,
 512      __nextHasNoMarginBottom: true,
 513      hideLabelFromVision: hideLabelFromVision
 514    });
 515  }
 516  
 517  ;// CONCATENATED MODULE: ./node_modules/@wordpress/dataviews/build-module/dataform-controls/text.js
 518  /**
 519   * WordPress dependencies
 520   */
 521  
 522  
 523  
 524  /**
 525   * Internal dependencies
 526   */
 527  
 528  function Text({
 529    data,
 530    field,
 531    onChange,
 532    hideLabelFromVision
 533  }) {
 534    const {
 535      id,
 536      label,
 537      placeholder
 538    } = field;
 539    const value = field.getValue({
 540      item: data
 541    });
 542    const onChangeControl = (0,external_wp_element_namespaceObject.useCallback)(newValue => onChange({
 543      [id]: newValue
 544    }), [id, onChange]);
 545    return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextControl, {
 546      label: label,
 547      placeholder: placeholder,
 548      value: value !== null && value !== void 0 ? value : '',
 549      onChange: onChangeControl,
 550      __next40pxDefaultSize: true,
 551      __nextHasNoMarginBottom: true,
 552      hideLabelFromVision: hideLabelFromVision
 553    });
 554  }
 555  
 556  ;// CONCATENATED MODULE: ./node_modules/@wordpress/dataviews/build-module/dataform-controls/index.js
 557  /**
 558   * External dependencies
 559   */
 560  
 561  /**
 562   * Internal dependencies
 563   */
 564  
 565  
 566  
 567  
 568  
 569  
 570  const FORM_CONTROLS = {
 571    datetime: DateTime,
 572    integer: Integer,
 573    radio: Radio,
 574    select: Select,
 575    text: Text
 576  };
 577  function getControl(field, fieldTypeDefinition) {
 578    if (typeof field.Edit === 'function') {
 579      return field.Edit;
 580    }
 581    if (typeof field.Edit === 'string') {
 582      return getControlByType(field.Edit);
 583    }
 584    if (field.elements) {
 585      return getControlByType('select');
 586    }
 587    if (typeof fieldTypeDefinition.Edit === 'string') {
 588      return getControlByType(fieldTypeDefinition.Edit);
 589    }
 590    return fieldTypeDefinition.Edit;
 591  }
 592  function getControlByType(type) {
 593    if (Object.keys(FORM_CONTROLS).includes(type)) {
 594      return FORM_CONTROLS[type];
 595    }
 596    throw 'Control ' + type + ' not found';
 597  }
 598  
 599  ;// CONCATENATED MODULE: ./node_modules/@wordpress/dataviews/build-module/normalize-fields.js
 600  /**
 601   * Internal dependencies
 602   */
 603  
 604  
 605  
 606  /**
 607   * Apply default values and normalize the fields config.
 608   *
 609   * @param fields Fields config.
 610   * @return Normalized fields config.
 611   */
 612  function normalizeFields(fields) {
 613    return fields.map(field => {
 614      var _field$sort, _field$isValid, _field$enableHiding, _field$enableSorting;
 615      const fieldTypeDefinition = getFieldTypeDefinition(field.type);
 616      const getValue = field.getValue || (({
 617        item
 618      }) => item[field.id]);
 619      const sort = (_field$sort = field.sort) !== null && _field$sort !== void 0 ? _field$sort : function sort(a, b, direction) {
 620        return fieldTypeDefinition.sort(getValue({
 621          item: a
 622        }), getValue({
 623          item: b
 624        }), direction);
 625      };
 626      const isValid = (_field$isValid = field.isValid) !== null && _field$isValid !== void 0 ? _field$isValid : function isValid(item, context) {
 627        return fieldTypeDefinition.isValid(getValue({
 628          item
 629        }), context);
 630      };
 631      const Edit = getControl(field, fieldTypeDefinition);
 632      const renderFromElements = ({
 633        item
 634      }) => {
 635        const value = getValue({
 636          item
 637        });
 638        return field?.elements?.find(element => element.value === value)?.label || getValue({
 639          item
 640        });
 641      };
 642      const render = field.render || (field.elements ? renderFromElements : getValue);
 643      return {
 644        ...field,
 645        label: field.label || field.id,
 646        header: field.header || field.label || field.id,
 647        getValue,
 648        render,
 649        sort,
 650        isValid,
 651        Edit,
 652        enableHiding: (_field$enableHiding = field.enableHiding) !== null && _field$enableHiding !== void 0 ? _field$enableHiding : true,
 653        enableSorting: (_field$enableSorting = field.enableSorting) !== null && _field$enableSorting !== void 0 ? _field$enableSorting : true
 654      };
 655    });
 656  }
 657  
 658  ;// CONCATENATED MODULE: ./node_modules/@wordpress/dataviews/build-module/validation.js
 659  /**
 660   * Internal dependencies
 661   */
 662  
 663  function isItemValid(item, fields, form) {
 664    const _fields = normalizeFields(fields.filter(({
 665      id
 666    }) => !!form.fields?.includes(id)));
 667    return _fields.every(field => {
 668      return field.isValid(item, {
 669        elements: field.elements
 670      });
 671    });
 672  }
 673  
 674  ;// CONCATENATED MODULE: ./node_modules/@wordpress/dataviews/build-module/dataforms-layouts/regular/index.js
 675  /**
 676   * WordPress dependencies
 677   */
 678  
 679  
 680  
 681  /**
 682   * Internal dependencies
 683   */
 684  
 685  
 686  function FormRegular({
 687    data,
 688    fields,
 689    form,
 690    onChange
 691  }) {
 692    const visibleFields = (0,external_wp_element_namespaceObject.useMemo)(() => {
 693      var _form$fields;
 694      return normalizeFields(((_form$fields = form.fields) !== null && _form$fields !== void 0 ? _form$fields : []).map(fieldId => fields.find(({
 695        id
 696      }) => id === fieldId)).filter(field => !!field));
 697    }, [fields, form.fields]);
 698    return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalVStack, {
 699      spacing: 4,
 700      children: visibleFields.map(field => {
 701        return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(field.Edit, {
 702          data: data,
 703          field: field,
 704          onChange: onChange
 705        }, field.id);
 706      })
 707    });
 708  }
 709  
 710  ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/close-small.js
 711  /**
 712   * WordPress dependencies
 713   */
 714  
 715  
 716  const closeSmall = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
 717    xmlns: "http://www.w3.org/2000/svg",
 718    viewBox: "0 0 24 24",
 719    children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
 720      d: "M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"
 721    })
 722  });
 723  /* harmony default export */ const close_small = (closeSmall);
 724  
 725  ;// CONCATENATED MODULE: ./node_modules/@wordpress/dataviews/build-module/dataforms-layouts/panel/index.js
 726  /**
 727   * WordPress dependencies
 728   */
 729  
 730  
 731  
 732  
 733  
 734  /**
 735   * Internal dependencies
 736   */
 737  
 738  
 739  
 740  
 741  function DropdownHeader({
 742    title,
 743    onClose
 744  }) {
 745    return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalVStack, {
 746      className: "dataforms-layouts-panel__dropdown-header",
 747      spacing: 4,
 748      children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
 749        alignment: "center",
 750        children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalHeading, {
 751          level: 2,
 752          size: 13,
 753          children: title
 754        }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalSpacer, {}), onClose && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
 755          label: (0,external_wp_i18n_namespaceObject.__)('Close'),
 756          icon: close_small,
 757          onClick: onClose,
 758          size: "small"
 759        })]
 760      })
 761    });
 762  }
 763  function FormField({
 764    data,
 765    field,
 766    onChange
 767  }) {
 768    // Use internal state instead of a ref to make sure that the component
 769    // re-renders when the popover's anchor updates.
 770    const [popoverAnchor, setPopoverAnchor] = (0,external_wp_element_namespaceObject.useState)(null);
 771    // Memoize popoverProps to avoid returning a new object every time.
 772    const popoverProps = (0,external_wp_element_namespaceObject.useMemo)(() => ({
 773      // Anchor the popover to the middle of the entire row so that it doesn't
 774      // move around when the label changes.
 775      anchor: popoverAnchor,
 776      placement: 'left-start',
 777      offset: 36,
 778      shift: true
 779    }), [popoverAnchor]);
 780    return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
 781      ref: setPopoverAnchor,
 782      className: "dataforms-layouts-panel__field",
 783      children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
 784        className: "dataforms-layouts-panel__field-label",
 785        children: field.label
 786      }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
 787        children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Dropdown, {
 788          contentClassName: "dataforms-layouts-panel__field-dropdown",
 789          popoverProps: popoverProps,
 790          focusOnMount: true,
 791          toggleProps: {
 792            size: 'compact',
 793            variant: 'tertiary',
 794            tooltipPosition: 'middle left'
 795          },
 796          renderToggle: ({
 797            isOpen,
 798            onToggle
 799          }) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
 800            className: "dataforms-layouts-panel__field-control",
 801            size: "compact",
 802            variant: "tertiary",
 803            "aria-expanded": isOpen,
 804            "aria-label": (0,external_wp_i18n_namespaceObject.sprintf)(
 805            // translators: %s: Field name.
 806            (0,external_wp_i18n_namespaceObject.__)('Edit %s'), field.label),
 807            onClick: onToggle,
 808            children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(field.render, {
 809              item: data
 810            })
 811          }),
 812          renderContent: ({
 813            onClose
 814          }) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
 815            children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(DropdownHeader, {
 816              title: field.label,
 817              onClose: onClose
 818            }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(field.Edit, {
 819              data: data,
 820              field: field,
 821              onChange: onChange,
 822              hideLabelFromVision: true
 823            }, field.id)]
 824          })
 825        })
 826      })]
 827    });
 828  }
 829  function FormPanel({
 830    data,
 831    fields,
 832    form,
 833    onChange
 834  }) {
 835    const visibleFields = (0,external_wp_element_namespaceObject.useMemo)(() => {
 836      var _form$fields;
 837      return normalizeFields(((_form$fields = form.fields) !== null && _form$fields !== void 0 ? _form$fields : []).map(fieldId => fields.find(({
 838        id
 839      }) => id === fieldId)).filter(field => !!field));
 840    }, [fields, form.fields]);
 841    return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalVStack, {
 842      spacing: 2,
 843      children: visibleFields.map(field => {
 844        return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(FormField, {
 845          data: data,
 846          field: field,
 847          onChange: onChange
 848        }, field.id);
 849      })
 850    });
 851  }
 852  
 853  ;// CONCATENATED MODULE: ./node_modules/@wordpress/dataviews/build-module/dataforms-layouts/index.js
 854  /**
 855   * Internal dependencies
 856   */
 857  
 858  
 859  const FORM_LAYOUTS = [{
 860    type: 'regular',
 861    component: FormRegular
 862  }, {
 863    type: 'panel',
 864    component: FormPanel
 865  }];
 866  function getFormLayout(type) {
 867    return FORM_LAYOUTS.find(layout => layout.type === type);
 868  }
 869  
 870  ;// CONCATENATED MODULE: ./node_modules/@wordpress/dataviews/build-module/components/dataform/index.js
 871  /**
 872   * Internal dependencies
 873   */
 874  
 875  
 876  
 877  function DataForm({
 878    form,
 879    ...props
 880  }) {
 881    var _form$type;
 882    const layout = getFormLayout((_form$type = form.type) !== null && _form$type !== void 0 ? _form$type : 'regular');
 883    if (!layout) {
 884      return null;
 885    }
 886    return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(layout.component, {
 887      form: form,
 888      ...props
 889    });
 890  }
 891  
 892  ;// CONCATENATED MODULE: ./node_modules/@wordpress/fields/build-module/actions/base-post/reorder-page.js
 893  /**
 894   * WordPress dependencies
 895   */
 896  
 897  
 898  
 899  
 900  
 901  
 902  
 903  
 904  /**
 905   * Internal dependencies
 906   */
 907  
 908  
 909  
 910  
 911  const fields = [order];
 912  const formOrderAction = {
 913    fields: ['menu_order']
 914  };
 915  function ReorderModal({
 916    items,
 917    closeModal,
 918    onActionPerformed
 919  }) {
 920    const [item, setItem] = (0,external_wp_element_namespaceObject.useState)(items[0]);
 921    const orderInput = item.menu_order;
 922    const {
 923      editEntityRecord,
 924      saveEditedEntityRecord
 925    } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
 926    const {
 927      createSuccessNotice,
 928      createErrorNotice
 929    } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
 930    async function onOrder(event) {
 931      event.preventDefault();
 932      if (!isItemValid(item, fields, formOrderAction)) {
 933        return;
 934      }
 935      try {
 936        await editEntityRecord('postType', item.type, item.id, {
 937          menu_order: orderInput
 938        });
 939        closeModal?.();
 940        // Persist edited entity.
 941        await saveEditedEntityRecord('postType', item.type, item.id, {
 942          throwOnError: true
 943        });
 944        createSuccessNotice((0,external_wp_i18n_namespaceObject.__)('Order updated.'), {
 945          type: 'snackbar'
 946        });
 947        onActionPerformed?.(items);
 948      } catch (error) {
 949        const typedError = error;
 950        const errorMessage = typedError.message && typedError.code !== 'unknown_error' ? typedError.message : (0,external_wp_i18n_namespaceObject.__)('An error occurred while updating the order');
 951        createErrorNotice(errorMessage, {
 952          type: 'snackbar'
 953        });
 954      }
 955    }
 956    const isSaveDisabled = !isItemValid(item, fields, formOrderAction);
 957    return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("form", {
 958      onSubmit: onOrder,
 959      children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
 960        spacing: "5",
 961        children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
 962          children: (0,external_wp_i18n_namespaceObject.__)('Determines the order of pages. Pages with the same order value are sorted alphabetically. Negative order values are supported.')
 963        }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(DataForm, {
 964          data: item,
 965          fields: fields,
 966          form: formOrderAction,
 967          onChange: changes => setItem({
 968            ...item,
 969            ...changes
 970          })
 971        }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
 972          justify: "right",
 973          children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
 974            __next40pxDefaultSize: true,
 975            variant: "tertiary",
 976            onClick: () => {
 977              closeModal?.();
 978            },
 979            children: (0,external_wp_i18n_namespaceObject.__)('Cancel')
 980          }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
 981            __next40pxDefaultSize: true,
 982            variant: "primary",
 983            type: "submit",
 984            accessibleWhenDisabled: true,
 985            disabled: isSaveDisabled,
 986            children: (0,external_wp_i18n_namespaceObject.__)('Save')
 987          })]
 988        })]
 989      })
 990    });
 991  }
 992  const reorderPage = {
 993    id: 'order-pages',
 994    label: (0,external_wp_i18n_namespaceObject.__)('Order'),
 995    isEligible({
 996      status
 997    }) {
 998      return status !== 'trash';
 999    },
1000    RenderModal: ReorderModal
1001  };
1002  /* harmony default export */ const reorder_page = (reorderPage);
1003  
1004  ;// CONCATENATED MODULE: ./node_modules/@wordpress/fields/build-module/actions/base-post/reorder-page.native.js
1005  const reorder_page_native_reorderPage = undefined;
1006  /* harmony default export */ const reorder_page_native = (reorder_page_native_reorderPage);
1007  
1008  ;// CONCATENATED MODULE: ./node_modules/@wordpress/fields/build-module/actions/base-post/duplicate-post.js
1009  /**
1010   * WordPress dependencies
1011   */
1012  
1013  
1014  
1015  
1016  
1017  
1018  
1019  
1020  /**
1021   * Internal dependencies
1022   */
1023  
1024  
1025  
1026  
1027  const duplicate_post_fields = [title];
1028  const formDuplicateAction = {
1029    fields: ['title']
1030  };
1031  const duplicatePost = {
1032    id: 'duplicate-post',
1033    label: (0,external_wp_i18n_namespaceObject._x)('Duplicate', 'action label'),
1034    isEligible({
1035      status
1036    }) {
1037      return status !== 'trash';
1038    },
1039    RenderModal: ({
1040      items,
1041      closeModal,
1042      onActionPerformed
1043    }) => {
1044      const [item, setItem] = (0,external_wp_element_namespaceObject.useState)({
1045        ...items[0],
1046        title: (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: Existing template title */
1047        (0,external_wp_i18n_namespaceObject.__)('%s (Copy)'), getItemTitle(items[0]))
1048      });
1049      const [isCreatingPage, setIsCreatingPage] = (0,external_wp_element_namespaceObject.useState)(false);
1050      const {
1051        saveEntityRecord
1052      } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
1053      const {
1054        createSuccessNotice,
1055        createErrorNotice
1056      } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
1057      async function createPage(event) {
1058        event.preventDefault();
1059        if (isCreatingPage) {
1060          return;
1061        }
1062        const newItemOject = {
1063          status: 'draft',
1064          title: item.title,
1065          slug: item.title || (0,external_wp_i18n_namespaceObject.__)('No title'),
1066          comment_status: item.comment_status,
1067          content: typeof item.content === 'string' ? item.content : item.content.raw,
1068          excerpt: typeof item.excerpt === 'string' ? item.excerpt : item.excerpt?.raw,
1069          meta: item.meta,
1070          parent: item.parent,
1071          password: item.password,
1072          template: item.template,
1073          format: item.format,
1074          featured_media: item.featured_media,
1075          menu_order: item.menu_order,
1076          ping_status: item.ping_status
1077        };
1078        const assignablePropertiesPrefix = 'wp:action-assign-';
1079        // Get all the properties that the current user is able to assign normally author, categories, tags,
1080        // and custom taxonomies.
1081        const assignableProperties = Object.keys(item?._links || {}).filter(property => property.startsWith(assignablePropertiesPrefix)).map(property => property.slice(assignablePropertiesPrefix.length));
1082        assignableProperties.forEach(property => {
1083          if (item.hasOwnProperty(property)) {
1084            // @ts-ignore
1085            newItemOject[property] = item[property];
1086          }
1087        });
1088        setIsCreatingPage(true);
1089        try {
1090          const newItem = await saveEntityRecord('postType', item.type, newItemOject, {
1091            throwOnError: true
1092          });
1093          createSuccessNotice((0,external_wp_i18n_namespaceObject.sprintf)(
1094          // translators: %s: Title of the created template e.g: "Category".
1095          (0,external_wp_i18n_namespaceObject.__)('"%s" successfully created.'), (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(newItem.title?.rendered || item.title)), {
1096            id: 'duplicate-post-action',
1097            type: 'snackbar'
1098          });
1099          if (onActionPerformed) {
1100            onActionPerformed([newItem]);
1101          }
1102        } catch (error) {
1103          const typedError = error;
1104          const errorMessage = typedError.message && typedError.code !== 'unknown_error' ? typedError.message : (0,external_wp_i18n_namespaceObject.__)('An error occurred while duplicating the page.');
1105          createErrorNotice(errorMessage, {
1106            type: 'snackbar'
1107          });
1108        } finally {
1109          setIsCreatingPage(false);
1110          closeModal?.();
1111        }
1112      }
1113      return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("form", {
1114        onSubmit: createPage,
1115        children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
1116          spacing: 3,
1117          children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(DataForm, {
1118            data: item,
1119            fields: duplicate_post_fields,
1120            form: formDuplicateAction,
1121            onChange: changes => setItem(prev => ({
1122              ...prev,
1123              ...changes
1124            }))
1125          }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
1126            spacing: 2,
1127            justify: "end",
1128            children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
1129              variant: "tertiary",
1130              onClick: closeModal,
1131              __next40pxDefaultSize: true,
1132              children: (0,external_wp_i18n_namespaceObject.__)('Cancel')
1133            }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
1134              variant: "primary",
1135              type: "submit",
1136              isBusy: isCreatingPage,
1137              "aria-disabled": isCreatingPage,
1138              __next40pxDefaultSize: true,
1139              children: (0,external_wp_i18n_namespaceObject._x)('Duplicate', 'action label')
1140            })]
1141          })]
1142        })
1143      });
1144    }
1145  };
1146  /* harmony default export */ const duplicate_post = (duplicatePost);
1147  
1148  ;// CONCATENATED MODULE: ./node_modules/@wordpress/fields/build-module/actions/base-post/duplicate-post.native.js
1149  const duplicate_post_native_duplicatePost = undefined;
1150  /* harmony default export */ const duplicate_post_native = (duplicate_post_native_duplicatePost);
1151  
1152  ;// CONCATENATED MODULE: ./node_modules/@wordpress/fields/build-module/actions/base-post/index.js
1153  
1154  
1155  
1156  
1157  
1158  
1159  ;// CONCATENATED MODULE: external ["wp","url"]
1160  const external_wp_url_namespaceObject = window["wp"]["url"];
1161  ;// CONCATENATED MODULE: ./node_modules/@wordpress/fields/build-module/actions/common/view-post-revisions.js
1162  /**
1163   * WordPress dependencies
1164   */
1165  
1166  
1167  
1168  /**
1169   * Internal dependencies
1170   */
1171  
1172  const viewPostRevisions = {
1173    id: 'view-post-revisions',
1174    context: 'list',
1175    label(items) {
1176      var _items$0$_links$versi;
1177      const revisionsCount = (_items$0$_links$versi = items[0]._links?.['version-history']?.[0]?.count) !== null && _items$0$_links$versi !== void 0 ? _items$0$_links$versi : 0;
1178      return (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: number of revisions */
1179      (0,external_wp_i18n_namespaceObject.__)('View revisions (%s)'), revisionsCount);
1180    },
1181    isEligible(post) {
1182      var _post$_links$predeces, _post$_links$version;
1183      if (post.status === 'trash') {
1184        return false;
1185      }
1186      const lastRevisionId = (_post$_links$predeces = post?._links?.['predecessor-version']?.[0]?.id) !== null && _post$_links$predeces !== void 0 ? _post$_links$predeces : null;
1187      const revisionsCount = (_post$_links$version = post?._links?.['version-history']?.[0]?.count) !== null && _post$_links$version !== void 0 ? _post$_links$version : 0;
1188      return !!lastRevisionId && revisionsCount > 1;
1189    },
1190    callback(posts, {
1191      onActionPerformed
1192    }) {
1193      const post = posts[0];
1194      const href = (0,external_wp_url_namespaceObject.addQueryArgs)('revision.php', {
1195        revision: post?._links?.['predecessor-version']?.[0]?.id
1196      });
1197      document.location.href = href;
1198      if (onActionPerformed) {
1199        onActionPerformed(posts);
1200      }
1201    }
1202  };
1203  /* harmony default export */ const view_post_revisions = (viewPostRevisions);
1204  
1205  ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/trash.js
1206  /**
1207   * WordPress dependencies
1208   */
1209  
1210  
1211  const trash = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
1212    xmlns: "http://www.w3.org/2000/svg",
1213    viewBox: "0 0 24 24",
1214    children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
1215      fillRule: "evenodd",
1216      clipRule: "evenodd",
1217      d: "M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"
1218    })
1219  });
1220  /* harmony default export */ const library_trash = (trash);
1221  
1222  ;// CONCATENATED MODULE: ./node_modules/@wordpress/fields/build-module/actions/common/permanently-delete-post.js
1223  /**
1224   * WordPress dependencies
1225   */
1226  
1227  
1228  
1229  
1230  
1231  /**
1232   * Internal dependencies
1233   */
1234  
1235  const permanentlyDeletePost = {
1236    id: 'permanently-delete',
1237    label: (0,external_wp_i18n_namespaceObject.__)('Permanently delete'),
1238    supportsBulk: true,
1239    icon: library_trash,
1240    isEligible(item) {
1241      if (isTemplateOrTemplatePart(item) || item.type === 'wp_block') {
1242        return false;
1243      }
1244      const {
1245        status,
1246        permissions
1247      } = item;
1248      return status === 'trash' && permissions?.delete;
1249    },
1250    async callback(posts, {
1251      registry,
1252      onActionPerformed
1253    }) {
1254      const {
1255        createSuccessNotice,
1256        createErrorNotice
1257      } = registry.dispatch(external_wp_notices_namespaceObject.store);
1258      const {
1259        deleteEntityRecord
1260      } = registry.dispatch(external_wp_coreData_namespaceObject.store);
1261      const promiseResult = await Promise.allSettled(posts.map(post => {
1262        return deleteEntityRecord('postType', post.type, post.id, {
1263          force: true
1264        }, {
1265          throwOnError: true
1266        });
1267      }));
1268      // If all the promises were fulfilled with success.
1269      if (promiseResult.every(({
1270        status
1271      }) => status === 'fulfilled')) {
1272        let successMessage;
1273        if (promiseResult.length === 1) {
1274          successMessage = (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: The posts's title. */
1275          (0,external_wp_i18n_namespaceObject.__)('"%s" permanently deleted.'), getItemTitle(posts[0]));
1276        } else {
1277          successMessage = (0,external_wp_i18n_namespaceObject.__)('The items were permanently deleted.');
1278        }
1279        createSuccessNotice(successMessage, {
1280          type: 'snackbar',
1281          id: 'permanently-delete-post-action'
1282        });
1283        onActionPerformed?.(posts);
1284      } else {
1285        // If there was at lease one failure.
1286        let errorMessage;
1287        // If we were trying to permanently delete a single post.
1288        if (promiseResult.length === 1) {
1289          const typedError = promiseResult[0];
1290          if (typedError.reason?.message) {
1291            errorMessage = typedError.reason.message;
1292          } else {
1293            errorMessage = (0,external_wp_i18n_namespaceObject.__)('An error occurred while permanently deleting the item.');
1294          }
1295          // If we were trying to permanently delete multiple posts
1296        } else {
1297          const errorMessages = new Set();
1298          const failedPromises = promiseResult.filter(({
1299            status
1300          }) => status === 'rejected');
1301          for (const failedPromise of failedPromises) {
1302            const typedError = failedPromise;
1303            if (typedError.reason?.message) {
1304              errorMessages.add(typedError.reason.message);
1305            }
1306          }
1307          if (errorMessages.size === 0) {
1308            errorMessage = (0,external_wp_i18n_namespaceObject.__)('An error occurred while permanently deleting the items.');
1309          } else if (errorMessages.size === 1) {
1310            errorMessage = (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: an error message */
1311            (0,external_wp_i18n_namespaceObject.__)('An error occurred while permanently deleting the items: %s'), [...errorMessages][0]);
1312          } else {
1313            errorMessage = (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: a list of comma separated error messages */
1314            (0,external_wp_i18n_namespaceObject.__)('Some errors occurred while permanently deleting the items: %s'), [...errorMessages].join(','));
1315          }
1316        }
1317        createErrorNotice(errorMessage, {
1318          type: 'snackbar'
1319        });
1320      }
1321    }
1322  };
1323  /* harmony default export */ const permanently_delete_post = (permanentlyDeletePost);
1324  
1325  ;// CONCATENATED MODULE: ./node_modules/@wordpress/fields/build-module/actions/common/index.js
1326  
1327  
1328  
1329  ;// CONCATENATED MODULE: external ["wp","patterns"]
1330  const external_wp_patterns_namespaceObject = window["wp"]["patterns"];
1331  ;// CONCATENATED MODULE: external ["wp","privateApis"]
1332  const external_wp_privateApis_namespaceObject = window["wp"]["privateApis"];
1333  ;// CONCATENATED MODULE: ./node_modules/@wordpress/fields/build-module/lock-unlock.js
1334  /**
1335   * WordPress dependencies
1336   */
1337  
1338  const {
1339    lock,
1340    unlock
1341  } = (0,external_wp_privateApis_namespaceObject.__dangerousOptInToUnstableAPIsOnlyForCoreModules)('I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.', '@wordpress/fields');
1342  
1343  ;// CONCATENATED MODULE: ./node_modules/@wordpress/fields/build-module/actions/pattern/duplicate-pattern.js
1344  /**
1345   * WordPress dependencies
1346   */
1347  
1348  // @ts-ignore
1349  
1350  /**
1351   * Internal dependencies
1352   */
1353  
1354  
1355  // Patterns.
1356  const {
1357    CreatePatternModalContents,
1358    useDuplicatePatternProps
1359  } = unlock(external_wp_patterns_namespaceObject.privateApis);
1360  const duplicatePattern = {
1361    id: 'duplicate-pattern',
1362    label: (0,external_wp_i18n_namespaceObject._x)('Duplicate', 'action label'),
1363    isEligible: item => item.type !== 'wp_template_part',
1364    modalHeader: (0,external_wp_i18n_namespaceObject._x)('Duplicate pattern', 'action label'),
1365    RenderModal: ({
1366      items,
1367      closeModal
1368    }) => {
1369      const [item] = items;
1370      const duplicatedProps = useDuplicatePatternProps({
1371        pattern: item,
1372        onSuccess: () => closeModal?.()
1373      });
1374      return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CreatePatternModalContents, {
1375        onClose: closeModal,
1376        confirmLabel: (0,external_wp_i18n_namespaceObject._x)('Duplicate', 'action label'),
1377        ...duplicatedProps
1378      });
1379    }
1380  };
1381  /* harmony default export */ const duplicate_pattern = (duplicatePattern);
1382  
1383  ;// CONCATENATED MODULE: ./node_modules/tslib/tslib.es6.mjs
1384  /******************************************************************************
1385  Copyright (c) Microsoft Corporation.
1386  
1387  Permission to use, copy, modify, and/or distribute this software for any
1388  purpose with or without fee is hereby granted.
1389  
1390  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
1391  REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
1392  AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
1393  INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
1394  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
1395  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
1396  PERFORMANCE OF THIS SOFTWARE.
1397  ***************************************************************************** */
1398  /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
1399  
1400  var extendStatics = function(d, b) {
1401    extendStatics = Object.setPrototypeOf ||
1402        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
1403        function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
1404    return extendStatics(d, b);
1405  };
1406  
1407  function __extends(d, b) {
1408    if (typeof b !== "function" && b !== null)
1409        throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
1410    extendStatics(d, b);
1411    function __() { this.constructor = d; }
1412    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
1413  }
1414  
1415  var __assign = function() {
1416    __assign = Object.assign || function __assign(t) {
1417        for (var s, i = 1, n = arguments.length; i < n; i++) {
1418            s = arguments[i];
1419            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
1420        }
1421        return t;
1422    }
1423    return __assign.apply(this, arguments);
1424  }
1425  
1426  function __rest(s, e) {
1427    var t = {};
1428    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
1429        t[p] = s[p];
1430    if (s != null && typeof Object.getOwnPropertySymbols === "function")
1431        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
1432            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
1433                t[p[i]] = s[p[i]];
1434        }
1435    return t;
1436  }
1437  
1438  function __decorate(decorators, target, key, desc) {
1439    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1440    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1441    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;
1442    return c > 3 && r && Object.defineProperty(target, key, r), r;
1443  }
1444  
1445  function __param(paramIndex, decorator) {
1446    return function (target, key) { decorator(target, key, paramIndex); }
1447  }
1448  
1449  function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
1450    function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
1451    var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
1452    var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
1453    var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
1454    var _, done = false;
1455    for (var i = decorators.length - 1; i >= 0; i--) {
1456        var context = {};
1457        for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
1458        for (var p in contextIn.access) context.access[p] = contextIn.access[p];
1459        context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
1460        var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
1461        if (kind === "accessor") {
1462            if (result === void 0) continue;
1463            if (result === null || typeof result !== "object") throw new TypeError("Object expected");
1464            if (_ = accept(result.get)) descriptor.get = _;
1465            if (_ = accept(result.set)) descriptor.set = _;
1466            if (_ = accept(result.init)) initializers.unshift(_);
1467        }
1468        else if (_ = accept(result)) {
1469            if (kind === "field") initializers.unshift(_);
1470            else descriptor[key] = _;
1471        }
1472    }
1473    if (target) Object.defineProperty(target, contextIn.name, descriptor);
1474    done = true;
1475  };
1476  
1477  function __runInitializers(thisArg, initializers, value) {
1478    var useValue = arguments.length > 2;
1479    for (var i = 0; i < initializers.length; i++) {
1480        value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
1481    }
1482    return useValue ? value : void 0;
1483  };
1484  
1485  function __propKey(x) {
1486    return typeof x === "symbol" ? x : "".concat(x);
1487  };
1488  
1489  function __setFunctionName(f, name, prefix) {
1490    if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
1491    return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
1492  };
1493  
1494  function __metadata(metadataKey, metadataValue) {
1495    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
1496  }
1497  
1498  function __awaiter(thisArg, _arguments, P, generator) {
1499    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
1500    return new (P || (P = Promise))(function (resolve, reject) {
1501        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
1502        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
1503        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
1504        step((generator = generator.apply(thisArg, _arguments || [])).next());
1505    });
1506  }
1507  
1508  function __generator(thisArg, body) {
1509    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);
1510    return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
1511    function verb(n) { return function (v) { return step([n, v]); }; }
1512    function step(op) {
1513        if (f) throw new TypeError("Generator is already executing.");
1514        while (g && (g = 0, op[0] && (_ = 0)), _) try {
1515            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;
1516            if (y = 0, t) op = [op[0] & 2, t.value];
1517            switch (op[0]) {
1518                case 0: case 1: t = op; break;
1519                case 4: _.label++; return { value: op[1], done: false };
1520                case 5: _.label++; y = op[1]; op = [0]; continue;
1521                case 7: op = _.ops.pop(); _.trys.pop(); continue;
1522                default:
1523                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
1524                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
1525                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
1526                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
1527                    if (t[2]) _.ops.pop();
1528                    _.trys.pop(); continue;
1529            }
1530            op = body.call(thisArg, _);
1531        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
1532        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
1533    }
1534  }
1535  
1536  var __createBinding = Object.create ? (function(o, m, k, k2) {
1537    if (k2 === undefined) k2 = k;
1538    var desc = Object.getOwnPropertyDescriptor(m, k);
1539    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
1540        desc = { enumerable: true, get: function() { return m[k]; } };
1541    }
1542    Object.defineProperty(o, k2, desc);
1543  }) : (function(o, m, k, k2) {
1544    if (k2 === undefined) k2 = k;
1545    o[k2] = m[k];
1546  });
1547  
1548  function __exportStar(m, o) {
1549    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
1550  }
1551  
1552  function __values(o) {
1553    var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
1554    if (m) return m.call(o);
1555    if (o && typeof o.length === "number") return {
1556        next: function () {
1557            if (o && i >= o.length) o = void 0;
1558            return { value: o && o[i++], done: !o };
1559        }
1560    };
1561    throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
1562  }
1563  
1564  function __read(o, n) {
1565    var m = typeof Symbol === "function" && o[Symbol.iterator];
1566    if (!m) return o;
1567    var i = m.call(o), r, ar = [], e;
1568    try {
1569        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
1570    }
1571    catch (error) { e = { error: error }; }
1572    finally {
1573        try {
1574            if (r && !r.done && (m = i["return"])) m.call(i);
1575        }
1576        finally { if (e) throw e.error; }
1577    }
1578    return ar;
1579  }
1580  
1581  /** @deprecated */
1582  function __spread() {
1583    for (var ar = [], i = 0; i < arguments.length; i++)
1584        ar = ar.concat(__read(arguments[i]));
1585    return ar;
1586  }
1587  
1588  /** @deprecated */
1589  function __spreadArrays() {
1590    for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
1591    for (var r = Array(s), k = 0, i = 0; i < il; i++)
1592        for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
1593            r[k] = a[j];
1594    return r;
1595  }
1596  
1597  function __spreadArray(to, from, pack) {
1598    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
1599        if (ar || !(i in from)) {
1600            if (!ar) ar = Array.prototype.slice.call(from, 0, i);
1601            ar[i] = from[i];
1602        }
1603    }
1604    return to.concat(ar || Array.prototype.slice.call(from));
1605  }
1606  
1607  function __await(v) {
1608    return this instanceof __await ? (this.v = v, this) : new __await(v);
1609  }
1610  
1611  function __asyncGenerator(thisArg, _arguments, generator) {
1612    if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
1613    var g = generator.apply(thisArg, _arguments || []), i, q = [];
1614    return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
1615    function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
1616    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]); } }
1617    function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
1618    function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
1619    function fulfill(value) { resume("next", value); }
1620    function reject(value) { resume("throw", value); }
1621    function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
1622  }
1623  
1624  function __asyncDelegator(o) {
1625    var i, p;
1626    return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
1627    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; }
1628  }
1629  
1630  function __asyncValues(o) {
1631    if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
1632    var m = o[Symbol.asyncIterator], i;
1633    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);
1634    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); }); }; }
1635    function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
1636  }
1637  
1638  function __makeTemplateObject(cooked, raw) {
1639    if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
1640    return cooked;
1641  };
1642  
1643  var __setModuleDefault = Object.create ? (function(o, v) {
1644    Object.defineProperty(o, "default", { enumerable: true, value: v });
1645  }) : function(o, v) {
1646    o["default"] = v;
1647  };
1648  
1649  function __importStar(mod) {
1650    if (mod && mod.__esModule) return mod;
1651    var result = {};
1652    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
1653    __setModuleDefault(result, mod);
1654    return result;
1655  }
1656  
1657  function __importDefault(mod) {
1658    return (mod && mod.__esModule) ? mod : { default: mod };
1659  }
1660  
1661  function __classPrivateFieldGet(receiver, state, kind, f) {
1662    if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
1663    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");
1664    return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
1665  }
1666  
1667  function __classPrivateFieldSet(receiver, state, value, kind, f) {
1668    if (kind === "m") throw new TypeError("Private method is not writable");
1669    if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
1670    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");
1671    return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
1672  }
1673  
1674  function __classPrivateFieldIn(state, receiver) {
1675    if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
1676    return typeof state === "function" ? receiver === state : state.has(receiver);
1677  }
1678  
1679  function __addDisposableResource(env, value, async) {
1680    if (value !== null && value !== void 0) {
1681      if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
1682      var dispose, inner;
1683      if (async) {
1684        if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
1685        dispose = value[Symbol.asyncDispose];
1686      }
1687      if (dispose === void 0) {
1688        if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
1689        dispose = value[Symbol.dispose];
1690        if (async) inner = dispose;
1691      }
1692      if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
1693      if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
1694      env.stack.push({ value: value, dispose: dispose, async: async });
1695    }
1696    else if (async) {
1697      env.stack.push({ async: true });
1698    }
1699    return value;
1700  }
1701  
1702  var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
1703    var e = new Error(message);
1704    return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
1705  };
1706  
1707  function __disposeResources(env) {
1708    function fail(e) {
1709      env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
1710      env.hasError = true;
1711    }
1712    var r, s = 0;
1713    function next() {
1714      while (r = env.stack.pop()) {
1715        try {
1716          if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
1717          if (r.dispose) {
1718            var result = r.dispose.call(r.value);
1719            if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
1720          }
1721          else s |= 1;
1722        }
1723        catch (e) {
1724          fail(e);
1725        }
1726      }
1727      if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
1728      if (env.hasError) throw env.error;
1729    }
1730    return next();
1731  }
1732  
1733  /* harmony default export */ const tslib_es6 = ({
1734    __extends,
1735    __assign,
1736    __rest,
1737    __decorate,
1738    __param,
1739    __metadata,
1740    __awaiter,
1741    __generator,
1742    __createBinding,
1743    __exportStar,
1744    __values,
1745    __read,
1746    __spread,
1747    __spreadArrays,
1748    __spreadArray,
1749    __await,
1750    __asyncGenerator,
1751    __asyncDelegator,
1752    __asyncValues,
1753    __makeTemplateObject,
1754    __importStar,
1755    __importDefault,
1756    __classPrivateFieldGet,
1757    __classPrivateFieldSet,
1758    __classPrivateFieldIn,
1759    __addDisposableResource,
1760    __disposeResources,
1761  });
1762  
1763  ;// CONCATENATED MODULE: ./node_modules/lower-case/dist.es2015/index.js
1764  /**
1765   * Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt
1766   */
1767  var SUPPORTED_LOCALE = {
1768      tr: {
1769          regexp: /\u0130|\u0049|\u0049\u0307/g,
1770          map: {
1771              İ: "\u0069",
1772              I: "\u0131",
1773              İ: "\u0069",
1774          },
1775      },
1776      az: {
1777          regexp: /\u0130/g,
1778          map: {
1779              İ: "\u0069",
1780              I: "\u0131",
1781              İ: "\u0069",
1782          },
1783      },
1784      lt: {
1785          regexp: /\u0049|\u004A|\u012E|\u00CC|\u00CD|\u0128/g,
1786          map: {
1787              I: "\u0069\u0307",
1788              J: "\u006A\u0307",
1789              Į: "\u012F\u0307",
1790              Ì: "\u0069\u0307\u0300",
1791              Í: "\u0069\u0307\u0301",
1792              Ĩ: "\u0069\u0307\u0303",
1793          },
1794      },
1795  };
1796  /**
1797   * Localized lower case.
1798   */
1799  function localeLowerCase(str, locale) {
1800      var lang = SUPPORTED_LOCALE[locale.toLowerCase()];
1801      if (lang)
1802          return lowerCase(str.replace(lang.regexp, function (m) { return lang.map[m]; }));
1803      return lowerCase(str);
1804  }
1805  /**
1806   * Lower case as a function.
1807   */
1808  function lowerCase(str) {
1809      return str.toLowerCase();
1810  }
1811  
1812  ;// CONCATENATED MODULE: ./node_modules/no-case/dist.es2015/index.js
1813  
1814  // Support camel case ("camelCase" -> "camel Case" and "CAMELCase" -> "CAMEL Case").
1815  var DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];
1816  // Remove all non-word characters.
1817  var DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;
1818  /**
1819   * Normalize the string into something other libraries can manipulate easier.
1820   */
1821  function noCase(input, options) {
1822      if (options === void 0) { options = {}; }
1823      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;
1824      var result = replace(replace(input, splitRegexp, "$1\0$2"), stripRegexp, "\0");
1825      var start = 0;
1826      var end = result.length;
1827      // Trim the delimiter from around the output string.
1828      while (result.charAt(start) === "\0")
1829          start++;
1830      while (result.charAt(end - 1) === "\0")
1831          end--;
1832      // Transform each token independently.
1833      return result.slice(start, end).split("\0").map(transform).join(delimiter);
1834  }
1835  /**
1836   * Replace `re` in the input string with the replacement value.
1837   */
1838  function replace(input, re, value) {
1839      if (re instanceof RegExp)
1840          return input.replace(re, value);
1841      return re.reduce(function (input, re) { return input.replace(re, value); }, input);
1842  }
1843  
1844  ;// CONCATENATED MODULE: ./node_modules/dot-case/dist.es2015/index.js
1845  
1846  
1847  function dotCase(input, options) {
1848      if (options === void 0) { options = {}; }
1849      return noCase(input, __assign({ delimiter: "." }, options));
1850  }
1851  
1852  ;// CONCATENATED MODULE: ./node_modules/param-case/dist.es2015/index.js
1853  
1854  
1855  function paramCase(input, options) {
1856      if (options === void 0) { options = {}; }
1857      return dotCase(input, __assign({ delimiter: "-" }, options));
1858  }
1859  
1860  ;// CONCATENATED MODULE: ./node_modules/client-zip/index.js
1861  "stream"in Blob.prototype||Object.defineProperty(Blob.prototype,"stream",{value(){return new Response(this).body}}),"setBigUint64"in DataView.prototype||Object.defineProperty(DataView.prototype,"setBigUint64",{value(e,n,t){const i=Number(0xffffffffn&n),r=Number(n>>32n);this.setUint32(e+(t?0:4),i,t),this.setUint32(e+(t?4:0),r,t)}});var e=e=>new DataView(new ArrayBuffer(e)),n=e=>new Uint8Array(e.buffer||e),t=e=>(new TextEncoder).encode(String(e)),i=e=>Math.min(4294967295,Number(e)),r=e=>Math.min(65535,Number(e));function f(e,i){if(void 0===i||i instanceof Date||(i=new Date(i)),e instanceof File)return{isFile:1,t:i||new Date(e.lastModified),i:e.stream()};if(e instanceof Response)return{isFile:1,t:i||new Date(e.headers.get("Last-Modified")||Date.now()),i:e.body};if(void 0===i)i=new Date;else if(isNaN(i))throw new Error("Invalid modification date.");if(void 0===e)return{isFile:0,t:i};if("string"==typeof e)return{isFile:1,t:i,i:t(e)};if(e instanceof Blob)return{isFile:1,t:i,i:e.stream()};if(e instanceof Uint8Array||e instanceof ReadableStream)return{isFile:1,t:i,i:e};if(e instanceof ArrayBuffer||ArrayBuffer.isView(e))return{isFile:1,t:i,i:n(e)};if(Symbol.asyncIterator in e)return{isFile:1,t:i,i:o(e[Symbol.asyncIterator]())};throw new TypeError("Unsupported input format.")}function o(e,n=e){return new ReadableStream({async pull(n){let t=0;for(;n.desiredSize>t;){const i=await e.next();if(!i.value){n.close();break}{const e=a(i.value);n.enqueue(e),t+=e.byteLength}}},cancel(e){n.throw?.(e)}})}function a(e){return"string"==typeof e?t(e):e instanceof Uint8Array?e:n(e)}function s(e,i,r){let[f,o]=function(e){return e?e instanceof Uint8Array?[e,1]:ArrayBuffer.isView(e)||e instanceof ArrayBuffer?[n(e),1]:[t(e),0]:[void 0,0]}(i);if(e instanceof File)return{o:d(f||t(e.name)),u:BigInt(e.size),l:o};if(e instanceof Response){const n=e.headers.get("content-disposition"),i=n&&n.match(/;\s*filename\*?=["']?(.*?)["']?$/i),a=i&&i[1]||e.url&&new URL(e.url).pathname.split("/").findLast(Boolean),s=a&&decodeURIComponent(a),u=r||+e.headers.get("content-length");return{o:d(f||t(s)),u:BigInt(u),l:o}}return f=d(f,void 0!==e||void 0!==r),"string"==typeof e?{o:f,u:BigInt(t(e).length),l:o}:e instanceof Blob?{o:f,u:BigInt(e.size),l:o}:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?{o:f,u:BigInt(e.byteLength),l:o}:{o:f,u:u(e,r),l:o}}function u(e,n){return n>-1?BigInt(n):e?void 0:0n}function d(e,n=1){if(!e||e.every((c=>47===c)))throw new Error("The file must have a name.");if(n)for(;47===e[e.length-1];)e=e.subarray(0,-1);else 47!==e[e.length-1]&&(e=new Uint8Array([...e,47]));return e}var l=new Uint32Array(256);for(let e=0;e<256;++e){let n=e;for(let e=0;e<8;++e)n=n>>>1^(1&n&&3988292384);l[e]=n}function y(e,n=0){n^=-1;for(var t=0,i=e.length;t<i;t++)n=n>>>8^l[255&n^e[t]];return(-1^n)>>>0}function w(e,n,t=0){const i=e.getSeconds()>>1|e.getMinutes()<<5|e.getHours()<<11,r=e.getDate()|e.getMonth()+1<<5|e.getFullYear()-1980<<9;n.setUint16(t,i,1),n.setUint16(t+2,r,1)}function B({o:e,l:n},t){return 8*(!n||(t??function(e){try{b.decode(e)}catch{return 0}return 1}(e)))}var b=new TextDecoder("utf8",{fatal:1});function p(t,i=0){const r=e(30);return r.setUint32(0,1347093252),r.setUint32(4,754976768|i),w(t.t,r,10),r.setUint16(26,t.o.length,1),n(r)}async function*g(e){let{i:n}=e;if("then"in n&&(n=await n),n instanceof Uint8Array)yield n,e.m=y(n,0),e.u=BigInt(n.length);else{e.u=0n;const t=n.getReader();for(;;){const{value:n,done:i}=await t.read();if(i)break;e.m=y(n,e.m),e.u+=BigInt(n.length),yield n}}}function I(t,r){const f=e(16+(r?8:0));return f.setUint32(0,1347094280),f.setUint32(4,t.isFile?t.m:0,1),r?(f.setBigUint64(8,t.u,1),f.setBigUint64(16,t.u,1)):(f.setUint32(8,i(t.u),1),f.setUint32(12,i(t.u),1)),n(f)}function v(t,r,f=0,o=0){const a=e(46);return a.setUint32(0,1347092738),a.setUint32(4,755182848),a.setUint16(8,2048|f),w(t.t,a,12),a.setUint32(16,t.isFile?t.m:0,1),a.setUint32(20,i(t.u),1),a.setUint32(24,i(t.u),1),a.setUint16(28,t.o.length,1),a.setUint16(30,o,1),a.setUint16(40,t.isFile?33204:16893,1),a.setUint32(42,i(r),1),n(a)}function h(t,i,r){const f=e(r);return f.setUint16(0,1,1),f.setUint16(2,r-4,1),16&r&&(f.setBigUint64(4,t.u,1),f.setBigUint64(12,t.u,1)),f.setBigUint64(r-8,i,1),n(f)}function D(e){return e instanceof File||e instanceof Response?[[e],[e]]:[[e.input,e.name,e.size],[e.input,e.lastModified]]}var S=e=>function(e){let n=BigInt(22),t=0n,i=0;for(const r of e){if(!r.o)throw new Error("Every file must have a non-empty name.");if(void 0===r.u)throw new Error(`Missing size for file "${(new TextDecoder).decode(r.o)}".`);const e=r.u>=0xffffffffn,f=t>=0xffffffffn;t+=BigInt(46+r.o.length+(e&&8))+r.u,n+=BigInt(r.o.length+46+(12*f|28*e)),i||(i=e)}return(i||t>=0xffffffffn)&&(n+=BigInt(76)),n+t}(function*(e){for(const n of e)yield s(...D(n)[0])}(e));function A(e,n={}){const t={"Content-Type":"application/zip","Content-Disposition":"attachment"};return("bigint"==typeof n.length||Number.isInteger(n.length))&&n.length>0&&(t["Content-Length"]=String(n.length)),n.metadata&&(t["Content-Length"]=String(S(n.metadata))),new Response(N(e,n),{headers:t})}function N(t,a={}){const u=function(e){const n=e[Symbol.iterator in e?Symbol.iterator:Symbol.asyncIterator]();return{async next(){const e=await n.next();if(e.done)return e;const[t,i]=D(e.value);return{done:0,value:Object.assign(f(...i),s(...t))}},throw:n.throw?.bind(n),[Symbol.asyncIterator](){return this}}}(t);return o(async function*(t,f){const o=[];let a=0n,s=0n,u=0;for await(const e of t){const n=B(e,f.buffersAreUTF8);yield p(e,n),yield new Uint8Array(e.o),e.isFile&&(yield*g(e));const t=e.u>=0xffffffffn,i=12*(a>=0xffffffffn)|28*t;yield I(e,t),o.push(v(e,a,n,i)),o.push(e.o),i&&o.push(h(e,a,i)),t&&(a+=8n),s++,a+=BigInt(46+e.o.length)+e.u,u||(u=t)}let d=0n;for(const e of o)yield e,d+=BigInt(e.length);if(u||a>=0xffffffffn){const t=e(76);t.setUint32(0,1347094022),t.setBigUint64(4,BigInt(44),1),t.setUint32(12,755182848),t.setBigUint64(24,s,1),t.setBigUint64(32,s,1),t.setBigUint64(40,d,1),t.setBigUint64(48,a,1),t.setUint32(56,1347094023),t.setBigUint64(64,a+d,1),t.setUint32(72,1,1),yield n(t)}const l=e(22);l.setUint32(0,1347093766),l.setUint16(8,r(s),1),l.setUint16(10,r(s),1),l.setUint32(12,i(d),1),l.setUint32(16,i(a),1),yield n(l)}(u,a),u)}
1862  ;// CONCATENATED MODULE: external ["wp","blob"]
1863  const external_wp_blob_namespaceObject = window["wp"]["blob"];
1864  ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/download.js
1865  /**
1866   * WordPress dependencies
1867   */
1868  
1869  
1870  const download = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
1871    xmlns: "http://www.w3.org/2000/svg",
1872    viewBox: "0 0 24 24",
1873    children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
1874      d: "M18 11.3l-1-1.1-4 4V3h-1.5v11.3L7 10.2l-1 1.1 6.2 5.8 5.8-5.8zm.5 3.7v3.5h-13V15H4v5h16v-5h-1.5z"
1875    })
1876  });
1877  /* harmony default export */ const library_download = (download);
1878  
1879  ;// CONCATENATED MODULE: ./node_modules/@wordpress/fields/build-module/actions/pattern/export-pattern.js
1880  /**
1881   * External dependencies
1882   */
1883  
1884  
1885  
1886  /**
1887   * WordPress dependencies
1888   */
1889  
1890  
1891  
1892  
1893  /**
1894   * Internal dependencies
1895   */
1896  
1897  
1898  function getJsonFromItem(item) {
1899    return JSON.stringify({
1900      __file: item.type,
1901      title: getItemTitle(item),
1902      content: typeof item.content === 'string' ? item.content : item.content?.raw,
1903      syncStatus: item.wp_pattern_sync_status
1904    }, null, 2);
1905  }
1906  const exportPattern = {
1907    id: 'export-pattern',
1908    label: (0,external_wp_i18n_namespaceObject.__)('Export as JSON'),
1909    icon: library_download,
1910    supportsBulk: true,
1911    isEligible: item => item.type === 'wp_block',
1912    callback: async items => {
1913      if (items.length === 1) {
1914        return (0,external_wp_blob_namespaceObject.downloadBlob)(`$paramCase(getItemTitle(items[0]) || items[0].slug)}.json`, getJsonFromItem(items[0]), 'application/json');
1915      }
1916      const nameCount = {};
1917      const filesToZip = items.map(item => {
1918        const name = paramCase(getItemTitle(item) || item.slug);
1919        nameCount[name] = (nameCount[name] || 0) + 1;
1920        return {
1921          name: `$name + (nameCount[name] > 1 ? '-' + (nameCount[name] - 1) : '')}.json`,
1922          lastModified: new Date(),
1923          input: getJsonFromItem(item)
1924        };
1925      });
1926      return (0,external_wp_blob_namespaceObject.downloadBlob)((0,external_wp_i18n_namespaceObject.__)('patterns-export') + '.zip', await A(filesToZip).blob(), 'application/zip');
1927    }
1928  };
1929  /* harmony default export */ const export_pattern = (exportPattern);
1930  
1931  ;// CONCATENATED MODULE: ./node_modules/@wordpress/fields/build-module/actions/pattern/export-pattern.native.js
1932  const export_pattern_native_exportPattern = undefined;
1933  /* harmony default export */ const export_pattern_native = (export_pattern_native_exportPattern);
1934  
1935  ;// CONCATENATED MODULE: ./node_modules/@wordpress/fields/build-module/actions/pattern/index.js
1936  
1937  
1938  
1939  
1940  ;// CONCATENATED MODULE: ./node_modules/@wordpress/fields/build-module/actions/index.js
1941  
1942  
1943  
1944  
1945  ;// CONCATENATED MODULE: ./node_modules/@wordpress/fields/build-module/index.js
1946  
1947  
1948  
1949  (window.wp = window.wp || {}).fields = __webpack_exports__;
1950  /******/ })()
1951  ;


Generated : Thu Oct 24 08:20:01 2024 Cross-referenced by PHPXref