Gutenberg - Version 12.1.0

Version Description

Download this release

Release Info

Developer gutenbergplugin
Plugin Icon 128x128 Gutenberg
Version 12.1.0
Comparing to
See all releases

Code changes from version 12.0.2 to 12.1.0

build/block-editor/index.js CHANGED
@@ -2254,7 +2254,6 @@ __webpack_require__.d(__webpack_exports__, {
2254
  "__unstableInserterMenuExtension": function() { return /* reexport */ inserter_menu_extension; },
2255
  "__unstableRichTextInputEvent": function() { return /* reexport */ __unstableRichTextInputEvent; },
2256
  "__unstableUseBlockSelectionClearer": function() { return /* reexport */ useBlockSelectionClearer; },
2257
- "__unstableUseCanvasClickRedirect": function() { return /* reexport */ useCanvasClickRedirect; },
2258
  "__unstableUseClipboardHandler": function() { return /* reexport */ useClipboardHandler; },
2259
  "__unstableUseMouseMoveTypingReset": function() { return /* reexport */ useMouseMoveTypingReset; },
2260
  "__unstableUseTypewriter": function() { return /* reexport */ useTypewriter; },
@@ -6350,38 +6349,33 @@ const getInserterItems = rememo(function (state) {
6350
  };
6351
 
6352
  const blockTypeInserterItems = (0,external_wp_blocks_namespaceObject.getBlockTypes)().filter(blockType => canIncludeBlockTypeInInserter(state, blockType, rootClientId)).map(buildBlockTypeInserterItem);
6353
- const reusableBlockInserterItems = canInsertBlockTypeUnmemoized(state, 'core/block', rootClientId) ? getReusableBlocks(state).map(buildReusableBlockInserterItem) : []; // Exclude any block type item that is to be replaced by a default
6354
- // variation.
6355
-
6356
- const visibleBlockTypeInserterItems = blockTypeInserterItems.filter(_ref4 => {
6357
- let {
6358
  variations = []
6359
- } = _ref4;
6360
- return !variations.some(_ref5 => {
 
6361
  let {
6362
  isDefault
6363
- } = _ref5;
6364
  return isDefault;
6365
- });
6366
- });
6367
- const blockVariations = []; // Show all available blocks with variations
6368
-
6369
- for (const item of blockTypeInserterItems) {
6370
- const {
6371
- variations = []
6372
- } = item;
6373
 
6374
  if (variations.length) {
6375
  const variationMapper = getItemFromVariation(state, item);
6376
- blockVariations.push(...variations.map(variationMapper));
6377
  }
6378
- } // Ensure core blocks are prioritized in the returned results,
 
 
6379
  // because third party blocks can be registered earlier than
6380
  // the core blocks (usually by using the `init` action),
6381
  // thus affecting the display order.
6382
  // We don't sort reusable blocks as they are handled differently.
6383
 
6384
-
6385
  const groupByType = (blocks, block) => {
6386
  const {
6387
  core,
@@ -6392,15 +6386,14 @@ const getInserterItems = rememo(function (state) {
6392
  return blocks;
6393
  };
6394
 
6395
- const items = visibleBlockTypeInserterItems.reduce(groupByType, {
6396
- core: [],
6397
- noncore: []
6398
- });
6399
- const variations = blockVariations.reduce(groupByType, {
6400
  core: [],
6401
  noncore: []
6402
  });
6403
- const sortedBlockTypes = [...items.core, ...variations.core, ...items.noncore, ...variations.noncore];
6404
  return [...sortedBlockTypes, ...reusableBlockInserterItems];
6405
  }, (state, rootClientId) => [state.blockListSettings[rootClientId], state.blocks.byClientId, state.blocks.order, state.preferences.insertUsage, state.settings.allowedBlockTypes, state.settings.templateLock, getReusableBlocks(state), (0,external_wp_blocks_namespaceObject.getBlockTypes)()]);
6406
  /**
@@ -6435,10 +6428,10 @@ const getBlockTransformItems = rememo(function (state, blocks) {
6435
  buildScope: 'transform'
6436
  });
6437
  const blockTypeTransformItems = (0,external_wp_blocks_namespaceObject.getBlockTypes)().filter(blockType => canIncludeBlockTypeInInserter(state, blockType, rootClientId)).map(buildBlockTypeTransformItem);
6438
- const itemsByName = (0,external_lodash_namespaceObject.mapKeys)(blockTypeTransformItems, _ref6 => {
6439
  let {
6440
  name
6441
- } = _ref6;
6442
  return name;
6443
  });
6444
  const possibleTransforms = (0,external_wp_blocks_namespaceObject.getPossibleBlockTransformations)(blocks).reduce((accumulator, block) => {
@@ -6548,10 +6541,10 @@ const checkAllowListRecursive = (blocks, allowedBlockTypes) => {
6548
 
6549
  const __experimentalGetParsedPattern = rememo((state, patternName) => {
6550
  const patterns = state.settings.__experimentalBlockPatterns;
6551
- const pattern = patterns.find(_ref7 => {
6552
  let {
6553
  name
6554
- } = _ref7;
6555
  return name === patternName;
6556
  });
6557
 
@@ -6568,21 +6561,21 @@ const getAllAllowedPatterns = rememo(state => {
6568
  const {
6569
  allowedBlockTypes
6570
  } = getSettings(state);
6571
- const parsedPatterns = patterns.filter(_ref8 => {
6572
  let {
6573
  inserter = true
6574
- } = _ref8;
6575
  return !!inserter;
6576
- }).map(_ref9 => {
6577
  let {
6578
  name
6579
- } = _ref9;
6580
  return __experimentalGetParsedPattern(state, name);
6581
  });
6582
- const allowedPatterns = parsedPatterns.filter(_ref10 => {
6583
  let {
6584
  blocks
6585
- } = _ref10;
6586
  return checkAllowListRecursive(blocks, allowedBlockTypes);
6587
  });
6588
  return allowedPatterns;
@@ -6599,14 +6592,14 @@ const getAllAllowedPatterns = rememo(state => {
6599
  const __experimentalGetAllowedPatterns = rememo(function (state) {
6600
  let rootClientId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
6601
  const availableParsedPatterns = getAllAllowedPatterns(state);
6602
- const patternsAllowed = (0,external_lodash_namespaceObject.filter)(availableParsedPatterns, _ref11 => {
6603
  let {
6604
  blocks
6605
- } = _ref11;
6606
- return blocks.every(_ref12 => {
6607
  let {
6608
  name
6609
- } = _ref12;
6610
  return canInsertBlockType(state, name, rootClientId);
6611
  });
6612
  });
@@ -6668,21 +6661,21 @@ const __experimentalGetPatternTransformItems = rememo(function (state, blocks) {
6668
  * to check for this case too.
6669
  */
6670
 
6671
- if (blocks.some(_ref13 => {
6672
  let {
6673
  clientId,
6674
  innerBlocks
6675
- } = _ref13;
6676
  return innerBlocks.length || areInnerBlocksControlled(state, clientId);
6677
  })) {
6678
  return EMPTY_ARRAY;
6679
  } // Create a Set of the selected block names that is used in patterns filtering.
6680
 
6681
 
6682
- const selectedBlockNames = Array.from(new Set(blocks.map(_ref14 => {
6683
  let {
6684
  name
6685
- } = _ref14;
6686
  return name;
6687
  })));
6688
  /**
@@ -8765,7 +8758,7 @@ function useSetting(path) {
8765
  if (external_wp_blocks_namespaceObject.__EXPERIMENTAL_PATHS_WITH_MERGE[normalizedPath]) {
8766
  var _ref, _experimentalFeatures;
8767
 
8768
- return (_ref = (_experimentalFeatures = experimentalFeaturesResult.user) !== null && _experimentalFeatures !== void 0 ? _experimentalFeatures : experimentalFeaturesResult.theme) !== null && _ref !== void 0 ? _ref : experimentalFeaturesResult.core;
8769
  }
8770
 
8771
  return experimentalFeaturesResult;
@@ -9973,11 +9966,13 @@ var external_wp_warning_default = /*#__PURE__*/__webpack_require__.n(external_wp
9973
 
9974
  const InspectorControlsDefault = (0,external_wp_components_namespaceObject.createSlotFill)('InspectorControls');
9975
  const InspectorControlsAdvanced = (0,external_wp_components_namespaceObject.createSlotFill)('InspectorAdvancedControls');
 
9976
  const InspectorControlsDimensions = (0,external_wp_components_namespaceObject.createSlotFill)('InspectorControlsDimensions');
9977
  const InspectorControlsTypography = (0,external_wp_components_namespaceObject.createSlotFill)('InspectorControlsTypography');
9978
  const groups_groups = {
9979
  default: InspectorControlsDefault,
9980
  advanced: InspectorControlsAdvanced,
 
9981
  dimensions: InspectorControlsDimensions,
9982
  typography: InspectorControlsTypography
9983
  };
@@ -10142,7 +10137,8 @@ function BlockSupportSlotContainer(_ref) {
10142
  } = _ref;
10143
  const toolsPanelContext = (0,external_wp_element_namespaceObject.useContext)(external_wp_components_namespaceObject.__experimentalToolsPanelContext);
10144
  return (0,external_wp_element_namespaceObject.createElement)(Slot, _extends({}, props, {
10145
- fillProps: toolsPanelContext
 
10146
  }));
10147
  }
10148
  //# sourceMappingURL=block-support-slot-container.js.map
@@ -10167,7 +10163,6 @@ function InspectorControlsSlot(_ref) {
10167
 
10168
  let {
10169
  __experimentalGroup: group = 'default',
10170
- bubblesVirtually = true,
10171
  label,
10172
  ...props
10173
  } = _ref;
@@ -10190,13 +10185,12 @@ function InspectorControlsSlot(_ref) {
10190
  group: group,
10191
  label: label
10192
  }, (0,external_wp_element_namespaceObject.createElement)(BlockSupportSlotContainer, _extends({}, props, {
10193
- bubblesVirtually: bubblesVirtually,
10194
  Slot: Slot
10195
  })));
10196
  }
10197
 
10198
  return (0,external_wp_element_namespaceObject.createElement)(Slot, _extends({}, props, {
10199
- bubblesVirtually: bubblesVirtually
10200
  }));
10201
  }
10202
  //# sourceMappingURL=slot.js.map
@@ -17282,9 +17276,9 @@ function BlockSelectionClearer(props) {
17282
 
17283
 
17284
 
17285
-
17286
  function use_multi_selection_toggleRichText(container, toggle) {
17287
- Array.from(container.querySelectorAll('.rich-text')).forEach(node => {
 
17288
  if (toggle) {
17289
  node.setAttribute('contenteditable', true);
17290
  } else {
@@ -17300,7 +17294,6 @@ function use_multi_selection_toggleRichText(container, toggle) {
17300
  * @param {string} type 'start' or 'end'.
17301
  */
17302
 
17303
-
17304
  function getDeepestNode(node, type) {
17305
  const child = type === 'start' ? 'firstChild' : 'lastChild';
17306
  const sibling = type === 'start' ? 'nextSibling' : 'previousSibling';
@@ -19853,6 +19846,7 @@ function AutoBlockPreview(_ref) {
19853
  documentElement
19854
  }
19855
  } = bodyElement;
 
19856
  documentElement.style.position = 'absolute';
19857
  documentElement.style.width = '100%';
19858
  bodyElement.style.padding = __experimentalPadding + 'px';
@@ -22435,14 +22429,13 @@ const ZWNBSP = '\ufeff';
22435
  function DefaultBlockAppender(_ref) {
22436
  let {
22437
  isLocked,
22438
- isVisible,
22439
  onAppend,
22440
  showPrompt,
22441
  placeholder,
22442
  rootClientId
22443
  } = _ref;
22444
 
22445
- if (isLocked || !isVisible) {
22446
  return null;
22447
  }
22448
 
@@ -22454,21 +22447,24 @@ function DefaultBlockAppender(_ref) {
22454
  'has-visible-prompt': showPrompt
22455
  })
22456
  }, (0,external_wp_element_namespaceObject.createElement)("p", {
22457
- tabIndex: "0" // Only necessary for `useCanvasClickRedirect` to consider it
22458
- // as a target. Ideally it should consider any tabbable target,
22459
- // but the inserter is rendered in place while it should be
22460
- // rendered in a popover, just like it does for an empty
22461
- // paragraph block.
22462
- ,
22463
- contentEditable: true,
22464
- suppressContentEditableWarning: true // We want this element to be styled as a paragraph by themes.
22465
  // eslint-disable-next-line jsx-a11y/no-noninteractive-element-to-interactive-role
22466
  ,
22467
  role: "button",
22468
- "aria-label": (0,external_wp_i18n_namespaceObject.__)('Add block') // A wrapping container for this one already has the wp-block className.
22469
  ,
22470
  className: "block-editor-default-block-appender__content",
22471
- onFocus: onAppend
 
 
 
 
 
 
 
 
 
 
22472
  }, showPrompt ? value : ZWNBSP), (0,external_wp_element_namespaceObject.createElement)(inserter, {
22473
  rootClientId: rootClientId,
22474
  position: "bottom right",
@@ -22479,19 +22475,14 @@ function DefaultBlockAppender(_ref) {
22479
  /* harmony default export */ var default_block_appender = ((0,external_wp_compose_namespaceObject.compose)((0,external_wp_data_namespaceObject.withSelect)((select, ownProps) => {
22480
  const {
22481
  getBlockCount,
22482
- getBlockName,
22483
- isBlockValid,
22484
  getSettings,
22485
  getTemplateLock
22486
  } = select(store);
22487
  const isEmpty = !getBlockCount(ownProps.rootClientId);
22488
- const isLastBlockDefault = getBlockName(ownProps.lastBlockClientId) === (0,external_wp_blocks_namespaceObject.getDefaultBlockName)();
22489
- const isLastBlockValid = isBlockValid(ownProps.lastBlockClientId);
22490
  const {
22491
  bodyPlaceholder
22492
  } = getSettings();
22493
  return {
22494
- isVisible: isEmpty || !isLastBlockDefault || !isLastBlockValid,
22495
  showPrompt: isEmpty,
22496
  isLocked: !!getTemplateLock(ownProps.rootClientId),
22497
  placeholder: bodyPlaceholder
@@ -22617,7 +22608,6 @@ const ButtonBlockerAppender = (0,external_wp_element_namespaceObject.forwardRef)
22617
  * External dependencies
22618
  */
22619
 
22620
-
22621
  /**
22622
  * WordPress dependencies
22623
  */
@@ -22634,7 +22624,6 @@ const ButtonBlockerAppender = (0,external_wp_element_namespaceObject.forwardRef)
22634
 
22635
  function BlockListAppender(_ref) {
22636
  let {
22637
- blockClientIds,
22638
  rootClientId,
22639
  canInsertDefaultBlock,
22640
  isLocked,
@@ -22654,11 +22643,9 @@ function BlockListAppender(_ref) {
22654
  // Prefer custom render prop if provided.
22655
  appender = (0,external_wp_element_namespaceObject.createElement)(CustomAppender, null);
22656
  } else {
22657
- const isDocumentAppender = !rootClientId;
22658
- const isParentSelected = selectedBlockClientId === rootClientId;
22659
- const isAnotherDefaultAppenderAlreadyDisplayed = selectedBlockClientId && !blockClientIds.includes(selectedBlockClientId);
22660
 
22661
- if (!isDocumentAppender && !isParentSelected && (!selectedBlockClientId || isAnotherDefaultAppenderAlreadyDisplayed)) {
22662
  return null;
22663
  }
22664
 
@@ -22666,8 +22653,7 @@ function BlockListAppender(_ref) {
22666
  // Render the default block appender when renderAppender has not been
22667
  // provided and the context supports use of the default appender.
22668
  appender = (0,external_wp_element_namespaceObject.createElement)(default_block_appender, {
22669
- rootClientId: rootClientId,
22670
- lastBlockClientId: (0,external_lodash_namespaceObject.last)(blockClientIds)
22671
  });
22672
  } else {
22673
  // Fallback in the case no renderAppender has been provided and the
@@ -22706,14 +22692,12 @@ function BlockListAppender(_ref) {
22706
  rootClientId
22707
  } = _ref2;
22708
  const {
22709
- getBlockOrder,
22710
  canInsertBlockType,
22711
  getTemplateLock,
22712
  getSelectedBlockClientId
22713
  } = select(store);
22714
  return {
22715
  isLocked: !!getTemplateLock(rootClientId),
22716
- blockClientIds: getBlockOrder(rootClientId),
22717
  canInsertDefaultBlock: canInsertBlockType((0,external_wp_blocks_namespaceObject.getDefaultBlockName)(), rootClientId),
22718
  selectedBlockClientId: getSelectedBlockClientId()
22719
  };
@@ -22790,7 +22774,8 @@ function InsertionPointPopover(_ref) {
22790
  __unstableContentRef
22791
  } = _ref;
22792
  const {
22793
- selectBlock
 
22794
  } = (0,external_wp_data_namespaceObject.useDispatch)(store);
22795
  const openRef = (0,external_wp_element_namespaceObject.useContext)(InsertionPointOpenRef);
22796
  const ref = (0,external_wp_element_namespaceObject.useRef)();
@@ -22931,6 +22916,14 @@ function InsertionPointPopover(_ref) {
22931
  if (event.target !== ref.current) {
22932
  openRef.current = true;
22933
  }
 
 
 
 
 
 
 
 
22934
  } // Only show the in-between inserter between blocks, so when there's a
22935
  // previous and a next element.
22936
 
@@ -23045,6 +23038,7 @@ function InsertionPointPopover(_ref) {
23045
  className: classnames_default()(className, {
23046
  'is-with-inserter': showInsertionPointInserter
23047
  }),
 
23048
  style: style
23049
  }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__unstableMotion.div, {
23050
  variants: lineVariants,
@@ -23730,7 +23724,8 @@ function BlockSelectionButton(_ref) {
23730
  getSelectedBlockClientId,
23731
  getMultiSelectedBlocksEndClientId,
23732
  getPreviousBlockClientId,
23733
- getNextBlockClientId
 
23734
  } = (0,external_wp_data_namespaceObject.useSelect)(store);
23735
  const {
23736
  selectBlock,
@@ -23787,6 +23782,11 @@ function BlockSelectionButton(_ref) {
23787
 
23788
  const startingBlockClientId = hasBlockMovingClientId();
23789
 
 
 
 
 
 
23790
  if (isEscape && startingBlockClientId && !event.defaultPrevented) {
23791
  setBlockMovingClientId(null);
23792
  event.preventDefault();
@@ -27216,12 +27216,10 @@ const button_block_appender_ButtonBlockAppender = _ref => {
27216
 
27217
  const default_block_appender_DefaultBlockAppender = _ref => {
27218
  let {
27219
- clientId,
27220
- lastBlockClientId
27221
  } = _ref;
27222
  return (0,external_wp_element_namespaceObject.createElement)(default_block_appender, {
27223
- rootClientId: clientId,
27224
- lastBlockClientId: lastBlockClientId
27225
  });
27226
  };
27227
  /* harmony default export */ var inner_blocks_default_block_appender = ((0,external_wp_compose_namespaceObject.compose)([with_client_id, (0,external_wp_data_namespaceObject.withSelect)((select, _ref2) => {
@@ -28201,6 +28199,7 @@ function ColorGradientControlInner(_ref) {
28201
  disableCustomColors,
28202
  disableCustomGradients,
28203
  __experimentalHasMultipleOrigins,
 
28204
  className,
28205
  label,
28206
  onColorChange,
@@ -28208,7 +28207,8 @@ function ColorGradientControlInner(_ref) {
28208
  colorValue,
28209
  gradientValue,
28210
  clearable,
28211
- showTitle = true
 
28212
  } = _ref;
28213
  const canChooseAColor = onColorChange && (!(0,external_lodash_namespaceObject.isEmpty)(colors) || !disableCustomColors);
28214
  const canChooseAGradient = onGradientChange && (!(0,external_lodash_namespaceObject.isEmpty)(gradients) || !disableCustomGradients);
@@ -28245,7 +28245,9 @@ function ColorGradientControlInner(_ref) {
28245
  colors,
28246
  disableCustomColors,
28247
  __experimentalHasMultipleOrigins: __experimentalHasMultipleOrigins,
28248
- clearable: clearable
 
 
28249
  }), (currentTab === 'gradient' || !canChooseAColor) && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.GradientPicker, {
28250
  value: gradientValue,
28251
  onChange: canChooseAColor ? newGradient => {
@@ -28278,6 +28280,104 @@ function ColorGradientControl(props) {
28278
 
28279
  /* harmony default export */ var control = (ColorGradientControl);
28280
  //# sourceMappingURL=control.js.map
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28281
  ;// CONCATENATED MODULE: ./packages/block-editor/build-module/components/colors/utils.js
28282
  /**
28283
  * External dependencies
@@ -28390,6 +28490,7 @@ function getMostReadableColor(colors, colorValue) {
28390
 
28391
 
28392
 
 
28393
  // Defining empty array here instead of inline avoids unnecessary re-renders of
28394
  // color control.
28395
 
@@ -28416,18 +28517,17 @@ function BorderColorEdit(props) {
28416
  },
28417
  setAttributes
28418
  } = props;
28419
- const colors = useSetting('color.palette') || border_color_EMPTY_ARRAY;
28420
- const disableCustomColors = !useSetting('color.custom');
28421
- const disableCustomGradients = !useSetting('color.customGradient');
28422
  const [colorValue, setColorValue] = (0,external_wp_element_namespaceObject.useState)(() => {
28423
  var _getColorObjectByAttr, _style$border;
28424
 
28425
- return (_getColorObjectByAttr = getColorObjectByAttributeValues(colors, borderColor, style === null || style === void 0 ? void 0 : (_style$border = style.border) === null || _style$border === void 0 ? void 0 : _style$border.color)) === null || _getColorObjectByAttr === void 0 ? void 0 : _getColorObjectByAttr.color;
28426
  });
28427
 
28428
  const onChangeColor = value => {
28429
  setColorValue(value);
28430
- const colorObject = getColorObjectByColorValue(colors, value);
28431
  const newStyle = { ...style,
28432
  border: { ...(style === null || style === void 0 ? void 0 : style.border),
28433
  color: colorObject !== null && colorObject !== void 0 && colorObject.slug ? undefined : value
@@ -28441,14 +28541,55 @@ function BorderColorEdit(props) {
28441
  });
28442
  };
28443
 
28444
- return (0,external_wp_element_namespaceObject.createElement)(control, {
28445
  label: (0,external_wp_i18n_namespaceObject.__)('Color'),
28446
  colorValue: colorValue,
28447
- colors: colors,
28448
- gradients: undefined,
28449
- disableCustomColors: disableCustomColors,
28450
- disableCustomGradients: disableCustomGradients,
28451
- onColorChange: onChangeColor
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28452
  });
28453
  }
28454
  /**
@@ -28491,7 +28632,7 @@ function addAttributes(settings) {
28491
 
28492
 
28493
  function border_color_addSaveProps(props, blockType, attributes) {
28494
- var _style$border2;
28495
 
28496
  if (!hasBorderSupport(blockType, 'color') || shouldSkipSerialization(blockType)) {
28497
  return props;
@@ -28503,7 +28644,7 @@ function border_color_addSaveProps(props, blockType, attributes) {
28503
  } = attributes;
28504
  const borderColorClass = getColorClassName('border-color', borderColor);
28505
  const newClassName = classnames_default()(props.className, {
28506
- 'has-border-color': borderColor || (style === null || style === void 0 ? void 0 : (_style$border2 = style.border) === null || _style$border2 === void 0 ? void 0 : _style$border2.color),
28507
  [borderColorClass]: !!borderColorClass
28508
  }); // If we are clearing the last of the previous classes in `className`
28509
  // set it to `undefined` to avoid rendering empty DOM attributes.
@@ -28939,6 +29080,7 @@ function BorderRadiusControl(_ref) {
28939
  */
28940
 
28941
 
 
28942
  /**
28943
  * Inspector control panel containing the border radius related configuration.
28944
  *
@@ -28978,6 +29120,47 @@ function BorderRadiusEdit(props) {
28978
  onChange: onChange
28979
  });
28980
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28981
  //# sourceMappingURL=border-radius.js.map
28982
  ;// CONCATENATED MODULE: ./packages/icons/build-module/library/line-solid.js
28983
 
@@ -29093,6 +29276,7 @@ function BorderStyleControl(_ref) {
29093
  */
29094
 
29095
 
 
29096
  /**
29097
  * Inspector control for configuring border style property.
29098
  *
@@ -29127,6 +29311,41 @@ const BorderStyleEdit = props => {
29127
  onChange: onChange
29128
  });
29129
  };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29130
  //# sourceMappingURL=border-style.js.map
29131
  ;// CONCATENATED MODULE: ./packages/block-editor/build-module/hooks/border-width.js
29132
 
@@ -29143,6 +29362,7 @@ const BorderStyleEdit = props => {
29143
 
29144
 
29145
 
 
29146
  const MIN_BORDER_WIDTH = 0;
29147
  /**
29148
  * Inspector control for configuring border width property.
@@ -29237,6 +29457,41 @@ const BorderWidthEdit = props => {
29237
  units: units
29238
  });
29239
  };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29240
  //# sourceMappingURL=border-width.js.map
29241
  ;// CONCATENATED MODULE: ./packages/block-editor/build-module/hooks/border.js
29242
 
@@ -29258,8 +29513,12 @@ const BorderWidthEdit = props => {
29258
 
29259
 
29260
 
 
29261
  const BORDER_SUPPORT_KEY = '__experimentalBorder';
29262
  function BorderPanel(props) {
 
 
 
29263
  const isDisabled = useIsBorderDisabled(props);
29264
  const isSupported = hasBorderSupport(props.name);
29265
  const isColorSupported = useSetting('border.color') && hasBorderSupport(props.name, 'color');
@@ -29271,13 +29530,59 @@ function BorderPanel(props) {
29271
  return null;
29272
  }
29273
 
29274
- return (0,external_wp_element_namespaceObject.createElement)(inspector_controls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, {
29275
- className: "block-editor-hooks__border-controls",
29276
- title: (0,external_wp_i18n_namespaceObject.__)('Border'),
29277
- initialOpen: false
29278
- }, (isWidthSupported || isStyleSupported) && (0,external_wp_element_namespaceObject.createElement)("div", {
29279
- className: "block-editor-hooks__border-controls-row"
29280
- }, isWidthSupported && (0,external_wp_element_namespaceObject.createElement)(BorderWidthEdit, props), isStyleSupported && (0,external_wp_element_namespaceObject.createElement)(BorderStyleEdit, props)), isColorSupported && (0,external_wp_element_namespaceObject.createElement)(BorderColorEdit, props), isRadiusSupported && (0,external_wp_element_namespaceObject.createElement)(BorderRadiusEdit, props)));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29281
  }
29282
  /**
29283
  * Determine whether there is block support for border properties.
@@ -29329,6 +29634,24 @@ const useIsBorderDisabled = () => {
29329
  const configs = [!useSetting('border.color'), !useSetting('border.radius'), !useSetting('border.style'), !useSetting('border.width')];
29330
  return configs.every(Boolean);
29331
  };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29332
  //# sourceMappingURL=border.js.map
29333
  ;// CONCATENATED MODULE: ./packages/block-editor/build-module/components/gradients/use-gradient.js
29334
  /**
@@ -29348,7 +29671,6 @@ const useIsBorderDisabled = () => {
29348
 
29349
 
29350
 
29351
- const use_gradient_EMPTY_ARRAY = [];
29352
  function __experimentalGetGradientClass(gradientSlug) {
29353
  if (!gradientSlug) {
29354
  return undefined;
@@ -29394,7 +29716,10 @@ function __experimentalUseGradient() {
29394
  const {
29395
  clientId
29396
  } = useBlockEditContext();
29397
- const gradients = useSetting('color.gradients') || use_gradient_EMPTY_ARRAY;
 
 
 
29398
  const {
29399
  gradient,
29400
  customGradient
@@ -29412,7 +29737,7 @@ function __experimentalUseGradient() {
29412
  updateBlockAttributes
29413
  } = (0,external_wp_data_namespaceObject.useDispatch)(store);
29414
  const setGradient = (0,external_wp_element_namespaceObject.useCallback)(newGradientValue => {
29415
- const slug = getGradientSlugByValue(gradients, newGradientValue);
29416
 
29417
  if (slug) {
29418
  updateBlockAttributes(clientId, {
@@ -29426,14 +29751,14 @@ function __experimentalUseGradient() {
29426
  [gradientAttribute]: undefined,
29427
  [customGradientAttribute]: newGradientValue
29428
  });
29429
- }, [gradients, clientId, updateBlockAttributes]);
29430
 
29431
  const gradientClass = __experimentalGetGradientClass(gradient);
29432
 
29433
  let gradientValue;
29434
 
29435
  if (gradient) {
29436
- gradientValue = getGradientValueBySlug(gradients, gradient);
29437
  } else {
29438
  gradientValue = customGradient;
29439
  }
@@ -29460,7 +29785,6 @@ function __experimentalUseGradient() {
29460
 
29461
 
29462
 
29463
-
29464
  /**
29465
  * Internal dependencies
29466
  */
@@ -29468,6 +29792,8 @@ function __experimentalUseGradient() {
29468
 
29469
 
29470
 
 
 
29471
  // translators: first %s: The type of color or gradient (e.g. background, overlay...), second %s: the color name or value (e.g. red or #ff0000)
29472
 
29473
  const colorIndicatorAriaLabel = (0,external_wp_i18n_namespaceObject.__)('(%s: color %s)'); // translators: first %s: The type of color or gradient (e.g. background, overlay...), second %s: the color name or value (e.g. red or #ff0000)
@@ -29527,6 +29853,8 @@ const PanelColorGradientSettingsInner = _ref3 => {
29527
  title,
29528
  showTitle = true,
29529
  __experimentalHasMultipleOrigins,
 
 
29530
  ...props
29531
  } = _ref3;
29532
 
@@ -29551,17 +29879,12 @@ const PanelColorGradientSettingsInner = _ref3 => {
29551
  gradients,
29552
  disableCustomColors,
29553
  disableCustomGradients,
29554
- __experimentalHasMultipleOrigins
 
 
29555
  }, setting))), children);
29556
  };
29557
 
29558
- function useCommonSingleMultipleSelects() {
29559
- return {
29560
- disableCustomColors: !useSetting('color.custom'),
29561
- disableCustomGradients: !useSetting('color.customGradient')
29562
- };
29563
- }
29564
-
29565
  const PanelColorGradientSettingsSingleSelect = props => {
29566
  const colorGradientSettings = useCommonSingleMultipleSelects();
29567
  colorGradientSettings.colors = useSetting('color.palette');
@@ -29570,67 +29893,7 @@ const PanelColorGradientSettingsSingleSelect = props => {
29570
  };
29571
 
29572
  const PanelColorGradientSettingsMultipleSelect = props => {
29573
- const colorGradientSettings = useCommonSingleMultipleSelects();
29574
- const userColors = useSetting('color.palette.user');
29575
- const themeColors = useSetting('color.palette.theme');
29576
- const coreColors = useSetting('color.palette.core');
29577
- const shouldDisplayCoreColors = useSetting('color.corePalette');
29578
- colorGradientSettings.colors = (0,external_wp_element_namespaceObject.useMemo)(() => {
29579
- const result = [];
29580
-
29581
- if (shouldDisplayCoreColors && coreColors && coreColors.length) {
29582
- result.push({
29583
- name: (0,external_wp_i18n_namespaceObject.__)('Core'),
29584
- colors: coreColors
29585
- });
29586
- }
29587
-
29588
- if (themeColors && themeColors.length) {
29589
- result.push({
29590
- name: (0,external_wp_i18n_namespaceObject.__)('Theme'),
29591
- colors: themeColors
29592
- });
29593
- }
29594
-
29595
- if (userColors && userColors.length) {
29596
- result.push({
29597
- name: (0,external_wp_i18n_namespaceObject.__)('User'),
29598
- colors: userColors
29599
- });
29600
- }
29601
-
29602
- return result;
29603
- }, [coreColors, themeColors, userColors]);
29604
- const userGradients = useSetting('color.gradients.user');
29605
- const themeGradients = useSetting('color.gradients.theme');
29606
- const coreGradients = useSetting('color.gradients.core');
29607
- const shouldDisplayCoreGradients = useSetting('color.coreGradients');
29608
- colorGradientSettings.gradients = (0,external_wp_element_namespaceObject.useMemo)(() => {
29609
- const result = [];
29610
-
29611
- if (shouldDisplayCoreGradients && coreGradients && coreGradients.length) {
29612
- result.push({
29613
- name: (0,external_wp_i18n_namespaceObject.__)('Core'),
29614
- gradients: coreGradients
29615
- });
29616
- }
29617
-
29618
- if (themeGradients && themeGradients.length) {
29619
- result.push({
29620
- name: (0,external_wp_i18n_namespaceObject.__)('Theme'),
29621
- gradients: themeGradients
29622
- });
29623
- }
29624
-
29625
- if (userGradients && userGradients.length) {
29626
- result.push({
29627
- name: (0,external_wp_i18n_namespaceObject.__)('User'),
29628
- gradients: userGradients
29629
- });
29630
- }
29631
-
29632
- return result;
29633
- }, [userGradients, themeGradients, coreGradients]);
29634
  return (0,external_wp_element_namespaceObject.createElement)(PanelColorGradientSettingsInner, _extends({}, colorGradientSettings, props));
29635
  };
29636
 
@@ -29783,7 +30046,8 @@ function ColorPanel(_ref) {
29783
  initialOpen: false,
29784
  settings: settings,
29785
  showTitle: showTitle,
29786
- __experimentalHasMultipleOrigins: true
 
29787
  }, enableContrastChecking && (0,external_wp_element_namespaceObject.createElement)(contrast_checker, {
29788
  backgroundColor: detectedBackgroundColor,
29789
  textColor: detectedColor
@@ -29818,7 +30082,6 @@ function ColorPanel(_ref) {
29818
 
29819
 
29820
  const COLOR_SUPPORT_KEY = 'color';
29821
- const color_EMPTY_ARRAY = [];
29822
 
29823
  const hasColorSupport = blockType => {
29824
  const colorSupport = (0,external_wp_blocks_namespaceObject.getBlockSupport)(blockType, COLOR_SUPPORT_KEY);
@@ -29988,19 +30251,25 @@ function immutableSet(object, path, value) {
29988
 
29989
 
29990
  function ColorEdit(props) {
29991
- var _style$color6, _style$color7, _style$color8, _style$elements2, _style$elements2$link, _style$elements2$link2, _style$elements3, _style$elements3$link, _style$elements3$link2;
29992
 
29993
  const {
29994
  name: blockName,
29995
  attributes
29996
  } = props;
29997
- const solids = useSetting('color.palette') || color_EMPTY_ARRAY;
29998
- const gradients = useSetting('color.gradients') || color_EMPTY_ARRAY;
29999
- const areCustomSolidsEnabled = useSetting('color.custom');
30000
- const areCustomGradientsEnabled = useSetting('color.customGradient');
30001
- const isLinkEnabled = useSetting('color.link');
30002
- const isTextEnabled = useSetting('color.text');
30003
- const isBackgroundEnabled = useSetting('color.background'); // Shouldn't be needed but right now the ColorGradientsPanel
 
 
 
 
 
 
30004
  // can trigger both onChangeColor and onChangeBackground
30005
  // synchronously causing our two callbacks to override changes
30006
  // from each other.
@@ -30014,10 +30283,10 @@ function ColorEdit(props) {
30014
  return null;
30015
  }
30016
 
30017
- const hasLinkColor = hasLinkColorSupport(blockName) && isLinkEnabled && (solids.length > 0 || areCustomSolidsEnabled);
30018
- const hasTextColor = hasTextColorSupport(blockName) && isTextEnabled && (solids.length > 0 || areCustomSolidsEnabled);
30019
- const hasBackgroundColor = hasBackgroundColorSupport(blockName) && isBackgroundEnabled && (solids.length > 0 || areCustomSolidsEnabled);
30020
- const hasGradientColor = hasGradientSupport(blockName) && (gradients.length > 0 || areCustomGradientsEnabled);
30021
 
30022
  if (!hasLinkColor && !hasTextColor && !hasBackgroundColor && !hasGradientColor) {
30023
  return null;
@@ -30032,7 +30301,7 @@ function ColorEdit(props) {
30032
  let gradientValue;
30033
 
30034
  if (hasGradientColor && gradient) {
30035
- gradientValue = getGradientValueBySlug(gradients, gradient);
30036
  } else if (hasGradientColor) {
30037
  var _style$color5;
30038
 
@@ -30042,7 +30311,7 @@ function ColorEdit(props) {
30042
  const onChangeColor = name => value => {
30043
  var _localAttributes$curr, _localAttributes$curr2;
30044
 
30045
- const colorObject = getColorObjectByColorValue(solids, value);
30046
  const attributeName = name + 'Color';
30047
  const newStyle = { ...localAttributes.current.style,
30048
  color: { ...((_localAttributes$curr = localAttributes.current) === null || _localAttributes$curr === void 0 ? void 0 : (_localAttributes$curr2 = _localAttributes$curr.style) === null || _localAttributes$curr2 === void 0 ? void 0 : _localAttributes$curr2.color),
@@ -30061,7 +30330,7 @@ function ColorEdit(props) {
30061
  };
30062
 
30063
  const onChangeGradient = value => {
30064
- const slug = getGradientSlugByValue(gradients, value);
30065
  let newAttributes;
30066
 
30067
  if (slug) {
@@ -30097,7 +30366,7 @@ function ColorEdit(props) {
30097
  };
30098
 
30099
  const onChangeLinkColor = value => {
30100
- const colorObject = getColorObjectByColorValue(solids, value);
30101
  const newLinkColorValue = colorObject !== null && colorObject !== void 0 && colorObject.slug ? `var:preset|color|${colorObject.slug}` : value;
30102
  const newStyle = cleanEmptyObject(immutableSet(style, ['elements', 'link', 'color', 'text'], newLinkColorValue));
30103
  props.setAttributes({
@@ -30112,17 +30381,17 @@ function ColorEdit(props) {
30112
  settings: [...(hasTextColor ? [{
30113
  label: (0,external_wp_i18n_namespaceObject.__)('Text color'),
30114
  onColorChange: onChangeColor('text'),
30115
- colorValue: getColorObjectByAttributeValues(solids, textColor, style === null || style === void 0 ? void 0 : (_style$color7 = style.color) === null || _style$color7 === void 0 ? void 0 : _style$color7.text).color
30116
  }] : []), ...(hasBackgroundColor || hasGradientColor ? [{
30117
  label: (0,external_wp_i18n_namespaceObject.__)('Background color'),
30118
  onColorChange: hasBackgroundColor ? onChangeColor('background') : undefined,
30119
- colorValue: getColorObjectByAttributeValues(solids, backgroundColor, style === null || style === void 0 ? void 0 : (_style$color8 = style.color) === null || _style$color8 === void 0 ? void 0 : _style$color8.background).color,
30120
  gradientValue,
30121
  onGradientChange: hasGradientColor ? onChangeGradient : undefined
30122
  }] : []), ...(hasLinkColor ? [{
30123
  label: (0,external_wp_i18n_namespaceObject.__)('Link Color'),
30124
  onColorChange: onChangeLinkColor,
30125
- colorValue: getLinkColorFromAttributeValue(solids, style === null || style === void 0 ? void 0 : (_style$elements2 = style.elements) === null || _style$elements2 === void 0 ? void 0 : (_style$elements2$link = _style$elements2.link) === null || _style$elements2$link === void 0 ? void 0 : (_style$elements2$link2 = _style$elements2$link.color) === null || _style$elements2$link2 === void 0 ? void 0 : _style$elements2$link2.text),
30126
  clearable: !!(style !== null && style !== void 0 && (_style$elements3 = style.elements) !== null && _style$elements3 !== void 0 && (_style$elements3$link = _style$elements3.link) !== null && _style$elements3$link !== void 0 && (_style$elements3$link2 = _style$elements3$link.color) !== null && _style$elements3$link2 !== void 0 && _style$elements3$link2.text)
30127
  }] : [])]
30128
  });
@@ -30147,7 +30416,10 @@ const withColorPaletteStyles = (0,external_wp_compose_namespaceObject.createHigh
30147
  backgroundColor,
30148
  textColor
30149
  } = attributes;
30150
- const colors = useSetting('color.palette') || color_EMPTY_ARRAY;
 
 
 
30151
 
30152
  if (!hasColorSupport(name) || color_shouldSkipSerialization(name)) {
30153
  return (0,external_wp_element_namespaceObject.createElement)(BlockListBlock, props);
@@ -32020,7 +32292,6 @@ function TypographyPanel(props) {
32020
  panelId: clientId
32021
  }, (0,external_wp_element_namespaceObject.createElement)(LetterSpacingEdit, props)));
32022
  }
32023
-
32024
  const hasTypographySupport = blockName => {
32025
  return TYPOGRAPHY_SUPPORT_KEYS.some(key => (0,external_wp_blocks_namespaceObject.hasBlockSupport)(blockName, key));
32026
  };
@@ -33503,6 +33774,11 @@ function useBorderProps(attributes) {
33503
  * External dependencies
33504
  */
33505
 
 
 
 
 
 
33506
  /**
33507
  * Internal dependencies
33508
  */
@@ -33517,7 +33793,6 @@ function useBorderProps(attributes) {
33517
  // block support is being skipped for a block but the color related CSS classes
33518
  // & styles still need to be generated so they can be applied to inner elements.
33519
 
33520
- const use_color_props_EMPTY_ARRAY = [];
33521
  /**
33522
  * Provides the CSS class names and inline styles for a block's color support
33523
  * attributes.
@@ -33579,8 +33854,12 @@ function useColorProps(attributes) {
33579
  textColor,
33580
  gradient
33581
  } = attributes;
33582
- const colors = useSetting('color.palette') || use_color_props_EMPTY_ARRAY;
33583
- const gradients = useSetting('color.gradients') || use_color_props_EMPTY_ARRAY;
 
 
 
 
33584
  const colorProps = getColorClassesAndStyles(attributes); // Force inline styles to apply colors when themes do not load their color
33585
  // stylesheets in the editor.
33586
 
@@ -33696,7 +33975,6 @@ function useCachedTruthy(value) {
33696
 
33697
 
33698
 
33699
- const DEFAULT_COLORS = [];
33700
  /**
33701
  * Higher order component factory for injecting the `colorsArray` argument as
33702
  * the colors prop in the `withCustomColors` HOC.
@@ -33718,9 +33996,12 @@ const withCustomColorPalette = colorsArray => (0,external_wp_compose_namespaceOb
33718
 
33719
 
33720
  const withEditorColorPalette = () => (0,external_wp_compose_namespaceObject.createHigherOrderComponent)(WrappedComponent => props => {
33721
- const colors = useSetting('color.palette') || DEFAULT_COLORS;
 
 
 
33722
  return (0,external_wp_element_namespaceObject.createElement)(WrappedComponent, _extends({}, props, {
33723
- colors: colors
33724
  }));
33725
  }, 'withEditorColorPalette');
33726
  /**
@@ -34906,6 +35187,7 @@ function ListViewExpander(_ref) {
34906
 
34907
 
34908
 
 
34909
  function ListViewBlockSelectButton(_ref, ref) {
34910
  let {
34911
  className,
@@ -34927,17 +35209,35 @@ function ListViewBlockSelectButton(_ref, ref) {
34927
  const blockInformation = useBlockDisplayInformation(clientId);
34928
  const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(ListViewBlockSelectButton);
34929
  const descriptionId = `list-view-block-select-button__${instanceId}`;
34930
- const blockPositionDescription = getBlockPositionDescription(position, siblingBlockCount, level);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34931
  return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
34932
  className: classnames_default()('block-editor-list-view-block-select-button', className),
34933
  onClick: onClick,
 
34934
  "aria-describedby": descriptionId,
34935
  ref: ref,
34936
  tabIndex: tabIndex,
34937
  onFocus: onFocus,
34938
- onDragStart: onDragStart,
34939
  onDragEnd: onDragEnd,
34940
- draggable: draggable
 
34941
  }, (0,external_wp_element_namespaceObject.createElement)(ListViewExpander, {
34942
  onClick: onToggleExpanded
34943
  }), (0,external_wp_element_namespaceObject.createElement)(block_icon, {
@@ -43906,12 +44206,14 @@ function DefaultStylePicker(_ref) {
43906
  return null;
43907
  }
43908
 
43909
- return onUpdatePreferredStyleVariations && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, {
 
 
43910
  options: selectOptions,
43911
  value: preferredStyle || '',
43912
  label: (0,external_wp_i18n_namespaceObject.__)('Default Style'),
43913
  onChange: selectOnChange
43914
- });
43915
  }
43916
  //# sourceMappingURL=index.js.map
43917
  ;// CONCATENATED MODULE: ./packages/block-editor/build-module/components/block-inspector/index.js
@@ -43940,8 +44242,7 @@ function DefaultStylePicker(_ref) {
43940
 
43941
  const BlockInspector = _ref => {
43942
  let {
43943
- showNoBlockSelectedMessage = true,
43944
- bubblesVirtually = true
43945
  } = _ref;
43946
  const {
43947
  count,
@@ -43979,9 +44280,7 @@ const BlockInspector = _ref => {
43979
  if (count > 1) {
43980
  return (0,external_wp_element_namespaceObject.createElement)("div", {
43981
  className: "block-editor-block-inspector"
43982
- }, (0,external_wp_element_namespaceObject.createElement)(multi_selection_inspector, null), (0,external_wp_element_namespaceObject.createElement)(inspector_controls.Slot, {
43983
- bubblesVirtually: bubblesVirtually
43984
- }));
43985
  }
43986
 
43987
  const isSelectedBlockUnregistered = selectedBlockName === (0,external_wp_blocks_namespaceObject.getUnregisteredTypeHandlerName)();
@@ -44003,8 +44302,7 @@ const BlockInspector = _ref => {
44003
  return (0,external_wp_element_namespaceObject.createElement)(BlockInspectorSingleBlock, {
44004
  clientId: selectedBlockClientId,
44005
  blockName: blockType.name,
44006
- hasBlockStyles: hasBlockStyles,
44007
- bubblesVirtually: bubblesVirtually
44008
  });
44009
  };
44010
 
@@ -44012,8 +44310,7 @@ const BlockInspectorSingleBlock = _ref2 => {
44012
  let {
44013
  clientId,
44014
  blockName,
44015
- hasBlockStyles,
44016
- bubblesVirtually
44017
  } = _ref2;
44018
  const blockInformation = useBlockDisplayInformation(clientId);
44019
  return (0,external_wp_element_namespaceObject.createElement)("div", {
@@ -44024,31 +44321,24 @@ const BlockInspectorSingleBlock = _ref2 => {
44024
  title: (0,external_wp_i18n_namespaceObject.__)('Styles')
44025
  }, (0,external_wp_element_namespaceObject.createElement)(block_styles, {
44026
  scope: "core/edit-post",
44027
- clientId: clientId,
44028
- className: "block-inspector__block-styles"
44029
  }), (0,external_wp_blocks_namespaceObject.hasBlockSupport)(blockName, 'defaultStylePicker', true) && (0,external_wp_element_namespaceObject.createElement)(DefaultStylePicker, {
44030
  blockName: blockName
44031
- }))), (0,external_wp_element_namespaceObject.createElement)(inspector_controls.Slot, {
44032
- bubblesVirtually: bubblesVirtually
44033
- }), (0,external_wp_element_namespaceObject.createElement)(inspector_controls.Slot, {
44034
  __experimentalGroup: "typography",
44035
- bubblesVirtually: bubblesVirtually,
44036
  label: (0,external_wp_i18n_namespaceObject.__)('Typography')
 
 
 
44037
  }), (0,external_wp_element_namespaceObject.createElement)(inspector_controls.Slot, {
44038
  __experimentalGroup: "dimensions",
44039
- bubblesVirtually: bubblesVirtually,
44040
  label: (0,external_wp_i18n_namespaceObject.__)('Dimensions')
44041
- }), (0,external_wp_element_namespaceObject.createElement)("div", null, (0,external_wp_element_namespaceObject.createElement)(AdvancedControls, {
44042
- bubblesVirtually: bubblesVirtually
44043
- })), (0,external_wp_element_namespaceObject.createElement)(skip_to_selected_block, {
44044
  key: "back"
44045
  }));
44046
  };
44047
 
44048
- const AdvancedControls = _ref3 => {
44049
- let {
44050
- bubblesVirtually
44051
- } = _ref3;
44052
  const slot = (0,external_wp_components_namespaceObject.__experimentalUseSlot)(InspectorAdvancedControls.slotName);
44053
  const hasFills = Boolean(slot.fills && slot.fills.length);
44054
 
@@ -44061,8 +44351,7 @@ const AdvancedControls = _ref3 => {
44061
  title: (0,external_wp_i18n_namespaceObject.__)('Advanced'),
44062
  initialOpen: false
44063
  }, (0,external_wp_element_namespaceObject.createElement)(inspector_controls.Slot, {
44064
- __experimentalGroup: "advanced",
44065
- bubblesVirtually: bubblesVirtually
44066
  }));
44067
  };
44068
 
@@ -44879,61 +45168,6 @@ const TypewriterOrIEBypass = isIE ? props => props.children : Typewriter;
44879
 
44880
  /* harmony default export */ var typewriter = (TypewriterOrIEBypass);
44881
  //# sourceMappingURL=index.js.map
44882
- ;// CONCATENATED MODULE: ./packages/block-editor/build-module/components/use-canvas-click-redirect/index.js
44883
- /**
44884
- * External dependencies
44885
- */
44886
-
44887
- /**
44888
- * WordPress dependencies
44889
- */
44890
-
44891
-
44892
-
44893
- /**
44894
- * Given an element, returns true if the element is a tabbable text field, or
44895
- * false otherwise.
44896
- *
44897
- * @param {Element} element Element to test.
44898
- *
44899
- * @return {boolean} Whether element is a tabbable text field.
44900
- */
44901
-
44902
- const isTabbableTextField = (0,external_lodash_namespaceObject.overEvery)([external_wp_dom_namespaceObject.isTextField, external_wp_dom_namespaceObject.focus.tabbable.isTabbableIndex]);
44903
- function useCanvasClickRedirect() {
44904
- return (0,external_wp_compose_namespaceObject.useRefEffect)(node => {
44905
- function onMouseDown(event) {
44906
- // Only handle clicks on the canvas, not the content.
44907
- if (event.target !== node) {
44908
- return;
44909
- }
44910
-
44911
- const focusableNodes = external_wp_dom_namespaceObject.focus.focusable.find(node);
44912
- const target = (0,external_lodash_namespaceObject.findLast)(focusableNodes, isTabbableTextField);
44913
-
44914
- if (!target) {
44915
- return;
44916
- }
44917
-
44918
- const {
44919
- bottom
44920
- } = target.getBoundingClientRect(); // Ensure the click is below the last block.
44921
-
44922
- if (event.clientY < bottom) {
44923
- return;
44924
- }
44925
-
44926
- (0,external_wp_dom_namespaceObject.placeCaretAtHorizontalEdge)(target, true);
44927
- event.preventDefault();
44928
- }
44929
-
44930
- node.addEventListener('mousedown', onMouseDown);
44931
- return () => {
44932
- node.addEventListener('mousedown', onMouseDown);
44933
- };
44934
- }, []);
44935
- }
44936
- //# sourceMappingURL=index.js.map
44937
  ;// CONCATENATED MODULE: ./packages/block-editor/build-module/components/use-no-recursive-renders/index.js
44938
 
44939
 
@@ -45089,7 +45323,6 @@ function useNoRecursiveRenders(uniqueId) {
45089
 
45090
 
45091
 
45092
-
45093
 
45094
 
45095
 
2254
  "__unstableInserterMenuExtension": function() { return /* reexport */ inserter_menu_extension; },
2255
  "__unstableRichTextInputEvent": function() { return /* reexport */ __unstableRichTextInputEvent; },
2256
  "__unstableUseBlockSelectionClearer": function() { return /* reexport */ useBlockSelectionClearer; },
 
2257
  "__unstableUseClipboardHandler": function() { return /* reexport */ useClipboardHandler; },
2258
  "__unstableUseMouseMoveTypingReset": function() { return /* reexport */ useMouseMoveTypingReset; },
2259
  "__unstableUseTypewriter": function() { return /* reexport */ useTypewriter; },
6349
  };
6350
 
6351
  const blockTypeInserterItems = (0,external_wp_blocks_namespaceObject.getBlockTypes)().filter(blockType => canIncludeBlockTypeInInserter(state, blockType, rootClientId)).map(buildBlockTypeInserterItem);
6352
+ const reusableBlockInserterItems = canInsertBlockTypeUnmemoized(state, 'core/block', rootClientId) ? getReusableBlocks(state).map(buildReusableBlockInserterItem) : [];
6353
+ const items = blockTypeInserterItems.reduce((accumulator, item) => {
6354
+ const {
 
 
6355
  variations = []
6356
+ } = item; // Exclude any block type item that is to be replaced by a default variation
6357
+
6358
+ if (!variations.some(_ref4 => {
6359
  let {
6360
  isDefault
6361
+ } = _ref4;
6362
  return isDefault;
6363
+ })) {
6364
+ accumulator.push(item);
6365
+ }
 
 
 
 
 
6366
 
6367
  if (variations.length) {
6368
  const variationMapper = getItemFromVariation(state, item);
6369
+ accumulator.push(...variations.map(variationMapper));
6370
  }
6371
+
6372
+ return accumulator;
6373
+ }, []); // Ensure core blocks are prioritized in the returned results,
6374
  // because third party blocks can be registered earlier than
6375
  // the core blocks (usually by using the `init` action),
6376
  // thus affecting the display order.
6377
  // We don't sort reusable blocks as they are handled differently.
6378
 
 
6379
  const groupByType = (blocks, block) => {
6380
  const {
6381
  core,
6386
  return blocks;
6387
  };
6388
 
6389
+ const {
6390
+ core: coreItems,
6391
+ noncore: nonCoreItems
6392
+ } = items.reduce(groupByType, {
 
6393
  core: [],
6394
  noncore: []
6395
  });
6396
+ const sortedBlockTypes = [...coreItems, ...nonCoreItems];
6397
  return [...sortedBlockTypes, ...reusableBlockInserterItems];
6398
  }, (state, rootClientId) => [state.blockListSettings[rootClientId], state.blocks.byClientId, state.blocks.order, state.preferences.insertUsage, state.settings.allowedBlockTypes, state.settings.templateLock, getReusableBlocks(state), (0,external_wp_blocks_namespaceObject.getBlockTypes)()]);
6399
  /**
6428
  buildScope: 'transform'
6429
  });
6430
  const blockTypeTransformItems = (0,external_wp_blocks_namespaceObject.getBlockTypes)().filter(blockType => canIncludeBlockTypeInInserter(state, blockType, rootClientId)).map(buildBlockTypeTransformItem);
6431
+ const itemsByName = (0,external_lodash_namespaceObject.mapKeys)(blockTypeTransformItems, _ref5 => {
6432
  let {
6433
  name
6434
+ } = _ref5;
6435
  return name;
6436
  });
6437
  const possibleTransforms = (0,external_wp_blocks_namespaceObject.getPossibleBlockTransformations)(blocks).reduce((accumulator, block) => {
6541
 
6542
  const __experimentalGetParsedPattern = rememo((state, patternName) => {
6543
  const patterns = state.settings.__experimentalBlockPatterns;
6544
+ const pattern = patterns.find(_ref6 => {
6545
  let {
6546
  name
6547
+ } = _ref6;
6548
  return name === patternName;
6549
  });
6550
 
6561
  const {
6562
  allowedBlockTypes
6563
  } = getSettings(state);
6564
+ const parsedPatterns = patterns.filter(_ref7 => {
6565
  let {
6566
  inserter = true
6567
+ } = _ref7;
6568
  return !!inserter;
6569
+ }).map(_ref8 => {
6570
  let {
6571
  name
6572
+ } = _ref8;
6573
  return __experimentalGetParsedPattern(state, name);
6574
  });
6575
+ const allowedPatterns = parsedPatterns.filter(_ref9 => {
6576
  let {
6577
  blocks
6578
+ } = _ref9;
6579
  return checkAllowListRecursive(blocks, allowedBlockTypes);
6580
  });
6581
  return allowedPatterns;
6592
  const __experimentalGetAllowedPatterns = rememo(function (state) {
6593
  let rootClientId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
6594
  const availableParsedPatterns = getAllAllowedPatterns(state);
6595
+ const patternsAllowed = (0,external_lodash_namespaceObject.filter)(availableParsedPatterns, _ref10 => {
6596
  let {
6597
  blocks
6598
+ } = _ref10;
6599
+ return blocks.every(_ref11 => {
6600
  let {
6601
  name
6602
+ } = _ref11;
6603
  return canInsertBlockType(state, name, rootClientId);
6604
  });
6605
  });
6661
  * to check for this case too.
6662
  */
6663
 
6664
+ if (blocks.some(_ref12 => {
6665
  let {
6666
  clientId,
6667
  innerBlocks
6668
+ } = _ref12;
6669
  return innerBlocks.length || areInnerBlocksControlled(state, clientId);
6670
  })) {
6671
  return EMPTY_ARRAY;
6672
  } // Create a Set of the selected block names that is used in patterns filtering.
6673
 
6674
 
6675
+ const selectedBlockNames = Array.from(new Set(blocks.map(_ref13 => {
6676
  let {
6677
  name
6678
+ } = _ref13;
6679
  return name;
6680
  })));
6681
  /**
8758
  if (external_wp_blocks_namespaceObject.__EXPERIMENTAL_PATHS_WITH_MERGE[normalizedPath]) {
8759
  var _ref, _experimentalFeatures;
8760
 
8761
+ return (_ref = (_experimentalFeatures = experimentalFeaturesResult.custom) !== null && _experimentalFeatures !== void 0 ? _experimentalFeatures : experimentalFeaturesResult.theme) !== null && _ref !== void 0 ? _ref : experimentalFeaturesResult.default;
8762
  }
8763
 
8764
  return experimentalFeaturesResult;
9966
 
9967
  const InspectorControlsDefault = (0,external_wp_components_namespaceObject.createSlotFill)('InspectorControls');
9968
  const InspectorControlsAdvanced = (0,external_wp_components_namespaceObject.createSlotFill)('InspectorAdvancedControls');
9969
+ const InspectorControlsBorder = (0,external_wp_components_namespaceObject.createSlotFill)('InspectorControlsBorder');
9970
  const InspectorControlsDimensions = (0,external_wp_components_namespaceObject.createSlotFill)('InspectorControlsDimensions');
9971
  const InspectorControlsTypography = (0,external_wp_components_namespaceObject.createSlotFill)('InspectorControlsTypography');
9972
  const groups_groups = {
9973
  default: InspectorControlsDefault,
9974
  advanced: InspectorControlsAdvanced,
9975
+ border: InspectorControlsBorder,
9976
  dimensions: InspectorControlsDimensions,
9977
  typography: InspectorControlsTypography
9978
  };
10137
  } = _ref;
10138
  const toolsPanelContext = (0,external_wp_element_namespaceObject.useContext)(external_wp_components_namespaceObject.__experimentalToolsPanelContext);
10139
  return (0,external_wp_element_namespaceObject.createElement)(Slot, _extends({}, props, {
10140
+ fillProps: toolsPanelContext,
10141
+ bubblesVirtually: true
10142
  }));
10143
  }
10144
  //# sourceMappingURL=block-support-slot-container.js.map
10163
 
10164
  let {
10165
  __experimentalGroup: group = 'default',
 
10166
  label,
10167
  ...props
10168
  } = _ref;
10185
  group: group,
10186
  label: label
10187
  }, (0,external_wp_element_namespaceObject.createElement)(BlockSupportSlotContainer, _extends({}, props, {
 
10188
  Slot: Slot
10189
  })));
10190
  }
10191
 
10192
  return (0,external_wp_element_namespaceObject.createElement)(Slot, _extends({}, props, {
10193
+ bubblesVirtually: true
10194
  }));
10195
  }
10196
  //# sourceMappingURL=slot.js.map
17276
 
17277
 
17278
 
 
17279
  function use_multi_selection_toggleRichText(container, toggle) {
17280
+ Array.from(container.querySelectorAll( // Exclude the Post Title from multi-select disable.
17281
+ '.rich-text:not( .editor-post-title__input )')).forEach(node => {
17282
  if (toggle) {
17283
  node.setAttribute('contenteditable', true);
17284
  } else {
17294
  * @param {string} type 'start' or 'end'.
17295
  */
17296
 
 
17297
  function getDeepestNode(node, type) {
17298
  const child = type === 'start' ? 'firstChild' : 'lastChild';
17299
  const sibling = type === 'start' ? 'nextSibling' : 'previousSibling';
19846
  documentElement
19847
  }
19848
  } = bodyElement;
19849
+ documentElement.classList.add('block-editor-block-preview__content-iframe');
19850
  documentElement.style.position = 'absolute';
19851
  documentElement.style.width = '100%';
19852
  bodyElement.style.padding = __experimentalPadding + 'px';
22429
  function DefaultBlockAppender(_ref) {
22430
  let {
22431
  isLocked,
 
22432
  onAppend,
22433
  showPrompt,
22434
  placeholder,
22435
  rootClientId
22436
  } = _ref;
22437
 
22438
+ if (isLocked) {
22439
  return null;
22440
  }
22441
 
22447
  'has-visible-prompt': showPrompt
22448
  })
22449
  }, (0,external_wp_element_namespaceObject.createElement)("p", {
22450
+ tabIndex: "0" // We want this element to be styled as a paragraph by themes.
 
 
 
 
 
 
 
22451
  // eslint-disable-next-line jsx-a11y/no-noninteractive-element-to-interactive-role
22452
  ,
22453
  role: "button",
22454
+ "aria-label": (0,external_wp_i18n_namespaceObject.__)('Add default block') // A wrapping container for this one already has the wp-block className.
22455
  ,
22456
  className: "block-editor-default-block-appender__content",
22457
+ onKeyDown: event => {
22458
+ if (external_wp_keycodes_namespaceObject.ENTER === event.keyCode || external_wp_keycodes_namespaceObject.SPACE === event.keyCode) {
22459
+ onAppend();
22460
+ }
22461
+ },
22462
+ onClick: () => onAppend(),
22463
+ onFocus: () => {
22464
+ if (showPrompt) {
22465
+ onAppend();
22466
+ }
22467
+ }
22468
  }, showPrompt ? value : ZWNBSP), (0,external_wp_element_namespaceObject.createElement)(inserter, {
22469
  rootClientId: rootClientId,
22470
  position: "bottom right",
22475
  /* harmony default export */ var default_block_appender = ((0,external_wp_compose_namespaceObject.compose)((0,external_wp_data_namespaceObject.withSelect)((select, ownProps) => {
22476
  const {
22477
  getBlockCount,
 
 
22478
  getSettings,
22479
  getTemplateLock
22480
  } = select(store);
22481
  const isEmpty = !getBlockCount(ownProps.rootClientId);
 
 
22482
  const {
22483
  bodyPlaceholder
22484
  } = getSettings();
22485
  return {
 
22486
  showPrompt: isEmpty,
22487
  isLocked: !!getTemplateLock(ownProps.rootClientId),
22488
  placeholder: bodyPlaceholder
22608
  * External dependencies
22609
  */
22610
 
 
22611
  /**
22612
  * WordPress dependencies
22613
  */
22624
 
22625
  function BlockListAppender(_ref) {
22626
  let {
 
22627
  rootClientId,
22628
  canInsertDefaultBlock,
22629
  isLocked,
22643
  // Prefer custom render prop if provided.
22644
  appender = (0,external_wp_element_namespaceObject.createElement)(CustomAppender, null);
22645
  } else {
22646
+ const isParentSelected = selectedBlockClientId === rootClientId || !rootClientId && !selectedBlockClientId;
 
 
22647
 
22648
+ if (!isParentSelected) {
22649
  return null;
22650
  }
22651
 
22653
  // Render the default block appender when renderAppender has not been
22654
  // provided and the context supports use of the default appender.
22655
  appender = (0,external_wp_element_namespaceObject.createElement)(default_block_appender, {
22656
+ rootClientId: rootClientId
 
22657
  });
22658
  } else {
22659
  // Fallback in the case no renderAppender has been provided and the
22692
  rootClientId
22693
  } = _ref2;
22694
  const {
 
22695
  canInsertBlockType,
22696
  getTemplateLock,
22697
  getSelectedBlockClientId
22698
  } = select(store);
22699
  return {
22700
  isLocked: !!getTemplateLock(rootClientId),
 
22701
  canInsertDefaultBlock: canInsertBlockType((0,external_wp_blocks_namespaceObject.getDefaultBlockName)(), rootClientId),
22702
  selectedBlockClientId: getSelectedBlockClientId()
22703
  };
22774
  __unstableContentRef
22775
  } = _ref;
22776
  const {
22777
+ selectBlock,
22778
+ hideInsertionPoint
22779
  } = (0,external_wp_data_namespaceObject.useDispatch)(store);
22780
  const openRef = (0,external_wp_element_namespaceObject.useContext)(InsertionPointOpenRef);
22781
  const ref = (0,external_wp_element_namespaceObject.useRef)();
22916
  if (event.target !== ref.current) {
22917
  openRef.current = true;
22918
  }
22919
+ }
22920
+
22921
+ function maybeHideInserterPoint(event) {
22922
+ // Only hide the inserter if it's triggered on the wrapper,
22923
+ // and the inserter is not open.
22924
+ if (event.target === ref.current && !openRef.current) {
22925
+ hideInsertionPoint();
22926
+ }
22927
  } // Only show the in-between inserter between blocks, so when there's a
22928
  // previous and a next element.
22929
 
23038
  className: classnames_default()(className, {
23039
  'is-with-inserter': showInsertionPointInserter
23040
  }),
23041
+ onHoverEnd: maybeHideInserterPoint,
23042
  style: style
23043
  }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__unstableMotion.div, {
23044
  variants: lineVariants,
23724
  getSelectedBlockClientId,
23725
  getMultiSelectedBlocksEndClientId,
23726
  getPreviousBlockClientId,
23727
+ getNextBlockClientId,
23728
+ isNavigationMode
23729
  } = (0,external_wp_data_namespaceObject.useSelect)(store);
23730
  const {
23731
  selectBlock,
23782
 
23783
  const startingBlockClientId = hasBlockMovingClientId();
23784
 
23785
+ if (isEscape && isNavigationMode()) {
23786
+ clearSelectedBlock();
23787
+ event.preventDefault();
23788
+ }
23789
+
23790
  if (isEscape && startingBlockClientId && !event.defaultPrevented) {
23791
  setBlockMovingClientId(null);
23792
  event.preventDefault();
27216
 
27217
  const default_block_appender_DefaultBlockAppender = _ref => {
27218
  let {
27219
+ clientId
 
27220
  } = _ref;
27221
  return (0,external_wp_element_namespaceObject.createElement)(default_block_appender, {
27222
+ rootClientId: clientId
 
27223
  });
27224
  };
27225
  /* harmony default export */ var inner_blocks_default_block_appender = ((0,external_wp_compose_namespaceObject.compose)([with_client_id, (0,external_wp_data_namespaceObject.withSelect)((select, _ref2) => {
28199
  disableCustomColors,
28200
  disableCustomGradients,
28201
  __experimentalHasMultipleOrigins,
28202
+ __experimentalIsRenderedInSidebar,
28203
  className,
28204
  label,
28205
  onColorChange,
28207
  colorValue,
28208
  gradientValue,
28209
  clearable,
28210
+ showTitle = true,
28211
+ enableAlpha
28212
  } = _ref;
28213
  const canChooseAColor = onColorChange && (!(0,external_lodash_namespaceObject.isEmpty)(colors) || !disableCustomColors);
28214
  const canChooseAGradient = onGradientChange && (!(0,external_lodash_namespaceObject.isEmpty)(gradients) || !disableCustomGradients);
28245
  colors,
28246
  disableCustomColors,
28247
  __experimentalHasMultipleOrigins: __experimentalHasMultipleOrigins,
28248
+ __experimentalIsRenderedInSidebar: __experimentalIsRenderedInSidebar,
28249
+ clearable: clearable,
28250
+ enableAlpha: enableAlpha
28251
  }), (currentTab === 'gradient' || !canChooseAColor) && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.GradientPicker, {
28252
  value: gradientValue,
28253
  onChange: canChooseAColor ? newGradient => {
28280
 
28281
  /* harmony default export */ var control = (ColorGradientControl);
28282
  //# sourceMappingURL=control.js.map
28283
+ ;// CONCATENATED MODULE: ./packages/block-editor/build-module/components/colors-gradients/use-common-single-multiple-selects.js
28284
+ /**
28285
+ * Internal dependencies
28286
+ */
28287
+
28288
+ function useCommonSingleMultipleSelects() {
28289
+ return {
28290
+ disableCustomColors: !useSetting('color.custom'),
28291
+ disableCustomGradients: !useSetting('color.customGradient')
28292
+ };
28293
+ }
28294
+ //# sourceMappingURL=use-common-single-multiple-selects.js.map
28295
+ ;// CONCATENATED MODULE: ./packages/block-editor/build-module/components/colors-gradients/use-multiple-origin-colors-and-gradients.js
28296
+ /**
28297
+ * WordPress dependencies
28298
+ */
28299
+
28300
+
28301
+ /**
28302
+ * Internal dependencies
28303
+ */
28304
+
28305
+
28306
+
28307
+ /**
28308
+ * Retrieves color and gradient related settings.
28309
+ *
28310
+ * The arrays for colors and gradients are made up of color palettes from each
28311
+ * origin i.e. "Core", "Theme", and "User".
28312
+ *
28313
+ * @return {Object} Color and gradient related settings.
28314
+ */
28315
+
28316
+ function useMultipleOriginColorsAndGradients() {
28317
+ const colorGradientSettings = useCommonSingleMultipleSelects();
28318
+ const customColors = useSetting('color.palette.custom');
28319
+ const themeColors = useSetting('color.palette.theme');
28320
+ const defaultColors = useSetting('color.palette.default');
28321
+ const shouldDisplayDefaultColors = useSetting('color.defaultPalette');
28322
+ colorGradientSettings.colors = (0,external_wp_element_namespaceObject.useMemo)(() => {
28323
+ const result = [];
28324
+
28325
+ if (themeColors && themeColors.length) {
28326
+ result.push({
28327
+ name: (0,external_wp_i18n_namespaceObject._x)('Theme', 'Indicates this palette comes from the theme.'),
28328
+ colors: themeColors
28329
+ });
28330
+ }
28331
+
28332
+ if (shouldDisplayDefaultColors && defaultColors && defaultColors.length) {
28333
+ result.push({
28334
+ name: (0,external_wp_i18n_namespaceObject._x)('Default', 'Indicates this palette comes from WordPress.'),
28335
+ colors: defaultColors
28336
+ });
28337
+ }
28338
+
28339
+ if (customColors && customColors.length) {
28340
+ result.push({
28341
+ name: (0,external_wp_i18n_namespaceObject._x)('Custom', 'Indicates this palette comes from the theme.'),
28342
+ colors: customColors
28343
+ });
28344
+ }
28345
+
28346
+ return result;
28347
+ }, [defaultColors, themeColors, customColors]);
28348
+ const customGradients = useSetting('color.gradients.custom');
28349
+ const themeGradients = useSetting('color.gradients.theme');
28350
+ const defaultGradients = useSetting('color.gradients.default');
28351
+ const shouldDisplayDefaultGradients = useSetting('color.defaultGradients');
28352
+ colorGradientSettings.gradients = (0,external_wp_element_namespaceObject.useMemo)(() => {
28353
+ const result = [];
28354
+
28355
+ if (themeGradients && themeGradients.length) {
28356
+ result.push({
28357
+ name: (0,external_wp_i18n_namespaceObject._x)('Theme', 'Indicates this palette comes from the theme.'),
28358
+ gradients: themeGradients
28359
+ });
28360
+ }
28361
+
28362
+ if (shouldDisplayDefaultGradients && defaultGradients && defaultGradients.length) {
28363
+ result.push({
28364
+ name: (0,external_wp_i18n_namespaceObject._x)('Default', 'Indicates this palette comes from WordPress.'),
28365
+ gradients: defaultGradients
28366
+ });
28367
+ }
28368
+
28369
+ if (customGradients && customGradients.length) {
28370
+ result.push({
28371
+ name: (0,external_wp_i18n_namespaceObject._x)('Custom', 'Indicates this palette is created by the user.'),
28372
+ gradients: customGradients
28373
+ });
28374
+ }
28375
+
28376
+ return result;
28377
+ }, [customGradients, themeGradients, defaultGradients]);
28378
+ return colorGradientSettings;
28379
+ }
28380
+ //# sourceMappingURL=use-multiple-origin-colors-and-gradients.js.map
28381
  ;// CONCATENATED MODULE: ./packages/block-editor/build-module/components/colors/utils.js
28382
  /**
28383
  * External dependencies
28490
 
28491
 
28492
 
28493
+
28494
  // Defining empty array here instead of inline avoids unnecessary re-renders of
28495
  // color control.
28496
 
28517
  },
28518
  setAttributes
28519
  } = props;
28520
+ const colorGradientSettings = useMultipleOriginColorsAndGradients();
28521
+ const availableColors = colorGradientSettings.colors.reduce((colors, origin) => colors.concat(origin.colors), []);
 
28522
  const [colorValue, setColorValue] = (0,external_wp_element_namespaceObject.useState)(() => {
28523
  var _getColorObjectByAttr, _style$border;
28524
 
28525
+ return (_getColorObjectByAttr = getColorObjectByAttributeValues(availableColors, borderColor, style === null || style === void 0 ? void 0 : (_style$border = style.border) === null || _style$border === void 0 ? void 0 : _style$border.color)) === null || _getColorObjectByAttr === void 0 ? void 0 : _getColorObjectByAttr.color;
28526
  });
28527
 
28528
  const onChangeColor = value => {
28529
  setColorValue(value);
28530
+ const colorObject = getColorObjectByColorValue(availableColors, value);
28531
  const newStyle = { ...style,
28532
  border: { ...(style === null || style === void 0 ? void 0 : style.border),
28533
  color: colorObject !== null && colorObject !== void 0 && colorObject.slug ? undefined : value
28541
  });
28542
  };
28543
 
28544
+ return (0,external_wp_element_namespaceObject.createElement)(control, _extends({
28545
  label: (0,external_wp_i18n_namespaceObject.__)('Color'),
28546
  colorValue: colorValue,
28547
+ onColorChange: onChangeColor,
28548
+ clearable: false,
28549
+ __experimentalHasMultipleOrigins: true,
28550
+ __experimentalIsRenderedInSidebar: true
28551
+ }, colorGradientSettings));
28552
+ }
28553
+ /**
28554
+ * Checks if there is a current value in the border color block support
28555
+ * attributes.
28556
+ *
28557
+ * @param {Object} props Block props.
28558
+ * @return {boolean} Whether or not the block has a border color value set.
28559
+ */
28560
+
28561
+ function hasBorderColorValue(props) {
28562
+ var _style$border2;
28563
+
28564
+ const {
28565
+ attributes: {
28566
+ borderColor,
28567
+ style
28568
+ }
28569
+ } = props;
28570
+ return !!borderColor || !!(style !== null && style !== void 0 && (_style$border2 = style.border) !== null && _style$border2 !== void 0 && _style$border2.color);
28571
+ }
28572
+ /**
28573
+ * Resets the border color block support attributes. This can be used when
28574
+ * disabling the border color support controls for a block via a progressive
28575
+ * discovery panel.
28576
+ *
28577
+ * @param {Object} props Block props.
28578
+ * @param {Object} props.attributes Block's attributes.
28579
+ * @param {Object} props.setAttributes Function to set block's attributes.
28580
+ */
28581
+
28582
+ function resetBorderColor(_ref) {
28583
+ let {
28584
+ attributes = {},
28585
+ setAttributes
28586
+ } = _ref;
28587
+ const {
28588
+ style
28589
+ } = attributes;
28590
+ setAttributes({
28591
+ borderColor: undefined,
28592
+ style: removeBorderAttribute(style, 'color')
28593
  });
28594
  }
28595
  /**
28632
 
28633
 
28634
  function border_color_addSaveProps(props, blockType, attributes) {
28635
+ var _style$border3;
28636
 
28637
  if (!hasBorderSupport(blockType, 'color') || shouldSkipSerialization(blockType)) {
28638
  return props;
28644
  } = attributes;
28645
  const borderColorClass = getColorClassName('border-color', borderColor);
28646
  const newClassName = classnames_default()(props.className, {
28647
+ 'has-border-color': borderColor || (style === null || style === void 0 ? void 0 : (_style$border3 = style.border) === null || _style$border3 === void 0 ? void 0 : _style$border3.color),
28648
  [borderColorClass]: !!borderColorClass
28649
  }); // If we are clearing the last of the previous classes in `className`
28650
  // set it to `undefined` to avoid rendering empty DOM attributes.
29080
  */
29081
 
29082
 
29083
+
29084
  /**
29085
  * Inspector control panel containing the border radius related configuration.
29086
  *
29120
  onChange: onChange
29121
  });
29122
  }
29123
+ /**
29124
+ * Checks if there is a current value in the border radius block support
29125
+ * attributes.
29126
+ *
29127
+ * @param {Object} props Block props.
29128
+ * @return {boolean} Whether or not the block has a border radius value set.
29129
+ */
29130
+
29131
+ function hasBorderRadiusValue(props) {
29132
+ var _props$attributes$sty, _props$attributes$sty2;
29133
+
29134
+ const borderRadius = (_props$attributes$sty = props.attributes.style) === null || _props$attributes$sty === void 0 ? void 0 : (_props$attributes$sty2 = _props$attributes$sty.border) === null || _props$attributes$sty2 === void 0 ? void 0 : _props$attributes$sty2.radius;
29135
+
29136
+ if (typeof borderRadius === 'object') {
29137
+ return Object.entries(borderRadius).some(Boolean);
29138
+ }
29139
+
29140
+ return !!borderRadius;
29141
+ }
29142
+ /**
29143
+ * Resets the border radius block support attributes. This can be used when
29144
+ * disabling the border radius support controls for a block via a progressive
29145
+ * discovery panel.
29146
+ *
29147
+ * @param {Object} props Block props.
29148
+ * @param {Object} props.attributes Block's attributes.
29149
+ * @param {Object} props.setAttributes Function to set block's attributes.
29150
+ */
29151
+
29152
+ function resetBorderRadius(_ref) {
29153
+ let {
29154
+ attributes = {},
29155
+ setAttributes
29156
+ } = _ref;
29157
+ const {
29158
+ style
29159
+ } = attributes;
29160
+ setAttributes({
29161
+ style: removeBorderAttribute(style, 'radius')
29162
+ });
29163
+ }
29164
  //# sourceMappingURL=border-radius.js.map
29165
  ;// CONCATENATED MODULE: ./packages/icons/build-module/library/line-solid.js
29166
 
29276
  */
29277
 
29278
 
29279
+
29280
  /**
29281
  * Inspector control for configuring border style property.
29282
  *
29311
  onChange: onChange
29312
  });
29313
  };
29314
+ /**
29315
+ * Checks if there is a current value in the border style block support
29316
+ * attributes.
29317
+ *
29318
+ * @param {Object} props Block props.
29319
+ * @return {boolean} Whether or not the block has a border style value set.
29320
+ */
29321
+
29322
+ function hasBorderStyleValue(props) {
29323
+ var _props$attributes$sty, _props$attributes$sty2;
29324
+
29325
+ return !!((_props$attributes$sty = props.attributes.style) !== null && _props$attributes$sty !== void 0 && (_props$attributes$sty2 = _props$attributes$sty.border) !== null && _props$attributes$sty2 !== void 0 && _props$attributes$sty2.style);
29326
+ }
29327
+ /**
29328
+ * Resets the border style block support attribute. This can be used when
29329
+ * disabling the border style support control for a block via a progressive
29330
+ * discovery panel.
29331
+ *
29332
+ * @param {Object} props Block props.
29333
+ * @param {Object} props.attributes Block's attributes.
29334
+ * @param {Object} props.setAttributes Function to set block's attributes.
29335
+ */
29336
+
29337
+ function resetBorderStyle(_ref) {
29338
+ let {
29339
+ attributes = {},
29340
+ setAttributes
29341
+ } = _ref;
29342
+ const {
29343
+ style
29344
+ } = attributes;
29345
+ setAttributes({
29346
+ style: removeBorderAttribute(style, 'style')
29347
+ });
29348
+ }
29349
  //# sourceMappingURL=border-style.js.map
29350
  ;// CONCATENATED MODULE: ./packages/block-editor/build-module/hooks/border-width.js
29351
 
29362
 
29363
 
29364
 
29365
+
29366
  const MIN_BORDER_WIDTH = 0;
29367
  /**
29368
  * Inspector control for configuring border width property.
29457
  units: units
29458
  });
29459
  };
29460
+ /**
29461
+ * Checks if there is a current value in the border width block support
29462
+ * attributes.
29463
+ *
29464
+ * @param {Object} props Block props.
29465
+ * @return {boolean} Whether or not the block has a border width value set.
29466
+ */
29467
+
29468
+ function hasBorderWidthValue(props) {
29469
+ var _props$attributes$sty, _props$attributes$sty2;
29470
+
29471
+ return !!((_props$attributes$sty = props.attributes.style) !== null && _props$attributes$sty !== void 0 && (_props$attributes$sty2 = _props$attributes$sty.border) !== null && _props$attributes$sty2 !== void 0 && _props$attributes$sty2.width);
29472
+ }
29473
+ /**
29474
+ * Resets the border width block support attribute. This can be used when
29475
+ * disabling the border width support control for a block via a progressive
29476
+ * discovery panel.
29477
+ *
29478
+ * @param {Object} props Block props.
29479
+ * @param {Object} props.attributes Block's attributes.
29480
+ * @param {Object} props.setAttributes Function to set block's attributes.
29481
+ */
29482
+
29483
+ function resetBorderWidth(_ref) {
29484
+ let {
29485
+ attributes = {},
29486
+ setAttributes
29487
+ } = _ref;
29488
+ const {
29489
+ style
29490
+ } = attributes;
29491
+ setAttributes({
29492
+ style: removeBorderAttribute(style, 'width')
29493
+ });
29494
+ }
29495
  //# sourceMappingURL=border-width.js.map
29496
  ;// CONCATENATED MODULE: ./packages/block-editor/build-module/hooks/border.js
29497
 
29513
 
29514
 
29515
 
29516
+
29517
  const BORDER_SUPPORT_KEY = '__experimentalBorder';
29518
  function BorderPanel(props) {
29519
+ const {
29520
+ clientId
29521
+ } = props;
29522
  const isDisabled = useIsBorderDisabled(props);
29523
  const isSupported = hasBorderSupport(props.name);
29524
  const isColorSupported = useSetting('border.color') && hasBorderSupport(props.name, 'color');
29530
  return null;
29531
  }
29532
 
29533
+ const defaultBorderControls = (0,external_wp_blocks_namespaceObject.getBlockSupport)(props.name, [BORDER_SUPPORT_KEY, '__experimentalDefaultControls']);
29534
+
29535
+ const createResetAllFilter = function (borderAttribute) {
29536
+ let topLevelAttributes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
29537
+ return newAttributes => {
29538
+ var _newAttributes$style;
29539
+
29540
+ return { ...newAttributes,
29541
+ ...topLevelAttributes,
29542
+ style: { ...newAttributes.style,
29543
+ border: { ...((_newAttributes$style = newAttributes.style) === null || _newAttributes$style === void 0 ? void 0 : _newAttributes$style.border),
29544
+ [borderAttribute]: undefined
29545
+ }
29546
+ }
29547
+ };
29548
+ };
29549
+ };
29550
+
29551
+ return (0,external_wp_element_namespaceObject.createElement)(inspector_controls, {
29552
+ __experimentalGroup: "border"
29553
+ }, isWidthSupported && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
29554
+ className: "single-column",
29555
+ hasValue: () => hasBorderWidthValue(props),
29556
+ label: (0,external_wp_i18n_namespaceObject.__)('Width'),
29557
+ onDeselect: () => resetBorderWidth(props),
29558
+ isShownByDefault: defaultBorderControls === null || defaultBorderControls === void 0 ? void 0 : defaultBorderControls.width,
29559
+ resetAllFilter: createResetAllFilter('width'),
29560
+ panelId: clientId
29561
+ }, (0,external_wp_element_namespaceObject.createElement)(BorderWidthEdit, props)), isStyleSupported && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
29562
+ className: "single-column",
29563
+ hasValue: () => hasBorderStyleValue(props),
29564
+ label: (0,external_wp_i18n_namespaceObject.__)('Style'),
29565
+ onDeselect: () => resetBorderStyle(props),
29566
+ isShownByDefault: defaultBorderControls === null || defaultBorderControls === void 0 ? void 0 : defaultBorderControls.style,
29567
+ resetAllFilter: createResetAllFilter('style'),
29568
+ panelId: clientId
29569
+ }, (0,external_wp_element_namespaceObject.createElement)(BorderStyleEdit, props)), isColorSupported && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
29570
+ hasValue: () => hasBorderColorValue(props),
29571
+ label: (0,external_wp_i18n_namespaceObject.__)('Color'),
29572
+ onDeselect: () => resetBorderColor(props),
29573
+ isShownByDefault: defaultBorderControls === null || defaultBorderControls === void 0 ? void 0 : defaultBorderControls.color,
29574
+ resetAllFilter: createResetAllFilter('color', {
29575
+ borderColor: undefined
29576
+ }),
29577
+ panelId: clientId
29578
+ }, (0,external_wp_element_namespaceObject.createElement)(BorderColorEdit, props)), isRadiusSupported && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
29579
+ hasValue: () => hasBorderRadiusValue(props),
29580
+ label: (0,external_wp_i18n_namespaceObject.__)('Radius'),
29581
+ onDeselect: () => resetBorderRadius(props),
29582
+ isShownByDefault: defaultBorderControls === null || defaultBorderControls === void 0 ? void 0 : defaultBorderControls.radius,
29583
+ resetAllFilter: createResetAllFilter('radius'),
29584
+ panelId: clientId
29585
+ }, (0,external_wp_element_namespaceObject.createElement)(BorderRadiusEdit, props)));
29586
  }
29587
  /**
29588
  * Determine whether there is block support for border properties.
29634
  const configs = [!useSetting('border.color'), !useSetting('border.radius'), !useSetting('border.style'), !useSetting('border.width')];
29635
  return configs.every(Boolean);
29636
  };
29637
+ /**
29638
+ * Returns a new style object where the specified border attribute has been
29639
+ * removed.
29640
+ *
29641
+ * @param {Object} style Styles from block attributes.
29642
+ * @param {string} attribute The border style attribute to clear.
29643
+ *
29644
+ * @return {Object} Style object with the specified attribute removed.
29645
+ */
29646
+
29647
+
29648
+ function removeBorderAttribute(style, attribute) {
29649
+ return cleanEmptyObject({ ...style,
29650
+ border: { ...(style === null || style === void 0 ? void 0 : style.border),
29651
+ [attribute]: undefined
29652
+ }
29653
+ });
29654
+ }
29655
  //# sourceMappingURL=border.js.map
29656
  ;// CONCATENATED MODULE: ./packages/block-editor/build-module/components/gradients/use-gradient.js
29657
  /**
29671
 
29672
 
29673
 
 
29674
  function __experimentalGetGradientClass(gradientSlug) {
29675
  if (!gradientSlug) {
29676
  return undefined;
29716
  const {
29717
  clientId
29718
  } = useBlockEditContext();
29719
+ const {
29720
+ gradients: gradientsPerOrigin
29721
+ } = useSetting('color') || {};
29722
+ const allGradients = (0,external_wp_element_namespaceObject.useMemo)(() => [...((gradientsPerOrigin === null || gradientsPerOrigin === void 0 ? void 0 : gradientsPerOrigin.custom) || []), ...((gradientsPerOrigin === null || gradientsPerOrigin === void 0 ? void 0 : gradientsPerOrigin.theme) || []), ...((gradientsPerOrigin === null || gradientsPerOrigin === void 0 ? void 0 : gradientsPerOrigin.default) || [])], [gradientsPerOrigin]);
29723
  const {
29724
  gradient,
29725
  customGradient
29737
  updateBlockAttributes
29738
  } = (0,external_wp_data_namespaceObject.useDispatch)(store);
29739
  const setGradient = (0,external_wp_element_namespaceObject.useCallback)(newGradientValue => {
29740
+ const slug = getGradientSlugByValue(allGradients, newGradientValue);
29741
 
29742
  if (slug) {
29743
  updateBlockAttributes(clientId, {
29751
  [gradientAttribute]: undefined,
29752
  [customGradientAttribute]: newGradientValue
29753
  });
29754
+ }, [allGradients, clientId, updateBlockAttributes]);
29755
 
29756
  const gradientClass = __experimentalGetGradientClass(gradient);
29757
 
29758
  let gradientValue;
29759
 
29760
  if (gradient) {
29761
+ gradientValue = getGradientValueBySlug(allGradients, gradient);
29762
  } else {
29763
  gradientValue = customGradient;
29764
  }
29785
 
29786
 
29787
 
 
29788
  /**
29789
  * Internal dependencies
29790
  */
29792
 
29793
 
29794
 
29795
+
29796
+
29797
  // translators: first %s: The type of color or gradient (e.g. background, overlay...), second %s: the color name or value (e.g. red or #ff0000)
29798
 
29799
  const colorIndicatorAriaLabel = (0,external_wp_i18n_namespaceObject.__)('(%s: color %s)'); // translators: first %s: The type of color or gradient (e.g. background, overlay...), second %s: the color name or value (e.g. red or #ff0000)
29853
  title,
29854
  showTitle = true,
29855
  __experimentalHasMultipleOrigins,
29856
+ __experimentalIsRenderedInSidebar,
29857
+ enableAlpha,
29858
  ...props
29859
  } = _ref3;
29860
 
29879
  gradients,
29880
  disableCustomColors,
29881
  disableCustomGradients,
29882
+ __experimentalHasMultipleOrigins,
29883
+ __experimentalIsRenderedInSidebar,
29884
+ enableAlpha
29885
  }, setting))), children);
29886
  };
29887
 
 
 
 
 
 
 
 
29888
  const PanelColorGradientSettingsSingleSelect = props => {
29889
  const colorGradientSettings = useCommonSingleMultipleSelects();
29890
  colorGradientSettings.colors = useSetting('color.palette');
29893
  };
29894
 
29895
  const PanelColorGradientSettingsMultipleSelect = props => {
29896
+ const colorGradientSettings = useMultipleOriginColorsAndGradients();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29897
  return (0,external_wp_element_namespaceObject.createElement)(PanelColorGradientSettingsInner, _extends({}, colorGradientSettings, props));
29898
  };
29899
 
30046
  initialOpen: false,
30047
  settings: settings,
30048
  showTitle: showTitle,
30049
+ __experimentalHasMultipleOrigins: true,
30050
+ __experimentalIsRenderedInSidebar: true
30051
  }, enableContrastChecking && (0,external_wp_element_namespaceObject.createElement)(contrast_checker, {
30052
  backgroundColor: detectedBackgroundColor,
30053
  textColor: detectedColor
30082
 
30083
 
30084
  const COLOR_SUPPORT_KEY = 'color';
 
30085
 
30086
  const hasColorSupport = blockType => {
30087
  const colorSupport = (0,external_wp_blocks_namespaceObject.getBlockSupport)(blockType, COLOR_SUPPORT_KEY);
30251
 
30252
 
30253
  function ColorEdit(props) {
30254
+ var _solidsPerOrigin$them, _gradientsPerOrigin$t, _style$color6, _style$color7, _style$color8, _style$elements2, _style$elements2$link, _style$elements2$link2, _style$elements3, _style$elements3$link, _style$elements3$link2;
30255
 
30256
  const {
30257
  name: blockName,
30258
  attributes
30259
  } = props;
30260
+ const {
30261
+ palette: solidsPerOrigin,
30262
+ gradients: gradientsPerOrigin,
30263
+ customGradient: areCustomGradientsEnabled,
30264
+ custom: areCustomSolidsEnabled,
30265
+ text: isTextEnabled,
30266
+ background: isBackgroundEnabled,
30267
+ link: isLinkEnabled
30268
+ } = useSetting('color') || {};
30269
+ const solidsEnabled = areCustomSolidsEnabled || !(solidsPerOrigin !== null && solidsPerOrigin !== void 0 && solidsPerOrigin.theme) || (solidsPerOrigin === null || solidsPerOrigin === void 0 ? void 0 : (_solidsPerOrigin$them = solidsPerOrigin.theme) === null || _solidsPerOrigin$them === void 0 ? void 0 : _solidsPerOrigin$them.length) > 0;
30270
+ const gradientsEnabled = areCustomGradientsEnabled || !(gradientsPerOrigin !== null && gradientsPerOrigin !== void 0 && gradientsPerOrigin.theme) || (gradientsPerOrigin === null || gradientsPerOrigin === void 0 ? void 0 : (_gradientsPerOrigin$t = gradientsPerOrigin.theme) === null || _gradientsPerOrigin$t === void 0 ? void 0 : _gradientsPerOrigin$t.length) > 0;
30271
+ const allSolids = (0,external_wp_element_namespaceObject.useMemo)(() => [...((solidsPerOrigin === null || solidsPerOrigin === void 0 ? void 0 : solidsPerOrigin.custom) || []), ...((solidsPerOrigin === null || solidsPerOrigin === void 0 ? void 0 : solidsPerOrigin.theme) || []), ...((solidsPerOrigin === null || solidsPerOrigin === void 0 ? void 0 : solidsPerOrigin.default) || [])], [solidsPerOrigin]);
30272
+ const allGradients = (0,external_wp_element_namespaceObject.useMemo)(() => [...((gradientsPerOrigin === null || gradientsPerOrigin === void 0 ? void 0 : gradientsPerOrigin.custom) || []), ...((gradientsPerOrigin === null || gradientsPerOrigin === void 0 ? void 0 : gradientsPerOrigin.theme) || []), ...((gradientsPerOrigin === null || gradientsPerOrigin === void 0 ? void 0 : gradientsPerOrigin.default) || [])], [gradientsPerOrigin]); // Shouldn't be needed but right now the ColorGradientsPanel
30273
  // can trigger both onChangeColor and onChangeBackground
30274
  // synchronously causing our two callbacks to override changes
30275
  // from each other.
30283
  return null;
30284
  }
30285
 
30286
+ const hasLinkColor = hasLinkColorSupport(blockName) && isLinkEnabled && solidsEnabled;
30287
+ const hasTextColor = hasTextColorSupport(blockName) && isTextEnabled && solidsEnabled;
30288
+ const hasBackgroundColor = hasBackgroundColorSupport(blockName) && isBackgroundEnabled && solidsEnabled;
30289
+ const hasGradientColor = hasGradientSupport(blockName) && gradientsEnabled;
30290
 
30291
  if (!hasLinkColor && !hasTextColor && !hasBackgroundColor && !hasGradientColor) {
30292
  return null;
30301
  let gradientValue;
30302
 
30303
  if (hasGradientColor && gradient) {
30304
+ gradientValue = getGradientValueBySlug(allGradients, gradient);
30305
  } else if (hasGradientColor) {
30306
  var _style$color5;
30307
 
30311
  const onChangeColor = name => value => {
30312
  var _localAttributes$curr, _localAttributes$curr2;
30313
 
30314
+ const colorObject = getColorObjectByColorValue(allSolids, value);
30315
  const attributeName = name + 'Color';
30316
  const newStyle = { ...localAttributes.current.style,
30317
  color: { ...((_localAttributes$curr = localAttributes.current) === null || _localAttributes$curr === void 0 ? void 0 : (_localAttributes$curr2 = _localAttributes$curr.style) === null || _localAttributes$curr2 === void 0 ? void 0 : _localAttributes$curr2.color),
30330
  };
30331
 
30332
  const onChangeGradient = value => {
30333
+ const slug = getGradientSlugByValue(allGradients, value);
30334
  let newAttributes;
30335
 
30336
  if (slug) {
30366
  };
30367
 
30368
  const onChangeLinkColor = value => {
30369
+ const colorObject = getColorObjectByColorValue(allSolids, value);
30370
  const newLinkColorValue = colorObject !== null && colorObject !== void 0 && colorObject.slug ? `var:preset|color|${colorObject.slug}` : value;
30371
  const newStyle = cleanEmptyObject(immutableSet(style, ['elements', 'link', 'color', 'text'], newLinkColorValue));
30372
  props.setAttributes({
30381
  settings: [...(hasTextColor ? [{
30382
  label: (0,external_wp_i18n_namespaceObject.__)('Text color'),
30383
  onColorChange: onChangeColor('text'),
30384
+ colorValue: getColorObjectByAttributeValues(allSolids, textColor, style === null || style === void 0 ? void 0 : (_style$color7 = style.color) === null || _style$color7 === void 0 ? void 0 : _style$color7.text).color
30385
  }] : []), ...(hasBackgroundColor || hasGradientColor ? [{
30386
  label: (0,external_wp_i18n_namespaceObject.__)('Background color'),
30387
  onColorChange: hasBackgroundColor ? onChangeColor('background') : undefined,
30388
+ colorValue: getColorObjectByAttributeValues(allSolids, backgroundColor, style === null || style === void 0 ? void 0 : (_style$color8 = style.color) === null || _style$color8 === void 0 ? void 0 : _style$color8.background).color,
30389
  gradientValue,
30390
  onGradientChange: hasGradientColor ? onChangeGradient : undefined
30391
  }] : []), ...(hasLinkColor ? [{
30392
  label: (0,external_wp_i18n_namespaceObject.__)('Link Color'),
30393
  onColorChange: onChangeLinkColor,
30394
+ colorValue: getLinkColorFromAttributeValue(allSolids, style === null || style === void 0 ? void 0 : (_style$elements2 = style.elements) === null || _style$elements2 === void 0 ? void 0 : (_style$elements2$link = _style$elements2.link) === null || _style$elements2$link === void 0 ? void 0 : (_style$elements2$link2 = _style$elements2$link.color) === null || _style$elements2$link2 === void 0 ? void 0 : _style$elements2$link2.text),
30395
  clearable: !!(style !== null && style !== void 0 && (_style$elements3 = style.elements) !== null && _style$elements3 !== void 0 && (_style$elements3$link = _style$elements3.link) !== null && _style$elements3$link !== void 0 && (_style$elements3$link2 = _style$elements3$link.color) !== null && _style$elements3$link2 !== void 0 && _style$elements3$link2.text)
30396
  }] : [])]
30397
  });
30416
  backgroundColor,
30417
  textColor
30418
  } = attributes;
30419
+ const {
30420
+ palette: solidsPerOrigin
30421
+ } = useSetting('color') || {};
30422
+ const colors = (0,external_wp_element_namespaceObject.useMemo)(() => [...((solidsPerOrigin === null || solidsPerOrigin === void 0 ? void 0 : solidsPerOrigin.custom) || []), ...((solidsPerOrigin === null || solidsPerOrigin === void 0 ? void 0 : solidsPerOrigin.theme) || []), ...((solidsPerOrigin === null || solidsPerOrigin === void 0 ? void 0 : solidsPerOrigin.default) || [])], [solidsPerOrigin]);
30423
 
30424
  if (!hasColorSupport(name) || color_shouldSkipSerialization(name)) {
30425
  return (0,external_wp_element_namespaceObject.createElement)(BlockListBlock, props);
32292
  panelId: clientId
32293
  }, (0,external_wp_element_namespaceObject.createElement)(LetterSpacingEdit, props)));
32294
  }
 
32295
  const hasTypographySupport = blockName => {
32296
  return TYPOGRAPHY_SUPPORT_KEYS.some(key => (0,external_wp_blocks_namespaceObject.hasBlockSupport)(blockName, key));
32297
  };
33774
  * External dependencies
33775
  */
33776
 
33777
+ /**
33778
+ * WordPress dependencies
33779
+ */
33780
+
33781
+
33782
  /**
33783
  * Internal dependencies
33784
  */
33793
  // block support is being skipped for a block but the color related CSS classes
33794
  // & styles still need to be generated so they can be applied to inner elements.
33795
 
 
33796
  /**
33797
  * Provides the CSS class names and inline styles for a block's color support
33798
  * attributes.
33854
  textColor,
33855
  gradient
33856
  } = attributes;
33857
+ const {
33858
+ palette: solidsPerOrigin,
33859
+ gradients: gradientsPerOrigin
33860
+ } = useSetting('color') || {};
33861
+ const colors = (0,external_wp_element_namespaceObject.useMemo)(() => [...((solidsPerOrigin === null || solidsPerOrigin === void 0 ? void 0 : solidsPerOrigin.custom) || []), ...((solidsPerOrigin === null || solidsPerOrigin === void 0 ? void 0 : solidsPerOrigin.theme) || []), ...((solidsPerOrigin === null || solidsPerOrigin === void 0 ? void 0 : solidsPerOrigin.default) || [])], [solidsPerOrigin]);
33862
+ const gradients = (0,external_wp_element_namespaceObject.useMemo)(() => [...((gradientsPerOrigin === null || gradientsPerOrigin === void 0 ? void 0 : gradientsPerOrigin.custom) || []), ...((gradientsPerOrigin === null || gradientsPerOrigin === void 0 ? void 0 : gradientsPerOrigin.theme) || []), ...((gradientsPerOrigin === null || gradientsPerOrigin === void 0 ? void 0 : gradientsPerOrigin.default) || [])], [gradientsPerOrigin]);
33863
  const colorProps = getColorClassesAndStyles(attributes); // Force inline styles to apply colors when themes do not load their color
33864
  // stylesheets in the editor.
33865
 
33975
 
33976
 
33977
 
 
33978
  /**
33979
  * Higher order component factory for injecting the `colorsArray` argument as
33980
  * the colors prop in the `withCustomColors` HOC.
33996
 
33997
 
33998
  const withEditorColorPalette = () => (0,external_wp_compose_namespaceObject.createHigherOrderComponent)(WrappedComponent => props => {
33999
+ const {
34000
+ palette: colorPerOrigin
34001
+ } = useSetting('color') || {};
34002
+ const allColors = (0,external_wp_element_namespaceObject.useMemo)(() => [...((colorPerOrigin === null || colorPerOrigin === void 0 ? void 0 : colorPerOrigin.custom) || []), ...((colorPerOrigin === null || colorPerOrigin === void 0 ? void 0 : colorPerOrigin.theme) || []), ...((colorPerOrigin === null || colorPerOrigin === void 0 ? void 0 : colorPerOrigin.default) || [])], [colorPerOrigin]);
34003
  return (0,external_wp_element_namespaceObject.createElement)(WrappedComponent, _extends({}, props, {
34004
+ colors: allColors
34005
  }));
34006
  }, 'withEditorColorPalette');
34007
  /**
35187
 
35188
 
35189
 
35190
+
35191
  function ListViewBlockSelectButton(_ref, ref) {
35192
  let {
35193
  className,
35209
  const blockInformation = useBlockDisplayInformation(clientId);
35210
  const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(ListViewBlockSelectButton);
35211
  const descriptionId = `list-view-block-select-button__${instanceId}`;
35212
+ const blockPositionDescription = getBlockPositionDescription(position, siblingBlockCount, level); // The `href` attribute triggers the browser's native HTML drag operations.
35213
+ // When the link is dragged, the element's outerHTML is set in DataTransfer object as text/html.
35214
+ // We need to clear any HTML drag data to prevent `pasteHandler` from firing
35215
+ // inside the `useOnBlockDrop` hook.
35216
+
35217
+ const onDragStartHandler = event => {
35218
+ event.dataTransfer.clearData();
35219
+ onDragStart(event);
35220
+ };
35221
+
35222
+ function onKeyDownHandler(event) {
35223
+ if (event.keyCode === external_wp_keycodes_namespaceObject.ENTER || event.keyCode === external_wp_keycodes_namespaceObject.SPACE) {
35224
+ event.preventDefault();
35225
+ onClick(event);
35226
+ }
35227
+ }
35228
+
35229
  return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
35230
  className: classnames_default()('block-editor-list-view-block-select-button', className),
35231
  onClick: onClick,
35232
+ onKeyDown: onKeyDownHandler,
35233
  "aria-describedby": descriptionId,
35234
  ref: ref,
35235
  tabIndex: tabIndex,
35236
  onFocus: onFocus,
35237
+ onDragStart: onDragStartHandler,
35238
  onDragEnd: onDragEnd,
35239
+ draggable: draggable,
35240
+ href: `#block-${clientId}`
35241
  }, (0,external_wp_element_namespaceObject.createElement)(ListViewExpander, {
35242
  onClick: onToggleExpanded
35243
  }), (0,external_wp_element_namespaceObject.createElement)(block_icon, {
44206
  return null;
44207
  }
44208
 
44209
+ return onUpdatePreferredStyleVariations && (0,external_wp_element_namespaceObject.createElement)("div", {
44210
+ className: "default-style-picker__default-switcher"
44211
+ }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SelectControl, {
44212
  options: selectOptions,
44213
  value: preferredStyle || '',
44214
  label: (0,external_wp_i18n_namespaceObject.__)('Default Style'),
44215
  onChange: selectOnChange
44216
+ }));
44217
  }
44218
  //# sourceMappingURL=index.js.map
44219
  ;// CONCATENATED MODULE: ./packages/block-editor/build-module/components/block-inspector/index.js
44242
 
44243
  const BlockInspector = _ref => {
44244
  let {
44245
+ showNoBlockSelectedMessage = true
 
44246
  } = _ref;
44247
  const {
44248
  count,
44280
  if (count > 1) {
44281
  return (0,external_wp_element_namespaceObject.createElement)("div", {
44282
  className: "block-editor-block-inspector"
44283
+ }, (0,external_wp_element_namespaceObject.createElement)(multi_selection_inspector, null), (0,external_wp_element_namespaceObject.createElement)(inspector_controls.Slot, null));
 
 
44284
  }
44285
 
44286
  const isSelectedBlockUnregistered = selectedBlockName === (0,external_wp_blocks_namespaceObject.getUnregisteredTypeHandlerName)();
44302
  return (0,external_wp_element_namespaceObject.createElement)(BlockInspectorSingleBlock, {
44303
  clientId: selectedBlockClientId,
44304
  blockName: blockType.name,
44305
+ hasBlockStyles: hasBlockStyles
 
44306
  });
44307
  };
44308
 
44310
  let {
44311
  clientId,
44312
  blockName,
44313
+ hasBlockStyles
 
44314
  } = _ref2;
44315
  const blockInformation = useBlockDisplayInformation(clientId);
44316
  return (0,external_wp_element_namespaceObject.createElement)("div", {
44321
  title: (0,external_wp_i18n_namespaceObject.__)('Styles')
44322
  }, (0,external_wp_element_namespaceObject.createElement)(block_styles, {
44323
  scope: "core/edit-post",
44324
+ clientId: clientId
 
44325
  }), (0,external_wp_blocks_namespaceObject.hasBlockSupport)(blockName, 'defaultStylePicker', true) && (0,external_wp_element_namespaceObject.createElement)(DefaultStylePicker, {
44326
  blockName: blockName
44327
+ }))), (0,external_wp_element_namespaceObject.createElement)(inspector_controls.Slot, null), (0,external_wp_element_namespaceObject.createElement)(inspector_controls.Slot, {
 
 
44328
  __experimentalGroup: "typography",
 
44329
  label: (0,external_wp_i18n_namespaceObject.__)('Typography')
44330
+ }), (0,external_wp_element_namespaceObject.createElement)(inspector_controls.Slot, {
44331
+ __experimentalGroup: "border",
44332
+ label: (0,external_wp_i18n_namespaceObject.__)('Border')
44333
  }), (0,external_wp_element_namespaceObject.createElement)(inspector_controls.Slot, {
44334
  __experimentalGroup: "dimensions",
 
44335
  label: (0,external_wp_i18n_namespaceObject.__)('Dimensions')
44336
+ }), (0,external_wp_element_namespaceObject.createElement)("div", null, (0,external_wp_element_namespaceObject.createElement)(AdvancedControls, null)), (0,external_wp_element_namespaceObject.createElement)(skip_to_selected_block, {
 
 
44337
  key: "back"
44338
  }));
44339
  };
44340
 
44341
+ const AdvancedControls = () => {
 
 
 
44342
  const slot = (0,external_wp_components_namespaceObject.__experimentalUseSlot)(InspectorAdvancedControls.slotName);
44343
  const hasFills = Boolean(slot.fills && slot.fills.length);
44344
 
44351
  title: (0,external_wp_i18n_namespaceObject.__)('Advanced'),
44352
  initialOpen: false
44353
  }, (0,external_wp_element_namespaceObject.createElement)(inspector_controls.Slot, {
44354
+ __experimentalGroup: "advanced"
 
44355
  }));
44356
  };
44357
 
45168
 
45169
  /* harmony default export */ var typewriter = (TypewriterOrIEBypass);
45170
  //# sourceMappingURL=index.js.map
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45171
  ;// CONCATENATED MODULE: ./packages/block-editor/build-module/components/use-no-recursive-renders/index.js
45172
 
45173
 
45323
 
45324
 
45325
 
 
45326
 
45327
 
45328
 
build/block-editor/index.min.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-shortcode', 'wp-token-list', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => 'd4684bb0c3920c414c5346a9ec9c8a9a');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-shortcode', 'wp-token-list', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '6fc2163e8677ee351c15e4aa9e7f68ae');
build/block-editor/index.min.js CHANGED
@@ -1,13 +1,13 @@
1
- !function(){var e={9367:function(e,t){var n,o;void 0===(o="function"==typeof(n=function(e,t){"use strict";var n,o,r="function"==typeof Map?new Map:(n=[],o=[],{has:function(e){return n.indexOf(e)>-1},get:function(e){return o[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),o.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),o.splice(t,1))}}),l=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){l=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function i(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!r.has(e)){var t=null,n=null,o=null,i=function(){e.clientWidth!==n&&d()},s=function(t){window.removeEventListener("resize",i,!1),e.removeEventListener("input",d,!1),e.removeEventListener("keyup",d,!1),e.removeEventListener("autosize:destroy",s,!1),e.removeEventListener("autosize:update",d,!1),Object.keys(t).forEach((function(n){e.style[n]=t[n]})),r.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",s,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",d,!1),window.addEventListener("resize",i,!1),e.addEventListener("input",d,!1),e.addEventListener("autosize:update",d,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",r.set(e,{destroy:s,update:d}),"vertical"===(a=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===a.resize&&(e.style.resize="horizontal"),t="content-box"===a.boxSizing?-(parseFloat(a.paddingTop)+parseFloat(a.paddingBottom)):parseFloat(a.borderTopWidth)+parseFloat(a.borderBottomWidth),isNaN(t)&&(t=0),d()}var a;function c(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function u(){if(0!==e.scrollHeight){var o=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}(e),r=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+t+"px",n=e.clientWidth,o.forEach((function(e){e.node.scrollTop=e.scrollTop})),r&&(document.documentElement.scrollTop=r)}}function d(){u();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),r="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(r<t?"hidden"===n.overflowY&&(c("scroll"),u(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(c("hidden"),u(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),o!==r){o=r;var i=l("autosize:resized");try{e.dispatchEvent(i)}catch(e){}}}}function s(e){var t=r.get(e);t&&t.destroy()}function a(e){var t=r.get(e);t&&t.update()}var c=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((c=function(e){return e}).destroy=function(e){return e},c.update=function(e){return e}):((c=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return i(e)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],s),e},c.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],a),e}),t.default=c,e.exports=t.default})?n.apply(t,[e,t]):n)||(e.exports=o)},4184:function(e,t){var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var l=typeof n;if("string"===l||"number"===l)e.push(n);else if(Array.isArray(n)){if(n.length){var i=r.apply(null,n);i&&e.push(i)}}else if("object"===l)if(n.toString===Object.prototype.toString)for(var s in n)o.call(n,s)&&n[s]&&e.push(s);else e.push(n.toString())}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},1934:function(e){e.exports=function(e,t,n){return((n=window.getComputedStyle)?n(e):e.currentStyle)[t.replace(/-(\w)/gi,(function(e,t){return t.toUpperCase()}))]}},5913:function(e,t){"use strict";function n(){}function o(e,t,n,o,r){for(var l=0,i=t.length,s=0,a=0;l<i;l++){var c=t[l];if(c.removed){if(c.value=e.join(o.slice(a,a+c.count)),a+=c.count,l&&t[l-1].added){var u=t[l-1];t[l-1]=t[l],t[l]=u}}else{if(!c.added&&r){var d=n.slice(s,s+c.count);d=d.map((function(e,t){var n=o[a+t];return n.length>e.length?n:e})),c.value=e.join(d)}else c.value=e.join(n.slice(s,s+c.count));s+=c.count,c.added||(a+=c.count)}}var p=t[i-1];return i>1&&"string"==typeof p.value&&(p.added||p.removed)&&e.equals("",p.value)&&(t[i-2].value+=p.value,t.pop()),t}function r(e){return{newPos:e.newPos,components:e.components.slice(0)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,n.prototype={diff:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=n.callback;"function"==typeof n&&(l=n,n={}),this.options=n;var i=this;function s(e){return l?(setTimeout((function(){l(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var a=(t=this.removeEmpty(this.tokenize(t))).length,c=e.length,u=1,d=a+c,p=[{newPos:-1,components:[]}],m=this.extractCommon(p[0],t,e,0);if(p[0].newPos+1>=a&&m+1>=c)return s([{value:this.join(t),count:t.length}]);function f(){for(var n=-1*u;n<=u;n+=2){var l=void 0,d=p[n-1],m=p[n+1],f=(m?m.newPos:0)-n;d&&(p[n-1]=void 0);var h=d&&d.newPos+1<a,g=m&&0<=f&&f<c;if(h||g){if(!h||g&&d.newPos<m.newPos?(l=r(m),i.pushComponent(l.components,void 0,!0)):((l=d).newPos++,i.pushComponent(l.components,!0,void 0)),f=i.extractCommon(l,t,e,n),l.newPos+1>=a&&f+1>=c)return s(o(i,l.components,t,e,i.useLongestToken));p[n]=l}else p[n]=void 0}u++}if(l)!function e(){setTimeout((function(){if(u>d)return l();f()||e()}),0)}();else for(;u<=d;){var h=f();if(h)return h}},pushComponent:function(e,t,n){var o=e[e.length-1];o&&o.added===t&&o.removed===n?e[e.length-1]={count:o.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,o){for(var r=t.length,l=n.length,i=e.newPos,s=i-o,a=0;i+1<r&&s+1<l&&this.equals(t[i+1],n[s+1]);)i++,s++,a++;return a&&e.components.push({count:a}),e.newPos=i,s},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}}},7630:function(e,t,n){"use strict";var o;t.Kx=function(e,t,n){return r.diff(e,t,n)};var r=new(((o=n(5913))&&o.__esModule?o:{default:o}).default)},9010:function(e,t,n){"use strict";var o=n(4657);e.exports=function(e,t,n){n=n||{},9===t.nodeType&&(t=o.getWindow(t));var r=n.allowHorizontalScroll,l=n.onlyScrollIfNeeded,i=n.alignWithTop,s=n.alignWithLeft,a=n.offsetTop||0,c=n.offsetLeft||0,u=n.offsetBottom||0,d=n.offsetRight||0;r=void 0===r||r;var p=o.isWindow(t),m=!(!p||!t.frameElement),f=o.offset(e),h=o.outerHeight(e),g=o.outerWidth(e),v=void 0,b=void 0,k=void 0,_=void 0,y=void 0,E=void 0,C=void 0,S=void 0,w=void 0,B=void 0;m&&(t=t.document.scrollingElement||t.document.body),p||m?(C=t,B=o.height(C),w=o.width(C),S={left:o.scrollLeft(C),top:o.scrollTop(C)},y={left:f.left-S.left-c,top:f.top-S.top-a},E={left:f.left+g-(S.left+w)+d,top:f.top+h-(S.top+B)+u},_=S):(v=o.offset(t),b=t.clientHeight,k=t.clientWidth,_={left:t.scrollLeft,top:t.scrollTop},y={left:f.left-(v.left+(parseFloat(o.css(t,"borderLeftWidth"))||0))-c,top:f.top-(v.top+(parseFloat(o.css(t,"borderTopWidth"))||0))-a},E={left:f.left+g-(v.left+k+(parseFloat(o.css(t,"borderRightWidth"))||0))+d,top:f.top+h-(v.top+b+(parseFloat(o.css(t,"borderBottomWidth"))||0))+u}),y.top<0||E.top>0?!0===i?o.scrollTop(t,_.top+y.top):!1===i?o.scrollTop(t,_.top+E.top):y.top<0?o.scrollTop(t,_.top+y.top):o.scrollTop(t,_.top+E.top):l||((i=void 0===i||!!i)?o.scrollTop(t,_.top+y.top):o.scrollTop(t,_.top+E.top)),r&&(y.left<0||E.left>0?!0===s?o.scrollLeft(t,_.left+y.left):!1===s?o.scrollLeft(t,_.left+E.left):y.left<0?o.scrollLeft(t,_.left+y.left):o.scrollLeft(t,_.left+E.left):l||((s=void 0===s||!!s)?o.scrollLeft(t,_.left+y.left):o.scrollLeft(t,_.left+E.left)))}},4979:function(e,t,n){"use strict";e.exports=n(9010)},4657:function(e){"use strict";var t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function o(e,t){var n=e["page"+(t?"Y":"X")+"Offset"],o="scroll"+(t?"Top":"Left");if("number"!=typeof n){var r=e.document;"number"!=typeof(n=r.documentElement[o])&&(n=r.body[o])}return n}function r(e){return o(e)}function l(e){return o(e,!0)}function i(e){var t=function(e){var t,n=void 0,o=void 0,r=e.ownerDocument,l=r.body,i=r&&r.documentElement;return n=(t=e.getBoundingClientRect()).left,o=t.top,{left:n-=i.clientLeft||l.clientLeft||0,top:o-=i.clientTop||l.clientTop||0}}(e),n=e.ownerDocument,o=n.defaultView||n.parentWindow;return t.left+=r(o),t.top+=l(o),t}var s=new RegExp("^("+/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source+")(?!px)[a-z%]+$","i"),a=/^(top|right|bottom|left)$/,c=void 0;function u(e,t){for(var n=0;n<e.length;n++)t(e[n])}function d(e){return"border-box"===c(e,"boxSizing")}"undefined"!=typeof window&&(c=window.getComputedStyle?function(e,t,n){var o="",r=e.ownerDocument,l=n||r.defaultView.getComputedStyle(e,null);return l&&(o=l.getPropertyValue(t)||l[t]),o}:function(e,t){var n=e.currentStyle&&e.currentStyle[t];if(s.test(n)&&!a.test(t)){var o=e.style,r=o.left,l=e.runtimeStyle.left;e.runtimeStyle.left=e.currentStyle.left,o.left="fontSize"===t?"1em":n||0,n=o.pixelLeft+"px",o.left=r,e.runtimeStyle.left=l}return""===n?"auto":n});var p=["margin","border","padding"];function m(e,t,n){var o={},r=e.style,l=void 0;for(l in t)t.hasOwnProperty(l)&&(o[l]=r[l],r[l]=t[l]);for(l in n.call(e),t)t.hasOwnProperty(l)&&(r[l]=o[l])}function f(e,t,n){var o=0,r=void 0,l=void 0,i=void 0;for(l=0;l<t.length;l++)if(r=t[l])for(i=0;i<n.length;i++){var s;s="border"===r?r+n[i]+"Width":r+n[i],o+=parseFloat(c(e,s))||0}return o}function h(e){return null!=e&&e==e.window}var g={};function v(e,t,n){if(h(e))return"width"===t?g.viewportWidth(e):g.viewportHeight(e);if(9===e.nodeType)return"width"===t?g.docWidth(e):g.docHeight(e);var o="width"===t?["Left","Right"]:["Top","Bottom"],r="width"===t?e.offsetWidth:e.offsetHeight,l=(c(e),d(e)),i=0;(null==r||r<=0)&&(r=void 0,(null==(i=c(e,t))||Number(i)<0)&&(i=e.style[t]||0),i=parseFloat(i)||0),void 0===n&&(n=l?1:-1);var s=void 0!==r||l,a=r||i;if(-1===n)return s?a-f(e,["border","padding"],o):i;if(s){var u=2===n?-f(e,["border"],o):f(e,["margin"],o);return a+(1===n?0:u)}return i+f(e,p.slice(n),o)}u(["Width","Height"],(function(e){g["doc"+e]=function(t){var n=t.document;return Math.max(n.documentElement["scroll"+e],n.body["scroll"+e],g["viewport"+e](n))},g["viewport"+e]=function(t){var n="client"+e,o=t.document,r=o.body,l=o.documentElement[n];return"CSS1Compat"===o.compatMode&&l||r&&r[n]||l}}));var b={position:"absolute",visibility:"hidden",display:"block"};function k(e){var t=void 0,n=arguments;return 0!==e.offsetWidth?t=v.apply(void 0,n):m(e,b,(function(){t=v.apply(void 0,n)})),t}function _(e,t,o){var r=o;if("object"!==(void 0===t?"undefined":n(t)))return void 0!==r?("number"==typeof r&&(r+="px"),void(e.style[t]=r)):c(e,t);for(var l in t)t.hasOwnProperty(l)&&_(e,l,t[l])}u(["width","height"],(function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);g["outer"+t]=function(t,n){return t&&k(t,e,n?0:1)};var n="width"===e?["Left","Right"]:["Top","Bottom"];g[e]=function(t,o){return void 0===o?t&&k(t,e,-1):t?(c(t),d(t)&&(o+=f(t,["padding","border"],n)),_(t,e,o)):void 0}})),e.exports=t({getWindow:function(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow},offset:function(e,t){if(void 0===t)return i(e);!function(e,t){"static"===_(e,"position")&&(e.style.position="relative");var n=i(e),o={},r=void 0,l=void 0;for(l in t)t.hasOwnProperty(l)&&(r=parseFloat(_(e,l))||0,o[l]=r+t[l]-n[l]);_(e,o)}(e,t)},isWindow:h,each:u,css:_,clone:function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);if(e.overflow)for(var n in e)e.hasOwnProperty(n)&&(t.overflow[n]=e.overflow[n]);return t},scrollLeft:function(e,t){if(h(e)){if(void 0===t)return r(e);window.scrollTo(t,l(e))}else{if(void 0===t)return e.scrollLeft;e.scrollLeft=t}},scrollTop:function(e,t){if(h(e)){if(void 0===t)return l(e);window.scrollTo(r(e),t)}else{if(void 0===t)return e.scrollTop;e.scrollTop=t}},viewportWidth:0,viewportHeight:0},g)},5717:function(e){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},8303:function(e,t,n){var o=n(1934);e.exports=function(e){var t=o(e,"line-height"),n=parseFloat(t,10);if(t===n+""){var r=e.style.lineHeight;e.style.lineHeight=t+"em",t=o(e,"line-height"),n=parseFloat(t,10),r?e.style.lineHeight=r:delete e.style.lineHeight}if(-1!==t.indexOf("pt")?(n*=4,n/=3):-1!==t.indexOf("mm")?(n*=96,n/=25.4):-1!==t.indexOf("cm")?(n*=96,n/=2.54):-1!==t.indexOf("in")?n*=96:-1!==t.indexOf("pc")&&(n*=16),n=Math.round(n),"normal"===t){var l=e.nodeName,i=document.createElement(l);i.innerHTML="&nbsp;","TEXTAREA"===l.toUpperCase()&&i.setAttribute("rows","1");var s=o(e,"font-size");i.style.fontSize=s,i.style.padding="0px",i.style.border="0px";var a=document.body;a.appendChild(i),n=i.offsetHeight,a.removeChild(i)}return n}},2703:function(e,t,n){"use strict";var o=n(414);function r(){}function l(){}l.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,l,i){if(i!==o){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:l,resetWarningCache:r};return n.PropTypes=n,n}},5697:function(e,t,n){e.exports=n(2703)()},414:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},4857:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),l=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&(n[o[r]]=e[o[r]])}return n};t.__esModule=!0;var s=n(3804),a=n(5697),c=n(9367),u=n(8303),d="autosize:resized",p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.textarea=null,t.onResize=function(e){t.props.onResize&&t.props.onResize(e)},t.updateLineHeight=function(){t.textarea&&t.setState({lineHeight:u(t.textarea)})},t.onChange=function(e){var n=t.props.onChange;t.currentValue=e.currentTarget.value,n&&n(e)},t}return r(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.maxRows,o=t.async;"number"==typeof n&&this.updateLineHeight(),"number"==typeof n||o?setTimeout((function(){return e.textarea&&c(e.textarea)})):this.textarea&&c(this.textarea),this.textarea&&this.textarea.addEventListener(d,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(d,this.onResize),c.destroy(this.textarea))},t.prototype.render=function(){var e=this,t=this.props,n=(t.onResize,t.maxRows),o=(t.onChange,t.style),r=(t.innerRef,t.children),a=i(t,["onResize","maxRows","onChange","style","innerRef","children"]),c=this.state.lineHeight,u=n&&c?c*n:null;return s.createElement("textarea",l({},a,{onChange:this.onChange,style:u?l({},o,{maxHeight:u}):o,ref:function(t){e.textarea=t,"function"==typeof e.props.innerRef?e.props.innerRef(t):e.props.innerRef&&(e.props.innerRef.current=t)}}),r)},t.prototype.componentDidUpdate=function(){this.textarea&&c.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:a.number,maxRows:a.number,onResize:a.func,innerRef:a.any,async:a.bool},t}(s.Component);t.TextareaAutosize=s.forwardRef((function(e,t){return s.createElement(p,l({},e,{innerRef:t}))}))},4042:function(e,t,n){"use strict";var o=n(4857);t.Z=o.TextareaAutosize},3692:function(e){var t=e.exports=function(e){return new n(e)};function n(e){this.value=e}function o(e,t,n){var o=[],i=[],u=!0;return function e(d){var p=n?r(d):d,m={},f=!0,h={node:p,node_:d,path:[].concat(o),parent:i[i.length-1],parents:i,key:o.slice(-1)[0],isRoot:0===o.length,level:o.length,circular:null,update:function(e,t){h.isRoot||(h.parent.node[h.key]=e),h.node=e,t&&(f=!1)},delete:function(e){delete h.parent.node[h.key],e&&(f=!1)},remove:function(e){s(h.parent.node)?h.parent.node.splice(h.key,1):delete h.parent.node[h.key],e&&(f=!1)},keys:null,before:function(e){m.before=e},after:function(e){m.after=e},pre:function(e){m.pre=e},post:function(e){m.post=e},stop:function(){u=!1},block:function(){f=!1}};if(!u)return h;function g(){if("object"==typeof h.node&&null!==h.node){h.keys&&h.node_===h.node||(h.keys=l(h.node)),h.isLeaf=0==h.keys.length;for(var e=0;e<i.length;e++)if(i[e].node_===d){h.circular=i[e];break}}else h.isLeaf=!0,h.keys=null;h.notLeaf=!h.isLeaf,h.notRoot=!h.isRoot}g();var v=t.call(h,h.node);return void 0!==v&&h.update&&h.update(v),m.before&&m.before.call(h,h.node),f?("object"!=typeof h.node||null===h.node||h.circular||(i.push(h),g(),a(h.keys,(function(t,r){o.push(t),m.pre&&m.pre.call(h,h.node[t],t);var l=e(h.node[t]);n&&c.call(h.node,t)&&(h.node[t]=l.node),l.isLast=r==h.keys.length-1,l.isFirst=0==r,m.post&&m.post.call(h,l),o.pop()})),i.pop()),m.after&&m.after.call(h,h.node),h):h}(e).node}function r(e){if("object"==typeof e&&null!==e){var t;if(s(e))t=[];else if("[object Date]"===i(e))t=new Date(e.getTime?e.getTime():e);else if("[object RegExp]"===i(e))t=new RegExp(e);else if(function(e){return"[object Error]"===i(e)}(e))t={message:e.message};else if(function(e){return"[object Boolean]"===i(e)}(e))t=new Boolean(e);else if(function(e){return"[object Number]"===i(e)}(e))t=new Number(e);else if(function(e){return"[object String]"===i(e)}(e))t=new String(e);else if(Object.create&&Object.getPrototypeOf)t=Object.create(Object.getPrototypeOf(e));else if(e.constructor===Object)t={};else{var n=e.constructor&&e.constructor.prototype||e.__proto__||{},o=function(){};o.prototype=n,t=new o}return a(l(e),(function(n){t[n]=e[n]})),t}return e}n.prototype.get=function(e){for(var t=this.value,n=0;n<e.length;n++){var o=e[n];if(!t||!c.call(t,o)){t=void 0;break}t=t[o]}return t},n.prototype.has=function(e){for(var t=this.value,n=0;n<e.length;n++){var o=e[n];if(!t||!c.call(t,o))return!1;t=t[o]}return!0},n.prototype.set=function(e,t){for(var n=this.value,o=0;o<e.length-1;o++){var r=e[o];c.call(n,r)||(n[r]={}),n=n[r]}return n[e[o]]=t,t},n.prototype.map=function(e){return o(this.value,e,!0)},n.prototype.forEach=function(e){return this.value=o(this.value,e,!1),this.value},n.prototype.reduce=function(e,t){var n=1===arguments.length,o=n?this.value:t;return this.forEach((function(t){this.isRoot&&n||(o=e.call(this,o,t))})),o},n.prototype.paths=function(){var e=[];return this.forEach((function(t){e.push(this.path)})),e},n.prototype.nodes=function(){var e=[];return this.forEach((function(t){e.push(this.node)})),e},n.prototype.clone=function(){var e=[],t=[];return function n(o){for(var i=0;i<e.length;i++)if(e[i]===o)return t[i];if("object"==typeof o&&null!==o){var s=r(o);return e.push(o),t.push(s),a(l(o),(function(e){s[e]=n(o[e])})),e.pop(),t.pop(),s}return o}(this.value)};var l=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};function i(e){return Object.prototype.toString.call(e)}var s=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},a=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t(e[n],n,e)};a(l(n.prototype),(function(e){t[e]=function(t){var o=[].slice.call(arguments,1),r=new n(t);return r[e].apply(r,o)}}));var c=Object.hasOwnProperty||function(e,t){return t in e}},3804:function(e){"use strict";e.exports=window.React}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var l=t[o]={exports:{}};return e[o].call(l.exports,l,l.exports,n),l.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};!function(){"use strict";n.r(o),n.d(o,{AlignmentControl:function(){return Ng},AlignmentToolbar:function(){return Pg},Autocomplete:function(){return Ag},BlockAlignmentControl:function(){return zo},BlockAlignmentToolbar:function(){return Vo},BlockBreadcrumb:function(){return Vg},BlockColorsStyleSelector:function(){return $g},BlockContextProvider:function(){return ir},BlockControls:function(){return Zn},BlockEdit:function(){return ur},BlockEditorKeyboardShortcuts:function(){return i_},BlockEditorProvider:function(){return $a},BlockFormatControls:function(){return Yn},BlockIcon:function(){return Ua},BlockInspector:function(){return n_},BlockList:function(){return pm},BlockMover:function(){return qd},BlockNavigationDropdown:function(){return pv},BlockPreview:function(){return pu},BlockSelectionClearer:function(){return qa},BlockSettingsMenu:function(){return zp},BlockSettingsMenuControls:function(){return Ap},BlockStyles:function(){return gv},BlockTitle:function(){return Ld},BlockToolbar:function(){return Vp},BlockTools:function(){return o_},BlockVerticalAlignmentControl:function(){return Ov},BlockVerticalAlignmentToolbar:function(){return Fv},ButtonBlockAppender:function(){return Sd},ButtonBlockerAppender:function(){return Cd},ColorPalette:function(){return Vv},ColorPaletteControl:function(){return Hv},ContrastChecker:function(){return hf},CopyHandler:function(){return Sp},DefaultBlockAppender:function(){return yd},FontSizePicker:function(){return Yf},InnerBlocks:function(){return am},Inserter:function(){return _d},InspectorAdvancedControls:function(){return Jo},InspectorControls:function(){return er},JustifyContentControl:function(){return go},JustifyToolbar:function(){return vo},LineHeightControl:function(){return Pf},MediaPlaceholder:function(){return tk},MediaReplaceFlow:function(){return Zb},MediaUpload:function(){return qb},MediaUploadCheck:function(){return Yb},MultiSelectScrollIntoView:function(){return s_},NavigableToolbar:function(){return Fd},ObserveTyping:function(){return d_},PanelColorSettings:function(){return nk},PlainText:function(){return xk},PreserveScrollInReorder:function(){return p_},RichText:function(){return wk},RichTextShortcut:function(){return Pk},RichTextToolbarButton:function(){return Mk},SETTINGS_DEFAULTS:function(){return v},SkipToSelectedBlock:function(){return Zk},ToolSelector:function(){return Ak},Typewriter:function(){return g_},URLInput:function(){return wb},URLInputButton:function(){return zk},URLPopover:function(){return Jb},Warning:function(){return pr},WritingFlow:function(){return rc},__experimentalBlockAlignmentMatrixControl:function(){return Fg},__experimentalBlockContentOverlay:function(){return Hg},__experimentalBlockFullHeightAligmentControl:function(){return Og},__experimentalBlockPatternSetup:function(){return xv},__experimentalBlockVariationPicker:function(){return bv},__experimentalBlockVariationTransforms:function(){return Nv},__experimentalBorderRadiusControl:function(){return Fm},__experimentalBorderStyleControl:function(){return Wm},__experimentalColorGradientControl:function(){return bm},__experimentalDuotoneControl:function(){return Zh},__experimentalFontAppearanceControl:function(){return Nf},__experimentalFontFamilyControl:function(){return Hf},__experimentalGetBorderClassesAndStyles:function(){return cg},__experimentalGetColorClassesAndStyles:function(){return pg},__experimentalGetGradientClass:function(){return Jm},__experimentalGetGradientObjectByGradientValue:function(){return tf},__experimentalGetMatchingVariation:function(){return Tv},__experimentalGetSpacingClassesAndStyles:function(){return fg},__experimentalImageEditingProvider:function(){return cb},__experimentalImageEditor:function(){return kb},__experimentalImageSizeControl:function(){return yb},__experimentalImageURLInputUI:function(){return Kk},__experimentalLayoutStyle:function(){return Mo},__experimentalLetterSpacingControl:function(){return gh},__experimentalLibrary:function(){return r_},__experimentalLinkControl:function(){return $b},__experimentalLinkControlSearchInput:function(){return Ob},__experimentalLinkControlSearchItem:function(){return xb},__experimentalLinkControlSearchResults:function(){return Pb},__experimentalListView:function(){return uv},__experimentalPanelColorGradientSettings:function(){return mf},__experimentalPreviewOptions:function(){return qk},__experimentalResponsiveBlockControl:function(){return Nk},__experimentalTextDecorationControl:function(){return rh},__experimentalTextTransformControl:function(){return ph},__experimentalUnitControl:function(){return Dk},__experimentalUseBorderProps:function(){return ug},__experimentalUseColorProps:function(){return mg},__experimentalUseCustomSides:function(){return Fh},__experimentalUseGradient:function(){return of},__experimentalUseNoRecursiveRenders:function(){return E_},__experimentalUseResizeCanvas:function(){return Yk},__unstableBlockSettingsMenuFirstItem:function(){return Np},__unstableEditorStyles:function(){return cu},__unstableIframe:function(){return sc},__unstableInserterMenuExtension:function(){return cd},__unstableRichTextInputEvent:function(){return Rk},__unstableUseBlockSelectionClearer:function(){return Ka},__unstableUseCanvasClickRedirect:function(){return b_},__unstableUseClipboardHandler:function(){return Cp},__unstableUseMouseMoveTypingReset:function(){return c_},__unstableUseTypewriter:function(){return h_},__unstableUseTypingObserver:function(){return u_},createCustomColorsHOC:function(){return _g},getColorClassName:function(){return ym},getColorObjectByAttributeValues:function(){return km},getColorObjectByColorValue:function(){return _m},getFontSize:function(){return jf},getFontSizeClass:function(){return qf},getFontSizeObjectByValue:function(){return Kf},getGradientSlugByValue:function(){return nf},getGradientValueBySlug:function(){return ef},getPxFromCssUnit:function(){return L_},store:function(){return Vn},storeConfig:function(){return zn},transformStyles:function(){return iu},useBlockDisplayInformation:function(){return Rd},useBlockEditContext:function(){return Wn},useBlockProps:function(){return Pa},useCachedTruthy:function(){return hg},useInnerBlocksProps:function(){return sm},useSetting:function(){return mo},validateThemeColors:function(){return C_},validateThemeGradients:function(){return S_},withColorContext:function(){return zv},withColors:function(){return yg},withFontSizes:function(){return Cg}});var e={};n.r(e),n.d(e,{__experimentalGetActiveBlockIdByBlockNames:function(){return Tt},__experimentalGetAllowedBlocks:function(){return ct},__experimentalGetAllowedPatterns:function(){return mt},__experimentalGetBlockListSettingsForBlocks:function(){return kt},__experimentalGetDirectInsertBlock:function(){return ut},__experimentalGetLastBlockAttributeChanges:function(){return Et},__experimentalGetParsedPattern:function(){return dt},__experimentalGetPatternTransformItems:function(){return ht},__experimentalGetPatternsByBlockTypes:function(){return ft},__experimentalGetReusableBlockTitle:function(){return _t},__unstableGetBlockWithoutInnerBlocks:function(){return $},__unstableGetClientIdWithClientIdsTree:function(){return K},__unstableGetClientIdsTree:function(){return q},__unstableIsLastBlockChangeIgnored:function(){return yt},areInnerBlocksControlled:function(){return xt},canInsertBlockType:function(){return Ye},canInsertBlocks:function(){return Ze},canMoveBlock:function(){return Je},canMoveBlocks:function(){return et},canRemoveBlock:function(){return Xe},canRemoveBlocks:function(){return Qe},didAutomaticChange:function(){return Bt},getAdjacentBlockClientId:function(){return me},getBlock:function(){return W},getBlockAttributes:function(){return G},getBlockCount:function(){return J},getBlockHierarchyRootClientId:function(){return de},getBlockIndex:function(){return xe},getBlockInsertionPoint:function(){return Ue},getBlockListSettings:function(){return gt},getBlockMode:function(){return Ae},getBlockName:function(){return H},getBlockOrder:function(){return Ie},getBlockParents:function(){return ce},getBlockParentsByBlockName:function(){return ue},getBlockRootClientId:function(){return ae},getBlockSelectionEnd:function(){return oe},getBlockSelectionStart:function(){return ne},getBlockTransformItems:function(){return st},getBlocks:function(){return j},getBlocksByClientId:function(){return Q},getClientIdsOfDescendants:function(){return Y},getClientIdsWithDescendants:function(){return Z},getDraggedBlockClientIds:function(){return Fe},getFirstMultiSelectedBlockClientId:function(){return _e},getGlobalBlockCount:function(){return X},getInserterItems:function(){return it},getLastMultiSelectedBlockClientId:function(){return ye},getLowestCommonAncestorWithSelectedBlock:function(){return pe},getMultiSelectedBlockClientIds:function(){return be},getMultiSelectedBlocks:function(){return ke},getMultiSelectedBlocksEndClientId:function(){return Be},getMultiSelectedBlocksStartClientId:function(){return we},getNextBlockClientId:function(){return he},getPreviousBlockClientId:function(){return fe},getSelectedBlock:function(){return se},getSelectedBlockClientId:function(){return ie},getSelectedBlockClientIds:function(){return ve},getSelectedBlockCount:function(){return re},getSelectedBlocksInitialCaretPosition:function(){return ge},getSelectionEnd:function(){return te},getSelectionStart:function(){return ee},getSettings:function(){return vt},getTemplate:function(){return $e},getTemplateLock:function(){return je},hasBlockMovingClientId:function(){return wt},hasInserterItems:function(){return at},hasMultiSelection:function(){return Me},hasSelectedBlock:function(){return le},hasSelectedInnerBlock:function(){return Ne},isAncestorBeingDragged:function(){return Ve},isAncestorMultiSelected:function(){return Se},isBlockBeingDragged:function(){return ze},isBlockHighlighted:function(){return It},isBlockInsertionPointVisible:function(){return Ge},isBlockMultiSelected:function(){return Ce},isBlockSelected:function(){return Te},isBlockValid:function(){return U},isBlockWithinSelection:function(){return Pe},isCaretWithinFormattedText:function(){return He},isDraggingBlocks:function(){return Oe},isFirstMultiSelectedBlock:function(){return Ee},isLastBlockChangePersistent:function(){return bt},isMultiSelecting:function(){return Re},isNavigationMode:function(){return St},isSelectionEnabled:function(){return Le},isTyping:function(){return De},isValidTemplate:function(){return We},wasBlockJustInserted:function(){return Nt}});var t={};n.r(t),n.d(t,{__unstableMarkAutomaticChange:function(){return Tn},__unstableMarkLastChangeAsPersistent:function(){return In},__unstableMarkNextChangeAsNotPersistent:function(){return xn},__unstableSaveReusableBlock:function(){return Bn},clearSelectedBlock:function(){return Kt},duplicateBlocks:function(){return Mn},enterFormattedText:function(){return kn},exitFormattedText:function(){return yn},flashBlock:function(){return Dn},hideInsertionPoint:function(){return sn},insertAfterBlock:function(){return Ln},insertBeforeBlock:function(){return Rn},insertBlock:function(){return on},insertBlocks:function(){return rn},insertDefaultBlock:function(){return Cn},mergeBlocks:function(){return un},moveBlockToPosition:function(){return nn},moveBlocksDown:function(){return Jt},moveBlocksToPosition:function(){return tn},moveBlocksUp:function(){return en},multiSelect:function(){return jt},receiveBlocks:function(){return Ft},removeBlock:function(){return pn},removeBlocks:function(){return dn},replaceBlock:function(){return Xt},replaceBlocks:function(){return Zt},replaceInnerBlocks:function(){return mn},resetBlocks:function(){return At},resetSelection:function(){return Ot},selectBlock:function(){return Ht},selectNextBlock:function(){return Gt},selectPreviousBlock:function(){return Ut},selectionChange:function(){return En},setBlockMovingClientId:function(){return Pn},setHasControlledInnerBlocks:function(){return On},setNavigationMode:function(){return Nn},setTemplateValidity:function(){return an},showInsertionPoint:function(){return ln},startDraggingBlocks:function(){return vn},startMultiSelect:function(){return Wt},startTyping:function(){return hn},stopDraggingBlocks:function(){return bn},stopMultiSelect:function(){return $t},stopTyping:function(){return gn},synchronizeTemplate:function(){return cn},toggleBlockHighlight:function(){return An},toggleBlockMode:function(){return fn},toggleSelection:function(){return qt},updateBlock:function(){return Vt},updateBlockAttributes:function(){return zt},updateBlockListSettings:function(){return Sn},updateSettings:function(){return wn},validateBlocksToTemplate:function(){return Dt}});var r=window.wp.blocks,l=window.wp.hooks;function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}(0,l.addFilter)("blocks.registerBlockType","core/compat/migrateLightBlockWrapper",(function(e){const{apiVersion:t=1}=e;return t<2&&(0,r.hasBlockSupport)(e,"lightBlockWrapper",!1)&&(e.apiVersion=2),e}));var s=window.wp.element,a=n(4184),c=n.n(a),u=window.lodash,d=window.wp.compose,p=window.wp.components,m=window.wp.data,f={default:(0,p.createSlotFill)("BlockControls"),block:(0,p.createSlotFill)("BlockControlsBlock"),inline:(0,p.createSlotFill)("BlockFormatControls"),other:(0,p.createSlotFill)("BlockControlsOther"),parent:(0,p.createSlotFill)("BlockControlsParent")},h=window.wp.i18n;const g={insertUsage:{}},v={alignWide:!1,supportsLayout:!0,colors:[{name:(0,h.__)("Black"),slug:"black",color:"#000000"},{name:(0,h.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:(0,h.__)("White"),slug:"white",color:"#ffffff"},{name:(0,h.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:(0,h.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:(0,h.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:(0,h.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:(0,h.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:(0,h.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:(0,h.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:(0,h.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:(0,h.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:(0,h._x)("Small","font size name"),size:13,slug:"small"},{name:(0,h._x)("Normal","font size name"),size:16,slug:"normal"},{name:(0,h._x)("Medium","font size name"),size:20,slug:"medium"},{name:(0,h._x)("Large","font size name"),size:36,slug:"large"},{name:(0,h._x)("Huge","font size name"),size:42,slug:"huge"}],imageDefaultSize:"large",imageSizes:[{slug:"thumbnail",name:(0,h.__)("Thumbnail")},{slug:"medium",name:(0,h.__)("Medium")},{slug:"large",name:(0,h.__)("Large")},{slug:"full",name:(0,h.__)("Full Size")}],imageEditing:!0,maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null,__experimentalCanUserUseUnfilteredHTML:!1,__experimentalBlockDirectory:!1,__mobileEnablePageTemplates:!1,__experimentalBlockPatterns:[],__experimentalBlockPatternCategories:[],__experimentalSpotlightEntityBlocks:[],__unstableGalleryWithImageBlocks:!1,gradients:[{name:(0,h.__)("Vivid cyan blue to vivid purple"),gradient:"linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)",slug:"vivid-cyan-blue-to-vivid-purple"},{name:(0,h.__)("Light green cyan to vivid green cyan"),gradient:"linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)",slug:"light-green-cyan-to-vivid-green-cyan"},{name:(0,h.__)("Luminous vivid amber to luminous vivid orange"),gradient:"linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)",slug:"luminous-vivid-amber-to-luminous-vivid-orange"},{name:(0,h.__)("Luminous vivid orange to vivid red"),gradient:"linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)",slug:"luminous-vivid-orange-to-vivid-red"},{name:(0,h.__)("Very light gray to cyan bluish gray"),gradient:"linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%)",slug:"very-light-gray-to-cyan-bluish-gray"},{name:(0,h.__)("Cool to warm spectrum"),gradient:"linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%)",slug:"cool-to-warm-spectrum"},{name:(0,h.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:(0,h.__)("Blush bordeaux"),gradient:"linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)",slug:"blush-bordeaux"},{name:(0,h.__)("Luminous dusk"),gradient:"linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%)",slug:"luminous-dusk"},{name:(0,h.__)("Pale ocean"),gradient:"linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%)",slug:"pale-ocean"},{name:(0,h.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:(0,h.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}]};function b(e,t,n){return[...e.slice(0,n),...(0,u.castArray)(t),...e.slice(n)]}function k(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const r=[...e];return r.splice(t,o),b(r,e.slice(t,t+o),n)}function _(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n={[t]:[]};return e.forEach((e=>{const{clientId:o,innerBlocks:r}=e;n[t].push(o),Object.assign(n,_(r,o))})),n}function y(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.reduce(((e,n)=>Object.assign(e,{[n.clientId]:t},y(n.innerBlocks,n.clientId))),{})}function E(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.identity;const n={},o=[...e];for(;o.length;){const{innerBlocks:e,...r}=o.shift();o.push(...e),n[r.clientId]=t(r)}return n}function C(e){return E(e,(e=>(0,u.omit)(e,"attributes")))}function S(e){return E(e,(e=>e.attributes))}function w(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return(0,u.reduce)(e[t],((t,o)=>n[o]?t:[...t,o,...w(e,o)]),[])}function B(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&(0,u.isEqual)(e.clientIds,t.clientIds)&&function(e,t){return(0,u.isEqual)((0,u.keys)(e),(0,u.keys)(t))}(e.attributes,t.attributes)}function I(e,t){const n={},o=[...t],r=[...t];for(;o.length;){const e=o.shift();o.push(...e.innerBlocks),r.push(...e.innerBlocks)}for(const e of r)n[e.clientId]={};for(const t of r)n[t.clientId]=Object.assign(n[t.clientId],{...e.byClientId[t.clientId],attributes:e.attributes[t.clientId],innerBlocks:t.innerBlocks.map((e=>n[e.clientId]))});return n}function x(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const r=new Set([]),l=new Set;for(const t of n){let n=o?t:e.parents[t];do{if(e.controlledInnerBlocks[n]){l.add(n);break}r.add(n),n=e.parents[n]}while(void 0!==n)}for(const e of r)t[e]={...t[e]};for(const n of r)t[n].innerBlocks=(e.order[n]||[]).map((e=>t[e]));for(const n of l)t["controlled||"+n]={innerBlocks:(e.order[n]||[]).map((e=>t[e]))};return t}const T=(0,u.flow)(m.combineReducers,(e=>(t,n)=>{if(t&&"SAVE_REUSABLE_BLOCK_SUCCESS"===n.type){const{id:e,updatedId:o}=n;if(e===o)return t;(t={...t}).attributes=(0,u.mapValues)(t.attributes,((n,r)=>{const{name:l}=t.byClientId[r];return"core/block"===l&&n.ref===e?{...n,ref:o}:n}))}return e(t,n)}),(e=>function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;const o=e(t,n);if(o===t)return t;switch(o.tree=t.tree?t.tree:{},n.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const e=I(o,n.blocks);o.tree=x(o,{...o.tree,...e},n.rootClientId?[n.rootClientId]:[""],!0);break}case"UPDATE_BLOCK":o.tree=x(o,{...o.tree,[n.clientId]:{...o.tree[n.clientId],...o.byClientId[n.clientId],attributes:o.attributes[n.clientId]}},[n.clientId],!1);break;case"UPDATE_BLOCK_ATTRIBUTES":{const e=n.clientIds.reduce(((e,t)=>(e[t]={...o.tree[t],attributes:o.attributes[t]},e)),{});o.tree=x(o,{...o.tree,...e},n.clientIds,!1);break}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const e=I(o,n.blocks);o.tree=x(o,{...(0,u.omit)(o.tree,n.replacedClientIds.concat(n.replacedClientIds.map((e=>"controlled||"+e)))),...e},n.blocks.map((e=>e.clientId)),!1);const r=[];for(const e of n.clientIds)void 0===t.parents[e]||""!==t.parents[e]&&!o.byClientId[t.parents[e]]||r.push(t.parents[e]);o.tree=x(o,o.tree,r,!0);break}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":const e=[];for(const r of n.clientIds)void 0===t.parents[r]||""!==t.parents[r]&&!o.byClientId[t.parents[r]]||e.push(t.parents[r]);o.tree=x(o,(0,u.omit)(o.tree,n.removedClientIds.concat(n.removedClientIds.map((e=>"controlled||"+e)))),e,!0);break;case"MOVE_BLOCKS_TO_POSITION":{const e=[];n.fromRootClientId&&e.push(n.fromRootClientId),n.toRootClientId&&e.push(n.toRootClientId),n.fromRootClientId&&n.fromRootClientId||e.push(""),o.tree=x(o,o.tree,e,!0);break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{const e=[n.rootClientId?n.rootClientId:""];o.tree=x(o,o.tree,e,!0);break}case"SAVE_REUSABLE_BLOCK_SUCCESS":{const e=(0,u.keys)((0,u.omitBy)(o.attributes,((e,t)=>"core/block"!==o.byClientId[t].name||e.ref!==n.updatedId)));o.tree=x(o,{...o.tree,...e.reduce(((e,t)=>(e[t]={...o.byClientId[t],attributes:o.attributes[t],innerBlocks:o.tree[t].innerBlocks},e)),{})},e,!1)}}return o}),(e=>(t,n)=>{const o=e=>{let o=e;for(let r=0;r<o.length;r++)!t.order[o[r]]||n.keepControlledInnerBlocks&&n.keepControlledInnerBlocks[o[r]]||(o===e&&(o=[...o]),o.push(...t.order[o[r]]));return o};if(t)switch(n.type){case"REMOVE_BLOCKS":n={...n,type:"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN",removedClientIds:o(n.clientIds)};break;case"REPLACE_BLOCKS":n={...n,type:"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN",replacedClientIds:o(n.clientIds)}}return e(t,n)}),(e=>(t,n)=>{if("REPLACE_INNER_BLOCKS"!==n.type)return e(t,n);const o={};if(Object.keys(t.controlledInnerBlocks).length){const e=[...n.blocks];for(;e.length;){const{innerBlocks:n,...r}=e.shift();e.push(...n),t.controlledInnerBlocks[r.clientId]&&(o[r.clientId]=!0)}}let r=t;t.order[n.rootClientId]&&(r=e(r,{type:"REMOVE_BLOCKS",keepControlledInnerBlocks:o,clientIds:t.order[n.rootClientId]}));let l=r;return n.blocks.length&&(l=e(l,{...n,type:"INSERT_BLOCKS",index:0}),l.order={...l.order,...(0,u.reduce)(o,((e,n,o)=>(t.order[o]&&(e[o]=t.order[o]),e)),{})}),l}),(e=>(t,n)=>{if("RESET_BLOCKS"===n.type){var o,r,l;const e=w(null!==(o=null==t?void 0:t.order)&&void 0!==o?o:{},"",null!==(r=null==t?void 0:t.controlledInnerBlocks)&&void 0!==r?r:{}),i=Object.keys((0,u.pickBy)(null!==(l=null==t?void 0:t.controlledInnerBlocks)&&void 0!==l?l:{})),s={...t,byClientId:{...(0,u.omit)(null==t?void 0:t.byClientId,e),...C(n.blocks)},attributes:{...(0,u.omit)(null==t?void 0:t.attributes,e),...S(n.blocks)},order:{...(0,u.omit)(null==t?void 0:t.order,e),...(0,u.omit)(_(n.blocks),i)},parents:{...(0,u.omit)(null==t?void 0:t.parents,e),...y(n.blocks)},controlledInnerBlocks:(null==t?void 0:t.controlledInnerBlocks)||{}},a=I(s,n.blocks);return s.tree={...(0,u.omit)(null==t?void 0:t.tree,e),...a,"":{innerBlocks:n.blocks.map((e=>a[e.clientId]))}},s}return e(t,n)}),(function(e){let t,n=!1;return(o,r)=>{let l=e(o,r);const i="MARK_LAST_CHANGE_AS_PERSISTENT"===r.type||n;if(o===l&&!i){var s;n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===r.type;const e=null===(s=null==o?void 0:o.isPersistentChange)||void 0===s||s;return o.isPersistentChange===e?o:{...l,isPersistentChange:e}}return l={...l,isPersistentChange:i?!n:!B(r,t)},t=r,n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===r.type,l}}),(function(e){const t=new Set(["RECEIVE_BLOCKS"]);return(n,o)=>{const r=e(n,o);return r!==n&&(r.isIgnoredChange=t.has(o.type)),r}}))({byClientId(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return{...e,...C(t.blocks)};case"UPDATE_BLOCK":if(!e[t.clientId])return e;const n=(0,u.omit)(t.updates,"attributes");return(0,u.isEmpty)(n)?e:{...e,[t.clientId]:{...e[t.clientId],...n}};case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?{...(0,u.omit)(e,t.replacedClientIds),...C(t.blocks)}:e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,u.omit)(e,t.removedClientIds)}return e},attributes(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return{...e,...S(t.blocks)};case"UPDATE_BLOCK":return e[t.clientId]&&t.updates.attributes?{...e,[t.clientId]:{...e[t.clientId],...t.updates.attributes}}:e;case"UPDATE_BLOCK_ATTRIBUTES":{if(t.clientIds.every((t=>!e[t])))return e;const n=t.clientIds.reduce(((n,o)=>({...n,[o]:(0,u.reduce)(t.uniqueByBlock?t.attributes[o]:t.attributes,((t,n,r)=>{var l,i;return n!==t[r]&&((t=(l=e[o])===(i=t)?{...l}:i)[r]=n),t}),e[o])})),{});return t.clientIds.every((t=>n[t]===e[t]))?e:{...e,...n}}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?{...(0,u.omit)(e,t.replacedClientIds),...S(t.blocks)}:e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,u.omit)(e,t.removedClientIds)}return e},order(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":{const n=_(t.blocks);return{...e,...(0,u.omit)(n,""),"":((null==e?void 0:e[""])||[]).concat(n[""])}}case"INSERT_BLOCKS":{const{rootClientId:n=""}=t,o=e[n]||[],r=_(t.blocks,n),{index:l=o.length}=t;return{...e,...r,[n]:b(o,r[n],l)}}case"MOVE_BLOCKS_TO_POSITION":{const{fromRootClientId:n="",toRootClientId:o="",clientIds:r}=t,{index:l=e[o].length}=t;if(n===o){const t=e[o].indexOf(r[0]);return{...e,[o]:k(e[o],t,l,r.length)}}return{...e,[n]:(0,u.without)(e[n],...r),[o]:b(e[o],r,l)}}case"MOVE_BLOCKS_UP":{const{clientIds:n,rootClientId:o=""}=t,r=(0,u.first)(n),l=e[o];if(!l.length||r===(0,u.first)(l))return e;const i=l.indexOf(r);return{...e,[o]:k(l,i,i-1,n.length)}}case"MOVE_BLOCKS_DOWN":{const{clientIds:n,rootClientId:o=""}=t,r=(0,u.first)(n),l=(0,u.last)(n),i=e[o];if(!i.length||l===(0,u.last)(i))return e;const s=i.indexOf(r);return{...e,[o]:k(i,s,s+1,n.length)}}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const{clientIds:n}=t;if(!t.blocks)return e;const o=_(t.blocks);return(0,u.flow)([e=>(0,u.omit)(e,t.replacedClientIds),e=>({...e,...(0,u.omit)(o,"")}),e=>(0,u.mapValues)(e,(e=>(0,u.reduce)(e,((e,t)=>t===n[0]?[...e,...o[""]]:(-1===n.indexOf(t)&&e.push(t),e)),[])))])(e)}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,u.flow)([e=>(0,u.omit)(e,t.removedClientIds),e=>(0,u.mapValues)(e,(e=>(0,u.without)(e,...t.removedClientIds)))])(e)}return e},parents(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":return{...e,...y(t.blocks)};case"INSERT_BLOCKS":return{...e,...y(t.blocks,t.rootClientId||"")};case"MOVE_BLOCKS_TO_POSITION":return{...e,...t.clientIds.reduce(((e,n)=>(e[n]=t.toRootClientId||"",e)),{})};case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return{...(0,u.omit)(e,t.replacedClientIds),...y(t.blocks,e[t.clientIds[0]])};case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,u.omit)(e,t.removedClientIds)}return e},controlledInnerBlocks(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{type:t,clientId:n,hasControlledInnerBlocks:o}=arguments.length>1?arguments[1]:void 0;return"SET_HAS_CONTROLLED_INNER_BLOCKS"===t?{...e,[n]:o}:e}});function N(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CLEAR_SELECTED_BLOCK":return e.clientId?{}:e;case"SELECT_BLOCK":return t.clientId===e.clientId?e:{clientId:t.clientId};case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":return t.updateSelection&&t.blocks.length?{clientId:t.blocks[0].clientId}:e;case"REMOVE_BLOCKS":return t.clientIds&&t.clientIds.length&&-1!==t.clientIds.indexOf(e.clientId)?{}:e;case"REPLACE_BLOCKS":{if(-1===t.clientIds.indexOf(e.clientId))return e;const n=t.blocks[t.indexToSelect]||t.blocks[t.blocks.length-1];return n?n.clientId===e.clientId?e:{clientId:n.clientId}:{}}}return e}var P,M,R=(0,m.combineReducers)({blocks:T,isTyping:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e},draggedBlocks:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e},isCaretWithinFormattedText:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ENTER_FORMATTED_TEXT":return!0;case"EXIT_FORMATTED_TEXT":return!1}return e},selection:function(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;switch(o.type){case"SELECTION_CHANGE":return{selectionStart:{clientId:o.clientId,attributeKey:o.attributeKey,offset:o.startOffset},selectionEnd:{clientId:o.clientId,attributeKey:o.attributeKey,offset:o.endOffset}};case"RESET_SELECTION":const{selectionStart:r,selectionEnd:l}=o;return{selectionStart:r,selectionEnd:l};case"MULTI_SELECT":const{start:i,end:s}=o;return{selectionStart:{clientId:i},selectionEnd:{clientId:s}};case"RESET_BLOCKS":const a=null==n||null===(e=n.selectionStart)||void 0===e?void 0:e.clientId,c=null==n||null===(t=n.selectionEnd)||void 0===t?void 0:t.clientId;if(!a&&!c)return n;if(!o.blocks.some((e=>e.clientId===a)))return{selectionStart:{},selectionEnd:{}};if(!o.blocks.some((e=>e.clientId===c)))return{...n,selectionEnd:n.selectionStart}}return{selectionStart:N(n.selectionStart,o),selectionEnd:N(n.selectionEnd,o)}},isMultiSelecting:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e},isSelectionEnabled:function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"TOGGLE_SELECTION":return t.isSelectionEnabled}return e},initialPosition:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"REPLACE_BLOCKS"===t.type&&void 0!==t.initialPosition||["SELECT_BLOCK","RESET_SELECTION","INSERT_BLOCKS","REPLACE_INNER_BLOCKS"].includes(t.type)?t.initialPosition:e},blocksMode:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("TOGGLE_BLOCK_MODE"===t.type){const{clientId:n}=t;return{...e,[n]:e[n]&&"html"===e[n]?"visual":"html"}}return e},blockListSettings:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":return(0,u.omit)(e,t.clientIds);case"UPDATE_BLOCK_LIST_SETTINGS":{const{clientId:n}=t;return t.settings?(0,u.isEqual)(e[n],t.settings)?e:{...e,[n]:t.settings}:e.hasOwnProperty(n)?(0,u.omit)(e,n):e}}return e},insertionPoint:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_INSERTION_POINT":const{rootClientId:e,index:n,__unstableWithInserter:o}=t;return{rootClientId:e,index:n,__unstableWithInserter:o};case"HIDE_INSERTION_POINT":return null}return e},template:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isValid:!0},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_TEMPLATE_VALIDITY":return{...e,isValid:t.isValid}}return e},settings:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_SETTINGS":return{...e,...t.settings}}return e},preferences:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":return t.blocks.reduce(((e,n)=>{const{attributes:o,name:l}=n,i=(0,m.select)(r.store).getActiveBlockVariation(l,o);let s=null!=i&&i.name?`${l}/${i.name}`:l;const a={name:s};return"core/block"===l&&(a.ref=o.ref,s+="/"+o.ref),{...e,insertUsage:{...e.insertUsage,[s]:{time:t.time,count:e.insertUsage[s]?e.insertUsage[s].count+1:1,insert:a}}}}),e)}return e},lastBlockAttributesChange:function(e,t){switch(t.type){case"UPDATE_BLOCK":if(!t.updates.attributes)break;return{[t.clientId]:t.updates.attributes};case"UPDATE_BLOCK_ATTRIBUTES":return t.clientIds.reduce(((e,n)=>({...e,[n]:t.uniqueByBlock?t.attributes[n]:t.attributes})),{})}return null},isNavigationMode:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return"INSERT_BLOCKS"!==t.type&&("SET_NAVIGATION_MODE"===t.type?t.isNavigationMode:e)},hasBlockMovingClientId:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"SET_BLOCK_MOVING_MODE"===t.type?t.hasBlockMovingClientId:"SET_NAVIGATION_MODE"===t.type?null:e},automaticChangeStatus:function(e,t){switch(t.type){case"MARK_AUTOMATIC_CHANGE":return"pending";case"MARK_AUTOMATIC_CHANGE_FINAL":return"pending"===e?"final":void 0;case"SELECTION_CHANGE":return"final"!==e?e:void 0;case"START_TYPING":case"STOP_TYPING":return e}},highlightedBlock:function(e,t){switch(t.type){case"TOGGLE_BLOCK_HIGHLIGHT":const{clientId:n,isHighlighted:o}=t;return o?n:e===n?null:e;case"SELECT_BLOCK":if(t.clientId!==e)return null}return e},lastBlockInserted:function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;switch(n.type){case"INSERT_BLOCKS":return n.blocks.length?{clientId:n.blocks[0].clientId,source:null===(e=n.meta)||void 0===e?void 0:e.source}:t;case"RESET_BLOCKS":return{}}return t}});function L(e){return[e]}function A(){var e={clear:function(){e.head=null}};return e}function D(e,t,n){var o;if(e.length!==t.length)return!1;for(o=n;o<e.length;o++)if(e[o]!==t[o])return!1;return!0}function O(e,t){var n,o;function r(){n=M?new WeakMap:A()}function l(){var n,r,l,i,s,a=arguments.length;for(i=new Array(a),l=0;l<a;l++)i[l]=arguments[l];for(s=t.apply(null,i),(n=o(s)).isUniqueByDependants||(n.lastDependants&&!D(s,n.lastDependants,0)&&n.clear(),n.lastDependants=s),r=n.head;r;){if(D(r.args,i,1))return r!==n.head&&(r.prev.next=r.next,r.next&&(r.next.prev=r.prev),r.next=n.head,r.prev=null,n.head.prev=r,n.head=r),r.val;r=r.next}return r={val:e.apply(null,i)},i[0]=null,r.args=i,n.head&&(n.head.prev=r,r.next=n.head),n.head=r,r.val}return t||(t=L),o=M?function(e){var t,o,r,l,i,s=n,a=!0;for(t=0;t<e.length;t++){if(!(i=o=e[t])||"object"!=typeof i){a=!1;break}s.has(o)?s=s.get(o):(r=new WeakMap,s.set(o,r),s=r)}return s.has(P)||((l=A()).isUniqueByDependants=a,s.set(P,l)),s.get(P)}:function(){return n},l.getDependants=t,l.clear=r,r(),l}P={},M="undefined"!=typeof WeakMap;var F=window.wp.primitives,z=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"}));const V=[];function H(e,t){const n=e.blocks.byClientId[t],o="core/social-link";if("web"!==s.Platform.OS&&(null==n?void 0:n.name)===o){const n=e.blocks.attributes[t],{service:r}=n;return r?`core/social-link-${r}`:o}return n?n.name:null}function U(e,t){const n=e.blocks.byClientId[t];return!!n&&n.isValid}function G(e,t){return e.blocks.byClientId[t]?e.blocks.attributes[t]:null}function W(e,t){return e.blocks.byClientId[t]?e.blocks.tree[t]:null}const $=O(((e,t)=>{const n=e.blocks.byClientId[t];return n?{...n,attributes:G(e,t)}:null}),((e,t)=>[e.blocks.byClientId[t],e.blocks.attributes[t]]));function j(e,t){var n;const o=t&&xt(e,t)?"controlled||"+t:t||"";return(null===(n=e.blocks.tree[o])||void 0===n?void 0:n.innerBlocks)||V}const K=O(((e,t)=>({clientId:t,innerBlocks:q(e,t)})),(e=>[e.blocks.order])),q=O((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(0,u.map)(Ie(e,t),(t=>K(e,t)))}),(e=>[e.blocks.order])),Y=(e,t)=>(0,u.flatMap)(t,(t=>{const n=Ie(e,t);return[...n,...Y(e,n)]})),Z=O((e=>{const t=Ie(e);return[...t,...Y(e,t)]}),(e=>[e.blocks.order])),X=O(((e,t)=>{const n=Z(e);return t?(0,u.reduce)(n,((n,o)=>e.blocks.byClientId[o].name===t?n+1:n),0):n.length}),(e=>[e.blocks.order,e.blocks.byClientId])),Q=O(((e,t)=>(0,u.map)((0,u.castArray)(t),(t=>W(e,t)))),((e,t)=>(0,u.map)((0,u.castArray)(t),(t=>e.blocks.tree[t]))));function J(e,t){return Ie(e,t).length}function ee(e){return e.selection.selectionStart}function te(e){return e.selection.selectionEnd}function ne(e){return e.selection.selectionStart.clientId}function oe(e){return e.selection.selectionEnd.clientId}function re(e){return be(e).length||(e.selection.selectionStart.clientId?1:0)}function le(e){const{selectionStart:t,selectionEnd:n}=e.selection;return!!t.clientId&&t.clientId===n.clientId}function ie(e){const{selectionStart:t,selectionEnd:n}=e.selection,{clientId:o}=t;return o&&o===n.clientId?o:null}function se(e){const t=ie(e);return t?W(e,t):null}function ae(e,t){return void 0!==e.blocks.parents[t]?e.blocks.parents[t]:null}const ce=O((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const o=[];let r=t;for(;e.blocks.parents[r];)r=e.blocks.parents[r],o.push(r);return n?o:o.reverse()}),(e=>[e.blocks.parents])),ue=O((function(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const r=ce(e,t,o);return(0,u.map)((0,u.filter)((0,u.map)(r,(t=>({id:t,name:H(e,t)}))),(e=>{let{name:t}=e;return Array.isArray(n)?n.includes(t):t===n})),(e=>{let{id:t}=e;return t}))}),(e=>[e.blocks.parents]));function de(e,t){let n,o=t;do{n=o,o=e.blocks.parents[o]}while(o);return n}function pe(e,t){const n=ie(e),o=[...ce(e,t),t],r=[...ce(e,n),n];let l;const i=Math.min(o.length,r.length);for(let e=0;e<i&&o[e]===r[e];e++)l=o[e];return l}function me(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(void 0===t&&(t=ie(e)),void 0===t&&(t=n<0?_e(e):ye(e)),!t)return null;const o=ae(e,t);if(null===o)return null;const{order:r}=e.blocks,l=r[o],i=l.indexOf(t),s=i+1*n;return s<0||s===l.length?null:l[s]}function fe(e,t){return me(e,t,-1)}function he(e,t){return me(e,t,1)}function ge(e){return e.initialPosition}const ve=O((e=>{const{selectionStart:t,selectionEnd:n}=e.selection;if(void 0===t.clientId||void 0===n.clientId)return V;if(t.clientId===n.clientId)return[t.clientId];const o=ae(e,t.clientId);if(null===o)return V;const r=Ie(e,o),l=r.indexOf(t.clientId),i=r.indexOf(n.clientId);return l>i?r.slice(i,l+1):r.slice(l,i+1)}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function be(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?V:ve(e)}const ke=O((e=>{const t=be(e);return t.length?t.map((t=>W(e,t))):V}),(e=>[...ve.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]));function _e(e){return(0,u.first)(be(e))||null}function ye(e){return(0,u.last)(be(e))||null}function Ee(e,t){return _e(e)===t}function Ce(e,t){return-1!==be(e).indexOf(t)}const Se=O(((e,t)=>{let n=t,o=!1;for(;n&&!o;)n=ae(e,n),o=Ce(e,n);return o}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function we(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:t.clientId||null}function Be(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:n.clientId||null}function Ie(e,t){return e.blocks.order[t||""]||V}function xe(e,t,n){return Ie(e,n).indexOf(t)}function Te(e,t){const{selectionStart:n,selectionEnd:o}=e.selection;return n.clientId===o.clientId&&n.clientId===t}function Ne(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return(0,u.some)(Ie(e,t),(t=>Te(e,t)||Ce(e,t)||n&&Ne(e,t,n)))}function Pe(e,t){if(!t)return!1;const n=be(e),o=n.indexOf(t);return o>-1&&o<n.length-1}function Me(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId!==n.clientId}function Re(e){return e.isMultiSelecting}function Le(e){return e.isSelectionEnabled}function Ae(e,t){return e.blocksMode[t]||"visual"}function De(e){return e.isTyping}function Oe(e){return!!e.draggedBlocks.length}function Fe(e){return e.draggedBlocks}function ze(e,t){return e.draggedBlocks.includes(t)}function Ve(e,t){if(!Oe(e))return!1;const n=ce(e,t);return(0,u.some)(n,(t=>ze(e,t)))}function He(e){return e.isCaretWithinFormattedText}function Ue(e){let t,n;const{insertionPoint:o,selection:{selectionEnd:r}}=e;if(null!==o)return o;const{clientId:l}=r;return l?(t=ae(e,l)||void 0,n=xe(e,r.clientId,t)+1):n=Ie(e).length,{rootClientId:t,index:n}}function Ge(e){return null!==e.insertionPoint}function We(e){return e.template.isValid}function $e(e){return e.settings.template}function je(e,t){if(!t)return e.settings.templateLock;const n=gt(e,t);return n?n.templateLock:null}const Ke=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return(0,u.isBoolean)(e)?e:(0,u.isArray)(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n},qe=function(e,t){let n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(t&&"object"==typeof t?(n=t,t=n.name):n=(0,r.getBlockType)(t),!n)return!1;const{allowedBlockTypes:l}=vt(e),i=Ke(l,t,!0);if(!i)return!1;const s=!!je(e,o);if(s)return!1;const a=gt(e,o);if(o&&void 0===a)return!1;const c=null==a?void 0:a.allowedBlocks,u=Ke(c,t),d=n.parent,p=H(e,o),m=Ke(d,p);return null!==u&&null!==m?u||m:null!==u?u:null===m||m},Ye=O(qe,((e,t,n)=>[e.blockListSettings[n],e.blocks.byClientId[n],e.settings.allowedBlockTypes,e.settings.templateLock]));function Ze(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>Ye(e,H(e,t),n)))}function Xe(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const o=G(e,t);if(null===o)return!0;const{lock:r}=o,l=!!je(e,n);return void 0===r||void 0===(null==r?void 0:r.remove)?!l:!(null!=r&&r.remove)}function Qe(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>Xe(e,t,n)))}function Je(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const o=G(e,t);if(null===o)return;const{lock:r}=o,l="all"===je(e,n);return void 0===r||void 0===(null==r?void 0:r.move)?!l:!(null!=r&&r.move)}function et(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>Je(e,t,n)))}function tt(e,t){var n,o;return null!==(n=null===(o=e.preferences.insertUsage)||void 0===o?void 0:o[t])&&void 0!==n?n:null}const nt=(e,t,n)=>!!(0,r.hasBlockSupport)(t,"inserter",!0)&&qe(e,t.name,n),ot=(e,t)=>n=>{const o=`${t.id}/${n.name}`,{time:r,count:l=0}=tt(e,o)||{};return{...t,id:o,icon:n.icon||t.icon,title:n.title||t.title,description:n.description||t.description,category:n.category||t.category,example:n.hasOwnProperty("example")?n.example:t.example,initialAttributes:{...t.initialAttributes,...n.attributes},innerBlocks:n.innerBlocks,keywords:n.keywords||t.keywords,frecency:rt(r,l)}},rt=(e,t)=>{if(!e)return t;const n=Date.now()-e;switch(!0){case n<36e5:return 4*t;case n<864e5:return 2*t;case n<6048e5:return t/2;default:return t/4}},lt=(e,t)=>{let{buildScope:n="inserter"}=t;return t=>{const o=t.name;let l=!1;(0,r.hasBlockSupport)(t.name,"multiple",!0)||(l=(0,u.some)(Q(e,Z(e)),{name:t.name}));const{time:i,count:s=0}=tt(e,o)||{},a={id:o,name:t.name,title:t.title,icon:t.icon,isDisabled:l,frecency:rt(i,s)};if("transform"===n)return a;const c=(0,r.getBlockVariations)(t.name,"inserter");return{...a,initialAttributes:{},description:t.description,category:t.category,keywords:t.keywords,variations:c,example:t.example,utility:1}}},it=O((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=lt(e,{buildScope:"inserter"}),o=/^\s*<!--\s+(\/)?wp:([a-z][a-z0-9_-]*\/)?([a-z][a-z0-9_-]*)\s+({(?:(?=([^}]+|}+(?=})|(?!}\s+\/?-->)[^])*)\5|[^]*?)}\s+)?(\/)?-->/,l=t=>{let n=z;if("web"===s.Platform.OS){const e=("string"==typeof t.content.raw?t.content.raw:t.content).match(o);if(e){const[,,t="core/",o]=e,l=(0,r.getBlockType)(t+o);l&&(n=l.icon)}}const l=`core/block/${t.id}`,{time:i,count:a=0}=tt(e,l)||{},c=rt(i,a);return{id:l,name:"core/block",initialAttributes:{ref:t.id},title:t.title.raw,icon:n,category:"reusable",keywords:[],isDisabled:!1,utility:1,frecency:c}},i=(0,r.getBlockTypes)().filter((n=>nt(e,n,t))).map(n),a=qe(e,"core/block",t)?Ct(e).map(l):[],c=i.filter((e=>{let{variations:t=[]}=e;return!t.some((e=>{let{isDefault:t}=e;return t}))})),u=[];for(const t of i){const{variations:n=[]}=t;if(n.length){const o=ot(e,t);u.push(...n.map(o))}}const d=(e,t)=>{const{core:n,noncore:o}=e;return(t.name.startsWith("core/")?n:o).push(t),e},p=c.reduce(d,{core:[],noncore:[]}),m=u.reduce(d,{core:[],noncore:[]}),f=[...p.core,...m.core,...p.noncore,...m.noncore];return[...f,...a]}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,Ct(e),(0,r.getBlockTypes)()])),st=O((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const o=lt(e,{buildScope:"transform"}),l=(0,r.getBlockTypes)().filter((t=>nt(e,t,n))).map(o),i=(0,u.mapKeys)(l,(e=>{let{name:t}=e;return t})),s=(0,r.getPossibleBlockTransformations)(t).reduce(((e,t)=>(i[null==t?void 0:t.name]&&e.push(i[t.name]),e)),[]),a=(0,u.orderBy)(s,(e=>i[e.name].frecency),"desc");return a}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,(0,r.getBlockTypes)()])),at=O((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=(0,u.some)((0,r.getBlockTypes)(),(n=>nt(e,n,t)));if(n)return!0;const o=qe(e,"core/block",t)&&Ct(e).length>0;return o}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Ct(e),(0,r.getBlockTypes)()])),ct=O((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t)return(0,u.filter)((0,r.getBlockTypes)(),(n=>nt(e,n,t)))}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,(0,r.getBlockTypes)()])),ut=O((function(e){var t,n;let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!o)return;const r=null===(t=e.blockListSettings[o])||void 0===t?void 0:t.__experimentalDefaultBlock,l=null===(n=e.blockListSettings[o])||void 0===n?void 0:n.__experimentalDirectInsert;return r&&l?"function"==typeof l?l(W(e,o))?r:null:r:void 0}),((e,t)=>[e.blockListSettings[t],e.blocks.tree[t]])),dt=O(((e,t)=>{const n=e.settings.__experimentalBlockPatterns.find((e=>{let{name:n}=e;return n===t}));return n?{...n,blocks:(0,r.parse)(n.content)}:null}),(e=>[e.settings.__experimentalBlockPatterns])),pt=O((e=>{const t=e.settings.__experimentalBlockPatterns,{allowedBlockTypes:n}=vt(e);return t.filter((e=>{let{inserter:t=!0}=e;return!!t})).map((t=>{let{name:n}=t;return dt(e,n)})).filter((e=>{let{blocks:t}=e;return((e,t)=>{if((0,u.isBoolean)(t))return t;const n=[...e];for(;n.length>0;){var o;const e=n.shift();if(!Ke(t,e.name||e.blockName,!0))return!1;null===(o=e.innerBlocks)||void 0===o||o.forEach((e=>{n.push(e)}))}return!0})(t,n)}))}),(e=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes])),mt=O((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=pt(e),o=(0,u.filter)(n,(n=>{let{blocks:o}=n;return o.every((n=>{let{name:o}=n;return Ye(e,o,t)}))}));return o}),((e,t)=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes,e.settings.templateLock,e.blockListSettings[t],e.blocks.byClientId[t]])),ft=O((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return V;const o=mt(e,n),r=Array.isArray(t)?t:[t];return o.filter((e=>{var t,n;return null==e||null===(t=e.blockTypes)||void 0===t||null===(n=t.some)||void 0===n?void 0:n.call(t,(e=>r.includes(e)))}))}),((e,t)=>[...mt.getDependants(e,t)])),ht=O((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return V;if(t.some((t=>{let{clientId:n,innerBlocks:o}=t;return o.length||xt(e,n)})))return V;const o=Array.from(new Set(t.map((e=>{let{name:t}=e;return t}))));return ft(e,o,n)}),((e,t)=>[...ft.getDependants(e,t)]));function gt(e,t){return e.blockListSettings[t]}function vt(e){return e.settings}function bt(e){return e.blocks.isPersistentChange}const kt=O((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.reduce(((t,n)=>e.blockListSettings[n]?{...t,[n]:e.blockListSettings[n]}:t),{})}),(e=>[e.blockListSettings])),_t=O(((e,t)=>{var n;const o=(0,u.find)(Ct(e),(e=>e.id===t));return o?null===(n=o.title)||void 0===n?void 0:n.raw:null}),(e=>[Ct(e)]));function yt(e){return e.blocks.isIgnoredChange}function Et(e){return e.lastBlockAttributesChange}function Ct(e){var t,n;return null!==(t=null==e||null===(n=e.settings)||void 0===n?void 0:n.__experimentalReusableBlocks)&&void 0!==t?t:V}function St(e){return e.isNavigationMode}function wt(e){return e.hasBlockMovingClientId}function Bt(e){return!!e.automaticChangeStatus}function It(e,t){return e.highlightedBlock===t}function xt(e,t){return!!e.blocks.controlledInnerBlocks[t]}const Tt=O(((e,t)=>{if(!t.length)return null;const n=ie(e);if(t.includes(H(e,n)))return n;const o=be(e),r=ue(e,n||o[0],t);return r?(0,u.last)(r):null}),((e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]));function Nt(e,t,n){const{lastBlockInserted:o}=e;return o.clientId===t&&o.source===n}var Pt=window.wp.a11y,Mt=window.wp.richText,Rt=window.wp.deprecated,Lt=n.n(Rt);const At=e=>t=>{let{dispatch:n}=t;n({type:"RESET_BLOCKS",blocks:e}),n(Dt(e))},Dt=e=>t=>{let{select:n,dispatch:o}=t;const l=n.getTemplate(),i=n.getTemplateLock(),s=!l||"all"!==i||(0,r.doBlocksMatchTemplate)(e,l);if(s!==n.isValidTemplate())return o.setTemplateValidity(s),s};function Ot(e,t,n){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:n}}function Ft(e){return Lt()('wp.data.dispatch( "core/block-editor" ).receiveBlocks',{since:"5.9",alternative:"resetBlocks or insertBlocks"}),{type:"RECEIVE_BLOCKS",blocks:e}}function zt(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:(0,u.castArray)(e),attributes:t,uniqueByBlock:n}}function Vt(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function Ht(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}const Ut=e=>t=>{let{select:n,dispatch:o}=t;const r=n.getPreviousBlockClientId(e);r&&o.selectBlock(r,-1)},Gt=e=>t=>{let{select:n,dispatch:o}=t;const r=n.getNextBlockClientId(e);r&&o.selectBlock(r)};function Wt(){return{type:"START_MULTI_SELECT"}}function $t(){return{type:"STOP_MULTI_SELECT"}}const jt=(e,t)=>n=>{let{select:o,dispatch:r}=n;if(o.getBlockRootClientId(e)!==o.getBlockRootClientId(t))return;r({type:"MULTI_SELECT",start:e,end:t});const l=o.getSelectedBlockCount();(0,Pt.speak)((0,h.sprintf)(
2
  /* translators: %s: number of selected blocks */
3
- (0,h._n)("%s block selected.","%s blocks selected.",l),l),"assertive")};function Kt(){return{type:"CLEAR_SELECTED_BLOCK"}}function qt(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}function Yt(e,t){var n,o;const l=null!==(n=null==t||null===(o=t.__experimentalPreferredStyleVariations)||void 0===o?void 0:o.value)&&void 0!==n?n:{};return e.map((e=>{var t;const n=e.name;if(!(0,r.hasBlockSupport)(n,"defaultStylePicker",!0))return e;if(!l[n])return e;const o=null===(t=e.attributes)||void 0===t?void 0:t.className;if(null!=o&&o.includes("is-style-"))return e;const{attributes:i={}}=e,s=l[n];return{...e,attributes:{...i,className:`${o||""} is-style-${s}`.trim()}}}))}const Zt=function(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4?arguments[4]:void 0;return l=>{let{select:i,dispatch:s}=l;e=(0,u.castArray)(e),t=Yt((0,u.castArray)(t),i.getSettings());const a=i.getBlockRootClientId((0,u.first)(e));for(let e=0;e<t.length;e++){const n=t[e];if(!i.canInsertBlockType(n.name,a))return}s({type:"REPLACE_BLOCKS",clientIds:e,blocks:t,time:Date.now(),indexToSelect:n,initialPosition:o,meta:r}),s((e=>{let{select:t,dispatch:n}=e;if(t.getBlockCount()>0)return;const{__unstableHasCustomAppender:o}=t.getSettings();o||n.insertDefaultBlock()}))}};function Xt(e,t){return Zt(e,t)}const Qt=e=>(t,n)=>o=>{let{select:r,dispatch:l}=o;r.canMoveBlocks(t,n)&&l({type:e,clientIds:(0,u.castArray)(t),rootClientId:n})},Jt=Qt("MOVE_BLOCKS_DOWN"),en=Qt("MOVE_BLOCKS_UP"),tn=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments.length>3?arguments[3]:void 0;return r=>{let{select:l,dispatch:i}=r;if(l.canMoveBlocks(e,t)){if(t!==n){if(!l.canRemoveBlocks(e,t))return;if(!l.canInsertBlocks(e,n))return}i({type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientIds:e,index:o})}}};function nn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments.length>3?arguments[3]:void 0;return tn([e],t,n,o)}function on(e,t,n,o,r){return rn([e],t,n,o,0,r)}const rn=function(e,t,n){let o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,l=arguments.length>5?arguments[5]:void 0;return i=>{let{select:s,dispatch:a}=i;(0,u.isObject)(r)&&(l=r,r=0,Lt()("meta argument in wp.data.dispatch('core/block-editor')",{since:"10.1",plugin:"Gutenberg",hint:"The meta argument is now the 6th argument of the function"})),e=Yt((0,u.castArray)(e),s.getSettings());const c=[];for(const t of e)s.canInsertBlockType(t.name,n)&&c.push(t);c.length&&a({type:"INSERT_BLOCKS",blocks:c,index:t,rootClientId:n,time:Date.now(),updateSelection:o,initialPosition:o?r:null,meta:l})}};function ln(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{__unstableWithInserter:o}=n;return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t,__unstableWithInserter:o}}function sn(){return{type:"HIDE_INSERTION_POINT"}}function an(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}const cn=()=>e=>{let{select:t,dispatch:n}=e;n({type:"SYNCHRONIZE_TEMPLATE"});const o=t.getBlocks(),l=t.getTemplate(),i=(0,r.synchronizeBlocksWithTemplate)(o,l);n.resetBlocks(i)},un=(e,t)=>n=>{let{select:o,dispatch:l}=n;const i=[e,t];l({type:"MERGE_BLOCKS",blocks:i});const[s,a]=i,c=o.getBlock(s),d=(0,r.getBlockType)(c.name);if(d&&!d.merge)return void l.selectBlock(c.clientId);const p=o.getBlock(a),m=(0,r.getBlockType)(p.name),{clientId:f,attributeKey:h,offset:g}=o.getSelectionStart(),v=(f===s?d:m).attributes[h],b=(f===s||f===a)&&void 0!==h&&void 0!==g&&!!v;v||("number"==typeof h?window.console.error("RichText needs an identifier prop that is the block attribute key of the attribute it controls. Its type is expected to be a string, but was "+typeof h):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));const k=(0,r.cloneBlock)(c),_=(0,r.cloneBlock)(p);if(b){const e=f===s?k:_,t=e.attributes[h],{multiline:n,__unstableMultilineWrapperTags:o,__unstablePreserveWhiteSpace:r}=v,l=(0,Mt.insert)((0,Mt.create)({html:t,multilineTag:n,multilineWrapperTags:o,preserveWhiteSpace:r}),"†",g,g);e.attributes[h]=(0,Mt.toHTMLString)({value:l,multilineTag:n,preserveWhiteSpace:r})}const y=c.name===p.name?[_]:(0,r.switchToBlockType)(_,c.name);if(!y||!y.length)return;const E=d.merge(k.attributes,y[0].attributes);if(b){const e=(0,u.findKey)(E,(e=>"string"==typeof e&&-1!==e.indexOf("†"))),t=E[e],{multiline:n,__unstableMultilineWrapperTags:o,__unstablePreserveWhiteSpace:r}=d.attributes[e],i=(0,Mt.create)({html:t,multilineTag:n,multilineWrapperTags:o,preserveWhiteSpace:r}),s=i.text.indexOf("†"),a=(0,Mt.remove)(i,s,s+1),p=(0,Mt.toHTMLString)({value:a,multilineTag:n,preserveWhiteSpace:r});E[e]=p,l.selectionChange(c.clientId,e,s,s)}l.replaceBlocks([c.clientId,p.clientId],[{...c,attributes:{...c.attributes,...E}},...y.slice(1)],0)},dn=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return n=>{let{select:o,dispatch:r}=n;if(!e||!e.length)return;e=(0,u.castArray)(e);const l=o.getBlockRootClientId(e[0]);o.canRemoveBlocks(e,l)&&(t&&r.selectPreviousBlock(e[0]),r({type:"REMOVE_BLOCKS",clientIds:e}),r((e=>{let{select:t,dispatch:n}=e;if(t.getBlockCount()>0)return;const{__unstableHasCustomAppender:o}=t.getSettings();o||n.insertDefaultBlock()})))}};function pn(e,t){return dn([e],t)}function mn(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:n,initialPosition:n?o:null,time:Date.now()}}function fn(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function hn(){return{type:"START_TYPING"}}function gn(){return{type:"STOP_TYPING"}}function vn(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function bn(){return{type:"STOP_DRAGGING_BLOCKS"}}function kn(){return{type:"ENTER_FORMATTED_TEXT"}}function yn(){return{type:"EXIT_FORMATTED_TEXT"}}function En(e,t,n,o){return{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:o}}function Cn(e,t,n){const o=(0,r.getDefaultBlockName)();if(o)return on((0,r.createBlock)(o,e),n,t)}function Sn(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function wn(e){return{type:"UPDATE_SETTINGS",settings:e}}function Bn(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function In(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function xn(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}const Tn=()=>e=>{let{dispatch:t}=e;t({type:"MARK_AUTOMATIC_CHANGE"});const{requestIdleCallback:n=(e=>setTimeout(e,100))}=window;n((()=>{t({type:"MARK_AUTOMATIC_CHANGE_FINAL"})}))},Nn=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return t=>{let{dispatch:n}=t;n({type:"SET_NAVIGATION_MODE",isNavigationMode:e}),e?(0,Pt.speak)((0,h.__)("You are currently in navigation mode. Navigate blocks using the Tab key and Arrow keys. Use Left and Right Arrow keys to move between nesting levels. To exit navigation mode and edit the selected block, press Enter.")):(0,Pt.speak)((0,h.__)("You are currently in edit mode. To return to the navigation mode, press Escape."))}},Pn=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t=>{let{dispatch:n}=t;n({type:"SET_BLOCK_MOVING_MODE",hasBlockMovingClientId:e}),e&&(0,Pt.speak)((0,h.__)("Use the Tab key and Arrow keys to choose new block location. Use Left and Right Arrow keys to move between nesting levels. Once location is selected press Enter or Space to move the block."))}},Mn=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return n=>{let{select:o,dispatch:l}=n;if(!e||!e.length)return;const i=o.getBlocksByClientId(e);if((0,u.some)(i,(e=>!e)))return;if(i.map((e=>e.name)).some((e=>!(0,r.hasBlockSupport)(e,"multiple",!0))))return;const s=o.getBlockRootClientId(e[0]),a=o.getBlockIndex((0,u.last)((0,u.castArray)(e)),s),c=i.map((e=>(0,r.__experimentalCloneSanitizedBlock)(e)));return l.insertBlocks(c,a+1,s,t),c.length>1&&t&&l.multiSelect((0,u.first)(c).clientId,(0,u.last)(c).clientId),c.map((e=>e.clientId))}},Rn=e=>t=>{let{select:n,dispatch:o}=t;if(!e)return;const r=n.getBlockRootClientId(e);if(n.getTemplateLock(r))return;const l=n.getBlockIndex(e,r);return o.insertDefaultBlock({},r,l)},Ln=e=>t=>{let{select:n,dispatch:o}=t;if(!e)return;const r=n.getBlockRootClientId(e);if(n.getTemplateLock(r))return;const l=n.getBlockIndex(e,r);return o.insertDefaultBlock({},r,l+1)};function An(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}const Dn=e=>async t=>{let{dispatch:n}=t;n(An(e,!0)),await new Promise((e=>setTimeout(e,150))),n(An(e,!1))};function On(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}const Fn="core/block-editor",zn={reducer:R,selectors:e,actions:t,__experimentalUseThunks:!0},Vn=(0,m.createReduxStore)(Fn,{...zn,persist:["preferences"]});(0,m.registerStore)(Fn,{...zn,persist:["preferences"]});const Hn={name:"",isSelected:!1},Un=(0,s.createContext)(Hn),{Provider:Gn}=Un;function Wn(){return(0,s.useContext)(Un)}function $n(){const{isSelected:e,clientId:t,name:n}=Wn();return(0,m.useSelect)((o=>{if(e)return!0;const{getBlockName:r,isFirstMultiSelectedBlock:l,getMultiSelectedBlockClientIds:i}=o(Vn);return!!l(t)&&i().every((e=>r(e)===n))}),[t,e,n])}function jn(e){let{group:t="default",controls:n,children:o,__experimentalShareWithChildBlocks:l=!1}=e;const i=function(e,t){const n=$n(),{clientId:o}=Wn(),l=(0,m.useSelect)((e=>{const{getBlockName:n,hasSelectedInnerBlock:l}=e(Vn),{hasBlockSupport:i}=e(r.store);return t&&i(n(o),"__experimentalExposeControlsToChildren",!1)&&l(o)}),[t,o]);var i;return n?null===(i=f[e])||void 0===i?void 0:i.Fill:l?f.parent.Fill:null}(t,l);return i?(0,s.createElement)(p.__experimentalStyleProvider,{document:document},(0,s.createElement)(i,null,(e=>{const r=(0,u.isEmpty)(e)?null:e;return(0,s.createElement)(p.__experimentalToolbarContext.Provider,{value:r},"default"===t&&(0,s.createElement)(p.ToolbarGroup,{controls:n}),o)}))):null}function Kn(e){let{group:t="default",...n}=e;const o=(0,s.useContext)(p.__experimentalToolbarContext),r=f[t].Slot,l=(0,p.__experimentalUseSlot)(r.__unstableName);return Boolean(l.fills&&l.fills.length)?"default"===t?(0,s.createElement)(r,i({},n,{bubblesVirtually:!0,fillProps:o})):(0,s.createElement)(p.ToolbarGroup,null,(0,s.createElement)(r,i({},n,{bubblesVirtually:!0,fillProps:o}))):null}const qn=jn;qn.Slot=Kn;const Yn=e=>(0,s.createElement)(jn,i({group:"inline"},e));Yn.Slot=e=>(0,s.createElement)(Kn,i({group:"inline"},e));var Zn=qn,Xn=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M5 15h14V9H5v6zm0 4.8h14v-1.5H5v1.5zM5 4.2v1.5h14V4.2H5z"})),Qn=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M4 9v6h14V9H4zm8-4.8H4v1.5h8V4.2zM4 19.8h8v-1.5H4v1.5z"})),Jn=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M7 9v6h10V9H7zM5 19.8h14v-1.5H5v1.5zM5 4.3v1.5h14V4.3H5z"})),eo=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M6 15h14V9H6v6zm6-10.8v1.5h8V4.2h-8zm0 15.6h8v-1.5h-8v1.5z"})),to=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M5 9v6h14V9H5zm11-4.8H8v1.5h8V4.2zM8 19.8h8v-1.5H8v1.5z"})),no=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M5 4v11h14V4H5zm3 15.8h8v-1.5H8v1.5z"})),oo=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})),ro=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M20 9h-7.2V4h-1.6v5H4v6h7.2v5h1.6v-5H20z"})),lo=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})),io=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"})),so=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M14.3 6.7l-1.1 1.1 4 4H4v1.5h13.3l-4.1 4.4 1.1 1.1 5.8-6.3z"})),ao=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M16.2 13.2l-4 4V4h-1.5v13.3l-4.5-4.1-1 1.1 6.2 5.8 5.8-5.8-1-1.1z"}));function co(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.split(",").map((e=>`.editor-styles-wrapper ${e} ${t}`)).join(",")}const uo={"color.palette":e=>void 0===e.colors?void 0:e.colors,"color.gradients":e=>void 0===e.gradients?void 0:e.gradients,"color.custom":e=>void 0===e.disableCustomColors?void 0:!e.disableCustomColors,"color.customGradient":e=>void 0===e.disableCustomGradients?void 0:!e.disableCustomGradients,"typography.fontSizes":e=>void 0===e.fontSizes?void 0:e.fontSizes,"typography.customFontSize":e=>void 0===e.disableCustomFontSizes?void 0:!e.disableCustomFontSizes,"typography.lineHeight":e=>e.enableCustomLineHeight,"spacing.units":e=>{if(void 0!==e.enableCustomUnits)return!0===e.enableCustomUnits?["px","em","rem","vh","vw","%"]:e.enableCustomUnits},"spacing.padding":e=>e.enableCustomSpacing},po={"border.customColor":"border.color","border.customStyle":"border.style","border.customWidth":"border.width","typography.customFontStyle":"typography.fontStyle","typography.customFontWeight":"typography.fontWeight","typography.customLetterSpacing":"typography.letterSpacing","typography.customTextDecorations":"typography.textDecoration","typography.customTextTransforms":"typography.textTransform","border.customRadius":"border.radius","spacing.customMargin":"spacing.margin","spacing.customPadding":"spacing.padding","typography.customLineHeight":"typography.lineHeight"};function mo(e){const{name:t}=Wn();return(0,m.useSelect)((n=>{var o;const l=n(Vn).getSettings(),i=(e=>po[e]||e)(e),s=`__experimentalFeatures.${i}`,a=`__experimentalFeatures.blocks.${t}.${i}`,c=null!==(o=(0,u.get)(l,a))&&void 0!==o?o:(0,u.get)(l,s);var d,p;if(void 0!==c)return r.__EXPERIMENTAL_PATHS_WITH_MERGE[i]?null!==(d=null!==(p=c.user)&&void 0!==p?p:c.theme)&&void 0!==d?d:c.core:c;const m=uo[i]?uo[i](l):void 0;return void 0!==m?m:"typography.dropCap"===i||void 0}),[t,e])}const fo={left:oo,center:ro,right:lo,"space-between":io};var ho=function(e){let{allowedControls:t=["left","center","right","space-between"],isCollapsed:n=!0,onChange:o,value:r,popoverProps:l,isToolbar:a}=e;const c=e=>{o(e===r?void 0:e)},u=r?fo[r]:fo.left,d=[{name:"left",icon:oo,title:(0,h.__)("Justify items left"),isActive:"left"===r,onClick:()=>c("left")},{name:"center",icon:ro,title:(0,h.__)("Justify items center"),isActive:"center"===r,onClick:()=>c("center")},{name:"right",icon:lo,title:(0,h.__)("Justify items right"),isActive:"right"===r,onClick:()=>c("right")},{name:"space-between",icon:io,title:(0,h.__)("Space between items"),isActive:"space-between"===r,onClick:()=>c("space-between")}],m=a?p.ToolbarGroup:p.ToolbarDropdownMenu,f=a?{isCollapsed:n}:{};return(0,s.createElement)(m,i({icon:u,popoverProps:l,label:(0,h.__)("Change items justification"),controls:d.filter((e=>t.includes(e.name)))},f))};function go(e){return(0,s.createElement)(ho,i({},e,{isToolbar:!1}))}function vo(e){return(0,s.createElement)(ho,i({},e,{isToolbar:!0}))}const bo={left:"flex-start",right:"flex-end",center:"center","space-between":"space-between"},ko={left:"flex-start",right:"flex-end",center:"center"},_o=["wrap","nowrap"];var yo={name:"flex",label:(0,h.__)("Flex"),inspectorControls:function(e){let{layout:t={},onChange:n}=e;const{allowOrientation:o=!0}=t;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.Flex,null,(0,s.createElement)(p.FlexItem,null,(0,s.createElement)(Eo,{layout:t,onChange:n})),(0,s.createElement)(p.FlexItem,null,o&&(0,s.createElement)(So,{layout:t,onChange:n}))),(0,s.createElement)(Co,{layout:t,onChange:n}))},toolBarControls:function(e){let{layout:t={},onChange:n,layoutBlockSupport:o}=e;return null!=o&&o.allowSwitching?null:(0,s.createElement)(Zn,{group:"block",__experimentalShareWithChildBlocks:!0},(0,s.createElement)(Eo,{layout:t,onChange:n,isToolbar:!0}))},save:function(e){let{selector:t,layout:n}=e;const{orientation:o="horizontal",setCascadingProperties:r=!1}=n,l=null!==mo("spacing.blockGap"),i=bo[n.justifyContent]||bo.left,a=_o.includes(n.flexWrap)?n.flexWrap:"wrap";let c=`\n\t\tflex-direction: row;\n\t\talign-items: center;\n\t\tjustify-content: ${i};\n\t\t`;r&&(c+=`\n\t\t\t--layout-justification-setting: ${i};\n\t\t\t--layout-direction: row;\n\t\t\t--layout-wrap: ${a};\n\t\t\t--layout-justify: ${i};\n\t\t\t--layout-align: center;\n\t\t\t`);const u=ko[n.justifyContent]||ko.left;let d=`\n\t\tflex-direction: column;\n\t\talign-items: ${u};\n\t\t`;return r&&(d+=`\n\t\t\t--layout-justification-setting: ${u};\n\t\t\t--layout-direction: column;\n\t\t\t--layout-justify: initial;\n\t\t\t--layout-align: ${u};\n\t\t\t`),(0,s.createElement)("style",null,`\n\t\t\t\t${co(t)} {\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\tgap: ${l?"var( --wp--style--block-gap, 0.5em )":"0.5em"};\n\t\t\t\t\tflex-wrap: ${a};\n\t\t\t\t\t${"horizontal"===o?c:d}\n\t\t\t\t}\n\n\t\t\t\t${co(t,"> *")} {\n\t\t\t\t\tmargin: 0;\n\t\t\t\t}\n\t\t\t`)},getOrientation(e){const{orientation:t="horizontal"}=e;return t},getAlignments:()=>[]};function Eo(e){let{layout:t,onChange:n,isToolbar:o=!1}=e;const{justifyContent:r="left",orientation:l="horizontal"}=t,i=e=>{n({...t,justifyContent:e})},a=["left","center","right"];if("horizontal"===l&&a.push("space-between"),o)return(0,s.createElement)(go,{allowedControls:a,value:r,onChange:i,popoverProps:{position:"bottom right",isAlternate:!0}});const c=[{value:"left",icon:oo,label:(0,h.__)("Justify items left")},{value:"center",icon:ro,label:(0,h.__)("Justify items center")},{value:"right",icon:lo,label:(0,h.__)("Justify items right")}];return"horizontal"===l&&c.push({value:"space-between",icon:io,label:(0,h.__)("Space between items")}),(0,s.createElement)("fieldset",{className:"block-editor-hooks__flex-layout-justification-controls"},(0,s.createElement)("legend",null,(0,h.__)("Justification")),(0,s.createElement)("div",null,c.map((e=>{let{value:t,icon:n,label:o}=e;return(0,s.createElement)(p.Button,{key:t,label:o,icon:n,isPressed:r===t,onClick:()=>i(t)})}))))}function Co(e){let{layout:t,onChange:n}=e;const{flexWrap:o="wrap"}=t;return(0,s.createElement)(p.ToggleControl,{label:(0,h.__)("Allow to wrap to multiple lines"),onChange:e=>{n({...t,flexWrap:e?"wrap":"nowrap"})},checked:"wrap"===o})}function So(e){let{layout:t,onChange:n}=e;const{orientation:o="horizontal"}=t;return(0,s.createElement)("fieldset",{className:"block-editor-hooks__flex-layout-orientation-controls"},(0,s.createElement)("legend",null,(0,h.__)("Orientation")),(0,s.createElement)(p.Button,{label:"horizontal",icon:so,isPressed:"horizontal"===o,onClick:()=>n({...t,orientation:"horizontal"})}),(0,s.createElement)(p.Button,{label:"vertical",icon:ao,isPressed:"vertical"===o,onClick:()=>n({...t,orientation:"vertical"})}))}var wo=function(e){let{icon:t,size:n=24,...o}=e;return(0,s.cloneElement)(t,{width:n,height:n,...o})};const Bo=[{name:"default",label:(0,h.__)("Flow"),inspectorControls:function(e){let{layout:t,onChange:n}=e;const{wideSize:o,contentSize:r}=t,l=(0,p.__experimentalUseCustomUnits)({availableUnits:mo("spacing.units")||["%","px","em","rem","vw"]});return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:"block-editor-hooks__layout-controls"},(0,s.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,s.createElement)(p.__experimentalUnitControl,{label:(0,h.__)("Content"),labelPosition:"top",__unstableInputWidth:"80px",value:r||o||"",onChange:e=>{e=0>parseFloat(e)?"0":e,n({...t,contentSize:e})},units:l}),(0,s.createElement)(wo,{icon:Jn})),(0,s.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,s.createElement)(p.__experimentalUnitControl,{label:(0,h.__)("Wide"),labelPosition:"top",__unstableInputWidth:"80px",value:o||r||"",onChange:e=>{e=0>parseFloat(e)?"0":e,n({...t,wideSize:e})},units:l}),(0,s.createElement)(wo,{icon:to}))),(0,s.createElement)("div",{className:"block-editor-hooks__layout-controls-reset"},(0,s.createElement)(p.Button,{variant:"secondary",isSmall:!0,disabled:!r&&!o,onClick:()=>n({contentSize:void 0,wideSize:void 0,inherit:!1})},(0,h.__)("Reset"))),(0,s.createElement)("p",{className:"block-editor-hooks__layout-controls-helptext"},(0,h.__)("Customize the width for all elements that are assigned to the center or wide columns.")))},toolBarControls:function(){return null},save:function(e){let{selector:t,layout:n={}}=e;const{contentSize:o,wideSize:r}=n,l=null!==mo("spacing.blockGap");let i=o||r?`\n\t\t\t\t\t${co(t,"> *")} {\n\t\t\t\t\t\tmax-width: ${null!=o?o:r};\n\t\t\t\t\t\tmargin-left: auto !important;\n\t\t\t\t\t\tmargin-right: auto !important;\n\t\t\t\t\t}\n\n\t\t\t\t\t${co(t,'> [data-align="wide"]')} {\n\t\t\t\t\t\tmax-width: ${null!=r?r:o};\n\t\t\t\t\t}\n\n\t\t\t\t\t${co(t,'> [data-align="full"]')} {\n\t\t\t\t\t\tmax-width: none;\n\t\t\t\t\t}\n\t\t\t\t`:"";return i+=`\n\t\t\t${co(t,'> [data-align="left"]')} {\n\t\t\t\tfloat: left;\n\t\t\t\tmargin-right: 2em;\n\t\t\t}\n\n\t\t\t${co(t,'> [data-align="right"]')} {\n\t\t\t\tfloat: right;\n\t\t\t\tmargin-left: 2em;\n\t\t\t}\n\n\t\t`,l&&(i+=`\n\t\t\t\t${co(t,"> *")} {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-bottom: 0;\n\t\t\t\t}\n\t\t\t\t${co(t,"> * + *")} {\n\t\t\t\t\tmargin-top: var( --wp--style--block-gap );\n\t\t\t\t}\n\t\t\t`),(0,s.createElement)("style",null,i)},getOrientation:()=>"vertical",getAlignments(e){const t=function(e){const{contentSize:t,wideSize:n}=e,o={},r=/^(?!0)\d+(px|em|rem|vw|vh|%)?$/i;return r.test(t)&&(
4
  // translators: %s: container size (i.e. 600px etc)
5
  o.none=(0,h.sprintf)((0,h.__)("Max %s wide"),t)),r.test(n)&&(
6
  // translators: %s: container size (i.e. 600px etc)
7
- o.wide=(0,h.sprintf)((0,h.__)("Max %s wide"),n)),o}(e);if(void 0!==e.alignments)return e.alignments.includes("none")||e.alignments.unshift("none"),e.alignments.map((e=>({name:e,info:t[e]})));const{contentSize:n,wideSize:o}=e,r=[{name:"left"},{name:"center"},{name:"right"}];return n&&r.unshift({name:"full"}),o&&r.unshift({name:"wide",info:t.wide}),r.unshift({name:"none",info:t.none}),r}},yo];function Io(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return Bo.find((t=>t.name===e))}const xo={type:"default"},To=(0,s.createContext)(xo),No=To.Provider;function Po(){return(0,s.useContext)(To)}function Mo(e){let{layout:t={},...n}=e;const o=Io(t.type);return o?(0,s.createElement)(o.save,i({layout:t},n)):null}const Ro=["none","left","center","right","wide","full"],Lo=["wide","full"];function Ao(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ro;e.includes("none")||(e=["none",...e]);const{wideControlsEnabled:t=!1,themeSupportsLayout:n}=(0,m.useSelect)((e=>{const{getSettings:t}=e(Vn),n=t();return{wideControlsEnabled:n.alignWide,themeSupportsLayout:n.supportsLayout}}),[]),o=Po(),r=Io(null==o?void 0:o.type),l=r.getAlignments(o);if(n){const t=l.filter((t=>{let{name:n}=t;return e.includes(n)}));return 1===t.length&&"none"===t[0].name?[]:t}if("default"!==r.name)return[];const{alignments:i=Ro}=o,s=e.filter((e=>(o.alignments||t||!Lo.includes(e))&&i.includes(e))).map((e=>({name:e})));return 1===s.length&&"none"===s[0].name?[]:s}const Do={none:{icon:Xn,title:(0,h.__)("None")},left:{icon:Qn,title:(0,h.__)("Align left")},center:{icon:Jn,title:(0,h.__)("Align center")},right:{icon:eo,title:(0,h.__)("Align right")},wide:{icon:to,title:(0,h.__)("Wide width")},full:{icon:no,title:(0,h.__)("Full width")}},Oo={isAlternate:!0};var Fo=function(e){let{value:t,onChange:n,controls:o,isToolbar:r,isCollapsed:l=!0}=e;const a=Ao(o);if(!a.length)return null;function u(e){n([t,"none"].includes(e)?void 0:e)}const d=Do[t],m=Do.none,f=r?p.ToolbarGroup:p.ToolbarDropdownMenu,g={popoverProps:Oo,icon:d?d.icon:m.icon,label:(0,h.__)("Align"),toggleProps:{describedBy:(0,h.__)("Change alignment")}},v=r||s.Platform.isNative?{isCollapsed:r?l:void 0,controls:a.map((e=>{let{name:n}=e;return{...Do[n],isActive:t===n||!t&&"none"===n,role:l?"menuitemradio":void 0,onClick:()=>u(n)}}))}:{children:e=>{let{onClose:n}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.MenuGroup,{className:"block-editor-block-alignment-control__menu-group"},a.map((e=>{let{name:o,info:r}=e;const{icon:l,title:i}=Do[o],a=o===t||!t&&"none"===o;return(0,s.createElement)(p.MenuItem,{key:o,icon:l,iconPosition:"left",className:c()("components-dropdown-menu__menu-item",{"is-active":a}),isSelected:a,onClick:()=>{u(o),n()},role:"menuitemradio",info:r},i)}))))}};return(0,s.createElement)(f,i({},g,v))};function zo(e){return(0,s.createElement)(Fo,i({},e,{isToolbar:!1}))}function Vo(e){return(0,s.createElement)(Fo,i({},e,{isToolbar:!0}))}const Ho=["left","center","right","wide","full"],Uo=["wide","full"];function Go(e){let t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return t=Array.isArray(e)?Ho.filter((t=>e.includes(t))):!0===e?[...Ho]:[],!o||!0===e&&!n?(0,u.without)(t,...Uo):t}const Wo=(0,d.createHigherOrderComponent)((e=>t=>{const{name:n}=t,o=Ao(Go((0,r.getBlockSupport)(n,"align"),(0,r.hasBlockSupport)(n,"alignWide",!0))).map((e=>{let{name:t}=e;return t}));return(0,s.createElement)(s.Fragment,null,!!o.length&&(0,s.createElement)(Zn,{group:"block",__experimentalShareWithChildBlocks:!0},(0,s.createElement)(zo,{value:t.attributes.align,onChange:e=>{if(!e){var n,o;const l=(0,r.getBlockType)(t.name);(null==l||null===(n=l.attributes)||void 0===n||null===(o=n.align)||void 0===o?void 0:o.default)&&(e="")}t.setAttributes({align:e})},controls:o})),(0,s.createElement)(e,t))}),"withToolbarControls"),$o=(0,d.createHigherOrderComponent)((e=>t=>{const{name:n,attributes:o}=t,{align:l}=o,a=Ao(Go((0,r.getBlockSupport)(n,"align"),(0,r.hasBlockSupport)(n,"alignWide",!0)));if(void 0===l)return(0,s.createElement)(e,t);let c=t.wrapperProps;return a.some((e=>e.name===l))&&(c={...c,"data-align":l}),(0,s.createElement)(e,i({},t,{wrapperProps:c}))}));(0,l.addFilter)("blocks.registerBlockType","core/align/addAttribute",(function(e){return(0,u.has)(e.attributes,["align","type"])||(0,r.hasBlockSupport)(e,"align")&&(e.attributes={...e.attributes,align:{type:"string",enum:[...Ho,""]}}),e})),(0,l.addFilter)("editor.BlockListBlock","core/editor/align/with-data-align",$o),(0,l.addFilter)("editor.BlockEdit","core/editor/align/with-toolbar-controls",Wo),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",(function(e,t,n){const{align:o}=n;return Go((0,r.getBlockSupport)(t,"align"),(0,r.hasBlockSupport)(t,"alignWide",!0)).includes(o)&&(e.className=c()(`align${o}`,e.className)),e})),(0,l.addFilter)("blocks.registerBlockType","core/lock/addAttribute",(function(e){return(0,u.has)(e.attributes,["lock","type"])||(e.attributes={...e.attributes,lock:{type:"object"}}),e})),window.wp.warning;var jo={default:(0,p.createSlotFill)("InspectorControls"),advanced:(0,p.createSlotFill)("InspectorAdvancedControls"),dimensions:(0,p.createSlotFill)("InspectorControlsDimensions"),typography:(0,p.createSlotFill)("InspectorControlsTypography")};function Ko(e){var t;let{__experimentalGroup:n="default",children:o}=e;const r=$n(),l=null===(t=jo[n])||void 0===t?void 0:t.Fill;return l?r?(0,s.createElement)(p.__experimentalStyleProvider,{document:document},(0,s.createElement)(l,null,(e=>{const t=(0,u.isEmpty)(e)?null:e;return(0,s.createElement)(p.__experimentalToolsPanelContext.Provider,{value:t},o)}))):null:("undefined"!=typeof process&&process.env,null)}const qo=e=>{if(!(0,u.isObject)(e)||Array.isArray(e))return e;const t=(0,u.pickBy)((0,u.mapValues)(e,qo),u.identity);return(0,u.isEmpty)(t)?void 0:t};function Yo(e){let{children:t,group:n,label:o}=e;const{clientId:r,attributes:l}=(0,m.useSelect)((e=>{const{getBlockAttributes:t,getSelectedBlockClientId:n}=e(Vn),o=n();return{clientId:o,attributes:t(o)}}),[]),{updateBlockAttributes:i}=(0,m.useDispatch)(Vn);return(0,s.createElement)(p.__experimentalToolsPanel,{className:`${n}-block-support-panel`,label:o,resetAll:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const{style:t}=l;let n={style:t};e.forEach((e=>{n={...n,...e(n)}})),n={...n,style:qo(n.style)},i(r,n)},key:r,panelId:r,hasInnerWrapper:!0,shouldRenderPlaceholderItems:!0},t)}function Zo(e){let{Slot:t,...n}=e;const o=(0,s.useContext)(p.__experimentalToolsPanelContext);return(0,s.createElement)(t,i({},n,{fillProps:o}))}function Xo(e){var t;let{__experimentalGroup:n="default",bubblesVirtually:o=!0,label:r,...l}=e;const a=null===(t=jo[n])||void 0===t?void 0:t.Slot,c=(0,p.__experimentalUseSlot)(null==a?void 0:a.__unstableName);return a&&c?Boolean(c.fills&&c.fills.length)?r?(0,s.createElement)(Yo,{group:n,label:r},(0,s.createElement)(Zo,i({},l,{bubblesVirtually:o,Slot:a}))):(0,s.createElement)(a,i({},l,{bubblesVirtually:o})):null:("undefined"!=typeof process&&process.env,null)}const Qo=Ko;Qo.Slot=Xo;const Jo=e=>(0,s.createElement)(Ko,i({},e,{__experimentalGroup:"advanced"}));Jo.Slot=e=>(0,s.createElement)(Xo,i({},e,{__experimentalGroup:"advanced"})),Jo.slotName="InspectorAdvancedControls";var er=Qo;const tr=/[\s#]/g,nr=(0,d.createHigherOrderComponent)((e=>t=>{if((0,r.hasBlockSupport)(t.name,"anchor")&&t.isSelected){const n="web"===s.Platform.OS,o=(0,s.createElement)(p.TextControl,{className:"html-anchor-control",label:(0,h.__)("HTML anchor"),help:(0,s.createElement)(s.Fragment,null,(0,h.__)("Enter a word or two — without spaces — to make a unique web address just for this block, called an “anchor.” Then, you’ll be able to link directly to this section of your page."),n&&(0,s.createElement)(p.ExternalLink,{href:(0,h.__)("https://wordpress.org/support/article/page-jumps/")},(0,h.__)("Learn more about anchors"))),value:t.attributes.anchor||"",placeholder:n?null:(0,h.__)("Add an anchor"),onChange:e=>{e=e.replace(tr,"-"),t.setAttributes({anchor:e})},autoCapitalize:"none",autoComplete:"off"});return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(e,t),n&&(0,s.createElement)(er,{__experimentalGroup:"advanced"},o),!n&&"core/heading"===t.name&&(0,s.createElement)(er,null,(0,s.createElement)(p.PanelBody,{title:(0,h.__)("Heading settings")},o)))}return(0,s.createElement)(e,t)}),"withInspectorControl");(0,l.addFilter)("blocks.registerBlockType","core/anchor/attribute",(function(e){return(0,u.has)(e.attributes,["anchor","type"])||(0,r.hasBlockSupport)(e,"anchor")&&(e.attributes={...e.attributes,anchor:{type:"string",source:"attribute",attribute:"id",selector:"*"}}),e})),(0,l.addFilter)("editor.BlockEdit","core/editor/anchor/with-inspector-control",nr),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/anchor/save-props",(function(e,t,n){return(0,r.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor),e}));const or=(0,d.createHigherOrderComponent)((e=>t=>(0,r.hasBlockSupport)(t.name,"customClassName",!0)&&t.isSelected?(0,s.createElement)(s.Fragment,null,(0,s.createElement)(e,t),(0,s.createElement)(er,{__experimentalGroup:"advanced"},(0,s.createElement)(p.TextControl,{autoComplete:"off",label:(0,h.__)("Additional CSS class(es)"),value:t.attributes.className||"",onChange:e=>{t.setAttributes({className:""!==e?e:void 0})},help:(0,h.__)("Separate multiple classes with spaces.")}))):(0,s.createElement)(e,t)),"withInspectorControl");(0,l.addFilter)("blocks.registerBlockType","core/custom-class-name/attribute",(function(e){return(0,r.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes={...e.attributes,className:{type:"string"}}),e})),(0,l.addFilter)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",or),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/custom-class-name/save-props",(function(e,t,n){return(0,r.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=c()(e.className,n.className)),e})),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return(0,r.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=(0,u.uniq)([(0,r.getBlockDefaultClassName)(t.name),...e.className.split(" ")]).join(" ").trim():e.className=(0,r.getBlockDefaultClassName)(t.name)),e}));var rr=window.wp.dom;const lr=(0,s.createContext)({});function ir(e){let{value:t,children:n}=e;const o=(0,s.useContext)(lr),r=(0,s.useMemo)((()=>({...o,...t})),[o,t]);return(0,s.createElement)(lr.Provider,{value:r,children:n})}var sr=lr;const ar={};var cr=(0,p.withFilters)("editor.BlockEdit")((e=>{const{attributes:t={},name:n}=e,o=(0,r.getBlockType)(n),l=(0,s.useContext)(sr),a=(0,s.useMemo)((()=>o&&o.usesContext?(0,u.pick)(l,o.usesContext):ar),[o,l]);if(!o)return null;const d=o.edit||o.save;if(o.apiVersion>1)return(0,s.createElement)(d,i({},e,{context:a}));const p=(0,r.hasBlockSupport)(o,"className",!0)?(0,r.getBlockDefaultClassName)(n):null,m=c()(p,t.className);return(0,s.createElement)(d,i({},e,{context:a,className:m}))}));function ur(e){const{name:t,isSelected:n,clientId:o}=e,r={name:t,isSelected:n,clientId:o};return(0,s.createElement)(Gn,{value:(0,s.useMemo)((()=>r),Object.values(r))},(0,s.createElement)(cr,e))}var dr=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z"})),pr=function(e){let{className:t,actions:n,children:o,secondaryActions:r}=e;return(0,s.createElement)("div",{className:c()(t,"block-editor-warning")},(0,s.createElement)("div",{className:"block-editor-warning__contents"},(0,s.createElement)("p",{className:"block-editor-warning__message"},o),(s.Children.count(n)>0||r)&&(0,s.createElement)("div",{className:"block-editor-warning__actions"},s.Children.count(n)>0&&s.Children.map(n,((e,t)=>(0,s.createElement)("span",{key:t,className:"block-editor-warning__action"},e))),r&&(0,s.createElement)(p.DropdownMenu,{className:"block-editor-warning__secondary",icon:dr,label:(0,h.__)("More options"),popoverProps:{position:"bottom left",className:"block-editor-warning__dropdown"},noIcons:!0},(()=>(0,s.createElement)(p.MenuGroup,null,r.map(((e,t)=>(0,s.createElement)(p.MenuItem,{onClick:e.onClick,key:t},e.title)))))))))},mr=n(7630);function fr(e){let{title:t,rawContent:n,renderedContent:o,action:r,actionText:l,className:i}=e;return(0,s.createElement)("div",{className:i},(0,s.createElement)("div",{className:"block-editor-block-compare__content"},(0,s.createElement)("h2",{className:"block-editor-block-compare__heading"},t),(0,s.createElement)("div",{className:"block-editor-block-compare__html"},n),(0,s.createElement)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor"},(0,s.createElement)(s.RawHTML,null,(0,rr.safeHTML)(o)))),(0,s.createElement)("div",{className:"block-editor-block-compare__action"},(0,s.createElement)(p.Button,{variant:"secondary",tabIndex:"0",onClick:r},l)))}var hr=function(e){let{block:t,onKeep:n,onConvert:o,convertor:l,convertButtonText:i}=e;const a=(d=l(t),(0,u.castArray)(d).map((e=>(0,r.getSaveContent)(e.name,e.attributes,e.innerBlocks))).join(""));var d;const p=(m=t.originalContent,f=a,(0,mr.Kx)(m,f).map(((e,t)=>{const n=c()({"block-editor-block-compare__added":e.added,"block-editor-block-compare__removed":e.removed});return(0,s.createElement)("span",{key:t,className:n},e.value)})));var m,f;return(0,s.createElement)("div",{className:"block-editor-block-compare__wrapper"},(0,s.createElement)(fr,{title:(0,h.__)("Current"),className:"block-editor-block-compare__current",action:n,actionText:(0,h.__)("Convert to HTML"),rawContent:t.originalContent,renderedContent:t.originalContent}),(0,s.createElement)(fr,{title:(0,h.__)("After Conversion"),className:"block-editor-block-compare__converted",action:o,actionText:i,rawContent:p,renderedContent:a}))};const gr=e=>(0,r.rawHandler)({HTML:e.originalContent});var vr=(0,d.compose)([(0,m.withSelect)(((e,t)=>{let{clientId:n}=t;return{block:e(Vn).getBlock(n)}})),(0,m.withDispatch)(((e,t)=>{let{block:n}=t;const{replaceBlock:o}=e(Vn);return{convertToClassic(){o(n.clientId,(e=>(0,r.createBlock)("core/freeform",{content:e.originalContent}))(n))},convertToHTML(){o(n.clientId,(e=>(0,r.createBlock)("core/html",{content:e.originalContent}))(n))},convertToBlocks(){o(n.clientId,gr(n))},attemptBlockRecovery(){o(n.clientId,(e=>{let{name:t,attributes:n,innerBlocks:o}=e;return(0,r.createBlock)(t,n,o)})(n))}}}))])((function(e){let{convertToHTML:t,convertToBlocks:n,convertToClassic:o,attemptBlockRecovery:l,block:i}=e;const a=!!(0,r.getBlockType)("core/html"),[c,u]=(0,s.useState)(!1),d=(0,s.useCallback)((()=>u(!0)),[]),m=(0,s.useCallback)((()=>u(!1)),[]),f=(0,s.useMemo)((()=>[{
8
  // translators: Button to fix block content
9
  title:(0,h._x)("Resolve","imperative verb"),onClick:d},a&&{title:(0,h.__)("Convert to HTML"),onClick:t},{title:(0,h.__)("Convert to Classic Block"),onClick:o}].filter(Boolean)),[d,t,o]);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(pr,{actions:[(0,s.createElement)(p.Button,{key:"recover",onClick:l,variant:"primary"},(0,h.__)("Attempt Block Recovery"))],secondaryActions:f},(0,h.__)("This block contains unexpected or invalid content.")),c&&(0,s.createElement)(p.Modal,{title:// translators: Dialog title to fix block content
10
- (0,h.__)("Resolve Block"),onRequestClose:m,className:"block-editor-block-compare"},(0,s.createElement)(hr,{block:i,onKeep:t,onConvert:n,convertor:gr,convertButtonText:(0,h.__)("Convert to Blocks")})))}));const br=(0,s.createElement)(pr,{className:"block-editor-block-list__block-crash-warning"},(0,h.__)("This block has encountered an error and cannot be previewed."));var kr=()=>br;class _r extends s.Component{constructor(){super(...arguments),this.state={hasError:!1}}componentDidCatch(){this.setState({hasError:!0})}render(){return this.state.hasError?this.props.fallback:this.props.children}}var yr=_r,Er=n(4042),Cr=function(e){let{clientId:t}=e;const[n,o]=(0,s.useState)(""),l=(0,m.useSelect)((e=>e(Vn).getBlock(t)),[t]),{updateBlock:i}=(0,m.useDispatch)(Vn);return(0,s.useEffect)((()=>{o((0,r.getBlockContent)(l))}),[l]),(0,s.createElement)(Er.Z,{className:"block-editor-block-list__block-html-textarea",value:n,onBlur:()=>{const e=(0,r.getBlockType)(l.name);if(!e)return;const s=(0,r.getBlockAttributes)(e,n,l.attributes),a=n||(0,r.getSaveContent)(e,s),c=!n||(0,r.isValidBlockContent)(e,s,a);i(t,{attributes:s,originalContent:a,isValid:c}),n||o({content:a})},onChange:e=>o(e.target.value)})};let Sr=zr();const wr=e=>Ar(e,Sr);let Br=zr();wr.write=e=>Ar(e,Br);let Ir=zr();wr.onStart=e=>Ar(e,Ir);let xr=zr();wr.onFrame=e=>Ar(e,xr);let Tr=zr();wr.onFinish=e=>Ar(e,Tr);let Nr=[];wr.setTimeout=(e,t)=>{let n=wr.now()+t,o=()=>{let e=Nr.findIndex((e=>e.cancel==o));~e&&Nr.splice(e,1),Hr.count-=~e?1:0},r={time:n,handler:e,cancel:o};return Nr.splice(Pr(n),0,r),Hr.count+=1,Dr(),r};let Pr=e=>~(~Nr.findIndex((t=>t.time>e))||~Nr.length);wr.cancel=e=>{Sr.delete(e),Br.delete(e)},wr.sync=e=>{Lr=!0,wr.batchedUpdates(e),Lr=!1},wr.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function o(...e){t=e,wr.onStart(n)}return o.handler=e,o.cancel=()=>{Ir.delete(n),t=null},o};let Mr="undefined"!=typeof window?window.requestAnimationFrame:()=>{};wr.use=e=>Mr=e,wr.now="undefined"!=typeof performance?()=>performance.now():Date.now,wr.batchedUpdates=e=>e(),wr.catch=console.error,wr.frameLoop="always",wr.advance=()=>{"demand"!==wr.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):Fr()};let Rr=-1,Lr=!1;function Ar(e,t){Lr?(t.delete(e),e(0)):(t.add(e),Dr())}function Dr(){Rr<0&&(Rr=0,"demand"!==wr.frameLoop&&Mr(Or))}function Or(){~Rr&&(Mr(Or),wr.batchedUpdates(Fr))}function Fr(){let e=Rr;Rr=wr.now();let t=Pr(Rr);t&&(Vr(Nr.splice(0,t),(e=>e.handler())),Hr.count-=t),Ir.flush(),Sr.flush(e?Math.min(64,Rr-e):16.667),xr.flush(),Br.flush(),Tr.flush()}function zr(){let e=new Set,t=e;return{add(n){Hr.count+=t!=e||e.has(n)?0:1,e.add(n)},delete:n=>(Hr.count-=t==e&&e.has(n)?1:0,e.delete(n)),flush(n){t.size&&(e=new Set,Hr.count-=t.size,Vr(t,(t=>t(n)&&e.add(t))),Hr.count+=e.size,t=e)}}}function Vr(e,t){e.forEach((e=>{try{t(e)}catch(e){wr.catch(e)}}))}const Hr={count:0,clear(){Rr=-1,Nr=[],Ir=zr(),Sr=zr(),xr=zr(),Br=zr(),Tr=zr(),Hr.count=0}};var Ur=n(3804),Gr=n.n(Ur);function Wr(){}const $r={arr:Array.isArray,obj:e=>!!e&&"Object"===e.constructor.name,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e};function jr(e,t){if($r.arr(e)){if(!$r.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}const Kr=(e,t)=>e.forEach(t);function qr(e,t,n){for(const o in e)e.hasOwnProperty(o)&&t.call(n,e[o],o)}const Yr=e=>$r.und(e)?[]:$r.arr(e)?e:[e];function Zr(e,t){if(e.size){const n=Array.from(e);e.clear(),Kr(n,t)}}const Xr=(e,...t)=>Zr(e,(e=>e(...t)));let Qr,Jr,el=null,tl=!1,nl=Wr;var ol=Object.freeze({__proto__:null,get createStringInterpolator(){return Qr},get to(){return Jr},get colors(){return el},get skipAnimation(){return tl},get willAdvance(){return nl},assign:e=>{e.to&&(Jr=e.to),e.now&&(wr.now=e.now),void 0!==e.colors&&(el=e.colors),null!=e.skipAnimation&&(tl=e.skipAnimation),e.createStringInterpolator&&(Qr=e.createStringInterpolator),e.requestAnimationFrame&&wr.use(e.requestAnimationFrame),e.batchedUpdates&&(wr.batchedUpdates=e.batchedUpdates),e.willAdvance&&(nl=e.willAdvance),e.frameLoop&&(wr.frameLoop=e.frameLoop)}});const rl=new Set;let ll=[],il=[],sl=0;const al={get idle(){return!rl.size&&!ll.length},start(e){sl>e.priority?(rl.add(e),wr.onStart(cl)):(ul(e),wr(pl))},advance:pl,sort(e){if(sl)wr.onFrame((()=>al.sort(e)));else{const t=ll.indexOf(e);~t&&(ll.splice(t,1),dl(e))}},clear(){ll=[],rl.clear()}};function cl(){rl.forEach(ul),rl.clear(),wr(pl)}function ul(e){ll.includes(e)||dl(e)}function dl(e){ll.splice(function(t,n){const o=t.findIndex((t=>t.priority>e.priority));return o<0?t.length:o}(ll),0,e)}function pl(e){const t=il;for(let n=0;n<ll.length;n++){const o=ll[n];sl=o.priority,o.idle||(nl(o),o.advance(e),o.idle||t.push(o))}return sl=0,il=ll,il.length=0,ll=t,ll.length>0}const ml="[-+]?\\d*\\.?\\d+",fl=ml+"%";function hl(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}const gl=new RegExp("rgb"+hl(ml,ml,ml)),vl=new RegExp("rgba"+hl(ml,ml,ml,ml)),bl=new RegExp("hsl"+hl(ml,fl,fl)),kl=new RegExp("hsla"+hl(ml,fl,fl,ml)),_l=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,yl=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,El=/^#([0-9a-fA-F]{6})$/,Cl=/^#([0-9a-fA-F]{8})$/;function Sl(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function wl(e,t,n){const o=n<.5?n*(1+t):n+t-n*t,r=2*n-o,l=Sl(r,o,e+1/3),i=Sl(r,o,e),s=Sl(r,o,e-1/3);return Math.round(255*l)<<24|Math.round(255*i)<<16|Math.round(255*s)<<8}function Bl(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function Il(e){return(parseFloat(e)%360+360)%360/360}function xl(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function Tl(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function Nl(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=El.exec(e))?parseInt(t[1]+"ff",16)>>>0:el&&void 0!==el[e]?el[e]:(t=gl.exec(e))?(Bl(t[1])<<24|Bl(t[2])<<16|Bl(t[3])<<8|255)>>>0:(t=vl.exec(e))?(Bl(t[1])<<24|Bl(t[2])<<16|Bl(t[3])<<8|xl(t[4]))>>>0:(t=_l.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Cl.exec(e))?parseInt(t[1],16)>>>0:(t=yl.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=bl.exec(e))?(255|wl(Il(t[1]),Tl(t[2]),Tl(t[3])))>>>0:(t=kl.exec(e))?(wl(Il(t[1]),Tl(t[2]),Tl(t[3]))|xl(t[4]))>>>0:null}(e);return null===t?e:(t=t||0,`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`)}const Pl=(e,t,n)=>{if($r.fun(e))return e;if($r.arr(e))return Pl({range:e,output:t,extrapolate:n});if($r.str(e.output[0]))return Qr(e);const o=e,r=o.output,l=o.range||[0,1],i=o.extrapolateLeft||o.extrapolate||"extend",s=o.extrapolateRight||o.extrapolate||"extend",a=o.easing||(e=>e);return e=>{const t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,l);return function(e,t,n,o,r,l,i,s,a){let c=a?a(e):e;if(c<t){if("identity"===i)return c;"clamp"===i&&(c=t)}if(c>n){if("identity"===s)return c;"clamp"===s&&(c=n)}return o===r?o:t===n?e<=t?o:r:(t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t),c=l(c),o===-1/0?c=-c:r===1/0?c+=o:c=c*(r-o)+o,c)}(e,l[t],l[t+1],r[t],r[t+1],a,i,s,o.map)}};function Ml(){return(Ml=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}const Rl=Symbol.for("FluidValue.get"),Ll=Symbol.for("FluidValue.observers"),Al=e=>Boolean(e&&e[Rl]),Dl=e=>e&&e[Rl]?e[Rl]():e,Ol=e=>e[Ll]||null;function Fl(e,t){let n=e[Ll];n&&n.forEach((e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)}))}class zl{constructor(e){if(this[Rl]=void 0,this[Ll]=void 0,!e&&!(e=this.get))throw Error("Unknown getter");Vl(this,e)}}const Vl=(e,t)=>Gl(e,Rl,t);function Hl(e,t){if(e[Rl]){let n=e[Ll];n||Gl(e,Ll,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function Ul(e,t){let n=e[Ll];if(n&&n.has(t)){const o=n.size-1;o?n.delete(t):e[Ll]=null,e.observerRemoved&&e.observerRemoved(o,t)}}const Gl=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),Wl=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,$l=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi;let jl;const Kl=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,ql=(e,t,n,o,r)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(o)}, ${r})`,Yl=e=>{jl||(jl=el?new RegExp(`(${Object.keys(el).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map((e=>Dl(e).replace($l,Nl).replace(jl,Nl))),n=t.map((e=>e.match(Wl).map(Number))),o=n[0].map(((e,t)=>n.map((e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})))).map((t=>Pl(Ml({},e,{output:t}))));return e=>{let n=0;return t[0].replace(Wl,(()=>String(o[n++](e)))).replace(Kl,ql)}},Zl="react-spring: ",Xl=e=>{const t=e;let n=!1;if("function"!=typeof t)throw new TypeError(`${Zl}once requires a function parameter`);return(...e)=>{n||(t(...e),n=!0)}},Ql=Xl(console.warn),Jl=Xl(console.warn);function ei(e){return $r.str(e)&&("#"==e[0]||/\d/.test(e)||e in(el||{}))}const ti=e=>(0,Ur.useEffect)(e,ni),ni=[];function oi(){const e=(0,Ur.useState)()[1],t=(0,Ur.useState)(ri)[0];return ti(t.unmount),()=>{t.current&&e({})}}function ri(){const e={current:!0,unmount:()=>()=>{e.current=!1}};return e}function li(e){const t=(0,Ur.useRef)();return(0,Ur.useEffect)((()=>{t.current=e})),t.current}const ii="undefined"!=typeof window&&window.document&&window.document.createElement?Ur.useLayoutEffect:Ur.useEffect,si=Symbol.for("Animated:node"),ai=e=>e&&e[si],ci=(e,t)=>{return n=e,o=si,r=t,Object.defineProperty(n,o,{value:r,writable:!0,configurable:!0});var n,o,r},ui=e=>e&&e[si]&&e[si].getPayload();class di{constructor(){this.payload=void 0,ci(this,this)}getPayload(){return this.payload||[]}}class pi extends di{constructor(e){super(),this.done=!0,this.elapsedTime=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.v0=void 0,this.durationProgress=0,this._value=e,$r.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new pi(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return $r.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,$r.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}}class mi extends pi{constructor(e){super(0),this._string=null,this._toString=void 0,this._toString=Pl({output:[e,e]})}static create(e){return new mi(e)}getValue(){let e=this._string;return null==e?this._string=this._toString(this._value):e}setValue(e){if($r.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else{if(!super.setValue(e))return!1;this._string=null}return!0}reset(e){e&&(this._toString=Pl({output:[this.getValue(),e]})),this._value=0,super.reset()}}const fi={dependencies:null};class hi extends di{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return qr(this.source,((n,o)=>{var r;(r=n)&&r[si]===r?t[o]=n.getValue(e):Al(n)?t[o]=Dl(n):e||(t[o]=n)})),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&Kr(this.payload,(e=>e.reset()))}_makePayload(e){if(e){const t=new Set;return qr(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){fi.dependencies&&Al(e)&&fi.dependencies.add(e);const t=ui(e);t&&Kr(t,(e=>this.add(e)))}}class gi extends hi{constructor(e){super(e)}static create(e){return new gi(e)}getValue(){return this.source.map((e=>e.getValue()))}setValue(e){const t=this.getPayload();return e.length==t.length?t.map(((t,n)=>t.setValue(e[n]))).some(Boolean):(super.setValue(e.map(vi)),!0)}}function vi(e){return(ei(e)?mi:pi).create(e)}function bi(e){const t=ai(e);return t?t.constructor:$r.arr(e)?gi:ei(e)?mi:pi}function ki(){return(ki=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}const _i=(e,t)=>{const n=!$r.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,Ur.forwardRef)(((o,r)=>{const l=(0,Ur.useRef)(null),i=n&&(0,Ur.useCallback)((e=>{l.current=function(e,t){return e&&($r.fun(e)?e(t):e.current=t),t}(r,e)}),[r]),[s,a]=function(e,t){const n=new Set;return fi.dependencies=n,e.style&&(e=ki({},e,{style:t.createAnimatedStyle(e.style)})),e=new hi(e),fi.dependencies=null,[e,n]}(o,t),c=oi(),u=()=>{const e=l.current;n&&!e||!1===(!!e&&t.applyAnimatedValues(e,s.getValue(!0)))&&c()},d=new yi(u,a),p=(0,Ur.useRef)();ii((()=>{const e=p.current;p.current=d,Kr(a,(e=>Hl(e,d))),e&&(Kr(e.deps,(t=>Ul(t,e))),wr.cancel(e.update))})),(0,Ur.useEffect)(u,[]),ti((()=>()=>{const e=p.current;Kr(e.deps,(t=>Ul(t,e)))}));const m=t.getComponentProps(s.getValue());return Ur.createElement(e,ki({},m,{ref:i}))}))};class yi{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&wr.write(this.update)}}const Ei=Symbol.for("AnimatedComponent"),Ci=e=>$r.str(e)?e:e&&$r.str(e.displayName)?e.displayName:$r.fun(e)&&e.name||null;function Si(){return(Si=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function wi(e,...t){return $r.fun(e)?e(...t):e}const Bi=(e,t)=>!0===e||!!(t&&e&&($r.fun(e)?e(t):Yr(e).includes(t))),Ii=(e,t)=>$r.obj(e)?t&&e[t]:e,xi=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,Ti=e=>e,Ni=(e,t=Ti)=>{let n=Pi;e.default&&!0!==e.default&&(e=e.default,n=Object.keys(e));const o={};for(const r of n){const n=t(e[r],r);$r.und(n)||(o[r]=n)}return o},Pi=["config","onProps","onStart","onChange","onPause","onResume","onRest"],Mi={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function Ri(e){const t=function(e){const t={};let n=0;if(qr(e,((e,o)=>{Mi[o]||(t[o]=e,n++)})),n)return t}(e);if(t){const n={to:t};return qr(e,((e,o)=>o in t||(n[o]=e))),n}return Si({},e)}function Li(e){return e=Dl(e),$r.arr(e)?e.map(Li):ei(e)?ol.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function Ai(e){for(const t in e)return!0;return!1}function Di(e){return $r.fun(e)||$r.arr(e)&&$r.obj(e[0])}function Oi(e,t){var n;null==(n=e.ref)||n.delete(e),null==t||t.delete(e)}function Fi(e,t){var n;t&&e.ref!==t&&(null==(n=e.ref)||n.delete(e),t.add(e),e.ref=t)}const zi=Si({},{tension:170,friction:26},{mass:1,damping:1,easing:e=>e,clamp:!1});class Vi{constructor(){this.tension=void 0,this.friction=void 0,this.frequency=void 0,this.damping=void 0,this.mass=void 0,this.velocity=0,this.restVelocity=void 0,this.precision=void 0,this.progress=void 0,this.duration=void 0,this.easing=void 0,this.clamp=void 0,this.bounce=void 0,this.decay=void 0,this.round=void 0,Object.assign(this,zi)}}function Hi(e,t){if($r.und(t.decay)){const n=!$r.und(t.tension)||!$r.und(t.friction);!n&&$r.und(t.frequency)&&$r.und(t.damping)&&$r.und(t.mass)||(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}const Ui=[];class Gi{constructor(){this.changed=!1,this.values=Ui,this.toValues=null,this.fromValues=Ui,this.to=void 0,this.from=void 0,this.config=new Vi,this.immediate=!1}}function Wi(e,{key:t,props:n,defaultProps:o,state:r,actions:l}){return new Promise(((i,s)=>{var a;let c,u,d=Bi(null!=(a=n.cancel)?a:null==o?void 0:o.cancel,t);if(d)f();else{$r.und(n.pause)||(r.paused=Bi(n.pause,t));let e=null==o?void 0:o.pause;!0!==e&&(e=r.paused||Bi(e,t)),c=wi(n.delay||0,t),e?(r.resumeQueue.add(m),l.pause()):(l.resume(),m())}function p(){r.resumeQueue.add(m),r.timeouts.delete(u),u.cancel(),c=u.time-wr.now()}function m(){c>0?(u=wr.setTimeout(f,c),r.pauseQueue.add(p),r.timeouts.add(u)):f()}function f(){r.pauseQueue.delete(p),r.timeouts.delete(u),e<=(r.cancelId||0)&&(d=!0);try{l.start(Si({},n,{callId:e,cancel:d}),i)}catch(e){s(e)}}}))}const $i=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?qi(e.get()):t.every((e=>e.noop))?ji(e.get()):Ki(e.get(),t.every((e=>e.finished))),ji=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Ki=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),qi=e=>({value:e,cancelled:!0,finished:!1});function Yi(e,t,n,o){const{callId:r,parentId:l,onRest:i}=t,{asyncTo:s,promise:a}=n;return l||e!==s||t.reset?n.promise=(async()=>{n.asyncId=r,n.asyncTo=e;const c=Ni(t,((e,t)=>"onRest"===t?void 0:e));let u,d;const p=new Promise(((e,t)=>(u=e,d=t))),m=e=>{const t=r<=(n.cancelId||0)&&qi(o)||r!==n.asyncId&&Ki(o,!1);if(t)throw e.result=t,d(e),e},f=(e,t)=>{const l=new Xi,i=new Qi;return(async()=>{if(ol.skipAnimation)throw Zi(n),i.result=Ki(o,!1),d(i),i;m(l);const s=$r.obj(e)?Si({},e):Si({},t,{to:e});s.parentId=r,qr(c,((e,t)=>{$r.und(s[t])&&(s[t]=e)}));const a=await o.start(s);return m(l),n.paused&&await new Promise((e=>{n.resumeQueue.add(e)})),a})()};let h;if(ol.skipAnimation)return Zi(n),Ki(o,!1);try{let t;t=$r.arr(e)?(async e=>{for(const t of e)await f(t)})(e):Promise.resolve(e(f,o.stop.bind(o))),await Promise.all([t.then(u),p]),h=Ki(o.get(),!0,!1)}catch(e){if(e instanceof Xi)h=e.result;else{if(!(e instanceof Qi))throw e;h=e.result}}finally{r==n.asyncId&&(n.asyncId=l,n.asyncTo=l?s:void 0,n.promise=l?a:void 0)}return $r.fun(i)&&wr.batchedUpdates((()=>{i(h,o,o.item)})),h})():a}function Zi(e,t){Zr(e.timeouts,(e=>e.cancel())),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}class Xi extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise."),this.result=void 0}}class Qi extends Error{constructor(){super("SkipAnimationSignal"),this.result=void 0}}const Ji=e=>e instanceof ts;let es=1;class ts extends zl{constructor(...e){super(...e),this.id=es++,this.key=void 0,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=ai(this);return e&&e.getValue()}to(...e){return ol.to(this,e)}interpolate(...e){return Ql(`${Zl}The "interpolate" function is deprecated in v9 (use "to" instead)`),ol.to(this,e)}toJSON(){return this.get()}observerAdded(e){1==e&&this._attach()}observerRemoved(e){0==e&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){Fl(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||al.sort(this),Fl(this,{type:"priority",parent:this,priority:e})}}const ns=Symbol.for("SpringPhase"),os=e=>(1&e[ns])>0,rs=e=>(2&e[ns])>0,ls=e=>(4&e[ns])>0,is=(e,t)=>t?e[ns]|=3:e[ns]&=-3,ss=(e,t)=>t?e[ns]|=4:e[ns]&=-5;class as extends ts{constructor(e,t){if(super(),this.key=void 0,this.animation=new Gi,this.queue=void 0,this.defaultProps={},this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!$r.und(e)||!$r.und(t)){const n=$r.obj(e)?Si({},e):Si({},t,{from:e});$r.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(rs(this)||this._state.asyncTo)||ls(this)}get goal(){return Dl(this.animation.to)}get velocity(){const e=ai(this);return e instanceof pi?e.lastVelocity||0:e.getPayload().map((e=>e.lastVelocity||0))}get hasAnimated(){return os(this)}get isAnimating(){return rs(this)}get isPaused(){return ls(this)}advance(e){let t=!0,n=!1;const o=this.animation;let{config:r,toValues:l}=o;const i=ui(o.to);!i&&Al(o.to)&&(l=Yr(Dl(o.to))),o.values.forEach(((s,a)=>{if(s.done)return;const c=s.constructor==mi?1:i?i[a].lastPosition:l[a];let u=o.immediate,d=c;if(!u){if(d=s.lastPosition,r.tension<=0)return void(s.done=!0);let t=s.elapsedTime+=e;const n=o.fromValues[a],l=null!=s.v0?s.v0:s.v0=$r.arr(r.velocity)?r.velocity[a]:r.velocity;let i;if($r.und(r.duration))if(r.decay){const e=!0===r.decay?.998:r.decay,o=Math.exp(-(1-e)*t);d=n+l/(1-e)*(1-o),u=Math.abs(s.lastPosition-d)<.1,i=l*o}else{i=null==s.lastVelocity?l:s.lastVelocity;const t=r.precision||(n==c?.005:Math.min(1,.001*Math.abs(c-n))),o=r.restVelocity||t/10,a=r.clamp?0:r.bounce,p=!$r.und(a),m=n==c?s.v0>0:n<c;let f,h=!1;const g=1,v=Math.ceil(e/g);for(let e=0;e<v&&(f=Math.abs(i)>o,f||(u=Math.abs(c-d)<=t,!u));++e)p&&(h=d==c||d>c==m,h&&(i=-i*a,d=c)),i+=(1e-6*-r.tension*(d-c)+.001*-r.friction*i)/r.mass*g,d+=i*g}else{let o=1;r.duration>0&&(this._memoizedDuration!==r.duration&&(this._memoizedDuration=r.duration,s.durationProgress>0&&(s.elapsedTime=r.duration*s.durationProgress,t=s.elapsedTime+=e)),o=(r.progress||0)+t/this._memoizedDuration,o=o>1?1:o<0?0:o,s.durationProgress=o),d=n+r.easing(o)*(c-n),i=(d-s.lastPosition)/e,u=1==o}s.lastVelocity=i,Number.isNaN(d)&&(console.warn("Got NaN while animating:",this),u=!0)}i&&!i[a].done&&(u=!1),u?s.done=!0:t=!1,s.setValue(d,r.round)&&(n=!0)}));const s=ai(this),a=s.getValue();if(t){const e=Dl(o.to);a===e&&!n||r.decay?n&&r.decay&&this._onChange(a):(s.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(a)}set(e){return wr.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(rs(this)){const{to:e,config:t}=this.animation;wr.batchedUpdates((()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()}))}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return $r.und(e)?(n=this.queue||[],this.queue=[]):n=[$r.obj(e)?e:Si({},t,{to:e})],Promise.all(n.map((e=>this._update(e)))).then((e=>$i(this,e)))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),Zi(this._state,e&&this._lastCallId),wr.batchedUpdates((()=>this._stop(t,e))),this}reset(){this._update({reset:!0})}eventObserved(e){"change"==e.type?this._start():"priority"==e.type&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:o}=e;n=$r.obj(n)?n[t]:n,(null==n||Di(n))&&(n=void 0),o=$r.obj(o)?o[t]:o,null==o&&(o=void 0);const r={to:n,from:o};return os(this)||(e.reverse&&([n,o]=[o,n]),o=Dl(o),$r.und(o)?ai(this)||this._set(n):this._set(o)),r}_update(e,t){let n=Si({},e);const{key:o,defaultProps:r}=this;n.default&&Object.assign(r,Ni(n,((e,t)=>/^on/.test(t)?Ii(e,o):e))),hs(this,n,"onProps"),gs(this,"onProps",n,this);const l=this._prepareNode(n);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const i=this._state;return Wi(++this._lastCallId,{key:o,props:n,defaultProps:r,state:i,actions:{pause:()=>{ls(this)||(ss(this,!0),Xr(i.pauseQueue),gs(this,"onPause",Ki(this,cs(this,this.animation.to)),this))},resume:()=>{ls(this)&&(ss(this,!1),rs(this)&&this._resume(),Xr(i.resumeQueue),gs(this,"onResume",Ki(this,cs(this,this.animation.to)),this))},start:this._merge.bind(this,l)}}).then((e=>{if(n.loop&&e.finished&&(!t||!e.noop)){const e=us(n);if(e)return this._update(e,!0)}return e}))}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(qi(this));const o=!$r.und(e.to),r=!$r.und(e.from);if(o||r){if(!(t.callId>this._lastToId))return n(qi(this));this._lastToId=t.callId}const{key:l,defaultProps:i,animation:s}=this,{to:a,from:c}=s;let{to:u=a,from:d=c}=e;!r||o||t.default&&!$r.und(u)||(u=d),t.reverse&&([u,d]=[d,u]);const p=!jr(d,c);p&&(s.from=d),d=Dl(d);const m=!jr(u,a);m&&this._focus(u);const f=Di(t.to),{config:h}=s,{decay:g,velocity:v}=h;(o||r)&&(h.velocity=0),t.config&&!f&&function(e,t,n){n&&(Hi(n=Si({},n),t),t=Si({},n,t)),Hi(e,t),Object.assign(e,t);for(const t in zi)null==e[t]&&(e[t]=zi[t]);let{mass:o,frequency:r,damping:l}=e;$r.und(r)||(r<.01&&(r=.01),l<0&&(l=0),e.tension=Math.pow(2*Math.PI/r,2)*o,e.friction=4*Math.PI*l*o/r)}(h,wi(t.config,l),t.config!==i.config?wi(i.config,l):void 0);let b=ai(this);if(!b||$r.und(u))return n(Ki(this,!0));const k=$r.und(t.reset)?r&&!t.default:!$r.und(d)&&Bi(t.reset,l),_=k?d:this.get(),y=Li(u),E=$r.num(y)||$r.arr(y)||ei(y),C=!f&&(!E||Bi(i.immediate||t.immediate,l));if(m){const e=bi(u);if(e!==b.constructor){if(!C)throw Error(`Cannot animate between ${b.constructor.name} and ${e.name}, as the "to" prop suggests`);b=this._set(y)}}const S=b.constructor;let w=Al(u),B=!1;if(!w){const e=k||!os(this)&&p;(m||e)&&(B=jr(Li(_),y),w=!B),(jr(s.immediate,C)||C)&&jr(h.decay,g)&&jr(h.velocity,v)||(w=!0)}if(B&&rs(this)&&(s.changed&&!k?w=!0:w||this._stop(a)),!f&&((w||Al(a))&&(s.values=b.getPayload(),s.toValues=Al(u)?null:S==mi?[1]:Yr(y)),s.immediate!=C&&(s.immediate=C,C||k||this._set(a)),w)){const{onRest:e}=s;Kr(fs,(e=>hs(this,t,e)));const o=Ki(this,cs(this,a));Xr(this._pendingCalls,o),this._pendingCalls.add(n),s.changed&&wr.batchedUpdates((()=>{s.changed=!k,null==e||e(o,this),k?wi(i.onRest,o):null==s.onStart||s.onStart(o,this)}))}k&&this._set(_),f?n(Yi(t.to,t,this._state,this)):w?this._start():rs(this)&&!m?this._pendingCalls.add(n):n(ji(_))}_focus(e){const t=this.animation;e!==t.to&&(Ol(this)&&this._detach(),t.to=e,Ol(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;Al(t)&&(Hl(t,this),Ji(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;Al(e)&&Ul(e,this)}_set(e,t=!0){const n=Dl(e);if(!$r.und(n)){const e=ai(this);if(!e||!jr(n,e.getValue())){const o=bi(n);e&&e.constructor==o?e.setValue(n):ci(this,o.create(n)),e&&wr.batchedUpdates((()=>{this._onChange(n,t)}))}}return ai(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,gs(this,"onStart",Ki(this,cs(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),wi(this.animation.onChange,e,this)),wi(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;ai(this).reset(Dl(e.to)),e.immediate||(e.fromValues=e.values.map((e=>e.lastPosition))),rs(this)||(is(this,!0),ls(this)||this._resume())}_resume(){ol.skipAnimation?this.finish():al.start(this)}_stop(e,t){if(rs(this)){is(this,!1);const n=this.animation;Kr(n.values,(e=>{e.done=!0})),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Fl(this,{type:"idle",parent:this});const o=t?qi(this.get()):Ki(this.get(),cs(this,null!=e?e:n.to));Xr(this._pendingCalls,o),n.changed&&(n.changed=!1,gs(this,"onRest",o,this))}}}function cs(e,t){const n=Li(t);return jr(Li(e.get()),n)}function us(e,t=e.loop,n=e.to){let o=wi(t);if(o){const r=!0!==o&&Ri(o),l=(r||e).reverse,i=!r||r.reset;return ds(Si({},e,{loop:t,default:!1,pause:void 0,to:!l||Di(n)?n:void 0,from:i?e.from:void 0,reset:i},r))}}function ds(e){const{to:t,from:n}=e=Ri(e),o=new Set;return $r.obj(t)&&ms(t,o),$r.obj(n)&&ms(n,o),e.keys=o.size?Array.from(o):null,e}function ps(e){const t=ds(e);return $r.und(t.default)&&(t.default=Ni(t)),t}function ms(e,t){qr(e,((e,n)=>null!=e&&t.add(n)))}const fs=["onStart","onRest","onChange","onPause","onResume"];function hs(e,t,n){e.animation[n]=t[n]!==xi(t,n)?Ii(t[n],e.key):void 0}function gs(e,t,...n){var o,r,l,i;null==(o=(r=e.animation)[t])||o.call(r,...n),null==(l=(i=e.defaultProps)[t])||l.call(i,...n)}const vs=["onStart","onChange","onRest"];let bs=1;class ks{constructor(e,t){this.id=bs++,this.springs={},this.queue=[],this.ref=void 0,this._flush=void 0,this._initialProps=void 0,this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._item=void 0,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start(Si({default:!0},e))}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every((e=>e.idle))}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each(((t,n)=>e[n]=t.get())),e}set(e){for(const t in e){const n=e[t];$r.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(ds(e)),this}start(e){let{queue:t}=this;return e?t=Yr(e).map(ds):this.queue=[],this._flush?this._flush(this,t):(Bs(this,t),_s(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;Kr(Yr(t),(t=>n[t].stop(!!e)))}else Zi(this._state,this._lastAsyncId),this.each((t=>t.stop(!!e)));return this}pause(e){if($r.und(e))this.start({pause:!0});else{const t=this.springs;Kr(Yr(e),(e=>t[e].pause()))}return this}resume(e){if($r.und(e))this.start({pause:!1});else{const t=this.springs;Kr(Yr(e),(e=>t[e].resume()))}return this}each(e){qr(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,o=this._active.size>0,r=this._changed.size>0;(o&&!this._started||r&&!this._started)&&(this._started=!0,Zr(e,(([e,t])=>{t.value=this.get(),e(t,this,this._item)})));const l=!o&&this._started,i=r||l&&n.size?this.get():null;r&&t.size&&Zr(t,(([e,t])=>{t.value=i,e(t,this,this._item)})),l&&(this._started=!1,Zr(n,(([e,t])=>{t.value=i,e(t,this,this._item)})))}eventObserved(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}wr.onFrame(this._onFrame)}}function _s(e,t){return Promise.all(t.map((t=>ys(e,t)))).then((t=>$i(e,t)))}async function ys(e,t,n){const{keys:o,to:r,from:l,loop:i,onRest:s,onResolve:a}=t,c=$r.obj(t.default)&&t.default;i&&(t.loop=!1),!1===r&&(t.to=null),!1===l&&(t.from=null);const u=$r.arr(r)||$r.fun(r)?r:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):Kr(vs,(n=>{const o=t[n];if($r.fun(o)){const r=e._events[n];t[n]=({finished:e,cancelled:t})=>{const n=r.get(o);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):r.set(o,{value:null,finished:e||!1,cancelled:t||!1})},c&&(c[n]=t[n])}}));const d=e._state;t.pause===!d.paused?(d.paused=t.pause,Xr(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);const p=(o||Object.keys(e.springs)).map((n=>e.springs[n].start(t))),m=!0===t.cancel||!0===xi(t,"cancel");(u||m&&d.asyncId)&&p.push(Wi(++e._lastAsyncId,{props:t,state:d,actions:{pause:Wr,resume:Wr,start(t,n){m?(Zi(d,e._lastAsyncId),n(qi(e))):(t.onRest=s,n(Yi(u,t,d,e)))}}})),d.paused&&await new Promise((e=>{d.resumeQueue.add(e)}));const f=$i(e,await Promise.all(p));if(i&&f.finished&&(!n||!f.noop)){const n=us(t,i,r);if(n)return Bs(e,[n]),ys(e,n,!0)}return a&&wr.batchedUpdates((()=>a(f,e,e.item))),f}function Es(e,t){const n=Si({},e.springs);return t&&Kr(Yr(t),(e=>{$r.und(e.keys)&&(e=ds(e)),$r.obj(e.to)||(e=Si({},e,{to:void 0})),ws(n,e,(e=>Ss(e)))})),Cs(e,n),n}function Cs(e,t){qr(t,((t,n)=>{e.springs[n]||(e.springs[n]=t,Hl(t,e))}))}function Ss(e,t){const n=new as;return n.key=e,t&&Hl(n,t),n}function ws(e,t,n){t.keys&&Kr(t.keys,(o=>{(e[o]||(e[o]=n(o)))._prepareNode(t)}))}function Bs(e,t){Kr(t,(t=>{ws(e.springs,t,(t=>Ss(t,e)))}))}const Is=["children"],xs=e=>{let{children:t}=e,n=function(e,t){if(null==e)return{};var n,o,r={},l=Object.keys(e);for(o=0;o<l.length;o++)n=l[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,Is);const o=(0,Ur.useContext)(Ts),r=n.pause||!!o.pause,l=n.immediate||!!o.immediate;n=function(e,t){const[n]=(0,Ur.useState)((()=>({inputs:t,result:e()}))),o=(0,Ur.useRef)(),r=o.current;let l=r;return l?Boolean(t&&l.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,l.inputs))||(l={inputs:t,result:e()}):l=n,(0,Ur.useEffect)((()=>{o.current=l,r==n&&(n.inputs=n.result=void 0)}),[l]),l.result}((()=>({pause:r,immediate:l})),[r,l]);const{Provider:i}=Ts;return Ur.createElement(i,{value:n},t)},Ts=(Ns=xs,Ps={},Object.assign(Ns,Ur.createContext(Ps)),Ns.Provider._context=Ns,Ns.Consumer._context=Ns,Ns);var Ns,Ps;xs.Provider=Ts.Provider,xs.Consumer=Ts.Consumer;const Ms=()=>{const e=[],t=function(t){Jl(`${Zl}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`);const o=[];return Kr(e,((e,r)=>{if($r.und(t))o.push(e.start());else{const l=n(t,e,r);l&&o.push(e.start(l))}})),o};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){const n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return Kr(e,(e=>e.pause(...arguments))),this},t.resume=function(){return Kr(e,(e=>e.resume(...arguments))),this},t.set=function(t){Kr(e,(e=>e.set(t)))},t.start=function(t){const n=[];return Kr(e,((e,o)=>{if($r.und(t))n.push(e.start());else{const r=this._getProps(t,e,o);r&&n.push(e.start(r))}})),n},t.stop=function(){return Kr(e,(e=>e.stop(...arguments))),this},t.update=function(t){return Kr(e,((e,n)=>e.update(this._getProps(t,e,n)))),this};const n=function(e,t,n){return $r.fun(e)?e(n,t):e};return t._getProps=n,t};function Rs(e,t,n){const o=$r.fun(t)&&t;o&&!n&&(n=[]);const r=(0,Ur.useMemo)((()=>o||3==arguments.length?Ms():void 0),[]),l=(0,Ur.useRef)(0),i=oi(),s=(0,Ur.useMemo)((()=>({ctrls:[],queue:[],flush(e,t){const n=Es(e,t);return l.current>0&&!s.queue.length&&!Object.keys(n).some((t=>!e.springs[t]))?_s(e,t):new Promise((o=>{Cs(e,n),s.queue.push((()=>{o(_s(e,t))})),i()}))}})),[]),a=(0,Ur.useRef)([...s.ctrls]),c=[],u=li(e)||0;function d(e,n){for(let r=e;r<n;r++){const e=a.current[r]||(a.current[r]=new ks(null,s.flush)),n=o?o(r,e):t[r];n&&(c[r]=ps(n))}}(0,Ur.useMemo)((()=>{Kr(a.current.slice(e,u),(e=>{Oi(e,r),e.stop(!0)})),a.current.length=e,d(u,e)}),[e]),(0,Ur.useMemo)((()=>{d(0,Math.min(u,e))}),n);const p=a.current.map(((e,t)=>Es(e,c[t]))),m=(0,Ur.useContext)(xs),f=li(m),h=m!==f&&Ai(m);ii((()=>{l.current++,s.ctrls=a.current;const{queue:e}=s;e.length&&(s.queue=[],Kr(e,(e=>e()))),Kr(a.current,((e,t)=>{null==r||r.add(e),h&&e.start({default:m});const n=c[t];n&&(Fi(e,n.ref),e.ref?e.queue.push(n):e.start(n))}))})),ti((()=>()=>{Kr(s.ctrls,(e=>e.stop(!0)))}));const g=p.map((e=>Si({},e)));return r?[g,r]:g}let Ls;!function(e){e.MOUNT="mount",e.ENTER="enter",e.UPDATE="update",e.LEAVE="leave"}(Ls||(Ls={}));class As extends ts{constructor(e,t){super(),this.key=void 0,this.idle=!0,this.calc=void 0,this._active=new Set,this.source=e,this.calc=Pl(...t);const n=this._get(),o=bi(n);ci(this,o.create(n))}advance(e){const t=this._get();jr(t,this.get())||(ai(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&Os(this._active)&&Fs(this)}_get(){const e=$r.arr(this.source)?this.source.map(Dl):Yr(Dl(this.source));return this.calc(...e)}_start(){this.idle&&!Os(this._active)&&(this.idle=!1,Kr(ui(this),(e=>{e.done=!1})),ol.skipAnimation?(wr.batchedUpdates((()=>this.advance())),Fs(this)):al.start(this))}_attach(){let e=1;Kr(Yr(this.source),(t=>{Al(t)&&Hl(t,this),Ji(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))})),this.priority=e,this._start()}_detach(){Kr(Yr(this.source),(e=>{Al(e)&&Ul(e,this)})),this._active.clear(),Fs(this)}eventObserved(e){"change"==e.type?e.idle?this.advance():(this._active.add(e.parent),this._start()):"idle"==e.type?this._active.delete(e.parent):"priority"==e.type&&(this.priority=Yr(this.source).reduce(((e,t)=>Math.max(e,(Ji(t)?t.priority:0)+1)),0))}}function Ds(e){return!1!==e.idle}function Os(e){return!e.size||Array.from(e).every(Ds)}function Fs(e){e.idle||(e.idle=!0,Kr(ui(e),(e=>{e.done=!0})),Fl(e,{type:"idle",parent:e}))}ol.assign({createStringInterpolator:Yl,to:(e,t)=>new As(e,t)}),al.advance;var zs=window.ReactDOM;function Vs(e,t){if(null==e)return{};var n,o,r={},l=Object.keys(e);for(o=0;o<l.length;o++)n=l[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}const Hs=["style","children","scrollTop","scrollLeft"],Us=/^--/;function Gs(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||Us.test(e)||$s.hasOwnProperty(e)&&$s[e]?(""+t).trim():t+"px"}const Ws={};let $s={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};const js=["Webkit","Ms","Moz","O"];$s=Object.keys($s).reduce(((e,t)=>(js.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),$s);const Ks=["x","y","z"],qs=/^(matrix|translate|scale|rotate|skew)/,Ys=/^(translate)/,Zs=/^(rotate|skew)/,Xs=(e,t)=>$r.num(e)&&0!==e?e+t:e,Qs=(e,t)=>$r.arr(e)?e.every((e=>Qs(e,t))):$r.num(e)?e===t:parseFloat(e)===t;class Js extends hi{constructor(e){let{x:t,y:n,z:o}=e,r=Vs(e,Ks);const l=[],i=[];(t||n||o)&&(l.push([t||0,n||0,o||0]),i.push((e=>[`translate3d(${e.map((e=>Xs(e,"px"))).join(",")})`,Qs(e,0)]))),qr(r,((e,t)=>{if("transform"===t)l.push([e||""]),i.push((e=>[e,""===e]));else if(qs.test(t)){if(delete r[t],$r.und(e))return;const n=Ys.test(t)?"px":Zs.test(t)?"deg":"";l.push(Yr(e)),i.push("rotate3d"===t?([e,t,o,r])=>[`rotate3d(${e},${t},${o},${Xs(r,n)})`,Qs(r,0)]:e=>[`${t}(${e.map((e=>Xs(e,n))).join(",")})`,Qs(e,t.startsWith("scale")?1:0)])}})),l.length&&(r.transform=new ea(l,i)),super(r)}}class ea extends zl{constructor(e,t){super(),this._value=null,this.inputs=e,this.transforms=t}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return Kr(this.inputs,((n,o)=>{const r=Dl(n[0]),[l,i]=this.transforms[o]($r.arr(r)?r:n.map(Dl));e+=" "+l,t=t&&i})),t?"none":e}observerAdded(e){1==e&&Kr(this.inputs,(e=>Kr(e,(e=>Al(e)&&Hl(e,this)))))}observerRemoved(e){0==e&&Kr(this.inputs,(e=>Kr(e,(e=>Al(e)&&Ul(e,this)))))}eventObserved(e){"change"==e.type&&(this._value=null),Fl(this,e)}}const ta=["scrollTop","scrollLeft"];ol.assign({batchedUpdates:zs.unstable_batchedUpdates,createStringInterpolator:Yl,colors:{transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199}});const na=((e,{applyAnimatedValues:t=(()=>!1),createAnimatedStyle:n=(e=>new hi(e)),getComponentProps:o=(e=>e)}={})=>{const r={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:o},l=e=>{const t=Ci(e)||"Anonymous";return(e=$r.str(e)?l[e]||(l[e]=_i(e,r)):e[Ei]||(e[Ei]=_i(e,r))).displayName=`Animated(${t})`,e};return qr(e,((t,n)=>{$r.arr(e)&&(n=Ci(t)),l[n]=l(t)})),{animated:l}})(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],{applyAnimatedValues:function(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,o=t,{style:r,children:l,scrollTop:i,scrollLeft:s}=o,a=Vs(o,Hs),c=Object.values(a),u=Object.keys(a).map((t=>n||e.hasAttribute(t)?t:Ws[t]||(Ws[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())))));void 0!==l&&(e.textContent=l);for(let t in r)if(r.hasOwnProperty(t)){const n=Gs(t,r[t]);Us.test(t)?e.style.setProperty(t,n):e.style[t]=n}u.forEach(((t,n)=>{e.setAttribute(t,c[n])})),void 0!==i&&(e.scrollTop=i),void 0!==s&&(e.scrollLeft=s)},createAnimatedStyle:e=>new Js(e),getComponentProps:e=>Vs(e,ta)}).animated,oa=e=>e+1,ra=e=>({top:e.offsetTop,left:e.offsetLeft});var la=function(e){let{isSelected:t,adjustScrolling:n,enableAnimation:o,triggerAnimationOnChange:r}=e;const l=(0,s.useRef)(),i=(0,d.useReducedMotion)()||!o,[a,c]=(0,s.useReducer)(oa,0),[u,p]=(0,s.useReducer)(oa,0),[m,f]=(0,s.useState)({x:0,y:0}),h=(0,s.useMemo)((()=>l.current?ra(l.current):null),[r]),g=(0,s.useMemo)((()=>{if(!n||!l.current)return()=>{};const e=(0,rr.getScrollContainer)(l.current);if(!e)return()=>{};const t=l.current.getBoundingClientRect();return()=>{const n=l.current.getBoundingClientRect().top-t.top;n&&(e.scrollTop+=n)}}),[r,n]);function v(e){let{value:n}=e,{x:o,y:r}=n;o=Math.round(o),r=Math.round(r),o===v.x&&r===v.y||(function(e){let{x:n,y:o}=e;if(!l.current)return;const r=0===n&&0===o;l.current.style.transformOrigin=r?"":"center",l.current.style.transform=r?"":`translate3d(${n}px,${o}px,0)`,l.current.style.zIndex=!t||r?"":"1",g()}({x:o,y:r}),v.x=o,v.y=r)}return(0,s.useLayoutEffect)((()=>{a&&p()}),[a]),(0,s.useLayoutEffect)((()=>{if(!h)return;if(i)return void g();l.current.style.transform="";const e=ra(l.current);c(),f({x:Math.round(h.left-e.left),y:Math.round(h.top-e.top)})}),[r]),v.x=0,v.y=0,function(e,t){const n=$r.fun(e),[[o],r]=Rs(1,n?e:[e],n?t||[]:t)}({from:{x:m.x,y:m.y},to:{x:0,y:0},reset:a!==u,config:{mass:5,tension:2e3,friction:200},immediate:i,onChange:v}),l};const ia=".block-editor-block-list__block",sa=".block-list-appender";function aa(e,t){return t.closest([ia,sa].join(","))===e}function ca(e){const t=(0,s.useRef)(),n=function(e){return(0,m.useSelect)((t=>{const{getSelectedBlocksInitialCaretPosition:n,isMultiSelecting:o,isNavigationMode:r,isBlockSelected:l}=t(Vn);if(l(e)&&!o()&&!r())return n()}),[e])}(e);return(0,s.useEffect)((()=>{if(null==n)return;if(!t.current)return;const{ownerDocument:e}=t.current;if(t.current.contains(e.activeElement))return;const o=rr.focus.tabbable.find(t.current).filter((e=>(0,rr.isTextField)(e))),r=-1===n,l=(r?u.last:u.first)(o)||t.current;aa(t.current,l)?(0,rr.placeCaretAtHorizontalEdge)(l,r):t.current.focus()}),[n]),t}function ua(e){if(e.defaultPrevented)return;const t="mouseover"===e.type?"add":"remove";e.preventDefault(),e.currentTarget.classList[t]("is-hovered")}function da(){const e=(0,m.useSelect)((e=>{const{isNavigationMode:t,getSettings:n}=e(Vn);return t()||n().outlineMode}),[]);return(0,d.useRefEffect)((t=>{if(e)return t.addEventListener("mouseout",ua),t.addEventListener("mouseover",ua),()=>{t.removeEventListener("mouseout",ua),t.removeEventListener("mouseover",ua),t.classList.remove("is-hovered")}}),[e])}function pa(e){return(0,m.useSelect)((t=>{const{isBlockBeingDragged:n,isBlockHighlighted:o,isBlockSelected:l,isBlockMultiSelected:i,getBlockName:s,getSettings:a,hasSelectedInnerBlock:u,isTyping:d,__experimentalGetActiveBlockIdByBlockNames:p}=t(Vn),{__experimentalSpotlightEntityBlocks:m,outlineMode:f}=a(),h=n(e),g=l(e),v=s(e),b=u(e,!0),k=p(m);return c()({"is-selected":g,"is-highlighted":o(e),"is-multi-selected":i(e),"is-reusable":(0,r.isReusableBlock)((0,r.getBlockType)(v)),"is-dragging":h,"has-child-selected":b,"has-active-entity":k,"is-active-entity":k===e,"remove-outline":g&&f&&d()})}),[e])}function ma(e){return(0,m.useSelect)((t=>{const n=t(Vn).getBlockName(e),o=(0,r.getBlockType)(n);if((null==o?void 0:o.apiVersion)>1)return(0,r.getBlockDefaultClassName)(n)}),[e])}function fa(e){return(0,m.useSelect)((t=>{const{getBlockName:n,getBlockAttributes:o}=t(Vn),l=o(e);if(null==l||!l.className)return;const i=(0,r.getBlockType)(n(e));return(null==i?void 0:i.apiVersion)>1?l.className:void 0}),[e])}function ha(e){return(0,m.useSelect)((t=>{const{hasBlockMovingClientId:n,canInsertBlockType:o,getBlockName:r,getBlockRootClientId:l,isBlockSelected:i}=t(Vn);if(!i(e))return;const s=n();return s?c()("is-block-moving-mode",{"can-insert-moving-block":o(r(s),l(e))}):void 0}),[e])}function ga(e){const{isBlockSelected:t}=(0,m.useSelect)(Vn),{selectBlock:n,selectionChange:o}=(0,m.useDispatch)(Vn);return(0,d.useRefEffect)((r=>{function l(l){t(e)?l.target.isContentEditable||o(e):aa(r,l.target)&&n(e)}return r.addEventListener("focusin",l),()=>{r.removeEventListener("focusin",l)}}),[t,n])}var va=window.wp.keycodes;function ba(e){const t=(0,m.useSelect)((t=>t(Vn).isBlockSelected(e)),[e]),{getBlockRootClientId:n,getBlockIndex:o}=(0,m.useSelect)(Vn),{insertDefaultBlock:r,removeBlock:l}=(0,m.useDispatch)(Vn);return(0,d.useRefEffect)((i=>{if(t)return i.addEventListener("keydown",s),i.addEventListener("dragstart",a),()=>{i.removeEventListener("keydown",s),i.removeEventListener("dragstart",a)};function s(t){const{keyCode:s,target:a}=t;s!==va.ENTER&&s!==va.BACKSPACE&&s!==va.DELETE||a!==i||(0,rr.isTextField)(a)||(t.preventDefault(),s===va.ENTER?r({},n(e),o(e)+1):l(e))}function a(e){e.preventDefault()}}),[e,t,n,o,r,l])}function ka(e){const{isNavigationMode:t,isBlockSelected:n}=(0,m.useSelect)(Vn),{setNavigationMode:o,selectBlock:r}=(0,m.useDispatch)(Vn);return(0,d.useRefEffect)((l=>{function i(l){t()&&!l.defaultPrevented&&(l.preventDefault(),n(e)?o(!1):r(e))}return l.addEventListener("mousedown",i),()=>{l.addEventListener("mousedown",i)}}),[e,t,n,o])}var _a=n(4979),ya=n.n(_a);function Ea(e){const t=(0,s.useRef)(),n=(0,m.useSelect)((t=>{const{isBlockSelected:n,getBlockSelectionEnd:o}=t(Vn);return n(e)||o()===e}),[e]);return(0,s.useEffect)((()=>{if(!n)return;const e=t.current;if(!e)return;if(e.contains(e.ownerDocument.activeElement))return;const o=(0,rr.getScrollContainer)(e)||e.ownerDocument.defaultView;o&&ya()(e,o,{onlyScrollIfNeeded:!0})}),[n]),t}const Ca=(0,s.createContext)();function Sa(e){let{children:t}=e;const n=(0,s.useMemo)((()=>({refs:new Map,callbacks:new Map})),[]);return(0,s.createElement)(Ca.Provider,{value:n},t)}function wa(e){const{refs:t,callbacks:n}=(0,s.useContext)(Ca),o=(0,s.useRef)();return(0,s.useLayoutEffect)((()=>(t.set(o,e),()=>{t.delete(o)})),[e]),(0,d.useRefEffect)((t=>{o.current=t,n.forEach(((n,o)=>{e===n&&o(t)}))}),[e])}function Ba(e){const{refs:t}=(0,s.useContext)(Ca),n=(0,s.useRef)();return n.current=e,(0,s.useMemo)((()=>({get current(){let e=null;for(const[o,r]of t.entries())r===n.current&&o.current&&(e=o.current);return e}})),[])}function Ia(e){const{callbacks:t}=(0,s.useContext)(Ca),n=Ba(e),[o,r]=(0,s.useState)(null);return(0,s.useLayoutEffect)((()=>{if(e)return t.set(r,e),()=>{t.delete(r)}}),[e]),n.current||o}function xa(e,t){Array.from(e.closest(".is-root-container").querySelectorAll(".rich-text")).forEach((e=>{t?e.setAttribute("contenteditable",!0):e.removeAttribute("contenteditable")}))}function Ta(e){const{startMultiSelect:t,stopMultiSelect:n,multiSelect:o,selectBlock:r}=(0,m.useDispatch)(Vn),{isSelectionEnabled:l,isBlockSelected:i,getBlockParents:s,getBlockSelectionStart:a,hasMultiSelection:c}=(0,m.useSelect)(Vn);return(0,d.useRefEffect)((u=>{const{ownerDocument:d}=u,{defaultView:p}=d;let m,f;function h(t){let{isSelectionEnd:n}=t;const l=p.getSelection();if(!l.rangeCount||l.isCollapsed)return void xa(u,!0);const i=function(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;const t=e.closest(ia);return t?t.id.slice("block-".length):void 0}(l.focusNode);if(e===i){if(r(e),n&&(xa(u,!0),l.rangeCount)){const{commonAncestorContainer:e}=l.getRangeAt(0);m.contains(e)&&m.focus()}}else{const t=[...s(e),e],n=[...s(i),i],r=Math.min(t.length,n.length)-1;o(t[r],n[r])}}function g(){d.removeEventListener("selectionchange",h),p.removeEventListener("mouseup",g),f=p.requestAnimationFrame((()=>{h({isSelectionEnd:!0}),n()}))}function v(n){let{buttons:o}=n;1===o&&l()&&i(e)&&(m=d.activeElement,t(),d.addEventListener("selectionchange",h),p.addEventListener("mouseup",g),xa(u,!1))}function b(t){if(l()&&0===t.button)if(t.shiftKey){const n=a(),r=s(n);if(n&&n!==e&&(null==r||!r.includes(e))){const l=[...r,n],i=[...s(e),e],a=Math.min(l.length,i.length)-1,c=l[a],d=i[a];c!==d&&(xa(u,!1),o(c,d),t.preventDefault())}}else c()&&r(e)}return u.addEventListener("mousedown",b),u.addEventListener("mouseleave",v),()=>{u.removeEventListener("mousedown",b),u.removeEventListener("mouseleave",v),d.removeEventListener("selectionchange",h),p.removeEventListener("mouseup",g),p.cancelAnimationFrame(f)}}),[e,t,n,o,r,l,i,s])}function Na(){const e=(0,s.useContext)(um);return(0,d.useRefEffect)((t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}}),[e])}function Pa(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{__unstableIsHtml:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{clientId:n,className:o,wrapperProps:l={},isAligned:i}=(0,s.useContext)(Ma),{index:a,mode:u,name:p,blockApiVersion:f,blockTitle:g,isPartOfSelection:v,adjustScrolling:b,enableAnimation:k}=(0,m.useSelect)((e=>{const{getBlockRootClientId:t,getBlockIndex:o,getBlockMode:l,getBlockName:i,isTyping:s,getGlobalBlockCount:a,isBlockSelected:c,isBlockMultiSelected:u,isAncestorMultiSelected:d,isFirstMultiSelectedBlock:p}=e(Vn),m=c(n),f=u(n)||d(n),h=i(n),g=t(n),v=(0,r.getBlockType)(h);return{index:o(n,g),mode:l(n),name:h,blockApiVersion:(null==v?void 0:v.apiVersion)||1,blockTitle:null==v?void 0:v.title,isPartOfSelection:m||f,adjustScrolling:m||p(n),enableAnimation:!s()&&a()<=200}}),[n]),_=(0,h.sprintf)((0,h.__)("Block: %s"),g),y="html"!==u||t?"":"-visual",E=(0,d.useMergeRefs)([e.ref,ca(n),Ea(n),wa(n),ga(n),Ta(n),ba(n),ka(n),da(),Na(),la({isSelected:v,adjustScrolling:b,enableAnimation:k,triggerAnimationOnChange:a})]),C=Wn();return f<2&&n===C.clientId&&"undefined"!=typeof process&&process.env,{...l,...e,ref:E,id:`block-${n}${y}`,tabIndex:0,role:"document","aria-label":_,"data-block":n,"data-type":p,"data-title":g,className:c()(c()("block-editor-block-list__block",{"wp-block":!i}),o,e.className,l.className,pa(n),ma(n),fa(n),ha(n)),style:{...l.style,...e.style}}}Pa.save=r.__unstableGetBlockProps;const Ma=(0,s.createContext)();function Ra(e){let{children:t,isHtml:n,...o}=e;return(0,s.createElement)("div",Pa(o,{__unstableIsHtml:n}),t)}const La=(0,m.withSelect)(((e,t)=>{let{clientId:n,rootClientId:o}=t;const{isBlockSelected:r,getBlockMode:l,isSelectionEnabled:i,getTemplateLock:s,__unstableGetBlockWithoutInnerBlocks:a,canRemoveBlock:c,canMoveBlock:u}=e(Vn),d=a(n),p=r(n),m=s(o),f=c(n,o),h=u(n,o),{name:g,attributes:v,isValid:b}=d||{};return{mode:l(n),isSelectionEnabled:i(),isLocked:!!m,canRemove:f,canMove:h,block:d,name:g,attributes:v,isValid:b,isSelected:p}})),Aa=(0,m.withDispatch)(((e,t,n)=>{let{select:o}=n;const{updateBlockAttributes:l,insertBlocks:i,mergeBlocks:s,replaceBlocks:a,toggleSelection:c,__unstableMarkLastChangeAsPersistent:u}=e(Vn);return{setAttributes(e){const{getMultiSelectedBlockClientIds:n}=o(Vn),r=n(),{clientId:i}=t,s=r.length?r:[i];l(s,e)},onInsertBlocks(e,n){const{rootClientId:o}=t;i(e,n,o)},onInsertBlocksAfter(e){const{clientId:n,rootClientId:r}=t,{getBlockIndex:l}=o(Vn),s=l(n,r);i(e,s+1,r)},onMerge(e){const{clientId:n}=t,{getPreviousBlockClientId:r,getNextBlockClientId:l}=o(Vn);if(e){const e=l(n);e&&s(n,e)}else{const e=r(n);e&&s(e,n)}},onReplace(e,n,o){e.length&&!(0,r.isUnmodifiedDefaultBlock)(e[e.length-1])&&u(),a([t.clientId],e,n,o)},toggleSelection(e){c(e)}}}));var Da=(0,d.compose)(d.pure,La,Aa,(0,d.ifCondition)((e=>{let{block:t}=e;return!!t})),(0,p.withFilters)("editor.BlockListBlock"))((function(e){let{mode:t,isLocked:n,canRemove:o,clientId:l,isSelected:i,isSelectionEnabled:a,className:d,name:p,isValid:f,attributes:h,wrapperProps:g,setAttributes:v,onReplace:b,onInsertBlocksAfter:k,onMerge:_,toggleSelection:y}=e;const{removeBlock:E}=(0,m.useDispatch)(Vn),C=(0,s.useCallback)((()=>E(l)),[l]);let S=(0,s.createElement)(ur,{name:p,isSelected:i,attributes:h,setAttributes:v,insertBlocksAfter:n?void 0:k,onReplace:o?b:void 0,onRemove:o?C:void 0,mergeBlocks:o?_:void 0,clientId:l,isSelectionEnabled:a,toggleSelection:y});const w=(0,r.getBlockType)(p);null!=w&&w.getEditWrapperProps&&(g=function(e,t){const n={...e,...t};return e&&t&&e.className&&t.className&&(n.className=c()(e.className,t.className)),e&&t&&e.style&&t.style&&(n.style={...e.style,...t.style}),n}(g,w.getEditWrapperProps(h)));const B=g&&!!g["data-align"];let I;if(B&&(S=(0,s.createElement)("div",{className:"wp-block","data-align":g["data-align"]},S)),f)I="html"===t?(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{style:{display:"none"}},S),(0,s.createElement)(Ra,{isHtml:!0},(0,s.createElement)(Cr,{clientId:l}))):(null==w?void 0:w.apiVersion)>1?S:(0,s.createElement)(Ra,g,S);else{const e=(0,r.getSaveContent)(w,h);I=(0,s.createElement)(Ra,{className:"has-warning"},(0,s.createElement)(vr,{clientId:l}),(0,s.createElement)(s.RawHTML,null,(0,rr.safeHTML)(e)))}const x={clientId:l,className:d,wrapperProps:(0,u.omit)(g,["data-align"]),isAligned:B},T=(0,s.useMemo)((()=>x),Object.values(x));return(0,s.createElement)(Ma.Provider,{value:T},(0,s.createElement)(yr,{fallback:(0,s.createElement)(Ra,{className:"has-warning"},(0,s.createElement)(kr,null))},I))})),Oa=window.wp.htmlEntities,Fa=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));const za=[(0,s.createInterpolateElement)((0,h.__)("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:(0,s.createElement)("kbd",null)}),(0,s.createInterpolateElement)((0,h.__)("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:(0,s.createElement)("kbd",null)}),(0,s.createInterpolateElement)((0,h.__)("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:(0,s.createElement)("kbd",null)}),(0,h.__)("Drag files into the editor to automatically insert media blocks."),(0,h.__)("Change a block's type by pressing the block icon on the toolbar.")];var Va=function(){const[e]=(0,s.useState)(Math.floor(Math.random()*za.length));return(0,s.createElement)(p.Tip,null,za[e])},Ha=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"})),Ua=(0,s.memo)((function(e){var t;let{icon:n,showColors:o=!1,className:r}=e;"block-default"===(null===(t=n)||void 0===t?void 0:t.src)&&(n={src:Ha});const l=(0,s.createElement)(p.Icon,{icon:n&&n.src?n.src:n}),i=o?{backgroundColor:n&&n.background,color:n&&n.foreground}:{};return(0,s.createElement)("span",{style:i,className:c()("block-editor-block-icon",r,{"has-colors":o})},l)})),Ga=function(e){let{title:t,icon:n,description:o,blockType:r}=e;return r&&(Lt()("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),({title:t,icon:n,description:o}=r)),(0,s.createElement)("div",{className:"block-editor-block-card"},(0,s.createElement)(Ua,{icon:n,showColors:!0}),(0,s.createElement)("div",{className:"block-editor-block-card__content"},(0,s.createElement)("h2",{className:"block-editor-block-card__title"},t),(0,s.createElement)("span",{className:"block-editor-block-card__description"},o)))};function Wa(e){let{clientId:t=null,value:n,selection:o,onChange:l=u.noop,onInput:i=u.noop}=e;const a=(0,m.useRegistry)(),{resetBlocks:c,resetSelection:d,replaceInnerBlocks:p,setHasControlledInnerBlocks:f,__unstableMarkNextChangeAsNotPersistent:h}=a.dispatch(Vn),{getBlockName:g,getBlocks:v}=a.select(Vn),b=(0,s.useRef)({incoming:null,outgoing:[]}),k=(0,s.useRef)(!1),_=(0,s.useRef)(i),y=(0,s.useRef)(l);(0,s.useEffect)((()=>{_.current=i,y.current=l}),[i,l]),(0,s.useEffect)((()=>{b.current.outgoing.includes(n)?(0,u.last)(b.current.outgoing)===n&&(b.current.outgoing=[]):v(t)!==n&&(b.current.outgoing=[],(()=>{if(n)if(h(),t){f(t,!0),h();const e=n.map((e=>(0,r.cloneBlock)(e)));k.current&&(b.current.incoming=e),p(t,e)}else k.current&&(b.current.incoming=n),c(n)})(),o&&d(o.selectionStart,o.selectionEnd,o.initialPosition))}),[n,t]),(0,s.useEffect)((()=>{const{getSelectionStart:e,getSelectionEnd:n,getSelectedBlocksInitialCaretPosition:o,isLastBlockChangePersistent:r,__unstableIsLastBlockChangeIgnored:l}=a.select(Vn);let i=v(t),s=r(),c=!1;k.current=!0;const u=a.subscribe((()=>{if(null!==t&&null===g(t))return;const a=r(),u=v(t),d=u!==i;if(i=u,d&&(b.current.incoming||l()))return b.current.incoming=null,void(s=a);(d||c&&!d&&a&&!s)&&(s=a,b.current.outgoing.push(i),(s?y.current:_.current)(i,{selection:{selectionStart:e(),selectionEnd:n(),initialPosition:o()}})),c=d}));return()=>u()}),[a,t])}var $a=(0,d.createHigherOrderComponent)((e=>(0,m.withRegistry)((t=>{let{useSubRegistry:n=!0,registry:o,...r}=t;if(!n)return(0,s.createElement)(e,i({registry:o},r));const[l,a]=(0,s.useState)(null);return(0,s.useEffect)((()=>{const e=(0,m.createRegistry)({},o);e.registerStore(Fn,zn),a(e)}),[o]),l?(0,s.createElement)(m.RegistryProvider,{value:l},(0,s.createElement)(e,i({registry:l},r))):null}))),"withRegistryProvider")((function(e){const{children:t,settings:n}=e,{updateSettings:o}=(0,m.useDispatch)(Vn);return(0,s.useEffect)((()=>{o(n)}),[n]),Wa(e),(0,s.createElement)(Sa,null,t)}));function ja(e){let{onClick:t}=e;return(0,s.createElement)("div",{tabIndex:0,role:"button",onClick:t,onKeyPress:t},(0,s.createElement)(p.Disabled,null,(0,s.createElement)(pm,null)))}function Ka(){const{hasSelectedBlock:e,hasMultiSelection:t}=(0,m.useSelect)(Vn),{clearSelectedBlock:n}=(0,m.useDispatch)(Vn);return(0,d.useRefEffect)((o=>{function r(r){(e()||t())&&r.target===o&&n()}return o.addEventListener("mousedown",r),()=>{o.removeEventListener("mousedown",r)}}),[e,t,n])}function qa(e){return(0,s.createElement)("div",i({ref:Ka()},e))}function Ya(e,t){const n="start"===t?"firstChild":"lastChild",o="start"===t?"nextSibling":"previousSibling";for(;e[n];)for(e=e[n];e.nodeType===e.TEXT_NODE&&/^[ \t\n]*$/.test(e.data)&&e[o];)e=e[o];return e}function Za(e){const{isMultiSelecting:t,getMultiSelectedBlockClientIds:n,hasMultiSelection:o,getSelectedBlockClientId:r}=e(Vn);return{isMultiSelecting:t(),multiSelectedBlockClientIds:n(),hasMultiSelection:o(),selectedBlockClientId:r()}}function Xa(){const{isMultiSelecting:e,multiSelectedBlockClientIds:t,hasMultiSelection:n,selectedBlockClientId:o}=(0,m.useSelect)(Za,[]),r=Ba(o),l=Ba((0,u.first)(t)),i=Ba((0,u.last)(t));return(0,d.useRefEffect)((s=>{const{ownerDocument:a}=s,{defaultView:c}=a;if(!n||e){if(!o||e)return;const t=c.getSelection();if(t.rangeCount&&!t.isCollapsed){const e=r.current,{startContainer:n,endContainer:o}=t.getRangeAt(0);!e||e.contains(n)&&e.contains(o)||t.removeAllRanges()}return}const{length:u}=t;if(u<2)return;if(!l.current||!i.current)return;s.focus();const d=c.getSelection(),p=a.createRange(),m=Ya(l.current,"start"),f=Ya(i.current,"end");var h;h=s,Array.from(h.querySelectorAll(".rich-text")).forEach((e=>{e.removeAttribute("contenteditable")})),p.setStartBefore(m),p.setEndAfter(f),d.removeAllRanges(),d.addRange(p)}),[n,e,t,o])}function Qa(e){const{tagName:t}=e;return"INPUT"===t||"BUTTON"===t||"SELECT"===t||"TEXTAREA"===t}function Ja(e,t,n,o){let r,l=rr.focus.focusable.find(n);return t&&(l=(0,u.reverse)(l)),l=l.slice(l.indexOf(e)+1),o&&(r=e.getBoundingClientRect()),(0,u.find)(l,(function(e){if(!rr.focus.tabbable.isTabbableIndex(e))return!1;if(e.isContentEditable&&"true"!==e.contentEditable)return!1;if(o){const t=e.getBoundingClientRect();if(t.left>=r.right||t.right<=r.left)return!1}return!0}))}function ec(){const{getSelectedBlockClientId:e,getMultiSelectedBlocksStartClientId:t,getMultiSelectedBlocksEndClientId:n,getPreviousBlockClientId:o,getNextBlockClientId:r,getFirstMultiSelectedBlockClientId:l,getLastMultiSelectedBlockClientId:i,getSettings:s,hasMultiSelection:a}=(0,m.useSelect)(Vn),{multiSelect:c,selectBlock:u}=(0,m.useDispatch)(Vn);return(0,d.useRefEffect)((d=>{let p;function m(){p=null}function f(l){const i=e(),s=t(),a=n(),d=o(a||i),p=r(a||i),m=l?d:p;m&&(s===m?u(m):c(s||i,m))}function h(e){const t=l(),n=i(),o=e?t:n;o&&u(o)}function g(t){const{keyCode:l,target:i}=t,c=l===va.UP,u=l===va.DOWN,m=l===va.LEFT,g=l===va.RIGHT,v=c||m,b=m||g,k=c||u,_=b||k,y=t.shiftKey,E=y||t.ctrlKey||t.altKey||t.metaKey,C=k?rr.isVerticalEdge:rr.isHorizontalEdge,{ownerDocument:S}=d,{defaultView:w}=S;if(a())return void(_&&((y?f:h)(v),t.preventDefault()));if(k?p||(p=(0,rr.computeCaretRect)(w)):p=null,t.defaultPrevented)return;if(!_)return;if(!function(e,t,n){if((t===va.UP||t===va.DOWN)&&!n)return!0;const{tagName:o}=e;return"INPUT"!==o&&"TEXTAREA"!==o}(i,l,E))return;const B=(0,rr.isRTL)(i)?!v:v,{keepCaretInsideBlock:I}=s(),x=e();if(y){const e=n(),l=o(e||x),s=r(e||x);(v&&l||!v&&s)&&function(e,t){const n=Ja(e,t,d);return!n||!function(e,t){return e.closest(ia)===t.closest(ia)}(e,n)}(i,v)&&C(i,v)&&(f(v),t.preventDefault())}else if(k&&(0,rr.isVerticalEdge)(i,v)&&!I){const e=Ja(i,v,d,!0);e&&((0,rr.placeCaretAtVerticalEdge)(e,v,p),t.preventDefault())}else if(b&&w.getSelection().isCollapsed&&(0,rr.isHorizontalEdge)(i,B)&&!I){const e=Ja(i,B,d);(0,rr.placeCaretAtHorizontalEdge)(e,v),t.preventDefault()}}return d.addEventListener("mousedown",m),d.addEventListener("keydown",g),()=>{d.removeEventListener("mousedown",m),d.removeEventListener("keydown",g)}}),[])}var tc=window.wp.keyboardShortcuts;function nc(){const{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:n}=(0,m.useSelect)(Vn),{multiSelect:o}=(0,m.useDispatch)(Vn),r=(0,tc.__unstableUseShortcutEventMatch)();return(0,d.useRefEffect)((l=>{function i(l){if(!r("core/block-editor/select-all",l))return;if(!(0,rr.isEntirelySelected)(l.target))return;const i=t(),[s]=i,a=n(s);let c=e(a);i.length===c.length&&(c=e(n(a)));const d=(0,u.first)(c),p=(0,u.last)(c);d!==p&&(o(d,p),l.preventDefault())}return l.addEventListener("keydown",i),()=>{l.removeEventListener("keydown",i)}}),[])}function oc(){const[e,t,n]=function(){const e=(0,s.useRef)(),t=(0,s.useRef)(),n=(0,s.useRef)(),o=(0,s.useRef)(),{hasMultiSelection:r,getSelectedBlockClientId:l,getBlockCount:i}=(0,m.useSelect)(Vn),{setNavigationMode:a}=(0,m.useDispatch)(Vn),c=(0,m.useSelect)((e=>e(Vn).isNavigationMode()),[])?void 0:"0",u=(0,s.useRef)();function p(t){if(u.current)u.current=null;else if(r())e.current.focus();else if(l())o.current.focus();else{a(!0);const n=t.target.compareDocumentPosition(e.current)&t.target.DOCUMENT_POSITION_FOLLOWING?"findNext":"findPrevious";rr.focus.tabbable[n](t.target).focus()}}const f=(0,s.createElement)("div",{ref:t,tabIndex:c,onFocus:p}),h=(0,s.createElement)("div",{ref:n,tabIndex:c,onFocus:p}),g=(0,d.useRefEffect)((s=>{function c(e){if(e.defaultPrevented)return;if(e.keyCode===va.ESCAPE&&!r())return e.preventDefault(),void a(!0);if(e.keyCode!==va.TAB)return;const o=e.shiftKey,i=o?"findPrevious":"findNext";if(!r()&&!l())return void(e.target===s&&a(!0));if(Qa(e.target)&&Qa(rr.focus.tabbable[i](e.target)))return;const c=o?t:n;u.current=!0,c.current.focus({preventScroll:!0})}function d(e){o.current=e.target;const{ownerDocument:t}=s;e.relatedTarget||t.activeElement!==t.body||0!==i()||s.focus()}function p(o){var r;if(o.keyCode!==va.TAB)return;if("region"===(null===(r=o.target)||void 0===r?void 0:r.getAttribute("role")))return;if(e.current===o.target)return;const l=o.shiftKey?"findPrevious":"findNext",i=rr.focus.tabbable[l](o.target);i!==t.current&&i!==n.current||(o.preventDefault(),i.focus({preventScroll:!0}))}const{ownerDocument:m}=s,{defaultView:f}=m;return f.addEventListener("keydown",p),s.addEventListener("keydown",c),s.addEventListener("focusout",d),()=>{f.removeEventListener("keydown",p),s.removeEventListener("keydown",c),s.removeEventListener("focusout",d)}}),[]);return[f,(0,d.useMergeRefs)([e,g]),h]}(),o=(0,m.useSelect)((e=>e(Vn).hasMultiSelection()),[]);return[e,(0,d.useMergeRefs)([t,Xa(),nc(),ec(),(0,d.useRefEffect)((e=>{if(e.tabIndex=-1,o)return e.setAttribute("aria-label",(0,h.__)("Multiple selected blocks")),()=>{e.removeAttribute("aria-label")}}),[o])]),n]}var rc=(0,s.forwardRef)((function(e,t){let{children:n,...o}=e;const[r,l,a]=oc();return(0,s.createElement)(s.Fragment,null,r,(0,s.createElement)("div",i({},o,{ref:(0,d.useMergeRefs)([l,t]),className:c()(o.className,"block-editor-writing-flow")}),n),a)}));const lc="editor-styles-wrapper";function ic(e){return(0,s.useMemo)((()=>{const t=document.implementation.createHTMLDocument("");return t.body.innerHTML=e,Array.from(t.body.children)}),[e])}var sc=(0,s.forwardRef)((function(e,t){var n,o;let{contentRef:r,children:l,head:a,tabIndex:u=0,...m}=e;const[,f]=(0,s.useReducer)((()=>({}))),[g,v]=(0,s.useState)(),[b,k]=(0,s.useState)([]),_=ic(null===(n=window.__editorAssets)||void 0===n?void 0:n.styles),y=ic(null===(o=window.__editorAssets)||void 0===o?void 0:o.scripts),E=Ka(),[C,S,w]=oc(),B=(0,d.useRefEffect)((e=>{function t(){const{contentDocument:t,ownerDocument:n}=e,{readyState:o,documentElement:r}=t;return("interactive"===o||"complete"===o)&&(function(e){const{defaultView:t}=e,{frameElement:n}=t;function o(e){const o=Object.getPrototypeOf(e).constructor.name,r=window[o],l={};for(const t in e)l[t]=e[t];if(e instanceof t.MouseEvent){const e=n.getBoundingClientRect();l.clientX+=e.left,l.clientY+=e.top}const i=new r(e.type,l);!n.dispatchEvent(i)&&e.preventDefault()}const r=["dragover"];for(const t of r)e.addEventListener(t,o)}(t),v(t),E(r),k(Array.from(n.body.classList).filter((e=>e.startsWith("admin-color-")||"wp-embed-responsive"===e))),t.dir=n.dir,r.removeChild(t.head),r.removeChild(t.body),!0)}t()||e.addEventListener("load",(()=>{t()}))}),[]),I=(0,d.useRefEffect)((e=>{y.reduce(((t,n)=>t.then((()=>async function(e,t){let{id:n,src:o}=t;return new Promise(((t,r)=>{const l=e.ownerDocument.createElement("script");l.id=n,o?(l.src=o,l.onload=()=>t(),l.onerror=()=>r()):t(),e.appendChild(l)}))}(e,n)))),Promise.resolve()).finally((()=>{f()}))}),[]),x=(0,d.useMergeRefs)([r,E,S]);return(0,s.useEffect)((()=>{var e;g&&(e=g,Array.from(document.styleSheets).forEach((t=>{try{t.cssRules}catch(e){return}const{ownerNode:n,cssRules:o}=t;if(o&&"LINK"===n.tagName&&"wp-reset-editor-styles-css"!==n.id&&Array.from(o).find((e=>{let{selectorText:t}=e;return t&&(t.includes(`.${lc}`)||t.includes(".wp-block"))}))&&!e.getElementById(n.id)){console.warn(`Stylesheet ${n.id} was not properly added.\nFor blocks, use the block API's style (https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#style) or editorStyle (https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#editor-style).\nFor themes, use add_editor_style (https://developer.wordpress.org/block-editor/how-to-guides/themes/theme-support/#editor-styles).`,n.outerHTML),e.head.appendChild(n.cloneNode(!0));const t=n.id.replace("-css","-inline-css"),o=document.getElementById(t);o&&e.head.appendChild(o.cloneNode(!0))}})))}),[g]),a=(0,s.createElement)(s.Fragment,null,(0,s.createElement)("style",null,"body{margin:0}"),_.map((e=>{let{tagName:t,href:n,id:o,rel:r,media:l,textContent:i}=e;const a=t.toLowerCase();return"style"===a?(0,s.createElement)(a,{id:o,key:o},i):(0,s.createElement)(a,{href:n,id:o,rel:r,media:l,key:o})})),a),(0,s.createElement)(s.Fragment,null,u>=0&&C,(0,s.createElement)("iframe",i({},m,{ref:(0,d.useMergeRefs)([t,B]),tabIndex:u,title:(0,h.__)("Editor canvas")}),g&&(0,s.createPortal)((0,s.createElement)(s.Fragment,null,(0,s.createElement)("head",{ref:I},a),(0,s.createElement)("body",{ref:x,className:c()(lc,...b)},(0,s.createElement)(p.__experimentalStyleProvider,{document:g},l))),g.documentElement)),u>=0&&w)})),ac={grad:.9,turn:360,rad:360/(2*Math.PI)},cc=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},uc=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},dc=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},pc=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},mc=function(e){return{r:dc(e.r,0,255),g:dc(e.g,0,255),b:dc(e.b,0,255),a:dc(e.a)}},fc=function(e){return{r:uc(e.r),g:uc(e.g),b:uc(e.b),a:uc(e.a,3)}},hc=/^#([0-9a-f]{3,8})$/i,gc=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},vc=function(e){var t=e.r,n=e.g,o=e.b,r=e.a,l=Math.max(t,n,o),i=l-Math.min(t,n,o),s=i?l===t?(n-o)/i:l===n?2+(o-t)/i:4+(t-n)/i:0;return{h:60*(s<0?s+6:s),s:l?i/l*100:0,v:l/255*100,a:r}},bc=function(e){var t=e.h,n=e.s,o=e.v,r=e.a;t=t/360*6,n/=100,o/=100;var l=Math.floor(t),i=o*(1-n),s=o*(1-(t-l)*n),a=o*(1-(1-t+l)*n),c=l%6;return{r:255*[o,s,i,i,a,o][c],g:255*[a,o,o,s,i,i][c],b:255*[i,i,a,o,o,s][c],a:r}},kc=function(e){return{h:pc(e.h),s:dc(e.s,0,100),l:dc(e.l,0,100),a:dc(e.a)}},_c=function(e){return{h:uc(e.h),s:uc(e.s),l:uc(e.l),a:uc(e.a,3)}},yc=function(e){return bc((n=(t=e).s,{h:t.h,s:(n*=((o=t.l)<50?o:100-o)/100)>0?2*n/(o+n)*100:0,v:o+n,a:t.a}));var t,n,o},Ec=function(e){return{h:(t=vc(e)).h,s:(r=(200-(n=t.s))*(o=t.v)/100)>0&&r<200?n*o/100/(r<=100?r:200-r)*100:0,l:r/2,a:t.a};var t,n,o,r},Cc=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Sc=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,wc=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Bc=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ic={string:[[function(e){var t=hc.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?uc(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?uc(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=wc.exec(e)||Bc.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:mc({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=Cc.exec(e)||Sc.exec(e);if(!t)return null;var n,o,r=kc({h:(n=t[1],o=t[2],void 0===o&&(o="deg"),Number(n)*(ac[o]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return yc(r)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,o=e.b,r=e.a,l=void 0===r?1:r;return cc(t)&&cc(n)&&cc(o)?mc({r:Number(t),g:Number(n),b:Number(o),a:Number(l)}):null},"rgb"],[function(e){var t=e.h,n=e.s,o=e.l,r=e.a,l=void 0===r?1:r;if(!cc(t)||!cc(n)||!cc(o))return null;var i=kc({h:Number(t),s:Number(n),l:Number(o),a:Number(l)});return yc(i)},"hsl"],[function(e){var t=e.h,n=e.s,o=e.v,r=e.a,l=void 0===r?1:r;if(!cc(t)||!cc(n)||!cc(o))return null;var i=function(e){return{h:pc(e.h),s:dc(e.s,0,100),v:dc(e.v,0,100),a:dc(e.a)}}({h:Number(t),s:Number(n),v:Number(o),a:Number(l)});return bc(i)},"hsv"]]},xc=function(e,t){for(var n=0;n<t.length;n++){var o=t[n][0](e);if(o)return[o,t[n][1]]}return[null,void 0]},Tc=function(e,t){var n=Ec(e);return{h:n.h,s:dc(n.s+100*t,0,100),l:n.l,a:n.a}},Nc=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},Pc=function(e,t){var n=Ec(e);return{h:n.h,s:n.s,l:dc(n.l+100*t,0,100),a:n.a}},Mc=function(){function e(e){this.parsed=function(e){return"string"==typeof e?xc(e.trim(),Ic.string):"object"==typeof e&&null!==e?xc(e,Ic.object):[null,void 0]}(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return uc(Nc(this.rgba),2)},e.prototype.isDark=function(){return Nc(this.rgba)<.5},e.prototype.isLight=function(){return Nc(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=fc(this.rgba)).r,n=e.g,o=e.b,l=(r=e.a)<1?gc(uc(255*r)):"","#"+gc(t)+gc(n)+gc(o)+l;var e,t,n,o,r,l},e.prototype.toRgb=function(){return fc(this.rgba)},e.prototype.toRgbString=function(){return t=(e=fc(this.rgba)).r,n=e.g,o=e.b,(r=e.a)<1?"rgba("+t+", "+n+", "+o+", "+r+")":"rgb("+t+", "+n+", "+o+")";var e,t,n,o,r},e.prototype.toHsl=function(){return _c(Ec(this.rgba))},e.prototype.toHslString=function(){return t=(e=_c(Ec(this.rgba))).h,n=e.s,o=e.l,(r=e.a)<1?"hsla("+t+", "+n+"%, "+o+"%, "+r+")":"hsl("+t+", "+n+"%, "+o+"%)";var e,t,n,o,r},e.prototype.toHsv=function(){return e=vc(this.rgba),{h:uc(e.h),s:uc(e.s),v:uc(e.v),a:uc(e.a,3)};var e},e.prototype.invert=function(){return Rc({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),Rc(Tc(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),Rc(Tc(this.rgba,-e))},e.prototype.grayscale=function(){return Rc(Tc(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),Rc(Pc(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),Rc(Pc(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?Rc({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):uc(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=Ec(this.rgba);return"number"==typeof e?Rc({h:e,s:t.s,l:t.l,a:t.a}):uc(t.h)},e.prototype.isEqual=function(e){return this.toHex()===Rc(e).toHex()},e}(),Rc=function(e){return e instanceof Mc?e:new Mc(e)},Lc=[],Ac=function(e){e.forEach((function(e){Lc.indexOf(e)<0&&(e(Mc,Ic),Lc.push(e))}))};function Dc(e,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},o={};for(var r in n)o[n[r]]=r;var l={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var r,i,s=o[this.toHex()];if(s)return s;if(null==t?void 0:t.closest){var a=this.toRgb(),c=1/0,u="black";if(!l.length)for(var d in n)l[d]=new e(n[d]).toRgb();for(var p in n){var m=(r=a,i=l[p],Math.pow(r.r-i.r,2)+Math.pow(r.g-i.g,2)+Math.pow(r.b-i.b,2));m<c&&(c=m,u=p)}return u}},t.string.push([function(t){var o=t.toLowerCase(),r="transparent"===o?"#0000":n[o];return r?new e(r).toRgb():null},"name"])}var Oc=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},Fc=function(e){return.2126*Oc(e.r)+.7152*Oc(e.g)+.0722*Oc(e.b)};function zc(e){e.prototype.luminance=function(){return e=Fc(this.rgba),void 0===(t=2)&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0;var e,t,n},e.prototype.contrast=function(t){void 0===t&&(t="#FFF");var n,o,r,l,i,s,a,c=t instanceof e?t:new e(t);return l=this.rgba,i=c.toRgb(),n=(s=Fc(l))>(a=Fc(i))?(s+.05)/(a+.05):(a+.05)/(s+.05),void 0===(o=2)&&(o=0),void 0===r&&(r=Math.pow(10,o)),Math.floor(r*n)/r+0},e.prototype.isReadable=function(e,t){return void 0===e&&(e="#FFF"),void 0===t&&(t={}),this.contrast(e)>=(i=void 0===(l=(n=t).size)?"normal":l,"AAA"===(r=void 0===(o=n.level)?"AA":o)&&"normal"===i?7:"AA"===r&&"large"===i?3:4.5);var n,o,r,l,i}}var Vc=n(3692),Hc=n.n(Vc);const Uc=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function Gc(e,t){t=t||{};let n=1,o=1;function r(e){const t=e.match(/\n/g);t&&(n+=t.length);const r=e.lastIndexOf("\n");o=~r?e.length-r:o+e.length}function l(){const e={line:n,column:o};return function(t){return t.position=new i(e),m(),t}}function i(e){this.start=e,this.end={line:n,column:o},this.source=t.source}i.prototype.content=e;const s=[];function a(r){const l=new Error(t.source+":"+n+":"+o+": "+r);if(l.reason=r,l.filename=t.source,l.line=n,l.column=o,l.source=e,!t.silent)throw l;s.push(l)}function c(){return p(/^{\s*/)}function u(){return p(/^}/)}function d(){let t;const n=[];for(m(),f(n);e.length&&"}"!==e.charAt(0)&&(t=S()||w());)!1!==t&&(n.push(t),f(n));return n}function p(t){const n=t.exec(e);if(!n)return;const o=n[0];return r(o),e=e.slice(o.length),n}function m(){p(/^\s*/)}function f(e){let t;for(e=e||[];t=h();)!1!==t&&e.push(t);return e}function h(){const t=l();if("/"!==e.charAt(0)||"*"!==e.charAt(1))return;let n=2;for(;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return a("End of comment missing");const i=e.slice(2,n-2);return o+=2,r(i),e=e.slice(n),o+=2,t({type:"comment",comment:i})}function g(){const e=p(/^([^{]+)/);if(e)return Wc(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"‌")})).split(/\s*(?![^(]*\)),\s*/).map((function(e){return e.replace(/\u200C/g,",")}))}function v(){const e=l();let t=p(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(!t)return;if(t=Wc(t[0]),!p(/^:\s*/))return a("property missing ':'");const n=p(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),o=e({type:"declaration",property:t.replace(Uc,""),value:n?Wc(n[0]).replace(Uc,""):""});return p(/^[;\s]*/),o}function b(){const e=[];if(!c())return a("missing '{'");let t;for(f(e);t=v();)!1!==t&&(e.push(t),f(e));return u()?e:a("missing '}'")}function k(){let e;const t=[],n=l();for(;e=p(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),p(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:b()})}const _=C("import"),y=C("charset"),E=C("namespace");function C(e){const t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){const n=l(),o=p(t);if(!o)return;const r={type:e};return r[e]=o[1].trim(),n(r)}}function S(){if("@"===e[0])return function(){const e=l();let t=p(/^@([-\w]+)?keyframes\s*/);if(!t)return;const n=t[1];if(t=p(/^([-\w]+)\s*/),!t)return a("@keyframes missing name");const o=t[1];if(!c())return a("@keyframes missing '{'");let r,i=f();for(;r=k();)i.push(r),i=i.concat(f());return u()?e({type:"keyframes",name:o,vendor:n,keyframes:i}):a("@keyframes missing '}'")}()||function(){const e=l(),t=p(/^@media *([^{]+)/);if(!t)return;const n=Wc(t[1]);if(!c())return a("@media missing '{'");const o=f().concat(d());return u()?e({type:"media",media:n,rules:o}):a("@media missing '}'")}()||function(){const e=l(),t=p(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:Wc(t[1]),media:Wc(t[2])})}()||function(){const e=l(),t=p(/^@supports *([^{]+)/);if(!t)return;const n=Wc(t[1]);if(!c())return a("@supports missing '{'");const o=f().concat(d());return u()?e({type:"supports",supports:n,rules:o}):a("@supports missing '}'")}()||_()||y()||E()||function(){const e=l(),t=p(/^@([-\w]+)?document *([^{]+)/);if(!t)return;const n=Wc(t[1]),o=Wc(t[2]);if(!c())return a("@document missing '{'");const r=f().concat(d());return u()?e({type:"document",document:o,vendor:n,rules:r}):a("@document missing '}'")}()||function(){const e=l();if(!p(/^@page */))return;const t=g()||[];if(!c())return a("@page missing '{'");let n,o=f();for(;n=v();)o.push(n),o=o.concat(f());return u()?e({type:"page",selectors:t,declarations:o}):a("@page missing '}'")}()||function(){const e=l();if(!p(/^@host\s*/))return;if(!c())return a("@host missing '{'");const t=f().concat(d());return u()?e({type:"host",rules:t}):a("@host missing '}'")}()||function(){const e=l();if(!p(/^@font-face\s*/))return;if(!c())return a("@font-face missing '{'");let t,n=f();for(;t=v();)n.push(t),n=n.concat(f());return u()?e({type:"font-face",declarations:n}):a("@font-face missing '}'")}()}function w(){const e=l(),t=g();return t?(f(),e({type:"rule",selectors:t,declarations:b()})):a("selector missing")}return $c(function(){const e=d();return{type:"stylesheet",stylesheet:{source:t.source,rules:e,parsingErrors:s}}}())}function Wc(e){return e?e.replace(/^\s+|\s+$/g,""):""}function $c(e,t){const n=e&&"string"==typeof e.type,o=n?e:t;for(const t in e){const n=e[t];Array.isArray(n)?n.forEach((function(e){$c(e,o)})):n&&"object"==typeof n&&$c(n,o)}return n&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var jc=n(5717),Kc=n.n(jc),qc=Yc;function Yc(e){this.options=e||{}}Yc.prototype.emit=function(e){return e},Yc.prototype.visit=function(e){return this[e.type](e)},Yc.prototype.mapVisit=function(e,t){let n="";t=t||"";for(let o=0,r=e.length;o<r;o++)n+=this.visit(e[o]),t&&o<r-1&&(n+=this.emit(t));return n};var Zc=Xc;function Xc(e){qc.call(this,e)}Kc()(Xc,qc),Xc.prototype.compile=function(e){return e.stylesheet.rules.map(this.visit,this).join("")},Xc.prototype.comment=function(e){return this.emit("",e.position)},Xc.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},Xc.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Xc.prototype.document=function(e){const t="@"+(e.vendor||"")+"document "+e.document;return this.emit(t,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Xc.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},Xc.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},Xc.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Xc.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit("{")+this.mapVisit(e.keyframes)+this.emit("}")},Xc.prototype.keyframe=function(e){const t=e.declarations;return this.emit(e.values.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}")},Xc.prototype.page=function(e){const t=e.selectors.length?e.selectors.join(", "):"";return this.emit("@page "+t,e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},Xc.prototype["font-face"]=function(e){return this.emit("@font-face",e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},Xc.prototype.host=function(e){return this.emit("@host",e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Xc.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},Xc.prototype.rule=function(e){const t=e.declarations;return t.length?this.emit(e.selectors.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}"):""},Xc.prototype.declaration=function(e){return this.emit(e.property+":"+e.value,e.position)+this.emit(";")};var Qc=Jc;function Jc(e){e=e||{},qc.call(this,e),this.indentation=e.indent}Kc()(Jc,qc),Jc.prototype.compile=function(e){return this.stylesheet(e)},Jc.prototype.stylesheet=function(e){return this.mapVisit(e.stylesheet.rules,"\n\n")},Jc.prototype.comment=function(e){return this.emit(this.indent()+"/*"+e.comment+"*/",e.position)},Jc.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},Jc.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Jc.prototype.document=function(e){const t="@"+(e.vendor||"")+"document "+e.document;return this.emit(t,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Jc.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},Jc.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},Jc.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Jc.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.keyframes,"\n")+this.emit(this.indent(-1)+"}")},Jc.prototype.keyframe=function(e){const t=e.declarations;return this.emit(this.indent())+this.emit(e.values.join(", "),e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(t,"\n")+this.emit(this.indent(-1)+"\n"+this.indent()+"}\n")},Jc.prototype.page=function(e){const t=e.selectors.length?e.selectors.join(", ")+" ":"";return this.emit("@page "+t,e.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(e.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},Jc.prototype["font-face"]=function(e){return this.emit("@font-face ",e.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(e.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},Jc.prototype.host=function(e){return this.emit("@host",e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Jc.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},Jc.prototype.rule=function(e){const t=this.indent(),n=e.declarations;return n.length?this.emit(e.selectors.map((function(e){return t+e})).join(",\n"),e.position)+this.emit(" {\n")+this.emit(this.indent(1))+this.mapVisit(n,"\n")+this.emit(this.indent(-1))+this.emit("\n"+this.indent()+"}"):""},Jc.prototype.declaration=function(e){return this.emit(this.indent())+this.emit(e.property+": "+e.value,e.position)+this.emit(";")},Jc.prototype.indent=function(e){return this.level=this.level||1,null!==e?(this.level+=e,""):Array(this.level).join(this.indentation||" ")};var eu=function(e,t){try{const r=Gc(e);return n=Hc().map(r,(function(e){if(!e)return e;const n=t(e);return this.update(n)})),((o=o||{}).compress?new Zc(o):new Qc(o)).compile(n)}catch(e){return console.warn("Error while traversing the CSS: "+e),null}var n,o};function tu(e){return 0!==e.value.indexOf("data:")&&0!==e.value.indexOf("#")&&(t=e.value,!/^\/(?!\/)/.test(t)&&!function(e){return/^(?:https?:)?\/\//.test(e)}(e.value));var t}function nu(e,t){return new URL(e,t).toString()}var ou=e=>t=>{if("declaration"===t.type){const l=function(e){const t=/url\((\s*)(['"]?)(.+?)\2(\s*)\)/g;let n;const o=[];for(;null!==(n=t.exec(e));){const e={source:n[0],before:n[1],quote:n[2],value:n[3],after:n[4]};tu(e)&&o.push(e)}return o}(t.value).map((r=e,e=>({...e,newUrl:"url("+e.before+e.quote+nu(e.value,r)+e.quote+e.after+")"})));return{...t,value:(n=t.value,o=l,o.forEach((e=>{n=n.replace(e.source,e.newUrl)})),n)}}var n,o,r;return t};const ru=/^(body|html|:root).*$/;var lu=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return n=>"rule"===n.type?{...n,selectors:n.selectors.map((n=>t.includes(n.trim())?n:n.match(ru)?n.replace(/^(body|html|:root)/,e):e+" "+n))}:n},iu=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(0,u.map)(e,(e=>{let{css:n,baseURL:o,__experimentalNoWrapper:r=!1}=e;const l=[];return t&&!r&&l.push(lu(t)),o&&l.push(ou(o)),l.length?eu(n,(0,d.compose)(l)):n}))};const su=".editor-styles-wrapper";function au(e){return(0,s.useCallback)((e=>{if(!e)return;const{ownerDocument:t}=e,{defaultView:n,body:o}=t,r=t.querySelector(su);let l;if(r)l=n.getComputedStyle(r,null).getPropertyValue("background-color");else{const e=t.createElement("div");e.classList.add("editor-styles-wrapper"),o.appendChild(e),l=n.getComputedStyle(e,null).getPropertyValue("background-color"),o.removeChild(e)}const i=Rc(l);i.luminance()>.5||0===i.alpha()?o.classList.remove("is-dark-theme"):o.classList.add("is-dark-theme")}),[e])}function cu(e){let{styles:t}=e;const n=(0,s.useMemo)((()=>iu(t,su)),[t]);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("style",{ref:au(t)}),n.map(((e,t)=>(0,s.createElement)("style",{key:t},e))))}let uu;Ac([Dc,zc]);var du=function(e){let{viewportWidth:t,__experimentalPadding:n}=e;const[o,{width:r}]=(0,d.useResizeObserver)(),[l,{height:i}]=(0,d.useResizeObserver)(),a=(0,m.useSelect)((e=>e(Vn).getSettings().styles),[]);uu=uu||(0,d.pure)(pm);const c=r/t;return(0,s.createElement)("div",{className:"block-editor-block-preview__container"},o,(0,s.createElement)(p.Disabled,{className:"block-editor-block-preview__content",style:{transform:`scale(${c})`,height:i*c}},(0,s.createElement)(sc,{head:(0,s.createElement)(cu,{styles:a}),contentRef:(0,d.useRefEffect)((e=>{const{ownerDocument:{documentElement:t}}=e;t.style.position="absolute",t.style.width="100%",e.style.padding=n+"px"}),[]),"aria-hidden":!0,tabIndex:-1,style:{position:"absolute",width:t,height:i,pointerEvents:"none"}},l,(0,s.createElement)(uu,{renderAppender:!1}))))},pu=(0,s.memo)((function(e){let{blocks:t,__experimentalPadding:n=0,viewportWidth:o=1200,__experimentalLive:r=!1,__experimentalOnClick:l}=e;const i=(0,m.useSelect)((e=>e(Vn).getSettings()),[]),a=(0,s.useMemo)((()=>{const e={...i};return e.__experimentalBlockPatterns=[],e}),[i]),c=(0,s.useMemo)((()=>(0,u.castArray)(t)),[t]);return t&&0!==t.length?(0,s.createElement)($a,{value:c,settings:a},r?(0,s.createElement)(ja,{onClick:l}):(0,s.createElement)(du,{viewportWidth:o,__experimentalPadding:n})):null})),mu=function(e){var t,n;let{item:o}=e;const{name:l,title:i,icon:a,description:c,initialAttributes:u}=o,d=(0,r.getBlockType)(l),p=(0,r.isReusableBlock)(o);return(0,s.createElement)("div",{className:"block-editor-inserter__preview-container"},(0,s.createElement)("div",{className:"block-editor-inserter__preview"},p||null!=d&&d.example?(0,s.createElement)("div",{className:"block-editor-inserter__preview-content"},(0,s.createElement)(pu,{__experimentalPadding:16,viewportWidth:null!==(t=null===(n=d.example)||void 0===n?void 0:n.viewportWidth)&&void 0!==t?t:500,blocks:d.example?(0,r.getBlockFromExample)(o.name,{attributes:{...d.example.attributes,...u},innerBlocks:d.example.innerBlocks}):(0,r.createBlock)(l,u)})):(0,s.createElement)("div",{className:"block-editor-inserter__preview-content-missing"},(0,h.__)("No Preview Available."))),!p&&(0,s.createElement)(Ga,{title:i,icon:a,description:c}))},fu=(0,s.createContext)(),hu=(0,s.forwardRef)((function(e,t){let{isFirst:n,as:o,children:r,...l}=e;const a=(0,s.useContext)(fu);return(0,s.createElement)(p.__unstableCompositeItem,i({ref:t,state:a,role:"option",focusable:!0},l),(e=>{const t={...e,tabIndex:n?0:e.tabIndex};return o?(0,s.createElement)(o,t,r):"function"==typeof r?r(t):(0,s.createElement)(p.Button,t,r)}))})),gu=(0,s.createElement)(F.SVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},(0,s.createElement)(F.Path,{d:"M5 4h2V2H5v2zm6-2v2h2V2h-2zm-6 8h2V8H5v2zm6 0h2V8h-2v2zm-6 6h2v-2H5v2zm6 0h2v-2h-2v2z"}));function vu(e){let{count:t,icon:n}=e;return(0,s.createElement)("div",{className:"block-editor-block-draggable-chip-wrapper"},(0,s.createElement)("div",{className:"block-editor-block-draggable-chip"},(0,s.createElement)(p.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content"},(0,s.createElement)(p.FlexItem,null,n?(0,s.createElement)(Ua,{icon:n}):(0,h.sprintf)(
11
  /* translators: %d: Number of blocks. */
12
  (0,h._n)("%d block","%d blocks",t),t)),(0,s.createElement)(p.FlexItem,null,(0,s.createElement)(Ua,{icon:gu})))))}var bu=e=>{let{isEnabled:t,blocks:n,icon:o,children:r}=e;const l={type:"inserter",blocks:n};return(0,s.createElement)(p.Draggable,{__experimentalTransferDataType:"wp-blocks",transferData:l,__experimentalDragComponent:(0,s.createElement)(vu,{count:n.length,icon:o})},(e=>{let{onDraggableStart:n,onDraggableEnd:o}=e;return r({draggable:t,onDragStart:t?n:void 0,onDragEnd:t?o:void 0})}))};function ku(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;const{platform:t}=e.navigator;return-1!==t.indexOf("Mac")||["iPad","iPhone"].includes(t)}var _u=(0,s.memo)((function(e){let{className:t,isFirst:n,item:o,onSelect:l,onHover:a,isDraggable:u,...d}=e;const p=(0,s.useRef)(!1),m=o.icon?{backgroundColor:o.icon.background,color:o.icon.foreground}:{},f=(0,s.useMemo)((()=>[(0,r.createBlock)(o.name,o.initialAttributes,(0,r.createBlocksFromInnerBlocksTemplate)(o.innerBlocks))]),[o.name,o.initialAttributes,o.initialAttributes]);return(0,s.createElement)(bu,{isEnabled:u&&!o.disabled,blocks:f,icon:o.icon},(e=>{let{draggable:r,onDragStart:u,onDragEnd:f}=e;return(0,s.createElement)("div",{className:"block-editor-block-types-list__list-item",draggable:r,onDragStart:e=>{p.current=!0,u&&(a(null),u(e))},onDragEnd:e=>{p.current=!1,f&&f(e)}},(0,s.createElement)(hu,i({isFirst:n,className:c()("block-editor-block-types-list__item",t),disabled:o.isDisabled,onClick:e=>{e.preventDefault(),l(o,ku()?e.metaKey:e.ctrlKey),a(null)},onKeyDown:e=>{const{keyCode:t}=e;t===va.ENTER&&(e.preventDefault(),l(o,ku()?e.metaKey:e.ctrlKey),a(null))},onFocus:()=>{p.current||a(o)},onMouseEnter:()=>{p.current||a(o)},onMouseLeave:()=>a(null),onBlur:()=>a(null)},d),(0,s.createElement)("span",{className:"block-editor-block-types-list__item-icon",style:m},(0,s.createElement)(Ua,{icon:o.icon,showColors:!0})),(0,s.createElement)("span",{className:"block-editor-block-types-list__item-title"},o.title)))}))})),yu=(0,s.forwardRef)((function(e,t){const[n,o]=(0,s.useState)(!1);return(0,s.useEffect)((()=>{n&&(0,Pt.speak)((0,h.__)("Use left and right arrow keys to move through blocks"))}),[n]),(0,s.createElement)("div",i({ref:t,role:"listbox","aria-orientation":"horizontal",onFocus:()=>{o(!0)},onBlur:e=>{!e.currentTarget.contains(e.relatedTarget)&&o(!1)}},e))})),Eu=(0,s.forwardRef)((function(e,t){const n=(0,s.useContext)(fu);return(0,s.createElement)(p.__unstableCompositeGroup,i({state:n,role:"presentation",ref:t},e))})),Cu=function(e){let{items:t=[],onSelect:n,onHover:o=(()=>{}),children:l,label:i,isDraggable:a=!0}=e;return(0,s.createElement)(yu,{className:"block-editor-block-types-list","aria-label":i},function(e,t){const n=[];for(let t=0,o=e.length;t<o;t+=3)n.push(e.slice(t,t+3));return n}(t).map(((e,t)=>(0,s.createElement)(Eu,{key:t},e.map(((e,l)=>(0,s.createElement)(_u,{key:e.id,item:e,className:(0,r.getBlockMenuDefaultClassName)(e.id),onSelect:n,onHover:o,isDraggable:a,isFirst:0===t&&0===l})))))),l)},Su=function(e){let{title:t,icon:n,children:o}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:"block-editor-inserter__panel-header"},(0,s.createElement)("h2",{className:"block-editor-inserter__panel-title"},t),(0,s.createElement)(p.Icon,{icon:n})),(0,s.createElement)("div",{className:"block-editor-inserter__panel-content"},o))},wu=(e,t)=>{const{categories:n,collections:o,items:l}=(0,m.useSelect)((t=>{const{getInserterItems:n}=t(Vn),{getCategories:o,getCollections:l}=t(r.store);return{categories:o(),collections:l(),items:n(e)}}),[e]);return[l,n,o,(0,s.useCallback)(((e,n)=>{let{name:o,initialAttributes:l,innerBlocks:i}=e;const s=(0,r.createBlock)(o,l,(0,r.createBlocksFromInnerBlocksTemplate)(i));t(s,void 0,n)}),[t])]},Bu=function(e){let{children:t}=e;const n=(0,p.__unstableUseCompositeState)({shift:!0,wrap:"horizontal"});return(0,s.createElement)(fu.Provider,{value:n},t)};const Iu=[];var xu=function(e){let{rootClientId:t,onInsert:n,onHover:o,showMostUsedBlocks:r}=e;const[l,i,a,c]=wu(t,n),p=(0,s.useMemo)((()=>(0,u.orderBy)(l,["frecency"],["desc"]).slice(0,6)),[l]),m=(0,s.useMemo)((()=>l.filter((e=>!e.category))),[l]),f=(0,s.useMemo)((()=>(0,u.flow)((e=>e.filter((e=>e.category&&"reusable"!==e.category))),(e=>(0,u.groupBy)(e,"category")))(l)),[l]),g=(0,s.useMemo)((()=>{const e={...a};return Object.keys(a).forEach((t=>{e[t]=l.filter((e=>(e=>e.name.split("/")[0])(e)===t)),0===e[t].length&&delete e[t]})),e}),[l,a]);(0,s.useEffect)((()=>()=>o(null)),[]);const v=(0,d.useAsyncList)(i),b=i.length===v.length,k=(0,s.useMemo)((()=>Object.entries(a)),[a]),_=(0,d.useAsyncList)(b?k:Iu);return(0,s.createElement)(Bu,null,(0,s.createElement)("div",null,r&&!!p.length&&(0,s.createElement)(Su,{title:(0,h._x)("Most used","blocks")},(0,s.createElement)(Cu,{items:p,onSelect:c,onHover:o,label:(0,h._x)("Most used","blocks")})),(0,u.map)(v,(e=>{const t=f[e.slug];return t&&t.length?(0,s.createElement)(Su,{key:e.slug,title:e.title,icon:e.icon},(0,s.createElement)(Cu,{items:t,onSelect:c,onHover:o,label:e.title})):null})),b&&m.length>0&&(0,s.createElement)(Su,{className:"block-editor-inserter__uncategorized-blocks-panel",title:(0,h.__)("Uncategorized")},(0,s.createElement)(Cu,{items:m,onSelect:c,onHover:o,label:(0,h.__)("Uncategorized")})),(0,u.map)(_,(e=>{let[t,n]=e;const r=g[t];return r&&r.length?(0,s.createElement)(Su,{key:t,title:n.title,icon:n.icon},(0,s.createElement)(Cu,{items:r,onSelect:c,onHover:o,label:n.title})):null}))))},Tu=function(e){let{selectedCategory:t,patternCategories:n,onClickCategory:o,openPatternExplorer:r}=e;const l=(0,d.useViewportMatch)("medium","<"),i=c()("block-editor-inserter__panel-header","block-editor-inserter__panel-header-patterns");return(0,s.createElement)(p.Flex,{justify:"space-between",align:"start",gap:"4",className:i},(0,s.createElement)(p.FlexItem,{isBlock:!0},(0,s.createElement)(p.SelectControl,{className:"block-editor-inserter__panel-dropdown",label:(0,h.__)("Filter patterns"),hideLabelFromVision:!0,value:t.name,onChange:e=>{o(n.find((t=>e===t.name)))},onBlur:e=>{null!=e&&e.relatedTarget||e.stopPropagation()},options:(()=>{const e=[];return n.map((t=>e.push({value:t.name,label:t.label}))),e})()})),!l&&(0,s.createElement)(p.FlexItem,null,(0,s.createElement)(p.Button,{variant:"secondary",className:"block-editor-inserter__patterns-explorer-expand",label:(0,h.__)("Explore all patterns"),onClick:()=>r()},(0,h._x)("Explore","Label for showing all block patterns"))))},Nu=window.wp.notices,Pu=(e,t)=>{const{patternCategories:n,patterns:o}=(0,m.useSelect)((e=>{const{__experimentalGetAllowedPatterns:n,getSettings:o}=e(Vn);return{patterns:n(t),patternCategories:o().__experimentalBlockPatternCategories}}),[t]),{createSuccessNotice:l}=(0,m.useDispatch)(Nu.store);return[o,n,(0,s.useCallback)(((t,n)=>{e((0,u.map)(n,(e=>(0,r.cloneBlock)(e))),t.name),l((0,h.sprintf)(
13
  /* translators: %s: block pattern title. */
@@ -26,8 +26,8 @@ title:(0,h.__)("Patterns")},fd={name:"reusable",
26
  /* translators: Reusable blocks tab title in the block inserter. */
27
  title:(0,h.__)("Reusable")};var hd=function(e){let{children:t,showPatterns:n=!1,showReusableBlocks:o=!1,onSelect:r}=e;const l=(0,s.useMemo)((()=>{const e=[pd];return n&&e.push(md),o&&e.push(fd),e}),[pd,n,md,o,fd]);return(0,s.createElement)(p.TabPanel,{className:"block-editor-inserter__tabs",tabs:l,onSelect:r},t)},gd=function(e){let{rootClientId:t,clientId:n,isAppender:o,__experimentalInsertionIndex:r,onSelect:l,showInserterHelpPanel:i,showMostUsedBlocks:a,__experimentalFilterValue:c="",shouldFocusBlock:u=!0}=e;const[d,f]=(0,s.useState)(c),[g,v]=(0,s.useState)(null),[b,k]=(0,s.useState)(null),[_,y,E]=zu({rootClientId:t,clientId:n,isAppender:o,insertionIndex:r,shouldFocusBlock:u}),{showPatterns:C,hasReusableBlocks:S}=(0,m.useSelect)((e=>{var t;const{__experimentalGetAllowedPatterns:n,getSettings:o}=e(Vn);return{showPatterns:!!n(_).length,hasReusableBlocks:!(null===(t=o().__experimentalReusableBlocks)||void 0===t||!t.length)}}),[_]),w=(0,s.useCallback)(((e,t,n)=>{y(e,t,n),l()}),[y,l]),B=(0,s.useCallback)(((e,t)=>{y(e,{patternName:t}),l()}),[y,l]),I=(0,s.useCallback)((e=>{E(!!e),v(e)}),[E,v]),x=(0,s.useCallback)((e=>{k(e)}),[k]),T=(0,s.useMemo)((()=>(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:"block-editor-inserter__block-list"},(0,s.createElement)(xu,{rootClientId:_,onInsert:w,onHover:I,showMostUsedBlocks:a})),i&&(0,s.createElement)("div",{className:"block-editor-inserter__tips"},(0,s.createElement)(p.VisuallyHidden,{as:"h2"},(0,h.__)("A tip for using the block editor")),(0,s.createElement)(Va,null)))),[_,w,I,d,a,i]),N=(0,s.useMemo)((()=>(0,s.createElement)(od,{rootClientId:_,onInsert:B,onClickCategory:x,selectedCategory:b})),[_,B,x,b]),P=(0,s.useMemo)((()=>(0,s.createElement)(id,{rootClientId:_,onInsert:w,onHover:I})),[_,w,I]),M=(0,s.useCallback)((e=>"blocks"===e.name?T:"patterns"===e.name?N:P),[T,N,P]);return(0,s.createElement)("div",{className:"block-editor-inserter__menu"},(0,s.createElement)("div",{className:"block-editor-inserter__main-area"},(0,s.createElement)("div",{className:"block-editor-inserter__content"},(0,s.createElement)(p.SearchControl,{className:"block-editor-inserter__search",onChange:e=>{g&&v(null),f(e)},value:d,label:(0,h.__)("Search for blocks and patterns"),placeholder:(0,h.__)("Search")}),!!d&&(0,s.createElement)(dd,{filterValue:d,onSelect:l,onHover:I,rootClientId:t,clientId:n,isAppender:o,__experimentalInsertionIndex:r,showBlockDirectory:!0,shouldFocusBlock:u}),!d&&(C||S)&&(0,s.createElement)(hd,{showPatterns:C,showReusableBlocks:S},M),!d&&!C&&!S&&T)),i&&g&&(0,s.createElement)(mu,{item:g}))};function vd(e){let{onSelect:t,rootClientId:n,clientId:o,isAppender:r}=e;const[l,i]=(0,s.useState)(""),[a,u]=zu({onSelect:t,rootClientId:n,clientId:o,isAppender:r}),[d]=wu(a,u),[f]=Pu(u,a),g=f.length&&!!l,v=g&&f.length>6||d.length>6,{setInserterIsOpened:b,insertionIndex:k}=(0,m.useSelect)((e=>{const{getSettings:t,getBlockIndex:r,getBlockCount:l}=e(Vn),i=r(o,n);return{setInserterIsOpened:t().__experimentalSetIsInserterOpened,insertionIndex:-1===i?l():i}}),[o,n]);return(0,s.useEffect)((()=>{b&&b(!1)}),[b]),(0,s.createElement)("div",{className:c()("block-editor-inserter__quick-inserter",{"has-search":v,"has-expand":b})},v&&(0,s.createElement)(p.SearchControl,{className:"block-editor-inserter__search",value:l,onChange:e=>{i(e)},label:(0,h.__)("Search for blocks and patterns"),placeholder:(0,h.__)("Search")}),(0,s.createElement)("div",{className:"block-editor-inserter__quick-inserter-results"},(0,s.createElement)(dd,{filterValue:l,onSelect:t,rootClientId:n,clientId:o,isAppender:r,maxBlockPatterns:g?2:0,maxBlockTypes:6,isDraggable:!1})),b&&(0,s.createElement)(p.Button,{className:"block-editor-inserter__quick-inserter-expand",onClick:()=>{b({rootClientId:n,insertionIndex:k,filterValue:l})},"aria-label":(0,h.__)("Browse all. This will open the main inserter panel in the editor toolbar.")},(0,h.__)("Browse all")))}const bd=e=>{let t,{onToggle:n,disabled:o,isOpen:r,blockTitle:l,hasSingleBlockType:a,toggleProps:c={}}=e;t=a?(0,h.sprintf)(// translators: %s: the name of the block when there is only one
28
  (0,h._x)("Add %s","directly add the only allowed block"),l):(0,h._x)("Add block","Generic label for block inserter button");const{onClick:u,...d}=c;return(0,s.createElement)(p.Button,i({icon:Fa,label:t,tooltipPosition:"bottom",onClick:function(e){n&&n(e),u&&u(e)},className:"block-editor-inserter__toggle","aria-haspopup":!a&&"true","aria-expanded":!a&&r,disabled:o},d))};class kd extends s.Component{constructor(){super(...arguments),this.onToggle=this.onToggle.bind(this),this.renderToggle=this.renderToggle.bind(this),this.renderContent=this.renderContent.bind(this)}onToggle(e){const{onToggle:t}=this.props;t&&t(e)}renderToggle(e){let{onToggle:t,isOpen:n}=e;const{disabled:o,blockTitle:r,hasSingleBlockType:l,directInsertBlock:i,toggleProps:s,hasItems:a,renderToggle:c=bd}=this.props;return c({onToggle:t,isOpen:n,disabled:o||!a,blockTitle:r,hasSingleBlockType:l,directInsertBlock:i,toggleProps:s})}renderContent(e){let{onClose:t}=e;const{rootClientId:n,clientId:o,isAppender:r,showInserterHelpPanel:l,__experimentalIsQuick:i}=this.props;return i?(0,s.createElement)(vd,{onSelect:()=>{t()},rootClientId:n,clientId:o,isAppender:r}):(0,s.createElement)(gd,{onSelect:()=>{t()},rootClientId:n,clientId:o,isAppender:r,showInserterHelpPanel:l})}render(){const{position:e,hasSingleBlockType:t,directInsertBlock:n,insertOnlyAllowedBlock:o,__experimentalIsQuick:r,onSelectOrClose:l}=this.props;return t||null!=n&&n.length?this.renderToggle({onToggle:o}):(0,s.createElement)(p.Dropdown,{className:"block-editor-inserter",contentClassName:c()("block-editor-inserter__popover",{"is-quick":r}),position:e,onToggle:this.onToggle,expandOnMobile:!0,headerTitle:(0,h.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent,onClose:l})}}var _d=(0,d.compose)([(0,m.withSelect)(((e,t)=>{let{clientId:n,rootClientId:o}=t;const{getBlockRootClientId:l,hasInserterItems:i,__experimentalGetAllowedBlocks:s,__experimentalGetDirectInsertBlock:a}=e(Vn),{getBlockVariations:c}=e(r.store);o=o||l(n)||void 0;const d=s(o),p=a(o),m=1===(0,u.size)(d)&&0===(0,u.size)(c(d[0].name,"inserter"));let f=!1;return m&&(f=d[0]),{hasItems:i(o),hasSingleBlockType:m,blockTitle:f?f.title:"",allowedBlockType:f,directInsertBlock:p,rootClientId:o}})),(0,m.withDispatch)(((e,t,n)=>{let{select:o}=n;return{insertOnlyAllowedBlock(){const{rootClientId:n,clientId:l,isAppender:i,hasSingleBlockType:s,allowedBlockType:a,directInsertBlock:c,onSelectOrClose:u}=t;if(!(s||null!=c&&c.length))return;const{insertBlock:d}=e(Vn);d(null!=c&&c.length?(0,r.createBlock)(...c):(0,r.createBlock)(a.name),function(){const{getBlockIndex:e,getBlockSelectionEnd:t,getBlockOrder:r,getBlockRootClientId:s}=o(Vn);if(l)return e(l,n);const a=t();return!i&&a&&s(a)===n?e(a,n)+1:r(n).length}(),n),u&&u();const p=(0,h.sprintf)(// translators: %s: the name of the block that has been added
29
- (0,h.__)("%s block added"),a.title);(0,Pt.speak)(p)}}})),(0,d.ifCondition)((e=>{let{hasItems:t,isAppender:n,rootClientId:o,clientId:r}=e;return t||!n&&!o&&!r}))])(kd),yd=(0,d.compose)((0,m.withSelect)(((e,t)=>{const{getBlockCount:n,getBlockName:o,isBlockValid:l,getSettings:i,getTemplateLock:s}=e(Vn),a=!n(t.rootClientId),c=o(t.lastBlockClientId)===(0,r.getDefaultBlockName)(),u=l(t.lastBlockClientId),{bodyPlaceholder:d}=i();return{isVisible:a||!c||!u,showPrompt:a,isLocked:!!s(t.rootClientId),placeholder:d}})),(0,m.withDispatch)(((e,t)=>{const{insertDefaultBlock:n,startTyping:o}=e(Vn);return{onAppend(){const{rootClientId:e}=t;n(void 0,e),o()}}})))((function(e){let{isLocked:t,isVisible:n,onAppend:o,showPrompt:r,placeholder:l,rootClientId:i}=e;if(t||!n)return null;const a=(0,Oa.decodeEntities)(l)||(0,h.__)("Type / to choose a block");return(0,s.createElement)("div",{"data-root-client-id":i||"",className:c()("block-editor-default-block-appender",{"has-visible-prompt":r})},(0,s.createElement)("p",{tabIndex:"0",contentEditable:!0,suppressContentEditableWarning:!0,role:"button","aria-label":(0,h.__)("Add block"),className:"block-editor-default-block-appender__content",onFocus:o},r?a:"\ufeff"),(0,s.createElement)(_d,{rootClientId:i,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0}))}));function Ed(e,t){let{rootClientId:n,className:o,onFocus:r,tabIndex:l}=e;return(0,s.createElement)(_d,{position:"bottom center",rootClientId:n,__experimentalIsQuick:!0,renderToggle:e=>{let n,{onToggle:i,disabled:a,isOpen:u,blockTitle:d,hasSingleBlockType:m}=e;n=m?(0,h.sprintf)(// translators: %s: the name of the block when there is only one
30
- (0,h._x)("Add %s","directly add the only allowed block"),d):(0,h._x)("Add block","Generic label for block inserter button");const f=!m;let g=(0,s.createElement)(p.Button,{ref:t,onFocus:r,tabIndex:l,className:c()(o,"block-editor-button-block-appender"),onClick:i,"aria-haspopup":f?"true":void 0,"aria-expanded":f?u:void 0,disabled:a,label:n},!m&&(0,s.createElement)(p.VisuallyHidden,{as:"span"},n),(0,s.createElement)(wo,{icon:Fa}));return(f||m)&&(g=(0,s.createElement)(p.Tooltip,{text:n},g)),g},isAppender:!0})}const Cd=(0,s.forwardRef)(((e,t)=>(Lt()("wp.blockEditor.ButtonBlockerAppender",{alternative:"wp.blockEditor.ButtonBlockAppender"}),Ed(e,t))));var Sd=(0,s.forwardRef)(Ed),wd=(0,m.withSelect)(((e,t)=>{let{rootClientId:n}=t;const{getBlockOrder:o,canInsertBlockType:l,getTemplateLock:i,getSelectedBlockClientId:s}=e(Vn);return{isLocked:!!i(n),blockClientIds:o(n),canInsertDefaultBlock:l((0,r.getDefaultBlockName)(),n),selectedBlockClientId:s()}}))((function(e){let t,{blockClientIds:n,rootClientId:o,canInsertDefaultBlock:r,isLocked:l,renderAppender:i,className:a,selectedBlockClientId:d,tagName:p="div"}=e;if(l||!1===i)return null;if(i)t=(0,s.createElement)(i,null);else{const e=!o,l=d===o,i=d&&!n.includes(d);if(!e&&!l&&(!d||i))return null;t=r?(0,s.createElement)(yd,{rootClientId:o,lastBlockClientId:(0,u.last)(n)}):(0,s.createElement)(Sd,{rootClientId:o,className:"block-list-appender__toggle"})}return(0,s.createElement)(p,{tabIndex:-1,className:c()("block-list-appender wp-block",a),"data-block":!0},t)}));function Bd(e){return(0,d.useRefEffect)((t=>{if(!e)return;function n(t){const{deltaX:n,deltaY:o}=t;e.current.scrollBy(n,o)}const o={passive:!0};return t.addEventListener("wheel",n,o),()=>{t.removeEventListener("wheel",n,o)}}),[e])}const Id=(0,s.createContext)();function xd(e){let{__unstablePopoverSlot:t,__unstableContentRef:n}=e;const{selectBlock:o}=(0,m.useDispatch)(Vn),r=(0,s.useContext)(Id),l=(0,s.useRef)(),{orientation:i,previousClientId:a,nextClientId:u,rootClientId:f,isInserterShown:g}=(0,m.useSelect)((e=>{var t;const{getBlockOrder:n,getBlockListSettings:o,getBlockInsertionPoint:r,isBlockBeingDragged:l,getPreviousBlockClientId:i,getNextBlockClientId:s}=e(Vn),a=r(),c=n(a.rootClientId);if(!c.length)return{};let u=c[a.index-1],d=c[a.index];for(;l(u);)u=i(u);for(;l(d);)d=s(d);return{previousClientId:u,nextClientId:d,orientation:(null===(t=o(a.rootClientId))||void 0===t?void 0:t.orientation)||"vertical",rootClientId:a.rootClientId,isInserterShown:null==a?void 0:a.__unstableWithInserter}}),[]),v=Ia(a),b=Ia(u),k="vertical"===i,_=(0,s.useMemo)((()=>{if(!v&&!b)return{};const e=v?v.getBoundingClientRect():null,t=b?b.getBoundingClientRect():null;if(k)return{width:v?v.offsetWidth:b.offsetWidth,height:t&&e?t.top-e.bottom:0};let n=0;return e&&t&&(n=(0,h.isRTL)()?e.left-t.right:t.left-e.right),{width:n,height:v?v.offsetHeight:b.offsetHeight}}),[v,b]),y=(0,s.useCallback)((()=>{if(!v&&!b)return{};const{ownerDocument:e}=v||b,t=v?v.getBoundingClientRect():null,n=b?b.getBoundingClientRect():null;return k?(0,h.isRTL)()?{top:t?t.bottom:n.top,left:t?t.right:n.right,right:t?t.left:n.left,bottom:n?n.top:t.bottom,ownerDocument:e}:{top:t?t.bottom:n.top,left:t?t.left:n.left,right:t?t.right:n.right,bottom:n?n.top:t.bottom,ownerDocument:e}:(0,h.isRTL)()?{top:t?t.top:n.top,left:t?t.left:n.right,right:n?n.right:t.left,bottom:t?t.bottom:n.bottom,ownerDocument:e}:{top:t?t.top:n.top,left:t?t.right:n.left,right:n?n.left:t.right,bottom:t?t.bottom:n.bottom,ownerDocument:e}}),[v,b]),E=Bd(n),C=(0,d.useReducedMotion)(),S=c()("block-editor-block-list__insertion-point","is-"+i),w=v&&b&&g,B={start:{...k?{height:0,left:"50%",right:"50%",y:0}:{width:0,top:"50%",bottom:"50%",x:0},opacity:0},rest:{...k?{height:4,left:0,right:0,y:-2}:{width:4,top:0,bottom:0,x:-2},opacity:1,borderRadius:"2px",transition:{delay:w?.4:0}},hover:{...k?{height:4,left:0,right:0,y:-2}:{width:4,top:0,bottom:0,x:-2},opacity:1,borderRadius:"2px",transition:{delay:.4}}},I={start:{scale:C?1:0},rest:{scale:1,transition:{delay:.2}}};return(0,s.createElement)(p.Popover,{ref:E,noArrow:!0,animate:!1,getAnchorRect:y,focusOnMount:!1,className:"block-editor-block-list__insertion-point-popover",__unstableSlotName:t||null,key:u+"--"+f},(0,s.createElement)(p.__unstableMotion.div,{layout:!C,initial:C?"rest":"start",animate:"rest",whileHover:"hover",whileTap:"pressed",exit:"start",ref:l,tabIndex:-1,onClick:function(e){e.target===l.current&&u&&o(u,-1)},onFocus:function(e){e.target!==l.current&&(r.current=!0)},className:c()(S,{"is-with-inserter":w}),style:_},(0,s.createElement)(p.__unstableMotion.div,{variants:B,className:"block-editor-block-list__insertion-point-indicator"}),w&&(0,s.createElement)(p.__unstableMotion.div,{variants:I,className:c()("block-editor-block-list__insertion-point-inserter")},(0,s.createElement)(_d,{position:"bottom center",clientId:u,rootClientId:f,__experimentalIsQuick:!0,onToggle:e=>{r.current=e},onSelectOrClose:()=>{r.current=!1}}))))}function Td(e){let{children:t,__unstablePopoverSlot:n,__unstableContentRef:o}=e;const r=(0,m.useSelect)((e=>e(Vn).isBlockInsertionPointVisible()),[]);return(0,s.createElement)(Id.Provider,{value:(0,s.useRef)(!1)},r&&(0,s.createElement)(xd,{__unstablePopoverSlot:n,__unstableContentRef:o}),t)}function Nd(){const e=(0,s.useContext)(Id),t=(0,m.useSelect)((e=>e(Vn).getSettings().hasReducedUI),[]),{getBlockListSettings:n,getBlockRootClientId:o,getBlockIndex:r,isBlockInsertionPointVisible:l,isMultiSelecting:i,getSelectedBlockClientIds:a,getTemplateLock:c}=(0,m.useSelect)(Vn),{showInsertionPoint:u,hideInsertionPoint:p}=(0,m.useDispatch)(Vn);return(0,d.useRefEffect)((o=>{if(!t)return o.addEventListener("mousemove",s),()=>{o.removeEventListener("mousemove",s)};function s(t){var o,s;if(e.current)return;if(i())return;if(!t.target.classList.contains("block-editor-block-list__layout"))return void(l()&&p());let d;if(t.target.classList.contains("is-root-container")||(d=(t.target.getAttribute("data-block")?t.target:t.target.closest("[data-block]")).getAttribute("data-block")),c(d))return;const m=(null===(o=n(d))||void 0===o?void 0:o.orientation)||"vertical",f=t.target.getBoundingClientRect(),h=t.clientY-f.top,g=t.clientX-f.left;let v=Array.from(t.target.children).find((e=>e.classList.contains("wp-block")&&"vertical"===m&&e.offsetTop>h||e.classList.contains("wp-block")&&"horizontal"===m&&e.offsetLeft>g));if(!v)return;if(!v.id&&(v=v.firstElementChild,!v))return;if(null===(s=v.parentElement)||void 0===s?void 0:s.closest(".block-editor-block-content-overlay.overlay-active"))return;const b=v.id.slice("block-".length);if(!b)return;if(a().includes(b))return;const k=v.getBoundingClientRect();if("horizontal"===m&&(t.clientY>k.bottom||t.clientY<k.top)||"vertical"===m&&(t.clientX>k.right||t.clientX<k.left))return void(l()&&p());const _=r(b,d);0!==_?u(d,_,{__unstableWithInserter:!0}):l()&&p()}}),[e,n,o,r,l,i,u,p,a])}const Pd="undefined"==typeof window?e=>{setTimeout((()=>e(Date.now())),0)}:window.requestIdleCallback||window.requestAnimationFrame,Md="undefined"==typeof window?clearTimeout:window.cancelIdleCallback||window.cancelAnimationFrame;function Rd(e){return(0,m.useSelect)((t=>{if(!e)return null;const{getBlockName:n,getBlockAttributes:o}=t(Vn),{getBlockType:l,getActiveBlockVariation:i}=t(r.store),s=n(e),a=l(s);if(!a)return null;const c=o(e),u=i(s,c),d={title:a.title,icon:a.icon,description:a.description,anchor:null==c?void 0:c.anchor};return u?{title:u.title||a.title,icon:u.icon||a.icon,description:u.description||a.description}:d}),[e])}function Ld(e){let{clientId:t}=e;const{attributes:n,name:o,reusableBlockTitle:l}=(0,m.useSelect)((e=>{if(!t)return{};const{getBlockName:n,getBlockAttributes:o,__experimentalGetReusableBlockTitle:l}=e(Vn),i=n(t);if(!i)return{};const s=(0,r.isReusableBlock)((0,r.getBlockType)(i));return{attributes:o(t),name:i,reusableBlockTitle:s&&l(o(t).ref)}}),[t]),i=Rd(t);if(!o||!i)return null;const s=(0,r.getBlockType)(o),a=s?(0,r.__experimentalGetBlockLabel)(s,n):null,c=l||a;return c&&c!==s.title?(0,u.truncate)(c,{length:35}):i.title}var Ad=e=>{let{children:t,clientIds:n,cloneClassname:o,onDragStart:l,onDragEnd:i}=e;const{srcRootClientId:a,isDraggable:c,icon:u}=(0,m.useSelect)((e=>{var t;const{getBlockRootClientId:o,getTemplateLock:l,getBlockName:i}=e(Vn),s=o(n[0]),a=s?l(s):null,c=i(n[0]);return{srcRootClientId:s,isDraggable:"all"!==a,icon:null===(t=(0,r.getBlockType)(c))||void 0===t?void 0:t.icon}}),[n]),d=(0,s.useRef)(!1),[f,h,g]=function(){const e=(0,s.useRef)(null),t=(0,s.useRef)(null),n=(0,s.useRef)(null),o=(0,s.useRef)(null);return(0,s.useEffect)((()=>()=>{o.current&&(clearInterval(o.current),o.current=null)}),[]),[(0,s.useCallback)((r=>{e.current=r.clientY,n.current=(0,rr.getScrollContainer)(r.target),o.current=setInterval((()=>{if(n.current&&t.current){const e=n.current.scrollTop+t.current;n.current.scroll({top:e})}}),25)}),[]),(0,s.useCallback)((o=>{if(!n.current)return;const r=n.current.offsetHeight,l=e.current-n.current.offsetTop,i=o.clientY-n.current.offsetTop;if(o.clientY>l){const e=Math.max(r-l-50,0),n=Math.max(i-l-50,0)/e;t.current=25*n}else if(o.clientY<l){const e=Math.max(l-50,0),n=Math.max(l-i-50,0)/e;t.current=-25*n}else t.current=0}),[]),()=>{e.current=null,n.current=null,o.current&&(clearInterval(o.current),o.current=null)}]}(),{startDraggingBlocks:v,stopDraggingBlocks:b}=(0,m.useDispatch)(Vn);if((0,s.useEffect)((()=>()=>{d.current&&b()}),[]),!c)return t({isDraggable:!1});const k={type:"block",srcClientIds:n,srcRootClientId:a};return(0,s.createElement)(p.Draggable,{cloneClassname:o,__experimentalTransferDataType:"wp-blocks",transferData:k,onDragStart:e=>{v(n),d.current=!0,f(e),l&&l()},onDragOver:h,onDragEnd:()=>{b(),d.current=!1,g(),i&&i()},__experimentalDragComponent:(0,s.createElement)(vu,{count:n.length,icon:u})},(e=>{let{onDraggableStart:n,onDraggableEnd:o}=e;return t({draggable:!0,onDragStart:n,onDragEnd:o})}))},Dd=function(e){let{clientId:t,rootClientId:n,blockElement:o}=e;const l=Rd(t),a=(0,m.useSelect)((e=>{var o;const{getBlock:r,getBlockIndex:l,hasBlockMovingClientId:i,getBlockListSettings:s}=e(Vn),a=l(t,n),{name:c,attributes:u}=r(t);return{index:a,name:c,attributes:u,blockMovingMode:i(),orientation:null===(o=s(n))||void 0===o?void 0:o.orientation}}),[t,n]),{index:u,name:d,attributes:f,blockMovingMode:g,orientation:v}=a,{setNavigationMode:b,removeBlock:k}=(0,m.useDispatch)(Vn),_=(0,s.useRef)(),y=(0,r.getBlockType)(d),E=(0,r.__experimentalGetAccessibleBlockLabel)(y,f,u+1,v);(0,s.useEffect)((()=>{_.current.focus(),(0,Pt.speak)(E)}),[E]);const{hasBlockMovingClientId:C,getBlockIndex:S,getBlockRootClientId:w,getClientIdsOfDescendants:B,getSelectedBlockClientId:I,getMultiSelectedBlocksEndClientId:x,getPreviousBlockClientId:T,getNextBlockClientId:N}=(0,m.useSelect)(Vn),{selectBlock:P,clearSelectedBlock:M,setBlockMovingClientId:R,moveBlockToPosition:L}=(0,m.useDispatch)(Vn),A=c()("block-editor-block-list__block-selection-button",{"is-block-moving-mode":!!g}),D=(0,h.__)("Drag");return(0,s.createElement)("div",{className:A},(0,s.createElement)(p.Flex,{justify:"center",className:"block-editor-block-list__block-selection-button__content"},(0,s.createElement)(p.FlexItem,null,(0,s.createElement)(Ua,{icon:null==l?void 0:l.icon,showColors:!0})),(0,s.createElement)(p.FlexItem,null,(0,s.createElement)(Ad,{clientIds:[t]},(e=>(0,s.createElement)(p.Button,i({icon:gu,className:"block-selection-button_drag-handle","aria-hidden":"true",label:D,tabIndex:"-1"},e))))),(0,s.createElement)(p.FlexItem,null,(0,s.createElement)(p.Button,{ref:_,onClick:()=>b(!1),onKeyDown:function(e){const{keyCode:n}=e,r=n===va.UP,l=n===va.DOWN,i=n===va.LEFT,s=n===va.RIGHT,a=n===va.TAB,c=n===va.ESCAPE,u=n===va.ENTER,d=n===va.SPACE,p=e.shiftKey;if(n===va.BACKSPACE||n===va.DELETE)return k(t),void e.preventDefault();const m=I(),f=x(),h=T(f||m),g=N(f||m),v=a&&p||r,b=a&&!p||l,_=i,y=s;let E;if(v)E=h;else if(b)E=g;else if(_){var A;E=null!==(A=w(m))&&void 0!==A?A:m}else if(y){var D;E=null!==(D=B([m])[0])&&void 0!==D?D:m}const O=C();if(c&&O&&!e.defaultPrevented&&(R(null),e.preventDefault()),(u||d)&&O){const e=w(O),t=w(m),n=S(O,e);let o=S(m,t);n<o&&e===t&&(o-=1),L(O,e,t,o),P(O),R(null)}if(b||v||_||y)if(E)e.preventDefault(),P(E);else if(a&&m){let t;b?(t=rr.focus.tabbable.findNext(o),t||(t=o.ownerDocument.defaultView.frameElement,t=rr.focus.tabbable.findNext(t))):t=rr.focus.tabbable.findPrevious(o),t&&(e.preventDefault(),t.focus(),M())}},label:E,className:"block-selection-button_select-button"},(0,s.createElement)(Ld,{clientId:t})))))};function Od(e){return Array.from(e.querySelectorAll("[data-toolbar-item]"))}var Fd=function(e){let{children:t,focusOnMount:n,__experimentalInitialIndex:o,__experimentalOnIndexChange:r,...l}=e;const a=(0,s.useRef)(),c=function(e){const[t,n]=(0,s.useState)(!0),o=(0,s.useCallback)((()=>{const t=!rr.focus.tabbable.find(e.current).some((e=>!("toolbarItem"in e.dataset)));t||Lt()("Using custom components as toolbar controls",{since:"5.6",alternative:"ToolbarItem, ToolbarButton or ToolbarDropdownMenu components",link:"https://developer.wordpress.org/block-editor/components/toolbar-button/#inside-blockcontrols"}),n(t)}),[]);return(0,s.useLayoutEffect)((()=>{const t=new window.MutationObserver(o);return t.observe(e.current,{childList:!0,subtree:!0}),()=>t.disconnect()}),[t]),t}(a);return function(e,t,n,o,r){const[l]=(0,s.useState)(t),[i]=(0,s.useState)(o),a=(0,s.useCallback)((()=>{!function(e){const[t]=rr.focus.tabbable.find(e);t&&t.focus()}(e.current)}),[]);(0,tc.useShortcut)("core/block-editor/focus-toolbar",a),(0,s.useEffect)((()=>{l&&a()}),[n,l,a]),(0,s.useEffect)((()=>{let t=0;return i&&!l&&(t=window.requestAnimationFrame((()=>{const t=Od(e.current),n=i||0;var o;t[n]&&(o=e.current).contains(o.ownerDocument.activeElement)&&t[n].focus()}))),()=>{if(window.cancelAnimationFrame(t),!r||!e.current)return;const n=Od(e.current).findIndex((e=>0===e.tabIndex));r(n)}}),[i,l])}(a,n,c,o,r),c?(0,s.createElement)(p.Toolbar,i({label:l["aria-label"],ref:a},l),t):(0,s.createElement)(p.NavigableMenu,i({orientation:"horizontal",role:"toolbar",ref:a},l),t)},zd=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})),Vd=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})),Hd=(0,s.createElement)(F.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(F.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})),Ud=(0,s.createElement)(F.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(F.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));const Gd=(e,t)=>"up"===e?"horizontal"===t?(0,h.isRTL)()?zd:Vd:Hd:"down"===e?"horizontal"===t?(0,h.isRTL)()?Vd:zd:Ud:null,Wd=(e,t)=>"up"===e?"horizontal"===t?(0,h.isRTL)()?(0,h.__)("Move right"):(0,h.__)("Move left"):(0,h.__)("Move up"):"down"===e?"horizontal"===t?(0,h.isRTL)()?(0,h.__)("Move left"):(0,h.__)("Move right"):(0,h.__)("Move down"):null,$d=(0,s.forwardRef)(((e,t)=>{let{clientIds:n,direction:o,orientation:l,...a}=e;const f=(0,d.useInstanceId)($d),g=(0,u.castArray)(n).length,{blockType:v,isDisabled:b,rootClientId:k,isFirst:_,isLast:y,firstIndex:E,orientation:C="vertical"}=(0,m.useSelect)((e=>{const{getBlockIndex:t,getBlockRootClientId:i,getBlockOrder:s,getBlock:a,getBlockListSettings:c}=e(Vn),d=(0,u.castArray)(n),p=(0,u.first)(d),m=i(p),f=t(p,m),h=t((0,u.last)(d),m),g=s(m),v=a(p),b=0===f,k=h===g.length-1,{orientation:_}=c(m)||{};return{blockType:v?(0,r.getBlockType)(v.name):null,isDisabled:"up"===o?b:k,rootClientId:m,firstIndex:f,isFirst:b,isLast:k,orientation:l||_}}),[n,o]),{moveBlocksDown:S,moveBlocksUp:w}=(0,m.useDispatch)(Vn),B="up"===o?w:S,I=`block-editor-block-mover-button__description-${f}`;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.Button,i({ref:t,className:c()("block-editor-block-mover-button",`is-${o}-button`),icon:Gd(o,C),label:Wd(o,C),"aria-describedby":I},a,{onClick:b?null:e=>{B(n,k),a.onClick&&a.onClick(e)},"aria-disabled":b})),(0,s.createElement)("span",{id:I,className:"block-editor-block-mover-button__description"},function(e,t,n,o,r,l,i){const s=n+1,a=e=>"up"===e?"horizontal"===i?(0,h.isRTL)()?"right":"left":"up":"down"===e?"horizontal"===i?(0,h.isRTL)()?"left":"right":"down":null;if(e>1)return function(e,t,n,o,r){const l=t+1;return r<0&&n?(0,h.__)("Blocks cannot be moved up as they are already at the top"):r>0&&o?(0,h.__)("Blocks cannot be moved down as they are already at the bottom"):r<0&&!n?(0,h.sprintf)(// translators: 1: Number of selected blocks, 2: Position of selected blocks
31
  (0,h._n)("Move %1$d block from position %2$d up by one place","Move %1$d blocks from position %2$d up by one place",e),e,l):r>0&&!o?(0,h.sprintf)(// translators: 1: Number of selected blocks, 2: Position of selected blocks
32
  (0,h._n)("Move %1$d block from position %2$d down by one place","Move %1$d blocks from position %2$d down by one place",e),e,l):void 0}(e,n,o,r,l);if(o&&r)return(0,h.sprintf)(// translators: %s: Type of block (i.e. Text, Image etc)
33
  (0,h.__)("Block %s is the only block, and cannot be moved"),t);if(l>0&&!r){const e=a("down");if("down"===e)return(0,h.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
@@ -55,38 +55,38 @@ title:(0,h.__)("Reusable")};var hd=function(e){let{children:t,showPatterns:n=!1,
55
  (0,h._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",r.length),r.length);n(l,{type:"snackbar"})}),[])}function Cp(){const{getBlocksByClientId:e,getSelectedBlockClientIds:t,hasMultiSelection:n,getSettings:o}=(0,m.useSelect)(Vn),{flashBlock:l,removeBlocks:i,replaceBlocks:s}=(0,m.useDispatch)(Vn),a=Ep();return(0,d.useRefEffect)((c=>{function u(u){const d=t();if(0===d.length)return;if(!n()){const{target:e}=u,{ownerDocument:t}=e;if("copy"===u.type||"cut"===u.type?(0,rr.documentHasUncollapsedSelection)(t):(0,rr.documentHasSelection)(t))return}if(!c.contains(u.target.ownerDocument.activeElement))return;const p=u.defaultPrevented;if(u.preventDefault(),"copy"===u.type||"cut"===u.type){1===d.length&&l(d[0]),a(u.type,d);const t=e(d),n=(0,r.serialize)(t);u.clipboardData.setData("text/plain",n),u.clipboardData.setData("text/html",n)}if("cut"===u.type)i(d);else if("paste"===u.type){if(p)return;const{__experimentalCanUserUseUnfilteredHTML:e}=o(),{plainText:t,html:n}=function(e){let{clipboardData:t}=e,n="",o="";try{n=t.getData("text/plain"),o=t.getData("text/html")}catch(e){try{o=t.getData("Text")}catch(e){return}}const r=(0,rr.getFilesFromDataTransfer)(t).filter((e=>{let{type:t}=e;return/^image\/(?:jpe?g|png|gif|webp)$/.test(t)}));return r.length&&!o&&(o=r.map((e=>`<img src="${(0,yp.createBlobURL)(e)}">`)).join(""),n=""),{html:o,plainText:n}}(u),l=(0,r.pasteHandler)({HTML:n,plainText:t,mode:"BLOCKS",canUserUseUnfilteredHTML:e});s(d,l,l.length-1,-1)}}return c.ownerDocument.addEventListener("copy",u),c.ownerDocument.addEventListener("cut",u),c.ownerDocument.addEventListener("paste",u),()=>{c.ownerDocument.removeEventListener("copy",u),c.ownerDocument.removeEventListener("cut",u),c.ownerDocument.removeEventListener("paste",u)}}),[])}var Sp=function(e){let{children:t}=e;return(0,s.createElement)("div",{ref:Cp()},t)};function wp(e){let{clientIds:t,children:n,__experimentalUpdateSelection:o}=e;const{canInsertBlockType:l,getBlockRootClientId:i,getBlocksByClientId:s,canMoveBlocks:a,canRemoveBlocks:c}=(0,m.useSelect)(Vn),{getDefaultBlockName:d,getGroupingBlockName:p}=(0,m.useSelect)(r.store),f=s(t),h=i(t[0]),g=(0,u.every)(f,(e=>!!e&&(0,r.hasBlockSupport)(e.name,"multiple",!0)&&l(e.name,h))),v=l(d(),h),b=a(t,h),k=c(t,h),{removeBlocks:_,replaceBlocks:y,duplicateBlocks:E,insertAfterBlock:C,insertBeforeBlock:S,flashBlock:w,setBlockMovingClientId:B,setNavigationMode:I,selectBlock:x}=(0,m.useDispatch)(Vn),T=Ep();return n({canDuplicate:g,canInsertDefaultBlock:v,canMove:b,canRemove:k,rootClientId:h,blocks:f,onDuplicate:()=>E(t,o),onRemove:()=>_(t,o),onInsertBefore(){S((0,u.first)((0,u.castArray)(t)))},onInsertAfter(){C((0,u.last)((0,u.castArray)(t)))},onMoveTo(){I(!0),x(t[0]),B(t[0])},onGroup(){if(!f.length)return;const e=p(),n=(0,r.switchToBlockType)(f,e);n&&y(t,n)},onUngroup(){if(!f.length)return;const e=f[0].innerBlocks;e.length&&y(t,e)},onCopy(){const e=f.map((e=>{let{clientId:t}=e;return t}));1===f.length&&w(e[0]),T("copy",e)}})}var Bp=(0,d.compose)([(0,m.withSelect)(((e,t)=>{let{clientId:n}=t;const{getBlock:o,getBlockMode:l,getSettings:i}=e(Vn),s=o(n),a=i().codeEditingEnabled;return{mode:l(n),blockType:s?(0,r.getBlockType)(s.name):null,isCodeEditingEnabled:a}})),(0,m.withDispatch)(((e,t)=>{let{onToggle:n=u.noop,clientId:o}=t;return{onToggleMode(){e(Vn).toggleBlockMode(o),n()}}}))])((function(e){let{blockType:t,mode:n,onToggleMode:o,small:l=!1,isCodeEditingEnabled:i=!0}=e;if(!(0,r.hasBlockSupport)(t,"html",!0)||!i)return null;const a="visual"===n?(0,h.__)("Edit as HTML"):(0,h.__)("Edit visually");return(0,s.createElement)(p.MenuItem,{onClick:o},!l&&a)})),Ip=(0,d.compose)((0,m.withSelect)(((e,t)=>{let{clientId:n}=t;const o=e(Vn).getBlock(n);return{block:o,shouldRender:o&&"core/html"===o.name}})),(0,m.withDispatch)(((e,t)=>{let{block:n}=t;return{onClick:()=>e(Vn).replaceBlocks(n.clientId,(0,r.rawHandler)({HTML:(0,r.getBlockContent)(n)}))}})))((function(e){let{shouldRender:t,onClick:n,small:o}=e;if(!t)return null;const r=(0,h.__)("Convert to Blocks");return(0,s.createElement)(p.MenuItem,{onClick:n},!o&&r)}));const{Fill:xp,Slot:Tp}=(0,p.createSlotFill)("__unstableBlockSettingsMenuFirstItem");xp.Slot=Tp;var Np=xp;function Pp(e){let{clientIds:t,isGroupable:n,isUngroupable:o,blocksSelection:l,groupingBlockName:i,onClose:a=(()=>{})}=e;const{replaceBlocks:c}=(0,m.useDispatch)(Vn);return n||o?(0,s.createElement)(s.Fragment,null,n&&(0,s.createElement)(p.MenuItem,{onClick:()=>{(()=>{const e=(0,r.switchToBlockType)(l,i);e&&c(t,e)})(),a()}},(0,h._x)("Group","verb")),o&&(0,s.createElement)(p.MenuItem,{onClick:()=>{(()=>{const e=l[0].innerBlocks;e.length&&c(t,e)})(),a()}},(0,h._x)("Ungroup","Ungrouping blocks from within a Group block back into individual blocks within the Editor "))):null}const{Fill:Mp,Slot:Rp}=(0,p.createSlotFill)("BlockSettingsMenuControls");function Lp(e){let{...t}=e;return(0,s.createElement)(p.__experimentalStyleProvider,{document:document},(0,s.createElement)(Mp,t))}Lp.Slot=e=>{let{fillProps:t,clientIds:n=null}=e;const{selectedBlocks:o,selectedClientIds:l}=(0,m.useSelect)((e=>{const{getBlocksByClientId:t,getSelectedBlockClientIds:o}=e(Vn),r=null!==n?n:o();return{selectedBlocks:(0,u.map)((0,u.compact)(t(r)),(e=>e.name)),selectedClientIds:r}}),[n]),a=function(){const{clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:o,groupingBlockName:l}=(0,m.useSelect)((e=>{var t;const{getBlockRootClientId:n,getBlocksByClientId:o,canInsertBlockType:l,getSelectedBlockClientIds:i}=e(Vn),{getGroupingBlockName:s}=e(r.store),a=i(),c=s(),u=l(c,null!=a&&a.length?n(a[0]):void 0),d=o(a),p=1===d.length&&(null===(t=d[0])||void 0===t?void 0:t.name)===c;return{clientIds:a,isGroupable:u&&d.length&&!p,isUngroupable:p&&!!d[0].innerBlocks.length,blocksSelection:d,groupingBlockName:c}}),[]);return{clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:o,groupingBlockName:l}}(),{isGroupable:c,isUngroupable:d}=a,f=c||d;return(0,s.createElement)(Rp,{fillProps:{...t,selectedBlocks:o,selectedClientIds:l}},(e=>{if((null==e?void 0:e.length)>0||f)return(0,s.createElement)(p.MenuGroup,null,e,(0,s.createElement)(Pp,i({},a,{onClose:null==t?void 0:t.onClose})))}))};var Ap=Lp;const Dp={className:"block-editor-block-settings-menu__popover",position:"bottom right",isAlternate:!0};function Op(e){let{blocks:t,onCopy:n}=e;const o=(0,d.useCopyToClipboard)((()=>(0,r.serialize)(t)),n);return(0,s.createElement)(p.MenuItem,{ref:o},(0,h.__)("Copy"))}var Fp=function(e){let{clientIds:t,__experimentalSelectBlock:n,children:o,...l}=e;const a=(0,u.castArray)(t),c=a.length,d=a[0],{onlyBlock:f,title:g}=(0,m.useSelect)((e=>{var t;const{getBlockCount:n,getBlockName:o}=e(Vn),{getBlockType:l}=e(r.store);return{onlyBlock:1===n(),title:null===(t=l(o(d)))||void 0===t?void 0:t.title}}),[d]),v=(0,m.useSelect)((e=>{const{getShortcutRepresentation:t}=e(tc.store);return{duplicate:t("core/block-editor/duplicate"),remove:t("core/block-editor/remove"),insertAfter:t("core/block-editor/insert-after"),insertBefore:t("core/block-editor/insert-before")}}),[]),b=(0,s.useCallback)(n?async e=>{const t=await e;t&&t[0]&&n(t[0])}:u.noop,[n]),k=(0,h.sprintf)(
56
  /* translators: %s: block name */
57
  (0,h.__)("Remove %s"),g),_=1===c?k:(0,h.__)("Remove blocks");return(0,s.createElement)(wp,{clientIds:t,__experimentalUpdateSelection:!n},(e=>{let{canDuplicate:n,canInsertDefaultBlock:r,canMove:a,canRemove:m,onDuplicate:g,onInsertAfter:k,onInsertBefore:y,onRemove:E,onCopy:C,onMoveTo:S,blocks:w}=e;return(0,s.createElement)(p.DropdownMenu,i({icon:_p,label:(0,h.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:Dp,noIcons:!0},l),(e=>{let{onClose:l}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.MenuGroup,null,(0,s.createElement)(Np.Slot,{fillProps:{onClose:l}}),1===c&&(0,s.createElement)(Ip,{clientId:d}),(0,s.createElement)(Op,{blocks:w,onCopy:C}),n&&(0,s.createElement)(p.MenuItem,{onClick:(0,u.flow)(l,g,b),shortcut:v.duplicate},(0,h.__)("Duplicate")),r&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.MenuItem,{onClick:(0,u.flow)(l,y),shortcut:v.insertBefore},(0,h.__)("Insert before")),(0,s.createElement)(p.MenuItem,{onClick:(0,u.flow)(l,k),shortcut:v.insertAfter},(0,h.__)("Insert after"))),a&&!f&&(0,s.createElement)(p.MenuItem,{onClick:(0,u.flow)(l,S)},(0,h.__)("Move to")),1===c&&(0,s.createElement)(Bp,{clientId:d,onToggle:l})),(0,s.createElement)(Ap.Slot,{fillProps:{onClose:l},clientIds:t}),"function"==typeof o?o({onClose:l}):s.Children.map((e=>(0,s.cloneElement)(e,{onClose:l}))),m&&(0,s.createElement)(p.MenuGroup,null,(0,s.createElement)(p.MenuItem,{onClick:(0,u.flow)(l,E,b),shortcut:v.remove},_)))}))}))},zp=function(e){let{clientIds:t,...n}=e;return(0,s.createElement)(p.ToolbarGroup,null,(0,s.createElement)(p.ToolbarItem,null,(e=>(0,s.createElement)(Fp,i({clientIds:t,toggleProps:e},n)))))};function Vp(e){let{hideDragHandle:t}=e;const{blockClientIds:n,blockClientId:o,blockType:l,hasFixedToolbar:a,hasReducedUI:u,isValid:f,isVisual:h}=(0,m.useSelect)((e=>{const{getBlockName:t,getBlockMode:n,getSelectedBlockClientIds:o,isBlockValid:l,getBlockRootClientId:i,getSettings:s}=e(Vn),a=o(),c=a[0],u=i(c),d=s();return{blockClientIds:a,blockClientId:c,blockType:c&&(0,r.getBlockType)(t(c)),hasFixedToolbar:d.hasFixedToolbar,hasReducedUI:d.hasReducedUI,rootClientId:u,isValid:a.every((e=>l(e))),isVisual:a.every((e=>"visual"===n(e)))}}),[]),{toggleBlockHighlight:g}=(0,m.useDispatch)(Vn),v=(0,s.useRef)(),{showMovers:b,gestures:k}=Jd({ref:v,onChange(e){e&&u||g(o,e)}}),_=(0,d.useViewportMatch)("medium","<")||a;if(l&&!(0,r.hasBlockSupport)(l,"__experimentalToolbar",!0))return null;const y=_||b;if(0===n.length)return null;const E=f&&h,C=n.length>1,S=c()("block-editor-block-toolbar",y&&"is-showing-movers");return(0,s.createElement)("div",{className:S},!C&&!_&&(0,s.createElement)(ep,{clientIds:n}),(0,s.createElement)("div",i({ref:v},k),(E||C)&&(0,s.createElement)(p.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls"},(0,s.createElement)(kp,{clientIds:n}),(0,s.createElement)(qd,{clientIds:n,hideDragHandle:t||u}))),E&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Zn.Slot,{group:"parent",className:"block-editor-block-toolbar__slot"}),(0,s.createElement)(Zn.Slot,{group:"block",className:"block-editor-block-toolbar__slot"}),(0,s.createElement)(Zn.Slot,{className:"block-editor-block-toolbar__slot"}),(0,s.createElement)(Zn.Slot,{group:"inline",className:"block-editor-block-toolbar__slot"}),(0,s.createElement)(Zn.Slot,{group:"other",className:"block-editor-block-toolbar__slot"})),(0,s.createElement)(zp,{clientIds:n}))}var Hp=function(e){let{focusOnMount:t,isFixed:n,...o}=e;const{blockType:l,hasParents:a,showParentSelector:u}=(0,m.useSelect)((e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientIds:o}=e(Vn),{getBlockType:l}=e(r.store),i=o(),s=i[0],a=n(s),c=l(t(a[a.length-1]));return{blockType:s&&l(t(s)),hasParents:a.length,showParentSelector:(0,r.hasBlockSupport)(c,"__experimentalParentSelector",!0)&&i.length<=1}}),[]);if(l&&!(0,r.hasBlockSupport)(l,"__experimentalToolbar",!0))return null;const d=c()("block-editor-block-contextual-toolbar",{"has-parent":a&&u,"is-fixed":n});return(0,s.createElement)(Fd,i({focusOnMount:t,className:d
58
- /* translators: accessibility text for the block toolbar */,"aria-label":(0,h.__)("Block tools")},o),(0,s.createElement)(Vp,{hideDragHandle:n}))};function Up(e){const{isNavigationMode:t,isMultiSelecting:n,hasMultiSelection:o,isTyping:r,isCaretWithinFormattedText:l,getSettings:i,getLastMultiSelectedBlockClientId:s}=e(Vn);return{isNavigationMode:t(),isMultiSelecting:n(),isTyping:r(),isCaretWithinFormattedText:l(),hasMultiSelection:o(),hasFixedToolbar:i().hasFixedToolbar,lastClientId:s()}}function Gp(e){let{clientId:t,rootClientId:n,isValid:o,isEmptyDefaultBlock:r,capturingClientId:l,__unstablePopoverSlot:i,__unstableContentRef:a}=e;const{isNavigationMode:u,isMultiSelecting:f,isTyping:h,isCaretWithinFormattedText:g,hasMultiSelection:v,hasFixedToolbar:b,lastClientId:k}=(0,m.useSelect)(Up,[]),_=(0,m.useSelect)((e=>{const{isBlockInsertionPointVisible:n,getBlockInsertionPoint:o,getBlockOrder:r}=e(Vn);if(!n())return!1;const l=o();return r(l.rootClientId)[l.index]===t}),[t]),y=(0,d.useViewportMatch)("medium"),[E,C]=(0,s.useState)(!1),[S,w]=(0,s.useState)(!1),{stopTyping:B}=(0,m.useDispatch)(Vn),I=!h&&!u&&r&&o,x=u,T=!u&&!b&&y&&!I&&!f&&(!h||g),N=!(u||T||b||r);(0,tc.useShortcut)("core/block-editor/focus-toolbar",(()=>{C(!0),B(!0)}),{isDisabled:!N}),(0,s.useEffect)((()=>{T||C(!1)}),[T]);const P=(0,s.useRef)(),M=Ia(t),R=Ia(k),L=Ia(l),A=Bd(a);if(!(x||T||E||I))return null;let D=M;if(!D)return null;l&&(D=L);let O=D;if(v){if(!R)return null;O={top:D,bottom:R}}const F=I?"top left right":"top right left",{ownerDocument:z}=D,V=I?void 0:z.defaultView.frameElement||(0,rr.getScrollContainer)(D)||z.body;return(0,s.createElement)(p.Popover,{ref:A,noArrow:!0,animate:!1,position:F,focusOnMount:!1,anchorRef:O,className:c()("block-editor-block-list__block-popover",{"is-insertion-point-visible":_}),__unstableStickyBoundaryElement:V,__unstableSlotName:i||null,__unstableBoundaryParent:!0,__unstableObserveElement:D,shouldAnchorIncludePadding:!0,__unstableEditorCanvasWrapper:null==a?void 0:a.current},(T||E)&&(0,s.createElement)("div",{onFocus:function(){w(!0)},onBlur:function(){w(!1)},tabIndex:-1,className:c()("block-editor-block-list__block-popover-inserter",{"is-visible":S})},(0,s.createElement)(_d,{clientId:t,rootClientId:n,__experimentalIsQuick:!0})),(T||E)&&(0,s.createElement)(Hp,{focusOnMount:E,__experimentalInitialIndex:P.current,__experimentalOnIndexChange:e=>{P.current=e},key:t}),x&&(0,s.createElement)(Dd,{clientId:t,rootClientId:n,blockElement:D}),I&&(0,s.createElement)("div",{className:"block-editor-block-list__empty-block-inserter"},(0,s.createElement)(_d,{position:"bottom right",rootClientId:n,clientId:t,__experimentalIsQuick:!0})))}function Wp(e){const{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:n,getBlockRootClientId:o,getBlock:l,getBlockParents:i,__experimentalGetBlockListSettingsForBlocks:s}=e(Vn),a=t()||n();if(!a)return;const{name:c,attributes:d={},isValid:p}=l(a)||{},m=i(a),f=s(m),h=(0,u.find)(m,(e=>{var t;return null===(t=f[e])||void 0===t?void 0:t.__experimentalCaptureToolbars}));return{clientId:a,rootClientId:o(a),name:c,isValid:p,isEmptyDefaultBlock:c&&(0,r.isUnmodifiedDefaultBlock)({name:c,attributes:d}),capturingClientId:h}}function $p(e){let{__unstablePopoverSlot:t,__unstableContentRef:n}=e;const o=(0,m.useSelect)(Wp,[]);if(!o)return null;const{clientId:r,rootClientId:l,name:i,isValid:a,isEmptyDefaultBlock:c,capturingClientId:u}=o;return i?(0,s.createElement)(Gp,{clientId:r,rootClientId:l,isValid:a,isEmptyDefaultBlock:c,capturingClientId:u,__unstablePopoverSlot:t,__unstableContentRef:n}):null}function jp(e){let{children:t}=e;const n=(0,s.useContext)(Id),o=(0,s.useContext)(p.Disabled.Context);return n||o?t:(Lt()('wp.components.Popover.Slot name="block-toolbar"',{alternative:"wp.blockEditor.BlockTools"}),(0,s.createElement)(Td,{__unstablePopoverSlot:"block-toolbar"},(0,s.createElement)($p,{__unstablePopoverSlot:"block-toolbar"}),t))}var Kp=(0,d.createHigherOrderComponent)((e=>t=>{const{clientId:n}=Wn();return(0,s.createElement)(e,i({},t,{clientId:n}))}),"withClientId"),qp=Kp((e=>{let{clientId:t,showSeparator:n,isFloating:o,onAddBlock:r,isToggle:l}=e;return(0,s.createElement)(Sd,{className:c()({"block-list-appender__toggle":l}),rootClientId:t,showSeparator:n,isFloating:o,onAddBlock:r})})),Yp=(0,d.compose)([Kp,(0,m.withSelect)(((e,t)=>{let{clientId:n}=t;const{getBlockOrder:o}=e(Vn),r=o(n);return{lastBlockClientId:(0,u.last)(r)}}))])((e=>{let{clientId:t,lastBlockClientId:n}=e;return(0,s.createElement)(yd,{rootClientId:t,lastBlockClientId:n})})),Zp=window.wp.isShallowEqual,Xp=n.n(Zp);const Qp=new WeakMap;function Jp(e,t){const n=(0,m.useSelect)((e=>e(Vn).getSettings().mediaUpload),[]),{canInsertBlockType:o,getBlockIndex:l,getClientIdsOfDescendants:i}=(0,m.useSelect)(Vn),{insertBlocks:s,moveBlocksToPosition:a,updateBlockAttributes:c,clearSelectedBlock:u}=(0,m.useDispatch)(Vn),d=function(e,t,n,o,l,i,s){return a=>{const{srcRootClientId:c,srcClientIds:u,type:d,blocks:p}=function(e){let t={srcRootClientId:null,srcClientIds:null,srcIndex:null,type:null,blocks:null};if(!e.dataTransfer)return t;try{t=Object.assign(t,JSON.parse(e.dataTransfer.getData("wp-blocks")))}catch(e){return t}return t}(a);if("inserter"===d){s();const n=p.map((e=>(0,r.cloneBlock)(e)));i(n,t,e,!0,null)}if("block"===d){const r=n(u[0],c);if(c===e&&r===t)return;if(u.includes(e)||o(u).some((t=>t===e)))return;const i=c===e,s=u.length;l(u,c,e,i&&r<t?t-s:t)}}}(e,t,l,i,a,s,u),p=function(e,t,n,o,l,i){return s=>{if(!n)return;const a=(0,r.findTransform)((0,r.getBlockTransforms)("from"),(t=>"files"===t.type&&l(t.blockName,e)&&t.isMatch(s)));if(a){const n=a.transform(s,o);i(n,t,e)}}}(e,t,n,c,o,s),f=function(e,t,n){return o=>{const l=(0,r.pasteHandler)({HTML:o,mode:"BLOCKS"});l.length&&n(l,t,e)}}(e,t,s);return e=>{const t=(0,rr.getFilesFromDataTransfer)(e.dataTransfer),n=e.dataTransfer.getData("text/html");t.length?p(t):n?f(n):d(e)}}function em(e,t,n){const o="top"===n||"bottom"===n,{x:r,y:l}=e,i=o?r:l,s=o?l:r,a=o?t.left:t.top,c=o?t.right:t.bottom,u=t[n];let d;return d=i>=a&&i<=c?i:i<c?a:c,Math.sqrt((i-d)**2+(s-u)**2)}function tm(e,t){let n,o,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["top","bottom","left","right"];return r.forEach((r=>{const l=em(e,t,r);(void 0===n||l<n)&&(n=l,o=r)})),[n,o]}function nm(e,t,n){const o="horizontal"===n?["left","right"]:["top","bottom"],r=(0,h.isRTL)();let l,i;return e.forEach(((e,n)=>{const s=e.getBoundingClientRect(),[a,c]=tm(t,s,o);(void 0===i||a<i)&&(i=a,l=n+("bottom"===c||!r&&"right"===c||r&&"left"===c?1:0))})),l}function om(){let{rootClientId:e=""}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[t,n]=(0,s.useState)(null),o=(0,m.useSelect)((t=>{const{getTemplateLock:n}=t(Vn);return"all"===n(e)}),[e]),{getBlockListSettings:r}=(0,m.useSelect)(Vn),{showInsertionPoint:l,hideInsertionPoint:i}=(0,m.useDispatch)(Vn),a=Jp(e,t),c=(0,d.useThrottle)((0,s.useCallback)(((t,o)=>{var i;const s=nm(Array.from(o.children).filter((e=>e.classList.contains("wp-block"))),{x:t.clientX,y:t.clientY},null===(i=r(e))||void 0===i?void 0:i.orientation);n(void 0===s?0:s),null!==s&&l(e,s)}),[]),200);return(0,d.__experimentalUseDropZone)({isDisabled:o,onDrop:a,onDragOver(e){c(e,e.currentTarget)},onDragLeave(){c.cancel(),i(),n(null)},onDragEnd(){c.cancel(),i(),n(null)}})}function rm(e){const{clientId:t,allowedBlocks:n,__experimentalDefaultBlock:o,__experimentalDirectInsert:l,template:i,templateLock:a,wrapperRef:c,templateInsertUpdatesSelection:d,__experimentalCaptureToolbars:p,__experimentalAppenderTagName:f,renderAppender:h,orientation:g,placeholder:v,__experimentalLayout:b}=e;!function(e,t,n,o,r,l,i,a){const{updateBlockListSettings:c}=(0,m.useDispatch)(Vn),{blockListSettings:u,parentLock:d}=(0,m.useSelect)((t=>{const n=t(Vn).getBlockRootClientId(e);return{blockListSettings:t(Vn).getBlockListSettings(e),parentLock:t(Vn).getTemplateLock(n)}}),[e]),p=(0,s.useMemo)((()=>t),t);(0,s.useLayoutEffect)((()=>{const t={allowedBlocks:p,templateLock:void 0===r?d:r};if(void 0!==l&&(t.__experimentalCaptureToolbars=l),void 0!==i)t.orientation=i;else{const e=Io(null==a?void 0:a.type);t.orientation=e.getOrientation(a)}void 0!==n&&(t.__experimentalDefaultBlock=n),void 0!==o&&(t.__experimentalDirectInsert=o),Xp()(u,t)||c(e,t)}),[e,u,p,n,o,r,d,l,i,c,a])}(t,n,o,l,a,p,g,b),function(e,t,n,o){const{getSelectedBlocksInitialCaretPosition:l}=(0,m.useSelect)(Vn),{replaceInnerBlocks:i}=(0,m.useDispatch)(Vn),a=(0,m.useSelect)((t=>t(Vn).getBlocks(e)),[e]),c=(0,s.useRef)(null);(0,s.useLayoutEffect)((()=>{if((0===a.length||"all"===n)&&!(0,u.isEqual)(t,c.current)){c.current=t;const n=(0,r.synchronizeBlocksWithTemplate)(a,t);(0,u.isEqual)(n,a)||i(e,n,0===a.length&&o&&0!==n.length,l())}}),[a,t,n,e])}(t,i,a,d);const k=(0,m.useSelect)((e=>{const n=e(Vn).getBlock(t),o=(0,r.getBlockType)(n.name);if(o&&o.providesContext)return function(e,t){Qp.has(t)||Qp.set(t,new WeakMap);const n=Qp.get(t);if(!n.has(e)){const o=(0,u.mapValues)(t.providesContext,(t=>e[t]));n.set(e,o)}return n.get(e)}(n.attributes,o)}),[t]);return(0,s.createElement)(ir,{value:k},(0,s.createElement)(fm,{rootClientId:t,renderAppender:h,__experimentalAppenderTagName:f,__experimentalLayout:b,wrapperRef:c,placeholder:v}))}function lm(e){return Wa(e),(0,s.createElement)(rm,e)}const im=(0,s.forwardRef)(((e,t)=>{const n=sm({ref:t},e);return(0,s.createElement)("div",{className:"block-editor-inner-blocks"},(0,s.createElement)("div",n))}));function sm(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{clientId:n}=Wn(),o=(0,d.useViewportMatch)("medium","<"),{__experimentalCaptureToolbars:l,hasOverlay:a}=(0,m.useSelect)((e=>{if(!n)return{};const{getBlockName:t,isBlockSelected:l,hasSelectedInnerBlock:i,isNavigationMode:s}=e(Vn),a=t(n),c=s()||o;return{__experimentalCaptureToolbars:e(r.store).hasBlockSupport(a,"__experimentalExposeControlsToChildren",!1),hasOverlay:"core/template"!==a&&!l(n)&&!i(n,!0)&&c}}),[n,o]),u=(0,d.useMergeRefs)([e.ref,om({rootClientId:n})]),p={__experimentalCaptureToolbars:l,...t},f=p.value&&p.onChange?lm:rm;return{...e,ref:u,className:c()(e.className,"block-editor-block-list__layout",{"has-overlay":a}),children:n?(0,s.createElement)(f,i({},p,{clientId:n})):(0,s.createElement)(fm,t)}}sm.save=r.__unstableGetInnerBlocksProps,im.DefaultBlockAppender=Yp,im.ButtonBlockAppender=qp,im.Content=()=>sm.save().children;var am=im;const cm=(0,s.createContext)(),um=(0,s.createContext)();function dm(e){let{className:t,...n}=e;const[o,r]=(0,s.useState)(),l=(0,d.useViewportMatch)("medium"),{isOutlineMode:i,isFocusMode:a,isNavigationMode:u}=(0,m.useSelect)((e=>{const{getSettings:t,isNavigationMode:n}=e(Vn),{outlineMode:o,focusMode:r}=t();return{isOutlineMode:o,isFocusMode:r,isNavigationMode:n()}}),[]),p=sm({ref:(0,d.useMergeRefs)([Ka(),Nd(),r]),className:c()("is-root-container",t,{"is-outline-mode":i,"is-focus-mode":a&&l,"is-navigate-mode":u})},n);return(0,s.createElement)(cm.Provider,{value:o},(0,s.createElement)("div",p))}function pm(e){return function(){const e=(0,m.useSelect)((e=>e(Vn).getSettings().__experimentalBlockPatterns),[]);(0,s.useEffect)((()=>{if(null==e||!e.length)return;let t,n=-1;const o=()=>{n++,n>=e.length||((0,m.select)(Vn).__experimentalGetParsedPattern(e[n].name),t=Pd(o))};return t=Pd(o),()=>Md(t)}),[e])}(),(0,s.createElement)(jp,null,(0,s.createElement)(Gn,{value:Hn},(0,s.createElement)(dm,e)))}function mm(e){let{placeholder:t,rootClientId:n,renderAppender:o,__experimentalAppenderTagName:r,__experimentalLayout:l=xo}=e;const[i,a]=(0,s.useState)(new Set),c=(0,s.useMemo)((()=>{const{IntersectionObserver:e}=window;if(e)return new e((e=>{a((t=>{const n=new Set(t);for(const t of e){const e=t.target.getAttribute("data-block");n[t.isIntersecting?"add":"delete"](e)}return n}))}))}),[a]),{order:u,selectedBlocks:d}=(0,m.useSelect)((e=>{const{getBlockOrder:t,getSelectedBlockClientIds:o}=e(Vn);return{order:t(n),selectedBlocks:o()}}),[n]);return(0,s.createElement)(No,{value:l},(0,s.createElement)(um.Provider,{value:c},u.map((e=>(0,s.createElement)(m.AsyncModeProvider,{key:e,value:!i.has(e)&&!d.includes(e)},(0,s.createElement)(Da,{rootClientId:n,clientId:e}))))),u.length<1&&t,(0,s.createElement)(wd,{tagName:r,rootClientId:n,renderAppender:o}))}function fm(e){return(0,s.createElement)(m.AsyncModeProvider,{value:!1},(0,s.createElement)(mm,e))}pm.__unstableElementContext=cm;const hm=["colors","disableCustomColors","gradients","disableCustomGradients"];function gm(e){let{colors:t,gradients:n,disableCustomColors:o,disableCustomGradients:r,__experimentalHasMultipleOrigins:l,className:i,label:a,onColorChange:d,onGradientChange:m,colorValue:f,gradientValue:g,clearable:v,showTitle:b=!0}=e;const k=d&&(!(0,u.isEmpty)(t)||!o),_=m&&(!(0,u.isEmpty)(n)||!r),[y,E]=(0,s.useState)(g?"gradient":!!k&&"color");return k||_?(0,s.createElement)(p.BaseControl,{className:c()("block-editor-color-gradient-control",i)},(0,s.createElement)("fieldset",null,(0,s.createElement)(p.__experimentalVStack,{spacing:1},b&&(0,s.createElement)("legend",null,(0,s.createElement)("div",{className:"block-editor-color-gradient-control__color-indicator"},(0,s.createElement)(p.BaseControl.VisualLabel,null,a))),k&&_&&(0,s.createElement)(p.__experimentalToggleGroupControl,{value:y,onChange:E,label:(0,h.__)("Select color type"),hideLabelFromVision:!0,isBlock:!0},(0,s.createElement)(p.__experimentalToggleGroupControlOption,{value:"color",label:(0,h.__)("Solid")}),(0,s.createElement)(p.__experimentalToggleGroupControlOption,{value:"gradient",label:(0,h.__)("Gradient")})),("color"===y||!_)&&(0,s.createElement)(p.ColorPalette,{value:f,onChange:_?e=>{d(e),m()}:d,colors:t,disableCustomColors:o,__experimentalHasMultipleOrigins:l,clearable:v}),("gradient"===y||!k)&&(0,s.createElement)(p.GradientPicker,{value:g,onChange:k?e=>{m(e),d()}:m,gradients:n,disableCustomGradients:r,__experimentalHasMultipleOrigins:l,clearable:v})))):null}function vm(e){const t={};return t.colors=mo("color.palette"),t.gradients=mo("color.gradients"),t.disableCustomColors=!mo("color.custom"),t.disableCustomGradients=!mo("color.customGradient"),(0,s.createElement)(gm,i({},t,e))}var bm=function(e){return(0,u.every)(hm,(t=>e.hasOwnProperty(t)))?(0,s.createElement)(gm,e):(0,s.createElement)(vm,e)};Ac([Dc,zc]);const km=(e,t,n)=>{if(t){const n=(0,u.find)(e,{slug:t});if(n)return n}return{color:n}},_m=(e,t)=>(0,u.find)(e,{color:t});function ym(e,t){if(e&&t)return`has-${(0,u.kebabCase)(t)}-${e}`}const Em=[];function Cm(e){const{attributes:{borderColor:t,style:n},setAttributes:o}=e,r=mo("color.palette")||Em,l=!mo("color.custom"),i=!mo("color.customGradient"),[a,c]=(0,s.useState)((()=>{var e,o;return null===(e=km(r,t,null==n||null===(o=n.border)||void 0===o?void 0:o.color))||void 0===e?void 0:e.color}));return(0,s.createElement)(bm,{label:(0,h.__)("Color"),colorValue:a,colors:r,gradients:void 0,disableCustomColors:l,disableCustomGradients:i,onColorChange:e=>{c(e);const t=_m(r,e),l={...n,border:{...null==n?void 0:n.border,color:null!=t&&t.slug?void 0:e}},i=null!=t&&t.slug?t.slug:void 0;o({style:qo(l),borderColor:i})}})}function Sm(e,t,n){var o;if(!Ym(t,"color")||Zm(t))return e;const{borderColor:r,style:l}=n,i=ym("border-color",r),s=c()(e.className,{"has-border-color":r||(null==l||null===(o=l.border)||void 0===o?void 0:o.color),[i]:!!i});return e.className=s||void 0,e}const wm=(0,d.createHigherOrderComponent)((e=>t=>{var n,o;const{name:r,attributes:l}=t,{borderColor:a}=l,c=mo("color.palette")||Em;if(!Ym(r,"color")||Zm(r))return(0,s.createElement)(e,t);const u={borderColor:a?null===(n=km(c,a))||void 0===n?void 0:n.color:void 0};let d=t.wrapperProps;return d={...t.wrapperProps,style:{...u,...null===(o=t.wrapperProps)||void 0===o?void 0:o.style}},(0,s.createElement)(e,i({},t,{wrapperProps:d}))}));function Bm(e){return[...e].sort(((t,n)=>e.filter((e=>e===n)).length-e.filter((e=>e===t)).length)).shift()}function Im(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("string"==typeof e)return e;const t=Object.values(e).map((e=>(0,p.__experimentalParseUnit)(e))),n=t.map((e=>e[0])),o=t.map((e=>e[1])),r=n.every((e=>e===n[0]))?n[0]:"",l=Bm(o),i=0===r||r?`${r}${l}`:null;return i}function xm(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Im(e),n=isNaN(parseFloat(t));return n}function Tm(e){return!!e&&("string"==typeof e||!!Object.values(e).filter((e=>!!e||0===e)).length)}function Nm(e){let{onChange:t,values:n,...o}=e;const r=Im(n),l=Tm(n)&&xm(n),a=l?(0,h.__)("Mixed"):null;return(0,s.createElement)(p.__experimentalUnitControl,i({},o,{"aria-label":(0,h.__)("Border radius"),disableUnits:l,isOnly:!0,value:r,onChange:t,placeholder:a}))}(0,l.addFilter)("blocks.registerBlockType","core/border/addAttributes",(function(e){return Ym(e,"color")?e.attributes.borderColor?e:{...e,attributes:{...e.attributes,borderColor:{type:"string"}}}:e})),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/border/addSaveProps",Sm),(0,l.addFilter)("blocks.registerBlockType","core/border/addEditProps",(function(e){if(!Ym(e,"color")||Zm(e))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),Sm(o,e,n)},e})),(0,l.addFilter)("editor.BlockListBlock","core/border/with-border-color-palette-styles",wm);const Pm={topLeft:(0,h.__)("Top left"),topRight:(0,h.__)("Top right"),bottomLeft:(0,h.__)("Bottom left"),bottomRight:(0,h.__)("Bottom right")};function Mm(e){let{onChange:t,values:n,...o}=e;const r="string"!=typeof n?n:{topLeft:n,topRight:n,bottomLeft:n,bottomRight:n};return(0,s.createElement)("div",{className:"components-border-radius-control__input-controls-wrapper"},Object.entries(Pm).map((e=>{let[n,l]=e;return(0,s.createElement)(p.__experimentalUnitControl,i({},o,{key:n,"aria-label":l,value:r[n],onChange:(a=n,e=>{t&&t({...r,[a]:e||void 0})})}));var a})))}var Rm=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"})),Lm=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M15.6 7.3h-.7l1.6-3.5-.9-.4-3.9 8.5H9v1.5h2l-1.3 2.8H8.4c-2 0-3.7-1.7-3.7-3.7s1.7-3.7 3.7-3.7H10V7.3H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H9l-1.4 3.2.9.4 5.7-12.5h1.4c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.9 0 5.2-2.3 5.2-5.2 0-2.9-2.4-5.2-5.2-5.2z"}));function Am(e){let{isLinked:t,...n}=e;const o=t?(0,h.__)("Unlink Radii"):(0,h.__)("Link Radii");return(0,s.createElement)(p.Tooltip,{text:o},(0,s.createElement)(p.Button,i({},n,{className:"component-border-radius-control__linked-button",isPrimary:t,isSecondary:!t,isSmall:!0,icon:t?Rm:Lm,iconSize:16,"aria-label":o})))}const Dm={topLeft:null,topRight:null,bottomLeft:null,bottomRight:null},Om={px:100,em:20,rem:20};function Fm(e){let{onChange:t,values:n}=e;const[o,r]=(0,s.useState)(!Tm(n)||!xm(n)),l=(0,p.__experimentalUseCustomUnits)({availableUnits:mo("spacing.units")||["px","em","rem"]}),i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("string"==typeof e){const[,t]=(0,p.__experimentalParseUnit)(e);return t||"px"}return Bm(Object.values(e).map((e=>{const[,t]=(0,p.__experimentalParseUnit)(e);return t})))||"px"}(n),a=l&&l.find((e=>e.value===i)),c=(null==a?void 0:a.step)||1,[u]=(0,p.__experimentalParseUnit)(Im(n));return(0,s.createElement)("fieldset",{className:"components-border-radius-control"},(0,s.createElement)("legend",null,(0,h.__)("Radius")),(0,s.createElement)("div",{className:"components-border-radius-control__wrapper"},o?(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Nm,{className:"components-border-radius-control__unit-control",values:n,min:0,onChange:t,unit:i,units:l}),(0,s.createElement)(p.RangeControl,{className:"components-border-radius-control__range-control",value:u,min:0,max:Om[i],initialPosition:0,withInputField:!1,onChange:e=>{t(void 0!==e?`${e}${i}`:void 0)},step:c})):(0,s.createElement)(Mm,{min:0,onChange:t,values:n||Dm,units:l}),(0,s.createElement)(Am,{onClick:()=>r(!o),isLinked:o})))}function zm(e){var t;const{attributes:{style:n},setAttributes:o}=e;return(0,s.createElement)(Fm,{values:null==n||null===(t=n.border)||void 0===t?void 0:t.radius,onChange:e=>{let t={...n,border:{...null==n?void 0:n.border,radius:e}};void 0!==e&&""!==e||(t=qo(t)),o({style:t})}})}var Vm=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none"},(0,s.createElement)(F.Path,{d:"M5 11.25h14v1.5H5z"})),Hm=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none"},(0,s.createElement)(F.Path,{fillRule:"evenodd",d:"M5 11.25h3v1.5H5v-1.5zm5.5 0h3v1.5h-3v-1.5zm8.5 0h-3v1.5h3v-1.5z",clipRule:"evenodd"})),Um=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none"},(0,s.createElement)(F.Path,{fillRule:"evenodd",d:"M5.25 11.25h1.5v1.5h-1.5v-1.5zm3 0h1.5v1.5h-1.5v-1.5zm4.5 0h-1.5v1.5h1.5v-1.5zm1.5 0h1.5v1.5h-1.5v-1.5zm4.5 0h-1.5v1.5h1.5v-1.5z",clipRule:"evenodd"}));const Gm=[{label:(0,h.__)("Solid"),icon:Vm,value:"solid"},{label:(0,h.__)("Dashed"),icon:Hm,value:"dashed"},{label:(0,h.__)("Dotted"),icon:Um,value:"dotted"}];function Wm(e){let{onChange:t,value:n}=e;return(0,s.createElement)("fieldset",{className:"components-border-style-control"},(0,s.createElement)("legend",null,(0,h.__)("Style")),(0,s.createElement)("div",{className:"components-border-style-control__buttons"},Gm.map((e=>(0,s.createElement)(p.Button,{key:e.value,icon:e.icon,isSmall:!0,isPressed:e.value===n,onClick:()=>t(e.value===n?void 0:e.value),"aria-label":e.label})))))}const $m=e=>{var t;const{attributes:{style:n},setAttributes:o}=e;return(0,s.createElement)(Wm,{value:null==n||null===(t=n.border)||void 0===t?void 0:t.style,onChange:e=>{const t={...n,border:{...null==n?void 0:n.border,style:e}};o({style:qo(t)})}})},jm=e=>{const{attributes:{borderColor:t,style:n},setAttributes:o}=e,{width:r,color:l,style:i}=(null==n?void 0:n.border)||{},[a,c]=(0,s.useState)(),[u,d]=(0,s.useState)();(0,s.useEffect)((()=>{"none"!==i&&c(i)}),[i]),(0,s.useEffect)((()=>{(t||l)&&d({name:t||void 0,color:l||void 0})}),[t,l]);const m=(0,p.__experimentalUseCustomUnits)({availableUnits:mo("spacing.units")||["px","em","rem"]});return(0,s.createElement)(p.__experimentalUnitControl,{value:r,label:(0,h.__)("Width"),min:0,onChange:e=>{let r={...n,border:{...null==n?void 0:n.border,width:e}},l=t;const s=0===parseFloat(e);s&&(l=void 0,r.border.color=void 0,r.border.style="none"),s||"none"!==i||(r.border.style=a),s||void 0!==t||(l=null==u?void 0:u.name,r.border.color=null==u?void 0:u.color),void 0!==e&&""!==e||(r=qo(r)),o({borderColor:l,style:r})},units:m})},Km="__experimentalBorder";function qm(e){const t=Xm(e),n=Ym(e.name),o=mo("border.color")&&Ym(e.name,"color"),r=mo("border.radius")&&Ym(e.name,"radius"),l=mo("border.style")&&Ym(e.name,"style"),i=mo("border.width")&&Ym(e.name,"width");return t||!n?null:(0,s.createElement)(er,null,(0,s.createElement)(p.PanelBody,{className:"block-editor-hooks__border-controls",title:(0,h.__)("Border"),initialOpen:!1},(i||l)&&(0,s.createElement)("div",{className:"block-editor-hooks__border-controls-row"},i&&(0,s.createElement)(jm,e),l&&(0,s.createElement)($m,e)),o&&(0,s.createElement)(Cm,e),r&&(0,s.createElement)(zm,e)))}function Ym(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"any";if("web"!==s.Platform.OS)return!1;const n=(0,r.getBlockSupport)(e,Km);return!!(!0===n||("any"===t?null!=n&&n.color||null!=n&&n.radius||null!=n&&n.width||null!=n&&n.style:null!=n&&n[t]))}function Zm(e){const t=(0,r.getBlockSupport)(e,Km);return null==t?void 0:t.__experimentalSkipSerialization}const Xm=()=>[!mo("border.color"),!mo("border.radius"),!mo("border.style"),!mo("border.width")].every(Boolean),Qm=[];function Jm(e){if(e)return`has-${e}-gradient-background`}function ef(e,t){const n=(0,u.find)(e,["slug",t]);return n&&n.gradient}function tf(e,t){return(0,u.find)(e,["gradient",t])}function nf(e,t){const n=tf(e,t);return n&&n.slug}function of(){let{gradientAttribute:e="gradient",customGradientAttribute:t="customGradient"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{clientId:n}=Wn(),o=mo("color.gradients")||Qm,{gradient:r,customGradient:l}=(0,m.useSelect)((o=>{const{getBlockAttributes:r}=o(Vn),l=r(n)||{};return{customGradient:l[t],gradient:l[e]}}),[n,e,t]),{updateBlockAttributes:i}=(0,m.useDispatch)(Vn),a=(0,s.useCallback)((r=>{const l=nf(o,r);i(n,l?{[e]:l,[t]:void 0}:{[e]:void 0,[t]:r})}),[o,n,i]),c=Jm(r);let u;return u=r?ef(o,r):l,{gradientClass:c,gradientValue:u,setGradient:a}}
59
  // translators: first %s: The type of color or gradient (e.g. background, overlay...), second %s: the color name or value (e.g. red or #ff0000)
60
- const rf=(0,h.__)("(%s: color %s)"),lf=(0,h.__)("(%s: gradient %s)"),sf=["colors","disableCustomColors","gradients","disableCustomGradients"],af=e=>{let{colors:t,gradients:n,settings:o}=e;return o.map(((e,o)=>{let r,{colorValue:l,gradientValue:i,label:a,colors:c,gradients:u}=e;if(!l&&!i)return null;if(l){const e=_m(c||t,l);r=(0,h.sprintf)(rf,a.toLowerCase(),e&&e.name||l)}else{const e=tf(u||n,l);r=(0,h.sprintf)(lf,a.toLowerCase(),e&&e.name||i)}return(0,s.createElement)(p.ColorIndicator,{key:o,colorValue:l||i,"aria-label":r})}))},cf=e=>{let{className:t,colors:n,gradients:o,disableCustomColors:r,disableCustomGradients:l,children:a,settings:d,title:m,showTitle:f=!0,__experimentalHasMultipleOrigins:h,...g}=e;if((0,u.isEmpty)(n)&&(0,u.isEmpty)(o)&&r&&l&&(0,u.every)(d,(e=>(0,u.isEmpty)(e.colors)&&(0,u.isEmpty)(e.gradients)&&(void 0===e.disableCustomColors||e.disableCustomColors)&&(void 0===e.disableCustomGradients||e.disableCustomGradients))))return null;const v=(0,s.createElement)("span",{className:"block-editor-panel-color-gradient-settings__panel-title"},m,(0,s.createElement)(af,{colors:n,gradients:o,settings:d}));return(0,s.createElement)(p.PanelBody,i({className:c()("block-editor-panel-color-gradient-settings",t),title:f?v:void 0},g),d.map(((e,t)=>(0,s.createElement)(bm,i({showTitle:f,key:t,colors:n,gradients:o,disableCustomColors:r,disableCustomGradients:l,__experimentalHasMultipleOrigins:h},e)))),a)};// translators: first %s: The type of color or gradient (e.g. background, overlay...), second %s: the color name or value (e.g. red or #ff0000)
61
- function uf(){return{disableCustomColors:!mo("color.custom"),disableCustomGradients:!mo("color.customGradient")}}const df=e=>{const t=uf();return t.colors=mo("color.palette"),t.gradients=mo("color.gradients"),(0,s.createElement)(cf,i({},t,e))},pf=e=>{const t=uf(),n=mo("color.palette.user"),o=mo("color.palette.theme"),r=mo("color.palette.core"),l=mo("color.corePalette");t.colors=(0,s.useMemo)((()=>{const e=[];return l&&r&&r.length&&e.push({name:(0,h.__)("Core"),colors:r}),o&&o.length&&e.push({name:(0,h.__)("Theme"),colors:o}),n&&n.length&&e.push({name:(0,h.__)("User"),colors:n}),e}),[r,o,n]);const a=mo("color.gradients.user"),c=mo("color.gradients.theme"),u=mo("color.gradients.core"),d=mo("color.coreGradients");return t.gradients=(0,s.useMemo)((()=>{const e=[];return d&&u&&u.length&&e.push({name:(0,h.__)("Core"),gradients:u}),c&&c.length&&e.push({name:(0,h.__)("Theme"),gradients:c}),a&&a.length&&e.push({name:(0,h.__)("User"),gradients:a}),e}),[a,c,u]),(0,s.createElement)(cf,i({},t,e))};var mf=e=>(0,u.every)(sf,(t=>e.hasOwnProperty(t)))?(0,s.createElement)(cf,e):e.__experimentalHasMultipleOrigins?(0,s.createElement)(pf,e):(0,s.createElement)(df,e);function ff(e){let{colordBackgroundColor:t,colordTextColor:n,backgroundColor:o,textColor:r}=e;const l=t.brightness()<n.brightness()?(0,h.__)("This color combination may be hard for people to read. Try using a darker background color and/or a brighter text color."):(0,h.__)("This color combination may be hard for people to read. Try using a brighter background color and/or a darker text color.");return(0,s.useEffect)((()=>{(0,Pt.speak)((0,h.__)("This color combination may be hard for people to read."))}),[o,r]),(0,s.createElement)("div",{className:"block-editor-contrast-checker"},(0,s.createElement)(p.Notice,{spokenMessage:null,status:"warning",isDismissible:!1},l))}Ac([Dc,zc]);var hf=function(e){let{backgroundColor:t,fallbackBackgroundColor:n,fallbackTextColor:o,fontSize:r,isLargeText:l,textColor:i}=e;if(!t&&!n||!i&&!o)return null;const a=Rc(t||n),c=Rc(i||o);return 1!==a.alpha()||1!==c.alpha()||c.isReadable(a,{level:"AA",size:l||!1!==l&&r>=24?"large":"small"})?null:(0,s.createElement)(ff,{backgroundColor:t,textColor:i,colordBackgroundColor:a,colordTextColor:c})};function gf(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function vf(e){let{settings:t,clientId:n,enableContrastChecking:o=!0,showTitle:r=!0}=e;const[l,i]=(0,s.useState)(),[a,c]=(0,s.useState)(),u=Ba(n);return(0,s.useEffect)((()=>{if(!o)return;if(!u.current)return;c(gf(u.current).color);let e=u.current,t=gf(e).backgroundColor;for(;"rgba(0, 0, 0, 0)"===t&&e.parentNode&&e.parentNode.nodeType===e.parentNode.ELEMENT_NODE;)e=e.parentNode,t=gf(e).backgroundColor;i(t)})),(0,s.createElement)(er,null,(0,s.createElement)(mf,{title:(0,h.__)("Color"),initialOpen:!1,settings:t,showTitle:r,__experimentalHasMultipleOrigins:!0},o&&(0,s.createElement)(hf,{backgroundColor:l,textColor:a})))}const bf="color",kf=[],_f=e=>{const t=(0,r.getBlockSupport)(e,bf);return t&&(!0===t.link||!0===t.gradient||!1!==t.background||!1!==t.text)},yf=e=>{const t=(0,r.getBlockSupport)(e,bf);return null==t?void 0:t.__experimentalSkipSerialization},Ef=e=>{const t=(0,r.getBlockSupport)(e,bf);return(0,u.isObject)(t)&&!!t.gradients};function Cf(e,t,n){var o,r,l,i,s,a;if(!_f(t)||yf(t))return e;const u=Ef(t),{backgroundColor:d,textColor:p,gradient:m,style:f}=n,h=ym("background-color",d),g=Jm(m),v=ym("color",p),b=c()(e.className,v,g,{[h]:!(u&&null!=f&&null!==(o=f.color)&&void 0!==o&&o.gradient||!h),"has-text-color":p||(null==f||null===(r=f.color)||void 0===r?void 0:r.text),"has-background":d||(null==f||null===(l=f.color)||void 0===l?void 0:l.background)||u&&(m||(null==f||null===(i=f.color)||void 0===i?void 0:i.gradient)),"has-link-color":null==f||null===(s=f.elements)||void 0===s||null===(a=s.link)||void 0===a?void 0:a.color});return e.className=b||void 0,e}const Sf=(e,t)=>{const n=/var:preset\|color\|(.+)/.exec(t);return n&&n[1]?km(e,n[1]).color:t};function wf(e){var t,n,o,l,i,a,c,d,p;const{name:m,attributes:f}=e,g=mo("color.palette")||kf,v=mo("color.gradients")||kf,b=mo("color.custom"),k=mo("color.customGradient"),_=mo("color.link"),y=mo("color.text"),E=mo("color.background"),C=(0,s.useRef)(f);if((0,s.useEffect)((()=>{C.current=f}),[f]),!_f(m))return null;const S=(e=>{if("web"!==s.Platform.OS)return!1;const t=(0,r.getBlockSupport)(e,bf);return(0,u.isObject)(t)&&!!t.link})(m)&&_&&(g.length>0||b),w=(e=>{const t=(0,r.getBlockSupport)(e,bf);return t&&!1!==t.text})(m)&&y&&(g.length>0||b),B=(e=>{const t=(0,r.getBlockSupport)(e,bf);return t&&!1!==t.background})(m)&&E&&(g.length>0||b),I=Ef(m)&&(v.length>0||k);if(!(S||w||B||I))return null;const{style:x,textColor:T,backgroundColor:N,gradient:P}=f;let M;if(I&&P)M=ef(v,P);else if(I){var R;M=null==x||null===(R=x.color)||void 0===R?void 0:R.gradient}const L=t=>n=>{var o,r;const l=_m(g,n),i=t+"Color",s={...C.current.style,color:{...null===(o=C.current)||void 0===o||null===(r=o.style)||void 0===r?void 0:r.color,[t]:null!=l&&l.slug?void 0:n}},a=null!=l&&l.slug?l.slug:void 0,c={style:qo(s),[i]:a};e.setAttributes(c),C.current={...C.current,...c}};return(0,s.createElement)(vf,{enableContrastChecking:!("web"!==s.Platform.OS||P||null!=x&&null!==(t=x.color)&&void 0!==t&&t.gradient),clientId:e.clientId,settings:[...w?[{label:(0,h.__)("Text color"),onColorChange:L("text"),colorValue:km(g,T,null==x||null===(n=x.color)||void 0===n?void 0:n.text).color}]:[],...B||I?[{label:(0,h.__)("Background color"),onColorChange:B?L("background"):void 0,colorValue:km(g,N,null==x||null===(o=x.color)||void 0===o?void 0:o.background).color,gradientValue:M,onGradientChange:I?t=>{const n=nf(v,t);let o;if(n){var r,l,i;const e={...null===(r=C.current)||void 0===r?void 0:r.style,color:{...null===(l=C.current)||void 0===l||null===(i=l.style)||void 0===i?void 0:i.color,gradient:void 0}};o={style:qo(e),gradient:n}}else{var s,a,c;const e={...null===(s=C.current)||void 0===s?void 0:s.style,color:{...null===(a=C.current)||void 0===a||null===(c=a.style)||void 0===c?void 0:c.color,gradient:t}};o={style:qo(e),gradient:void 0}}e.setAttributes(o),C.current={...C.current,...o}}:void 0}]:[],...S?[{label:(0,h.__)("Link Color"),onColorChange:t=>{const n=_m(g,t),o=null!=n&&n.slug?`var:preset|color|${n.slug}`:t,r=qo(function(e,t,n){return(0,u.setWith)(e?(0,u.clone)(e):{},["elements","link","color","text"],n,u.clone)}(x,0,o));e.setAttributes({style:r})},colorValue:Sf(g,null==x||null===(l=x.elements)||void 0===l||null===(i=l.link)||void 0===i||null===(a=i.color)||void 0===a?void 0:a.text),clearable:!(null==x||null===(c=x.elements)||void 0===c||null===(d=c.link)||void 0===d||null===(p=d.color)||void 0===p||!p.text)}]:[]]})}const Bf=(0,d.createHigherOrderComponent)((e=>t=>{var n,o,r;const{name:l,attributes:a}=t,{backgroundColor:c,textColor:u}=a,d=mo("color.palette")||kf;if(!_f(l)||yf(l))return(0,s.createElement)(e,t);const p={color:u?null===(n=km(d,u))||void 0===n?void 0:n.color:void 0,backgroundColor:c?null===(o=km(d,c))||void 0===o?void 0:o.color:void 0};let m=t.wrapperProps;return m={...t.wrapperProps,style:{...p,...null===(r=t.wrapperProps)||void 0===r?void 0:r.style}},(0,s.createElement)(e,i({},t,{wrapperProps:m}))}));(0,l.addFilter)("blocks.registerBlockType","core/color/addAttribute",(function(e){return _f(e)?(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),Ef(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}}),e):e})),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/color/addSaveProps",Cf),(0,l.addFilter)("blocks.registerBlockType","core/color/addEditProps",(function(e){if(!_f(e)||yf(e))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),Cf(o,e,n)},e})),(0,l.addFilter)("editor.BlockListBlock","core/color/with-color-palette-styles",Bf);const If=[{name:(0,h.__)("Regular"),value:"normal"},{name:(0,h.__)("Italic"),value:"italic"}],xf=[{name:(0,h.__)("Thin"),value:"100"},{name:(0,h.__)("Extra Light"),value:"200"},{name:(0,h.__)("Light"),value:"300"},{name:(0,h.__)("Regular"),value:"400"},{name:(0,h.__)("Medium"),value:"500"},{name:(0,h.__)("Semi Bold"),value:"600"},{name:(0,h.__)("Bold"),value:"700"},{name:(0,h.__)("Extra Bold"),value:"800"},{name:(0,h.__)("Black"),value:"900"}],Tf=(e,t)=>e?t?(0,h.__)("Appearance"):(0,h.__)("Font style"):(0,h.__)("Font weight");function Nf(e){const{onChange:t,hasFontStyles:n=!0,hasFontWeights:o=!0,value:{fontStyle:r,fontWeight:l}}=e,i=n||o,a=Tf(n,o),c={key:"default",name:(0,h.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},u=(0,s.useMemo)((()=>n&&o?(()=>{const e=[c];return If.forEach((t=>{let{name:n,value:o}=t;xf.forEach((t=>{let{name:r,value:l}=t;const i="normal"===o?r:(0,h.sprintf)(
62
  /* translators: 1: Font weight name. 2: Font style name. */
63
  (0,h.__)("%1$s %2$s"),r,n);e.push({key:`${o}-${l}`,name:i,style:{fontStyle:o,fontWeight:l}})}))})),e})():n?(()=>{const e=[c];return If.forEach((t=>{let{name:n,value:o}=t;e.push({key:o,name:n,style:{fontStyle:o,fontWeight:void 0}})})),e})():(()=>{const e=[c];return xf.forEach((t=>{let{name:n,value:o}=t;e.push({key:o,name:n,style:{fontStyle:void 0,fontWeight:o}})})),e})()),[e.options]),d=u.find((e=>e.style.fontStyle===r&&e.style.fontWeight===l))||u[0];return i&&(0,s.createElement)(p.CustomSelectControl,{className:"components-font-appearance-control",label:a,describedBy:d?n?o?(0,h.sprintf)(// translators: %s: Currently selected font appearance.
64
  (0,h.__)("Currently selected font appearance: %s"),d.name):(0,h.sprintf)(// translators: %s: Currently selected font style.
65
  (0,h.__)("Currently selected font style: %s"),d.name):(0,h.sprintf)(// translators: %s: Currently selected font weight.
66
- (0,h.__)("Currently selected font weight: %s"),d.name):(0,h.__)("No selected font appearance"),options:u,value:d,onChange:e=>{let{selectedItem:n}=e;return t(n.style)}})}function Pf(e){let{value:t,onChange:n}=e;const o=function(e){return void 0!==e&&""!==e}(t),r=o?t:"";return(0,s.createElement)("div",{className:"block-editor-line-height-control"},(0,s.createElement)(p.TextControl,{autoComplete:"off",onKeyDown:e=>{const{keyCode:t}=e;t!==va.ZERO||o||(e.preventDefault(),n("0"))},onChange:e=>{if(o)return void n(e);let t=e;switch(e){case"0.1":t=1.6;break;case"0":t=1.4}n(t)},label:(0,h.__)("Line height"),placeholder:1.5,step:.1,type:"number",value:r,min:0}))}const Mf="typography.lineHeight";function Rf(e){var t;const{attributes:{style:n},setAttributes:o}=e;return(0,s.createElement)(Pf,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.lineHeight,onChange:e=>{const t={...n,typography:{...null==n?void 0:n.typography,lineHeight:e}};o({style:qo(t)})}})}function Lf(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!mo("typography.lineHeight");return!(0,r.hasBlockSupport)(e,Mf)||t}const Af="typography.__experimentalFontStyle",Df="typography.__experimentalFontWeight";function Of(e){var t,n;const{attributes:{style:o},setAttributes:r}=e,l=!Ff(e),i=!zf(e),a=null==o||null===(t=o.typography)||void 0===t?void 0:t.fontStyle,c=null==o||null===(n=o.typography)||void 0===n?void 0:n.fontWeight;return(0,s.createElement)(Nf,{onChange:e=>{r({style:qo({...o,typography:{...null==o?void 0:o.typography,fontStyle:e.fontStyle,fontWeight:e.fontWeight}})})},hasFontStyles:l,hasFontWeights:i,value:{fontStyle:a,fontWeight:c}})}function Ff(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,r.hasBlockSupport)(e,Af),n=mo("typography.fontStyle");return!t||!n}function zf(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,r.hasBlockSupport)(e,Df),n=mo("typography.fontWeight");return!t||!n}function Vf(e){const t=Ff(e),n=zf(e);return t&&n}function Hf(e){let{value:t="",onChange:n,fontFamilies:o,...r}=e;const l=mo("typography.fontFamilies");if(o||(o=l),(0,u.isEmpty)(o))return null;const a=[{value:"",label:(0,h.__)("Default")},...o.map((e=>{let{fontFamily:t,name:n}=e;return{value:t,label:n||t}}))];return(0,s.createElement)(p.SelectControl,i({label:(0,h.__)("Font family"),options:a,value:t,onChange:n,labelPosition:"top"},r))}const Uf="typography.__experimentalFontFamily";function Gf(e,t,n){if(!(0,r.hasBlockSupport)(t,Uf))return e;if((0,r.hasBlockSupport)(t,"typography.__experimentalSkipSerialization"))return e;if(null==n||!n.fontFamily)return e;const o=new(ip())(e.className);o.add(`has-${(0,u.kebabCase)(null==n?void 0:n.fontFamily)}-font-family`);const l=o.value;return e.className=l||void 0,e}function Wf(e){var t;let{setAttributes:n,attributes:{fontFamily:o}}=e;const r=mo("typography.fontFamilies"),l=null===(t=(0,u.find)(r,(e=>{let{slug:t}=e;return o===t})))||void 0===t?void 0:t.fontFamily;return(0,s.createElement)(Hf,{className:"block-editor-hooks-font-family-control",fontFamilies:r,value:l,onChange:function(e){const t=(0,u.find)(r,(t=>{let{fontFamily:n}=t;return n===e}));n({fontFamily:null==t?void 0:t.slug})}})}function $f(e){let{name:t}=e;const n=mo("typography.fontFamilies");return!n||0===n.length||!(0,r.hasBlockSupport)(t,Uf)}(0,l.addFilter)("blocks.registerBlockType","core/fontFamily/addAttribute",(function(e){return(0,r.hasBlockSupport)(e,Uf)?(e.attributes.fontFamily||Object.assign(e.attributes,{fontFamily:{type:"string"}}),e):e})),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/fontFamily/addSaveProps",Gf),(0,l.addFilter)("blocks.registerBlockType","core/fontFamily/addEditProps",(function(e){if(!(0,r.hasBlockSupport)(e,Uf))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),Gf(o,e,n)},e}));const jf=(e,t,n)=>{if(t){const n=(0,u.find)(e,{slug:t});if(n)return n}return{size:n}};function Kf(e,t){return(0,u.find)(e,{size:t})||{size:t}}function qf(e){if(e)return`has-${(0,u.kebabCase)(e)}-font-size`}var Yf=function(e){const t=mo("typography.fontSizes"),n=!mo("typography.customFontSize");return(0,s.createElement)(p.FontSizePicker,i({},e,{fontSizes:t,disableCustomFontSizes:n}))};const Zf="typography.fontSize";function Xf(e,t,n){if(!(0,r.hasBlockSupport)(t,Zf))return e;if((0,r.hasBlockSupport)(t,"typography.__experimentalSkipSerialization"))return e;const o=new(ip())(e.className);o.add(qf(n.fontSize));const l=o.value;return e.className=l||void 0,e}function Qf(e){var t,n;const{attributes:{fontSize:o,style:r},setAttributes:l}=e,i=mo("typography.fontSizes"),a=jf(i,o,null==r||null===(t=r.typography)||void 0===t?void 0:t.fontSize),c=(null==a?void 0:a.size)||(null==r||null===(n=r.typography)||void 0===n?void 0:n.fontSize)||o;return(0,s.createElement)(Yf,{onChange:e=>{const t=Kf(i,e).slug;l({style:qo({...r,typography:{...null==r?void 0:r.typography,fontSize:t?void 0:e}}),fontSize:t})},value:c,withReset:!1})}function Jf(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=mo("typography.fontSizes"),n=!(null==t||!t.length);return!(0,r.hasBlockSupport)(e,Zf)||!n}const eh=(0,d.createHigherOrderComponent)((e=>t=>{var n,o;const l=mo("typography.fontSizes"),{name:i,attributes:{fontSize:a,style:c},wrapperProps:u}=t;if(!(0,r.hasBlockSupport)(i,Zf)||(0,r.hasBlockSupport)(i,"typography.__experimentalSkipSerialization")||!a||null!=c&&null!==(n=c.typography)&&void 0!==n&&n.fontSize)return(0,s.createElement)(e,t);const d=jf(l,a,null==c||null===(o=c.typography)||void 0===o?void 0:o.fontSize).size,p={...t,wrapperProps:{...u,style:{fontSize:d,...null==u?void 0:u.style}}};return(0,s.createElement)(e,p)}),"withFontSizeInlineStyles");(0,l.addFilter)("blocks.registerBlockType","core/font/addAttribute",(function(e){return(0,r.hasBlockSupport)(e,Zf)?(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}}),e):e})),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/font/addSaveProps",Xf),(0,l.addFilter)("blocks.registerBlockType","core/font/addEditProps",(function(e){if(!(0,r.hasBlockSupport)(e,Zf))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),Xf(o,e,n)},e})),(0,l.addFilter)("editor.BlockListBlock","core/font-size/with-font-size-inline-styles",eh);var th=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M7 18v1h10v-1H7zm5-2c1.5 0 2.6-.4 3.4-1.2.8-.8 1.1-2 1.1-3.5V5H15v5.8c0 1.2-.2 2.1-.6 2.8-.4.7-1.2 1-2.4 1s-2-.3-2.4-1c-.4-.7-.6-1.6-.6-2.8V5H7.5v6.2c0 1.5.4 2.7 1.1 3.5.8.9 1.9 1.3 3.4 1.3z"})),nh=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z"}));const oh=[{name:(0,h.__)("Underline"),value:"underline",icon:th},{name:(0,h.__)("Strikethrough"),value:"line-through",icon:nh}];function rh(e){let{value:t,onChange:n}=e;return(0,s.createElement)("fieldset",{className:"block-editor-text-decoration-control"},(0,s.createElement)("legend",null,(0,h.__)("Decoration")),(0,s.createElement)("div",{className:"block-editor-text-decoration-control__buttons"},oh.map((e=>(0,s.createElement)(p.Button,{key:e.value,icon:e.icon,isSmall:!0,isPressed:e.value===t,onClick:()=>n(e.value===t?void 0:e.value),"aria-label":e.name})))))}const lh="typography.__experimentalTextDecoration";function ih(e){var t;const{attributes:{style:n},setAttributes:o}=e;return(0,s.createElement)(rh,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textDecoration,onChange:function(e){o({style:qo({...n,typography:{...null==n?void 0:n.typography,textDecoration:e}})})}})}function sh(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!(0,r.hasBlockSupport)(e,lh),n=mo("typography.textDecoration");return t||!n}var ah=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M6.1 6.8L2.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H6.1zm-.8 6.8L7 8.9l1.7 4.7H5.3zm15.1-.7c-.4-.5-.9-.8-1.6-1 .4-.2.7-.5.8-.9.2-.4.3-.9.3-1.4 0-.9-.3-1.6-.8-2-.6-.5-1.3-.7-2.4-.7h-3.5V18h4.2c1.1 0 2-.3 2.6-.8.6-.6 1-1.4 1-2.4-.1-.8-.3-1.4-.6-1.9zm-5.7-4.7h1.8c.6 0 1.1.1 1.4.4.3.2.5.7.5 1.3 0 .6-.2 1.1-.5 1.3-.3.2-.8.4-1.4.4h-1.8V8.2zm4 8c-.4.3-.9.5-1.5.5h-2.6v-3.8h2.6c1.4 0 2 .6 2 1.9.1.6-.1 1-.5 1.4z"})),ch=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M11 16.8c-.1-.1-.2-.3-.3-.5v-2.6c0-.9-.1-1.7-.3-2.2-.2-.5-.5-.9-.9-1.2-.4-.2-.9-.3-1.6-.3-.5 0-1 .1-1.5.2s-.9.3-1.2.6l.2 1.2c.4-.3.7-.4 1.1-.5.3-.1.7-.2 1-.2.6 0 1 .1 1.3.4.3.2.4.7.4 1.4-1.2 0-2.3.2-3.3.7s-1.4 1.1-1.4 2.1c0 .7.2 1.2.7 1.6.4.4 1 .6 1.8.6.9 0 1.7-.4 2.4-1.2.1.3.2.5.4.7.1.2.3.3.6.4.3.1.6.1 1.1.1h.1l.2-1.2h-.1c-.4.1-.6 0-.7-.1zM9.2 16c-.2.3-.5.6-.9.8-.3.1-.7.2-1.1.2-.4 0-.7-.1-.9-.3-.2-.2-.3-.5-.3-.9 0-.6.2-1 .7-1.3.5-.3 1.3-.4 2.5-.5v2zm10.6-3.9c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2s-.2 1.4-.6 2z"})),uh=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M7.1 6.8L3.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H7.1zm-.8 6.8L8 8.9l1.7 4.7H6.3zm14.5-1.5c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2 .1.8-.2 1.4-.6 2z"}));const dh=[{name:(0,h.__)("Uppercase"),value:"uppercase",icon:ah},{name:(0,h.__)("Lowercase"),value:"lowercase",icon:ch},{name:(0,h.__)("Capitalize"),value:"capitalize",icon:uh}];function ph(e){let{value:t,onChange:n}=e;return(0,s.createElement)("fieldset",{className:"block-editor-text-transform-control"},(0,s.createElement)("legend",null,(0,h.__)("Letter case")),(0,s.createElement)("div",{className:"block-editor-text-transform-control__buttons"},dh.map((e=>(0,s.createElement)(p.Button,{key:e.value,icon:e.icon,isSmall:!0,isPressed:t===e.value,"aria-label":e.name,onClick:()=>n(t===e.value?void 0:e.value)})))))}const mh="typography.__experimentalTextTransform";function fh(e){var t;const{attributes:{style:n},setAttributes:o}=e;return(0,s.createElement)(ph,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textTransform,onChange:function(e){o({style:qo({...n,typography:{...null==n?void 0:n.typography,textTransform:e}})})}})}function hh(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!(0,r.hasBlockSupport)(e,mh),n=mo("typography.textTransform");return t||!n}function gh(e){let{value:t,onChange:n,__unstableInputWidth:o="60px"}=e;const r=(0,p.__experimentalUseCustomUnits)({availableUnits:mo("spacing.units")||["px","em","rem"],defaultValues:{px:"2",em:".2",rem:".2"}});return(0,s.createElement)(p.__experimentalUnitControl,{label:(0,h.__)("Letter spacing"),value:t,__unstableInputWidth:o,units:r,onChange:n})}const vh="typography.__experimentalLetterSpacing";function bh(e){var t;const{attributes:{style:n},setAttributes:o}=e;return(0,s.createElement)(gh,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.letterSpacing,onChange:function(e){o({style:qo({...n,typography:{...null==n?void 0:n.typography,letterSpacing:e}})})},__unstableInputWidth:"100%"})}function kh(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!(0,r.hasBlockSupport)(e,vh),n=mo("typography.letterSpacing");return t||!n}const _h="typography",yh=[Mf,Zf,Af,Df,Uf,lh,mh,vh];function Eh(e){const{clientId:t}=e,n=$f(e),o=Jf(e),l=Vf(e),i=Lf(e),a=sh(e),c=hh(e),u=kh(e),d=!Ff(e),m=!zf(e),f=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=[Vf(e),Jf(e),Lf(e),$f(e),sh(e),hh(e),kh(e)];return t.filter(Boolean).length===t.length}(e),g=Ch(e.name);if(f||!g)return null;const v=(0,r.getBlockSupport)(e.name,[_h,"__experimentalDefaultControls"]),b=e=>t=>{var n;return{...t,style:{...t.style,typography:{...null===(n=t.style)||void 0===n?void 0:n.typography,[e]:void 0}}}};return(0,s.createElement)(er,{__experimentalGroup:"typography"},!n&&(0,s.createElement)(p.__experimentalToolsPanelItem,{hasValue:()=>function(e){return!!e.attributes.fontFamily}(e),label:(0,h.__)("Font family"),onDeselect:()=>function(e){let{setAttributes:t}=e;t({fontFamily:void 0})}(e),isShownByDefault:null==v?void 0:v.fontFamily,resetAllFilter:e=>({...e,fontFamily:void 0}),panelId:t},(0,s.createElement)(Wf,e)),!o&&(0,s.createElement)(p.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t;const{fontSize:n,style:o}=e.attributes;return!!n||!(null==o||null===(t=o.typography)||void 0===t||!t.fontSize)}(e),label:(0,h.__)("Font size"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({fontSize:void 0,style:qo({...o,typography:{...null==o?void 0:o.typography,fontSize:void 0}})})}(e),isShownByDefault:null==v?void 0:v.fontSize,resetAllFilter:e=>{var t;return{...e,fontSize:void 0,style:{...e.style,typography:{...null===(t=e.style)||void 0===t?void 0:t.typography,fontSize:void 0}}}},panelId:t},(0,s.createElement)(Qf,e)),!l&&(0,s.createElement)(p.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t;const{fontStyle:n,fontWeight:o}=(null===(t=e.attributes.style)||void 0===t?void 0:t.typography)||{};return!!n||!!o}(e),label:Tf(d,m),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:qo({...o,typography:{...null==o?void 0:o.typography,fontStyle:void 0,fontWeight:void 0}})})}(e),isShownByDefault:null==v?void 0:v.fontAppearance,resetAllFilter:e=>{var t;return{...e,style:{...e.style,typography:{...null===(t=e.style)||void 0===t?void 0:t.typography,fontStyle:void 0,fontWeight:void 0}}}},panelId:t},(0,s.createElement)(Of,e)),!i&&(0,s.createElement)(p.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.lineHeight)}(e),label:(0,h.__)("Line height"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:qo({...o,typography:{...null==o?void 0:o.typography,lineHeight:void 0}})})}(e),isShownByDefault:null==v?void 0:v.lineHeight,resetAllFilter:b("lineHeight"),panelId:t},(0,s.createElement)(Rf,e)),!a&&(0,s.createElement)(p.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.textDecoration)}(e),label:(0,h.__)("Decoration"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:qo({...o,typography:{...null==o?void 0:o.typography,textDecoration:void 0}})})}(e),isShownByDefault:null==v?void 0:v.textDecoration,resetAllFilter:b("textDecoration"),panelId:t},(0,s.createElement)(ih,e)),!c&&(0,s.createElement)(p.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.textTransform)}(e),label:(0,h.__)("Letter case"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:qo({...o,typography:{...null==o?void 0:o.typography,textTransform:void 0}})})}(e),isShownByDefault:null==v?void 0:v.textTransform,resetAllFilter:b("textTransform"),panelId:t},(0,s.createElement)(fh,e)),!u&&(0,s.createElement)(p.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.letterSpacing)}(e),label:(0,h.__)("Letter spacing"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:qo({...o,typography:{...null==o?void 0:o.typography,letterSpacing:void 0}})})}(e),isShownByDefault:null==v?void 0:v.letterSpacing,resetAllFilter:b("letterSpacing"),panelId:t},(0,s.createElement)(bh,e)))}const Ch=e=>yh.some((t=>(0,r.hasBlockSupport)(e,t)));function Sh(e){const t=(0,r.getBlockSupport)(e,Rh);return!!(!0===t||null!=t&&t.blockGap)}function wh(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!mo("spacing.blockGap");return!Sh(e)||t}function Bh(e){var t;const{clientId:n,attributes:{style:o},setAttributes:r}=e,l=(0,p.__experimentalUseCustomUnits)({availableUnits:mo("spacing.units")||["%","px","em","rem","vw"]}),i=Ba(n);return wh(e)?null:s.Platform.select({web:(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.__experimentalUnitControl,{label:(0,h.__)("Block spacing"),__unstableInputWidth:"80px",min:0,onChange:e=>{var t;const n={...o,spacing:{...null==o?void 0:o.spacing,blockGap:e}};r({style:qo(n)});const l=(null===(t=window)||void 0===t?void 0:t.navigator.userAgent)&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome ")&&!window.navigator.userAgent.includes("Chromium ");var s;i.current&&l&&(null===(s=i.current.parentNode)||void 0===s||s.replaceChild(i.current,i.current))},units:l,value:null==o||null===(t=o.spacing)||void 0===t?void 0:t.blockGap})),native:null})}function Ih(e){const t=(0,r.getBlockSupport)(e,Rh);return!!(!0===t||null!=t&&t.margin)}function xh(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!mo("spacing.margin"),n=!zh(e,"margin");return!Ih(e)||t||n}function Th(e){var t;const{name:n,attributes:{style:o},setAttributes:r}=e,l=(0,p.__experimentalUseCustomUnits)({availableUnits:mo("spacing.units")||["%","px","em","rem","vw"]}),i=Fh(n,"margin"),a=i&&i.some((e=>Ah.includes(e)));return xh(e)?null:s.Platform.select({web:(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.__experimentalBoxControl,{values:null==o||null===(t=o.spacing)||void 0===t?void 0:t.margin,onChange:e=>{const t={...o,spacing:{...null==o?void 0:o.spacing,margin:e}};r({style:qo(t)})},onChangeShowVisualizer:e=>{const t={...o,visualizers:{margin:e}};r({style:qo(t)})},label:(0,h.__)("Margin"),sides:i,units:l,allowReset:!1,splitOnAxis:a})),native:null})}function Nh(e){const t=(0,r.getBlockSupport)(e,Rh);return!!(!0===t||null!=t&&t.padding)}function Ph(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!mo("spacing.padding"),n=!zh(e,"padding");return!Nh(e)||t||n}function Mh(e){var t;const{name:n,attributes:{style:o},setAttributes:r}=e,l=(0,p.__experimentalUseCustomUnits)({availableUnits:mo("spacing.units")||["%","px","em","rem","vw"]}),i=Fh(n,"padding"),a=i&&i.some((e=>Ah.includes(e)));return Ph(e)?null:s.Platform.select({web:(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.__experimentalBoxControl,{values:null==o||null===(t=o.spacing)||void 0===t?void 0:t.padding,onChange:e=>{const t={...o,spacing:{...null==o?void 0:o.spacing,padding:e}};r({style:qo(t)})},onChangeShowVisualizer:e=>{const t={...o,visualizers:{padding:e}};r({style:qo(t)})},label:(0,h.__)("Padding"),sides:i,units:l,allowReset:!1,splitOnAxis:a})),native:null})}const Rh="spacing",Lh=["top","right","bottom","left"],Ah=["vertical","horizontal"];function Dh(e){const t=wh(e),n=Ph(e),o=xh(e),l=Oh(e),i=(a=e.name,"web"===s.Platform.OS&&(Sh(a)||Nh(a)||Ih(a)));var a;if(l||!i)return null;const c=(0,r.getBlockSupport)(e.name,[Rh,"__experimentalDefaultControls"]),u=e=>t=>{var n;return{...t,style:{...t.style,spacing:{...null===(n=t.style)||void 0===n?void 0:n.spacing,[e]:void 0}}}};return(0,s.createElement)(er,{__experimentalGroup:"dimensions"},!n&&(0,s.createElement)(p.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.padding)}(e),label:(0,h.__)("Padding"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:qo({...o,spacing:{...null==o?void 0:o.spacing,padding:void 0}})})}(e),resetAllFilter:u("padding"),isShownByDefault:null==c?void 0:c.padding,panelId:e.clientId},(0,s.createElement)(Mh,e)),!o&&(0,s.createElement)(p.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.margin)}(e),label:(0,h.__)("Margin"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:qo({...o,spacing:{...null==o?void 0:o.spacing,margin:void 0}})})}(e),resetAllFilter:u("margin"),isShownByDefault:null==c?void 0:c.margin,panelId:e.clientId},(0,s.createElement)(Th,e)),!t&&(0,s.createElement)(p.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.blockGap)}(e),label:(0,h.__)("Block spacing"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:{...o,spacing:{...null==o?void 0:o.spacing,blockGap:void 0}}})}(e),resetAllFilter:u("blockGap"),isShownByDefault:null==c?void 0:c.blockGap,panelId:e.clientId},(0,s.createElement)(Bh,e)))}const Oh=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=wh(e),n=Ph(e),o=xh(e);return t&&n&&o};function Fh(e,t){const n=(0,r.getBlockSupport)(e,Rh);if(n&&"boolean"!=typeof n[t])return n[t]}function zh(e,t){const n=Fh(e,t);return!(n&&n.some((e=>Lh.includes(e)))&&n.some((e=>Ah.includes(e)))&&(console.warn(`The ${t} support for the "${e}" block can not be configured to support both axial and arbitrary sides.`),1))}const Vh=[...yh,Km,bf,Rh],Hh=e=>Vh.some((t=>(0,r.hasBlockSupport)(e,t))),Uh="var:";function Gh(e){return(0,u.startsWith)(e,Uh)?`var(--wp--${e.slice(Uh.length).split("|").join("--")})`:e}function Wh(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t={};return Object.keys(r.__EXPERIMENTAL_STYLE_PROPERTY).forEach((n=>{const o=r.__EXPERIMENTAL_STYLE_PROPERTY[n].value,l=r.__EXPERIMENTAL_STYLE_PROPERTY[n].properties;if((0,u.has)(e,o)&&"elements"!==(0,u.first)(o)){const r=(0,u.get)(e,o);l&&!(0,u.isString)(r)?Object.entries(l).forEach((e=>{const[n,o]=e,l=(0,u.get)(r,[o]);l&&(t[n]=Gh(l))})):t[n]=Gh((0,u.get)(e,o))}})),t}const $h={"__experimentalBorder.__experimentalSkipSerialization":["border"],"color.__experimentalSkipSerialization":[bf],"typography.__experimentalSkipSerialization":[_h],[`${Rh}.__experimentalSkipSerialization`]:["spacing"]},jh={...$h,[`${Rh}`]:["spacing.blockGap"]};function Kh(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:jh;if(!Hh(t))return e;let{style:l}=n;return(0,u.forEach)(o,((e,n)=>{(0,r.getBlockSupport)(t,n)&&(l=(0,u.omit)(l,e))})),e.style={...Wh(l),...e.style},e}const qh=(0,d.createHigherOrderComponent)((e=>t=>{const n=$n();return(0,s.createElement)(s.Fragment,null,n&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(wf,t),(0,s.createElement)(Eh,t),(0,s.createElement)(qm,t),(0,s.createElement)(Dh,t)),(0,s.createElement)(e,t))}),"withToolbarControls"),Yh=(0,d.createHigherOrderComponent)((e=>t=>{var n,o;const l=null===(n=t.attributes.style)||void 0===n?void 0:n.elements,a=`wp-elements-${(0,d.useInstanceId)(e)}`,p=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,u.map)(t,((t,n)=>{const o=Wh(t);return(0,u.isEmpty)(o)?"":[`.${e} ${r.__EXPERIMENTAL_ELEMENTS[n]}{`,...(0,u.map)(o,((e,t)=>`\t${(0,u.kebabCase)(t)}: ${e};`)),"}"].join("\n")})).join("\n")}(a,null===(o=t.attributes.style)||void 0===o?void 0:o.elements),m=(0,s.useContext)(pm.__unstableElementContext);return(0,s.createElement)(s.Fragment,null,l&&m&&(0,s.createPortal)((0,s.createElement)("style",{dangerouslySetInnerHTML:{__html:p}}),m),(0,s.createElement)(e,i({},t,{className:l?c()(t.className,a):t.className})))}));(0,l.addFilter)("blocks.registerBlockType","core/style/addAttribute",(function(e){return Hh(e)?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/style/addSaveProps",Kh),(0,l.addFilter)("blocks.registerBlockType","core/style/addEditProps",(function(e){if(!Hh(e))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),Kh(o,e,n,$h)},e})),(0,l.addFilter)("editor.BlockEdit","core/style/with-block-controls",qh),(0,l.addFilter)("editor.BlockListBlock","core/editor/with-elements-styles",Yh);var Zh=function(e){let{colorPalette:t,duotonePalette:n,disableCustomColors:o,disableCustomDuotone:r,value:l,onChange:i}=e;return(0,s.createElement)(p.Dropdown,{popoverProps:{className:"block-editor-duotone-control__popover",headerTitle:(0,h.__)("Duotone"),isAlternate:!0},renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return(0,s.createElement)(p.ToolbarButton,{showTooltip:!0,onClick:n,"aria-haspopup":"true","aria-expanded":t,onKeyDown:e=>{t||e.keyCode!==va.DOWN||(e.preventDefault(),n())},label:(0,h.__)("Apply duotone filter"),icon:(0,s.createElement)(p.DuotoneSwatch,{values:l})})},renderContent:()=>(0,s.createElement)(p.MenuGroup,{label:(0,h.__)("Duotone")},(0,s.createElement)("div",{className:"block-editor-duotone-control__description"},(0,h.__)("Create a two-tone color effect without losing your original image.")),(0,s.createElement)(p.DuotonePicker,{colorPalette:t,duotonePalette:n,disableCustomColors:o,disableCustomDuotone:r,value:l,onChange:i}))})};const Xh=[];function Qh(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={r:[],g:[],b:[],a:[]};return e.forEach((e=>{const n=Rc(e).toRgb();t.r.push(n.r/255),t.g.push(n.g/255),t.b.push(n.b/255),t.a.push(n.a)})),t}function Jh(e){let{selector:t,id:n,values:o}=e;const r=`\n${t} {\n\tfilter: url( #${n} );\n}\n`;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.SVG,{xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 0 0",width:"0",height:"0",focusable:"false",role:"none",style:{visibility:"hidden",position:"absolute",left:"-9999px",overflow:"hidden"}},(0,s.createElement)("defs",null,(0,s.createElement)("filter",{id:n},(0,s.createElement)("feColorMatrix",{colorInterpolationFilters:"sRGB",type:"matrix",values:" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "}),(0,s.createElement)("feComponentTransfer",{colorInterpolationFilters:"sRGB"},(0,s.createElement)("feFuncR",{type:"table",tableValues:o.r.join(" ")}),(0,s.createElement)("feFuncG",{type:"table",tableValues:o.g.join(" ")}),(0,s.createElement)("feFuncB",{type:"table",tableValues:o.b.join(" ")}),(0,s.createElement)("feFuncA",{type:"table",tableValues:o.a.join(" ")})),(0,s.createElement)("feComposite",{in2:"SourceGraphic",operator:"in"})))),(0,s.createElement)("style",{dangerouslySetInnerHTML:{__html:r}}))}function eg(e){var t;let{attributes:n,setAttributes:o}=e;const r=null==n?void 0:n.style,l=null==r||null===(t=r.color)||void 0===t?void 0:t.duotone,i=mo("color.duotone")||Xh,a=mo("color.palette")||Xh,c=!mo("color.custom"),u=!mo("color.customDuotone")||0===(null==a?void 0:a.length)&&c;return 0===(null==i?void 0:i.length)&&u?null:(0,s.createElement)(Zn,{group:"block",__experimentalShareWithChildBlocks:!0},(0,s.createElement)(Zh,{duotonePalette:i,colorPalette:a,disableCustomDuotone:u,disableCustomColors:c,value:l,onChange:e=>{const t={...r,color:{...null==r?void 0:r.color,duotone:e}};o({style:t})}}))}Ac([Dc]);const tg=(0,d.createHigherOrderComponent)((e=>t=>{const n=(0,r.hasBlockSupport)(t.name,"color.__experimentalDuotone");return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(e,t),n&&(0,s.createElement)(eg,t))}),"withDuotoneControls"),ng=(0,d.createHigherOrderComponent)((e=>t=>{var n,o,l;const a=(0,r.getBlockSupport)(t.name,"color.__experimentalDuotone"),u=null==t||null===(n=t.attributes)||void 0===n||null===(o=n.style)||void 0===o||null===(l=o.color)||void 0===l?void 0:l.duotone;if(!a||!u)return(0,s.createElement)(e,t);const p=`wp-duotone-${(0,d.useInstanceId)(e)}`,m=function(e,t){const n=e.split(","),o=t.split(","),r=[];return n.forEach((e=>{o.forEach((t=>{r.push(`${e.trim()} ${t.trim()}`)}))})),r.join(", ")}(`.editor-styles-wrapper .${p}`,a),f=c()(null==t?void 0:t.className,p),h=(0,s.useContext)(pm.__unstableElementContext);return(0,s.createElement)(s.Fragment,null,h&&(0,s.createPortal)((0,s.createElement)(Jh,{selector:m,id:p,values:Qh(u)}),h),(0,s.createElement)(e,i({},t,{className:f})))}),"withDuotoneStyles");(0,l.addFilter)("blocks.registerBlockType","core/editor/duotone/add-attributes",(function(e){return(0,r.hasBlockSupport)(e,"color.__experimentalDuotone")?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),(0,l.addFilter)("editor.BlockEdit","core/editor/duotone/with-editor-controls",tg),(0,l.addFilter)("editor.BlockListBlock","core/editor/duotone/with-styles",ng);const og="__experimentalLayout";function rg(e){let{setAttributes:t,attributes:n,name:o}=e;const{layout:l}=n,i=mo("layout"),a=(0,m.useSelect)((e=>{const{getSettings:t}=e(Vn);return t().supportsLayout}),[]),c=(0,r.getBlockSupport)(o,og,{}),{allowSwitching:u,allowEditing:d=!0,allowInheriting:f=!0,default:g}=c;if(!d)return null;const v=l||g||{},{inherit:b=!1,type:k="default"}=v;if("default"===k&&!a)return null;const _=Io(k),y=e=>t({layout:e});return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(er,null,(0,s.createElement)(p.PanelBody,{title:(0,h.__)("Layout")},f&&!!i&&(0,s.createElement)(p.ToggleControl,{label:(0,h.__)("Inherit default layout"),checked:!!b,onChange:()=>t({layout:{inherit:!b}})}),!b&&u&&(0,s.createElement)(lg,{type:k,onChange:e=>t({layout:{type:e}})}),!b&&_&&(0,s.createElement)(_.inspectorControls,{layout:v,onChange:y,layoutBlockSupport:c}))),!b&&_&&(0,s.createElement)(_.toolBarControls,{layout:v,onChange:y,layoutBlockSupport:c}))}function lg(e){let{type:t,onChange:n}=e;return(0,s.createElement)(p.ButtonGroup,null,Bo.map((e=>{let{name:o,label:r}=e;return(0,s.createElement)(p.Button,{key:o,isPressed:t===o,onClick:()=>n(o)},r)})))}const ig=(0,d.createHigherOrderComponent)((e=>t=>{const{name:n}=t;return[(0,r.hasBlockSupport)(n,og)&&(0,s.createElement)(rg,i({key:"layout"},t)),(0,s.createElement)(e,i({key:"edit"},t))]}),"withInspectorControls"),sg=(0,d.createHigherOrderComponent)((e=>t=>{const{name:n,attributes:o}=t,l=(0,r.hasBlockSupport)(n,og),a=(0,d.useInstanceId)(e),u=mo("layout")||{},p=(0,s.useContext)(pm.__unstableElementContext),{layout:m}=o,{default:f}=(0,r.getBlockSupport)(n,og)||{},h=null!=m&&m.inherit?u:m||f||{},g=c()(null==t?void 0:t.className,{[`wp-container-${a}`]:l});return(0,s.createElement)(s.Fragment,null,l&&p&&(0,s.createPortal)((0,s.createElement)(Mo,{selector:`.wp-container-${a}`,layout:h}),p),(0,s.createElement)(e,i({},t,{className:g})))}));(0,l.addFilter)("blocks.registerBlockType","core/layout/addAttribute",(function(e){return(0,u.has)(e.attributes,["layout","type"])||(0,r.hasBlockSupport)(e,og)&&(e.attributes={...e.attributes,layout:{type:"object"}}),e})),(0,l.addFilter)("editor.BlockListBlock","core/editor/layout/with-layout-styles",sg),(0,l.addFilter)("editor.BlockEdit","core/editor/layout/with-inspector-controls",ig);const ag=[];function cg(e){var t;let{borderColor:n,style:o}=e;const r=(null==o?void 0:o.border)||{},l=ym("border-color",n);return{className:c()({[l]:!!l,"has-border-color":n||(null==o||null===(t=o.border)||void 0===t?void 0:t.color)})||void 0,style:Wh({border:r})}}function ug(e){const t=mo("color.palette")||ag,n=cg(e);if(e.borderColor){const o=km(t,e.borderColor);n.style.borderColor=o.color}return n}const dg=[];function pg(e){var t,n,o,r,l,i;const{backgroundColor:s,textColor:a,gradient:u,style:d}=e,p=ym("background-color",s),m=ym("color",a),f=Jm(u),h=f||(null==d||null===(t=d.color)||void 0===t?void 0:t.gradient);return{className:c()(m,f,{[p]:!h&&!!p,"has-text-color":a||(null==d||null===(n=d.color)||void 0===n?void 0:n.text),"has-background":s||(null==d||null===(o=d.color)||void 0===o?void 0:o.background)||u||(null==d||null===(r=d.color)||void 0===r?void 0:r.gradient),"has-link-color":null==d||null===(l=d.elements)||void 0===l||null===(i=l.link)||void 0===i?void 0:i.color})||void 0,style:Wh({color:(null==d?void 0:d.color)||{}})}}function mg(e){const{backgroundColor:t,textColor:n,gradient:o}=e,r=mo("color.palette")||dg,l=mo("color.gradients")||dg,i=pg(e);if(t){const e=km(r,t);i.style.backgroundColor=e.color}if(o&&(i.style.background=ef(l,o)),n){const e=km(r,n);i.style.color=e.color}return i}function fg(e){const{style:t}=e;return{style:Wh({spacing:(null==t?void 0:t.spacing)||{}})}}function hg(e){const[t,n]=(0,s.useState)(e);return(0,s.useEffect)((()=>{e&&n(e)}),[e]),t}const gg=[],vg=e=>(0,d.createHigherOrderComponent)((t=>n=>(0,s.createElement)(t,i({},n,{colors:e}))),"withCustomColorPalette"),bg=()=>(0,d.createHigherOrderComponent)((e=>t=>{const n=mo("color.palette")||gg;return(0,s.createElement)(e,i({},t,{colors:n}))}),"withEditorColorPalette");function kg(e,t){const n=(0,u.reduce)(e,((e,t)=>({...e,...(0,u.isString)(t)?{[t]:(0,u.kebabCase)(t)}:t})),{});return(0,d.compose)([t,e=>class extends s.Component{constructor(e){super(e),this.setters=this.createSetters(),this.colorUtils={getMostReadableColor:this.getMostReadableColor.bind(this)},this.state={}}getMostReadableColor(e){const{colors:t}=this.props;return function(e,t){const n=Rc(t);return(0,u.maxBy)(e,(e=>{let{color:t}=e;return n.contrast(t)})).color}(t,e)}createSetters(){return(0,u.reduce)(n,((e,t,n)=>{const o=(0,u.upperFirst)(n),r=`custom${o}`;return e[`set${o}`]=this.createSetColor(n,r),e}),{})}createSetColor(e,t){return n=>{const o=_m(this.props.colors,n);this.props.setAttributes({[e]:o&&o.slug?o.slug:void 0,[t]:o&&o.slug?void 0:n})}}static getDerivedStateFromProps(e,t){let{attributes:o,colors:r}=e;return(0,u.reduce)(n,((e,n,l)=>{const i=km(r,o[l],o[`custom${(0,u.upperFirst)(l)}`]),s=t[l];return(null==s?void 0:s.color)===i.color&&s?e[l]=s:e[l]={...i,class:ym(n,i.slug)},e}),{})}render(){return(0,s.createElement)(e,i({},this.props,{colors:void 0},this.state,this.setters,{colorUtils:this.colorUtils}))}}])}function _g(e){return function(){const t=vg(e);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return(0,d.createHigherOrderComponent)(kg(o,t),"withCustomColors")}}function yg(){const e=bg();for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return(0,d.createHigherOrderComponent)(kg(n,e),"withColors")}const Eg=[];var Cg=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const o=(0,u.reduce)(t,((e,t)=>(e[t]=`custom${(0,u.upperFirst)(t)}`,e)),{});return(0,d.createHigherOrderComponent)((0,d.compose)([(0,d.createHigherOrderComponent)((e=>t=>{const n=mo("typography.fontSizes")||Eg;return(0,s.createElement)(e,i({},t,{fontSizes:n}))}),"withFontSizes"),e=>class extends s.Component{constructor(e){super(e),this.setters=this.createSetters(),this.state={}}createSetters(){return(0,u.reduce)(o,((e,t,n)=>(e[`set${(0,u.upperFirst)(n)}`]=this.createSetFontSize(n,t),e)),{})}createSetFontSize(e,t){return n=>{const o=(0,u.find)(this.props.fontSizes,{size:Number(n)});this.props.setAttributes({[e]:o&&o.slug?o.slug:void 0,[t]:o&&o.slug?void 0:n})}}static getDerivedStateFromProps(e,t){let{attributes:n,fontSizes:r}=e;const l=(e,o)=>!t[o]||(n[o]?n[o]!==t[o].slug:t[o].size!==n[e]);if(!(0,u.some)(o,l))return null;const i=(0,u.reduce)((0,u.pickBy)(o,l),((e,t,o)=>{const l=n[o],i=jf(r,l,n[t]);return e[o]={...i,class:qf(l)},e}),{});return{...t,...i}}render(){return(0,s.createElement)(e,i({},this.props,{fontSizes:void 0},this.state,this.setters))}}]),"withFontSizes")},Sg=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M4 19.8h8.9v-1.5H4v1.5zm8.9-15.6H4v1.5h8.9V4.2zm-8.9 7v1.5h16v-1.5H4z"})),wg=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M16.4 4.2H7.6v1.5h8.9V4.2zM4 11.2v1.5h16v-1.5H4zm3.6 8.6h8.9v-1.5H7.6v1.5z"})),Bg=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M11.1 19.8H20v-1.5h-8.9v1.5zm0-15.6v1.5H20V4.2h-8.9zM4 12.8h16v-1.5H4v1.5z"}));const Ig=[{icon:Sg,title:(0,h.__)("Align text left"),align:"left"},{icon:wg,title:(0,h.__)("Align text center"),align:"center"},{icon:Bg,title:(0,h.__)("Align text right"),align:"right"}],xg={position:"bottom right",isAlternate:!0};var Tg=function(e){let{value:t,onChange:n,alignmentControls:o=Ig,label:r=(0,h.__)("Align"),describedBy:l=(0,h.__)("Change text alignment"),isCollapsed:a=!0,isToolbar:c}=e;function d(e){return()=>n(t===e?void 0:e)}const m=(0,u.find)(o,(e=>e.align===t)),f=c?p.ToolbarGroup:p.ToolbarDropdownMenu,g=c?{isCollapsed:a}:{};return(0,s.createElement)(f,i({icon:m?m.icon:(0,h.isRTL)()?Bg:Sg,label:r,toggleProps:{describedBy:l},popoverProps:xg,controls:o.map((e=>{const{align:n}=e,o=t===n;return{...e,isActive:o,role:a?"menuitemradio":void 0,onClick:d(n)}}))},g))};function Ng(e){return(0,s.createElement)(Tg,i({},e,{isToolbar:!1}))}function Pg(e){return(0,s.createElement)(Tg,i({},e,{isToolbar:!0}))}var Mg={name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems(e){const{rootClientId:t,selectedBlockName:n}=(0,m.useSelect)((e=>{const{getSelectedBlockClientId:t,getBlockName:n,getBlockInsertionPoint:o}=e(Vn),r=t();return{selectedBlockName:r?n(r):null,rootClientId:o().rootClientId}}),[]),[o,r,l]=wu(t,u.noop),i=(0,s.useMemo)((()=>(e.trim()?Yu(o,r,l,e):(0,u.orderBy)(o,["frecency"],["desc"])).filter((e=>e.name!==n)).slice(0,9)),[e,n,o,r,l]);return[(0,s.useMemo)((()=>i.map((e=>{const{title:t,icon:n,isDisabled:o}=e;return{key:`block-${e.id}`,value:e,label:(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Ua,{key:"icon",icon:n,showColors:!0}),t),isDisabled:o}}))),[i])]},allowContext:(e,t)=>!(/\S/.test(e)||/\S/.test(t)),getOptionCompletion(e){const{name:t,initialAttributes:n,innerBlocks:o}=e;return{action:"replace",value:(0,r.createBlock)(t,n,(0,r.createBlocksFromInnerBlocksTemplate)(o))}}};const Rg=[];function Lg(e){let{completers:t=Rg}=e;const{name:n}=Wn();return(0,s.useMemo)((()=>{let e=t;return(n===(0,r.getDefaultBlockName)()||(0,r.getBlockSupport)(n,"__experimentalSlashInserter",!1))&&(e=e.concat([Mg])),(0,l.hasFilter)("editor.Autocomplete.completers")&&(e===t&&(e=e.map(u.clone)),e=(0,l.applyFilters)("editor.Autocomplete.completers",e,n)),e}),[t,n])}var Ag=function(e){return(0,s.createElement)(p.Autocomplete,i({},e,{completers:Lg(e)}))},Dg=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M4.2 9h1.5V5.8H9V4.2H4.2V9zm14 9.2H15v1.5h4.8V15h-1.5v3.2zM15 4.2v1.5h3.2V9h1.5V4.2H15zM5.8 15H4.2v4.8H9v-1.5H5.8V15z"})),Og=function(e){let{isActive:t,label:n=(0,h.__)("Toggle full height"),onToggle:o,isDisabled:r}=e;return(0,s.createElement)(p.ToolbarButton,{isActive:t,icon:Dg,label:n,onClick:()=>o(!t),disabled:r})},Fg=function(e){const{label:t=(0,h.__)("Change matrix alignment"),onChange:n=u.noop,value:o="center",isDisabled:r}=e,l=(0,s.createElement)(p.__experimentalAlignmentMatrixControl.Icon,{value:o}),i="block-editor-block-alignment-matrix-control",a=`${i}__popover`;return(0,s.createElement)(p.Dropdown,{position:"bottom right",className:i,popoverProps:{className:a,isAlternate:!0},renderToggle:e=>{let{onToggle:n,isOpen:o}=e;return(0,s.createElement)(p.ToolbarButton,{onClick:n,"aria-haspopup":"true","aria-expanded":o,onKeyDown:e=>{o||e.keyCode!==va.DOWN||(e.preventDefault(),n())},label:t,icon:l,showTooltip:!0,disabled:r})},renderContent:()=>(0,s.createElement)(p.__experimentalAlignmentMatrixControl,{hasFocusBorder:!1,onChange:n,value:o})})},zg=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"})),Vg=function(e){let{rootLabelText:t}=e;const{selectBlock:n,clearSelectedBlock:o}=(0,m.useDispatch)(Vn),{clientId:r,parents:l,hasSelection:i}=(0,m.useSelect)((e=>{const{getSelectionStart:t,getSelectedBlockClientId:n,getBlockParents:o}=e(Vn),r=n();return{parents:o(r),clientId:r,hasSelection:!!t().clientId}}),[]),a=t||(0,h.__)("Document");return(0,s.createElement)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":(0,h.__)("Block breadcrumb")},(0,s.createElement)("li",{className:i?void 0:"block-editor-block-breadcrumb__current","aria-current":i?void 0:"true"},i&&(0,s.createElement)(p.Button,{className:"block-editor-block-breadcrumb__button",variant:"tertiary",onClick:o},a),!i&&a,!!r&&(0,s.createElement)(wo,{icon:zg,className:"block-editor-block-breadcrumb__separator"})),l.map((e=>(0,s.createElement)("li",{key:e},(0,s.createElement)(p.Button,{className:"block-editor-block-breadcrumb__button",variant:"tertiary",onClick:()=>n(e)},(0,s.createElement)(Ld,{clientId:e})),(0,s.createElement)(wo,{icon:zg,className:"block-editor-block-breadcrumb__separator"})))),!!r&&(0,s.createElement)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true"},(0,s.createElement)(Ld,{clientId:r})))};function Hg(e){let{clientId:t,tagName:n="div",wrapperProps:o,className:r}=e;const[l,a]=(0,s.useState)(!0),[u,d]=(0,s.useState)(!1),{isParentSelected:p,hasChildSelected:f,isDraggingBlocks:h,isParentHighlighted:g}=(0,m.useSelect)((e=>{const{isBlockSelected:n,hasSelectedInnerBlock:o,isDraggingBlocks:r,isBlockHighlighted:l}=e(Vn);return{isParentSelected:n(t),hasChildSelected:o(t,!0),isDraggingBlocks:r(),isParentHighlighted:l(t)}}),[t]),v=c()("block-editor-block-content-overlay",null==o?void 0:o.className,r,{"overlay-active":l,"parent-highlighted":g,"is-dragging-blocks":h});return(0,s.useEffect)((()=>{p||f||l||a(!0),p&&!u&&l&&a(!1),f&&l&&a(!1)}),[p,f,l,u]),(0,s.createElement)(n,i({},o,{className:v,onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),onMouseUp:l?()=>a(!1):void 0}),null==o?void 0:o.children)}const Ug=()=>(0,s.createElement)(p.SVG,{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 20 20"},(0,s.createElement)(p.Path,{d:"M7.434 5l3.18 9.16H8.538l-.692-2.184H4.628l-.705 2.184H2L5.18 5h2.254zm-1.13 1.904h-.115l-1.148 3.593H7.44L6.304 6.904zM14.348 7.006c1.853 0 2.9.876 2.9 2.374v4.78h-1.79v-.914h-.114c-.362.64-1.123 1.022-2.031 1.022-1.346 0-2.292-.826-2.292-2.108 0-1.27.972-2.006 2.71-2.107l1.696-.102V9.38c0-.584-.42-.914-1.18-.914-.667 0-1.112.228-1.264.647h-1.701c.12-1.295 1.307-2.107 3.066-2.107zm1.079 4.1l-1.416.09c-.793.056-1.18.342-1.18.844 0 .52.45.837 1.091.837.857 0 1.505-.545 1.505-1.256v-.515z"})),Gg=e=>{let{style:t,className:n}=e;return(0,s.createElement)("div",{className:"block-library-colors-selector__icon-container"},(0,s.createElement)("div",{className:`${n} block-library-colors-selector__state-selection`,style:t},(0,s.createElement)(Ug,null)))},Wg=e=>{let{TextColor:t,BackgroundColor:n}=e;return e=>{let{onToggle:o,isOpen:r}=e;return(0,s.createElement)(p.ToolbarGroup,null,(0,s.createElement)(p.ToolbarButton,{className:"components-toolbar__control block-library-colors-selector__toggle",label:(0,h.__)("Open Colors Selector"),onClick:o,onKeyDown:e=>{r||e.keyCode!==va.DOWN||(e.preventDefault(),o())},icon:(0,s.createElement)(n,null,(0,s.createElement)(t,null,(0,s.createElement)(Gg,null)))}))}};var $g=e=>{let{children:t,...n}=e;return(0,s.createElement)(p.Dropdown,{position:"bottom right",className:"block-library-colors-selector",contentClassName:"block-library-colors-selector__popover",renderToggle:Wg(n),renderContent:()=>t})},jg=(0,s.createElement)(F.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(F.Path,{d:"M13.8 5.2H3v1.5h10.8V5.2zm-3.6 12v1.5H21v-1.5H10.2zm7.2-6H6.6v1.5h10.8v-1.5z"}));const Kg=na(p.__experimentalTreeGridRow);function qg(e){let{isSelected:t,position:n,level:o,rowCount:r,children:l,className:a,path:u,...d}=e;const p=la({isSelected:t,adjustScrolling:!1,enableAnimation:!0,triggerAnimationOnChange:u});return(0,s.createElement)(Kg,i({ref:p,className:c()("block-editor-list-view-leaf",a),level:o,positionInSet:n,setSize:r},d),l)}function Yg(e){let{onClick:t}=e;return(0,s.createElement)("span",{className:"block-editor-list-view__expander",onClick:e=>t(e,{forceToggle:!0}),"aria-hidden":"true"},(0,s.createElement)(wo,{icon:zg}))}var Zg=(0,s.forwardRef)((function e(t,n){let{className:o,block:{clientId:r},isSelected:l,onClick:i,onToggleExpanded:a,position:u,siblingBlockCount:m,level:f,tabIndex:g,onFocus:v,onDragStart:b,onDragEnd:k,draggable:_}=t;const y=Rd(r),E=`list-view-block-select-button__${(0,d.useInstanceId)(e)}`,C=((e,t,n)=>(0,h.sprintf)(
67
  /* translators: 1: The numerical position of the block. 2: The total number of blocks. 3. The level of nesting for the block. */
68
- (0,h.__)("Block %1$d of %2$d, Level %3$d"),e,t,n))(u,m,f);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.Button,{className:c()("block-editor-list-view-block-select-button",o),onClick:i,"aria-describedby":E,ref:n,tabIndex:g,onFocus:v,onDragStart:b,onDragEnd:k,draggable:_},(0,s.createElement)(Yg,{onClick:a}),(0,s.createElement)(Ua,{icon:null==y?void 0:y.icon,showColors:!0}),(0,s.createElement)(Ld,{clientId:r}),(null==y?void 0:y.anchor)&&(0,s.createElement)("span",{className:"block-editor-list-view-block-select-button__anchor"},y.anchor),l&&(0,s.createElement)(p.VisuallyHidden,null,(0,h.__)("(selected block)"))),(0,s.createElement)("div",{className:"block-editor-list-view-block-select-button__description",id:E},C))})),Xg=(0,s.forwardRef)(((e,t)=>{let{onClick:n,onToggleExpanded:o,block:r,isSelected:l,position:a,siblingBlockCount:u,level:d,...p}=e;const{clientId:f}=r,{blockMovingClientId:h,selectedBlockInBlockEditor:g}=(0,m.useSelect)((e=>{const{getBlockRootClientId:t,hasBlockMovingClientId:n,getSelectedBlockClientId:o}=e(Vn);return{rootClientId:t(f)||"",blockMovingClientId:n(),selectedBlockInBlockEditor:o()}}),[f]),v=h&&g===f,b=c()("block-editor-list-view-block-contents",{"is-dropping-before":v});return(0,s.createElement)(Ad,{clientIds:[r.clientId]},(e=>{let{draggable:c,onDragStart:m,onDragEnd:f}=e;return(0,s.createElement)(Zg,i({ref:t,className:b,block:r,onClick:n,onToggleExpanded:o,isSelected:l,position:a,siblingBlockCount:u,level:d,draggable:c,onDragStart:m,onDragEnd:f},p))}))}));const Qg=(0,s.createContext)({__experimentalFeatures:!1,__experimentalPersistentListViewFeatures:!1}),Jg=()=>(0,s.useContext)(Qg);var ev=(0,s.memo)((function(e){let{block:t,isDragged:n,isSelected:o,isBranchSelected:r,selectBlock:l,position:i,level:a,rowCount:u,siblingBlockCount:d,showBlockMovers:f,path:h,isExpanded:g}=e;const v=(0,s.useRef)(null),[b,k]=(0,s.useState)(!1),{clientId:_}=t,{toggleBlockHighlight:y}=(0,m.useDispatch)(Vn),{__experimentalFeatures:E,__experimentalPersistentListViewFeatures:C,__experimentalHideContainerBlockActions:S,isTreeGridMounted:w,expand:B,collapse:I}=Jg(),x=f&&d>0,T=c()("block-editor-list-view-block__mover-cell",{"is-visible":b||o}),N=c()("block-editor-list-view-block__menu-cell",{"is-visible":b||o});(0,s.useEffect)((()=>{C&&!w&&o&&v.current.focus()}),[]);const P=C?y:()=>{},M=(0,s.useCallback)((()=>{k(!0),P(_,!0)}),[_,k,P]),R=(0,s.useCallback)((()=>{k(!1),P(_,!1)}),[_,k,P]),L=(0,s.useCallback)((e=>{e.stopPropagation(),l(_)}),[_,l]),A=(0,s.useCallback)((e=>{e.stopPropagation(),!0===g?I(_):!1===g&&B(_)}),[_,B,I,g]),D=E&&(!S||S&&a>1),O=E&&!D;let F;x?F=2:O&&(F=3);const z=c()({"is-selected":o,"is-branch-selected":C&&r,"is-dragging":n,"has-single-cell":O});return(0,s.createElement)(qg,{className:z,onMouseEnter:M,onMouseLeave:R,onFocus:M,onBlur:R,level:a,position:i,rowCount:u,path:h,id:`list-view-block-${_}`,"data-block":_,isExpanded:g},(0,s.createElement)(p.__experimentalTreeGridCell,{className:"block-editor-list-view-block__contents-cell",colSpan:F,ref:v},(e=>{let{ref:n,tabIndex:r,onFocus:l}=e;return(0,s.createElement)("div",{className:"block-editor-list-view-block__contents-container"},(0,s.createElement)(Xg,{block:t,onClick:L,onToggleExpanded:A,isSelected:o,position:i,siblingBlockCount:d,level:a,ref:n,tabIndex:r,onFocus:l}))})),x&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.__experimentalTreeGridCell,{className:T,withoutGridItem:!0},(0,s.createElement)(p.__experimentalTreeGridItem,null,(e=>{let{ref:t,tabIndex:n,onFocus:o}=e;return(0,s.createElement)(jd,{orientation:"vertical",clientIds:[_],ref:t,tabIndex:n,onFocus:o})})),(0,s.createElement)(p.__experimentalTreeGridItem,null,(e=>{let{ref:t,tabIndex:n,onFocus:o}=e;return(0,s.createElement)(Kd,{orientation:"vertical",clientIds:[_],ref:t,tabIndex:n,onFocus:o})})))),D&&(0,s.createElement)(p.__experimentalTreeGridCell,{className:N},(e=>{let{ref:t,tabIndex:n,onFocus:o}=e;return(0,s.createElement)(Fp,{clientIds:[_],icon:_p,toggleProps:{ref:t,className:"block-editor-list-view-block__menu",tabIndex:n,onFocus:o},disableOpenOnArrowDown:!0,__experimentalSelectBlock:L})})))}));function tv(e,t,n){var o;return(null==n?void 0:n.includes(e.clientId))?0:null===(o=t[e.clientId])||void 0===o||o?1+e.innerBlocks.reduce(nv(t,n),0):1}const nv=(e,t)=>(n,o)=>{var r;return(null==t?void 0:t.includes(o.clientId))?n:(null===(r=e[o.clientId])||void 0===r||r)&&o.innerBlocks.length>0?n+tv(o,e,t):n+1};function ov(e){const{blocks:t,selectBlock:n,showBlockMovers:o,showNestedBlocks:r,selectedClientIds:l,level:i=1,path:a="",isBranchSelected:c=!1,listPosition:d=0,fixedListWindow:p}=e,{expandedState:f,draggedClientIds:h,__experimentalPersistentListViewFeatures:g}=Jg(),v=(0,u.compact)(t),b=v.length;let k=d;return(0,s.createElement)(s.Fragment,null,v.map(((e,t)=>{var d;const{clientId:_,innerBlocks:y}=e;t>0&&(k+=tv(v[t-1],f,h));const E=g,{itemInView:C}=p,S=!E||C(k),w=t+1,B=a.length>0?`${a}_${w}`:`${w}`,I=r&&!!y&&!!y.length,x=I?null===(d=f[_])||void 0===d||d:void 0,T=!(null==h||!h.includes(_)),N=T||S,P=((e,t)=>(0,u.isArray)(t)&&t.length?-1!==t.indexOf(e):t===e)(_,l),M=c||P&&I;return(0,s.createElement)(m.AsyncModeProvider,{key:_,value:!P},N&&(0,s.createElement)(ev,{block:e,selectBlock:n,isSelected:P,isBranchSelected:M,isDragged:T,level:i,position:w,rowCount:b,siblingBlockCount:b,showBlockMovers:o,path:B,isExpanded:x,listPosition:k}),!N&&(0,s.createElement)("tr",null,(0,s.createElement)("td",{className:"block-editor-list-view-placeholder"})),I&&x&&!T&&(0,s.createElement)(ov,{blocks:y,selectBlock:n,showBlockMovers:o,showNestedBlocks:r,level:i+1,path:B,listPosition:k+1,fixedListWindow:p,isBranchSelected:M,selectedClientIds:l}))})))}ov.defaultProps={selectBlock:()=>{}};var rv=(0,s.memo)(ov);function lv(e){let{listViewRef:t,blockDropTarget:n}=e;const{rootClientId:o,clientId:r,dropPosition:l}=n||{},[i,a]=(0,s.useMemo)((()=>t.current?[o?t.current.querySelector(`[data-block="${o}"]`):void 0,r?t.current.querySelector(`[data-block="${r}"]`):void 0]:[]),[o,r]),c=a||i,u=(0,s.useCallback)((()=>{if(!i)return 0;const e=c.getBoundingClientRect();return i.querySelector(".block-editor-block-icon").getBoundingClientRect().right-e.left}),[i,c]),d=(0,s.useMemo)((()=>{if(!c)return{};const e=u();return{width:c.offsetWidth-e}}),[u,c]),m=(0,s.useCallback)((()=>{if(!c)return{};const e=c.ownerDocument,t=c.getBoundingClientRect(),n=u(),o={left:t.left+n,right:t.right,width:0,height:t.height,ownerDocument:e};return"top"===l?{...o,top:t.top,bottom:t.top}:"bottom"===l||"inside"===l?{...o,top:t.bottom,bottom:t.bottom}:{}}),[c,l,u]);return c?(0,s.createElement)(p.Popover,{noArrow:!0,animate:!1,getAnchorRect:m,focusOnMount:!1,className:"block-editor-list-view-drop-indicator"},(0,s.createElement)("div",{style:d,className:"block-editor-list-view-drop-indicator__line"})):null}function iv(e,t){return t.left<=e.x&&t.right>=e.x&&t.top<=e.y&&t.bottom>=e.y}const sv=["top","bottom"];const av=()=>{},cv=(e,t)=>{switch(t.type){case"expand":return{...e,[t.clientId]:!0};case"collapse":return{...e,[t.clientId]:!1};default:return e}};var uv=(0,s.forwardRef)((function(e,t){let{blocks:n,onSelect:o=av,__experimentalFeatures:r,__experimentalPersistentListViewFeatures:l,__experimentalHideContainerBlockActions:a,showNestedBlocks:c,showBlockMovers:u,...f}=e;const{clientIdsTree:g,draggedClientIds:v,selectedClientIds:b}=function(e){return(0,m.useSelect)((t=>{const{getDraggedBlockClientIds:n,getSelectedBlockClientIds:o,__unstableGetClientIdsTree:r}=t(Vn);return{selectedClientIds:o(),draggedClientIds:n(),clientIdsTree:e||r()}}),[e])}(n),{selectBlock:k}=(0,m.useDispatch)(Vn),{visibleBlockCount:_}=(0,m.useSelect)((e=>{const{getGlobalBlockCount:t,getClientIdsOfDescendants:n}=e(Vn),o=(null==v?void 0:v.length)>0?n(v).length+1:0;return{visibleBlockCount:t()-o}}),[v]),y=(0,s.useCallback)((e=>{k(e),o(e)}),[k,o]),[E,C]=(0,s.useReducer)(cv,{}),{ref:S,target:w}=function(){const{getBlockRootClientId:e,getBlockIndex:t,getBlockCount:n,getDraggedBlockClientIds:o,canInsertBlocks:r}=(0,m.useSelect)(Vn),[l,i]=(0,s.useState)(),{rootClientId:a,blockIndex:c}=l||{},u=Jp(a,c),p=o(),f=(0,d.useThrottle)((0,s.useCallback)(((o,l)=>{const s={x:o.clientX,y:o.clientY},a=!(null==p||!p.length),c=function(e,t){let n,o,r,l;for(const i of e){if(i.isDraggedBlock)continue;const s=i.element.getBoundingClientRect(),[a,c]=tm(t,s,sv),u=iv(t,s);if(void 0===r||a<r||u){r=a;const t=e.indexOf(i),d=e[t-1];if("top"===c&&d&&d.rootClientId===i.rootClientId&&!d.isDraggedBlock?(o=d,n="bottom",l=d.element.getBoundingClientRect()):(o=i,n=c,l=s),u)break}}if(!o)return;const i="bottom"===n;if(i&&o.canInsertDraggedBlocksAsChild&&(o.innerBlockCount>0||function(e,t){const n=t.left+t.width/2;return e.x>n}(t,l)))return{rootClientId:o.clientId,blockIndex:0,dropPosition:"inside"};if(!o.canInsertDraggedBlocksAsSibling)return;const s=i?1:0;return{rootClientId:o.rootClientId,clientId:o.clientId,blockIndex:o.blockIndex+s,dropPosition:n}}(Array.from(l.querySelectorAll("[data-block]")).map((o=>{const l=o.dataset.block,i=e(l);return{clientId:l,rootClientId:i,blockIndex:t(l,i),element:o,isDraggedBlock:!!a&&p.includes(l),innerBlockCount:n(l),canInsertDraggedBlocksAsSibling:!a||r(p,i),canInsertDraggedBlocksAsChild:!a||r(p,l)}})),s);c&&i(c)}),[p]),200);return{ref:(0,d.__experimentalUseDropZone)({onDrop:u,onDragOver(e){f(e,e.currentTarget)},onDragEnd(){f.cancel(),i(null)}}),target:l}}(),B=(0,s.useRef)(),I=(0,d.useMergeRefs)([B,S,t]),x=(0,s.useRef)(!1);(0,s.useEffect)((()=>{x.current=!0}),[]);const[T]=(0,d.__experimentalUseFixedWindowList)(B,36,_,{useWindowing:l,windowOverscan:40}),N=(0,s.useCallback)((e=>{e&&C({type:"expand",clientId:e})}),[C]),P=(0,s.useCallback)((e=>{e&&C({type:"collapse",clientId:e})}),[C]),M=(0,s.useCallback)((e=>{var t;N(null==e||null===(t=e.dataset)||void 0===t?void 0:t.block)}),[N]),R=(0,s.useCallback)((e=>{var t;P(null==e||null===(t=e.dataset)||void 0===t?void 0:t.block)}),[P]),L=(0,s.useMemo)((()=>({__experimentalFeatures:r,__experimentalPersistentListViewFeatures:l,__experimentalHideContainerBlockActions:a,isTreeGridMounted:x.current,draggedClientIds:v,expandedState:E,expand:N,collapse:P})),[r,l,a,x.current,v,E,N,P]);return(0,s.createElement)(m.AsyncModeProvider,{value:!0},(0,s.createElement)(lv,{listViewRef:B,blockDropTarget:w}),(0,s.createElement)(p.__experimentalTreeGrid,{className:"block-editor-list-view-tree","aria-label":(0,h.__)("Block navigation structure"),ref:I,onCollapseRow:R,onExpandRow:M},(0,s.createElement)(Qg.Provider,{value:L},(0,s.createElement)(rv,i({blocks:g,selectBlock:y,showNestedBlocks:c,showBlockMovers:u,fixedListWindow:T,selectedClientIds:b},f)))))}));function dv(e){let{isEnabled:t,onToggle:n,isOpen:o,innerRef:r,...l}=e;return(0,s.createElement)(p.Button,i({},l,{ref:r,icon:jg,"aria-expanded":o,"aria-haspopup":"true",onClick:t?n:void 0
69
- /* translators: button label text should, if possible, be under 16 characters. */,label:(0,h.__)("List view"),className:"block-editor-block-navigation","aria-disabled":!t}))}var pv=(0,s.forwardRef)((function(e,t){let{isDisabled:n,__experimentalFeatures:o,...r}=e;const l=(0,m.useSelect)((e=>!!e(Vn).getBlockCount()),[])&&!n;return(0,s.createElement)(p.Dropdown,{contentClassName:"block-editor-block-navigation__popover",position:"bottom right",renderToggle:e=>{let{isOpen:n,onToggle:o}=e;return(0,s.createElement)(dv,i({},r,{innerRef:t,isOpen:n,onToggle:o,isEnabled:l}))},renderContent:()=>(0,s.createElement)("div",{className:"block-editor-block-navigation__container"},(0,s.createElement)("p",{className:"block-editor-block-navigation__label"},(0,h.__)("List view")),(0,s.createElement)(uv,{showNestedBlocks:!0,__experimentalFeatures:o}))})}));function mv(e){let{genericPreviewBlock:t,style:n,className:o,activeStyle:r}=e;const l=sp(o,r,n),i=(0,s.useMemo)((()=>({...t,title:n.label||n.name,description:n.description,initialAttributes:{...t.attributes,className:l+" block-editor-block-styles__block-preview-container"}})),[t,l]);return(0,s.createElement)(mu,{item:i,isStylePreview:!0})}function fv(e){let{children:t,scope:n,...o}=e;return(0,s.createElement)(p.Fill,{name:`BlockStylesPreviewPanel/${n}`},(0,s.createElement)("div",o,t))}function hv(e){let{clientId:t,onSwitch:n=u.noop,onHoverClassName:o=u.noop,scope:r}=e;const{onSelect:l,stylesToRender:i,activeStyle:a,genericPreviewBlock:m,className:f}=cp({clientId:t,onSwitch:n}),[h,g]=(0,s.useState)(null),[v,b]=(0,s.useState)(0),k=(0,d.useViewportMatch)("medium","<");if((0,s.useLayoutEffect)((()=>{const e=document.querySelector(".interface-interface-skeleton__content"),t=(null==e?void 0:e.scrollTop)||0;b(t+16)}),[h]),!i||0===i.length)return null;const _=(0,u.debounce)(g,250),y=e=>{l(e),o(null),g(null),_.cancel()},E=e=>{var t;h!==e?(_(e),o(null!==(t=null==e?void 0:e.name)&&void 0!==t?t:null)):_.cancel()};return(0,s.createElement)("div",{className:"block-editor-block-styles"},(0,s.createElement)("div",{className:"block-editor-block-styles__variants"},i.map((e=>{const t=e.label||e.name;return(0,s.createElement)(p.Button,{className:c()("block-editor-block-styles__item",{"is-active":a.name===e.name}),key:e.name,variant:"secondary",label:t,onMouseEnter:()=>E(e),onFocus:()=>E(e),onMouseLeave:()=>E(null),onBlur:()=>E(null),onKeyDown:t=>{va.ENTER!==t.keyCode&&va.SPACE!==t.keyCode||(t.preventDefault(),y(e))},onClick:()=>y(e),role:"button",tabIndex:"0"},(0,s.createElement)(p.__experimentalText,{as:"span",limit:12,ellipsizeMode:"tail",className:"block-editor-block-styles__item-text",truncate:!0},t))}))),h&&!k&&(0,s.createElement)(fv,{scope:r,className:"block-editor-block-styles__preview-panel",style:{top:v},onMouseLeave:()=>E(null)},(0,s.createElement)(mv,{activeStyle:a,className:f,genericPreviewBlock:m,style:h})))}hv.Slot=function(e){let{scope:t}=e;return(0,s.createElement)(p.Slot,{name:`BlockStylesPreviewPanel/${t}`})};var gv=hv,vv=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})),bv=function(e){let{icon:t=vv,label:n=(0,h.__)("Choose variation"),instructions:o=(0,h.__)("Select a variation to start with."),variations:r,onSelect:l,allowSkip:i}=e;const a=c()("block-editor-block-variation-picker",{"has-many-variations":r.length>4});return(0,s.createElement)(p.Placeholder,{icon:t,label:n,instructions:o,className:a},(0,s.createElement)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":(0,h.__)("Block variations")},r.map((e=>(0,s.createElement)("li",{key:e.name},(0,s.createElement)(p.Button,{variant:"secondary",icon:e.icon,iconSize:48,onClick:()=>l(e),className:"block-editor-block-variation-picker__variation",label:e.description||e.title}),(0,s.createElement)("span",{className:"block-editor-block-variation-picker__variation-label",role:"presentation"},e.title))))),i&&(0,s.createElement)("div",{className:"block-editor-block-variation-picker__skip"},(0,s.createElement)(p.Button,{variant:"link",onClick:()=>l()},(0,h.__)("Skip"))))},kv=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7.8 16.5H5c-.3 0-.5-.2-.5-.5v-6.2h6.8v6.7zm0-8.3H4.5V5c0-.3.2-.5.5-.5h6.2v6.7zm8.3 7.8c0 .3-.2.5-.5.5h-6.2v-6.8h6.8V19zm0-7.8h-6.8V4.5H19c.3 0 .5.2.5.5v6.2z",fillRule:"evenodd",clipRule:"evenodd"}));const _v="carousel",yv="grid",Ev=e=>{let{onStartBlank:t,onBlockPatternSelect:n}=e;return(0,s.createElement)("div",{className:"block-editor-block-pattern-setup__actions"},(0,s.createElement)(p.Button,{onClick:t},(0,h.__)("Start blank")),(0,s.createElement)(p.Button,{variant:"primary",onClick:n},(0,h.__)("Choose")))},Cv=e=>{let{handlePrevious:t,handleNext:n,activeSlide:o,totalSlides:r}=e;return(0,s.createElement)("div",{className:"block-editor-block-pattern-setup__navigation"},(0,s.createElement)(p.Button,{icon:Vd,label:(0,h.__)("Previous pattern"),onClick:t,disabled:0===o}),(0,s.createElement)(p.Button,{icon:zd,label:(0,h.__)("Next pattern"),onClick:n,disabled:o===r-1}))};var Sv=e=>{let{viewMode:t,setViewMode:n,handlePrevious:o,handleNext:r,activeSlide:l,totalSlides:i,onBlockPatternSelect:a,onStartBlank:c}=e;const u=t===_v,d=(0,s.createElement)("div",{className:"block-editor-block-pattern-setup__display-controls"},(0,s.createElement)(p.Button,{icon:no,label:(0,h.__)("Carousel view"),onClick:()=>n(_v),isPressed:u}),(0,s.createElement)(p.Button,{icon:kv,label:(0,h.__)("Grid view"),onClick:()=>n(yv),isPressed:t===yv}));return(0,s.createElement)("div",{className:"block-editor-block-pattern-setup__toolbar"},u&&(0,s.createElement)(Cv,{handlePrevious:o,handleNext:r,activeSlide:l,totalSlides:i}),d,u&&(0,s.createElement)(Ev,{onBlockPatternSelect:a,onStartBlank:c}))};const wv=e=>{let{viewMode:t,activeSlide:n,patterns:o,onBlockPatternSelect:r}=e;const l=(0,p.__unstableUseCompositeState)(),a="block-editor-block-pattern-setup__container";if(t===_v){const e=new Map([[n,"active-slide"],[n-1,"previous-slide"],[n+1,"next-slide"]]);return(0,s.createElement)("div",{className:a},(0,s.createElement)("ul",{className:"carousel-container"},o.map(((t,n)=>(0,s.createElement)(Iv,{className:e.get(n)||"",key:t.name,pattern:t})))))}return(0,s.createElement)(p.__unstableComposite,i({},l,{role:"listbox",className:a,"aria-label":(0,h.__)("Patterns list")}),o.map((e=>(0,s.createElement)(Bv,{key:e.name,pattern:e,onSelect:r,composite:l}))))};function Bv(e){let{pattern:t,onSelect:n,composite:o}=e;const r="block-editor-block-pattern-setup-list",{blocks:l,title:a,description:c,viewportWidth:u=700}=t,m=(0,d.useInstanceId)(Bv,`${r}__item-description`);return(0,s.createElement)("div",{className:`${r}__list-item`,"aria-label":t.title,"aria-describedby":t.description?m:void 0},(0,s.createElement)(p.__unstableCompositeItem,i({role:"option",as:"div"},o,{className:`${r}__item`,onClick:()=>n(l)}),(0,s.createElement)(pu,{blocks:l,viewportWidth:u}),(0,s.createElement)("div",{className:`${r}__item-title`},a)),!!c&&(0,s.createElement)(p.VisuallyHidden,{id:m},c))}function Iv(e){let{className:t,pattern:n}=e;const{blocks:o,title:r,description:l}=n,i=(0,d.useInstanceId)(Iv,"block-editor-block-pattern-setup-list__item-description");return(0,s.createElement)("li",{className:`pattern-slide ${t}`,"aria-label":r,"aria-describedby":l?i:void 0},(0,s.createElement)(pu,{blocks:o,__experimentalLive:!0}),!!l&&(0,s.createElement)(p.VisuallyHidden,{id:i},l))}var xv=e=>{let{clientId:t,blockName:n,filterPatternsFn:o,startBlankComponent:l,onBlockPatternSelect:i}=e;const[a,c]=(0,s.useState)(_v),[u,d]=(0,s.useState)(0),[p,f]=(0,s.useState)(!1),{replaceBlock:h}=(0,m.useDispatch)(Vn),g=function(e,t,n){return(0,m.useSelect)((o=>{const{getBlockRootClientId:r,__experimentalGetPatternsByBlockTypes:l,__experimentalGetAllowedPatterns:i}=o(Vn),s=r(e);return n?i(s).filter(n):l(t,s)}),[e,t,n])}(t,n,o);if(null==g||!g.length||p)return l;const v=i||(e=>{const n=e.map((e=>(0,r.cloneBlock)(e)));h(t,n)});return(0,s.createElement)("div",{className:`block-editor-block-pattern-setup view-mode-${a}`},(0,s.createElement)(Sv,{viewMode:a,setViewMode:c,activeSlide:u,totalSlides:g.length,handleNext:()=>{d((e=>e+1))},handlePrevious:()=>{d((e=>e-1))},onBlockPatternSelect:()=>{v(g[u].blocks)},onStartBlank:()=>{f(!0)}}),(0,s.createElement)(wv,{viewMode:a,activeSlide:u,patterns:g,onBlockPatternSelect:v}))};const Tv=(e,t)=>{if(!t||!e)return;const n=t.filter((t=>{let{attributes:n}=t;return!(!n||!Object.keys(n).length)&&(0,u.isMatch)(e,n)}));return 1===n.length?n[0]:void 0};var Nv=function(e){let{blockClientId:t}=e;const[n,o]=(0,s.useState)(),{updateBlockAttributes:l}=(0,m.useDispatch)(Vn),{variations:i,blockAttributes:a}=(0,m.useSelect)((e=>{const{getBlockVariations:n}=e(r.store),{getBlockName:o,getBlockAttributes:l}=e(Vn),i=t&&o(t);return{variations:i&&n(i,"transform"),blockAttributes:l(t)}}),[t]);if((0,s.useEffect)((()=>{var e;o(null===(e=Tv(a,i))||void 0===e?void 0:e.name)}),[a,i]),null==i||!i.length)return null;const c=i.map((e=>{let{name:t,title:n,description:o}=e;return{value:t,label:n,info:o}})),u=e=>{l(t,{...i.find((t=>{let{name:n}=t;return n===e})).attributes})},d="block-editor-block-variation-transforms";return(0,s.createElement)(p.DropdownMenu,{className:d,label:(0,h.__)("Transform to variation"),text:(0,h.__)("Transform to variation"),popoverProps:{position:"bottom center",className:`${d}__popover`},icon:Ud,toggleProps:{iconPosition:"right"}},(()=>(0,s.createElement)("div",{className:`${d}__container`},(0,s.createElement)(p.MenuGroup,null,(0,s.createElement)(p.MenuItemsChoice,{choices:c,value:n,onSelect:u})))))};const Pv=(0,s.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(p.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),Mv=(0,s.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(p.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})),Rv={top:{icon:(0,s.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(p.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),title:(0,h._x)("Align top","Block vertical alignment setting")},center:{icon:Mv,title:(0,h._x)("Align middle","Block vertical alignment setting")},bottom:{icon:Pv,title:(0,h._x)("Align bottom","Block vertical alignment setting")}},Lv=["top","center","bottom"],Av={isAlternate:!0};var Dv=function(e){let{value:t,onChange:n,controls:o=Lv,isCollapsed:r=!0,isToolbar:l}=e;const a=Rv[t],c=Rv.top,u=l?p.ToolbarGroup:p.ToolbarDropdownMenu,d=l?{isCollapsed:r}:{};return(0,s.createElement)(u,i({popoverProps:Av,icon:a?a.icon:c.icon,label:(0,h._x)("Change vertical alignment","Block vertical alignment setting label"),controls:o.map((e=>{return{...Rv[e],isActive:t===e,role:r?"menuitemradio":void 0,onClick:(o=e,()=>n(t===o?void 0:o))};var o}))},d))};function Ov(e){return(0,s.createElement)(Dv,i({},e,{isToolbar:!1}))}function Fv(e){return(0,s.createElement)(Dv,i({},e,{isToolbar:!0}))}var zv=(0,d.createHigherOrderComponent)((e=>t=>{const n=mo("color.palette"),o=!mo("color.custom"),r=void 0===t.colors?n:t.colors,l=void 0===t.disableCustomColors?o:t.disableCustomColors,a=!(0,u.isEmpty)(r)||!l;return(0,s.createElement)(e,i({},t,{colors:r,disableCustomColors:l,hasColorsToChoose:a}))}),"withColorContext"),Vv=zv(p.ColorPalette);function Hv(e){let{onChange:t,value:n,...o}=e;return(0,s.createElement)(bm,i({},o,{onColorChange:t,colorValue:n,gradients:[],disableCustomGradients:!0}))}var Uv=function(e,t){return(Uv=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},Gv=function(){return(Gv=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function Wv(e,t,n,o){void 0===o&&(o=0);var r=tb(e,t,o),l=r.width,i=r.height;return e>=t*n&&l>t*n?{width:t*n,height:t}:l>t*n?{width:e,height:e/n}:l>i*n?{width:i*n,height:i}:{width:l,height:l/n}}function $v(e,t,n,o,r){void 0===r&&(r=0);var l=tb(t.width,t.height,r),i=l.width,s=l.height;return{x:jv(e.x,i,n.width,o),y:jv(e.y,s,n.height,o)}}function jv(e,t,n,o){var r=t*o/2-n/2;return Math.min(r,Math.max(e,-r))}function Kv(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function qv(e,t){return 180*Math.atan2(t.y-e.y,t.x-e.x)/Math.PI}function Yv(e,t,n,o,r,l,i){void 0===l&&(l=0),void 0===i&&(i=!0);var s=i&&0===l?Zv:Xv,a={x:s(100,((t.width-n.width/r)/2-e.x/r)/t.width*100),y:s(100,((t.height-n.height/r)/2-e.y/r)/t.height*100),width:s(100,n.width/t.width*100/r),height:s(100,n.height/t.height*100/r)},c=Math.round(s(t.naturalWidth,a.width*t.naturalWidth/100)),u=Math.round(s(t.naturalHeight,a.height*t.naturalHeight/100)),d=t.naturalWidth>=t.naturalHeight*o?{width:Math.round(u*o),height:u}:{width:c,height:Math.round(c/o)};return{croppedAreaPercentages:a,croppedAreaPixels:Gv(Gv({},d),{x:Math.round(s(t.naturalWidth-d.width,a.x*t.naturalWidth/100)),y:Math.round(s(t.naturalHeight-d.height,a.y*t.naturalHeight/100))})}}function Zv(e,t){return Math.min(e,Math.max(0,t))}function Xv(e,t){return t}function Qv(e,t,n){var o=t.width/t.naturalWidth,r=function(e,t,n){var o=t.width/t.naturalWidth;if(n)return n.height>n.width?n.height/o/e.height:n.width/o/e.width;var r=e.width/e.height;return t.naturalWidth>=t.naturalHeight*r?t.naturalHeight/e.height:t.naturalWidth/e.width}(e,t,n),l=o*r;return{crop:{x:((t.naturalWidth-e.width)/2-e.x)*l,y:((t.naturalHeight-e.height)/2-e.y)*l},zoom:r}}function Jv(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function eb(e,t,n,o,r){var l=Math.cos,i=Math.sin,s=r*Math.PI/180;return[(e-n)*l(s)-(t-o)*i(s)+n,(e-n)*i(s)+(t-o)*l(s)+o]}function tb(e,t,n){var o=e/2,r=t/2,l=[eb(0,0,o,r,n),eb(e,0,o,r,n),eb(e,t,o,r,n),eb(0,t,o,r,n)],i=Math.min.apply(Math,l.map((function(e){return e[0]}))),s=Math.max.apply(Math,l.map((function(e){return e[0]}))),a=Math.min.apply(Math,l.map((function(e){return e[1]})));return{width:s-i,height:Math.max.apply(Math,l.map((function(e){return e[1]})))-a}}function nb(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter((function(e){return"string"==typeof e&&e.length>0})).join(" ").trim()}var ob=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.imageRef=null,n.videoRef=null,n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.state={cropSize:null,hasWheelJustStarted:!1},n.preventZoomSafari=function(e){return e.preventDefault()},n.cleanEvents=function(){document.removeEventListener("mousemove",n.onMouseMove),document.removeEventListener("mouseup",n.onDragStopped),document.removeEventListener("touchmove",n.onTouchMove),document.removeEventListener("touchend",n.onDragStopped)},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){n.computeSizes(),n.emitCropData(),n.setInitialCrop(),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(){var e=n.props,t=e.initialCroppedAreaPixels,o=e.cropSize;if(t){var r=Qv(t,n.mediaSize,o),l=r.crop,i=r.zoom;n.props.onCropChange(l),n.props.onZoomChange&&n.props.onZoomChange(i)}},n.computeSizes=function(){var e,t,o,r,l=n.imageRef||n.videoRef;if(l){n.mediaSize={width:l.offsetWidth,height:l.offsetHeight,naturalWidth:(null===(e=n.imageRef)||void 0===e?void 0:e.naturalWidth)||(null===(t=n.videoRef)||void 0===t?void 0:t.videoWidth)||0,naturalHeight:(null===(o=n.imageRef)||void 0===o?void 0:o.naturalHeight)||(null===(r=n.videoRef)||void 0===r?void 0:r.videoHeight)||0};var i=n.props.cropSize?n.props.cropSize:Wv(l.offsetWidth,l.offsetHeight,n.props.aspect,n.props.rotation);n.setState({cropSize:i},n.recomputeCropPosition)}n.containerRef&&(n.containerRect=n.containerRef.getBoundingClientRect())},n.onMouseDown=function(e){e.preventDefault(),document.addEventListener("mousemove",n.onMouseMove),document.addEventListener("mouseup",n.onDragStopped),n.onDragStart(t.getMousePoint(e))},n.onMouseMove=function(e){return n.onDrag(t.getMousePoint(e))},n.onTouchStart=function(e){e.preventDefault(),document.addEventListener("touchmove",n.onTouchMove,{passive:!1}),document.addEventListener("touchend",n.onDragStopped),2===e.touches.length?n.onPinchStart(e):1===e.touches.length&&n.onDragStart(t.getTouchPoint(e.touches[0]))},n.onTouchMove=function(e){e.preventDefault(),2===e.touches.length?n.onPinchMove(e):1===e.touches.length&&n.onDrag(t.getTouchPoint(e.touches[0]))},n.onDragStart=function(e){var t,o,r=e.x,l=e.y;n.dragStartPosition={x:r,y:l},n.dragStartCrop=Gv({},n.props.crop),null===(o=(t=n.props).onInteractionStart)||void 0===o||o.call(t)},n.onDrag=function(e){var t=e.x,o=e.y;n.rafDragTimeout&&window.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=window.requestAnimationFrame((function(){if(n.state.cropSize&&void 0!==t&&void 0!==o){var e=t-n.dragStartPosition.x,r=o-n.dragStartPosition.y,l={x:n.dragStartCrop.x+e,y:n.dragStartCrop.y+r},i=n.props.restrictPosition?$v(l,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):l;n.props.onCropChange(i)}}))},n.onDragStopped=function(){var e,t;n.cleanEvents(),n.emitCropData(),null===(t=(e=n.props).onInteractionEnd)||void 0===t||t.call(e)},n.onWheel=function(e){e.preventDefault();var o=t.getMousePoint(e),r=n.props.zoom-e.deltaY*n.props.zoomSpeed/200;n.setNewZoom(r,o),n.state.hasWheelJustStarted||n.setState({hasWheelJustStarted:!0},(function(){var e,t;return null===(t=(e=n.props).onInteractionStart)||void 0===t?void 0:t.call(e)})),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=window.setTimeout((function(){return n.setState({hasWheelJustStarted:!1},(function(){var e,t;return null===(t=(e=n.props).onInteractionEnd)||void 0===t?void 0:t.call(e)}))}),250)},n.getPointOnContainer=function(e){var t=e.x,o=e.y;if(!n.containerRect)throw new Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(t-n.containerRect.left),y:n.containerRect.height/2-(o-n.containerRect.top)}},n.getPointOnMedia=function(e){var t=e.x,o=e.y,r=n.props,l=r.crop,i=r.zoom;return{x:(t+l.x)/i,y:(o+l.y)/i}},n.setNewZoom=function(e,t){if(n.state.cropSize&&n.props.onZoomChange){var o=n.getPointOnContainer(t),r=n.getPointOnMedia(o),l=Math.min(n.props.maxZoom,Math.max(e,n.props.minZoom)),i={x:r.x*l-o.x,y:r.y*l-o.y},s=n.props.restrictPosition?$v(i,n.mediaSize,n.state.cropSize,l,n.props.rotation):i;n.props.onCropChange(s),n.props.onZoomChange(l)}},n.emitCropData=function(){if(n.state.cropSize){var e=Yv(n.props.restrictPosition?$v(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop,n.mediaSize,n.state.cropSize,n.getAspect(),n.props.zoom,n.props.rotation,n.props.restrictPosition),t=e.croppedAreaPercentages,o=e.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(t,o)}},n.recomputeCropPosition=function(){if(n.state.cropSize){var e=n.props.restrictPosition?$v(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;n.props.onCropChange(e),n.emitCropData()}},n}return function(e,t){function __(){this.constructor=e}Uv(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}(t,e),t.prototype.componentDidMount=function(){window.addEventListener("resize",this.computeSizes),this.containerRef&&(this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.preventZoomSafari),this.containerRef.addEventListener("gesturechange",this.preventZoomSafari)),this.props.disableAutomaticStylesInjection||(this.styleRef=document.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.styleRef.innerHTML=".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n user-select: none;\n touch-action: none;\n cursor: move;\n}\n\n.reactEasyCrop_Image,\n.reactEasyCrop_Video {\n max-width: 100%;\n max-height: 100%;\n margin: auto;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\n}\n\n.reactEasyCrop_CropArea {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n border: 1px solid rgba(255, 255, 255, 0.5);\n box-sizing: border-box;\n box-shadow: 0 0 0 9999em;\n color: rgba(0, 0, 0, 0.5);\n overflow: hidden;\n}\n\n.reactEasyCrop_CropAreaRound {\n border-radius: 50%;\n}\n\n.reactEasyCrop_CropAreaGrid::before {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 0;\n bottom: 0;\n left: 33.33%;\n right: 33.33%;\n border-top: 0;\n border-bottom: 0;\n}\n\n.reactEasyCrop_CropAreaGrid::after {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 33.33%;\n bottom: 33.33%;\n left: 0;\n right: 0;\n border-left: 0;\n border-right: 0;\n}\n",document.head.appendChild(this.styleRef)),this.imageRef&&this.imageRef.complete&&this.onMediaLoad()},t.prototype.componentWillUnmount=function(){window.removeEventListener("resize",this.computeSizes),this.containerRef&&(this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.containerRef.removeEventListener("gesturechange",this.preventZoomSafari)),this.styleRef&&this.styleRef.remove(),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent()},t.prototype.componentDidUpdate=function(e){e.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):e.aspect!==this.props.aspect?this.computeSizes():e.zoom!==this.props.zoom?this.recomputeCropPosition():e.cropSize!==this.props.cropSize&&this.computeSizes(),e.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent())},t.prototype.getAspect=function(){var e=this.props,t=e.cropSize,n=e.aspect;return t?t.width/t.height:n},t.prototype.onPinchStart=function(e){var n=t.getTouchPoint(e.touches[0]),o=t.getTouchPoint(e.touches[1]);this.lastPinchDistance=Kv(n,o),this.lastPinchRotation=qv(n,o),this.onDragStart(Jv(n,o))},t.prototype.onPinchMove=function(e){var n=this,o=t.getTouchPoint(e.touches[0]),r=t.getTouchPoint(e.touches[1]),l=Jv(o,r);this.onDrag(l),this.rafPinchTimeout&&window.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=window.requestAnimationFrame((function(){var e=Kv(o,r),t=n.props.zoom*(e/n.lastPinchDistance);n.setNewZoom(t,l),n.lastPinchDistance=e;var i=qv(o,r),s=n.props.rotation+(i-n.lastPinchRotation);n.props.onRotationChange&&n.props.onRotationChange(s),n.lastPinchRotation=i}))},t.prototype.render=function(){var e=this,t=this.props,n=t.image,o=t.video,r=t.mediaProps,l=t.crop,i=l.x,s=l.y,a=t.rotation,c=t.zoom,u=t.cropShape,d=t.showGrid,p=t.style,m=p.containerStyle,f=p.cropAreaStyle,h=p.mediaStyle,g=t.classes,v=g.containerClassName,b=g.cropAreaClassName,k=g.mediaClassName;return Gr().createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(t){return e.containerRef=t},"data-testid":"container",style:m,className:nb("reactEasyCrop_Container",v)},n?Gr().createElement("img",Gv({alt:"",className:nb("reactEasyCrop_Image",k)},r,{src:n,ref:function(t){return e.imageRef=t},style:Gv(Gv({},h),{transform:"translate("+i+"px, "+s+"px) rotate("+a+"deg) scale("+c+")"}),onLoad:this.onMediaLoad})):o&&Gr().createElement("video",Gv({autoPlay:!0,loop:!0,muted:!0,className:nb("reactEasyCrop_Video",k)},r,{src:o,ref:function(t){return e.videoRef=t},onLoadedMetadata:this.onMediaLoad,style:Gv(Gv({},h),{transform:"translate("+i+"px, "+s+"px) rotate("+a+"deg) scale("+c+")"}),controls:!1})),this.state.cropSize&&Gr().createElement("div",{style:Gv(Gv({},f),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:nb("reactEasyCrop_CropArea","round"===u&&"reactEasyCrop_CropAreaRound",d&&"reactEasyCrop_CropAreaGrid",b)}))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:3,minZoom:1,cropShape:"rect",showGrid:!0,style:{},classes:{},mediaProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0},t.getMousePoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t.getTouchPoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t}(Gr().Component);const rb={position:"bottom right",isAlternate:!0};var lb=window.wp.apiFetch,ib=n.n(lb);const sb=(0,s.createContext)({}),ab=()=>(0,s.useContext)(sb);function cb(e){let{id:t,url:n,naturalWidth:o,naturalHeight:r,isEditing:i,onFinishEditing:a,onSaveImage:c,children:u}=e;const d=function(e,t){const n=function(e){let{url:t,naturalWidth:n,naturalHeight:o}=e;const[r,i]=(0,s.useState)(),[a,c]=(0,s.useState)(),[u,d]=(0,s.useState)({x:0,y:0}),[p,m]=(0,s.useState)(),[f,h]=(0,s.useState)(),[g,v]=(0,s.useState)(),[b,k]=(0,s.useState)(),_=(0,s.useCallback)((()=>{d({x:0,y:0}),m(100),h(0),v(n/o),k(n/o)}),[n,o,d,m,h,v,k]),y=(0,s.useCallback)((()=>{const e=(f+90)%360;let r=n/o;if(f%180==90&&(r=o/n),0===e)return i(),h(e),v(1/g),void d({x:-u.y*r,y:u.x*r});const s=new window.Image;s.src=t,s.onload=function(t){const n=document.createElement("canvas");let o=0,l=0;e%180?(n.width=t.target.height,n.height=t.target.width):(n.width=t.target.width,n.height=t.target.height),90!==e&&180!==e||(o=n.width),270!==e&&180!==e||(l=n.height);const s=n.getContext("2d");s.translate(o,l),s.rotate(e*Math.PI/180),s.drawImage(t.target,0,0),n.toBlob((t=>{i(URL.createObjectURL(t)),h(e),v(1/g),d({x:-u.y*r,y:u.x*r})}))};const a=(0,l.applyFilters)("media.crossOrigin",void 0,t);"string"==typeof a&&(s.crossOrigin=a)}),[f,n,o,i,h,v,d]);return(0,s.useMemo)((()=>({editedUrl:r,setEditedUrl:i,crop:a,setCrop:c,position:u,setPosition:d,zoom:p,setZoom:m,rotation:f,setRotation:h,rotateClockwise:y,aspect:g,setAspect:v,defaultAspect:b,initializeTransformValues:_})),[r,i,a,c,u,d,p,m,f,h,y,g,v,b,_])}(e),{initializeTransformValues:o}=n;return(0,s.useEffect)((()=>{t&&o()}),[t,o]),n}({url:n,naturalWidth:o,naturalHeight:r},i),p=function(e){let{crop:t,rotation:n,height:o,width:r,aspect:l,url:i,id:a,onSaveImage:c,onFinishEditing:u}=e;const{createErrorNotice:d}=(0,m.useDispatch)(Nu.store),[p,f]=(0,s.useState)(!1),g=(0,s.useCallback)((()=>{f(!1),u()}),[f,u]),v=(0,s.useCallback)((()=>{f(!0);let e={};(t.width<99.9||t.height<99.9)&&(e=t),n>0&&(e.rotation=n),e.src=i,ib()({path:`/wp/v2/media/${a}/edit`,method:"POST",data:e}).then((e=>{c({id:e.id,url:e.source_url,height:o&&r?r/l:void 0})})).catch((e=>{d((0,h.sprintf)(
70
  /* translators: 1. Error message */
71
- (0,h.__)("Could not edit image. %s"),e.message),{id:"image-editing-error",type:"snackbar"})})).finally((()=>{f(!1),u()}))}),[f,t,n,o,r,l,i,c,d,f,u]);return(0,s.useMemo)((()=>({isInProgress:p,apply:v,cancel:g})),[p,v,g])}({id:t,url:n,onSaveImage:c,onFinishEditing:a,...d}),f=(0,s.useMemo)((()=>({...d,...p})),[d,p]);return(0,s.createElement)(sb.Provider,{value:f},u)}function ub(e){let{url:t,width:n,height:o,clientWidth:r,naturalHeight:l,naturalWidth:i}=e;const{isInProgress:a,editedUrl:u,position:d,zoom:m,aspect:f,setPosition:h,setCrop:g,setZoom:v,rotation:b}=ab();let k=o||r*l/i;return b%180==90&&(k=r*i/l),(0,s.createElement)("div",{className:c()("wp-block-image__crop-area",{"is-applying":a}),style:{width:n||r,height:k}},(0,s.createElement)(ob,{image:u||t,disabled:a,minZoom:1,maxZoom:3,crop:d,zoom:m/100,aspect:f,onCropChange:h,onCropComplete:e=>{g(e)},onZoomChange:e=>{v(100*e)}}),a&&(0,s.createElement)(p.Spinner,null))}var db=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"}));function pb(){const{isInProgress:e,zoom:t,setZoom:n}=ab();return(0,s.createElement)(p.Dropdown,{contentClassName:"wp-block-image__zoom",popoverProps:rb,renderToggle:t=>{let{isOpen:n,onToggle:o}=t;return(0,s.createElement)(p.ToolbarButton,{icon:db,label:(0,h.__)("Zoom"),onClick:o,"aria-expanded":n,disabled:e})},renderContent:()=>(0,s.createElement)(p.RangeControl,{label:(0,h.__)("Zoom"),min:100,max:300,value:Math.round(t),onChange:n})})}var mb=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M18.5 5.5h-13c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2v-9c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5h-13c-.3 0-.5-.2-.5-.5v-9c0-.3.2-.5.5-.5h13c.3 0 .5.2.5.5v9zM6.5 12H8v-2h2V8.5H6.5V12zm9.5 2h-2v1.5h3.5V12H16v2z"}));function fb(e){let{aspectRatios:t,isDisabled:n,label:o,onClick:r,value:l}=e;return(0,s.createElement)(p.MenuGroup,{label:o},t.map((e=>{let{title:t,aspect:o}=e;return(0,s.createElement)(p.MenuItem,{key:o,disabled:n,onClick:()=>{r(o)},role:"menuitemradio",isSelected:o===l,icon:o===l?rp:void 0},t)})))}function hb(e){let{toggleProps:t}=e;const{isInProgress:n,aspect:o,setAspect:r,defaultAspect:l}=ab();return(0,s.createElement)(p.DropdownMenu,{icon:mb,label:(0,h.__)("Aspect Ratio"),popoverProps:rb,toggleProps:t,className:"wp-block-image__aspect-ratio"},(e=>{let{onClose:t}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(fb,{isDisabled:n,onClick:e=>{r(e),t()},value:o,aspectRatios:[{title:(0,h.__)("Original"),aspect:l},{title:(0,h.__)("Square"),aspect:1}]}),(0,s.createElement)(fb,{label:(0,h.__)("Landscape"),isDisabled:n,onClick:e=>{r(e),t()},value:o,aspectRatios:[{title:(0,h.__)("16:10"),aspect:1.6},{title:(0,h.__)("16:9"),aspect:16/9},{title:(0,h.__)("4:3"),aspect:4/3},{title:(0,h.__)("3:2"),aspect:1.5}]}),(0,s.createElement)(fb,{label:(0,h.__)("Portrait"),isDisabled:n,onClick:e=>{r(e),t()},value:o,aspectRatios:[{title:(0,h.__)("10:16"),aspect:.625},{title:(0,h.__)("9:16"),aspect:9/16},{title:(0,h.__)("3:4"),aspect:3/4},{title:(0,h.__)("2:3"),aspect:2/3}]}))}))}var gb=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M15.1 4.8l-3-2.5V4c-4.4 0-8 3.6-8 8 0 3.7 2.5 6.9 6 7.7.3.1.6.1 1 .2l.2-1.5c-.4 0-.7-.1-1.1-.2l-.1.2v-.2c-2.6-.8-4.5-3.3-4.5-6.2 0-3.6 2.9-6.5 6.5-6.5v1.8l3-2.5zM20 11c-.2-1.4-.7-2.7-1.6-3.8l-1.2.8c.7.9 1.1 2 1.3 3.1L20 11zm-1.5 1.8c-.1.5-.2 1.1-.4 1.6s-.5 1-.8 1.5l1.2.9c.4-.5.8-1.1 1-1.8s.5-1.3.5-2l-1.5-.2zm-5.6 5.6l.2 1.5c1.4-.2 2.7-.7 3.8-1.6l-.9-1.1c-.9.7-2 1.1-3.1 1.2z"}));function vb(){const{isInProgress:e,rotateClockwise:t}=ab();return(0,s.createElement)(p.ToolbarButton,{icon:gb,label:(0,h.__)("Rotate"),onClick:t,disabled:e})}function bb(){const{isInProgress:e,apply:t,cancel:n}=ab();return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.ToolbarButton,{onClick:t,disabled:e},(0,h.__)("Apply")),(0,s.createElement)(p.ToolbarButton,{onClick:n},(0,h.__)("Cancel")))}function kb(e){let{url:t,width:n,height:o,clientWidth:r,naturalHeight:l,naturalWidth:i}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(ub,{url:t,width:n,height:o,clientWidth:r,naturalHeight:l,naturalWidth:i}),(0,s.createElement)(Zn,null,(0,s.createElement)(p.ToolbarGroup,null,(0,s.createElement)(pb,null),(0,s.createElement)(p.ToolbarItem,null,(e=>(0,s.createElement)(hb,{toggleProps:e}))),(0,s.createElement)(vb,null)),(0,s.createElement)(p.ToolbarGroup,null,(0,s.createElement)(bb,null))))}const _b=[25,50,75,100];function yb(e){let{imageWidth:t,imageHeight:n,imageSizeOptions:o=[],isResizable:r=!0,slug:l,width:i,height:a,onChange:c,onChangeImage:d=u.noop}=e;const{currentHeight:m,currentWidth:f,updateDimension:g,updateDimensions:v}=function(e,t,n,o,r){var l,i;const[a,c]=(0,s.useState)(null!==(l=null!=t?t:o)&&void 0!==l?l:""),[u,d]=(0,s.useState)(null!==(i=null!=e?e:n)&&void 0!==i?i:"");return(0,s.useEffect)((()=>{void 0===t&&void 0!==o&&c(o),void 0===e&&void 0!==n&&d(n)}),[o,n]),(0,s.useEffect)((()=>{void 0!==t&&Number.parseInt(t)!==Number.parseInt(a)&&c(t),void 0!==e&&Number.parseInt(e)!==Number.parseInt(u)&&d(e)}),[t,e]),{currentHeight:u,currentWidth:a,updateDimension:(e,t)=>{"width"===e?c(t):d(t),r({[e]:""===t?void 0:parseInt(t,10)})},updateDimensions:(e,t)=>{d(null!=e?e:n),c(null!=t?t:o),r({height:e,width:t})}}}(a,i,n,t,c);return(0,s.createElement)(s.Fragment,null,!(0,u.isEmpty)(o)&&(0,s.createElement)(p.SelectControl,{label:(0,h.__)("Image size"),value:l,options:o,onChange:d}),r&&(0,s.createElement)("div",{className:"block-editor-image-size-control"},(0,s.createElement)("p",{className:"block-editor-image-size-control__row"},(0,h.__)("Image dimensions")),(0,s.createElement)("div",{className:"block-editor-image-size-control__row"},(0,s.createElement)(p.TextControl,{type:"number",className:"block-editor-image-size-control__width",label:(0,h.__)("Width"),value:f,min:1,onChange:e=>g("width",e)}),(0,s.createElement)(p.TextControl,{type:"number",className:"block-editor-image-size-control__height",label:(0,h.__)("Height"),value:m,min:1,onChange:e=>g("height",e)})),(0,s.createElement)("div",{className:"block-editor-image-size-control__row"},(0,s.createElement)(p.ButtonGroup,{"aria-label":(0,h.__)("Image size presets")},_b.map((e=>{const o=Math.round(t*(e/100)),r=Math.round(n*(e/100)),l=f===o&&m===r;return(0,s.createElement)(p.Button,{key:e,isSmall:!0,variant:l?"primary":void 0,isPressed:l,onClick:()=>v(r,o)},e,"%")}))),(0,s.createElement)(p.Button,{isSmall:!0,onClick:()=>v()},(0,h.__)("Reset")))))}var Eb=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,s.createElement)(F.Path,{d:"M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z"})),Cb=e=>{let{value:t,onChange:n=u.noop,settings:o}=e;if(!o||!o.length)return null;const r=e=>o=>{n({...t,[e.id]:o})},l=o.map((e=>(0,s.createElement)(p.ToggleControl,{className:"block-editor-link-control__setting",key:e.id,label:e.title,onChange:r(e),checked:!!t&&!!t[e.id]})));return(0,s.createElement)("fieldset",{className:"block-editor-link-control__settings"},(0,s.createElement)(p.VisuallyHidden,{as:"legend"},(0,h.__)("Currently selected link settings")),l)};class Sb extends s.Component{constructor(e){super(e),this.onChange=this.onChange.bind(this),this.onFocus=this.onFocus.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.selectLink=this.selectLink.bind(this),this.handleOnClick=this.handleOnClick.bind(this),this.bindSuggestionNode=this.bindSuggestionNode.bind(this),this.autocompleteRef=e.autocompleteRef||(0,s.createRef)(),this.inputRef=(0,s.createRef)(),this.updateSuggestions=(0,u.debounce)(this.updateSuggestions.bind(this),200),this.suggestionNodes=[],this.isUpdatingSuggestions=!1,this.state={suggestions:[],showSuggestions:!1,selectedSuggestion:null,suggestionsListboxId:"",suggestionOptionIdPrefix:""}}componentDidUpdate(e){const{showSuggestions:t,selectedSuggestion:n}=this.state,{value:o,__experimentalShowInitialSuggestions:r=!1}=this.props;t&&null!==n&&this.suggestionNodes[n]&&!this.scrollingIntoView&&(this.scrollingIntoView=!0,ya()(this.suggestionNodes[n],this.autocompleteRef.current,{onlyScrollIfNeeded:!0}),this.props.setTimeout((()=>{this.scrollingIntoView=!1}),100)),e.value===o||this.props.disableSuggestions||this.isUpdatingSuggestions||(null!=o&&o.length?this.updateSuggestions(o):r&&this.updateSuggestions())}componentDidMount(){this.shouldShowInitialSuggestions()&&this.updateSuggestions()}componentWillUnmount(){var e,t;null===(e=this.suggestionsRequest)||void 0===e||null===(t=e.cancel)||void 0===t||t.call(e),delete this.suggestionsRequest}bindSuggestionNode(e){return t=>{this.suggestionNodes[e]=t}}shouldShowInitialSuggestions(){const{suggestions:e}=this.state,{__experimentalShowInitialSuggestions:t=!1,value:n}=this.props;return!this.isUpdatingSuggestions&&t&&!(n&&n.length)&&!(e&&e.length)}updateSuggestions(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{__experimentalFetchLinkSuggestions:n,__experimentalHandleURLSuggestions:o}=this.props;if(!n)return;const r=!(null!==(e=t)&&void 0!==e&&e.length);if(t=t.trim(),!r&&(t.length<2||!o&&(0,rd.isURL)(t)))return void this.setState({showSuggestions:!1,selectedSuggestion:null,loading:!1});this.isUpdatingSuggestions=!0,this.setState({selectedSuggestion:null,loading:!0});const l=n(t,{isInitialSuggestions:r});l.then((e=>{this.suggestionsRequest===l&&(this.setState({suggestions:e,loading:!1,showSuggestions:!!e.length}),e.length?this.props.debouncedSpeak((0,h.sprintf)(
72
  /* translators: %s: number of results. */
73
- (0,h._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",e.length),e.length),"assertive"):this.props.debouncedSpeak((0,h.__)("No results."),"assertive"),this.isUpdatingSuggestions=!1)})).catch((()=>{this.suggestionsRequest===l&&(this.setState({loading:!1}),this.isUpdatingSuggestions=!1)})),this.suggestionsRequest=l}onChange(e){const t=e.target.value;this.props.onChange(t),this.props.disableSuggestions||this.updateSuggestions(t)}onFocus(){const{suggestions:e}=this.state,{disableSuggestions:t,value:n}=this.props;!n||t||this.isUpdatingSuggestions||e&&e.length||this.updateSuggestions(n)}onKeyDown(e){const{showSuggestions:t,selectedSuggestion:n,suggestions:o,loading:r}=this.state;if(!t||!o.length||r){switch(e.keyCode){case va.UP:0!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(0,0));break;case va.DOWN:this.props.value.length!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length));break;case va.ENTER:this.props.onSubmit&&this.props.onSubmit(null,e)}return}const l=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case va.UP:{e.preventDefault();const t=n?n-1:o.length-1;this.setState({selectedSuggestion:t});break}case va.DOWN:{e.preventDefault();const t=null===n||n===o.length-1?0:n+1;this.setState({selectedSuggestion:t});break}case va.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(l),this.props.speak((0,h.__)("Link selected.")));break;case va.ENTER:null!==this.state.selectedSuggestion?(this.selectLink(l),this.props.onSubmit&&this.props.onSubmit(l,e)):this.props.onSubmit&&this.props.onSubmit(null,e)}}selectLink(e){this.props.onChange(e.url,e),this.setState({selectedSuggestion:null,showSuggestions:!1})}handleOnClick(e){this.selectLink(e),this.inputRef.current.focus()}static getDerivedStateFromProps(e,t){let{value:n,instanceId:o,disableSuggestions:r,__experimentalShowInitialSuggestions:l=!1}=e,{showSuggestions:i}=t,s=i;const a=n&&n.length;return l||a||(s=!1),!0===r&&(s=!1),{showSuggestions:s,suggestionsListboxId:`block-editor-url-input-suggestions-${o}`,suggestionOptionIdPrefix:`block-editor-url-input-suggestion-${o}`}}render(){return(0,s.createElement)(s.Fragment,null,this.renderControl(),this.renderSuggestions())}renderControl(){const{label:e,className:t,isFullWidth:n,instanceId:o,placeholder:r=(0,h.__)("Paste URL or type to search"),__experimentalRenderControl:l,value:i=""}=this.props,{loading:a,showSuggestions:u,selectedSuggestion:d,suggestionsListboxId:m,suggestionOptionIdPrefix:f}=this.state,g={id:`url-input-control-${o}`,label:e,className:c()("block-editor-url-input",t,{"is-full-width":n})},v={value:i,required:!0,className:"block-editor-url-input__input",type:"text",onChange:this.onChange,onFocus:this.onFocus,placeholder:r,onKeyDown:this.onKeyDown,role:"combobox","aria-label":(0,h.__)("URL"),"aria-expanded":u,"aria-autocomplete":"list","aria-owns":m,"aria-activedescendant":null!==d?`${f}-${d}`:void 0,ref:this.inputRef};return l?l(g,v,a):(0,s.createElement)(p.BaseControl,g,(0,s.createElement)("input",v),a&&(0,s.createElement)(p.Spinner,null))}renderSuggestions(){const{className:e,__experimentalRenderSuggestions:t,value:n="",__experimentalShowInitialSuggestions:o=!1}=this.props,{showSuggestions:r,suggestions:l,selectedSuggestion:a,suggestionsListboxId:d,suggestionOptionIdPrefix:m,loading:f}=this.state,h={id:d,ref:this.autocompleteRef,role:"listbox"},g=(e,t)=>({role:"option",tabIndex:"-1",id:`${m}-${t}`,ref:this.bindSuggestionNode(t),"aria-selected":t===a});return(0,u.isFunction)(t)&&r&&l.length?t({suggestions:l,selectedSuggestion:a,suggestionsListProps:h,buildSuggestionItemProps:g,isLoading:f,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:o&&!(n&&n.length)}):!(0,u.isFunction)(t)&&r&&l.length?(0,s.createElement)(p.Popover,{position:"bottom",noArrow:!0,focusOnMount:!1},(0,s.createElement)("div",i({},h,{className:c()("block-editor-url-input__suggestions",`${e}__suggestions`)}),l.map(((e,t)=>(0,s.createElement)(p.Button,i({},g(0,t),{key:e.id,className:c()("block-editor-url-input__suggestion",{"is-selected":t===a}),onClick:()=>this.handleOnClick(e)}),e.title))))):null}}var wb=(0,d.compose)(d.withSafeTimeout,p.withSpokenMessages,d.withInstanceId,(0,m.withSelect)(((e,t)=>{if((0,u.isFunction)(t.__experimentalFetchLinkSuggestions))return;const{getSettings:n}=e(Vn);return{__experimentalFetchLinkSuggestions:n().__experimentalFetchLinkSuggestions}})))(Sb),Bb=e=>{let t,{searchTerm:n,onClick:o,itemProps:r,isSelected:l,buttonText:a}=e;return n?(t=a?(0,u.isFunction)(a)?a(n):a:(0,s.createInterpolateElement)((0,h.sprintf)(
74
  /* translators: %s: search term. */
75
- (0,h.__)("Create: <mark>%s</mark>"),n),{mark:(0,s.createElement)("mark",null)}),(0,s.createElement)(p.Button,i({},r,{className:c()("block-editor-link-control__search-create block-editor-link-control__search-item",{"is-selected":l}),onClick:o}),(0,s.createElement)(wo,{className:"block-editor-link-control__search-item-icon",icon:Fa}),(0,s.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,s.createElement)("span",{className:"block-editor-link-control__search-item-title"},t)))):null},Ib=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M12 3.3c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8s-4-8.8-8.8-8.8zm6.5 5.5h-2.6C15.4 7.3 14.8 6 14 5c2 .6 3.6 2 4.5 3.8zm.7 3.2c0 .6-.1 1.2-.2 1.8h-2.9c.1-.6.1-1.2.1-1.8s-.1-1.2-.1-1.8H19c.2.6.2 1.2.2 1.8zM12 18.7c-1-.7-1.8-1.9-2.3-3.5h4.6c-.5 1.6-1.3 2.9-2.3 3.5zm-2.6-4.9c-.1-.6-.1-1.1-.1-1.8 0-.6.1-1.2.1-1.8h5.2c.1.6.1 1.1.1 1.8s-.1 1.2-.1 1.8H9.4zM4.8 12c0-.6.1-1.2.2-1.8h2.9c-.1.6-.1 1.2-.1 1.8 0 .6.1 1.2.1 1.8H5c-.2-.6-.2-1.2-.2-1.8zM12 5.3c1 .7 1.8 1.9 2.3 3.5H9.7c.5-1.6 1.3-2.9 2.3-3.5zM10 5c-.8 1-1.4 2.3-1.8 3.8H5.5C6.4 7 8 5.6 10 5zM5.5 15.3h2.6c.4 1.5 1 2.8 1.8 3.7-1.8-.6-3.5-2-4.4-3.7zM14 19c.8-1 1.4-2.2 1.8-3.7h2.6C17.6 17 16 18.4 14 19z"})),xb=e=>{let{itemProps:t,suggestion:n,isSelected:o=!1,onClick:r,isURL:l=!1,searchTerm:a="",shouldShowType:u=!1}=e;return(0,s.createElement)(p.Button,i({},t,{onClick:r,className:c()("block-editor-link-control__search-item",{"is-selected":o,"is-url":l,"is-entity":!l})}),l&&(0,s.createElement)(wo,{className:"block-editor-link-control__search-item-icon",icon:Ib}),(0,s.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,s.createElement)("span",{className:"block-editor-link-control__search-item-title"},(0,s.createElement)(p.TextHighlight,{text:n.title,highlight:a})),(0,s.createElement)("span",{"aria-hidden":!l,className:"block-editor-link-control__search-item-info"},!l&&((0,rd.filterURLForDisplay)((0,rd.safeDecodeURI)(n.url))||""),l&&(0,h.__)("Press ENTER to add this link"))),u&&n.type&&(0,s.createElement)("span",{className:"block-editor-link-control__search-item-type"},"post_tag"===n.type?"tag":n.type))};const Tb="__CREATE__",Nb=[{id:"opensInNewTab",title:(0,h.__)("Open in new tab")}];function Pb(e){let{instanceId:t,withCreateSuggestion:n,currentInputValue:o,handleSuggestionClick:r,suggestionsListProps:l,buildSuggestionItemProps:a,suggestions:u,selectedSuggestion:d,isLoading:m,isInitialSuggestions:f,createSuggestionButtonText:g,suggestionsQuery:v}=e;const b=c()("block-editor-link-control__search-results",{"is-loading":m}),k=["url","mailto","tel","internal"],_=1===u.length&&k.includes(u[0].type.toLowerCase()),y=n&&!_&&!f,E=!(null!=v&&v.type),C=`block-editor-link-control-search-results-label-${t}`,S=f?(0,h.__)("Recently updated"):(0,h.sprintf)(
76
  /* translators: %s: search term. */
77
- (0,h.__)('Search results for "%s"'),o),w=(0,s.createElement)(f?s.Fragment:p.VisuallyHidden,{},(0,s.createElement)("span",{className:"block-editor-link-control__search-results-label",id:C},S));return(0,s.createElement)("div",{className:"block-editor-link-control__search-results-wrapper"},w,(0,s.createElement)("div",i({},l,{className:b,"aria-labelledby":C}),u.map(((e,t)=>y&&Tb===e.type?(0,s.createElement)(Bb,{searchTerm:o,buttonText:g,onClick:()=>r(e),key:e.type,itemProps:a(e,t),isSelected:t===d}):Tb===e.type?null:(0,s.createElement)(xb,{key:`${e.id}-${e.type}`,itemProps:a(e,t),suggestion:e,index:t,onClick:()=>{r(e)},isSelected:t===d,isURL:k.includes(e.type.toLowerCase()),searchTerm:o,shouldShowType:E})))))}function Mb(e){const t=(0,u.startsWith)(e,"#");return(0,rd.isURL)(e)||e&&e.includes("www.")||t}const Rb=()=>Promise.resolve([]),Lb=e=>{let t="URL";const n=(0,rd.getProtocol)(e)||"";return n.includes("mailto")&&(t="mailto"),n.includes("tel")&&(t="tel"),(0,u.startsWith)(e,"#")&&(t="internal"),Promise.resolve([{id:e,title:e,url:"URL"===t?(0,rd.prependHTTP)(e):e,type:t}])};const Ab=()=>Promise.resolve([]),Db=(0,s.forwardRef)(((e,t)=>{let{value:n,children:o,currentLink:r={},className:l=null,placeholder:i=null,withCreateSuggestion:a=!1,onCreateSuggestion:p=u.noop,onChange:f=u.noop,onSelect:g=u.noop,showSuggestions:v=!0,renderSuggestions:b=(e=>(0,s.createElement)(Pb,e)),fetchSuggestions:k=null,allowDirectEntry:_=!0,showInitialSuggestions:y=!1,suggestionsQuery:E={},withURLSuggestion:C=!0,createSuggestionButtonText:S,useLabel:w=!1}=e;const B=function(e,t,n,o){const{fetchSearchSuggestions:r}=(0,m.useSelect)((e=>{const{getSettings:t}=e(Vn);return{fetchSearchSuggestions:t().__experimentalFetchLinkSuggestions}}),[]),l=t?Lb:Rb;return(0,s.useCallback)(((t,i)=>{let{isInitialSuggestions:s}=i;return Mb(t)?l(t,{isInitialSuggestions:s}):(async(e,t,n,o,r,l)=>{const{isInitialSuggestions:i}=t;let s=await Promise.all([n(e,t),o(e)]);return s=e.includes(" ")||!l||i?s[0]:s[0].concat(s[1]),i||Mb(e)||!r?s:s.concat({title:e,url:e,type:Tb})})(t,{...e,isInitialSuggestions:s},r,l,n,o)}),[l,r,n])}(E,_,a,C),I=v?k||B:Ab,x=(0,d.useInstanceId)(Db),[T,N]=(0,s.useState)(),P=async e=>{let t=e;if(Tb!==e.type)(_||t&&Object.keys(t).length>=1)&&g({...(0,u.omit)(r,"id","url"),...t},t);else try{var n;t=await p(e.title),null!==(n=t)&&void 0!==n&&n.url&&g(t)}catch(e){}},M=c()(l,{"has-no-label":!w});return(0,s.createElement)("div",{className:"block-editor-link-control__search-input-container"},(0,s.createElement)(wb,{label:w?"URL":void 0,className:M,value:n,onChange:(e,t)=>{f(e),N(t)},placeholder:null!=i?i:(0,h.__)("Search or type url"),__experimentalRenderSuggestions:v?e=>b({...e,instanceId:x,withCreateSuggestion:a,currentInputValue:n,createSuggestionButtonText:S,suggestionsQuery:E,handleSuggestionClick:t=>{e.handleSuggestionClick&&e.handleSuggestionClick(t),P(t)}}):null,__experimentalFetchLinkSuggestions:I,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:y,onSubmit:(e,t)=>{var o;const r=e||T;r||null!=n&&null!==(o=n.trim())&&void 0!==o&&o.length?P(r||{url:n}):t.preventDefault()},ref:t}),o)}));var Ob=Db,Fb=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"})),zb=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"}));const{Slot:Vb,Fill:Hb}=(0,p.createSlotFill)("BlockEditorLinkControlViewer");function Ub(e,t){switch(t.type){case"RESOLVED":return{...e,isFetching:!1,richData:t.richData};case"ERROR":return{...e,isFetching:!1,richData:null};case"LOADING":return{...e,isFetching:!0};default:throw new Error(`Unexpected action type ${t.type}`)}}function Gb(e){let{value:t,onEditClick:n,hasRichPreviews:o=!1,hasUnlinkControl:r=!1,onRemove:l}=e;const i=o?null==t?void 0:t.url:null,{richData:a,isFetching:u}=function(e){const[t,n]=(0,s.useReducer)(Ub,{richData:null,isFetching:!1}),{fetchRichUrlData:o}=(0,m.useSelect)((e=>{const{getSettings:t}=e(Vn);return{fetchRichUrlData:t().__experimentalFetchRichUrlData}}),[]);return(0,s.useEffect)((()=>{if(null!=e&&e.length&&o&&"undefined"!=typeof AbortController){n({type:"LOADING"});const t=new window.AbortController,r=t.signal;return o(e,{signal:r}).then((e=>{n({type:"RESOLVED",richData:e})})).catch((()=>{r.aborted||n({type:"ERROR"})})),()=>{t.abort()}}}),[e]),t}(i),d=a&&Object.keys(a).length,f=t&&(0,rd.filterURLForDisplay)((0,rd.safeDecodeURI)(t.url),16)||"",g=(null==a?void 0:a.title)||(null==t?void 0:t.title)||f,v=!t.url.length;let b;return b=null!=a&&a.icon?(0,s.createElement)("img",{src:null==a?void 0:a.icon,alt:""}):v?(0,s.createElement)(wo,{icon:Fb,size:32}):(0,s.createElement)(wo,{icon:Ib}),(0,s.createElement)("div",{"aria-label":(0,h.__)("Currently selected"),"aria-selected":"true",className:c()("block-editor-link-control__search-item",{"is-current":!0,"is-rich":d,"is-fetching":!!u,"is-preview":!0,"is-error":v})},(0,s.createElement)("div",{className:"block-editor-link-control__search-item-top"},(0,s.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,s.createElement)("span",{className:c()("block-editor-link-control__search-item-icon",{"is-image":null==a?void 0:a.icon})},b),(0,s.createElement)("span",{className:"block-editor-link-control__search-item-details"},v?(0,s.createElement)("span",{className:"block-editor-link-control__search-item-error-notice"},"Link is empty"):(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.ExternalLink,{className:"block-editor-link-control__search-item-title",href:t.url},(0,rr.__unstableStripHTML)(g)),(null==t?void 0:t.url)&&(0,s.createElement)("span",{className:"block-editor-link-control__search-item-info"},f)))),(0,s.createElement)(p.Button,{icon:zb,label:(0,h.__)("Edit"),className:"block-editor-link-control__search-item-action",onClick:n,iconSize:24}),r&&(0,s.createElement)(p.Button,{icon:Lm,label:(0,h.__)("Unlink"),className:"block-editor-link-control__search-item-action block-editor-link-control__unlink",onClick:l,iconSize:24}),(0,s.createElement)(Vb,{fillProps:t})),(d&&((null==a?void 0:a.image)||(null==a?void 0:a.description))||u)&&(0,s.createElement)("div",{className:"block-editor-link-control__search-item-bottom"},((null==a?void 0:a.image)||u)&&(0,s.createElement)("div",{"aria-hidden":!(null!=a&&a.image),className:c()("block-editor-link-control__search-item-image",{"is-placeholder":!(null!=a&&a.image)})},(null==a?void 0:a.image)&&(0,s.createElement)("img",{src:null==a?void 0:a.image,alt:""})),((null==a?void 0:a.description)||u)&&(0,s.createElement)("div",{"aria-hidden":!(null!=a&&a.description),className:c()("block-editor-link-control__search-item-description",{"is-placeholder":!(null!=a&&a.description)})},(null==a?void 0:a.description)&&(0,s.createElement)(p.__experimentalText,{truncate:!0,numberOfLines:"2"},a.description))))}function Wb(e){var t,n,o;let{searchInputPlaceholder:r,value:l,settings:i=Nb,onChange:a=u.noop,onRemove:d,noDirectEntry:m=!1,showSuggestions:f=!0,showInitialSuggestions:g,forceIsEditingLink:v,createSuggestion:b,withCreateSuggestion:k,inputValue:_="",suggestionsQuery:y={},noURLSuggestion:E=!1,createSuggestionButtonText:C,hasRichPreviews:S=!1,hasTextControl:w=!1,renderControlBottom:B=null}=e;void 0===k&&b&&(k=!0);const I=(0,s.useRef)(!0),x=(0,s.useRef)(),T=(0,s.useRef)(),[N,P]=(0,s.useState)((null==l?void 0:l.url)||""),[M,R]=(0,s.useState)((null==l?void 0:l.title)||""),L=_||N,[A,D]=(0,s.useState)(void 0!==v?v:!l||!l.url),O=(0,s.useRef)(!1),F=!(null!=L&&null!==(t=L.trim())&&void 0!==t&&t.length);function z(){var e;O.current=!(null===(e=x.current)||void 0===e||!e.contains(x.current.ownerDocument.activeElement)),D(!1)}(0,s.useEffect)((()=>{void 0!==v&&v!==A&&D(v)}),[v]),(0,s.useEffect)((()=>{if(I.current)return void(I.current=!1);const e=null!=T&&T.current?1:0;(rr.focus.focusable.find(x.current)[e]||x.current).focus(),O.current=!1}),[A]),(0,s.useEffect)((()=>{null!=l&&l.title&&l.title!==M&&R(l.title),null!=l&&l.url&&P(l.url)}),[l]);const{createPage:V,isCreatingPage:H,errorMessage:U}=function(e){const t=(0,s.useRef)(),[n,o]=(0,s.useState)(!1),[r,l]=(0,s.useState)(null);return(0,s.useEffect)((()=>()=>{t.current&&t.current.cancel()}),[]),{createPage:async function(n){o(!0),l(null);try{return t.current=(e=>{let t=!1;return{promise:new Promise(((n,o)=>{e.then((e=>t?o({isCanceled:!0}):n(e)),(e=>o(t?{isCanceled:!0}:e)))})),cancel(){t=!0}}})(Promise.resolve(e(n))),await t.current.promise}catch(e){if(e&&e.isCanceled)return;throw l(e.message||(0,h.__)("An unknown error occurred during creation. Please try again.")),e}finally{o(!1)}},isCreatingPage:n,errorMessage:r}}(b),G=()=>{L===(null==l?void 0:l.url)&&M===(null==l?void 0:l.title)||a({url:L,title:M}),z()},W=d&&l&&!A&&!H,$=!(null==i||!i.length),j=(null==l||null===(n=l.url)||void 0===n||null===(o=n.trim())||void 0===o?void 0:o.length)>0&&w;return(0,s.createElement)("div",{tabIndex:-1,ref:x,className:"block-editor-link-control"},H&&(0,s.createElement)("div",{className:"block-editor-link-control__loading"},(0,s.createElement)(p.Spinner,null)," ",(0,h.__)("Creating"),"…"),(A||!l)&&!H&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:c()({"block-editor-link-control__search-input-wrapper":!0,"has-text-control":j})},j&&(0,s.createElement)(p.TextControl,{ref:T,className:"block-editor-link-control__field block-editor-link-control__text-content",label:"Text",value:M,onChange:R,onKeyDown:e=>{const{keyCode:t}=e;t!==va.ENTER||F||(e.preventDefault(),G())}}),(0,s.createElement)(Ob,{currentLink:l,className:"block-editor-link-control__field block-editor-link-control__search-input",placeholder:r,value:L,withCreateSuggestion:k,onCreateSuggestion:V,onChange:P,onSelect:e=>{a({...e,title:M||(null==e?void 0:e.title)}),z()},showInitialSuggestions:g,allowDirectEntry:!m,showSuggestions:f,suggestionsQuery:y,withURLSuggestion:!E,createSuggestionButtonText:C,useLabel:j},(0,s.createElement)("div",{className:"block-editor-link-control__search-actions"},(0,s.createElement)(p.Button,{onClick:G,label:(0,h.__)("Submit"),icon:Eb,className:"block-editor-link-control__search-submit",disabled:F})))),U&&(0,s.createElement)(p.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1},U)),l&&!A&&!H&&(0,s.createElement)(Gb,{key:null==l?void 0:l.url,value:l,onEditClick:()=>D(!0),hasRichPreviews:S,hasUnlinkControl:W,onRemove:d}),$&&(0,s.createElement)("div",{className:"block-editor-link-control__tools"},(0,s.createElement)(Cb,{value:l,settings:i,onChange:a})),B&&B())}Wb.ViewerFill=Hb;var $b=Wb,jb=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z"})),Kb=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"})),qb=(0,p.withFilters)("editor.MediaUpload")((()=>null)),Yb=function(e){let{fallback:t=null,children:n}=e;return(0,m.useSelect)((e=>{const{getSettings:t}=e(Vn);return!!t().mediaUpload}),[])?n:t},Zb=(0,d.compose)([(0,m.withDispatch)((e=>{const{createNotice:t,removeNotice:n}=e(Nu.store);return{createNotice:t,removeNotice:n}})),(0,p.withFilters)("editor.MediaReplaceFlow")])((e=>{let{mediaURL:t,mediaId:n,allowedTypes:o,accept:r,onSelect:l,onSelectURL:i,onFilesUpload:a=u.noop,name:c=(0,h.__)("Replace"),createNotice:d,removeNotice:f,children:g}=e;const[v,b]=(0,s.useState)(t),k=(0,m.useSelect)((e=>e(Vn).getSettings().mediaUpload),[]),_=(0,s.createRef)(),y=(0,u.uniqueId)("block-editor/media-replace-flow/error-notice/"),E=e=>{const t=document.createElement("div");t.innerHTML=(0,s.renderToString)(e);const n=t.textContent||t.innerText||"";setTimeout((()=>{d("error",n,{speak:!0,id:y,isDismissible:!0})}),1e3)},C=e=>{b(e.url),l(e),(0,Pt.speak)((0,h.__)("The media file has been replaced")),f(y)},S=e=>{e.keyCode===va.DOWN&&(e.preventDefault(),e.target.click())};return(0,s.createElement)(p.Dropdown,{popoverProps:{isAlternate:!0},contentClassName:"block-editor-media-replace-flow__options",renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return(0,s.createElement)(p.ToolbarButton,{ref:_,"aria-expanded":t,"aria-haspopup":"true",onClick:n,onKeyDown:S},c)},renderContent:e=>{let{onClose:t}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu"},(0,s.createElement)(qb,{value:n,onSelect:e=>C(e),allowedTypes:o,render:e=>{let{open:t}=e;return(0,s.createElement)(p.MenuItem,{icon:jb,onClick:t},(0,h.__)("Open Media Library"))}}),(0,s.createElement)(Yb,null,(0,s.createElement)(p.FormFileUpload,{onChange:e=>{(e=>{const t=e.target.files;a(t),k({allowedTypes:o,filesList:t,onFileChange:e=>{let[t]=e;C(t)},onError:E})})(e)},accept:r,render:e=>{let{openFileDialog:t}=e;return(0,s.createElement)(p.MenuItem,{icon:Kb,onClick:()=>{t()}},(0,h.__)("Upload"))}})),g),i&&(0,s.createElement)("form",{className:"block-editor-media-flow__url-input"},(0,s.createElement)("span",{className:"block-editor-media-replace-flow__image-url-label"},(0,h.__)("Current media URL:")),(0,s.createElement)($b,{value:{url:v},settings:[],showSuggestions:!1,onChange:e=>{let{url:t}=e;b(t),i(t),_.current.focus()}})))}})}));function Xb(e){let{url:t,urlLabel:n,className:o}=e;const r=c()(o,"block-editor-url-popover__link-viewer-url");return t?(0,s.createElement)(p.ExternalLink,{className:r,href:t},n||(0,rd.filterURLForDisplay)((0,rd.safeDecodeURI)(t))):(0,s.createElement)("span",{className:r})}function Qb(e){let{additionalControls:t,children:n,renderSettings:o,position:r="bottom center",focusOnMount:l="firstElement",...a}=e;const[c,u]=(0,s.useState)(!1),d=!!o&&c;return(0,s.createElement)(p.Popover,i({className:"block-editor-url-popover",focusOnMount:l,position:r},a),(0,s.createElement)("div",{className:"block-editor-url-popover__input-container"},(0,s.createElement)("div",{className:"block-editor-url-popover__row"},n,!!o&&(0,s.createElement)(p.Button,{className:"block-editor-url-popover__settings-toggle",icon:Ud,label:(0,h.__)("Link settings"),onClick:()=>{u(!c)},"aria-expanded":c})),d&&(0,s.createElement)("div",{className:"block-editor-url-popover__row block-editor-url-popover__settings"},o())),t&&!d&&(0,s.createElement)("div",{className:"block-editor-url-popover__additional-controls"},t))}Qb.LinkEditor=function(e){let{autocompleteRef:t,className:n,onChangeInputValue:o,value:r,...l}=e;return(0,s.createElement)("form",i({className:c()("block-editor-url-popover__link-editor",n)},l),(0,s.createElement)(wb,{value:r,onChange:o,autocompleteRef:t}),(0,s.createElement)(p.Button,{icon:Eb,label:(0,h.__)("Apply"),type:"submit"}))},Qb.LinkViewer=function(e){let{className:t,linkClassName:n,onEditLinkClick:o,url:r,urlLabel:l,...a}=e;return(0,s.createElement)("div",i({className:c()("block-editor-url-popover__link-viewer",t)},a),(0,s.createElement)(Xb,{url:r,urlLabel:l,className:n}),o&&(0,s.createElement)(p.Button,{icon:zb,label:(0,h.__)("Edit"),onClick:o}))};var Jb=Qb;const ek=e=>{let{src:t,onChange:n,onSubmit:o,onClose:r}=e;return(0,s.createElement)(Jb,{onClose:r},(0,s.createElement)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:o},(0,s.createElement)("input",{className:"block-editor-media-placeholder__url-input-field",type:"text","aria-label":(0,h.__)("URL"),placeholder:(0,h.__)("Paste or type URL"),onChange:n,value:t}),(0,s.createElement)(p.Button,{className:"block-editor-media-placeholder__url-input-submit-button",icon:Eb,label:(0,h.__)("Apply"),type:"submit"})))};var tk=(0,p.withFilters)("editor.MediaPlaceholder")((function(e){let{value:t={},allowedTypes:n,className:o,icon:r,labels:l={},mediaPreview:i,notices:a,isAppender:d,accept:f,addToGallery:g,multiple:v=!1,handleUpload:b=!0,dropZoneUIOnly:k,disableDropZone:_,disableMediaButtons:y,onError:E,onSelect:C,onCancel:S,onSelectURL:w,onDoubleClick:B,onFilesPreUpload:I=u.noop,onHTMLDrop:x=u.noop,children:T,mediaLibraryButton:N,placeholder:P,style:M}=e;const R=(0,m.useSelect)((e=>{const{getSettings:t}=e(Vn);return t().mediaUpload}),[]),[L,A]=(0,s.useState)(""),[D,O]=(0,s.useState)(!1);(0,s.useEffect)((()=>{var e;A(null!==(e=null==t?void 0:t.src)&&void 0!==e?e:"")}),[null==t?void 0:t.src]);const F=e=>{A(e.target.value)},z=()=>{O(!0)},V=()=>{O(!1)},H=e=>{e.preventDefault(),L&&w&&(w(L),V())},U=e=>{if(!b)return C(e);let o;if(I(e),v)if(g){let e=[];o=n=>{const o=(null!=t?t:[]).filter((t=>t.id?!e.some((e=>{let{id:n}=e;return Number(n)===Number(t.id)})):!e.some((e=>{let{urlSlug:n}=e;return t.url.includes(n)}))));C(o.concat(n)),e=n.map((e=>{const t=e.url.lastIndexOf("."),n=e.url.slice(0,t);return{id:e.id,urlSlug:n}}))}}else o=C;else o=e=>{let[t]=e;return C(t)};R({allowedTypes:n,filesList:e,onFileChange:o,onError:E})},G=e=>{U(e.target.files)},W=null!=P?P:e=>{let{instructions:t,title:u}=l;if(R||w||(t=(0,h.__)("To edit this block, you need permission to upload media.")),void 0===t||void 0===u){const e=null!=n?n:[],[o]=e,r=1===e.length,l=r&&"audio"===o,i=r&&"image"===o,s=r&&"video"===o;void 0===t&&R&&(t=(0,h.__)("Upload a media file or pick one from your media library."),l?t=(0,h.__)("Upload an audio file, pick one from your media library, or add one with a URL."):i?t=(0,h.__)("Upload an image file, pick one from your media library, or add one with a URL."):s&&(t=(0,h.__)("Upload a video file, pick one from your media library, or add one with a URL."))),void 0===u&&(u=(0,h.__)("Media"),l?u=(0,h.__)("Audio"):i?u=(0,h.__)("Image"):s&&(u=(0,h.__)("Video")))}const m=c()("block-editor-media-placeholder",o,{"is-appender":d});return(0,s.createElement)(p.Placeholder,{icon:r,label:u,instructions:t,className:m,notices:a,onDoubleClick:B,preview:i,style:M},e,T)},$=()=>_?null:(0,s.createElement)(p.DropZone,{onFilesDrop:U,onHTMLDrop:x}),j=()=>S&&(0,s.createElement)(p.Button,{className:"block-editor-media-placeholder__cancel-button",title:(0,h.__)("Cancel"),variant:"link",onClick:S},(0,h.__)("Cancel")),K=()=>w&&(0,s.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},(0,s.createElement)(p.Button,{className:"block-editor-media-placeholder__button",onClick:z,isPressed:D,variant:"tertiary"},(0,h.__)("Insert from URL")),D&&(0,s.createElement)(ek,{src:L,onChange:F,onSubmit:H,onClose:V}));return k||y?(k&&Lt()("wp.blockEditor.MediaPlaceholder dropZoneUIOnly prop",{since:"5.4",alternative:"disableMediaButtons"}),(0,s.createElement)(Yb,null,$())):(0,s.createElement)(Yb,{fallback:W(K())},(()=>{const e=null!=N?N:e=>{let{open:t}=e;return(0,s.createElement)(p.Button,{variant:"tertiary",onClick:()=>{t()}},(0,h.__)("Media Library"))},o=(0,s.createElement)(qb,{addToGallery:g,gallery:v&&!(!n||0===n.length)&&n.every((e=>"image"===e||e.startsWith("image/"))),multiple:v,onSelect:C,allowedTypes:n,value:Array.isArray(t)?t.map((e=>{let{id:t}=e;return t})):t.id,render:e});if(R&&d)return(0,s.createElement)(s.Fragment,null,$(),(0,s.createElement)(p.FormFileUpload,{onChange:G,accept:f,multiple:v,render:e=>{let{openFileDialog:t}=e;const n=(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.Button,{variant:"primary",className:c()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onClick:t},(0,h.__)("Upload")),o,K(),j());return W(n)}}));if(R){const e=(0,s.createElement)(s.Fragment,null,$(),(0,s.createElement)(p.FormFileUpload,{variant:"primary",className:c()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onChange:G,accept:f,multiple:v},(0,h.__)("Upload")),o,K(),j());return W(e)}return W(o)})())})),nk=e=>{let{colorSettings:t,...n}=e;const o=t.map((e=>{let{value:t,onChange:n,...o}=e;return{...o,colorValue:t,onColorChange:n}}));return(0,s.createElement)(mf,i({settings:o,gradients:[],disableCustomGradients:!0},n))};const ok={position:"bottom right",isAlternate:!0};var rk=()=>(0,s.createElement)(s.Fragment,null,["bold","italic","link"].map((e=>(0,s.createElement)(p.Slot,{name:`RichText.ToolbarControls.${e}`,key:e}))),(0,s.createElement)(p.Slot,{name:"RichText.ToolbarControls"},(e=>{if(!e.length)return null;const t=e.map((e=>{let[{props:t}]=e;return t})).some((e=>{let{isActive:t}=e;return t}));return(0,s.createElement)(p.ToolbarItem,null,(n=>(0,s.createElement)(p.DropdownMenu,{icon:Ud
78
- /* translators: button label text should, if possible, be under 16 characters. */,label:(0,h.__)("More"),toggleProps:{...n,className:c()(n.className,{"is-pressed":t}),describedBy:(0,h.__)("Displays more block tools")},controls:(0,u.orderBy)(e.map((e=>{let[{props:t}]=e;return t})),"title"),popoverProps:ok})))}))),lk=e=>{let{inline:t,anchorRef:n}=e;return t?(0,s.createElement)(p.Popover,{noArrow:!0,position:"top center",focusOnMount:!1,anchorRef:n,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar"},(0,s.createElement)("div",{className:"block-editor-rich-text__inline-format-toolbar-group"},(0,s.createElement)(p.ToolbarGroup,null,(0,s.createElement)(rk,null)))):(0,s.createElement)(Zn,{group:"inline"},(0,s.createElement)(rk,null))};function ik(){const{didAutomaticChange:e,getSettings:t}=(0,m.useSelect)(Vn);return(0,d.useRefEffect)((n=>{function o(n){const{keyCode:o}=n;n.defaultPrevented||o!==va.DELETE&&o!==va.BACKSPACE&&o!==va.ESCAPE||e()&&(n.preventDefault(),t().__experimentalUndo())}return n.addEventListener("keydown",o),()=>{n.removeEventListener("keydown",o)}}),[])}function sk(e){return e.filter((e=>{let{type:t}=e;return/^image\/(?:jpe?g|png|gif|webp)$/.test(t)})).map((e=>`<img src="${(0,yp.createBlobURL)(e)}">`)).join("")}var ak=window.wp.shortcode;function ck(e,t){if(null!=t&&t.length){let n=e.formats.length;for(;n--;)e.formats[n]=[...t,...e.formats[n]||[]]}}function uk(e){if(!0===e||"p"===e||"li"===e)return!0===e?"p":e}function dk(e){let{allowedFormats:t,formattingControls:n,disableFormats:o}=e;return o?dk.EMPTY_ARRAY:t||n?t||(Lt()("wp.blockEditor.RichText formattingControls prop",{since:"5.4",alternative:"allowedFormats"}),n.map((e=>`core/${e}`))):void 0}function pk(e){let{value:t,pastedBlocks:n=[],onReplace:o,onSplit:r,onSplitMiddle:l,multilineTag:i}=e;if(!o||!r)return;const s=[],[a,c]=(0,Mt.split)(t),u=n.length>0;let d=-1;const p=(0,Mt.isEmpty)(a)&&!(0,Mt.isEmpty)(c);u&&(0,Mt.isEmpty)(a)||(s.push(r((0,Mt.toHTMLString)({value:a,multilineTag:i}),!p)),d+=1),u?(s.push(...n),d+=n.length):l&&s.push(l()),(u||l)&&(0,Mt.isEmpty)(c)||s.push(r((0,Mt.toHTMLString)({value:c,multilineTag:i}),p)),o(s,u?d:1,u?-1:0)}function mk(e,t){return t?(0,Mt.replace)(e,/\n+/g,Mt.__UNSTABLE_LINE_SEPARATOR):(0,Mt.replace)(e,new RegExp(Mt.__UNSTABLE_LINE_SEPARATOR,"g"),"\n")}function fk(e){const t=(0,s.useRef)(e);return t.current=e,(0,d.useRefEffect)((e=>{function n(e){const{isSelected:n,disableFormats:o,onChange:l,value:i,formatTypes:s,tagName:a,onReplace:c,onSplit:u,onSplitMiddle:d,__unstableEmbedURLOnPaste:p,multilineTag:m,preserveWhiteSpace:f,pastePlainText:h}=t.current;if(!n)return void e.preventDefault();const{clipboardData:g}=e;let v="",b="";try{v=g.getData("text/plain"),b=g.getData("text/html")}catch(e){try{b=g.getData("Text")}catch(e){return}}if(b=function(e){return e.replace(/.*<!--StartFragment-->/s,"").replace(/<!--EndFragment-->.*/s,"")}(b),b=function(e){const t="<meta charset='utf-8'>";return e.startsWith(t)?e.slice(t.length):e}(b),e.preventDefault(),window.console.log("Received HTML:\n\n",b),window.console.log("Received plain text:\n\n",v),o)return void l((0,Mt.insert)(i,v));const k=s.reduce(((e,t)=>{let{__unstablePasteRule:n}=t;return n&&e===i&&(e=n(i,{html:b,plainText:v})),e}),i);if(k!==i)return void l(k);const _=[...(0,rr.getFilesFromDataTransfer)(g)];if("true"===g.getData("rich-text")){const e=g.getData("rich-text-multi-line-tag")||void 0;let t=(0,Mt.create)({html:b,multilineTag:e,multilineWrapperTags:"li"===e?["ul","ol"]:void 0,preserveWhiteSpace:f});return t=mk(t,!!m),ck(t,i.activeFormats),void l((0,Mt.insert)(i,t))}if(h)return void l((0,Mt.insert)(i,(0,Mt.create)({text:v})));if(_&&_.length&&!b){const e=(0,r.pasteHandler)({HTML:sk(_),mode:"BLOCKS",tagName:a,preserveWhiteSpace:f});return window.console.log("Received items:\n\n",_),void(c&&(0,Mt.isEmpty)(i)?c(e):pk({value:i,pastedBlocks:e,onReplace:c,onSplit:u,onSplitMiddle:d,multilineTag:m}))}let y=c&&u?"AUTO":"INLINE";var E;"AUTO"===y&&(0,Mt.isEmpty)(i)&&(E=v,(0,ak.regexp)(".*").test(E))&&(y="BLOCKS"),p&&(0,Mt.isEmpty)(i)&&(0,rd.isURL)(v.trim())&&(y="BLOCKS");const C=(0,r.pasteHandler)({HTML:b,plainText:v,mode:y,tagName:a,preserveWhiteSpace:f});if("string"==typeof C){let e=(0,Mt.create)({html:C});e=mk(e,!!m),ck(e,i.activeFormats),l((0,Mt.insert)(i,e))}else C.length>0&&(c&&(0,Mt.isEmpty)(i)?c(C,C.length-1,-1):pk({value:i,pastedBlocks:C,onReplace:c,onSplit:u,onSplitMiddle:d,multilineTag:m}))}return e.addEventListener("paste",n),()=>{e.removeEventListener("paste",n)}}),[])}function hk(e){const{__unstableMarkLastChangeAsPersistent:t,__unstableMarkAutomaticChange:n}=(0,m.useDispatch)(Vn),o=(0,s.useRef)(e);return o.current=e,(0,d.useRefEffect)((e=>{function l(){const{value:e,onReplace:t}=o.current;if(!t)return;const{start:l,text:i}=e;if(" "!==i.slice(l-1,l))return;const s=i.slice(0,l).trim(),a=(0,r.getBlockTransforms)("from").filter((e=>{let{type:t}=e;return"prefix"===t})),c=(0,r.findTransform)(a,(e=>{let{prefix:t}=e;return s===t}));if(!c)return;const u=(0,Mt.toHTMLString)({value:(0,Mt.slice)(e,l,i.length)});t([c.transform(u)]),n()}function i(e){const{inputType:r,type:i}=e,{value:s,onChange:a,__unstableAllowPrefixTransformations:c,formatTypes:u}=o.current;if("insertText"!==r&&"compositionend"!==i)return;c&&l&&l();const d=u.reduce(((e,t)=>{let{__unstableInputRule:n}=t;return n&&(e=n(e)),e}),s);d!==s&&(t(),a({...d,activeFormats:s.activeFormats}),n())}return e.addEventListener("input",i),e.addEventListener("compositionend",i),()=>{e.removeEventListener("input",i),e.removeEventListener("compositionend",i)}}),[])}function gk(e){const{__unstableMarkAutomaticChange:t}=(0,m.useDispatch)(Vn),n=(0,s.useRef)(e);return n.current=e,(0,d.useRefEffect)((e=>{function o(e){if(e.defaultPrevented)return;const{removeEditorOnlyFormats:o,value:l,onReplace:i,onSplit:s,onSplitMiddle:a,multilineTag:c,onChange:u,disableLineBreaks:d,onSplitAtEnd:p}=n.current;if(e.keyCode!==va.ENTER)return;e.preventDefault();const m={...l};m.formats=o(l);const f=i&&s;if(i){const e=(0,r.getBlockTransforms)("from").filter((e=>{let{type:t}=e;return"enter"===t})),n=(0,r.findTransform)(e,(e=>e.regExp.test(m.text)));n&&(i([n.transform({content:m.text})]),t())}if(c)e.shiftKey?d||u((0,Mt.insert)(m,"\n")):f&&(0,Mt.__unstableIsEmptyLine)(m)?pk({value:m,onReplace:i,onSplit:s,onSplitMiddle:a,multilineTag:c}):u((0,Mt.__unstableInsertLineSeparator)(m));else{const{text:t,start:n,end:o}=m,r=p&&n===o&&o===t.length;e.shiftKey||!f&&!r?d||u((0,Mt.insert)(m,"\n")):!f&&r?p():f&&pk({value:m,onReplace:i,onSplit:s,onSplitMiddle:a,multilineTag:c})}}return e.addEventListener("keydown",o),()=>{e.removeEventListener("keydown",o)}}),[])}function vk(e){return e(Mt.store).getFormatTypes()}dk.EMPTY_ARRAY=[];const bk=new Set(["a","audio","button","details","embed","iframe","input","label","select","textarea","video"]);function kk(e){return(0,d.useRefEffect)((t=>{function n(t){for(const n of e.current)n(t)}return t.addEventListener("keydown",n),()=>{t.removeEventListener("keydown",n)}}),[])}function _k(e){return(0,d.useRefEffect)((t=>{function n(t){for(const n of e.current)n(t)}return t.addEventListener("input",n),()=>{t.removeEventListener("input",n)}}),[])}function yk(e){let{formatTypes:t,onChange:n,onFocus:o,value:r,forwardedRef:l}=e;return t.map((e=>{const{name:t,edit:i}=e;if(!i)return null;const a=(0,Mt.getActiveFormat)(r,t);let c=void 0!==a;const d=(0,Mt.getActiveObject)(r),p=void 0!==d&&d.type===t;if("core/link"===t&&!(0,Mt.isCollapsed)(r)){const e=r.formats,t=(0,u.find)(e[r.start],{type:"core/link"}),n=(0,u.find)(e[r.end-1],{type:"core/link"});t&&n&&t===n||(c=!1)}return(0,s.createElement)(i,{key:t,isActive:c,activeAttributes:c&&a.attributes||{},isObjectActive:p,activeObjectAttributes:p&&d.attributes||{},value:r,onChange:n,onFocus:o,contentRef:l})}))}const Ek=(0,s.createContext)(),Ck=(0,s.createContext)(),Sk=(0,s.forwardRef)((function e(t,n){let{children:o,tagName:l="div",value:a="",onChange:f,isSelected:h,multiline:g,inlineToolbar:v,wrapperClassName:b,autocompleters:k,onReplace:_,placeholder:y,allowedFormats:E,formattingControls:C,withoutInteractiveFormatting:S,onRemove:w,onMerge:B,onSplit:I,__unstableOnSplitAtEnd:x,__unstableOnSplitMiddle:T,identifier:N,preserveWhiteSpace:P,__unstablePastePlainText:M,__unstableEmbedURLOnPaste:R,__unstableDisableFormats:L,disableLineBreaks:A,unstableOnFocus:D,__unstableAllowPrefixTransformations:O,...F}=t;const z=(0,d.useInstanceId)(e);N=N||z,F=function(e){return(0,u.omit)(e,["__unstableMobileNoFocusOnMount","deleteEnter","placeholderTextColor","textAlign","selectionColor","tagsToEliminate","rootTagsToEliminate","disableEditingMenu","fontSize","fontFamily","fontWeight","fontStyle","minWidth","maxWidth","setRef"])}(F);const V=(0,s.useRef)(),{clientId:H}=Wn(),{selectionStart:U,selectionEnd:G,isSelected:W,disabled:$}=(0,m.useSelect)((e=>{const{getSelectionStart:t,getSelectionEnd:n,isMultiSelecting:o,hasMultiSelection:r}=e(Vn),l=t(),i=n();let s;return void 0===h?s=l.clientId===H&&l.attributeKey===N:h&&(s=l.clientId===H),{selectionStart:s?l.offset:void 0,selectionEnd:s?i.offset:void 0,isSelected:s,disabled:o()||r()}})),{selectionChange:j}=(0,m.useDispatch)(Vn),K=uk(g),q=dk({allowedFormats:E,formattingControls:C,disableFormats:L}),Y=!q||q.length>0;let Z=a,X=f;Array.isArray(a)&&(Z=r.children.toHTML(a),X=e=>f(r.children.fromDOM((0,Mt.__unstableCreateElement)(document,e).childNodes)));const Q=(0,s.useCallback)(((e,t)=>{j(H,N,e,t)}),[H,N]),{formatTypes:J,prepareHandlers:ee,valueHandlers:te,changeHandlers:ne,dependencies:oe}=function(e){let{clientId:t,identifier:n,withoutInteractiveFormatting:o,allowedFormats:r}=e;const l=(0,m.useSelect)(vk,[]),i=(0,s.useMemo)((()=>l.filter((e=>{let{name:t,tagName:n}=e;return!(r&&!r.includes(t)||o&&bk.has(n))}))),[l,r,bk]),a=(0,m.useSelect)((e=>i.reduce(((o,r)=>(r.__experimentalGetPropsForEditableTreePreparation&&(o[r.name]=r.__experimentalGetPropsForEditableTreePreparation(e,{richTextIdentifier:n,blockClientId:t})),o)),{})),[i,t,n]),c=(0,m.useDispatch)(),u=[],d=[],p=[],f=[];return i.forEach((e=>{if(e.__experimentalCreatePrepareEditableTree){const o=a[e.name],r=e.__experimentalCreatePrepareEditableTree(o,{richTextIdentifier:n,blockClientId:t});e.__experimentalCreateOnChangeEditableValue?d.push(r):u.push(r);for(const e in o)f.push(o[e])}if(e.__experimentalCreateOnChangeEditableValue){let o={};e.__experimentalGetPropsForEditableTreeChangeHandler&&(o=e.__experimentalGetPropsForEditableTreeChangeHandler(c,{richTextIdentifier:n,blockClientId:t})),p.push(e.__experimentalCreateOnChangeEditableValue({...a[e.name]||{},...o},{richTextIdentifier:n,blockClientId:t}))}})),{formatTypes:i,prepareHandlers:u,valueHandlers:d,changeHandlers:p,dependencies:f}}({clientId:H,identifier:N,withoutInteractiveFormatting:S,allowedFormats:q});function re(e){return J.forEach((t=>{t.__experimentalCreatePrepareEditableTree&&(e=(0,Mt.removeFormat)(e,t.name,0,e.text.length))})),e.formats}const{value:le,onChange:ie,ref:se}=(0,Mt.__unstableUseRichText)({value:Z,onChange(e,t){let{__unstableFormats:n,__unstableText:o}=t;X(e),Object.values(ne).forEach((e=>{e(n,o)}))},selectionStart:U,selectionEnd:G,onSelectionChange:Q,placeholder:y,__unstableIsSelected:W,__unstableMultilineTag:K,__unstableDisableFormats:L,preserveWhiteSpace:P,__unstableDependencies:[...oe,l],__unstableAfterParse:function(e){return te.reduce(((t,n)=>n(t,e.text)),e.formats)},__unstableBeforeSerialize:re,__unstableAddInvisibleFormats:function(e){return ee.reduce(((t,n)=>n(t,e.text)),e.formats)}}),ae=function(e){return(0,p.__unstableUseAutocompleteProps)({...e,completers:Lg(e)})}({onReplace:_,completers:k,record:le,onChange:ie});!function(e){let{value:t}=e;const n=t.activeFormats&&!!t.activeFormats.length,{isCaretWithinFormattedText:o}=(0,m.useSelect)(Vn),{enterFormattedText:r,exitFormattedText:l}=(0,m.useDispatch)(Vn);(0,s.useEffect)((()=>{n?o()||r():o()&&l()}),[n])}({value:le}),function(e){let{html:t,value:n}=e;const o=(0,s.useRef)(),r=n.activeFormats&&!!n.activeFormats.length,{__unstableMarkLastChangeAsPersistent:l}=(0,m.useDispatch)(Vn);(0,s.useLayoutEffect)((()=>{if(o.current){if(o.current!==n.text){const e=window.setTimeout((()=>{l()}),1e3);return o.current=n.text,()=>{window.clearTimeout(e)}}l()}else o.current=n.text}),[t,r])}({html:Z,value:le});const ce=(0,s.useRef)(new Set),ue=(0,s.useRef)(new Set);function de(){V.current.focus()}const pe=l,me=(0,s.createElement)(s.Fragment,null,W&&(0,s.createElement)(Ek.Provider,{value:ce},(0,s.createElement)(Ck.Provider,{value:ue},(0,s.createElement)(p.Popover.__unstableSlotNameProvider,{value:"__unstable-block-tools-after"},o&&o({value:le,onChange:ie,onFocus:de}),(0,s.createElement)(yk,{value:le,onChange:ie,onFocus:de,formatTypes:J,forwardedRef:V})))),W&&Y&&(0,s.createElement)(lk,{inline:v,anchorRef:V.current}),(0,s.createElement)(pe,i({role:"textbox","aria-multiline":!0,"aria-label":y},F,ae,{ref:(0,d.useMergeRefs)([ae.ref,F.ref,se,hk({value:le,onChange:ie,__unstableAllowPrefixTransformations:O,formatTypes:J,onReplace:_}),(0,d.useRefEffect)((e=>{function t(e){(va.isKeyboardEvent.primary(e,"z")||va.isKeyboardEvent.primary(e,"y")||va.isKeyboardEvent.primaryShift(e,"z"))&&e.preventDefault()}return e.addEventListener("keydown",t),()=>{e.addEventListener("keydown",t)}}),[]),kk(ce),_k(ue),ik(),fk({isSelected:W,disableFormats:L,onChange:ie,value:le,formatTypes:J,tagName:l,onReplace:_,onSplit:I,onSplitMiddle:T,__unstableEmbedURLOnPaste:R,multilineTag:K,preserveWhiteSpace:P,pastePlainText:M}),gk({removeEditorOnlyFormats:re,value:le,onReplace:_,onSplit:I,onSplitMiddle:T,multilineTag:K,onChange:ie,disableLineBreaks:A,onSplitAtEnd:x}),V,n]),contentEditable:!$||void 0,suppressContentEditableWarning:!$,className:c()("block-editor-rich-text__editable",F.className,"rich-text"),onFocus:D,onKeyDown:function(e){const{keyCode:t}=e;if(!e.defaultPrevented&&(t===va.DELETE||t===va.BACKSPACE)){const{start:n,end:o,text:r}=le,l=t===va.BACKSPACE,i=le.activeFormats&&!!le.activeFormats.length;if(!(0,Mt.isCollapsed)(le)||i||l&&0!==n||!l&&o!==r.length)return;B&&B(!l),w&&(0,Mt.isEmpty)(le)&&l&&w(!l),e.preventDefault()}}})));if(!b)return me;Lt()("wp.blockEditor.RichText wrapperClassName prop",{since:"5.4",alternative:"className prop or create your own wrapper div"});const fe=c()("block-editor-rich-text",b);return(0,s.createElement)("div",{className:fe},me)}));Sk.Content=e=>{let{value:t,tagName:n,multiline:o,...l}=e;Array.isArray(t)&&(t=r.children.toHTML(t));const i=uk(o);!t&&i&&(t=`<${i}></${i}>`);const a=(0,s.createElement)(s.RawHTML,null,t);return n?(0,s.createElement)(n,(0,u.omit)(l,["format"]),a):a},Sk.isEmpty=e=>!e||0===e.length;var wk=Sk;const Bk=(0,s.forwardRef)(((e,t)=>(0,s.createElement)(wk,i({ref:t},e,{__unstableDisableFormats:!0,preserveWhiteSpace:!0}))));Bk.Content=e=>{let{value:t="",tagName:n="div",...o}=e;return(0,s.createElement)(n,o,t)};var Ik=Bk,xk=(0,s.forwardRef)(((e,t)=>{let{__experimentalVersion:n,...o}=e;if(2===n)return(0,s.createElement)(Ik,i({ref:t},o));const{className:r,onChange:l,...a}=o;return(0,s.createElement)(Er.Z,i({ref:t,className:c()("block-editor-plain-text",r),onChange:e=>l(e.target.value)},a))}));function Tk(e){let{property:t,viewport:n,desc:o}=e;const r=(0,d.useInstanceId)(Tk),l=o||(0,h.sprintf)(
79
  /* translators: 1: property name. 2: viewport name. */
80
- (0,h._x)("Controls the %1$s property for %2$s viewports.","Text labelling a interface as controlling a given layout property (eg: margin) for a given screen size."),t,n.label);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("span",{"aria-describedby":`rbc-desc-${r}`},n.label),(0,s.createElement)(p.VisuallyHidden,{as:"span",id:`rbc-desc-${r}`},l))}var Nk=function(e){const{title:t,property:n,toggleLabel:o,onIsResponsiveChange:r,renderDefaultControl:l,renderResponsiveControls:i,isResponsive:a=!1,defaultLabel:u={id:"all",
81
  /* translators: 'Label. Used to signify a layout property (eg: margin, padding) will apply uniformly to all screensizes.' */
82
  label:(0,h.__)("All")},viewports:d=[{id:"small",label:(0,h.__)("Small screens")},{id:"medium",label:(0,h.__)("Medium screens")},{id:"large",label:(0,h.__)("Large screens")}]}=e;if(!t||!n||!l)return null;const m=o||(0,h.sprintf)(
83
  /* translators: 'Toggle control label. Should the property be the same across all screen sizes or unique per screen size.'. %s property value for the control (eg: margin, padding...etc) */
84
- (0,h.__)("Use the same %s on all screensizes."),n),f=(0,h.__)("Toggle between using the same value for all screen sizes or using a unique value per screen size."),g=l((0,s.createElement)(Tk,{property:n,viewport:u}),u);
85
- /* translators: 'Help text for the responsive mode toggle control.' */return(0,s.createElement)("fieldset",{className:"block-editor-responsive-block-control"},(0,s.createElement)("legend",{className:"block-editor-responsive-block-control__title"},t),(0,s.createElement)("div",{className:"block-editor-responsive-block-control__inner"},(0,s.createElement)(p.ToggleControl,{className:"block-editor-responsive-block-control__toggle",label:m,checked:!a,onChange:r,help:f}),(0,s.createElement)("div",{className:c()("block-editor-responsive-block-control__group",{"is-responsive":a})},!a&&g,a&&(i?i(d):d.map((e=>(0,s.createElement)(s.Fragment,{key:e.id},l((0,s.createElement)(Tk,{property:n,viewport:e}),e))))))))};function Pk(e){let{character:t,type:n,onUse:o}=e;const r=(0,s.useContext)(Ek),l=(0,s.useRef)();return l.current=o,(0,s.useEffect)((()=>{function e(e){va.isKeyboardEvent[n](e,t)&&(l.current(),e.preventDefault())}return r.current.add(e),()=>{r.current.delete(e)}}),[t,n]),null}function Mk(e){let t,{name:n,shortcutType:o,shortcutCharacter:r,...l}=e,a="RichText.ToolbarControls";return n&&(a+=`.${n}`),o&&r&&(t=va.displayShortcut[o](r)),(0,s.createElement)(p.Fill,{name:a},(0,s.createElement)(p.ToolbarButton,i({},l,{shortcut:t})))}function Rk(e){let{inputType:t,onInput:n}=e;const o=(0,s.useContext)(Ck),r=(0,s.useRef)();return r.current=n,(0,s.useEffect)((()=>{function e(e){e.inputType===t&&(r.current(),e.preventDefault())}return o.current.add(e),()=>{o.current.delete(e)}}),[t]),null}const Lk=(0,s.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,s.createElement)(p.Path,{d:"M9.4 20.5L5.2 3.8l14.6 9-2 .3c-.2 0-.4.1-.7.1-.9.2-1.6.3-2.2.5-.8.3-1.4.5-1.8.8-.4.3-.8.8-1.3 1.5-.4.5-.8 1.2-1.2 2l-.3.6-.9 1.9zM7.6 7.1l2.4 9.3c.2-.4.5-.8.7-1.1.6-.8 1.1-1.4 1.6-1.8.5-.4 1.3-.8 2.2-1.1l1.2-.3-8.1-5z"}));var Ak=(0,s.forwardRef)((function(e,t){const n=(0,m.useSelect)((e=>e(Vn).isNavigationMode()),[]),{setNavigationMode:o}=(0,m.useDispatch)(Vn),r=e=>{o("edit"!==e)};return(0,s.createElement)(p.Dropdown,{renderToggle:o=>{let{isOpen:r,onToggle:l}=o;return(0,s.createElement)(p.Button,i({},e,{ref:t,icon:n?Lk:zb,"aria-expanded":r,"aria-haspopup":"true",onClick:l
86
- /* translators: button label text should, if possible, be under 16 characters. */,label:(0,h.__)("Tools")}))},position:"bottom right",renderContent:()=>(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.NavigableMenu,{role:"menu","aria-label":(0,h.__)("Tools")},(0,s.createElement)(p.MenuItemsChoice,{value:n?"select":"edit",onSelect:r,choices:[{value:"edit",label:(0,s.createElement)(s.Fragment,null,(0,s.createElement)(wo,{icon:zb}),(0,h.__)("Edit"))},{value:"select",label:(0,s.createElement)(s.Fragment,null,Lk,(0,h.__)("Select"))}]})),(0,s.createElement)("div",{className:"block-editor-tool-selector__help"},(0,h.__)("Tools provide different interactions for selecting, navigating, and editing blocks. Toggle between select and edit by pressing Escape and Enter.")))})}));function Dk(e){let{units:t,...n}=e;const o=(0,p.__experimentalUseCustomUnits)({availableUnits:mo("spacing.units")||["%","px","em","rem","vw"],units:t});return(0,s.createElement)(p.__experimentalUnitControl,i({units:o},n))}var Ok=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M20 10.8H6.7l4.1-4.5-1.1-1.1-5.8 6.3 5.8 5.8 1.1-1.1-4-3.9H20z"}));class Fk extends s.Component{constructor(){super(...arguments),this.toggle=this.toggle.bind(this),this.submitLink=this.submitLink.bind(this),this.state={expanded:!1}}toggle(){this.setState({expanded:!this.state.expanded})}submitLink(e){e.preventDefault(),this.toggle()}render(){const{url:e,onChange:t}=this.props,{expanded:n}=this.state,o=e?(0,h.__)("Edit link"):(0,h.__)("Insert link");return(0,s.createElement)("div",{className:"block-editor-url-input__button"},(0,s.createElement)(p.Button,{icon:Rm,label:o,onClick:this.toggle,className:"components-toolbar__control",isPressed:!!e}),n&&(0,s.createElement)("form",{className:"block-editor-url-input__button-modal",onSubmit:this.submitLink},(0,s.createElement)("div",{className:"block-editor-url-input__button-modal-line"},(0,s.createElement)(p.Button,{className:"block-editor-url-input__back",icon:Ok,label:(0,h.__)("Close"),onClick:this.toggle}),(0,s.createElement)(wb,{value:e||"",onChange:t}),(0,s.createElement)(p.Button,{icon:Eb,label:(0,h.__)("Submit"),type:"submit"}))))}}var zk=Fk,Vk=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));const Hk="none",Uk="custom",Gk="media",Wk="attachment",$k=["noreferrer","noopener"],jk=(0,s.createElement)(p.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(p.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),(0,s.createElement)(p.Path,{d:"m19 5v14h-14v-14h14m0-2h-14c-1.1 0-2 0.9-2 2v14c0 1.1 0.9 2 2 2h14c1.1 0 2-0.9 2-2v-14c0-1.1-0.9-2-2-2z"}),(0,s.createElement)(p.Path,{d:"m14.14 11.86l-3 3.87-2.14-2.59-3 3.86h12l-3.86-5.14z"})),Kk=e=>{let{linkDestination:t,onChangeUrl:n,url:o,mediaType:r="image",mediaUrl:l,mediaLink:i,linkTarget:a,linkClass:c,rel:d}=e;const[m,f]=(0,s.useState)(!1),g=(0,s.useCallback)((()=>{f(!0)})),[v,b]=(0,s.useState)(!1),[k,_]=(0,s.useState)(null),y=(0,s.useRef)(null),E=(0,s.useCallback)((()=>{t!==Gk&&t!==Wk||_(""),b(!0)})),C=(0,s.useCallback)((()=>{b(!1)})),S=(0,s.useCallback)((()=>{_(null),C(),f(!1)})),w=e=>{let t=e;return void 0===e||(0,u.isEmpty)(t)||(0,u.isEmpty)(t)||((0,u.each)($k,(e=>{const n=new RegExp("\\b"+e+"\\b","gi");t=t.replace(n,"")})),t!==e&&(t=t.trim()),(0,u.isEmpty)(t)&&(t=void 0)),t},B=(0,s.useCallback)((()=>e=>{const t=y.current;t&&t.contains(e.target)||(f(!1),_(null),C())})),I=(0,s.useCallback)((()=>e=>{if(k){var t;const e=(null===(t=T().find((e=>e.url===k)))||void 0===t?void 0:t.linkDestination)||Uk;n({href:k,linkDestination:e})}C(),_(null),e.preventDefault()})),x=(0,s.useCallback)((()=>{n({linkDestination:Hk,href:""})})),T=()=>{const e=[{linkDestination:Gk,title:(0,h.__)("Media File"),url:"image"===r?l:void 0,icon:jk}];return"image"===r&&i&&e.push({linkDestination:Wk,title:(0,h.__)("Attachment Page"),url:"image"===r?i:void 0,icon:(0,s.createElement)(p.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(p.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),(0,s.createElement)(p.Path,{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z"}))}),e},N=(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.ToggleControl,{label:(0,h.__)("Open in new tab"),onChange:e=>{const t=(e=>{const t=e?"_blank":void 0;let n;return n=t||d?w(d):void 0,{linkTarget:t,rel:n}})(e);n(t)},checked:"_blank"===a}),(0,s.createElement)(p.TextControl,{label:(0,h.__)("Link Rel"),value:w(d)||"",onChange:e=>{n({rel:e})}}),(0,s.createElement)(p.TextControl,{label:(0,h.__)("Link CSS Class"),value:c||"",onChange:e=>{n({linkClass:e})}})),P=null!==k?k:o,M=((0,u.find)(T(),["linkDestination",t])||{}).title;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.ToolbarButton,{icon:Rm,className:"components-toolbar__control",label:o?(0,h.__)("Edit link"):(0,h.__)("Insert link"),"aria-expanded":m,onClick:g}),m&&(0,s.createElement)(Jb,{onFocusOutside:B(),onClose:S,renderSettings:()=>N,additionalControls:!P&&(0,s.createElement)(p.NavigableMenu,null,(0,u.map)(T(),(e=>(0,s.createElement)(p.MenuItem,{key:e.linkDestination,icon:e.icon,onClick:()=>{_(null),(e=>{const t=T();let o;o=e?((0,u.find)(t,(t=>t.url===e))||{linkDestination:Uk}).linkDestination:Hk,n({linkDestination:o,href:e})})(e.url),C()}},e.title))))},(!o||v)&&(0,s.createElement)(Jb.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:P,onChangeInputValue:_,onSubmit:I(),autocompleteRef:y}),o&&!v&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Jb.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:o,onEditLinkClick:E,urlLabel:M}),(0,s.createElement)(p.Button,{icon:Vk,label:(0,h.__)("Remove link"),onClick:x}))))};function qk(e){let{children:t,className:n,isEnabled:o=!0,deviceType:r,setDeviceType:l}=e;if((0,d.useViewportMatch)("small","<"))return null;const i={className:c()(n,"block-editor-post-preview__dropdown-content"),position:"bottom left"},a={variant:"tertiary",className:"block-editor-post-preview__button-toggle",disabled:!o,
87
  /* translators: button label text should, if possible, be under 16 characters. */
88
- children:(0,h.__)("Preview")};return(0,s.createElement)(p.DropdownMenu,{className:"block-editor-post-preview__dropdown",popoverProps:i,toggleProps:a,icon:null},(()=>(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.MenuGroup,null,(0,s.createElement)(p.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>l("Desktop"),icon:"Desktop"===r&&rp},(0,h.__)("Desktop")),(0,s.createElement)(p.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>l("Tablet"),icon:"Tablet"===r&&rp},(0,h.__)("Tablet")),(0,s.createElement)(p.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>l("Mobile"),icon:"Mobile"===r&&rp},(0,h.__)("Mobile"))),t)))}function Yk(e){const[t,n]=(0,s.useState)(window.innerWidth);(0,s.useEffect)((()=>{if("Desktop"===e)return;const t=()=>n(window.innerWidth);return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}}),[e]);const o=e=>{let n;switch(e){case"Tablet":n=780;break;case"Mobile":n=360;break;default:return null}return n<t?n:t};return(e=>{const t="Mobile"===e?"768px":"1024px";switch(e){case"Tablet":case"Mobile":return{width:o(e),margin:(window.innerHeight<800?36:72)+"px auto",height:t,borderRadius:"2px 2px 2px 2px",border:"1px solid #ddd",overflowY:"auto"};default:return null}})(e)}var Zk=(0,m.withSelect)((e=>({selectedBlockClientId:e(Vn).getBlockSelectionStart()})))((e=>{let{selectedBlockClientId:t}=e;const n=Ba(t);return t?(0,s.createElement)(p.Button,{variant:"secondary",className:"block-editor-skip-to-selected-block",onClick:()=>{n.current.focus()}},(0,h.__)("Skip to the selected block")):null})),Xk=window.wp.wordcount,Qk=(0,m.withSelect)((e=>{const{getMultiSelectedBlocks:t}=e(Vn);return{blocks:t()}}))((function(e){let{blocks:t}=e;const n=(0,Xk.count)((0,r.serialize)(t),"words");return(0,s.createElement)("div",{className:"block-editor-multi-selection-inspector__card"},(0,s.createElement)(Ua,{icon:tp,showColors:!0}),(0,s.createElement)("div",{className:"block-editor-multi-selection-inspector__card-content"},(0,s.createElement)("div",{className:"block-editor-multi-selection-inspector__card-title"},(0,h.sprintf)(
89
  /* translators: %d: number of blocks */
90
  (0,h._n)("%d block","%d blocks",t.length),t.length)),(0,s.createElement)("div",{className:"block-editor-multi-selection-inspector__card-description"},(0,h.sprintf)(
91
  /* translators: %d: number of words */
92
- (0,h._n)("%d word","%d words",n),n))))}));function Jk(e){let{blockName:t}=e;const{preferredStyle:n,onUpdatePreferredStyleVariations:o,styles:l}=(0,m.useSelect)((e=>{var n,o;const l=e(Vn).getSettings().__experimentalPreferredStyleVariations;return{preferredStyle:null==l||null===(n=l.value)||void 0===n?void 0:n[t],onUpdatePreferredStyleVariations:null!==(o=null==l?void 0:l.onChange)&&void 0!==o?o:null,styles:e(r.store).getBlockStyles(t)}}),[t]),i=(0,s.useMemo)((()=>[{label:(0,h.__)("Not set"),value:""},...l.map((e=>{let{label:t,name:n}=e;return{label:t,value:n}}))]),[l]),a=(0,s.useMemo)((()=>{var e;return null===(e=ap(l))||void 0===e?void 0:e.name}),[l]),c=(0,s.useCallback)((e=>{o(t,e)}),[t,o]);return n&&n!==a?o&&(0,s.createElement)(p.SelectControl,{options:i,value:n||"",label:(0,h.__)("Default Style"),onChange:c}):null}const e_=e=>{let{clientId:t,blockName:n,hasBlockStyles:o,bubblesVirtually:l}=e;const i=Rd(t);return(0,s.createElement)("div",{className:"block-editor-block-inspector"},(0,s.createElement)(Ga,i),(0,s.createElement)(Nv,{blockClientId:t}),o&&(0,s.createElement)("div",null,(0,s.createElement)(p.PanelBody,{title:(0,h.__)("Styles")},(0,s.createElement)(gv,{scope:"core/edit-post",clientId:t,className:"block-inspector__block-styles"}),(0,r.hasBlockSupport)(n,"defaultStylePicker",!0)&&(0,s.createElement)(Jk,{blockName:n}))),(0,s.createElement)(er.Slot,{bubblesVirtually:l}),(0,s.createElement)(er.Slot,{__experimentalGroup:"typography",bubblesVirtually:l,label:(0,h.__)("Typography")}),(0,s.createElement)(er.Slot,{__experimentalGroup:"dimensions",bubblesVirtually:l,label:(0,h.__)("Dimensions")}),(0,s.createElement)("div",null,(0,s.createElement)(t_,{bubblesVirtually:l})),(0,s.createElement)(Zk,{key:"back"}))},t_=e=>{let{bubblesVirtually:t}=e;const n=(0,p.__experimentalUseSlot)(Jo.slotName);return Boolean(n.fills&&n.fills.length)?(0,s.createElement)(p.PanelBody,{className:"block-editor-block-inspector__advanced",title:(0,h.__)("Advanced"),initialOpen:!1},(0,s.createElement)(er.Slot,{__experimentalGroup:"advanced",bubblesVirtually:t})):null};var n_=e=>{let{showNoBlockSelectedMessage:t=!0,bubblesVirtually:n=!0}=e;const{count:o,hasBlockStyles:l,selectedBlockName:i,selectedBlockClientId:a,blockType:c}=(0,m.useSelect)((e=>{const{getSelectedBlockClientId:t,getSelectedBlockCount:n,getBlockName:o}=e(Vn),{getBlockStyles:l}=e(r.store),i=t(),s=i&&o(i),a=s&&(0,r.getBlockType)(s),c=s&&l(s);return{count:n(),selectedBlockClientId:i,selectedBlockName:s,blockType:a,hasBlockStyles:c&&c.length>0}}),[]);if(o>1)return(0,s.createElement)("div",{className:"block-editor-block-inspector"},(0,s.createElement)(Qk,null),(0,s.createElement)(er.Slot,{bubblesVirtually:n}));const u=i===(0,r.getUnregisteredTypeHandlerName)();return c&&a&&!u?(0,s.createElement)(e_,{clientId:a,blockName:c.name,hasBlockStyles:l,bubblesVirtually:n}):t?(0,s.createElement)("span",{className:"block-editor-block-inspector__no-blocks"},(0,h.__)("No block selected.")):null};function o_(e){let{children:t,__unstableContentRef:n,...o}=e;const r=(0,d.useViewportMatch)("medium"),l=(0,m.useSelect)((e=>e(Vn).getSettings().hasFixedToolbar),[]),a=(0,tc.__unstableUseShortcutEventMatch)(),{getSelectedBlockClientIds:c,getBlockRootClientId:f}=(0,m.useSelect)(Vn),{duplicateBlocks:h,removeBlocks:g,insertAfterBlock:v,insertBeforeBlock:b,clearSelectedBlock:k,moveBlocksUp:_,moveBlocksDown:y}=(0,m.useDispatch)(Vn);return(0,s.createElement)("div",i({},o,{onKeyDown:function(e){if(a("core/block-editor/move-up",e)){const t=c();if(t.length){e.preventDefault();const n=f((0,u.first)(t));_(t,n)}}else if(a("core/block-editor/move-down",e)){const t=c();if(t.length){e.preventDefault();const n=f((0,u.first)(t));y(t,n)}}else if(a("core/block-editor/duplicate",e)){const t=c();t.length&&(e.preventDefault(),h(t))}else if(a("core/block-editor/remove",e)){const t=c();t.length&&(e.preventDefault(),g(t))}else if(a("core/block-editor/insert-after",e)){const t=c();t.length&&(e.preventDefault(),v((0,u.last)(t)))}else if(a("core/block-editor/insert-before",e)){const t=c();t.length&&(e.preventDefault(),b((0,u.first)(t)))}else if(a("core/block-editor/delete-multi-selection",e)){const t=c();t.length>1&&(e.preventDefault(),g(t))}else a("core/block-editor/unselect",e)&&c().length>1&&(e.preventDefault(),k(),e.target.ownerDocument.defaultView.getSelection().removeAllRanges())}}),(0,s.createElement)(Td,{__unstableContentRef:n},(l||!r)&&(0,s.createElement)(Hp,{isFixed:!0}),(0,s.createElement)($p,{__unstableContentRef:n}),(0,s.createElement)(p.Popover.Slot,{name:"block-toolbar",ref:Bd(n)}),t,(0,s.createElement)(p.Popover.Slot,{name:"__unstable-block-tools-after",ref:Bd(n)})))}var r_=function(e){let{rootClientId:t,clientId:n,isAppender:o,showInserterHelpPanel:r,showMostUsedBlocks:l=!1,__experimentalInsertionIndex:i,__experimentalFilterValue:a,onSelect:c=u.noop,shouldFocusBlock:d=!1}=e;const p=(0,m.useSelect)((e=>{const{getBlockRootClientId:o}=e(Vn);return t||o(n)||void 0}),[n,t]);return(0,s.createElement)(gd,{onSelect:c,rootClientId:p,clientId:n,isAppender:o,showInserterHelpPanel:r,showMostUsedBlocks:l,__experimentalInsertionIndex:i,__experimentalFilterValue:a,shouldFocusBlock:d})};function l_(){return null}l_.Register=function(){const{registerShortcut:e}=(0,m.useDispatch)(tc.store);return(0,s.useEffect)((()=>{e({name:"core/block-editor/duplicate",category:"block",description:(0,h.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:(0,h.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/insert-before",category:"block",description:(0,h.__)("Insert a new block before the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"t"}}),e({name:"core/block-editor/insert-after",category:"block",description:(0,h.__)("Insert a new block after the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"y"}}),e({name:"core/block-editor/delete-multi-selection",category:"block",description:(0,h.__)("Remove multiple selected blocks."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:(0,h.__)("Select all text when typing. Press again to select all blocks."),keyCombination:{modifier:"primary",character:"a"}}),e({name:"core/block-editor/unselect",category:"selection",description:(0,h.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:(0,h.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:(0,h.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:(0,h.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}})}),[e]),null};var i_=l_;function s_(){return Lt()("wp.blockEditor.MultiSelectScrollIntoView",{hint:"This behaviour is now built-in."}),null}const a_=new Set([va.UP,va.RIGHT,va.DOWN,va.LEFT,va.ENTER,va.BACKSPACE]);function c_(){const e=(0,m.useSelect)((e=>e(Vn).isTyping()),[]),{stopTyping:t}=(0,m.useDispatch)(Vn);return(0,d.useRefEffect)((n=>{if(!e)return;const{ownerDocument:o}=n;let r,l;function i(e){const{clientX:n,clientY:o}=e;r&&l&&(r!==n||l!==o)&&t(),r=n,l=o}return o.addEventListener("mousemove",i),()=>{o.removeEventListener("mousemove",i)}}),[e,t])}function u_(){const e=(0,m.useSelect)((e=>e(Vn).isTyping())),{startTyping:t,stopTyping:n}=(0,m.useDispatch)(Vn),o=c_(),r=(0,d.useRefEffect)((o=>{const{ownerDocument:r}=o,{defaultView:l}=r;if(e){let e;function t(t){const{target:o}=t;e=l.setTimeout((()=>{(0,rr.isTextField)(o)||n()}))}function i(e){const{keyCode:t}=e;t!==va.ESCAPE&&t!==va.TAB||n()}function s(){const e=l.getSelection();e.rangeCount>0&&e.getRangeAt(0).collapsed||n()}return o.addEventListener("focus",t),o.addEventListener("keydown",i),r.addEventListener("selectionchange",s),()=>{l.clearTimeout(e),o.removeEventListener("focus",t),o.removeEventListener("keydown",i),r.removeEventListener("selectionchange",s)}}function i(e){const{type:n,target:r}=e;(0,rr.isTextField)(r)&&o.contains(r)&&("keydown"!==n||function(e){const{keyCode:t,shiftKey:n}=e;return!n&&a_.has(t)}(e))&&t()}return o.addEventListener("keypress",i),o.addEventListener("keydown",i),()=>{o.removeEventListener("keypress",i),o.removeEventListener("keydown",i)}}),[e,t,n]);return(0,d.useMergeRefs)([o,r])}var d_=function(e){let{children:t}=e;return(0,s.createElement)("div",{ref:u_()},t)};function p_(){return Lt()("PreserveScrollInReorder component",{since:"5.4",hint:"This behavior is now built-in the block list"}),null}const m_=-1!==window.navigator.userAgent.indexOf("Trident"),f_=new Set([va.UP,va.DOWN,va.LEFT,va.RIGHT]);function h_(){const e=(0,m.useSelect)((e=>e(Vn).hasSelectedBlock()),[]);return(0,d.useRefEffect)((t=>{if(!e)return;const{ownerDocument:n}=t,{defaultView:o}=n;let r,l,i;function s(){r||(r=o.requestAnimationFrame((()=>{p(),r=null})))}function a(e){l&&o.cancelAnimationFrame(l),l=o.requestAnimationFrame((()=>{c(e),l=null}))}function c(e){let{keyCode:r}=e;if(!m())return;const l=(0,rr.computeCaretRect)(o);if(!l)return;if(!i)return void(i=l);if(f_.has(r))return void(i=l);const s=l.top-i.top;if(0===s)return;const a=(0,rr.getScrollContainer)(t);if(!a)return;const c=a===n.body,u=c?o.scrollY:a.scrollTop,d=c?0:a.getBoundingClientRect().top,p=c?i.top/o.innerHeight:(i.top-d)/(o.innerHeight-d);if(0===u&&p<.75&&function(){const e=t.querySelectorAll('[contenteditable="true"]');return e[e.length-1]===n.activeElement}())return void(i=l);const f=c?o.innerHeight:a.clientHeight;i.top+i.height>d+f||i.top<d?i=l:c?o.scrollBy(0,s):a.scrollTop+=s}function u(){n.addEventListener("selectionchange",d)}function d(){n.removeEventListener("selectionchange",d),p()}function p(){m()&&(i=(0,rr.computeCaretRect)(o))}function m(){return t.contains(n.activeElement)&&n.activeElement.isContentEditable}return o.addEventListener("scroll",s,!0),o.addEventListener("resize",s,!0),t.addEventListener("keydown",a),t.addEventListener("keyup",c),t.addEventListener("mousedown",u),t.addEventListener("touchstart",u),()=>{o.removeEventListener("scroll",s,!0),o.removeEventListener("resize",s,!0),t.removeEventListener("keydown",a),t.removeEventListener("keyup",c),t.removeEventListener("mousedown",u),t.removeEventListener("touchstart",u),n.removeEventListener("selectionchange",d),o.cancelAnimationFrame(r),o.cancelAnimationFrame(l)}}),[e])}var g_=m_?e=>e.children:function(e){let{children:t}=e;return(0,s.createElement)("div",{ref:h_(),className:"block-editor__typewriter"},t)};const v_=(0,u.overEvery)([rr.isTextField,rr.focus.tabbable.isTabbableIndex]);function b_(){return(0,d.useRefEffect)((e=>{function t(t){if(t.target!==e)return;const n=rr.focus.focusable.find(e),o=(0,u.findLast)(n,v_);if(!o)return;const{bottom:r}=o.getBoundingClientRect();t.clientY<r||((0,rr.placeCaretAtHorizontalEdge)(o,!0),t.preventDefault())}return e.addEventListener("mousedown",t),()=>{e.addEventListener("mousedown",t)}}),[])}const k_=(0,s.createContext)({});function y_(e,t,n){const o={...e,[t]:e[t]?new Set(e[t]):new Set};return o[t].add(n),o}function E_(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const o=(0,s.useContext)(k_),{name:r}=Wn();n=n||r;const l=Boolean(null===(t=o[n])||void 0===t?void 0:t.has(e)),i=(0,s.useMemo)((()=>y_(o,n,e)),[o,n,e]),a=(0,s.useCallback)((e=>{let{children:t}=e;return(0,s.createElement)(k_.Provider,{value:i},t)}),[i]);return[l,a]}function C_(e){if(void 0===e)e=v.colors;else{const t=e.filter((e=>e.color));0===t.length?e=v.colors:t.length<e.length&&(e=t)}return e}function S_(e){if(void 0===e)e=v.gradients;else{const t=e.filter((e=>e.gradient));0===t.length?e=v.gradients:t.length<e.length&&(e=t)}return e}function w_(e){const t=null==e?void 0:e.trim().match(/^(0?[-.]?\d+)(r?e[m|x]|v[h|w|min|max]+|p[x|t|c]|[c|m]m|%|in|ch|Q|lh)$/);return isNaN(e)||isNaN(parseFloat(e))?t?{value:parseFloat(t[1])||t[1],unit:t[2]}:{value:e,unit:void 0}:{value:parseFloat(e),unit:"px"}}function B_(e,t){const n=e.split(/[(),]/g).filter(Boolean),o=n.slice(1).map((e=>w_(P_(e,t)).value)).filter(Boolean);switch(n[0]){case"min":return Math.min(...o)+"px";case"max":return Math.max(...o)+"px";case"clamp":return 3!==o.length?null:o[1]<o[0]?o[0]+"px":o[1]>o[2]?o[2]+"px":o[1]+"px";case"calc":return o[0]+"px"}}function I_(e){for(;;){const t=e,n=/(max|min|calc|clamp)\(([^()]*)\)/g.exec(e)||[];if(n[0]){const t=B_(n[0]);e=e.replace(n[0],t)}if(e===t||parseFloat(e))break}return w_(e)}function x_(e){for(let t=0;t<e.length;t++)if(["+","-","/","*"].includes(e[t]))return!0;return!1}function T_(e){let t=!1;const n=e.split(/[+-/*/]/g).filter(Boolean);for(const o of n){const n=w_(P_(o));if(!parseFloat(n.value)){t=!0;break}e=e.replace(o,n.value)}return t?null:(o=e,Function(`'use strict'; return (${o})`)()).toFixed(0)+"px";var o}function N_(e,t){const n=.01,o=Object.assign({},{fontSize:16,lineHeight:16,width:375,height:812,type:"font"},t),r={em:o.fontSize,rem:o.fontSize,vh:o.height*n,vw:o.width*n,vmin:(o.width<o.height?o.width:o.height)*n,vmax:(o.width>o.height?o.width:o.height)*n,"%":("font"===o.type?o.fontSize:o.width)*n,ch:8,ex:7.15625,lh:o.lineHeight},l={in:96,cm:37.79527559055118,mm:3.7795275590551185,pt:1.3333333333333333,pc:16,px:1,Q:.9448818897637794};return r[e.unit]?(r[e.unit]*e.value).toFixed(0)+"px":l[e.unit]?(l[e.unit]*e.value).toFixed(0)+"px":null}function P_(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Number.isFinite(e))return e.toFixed(0)+"px";if(void 0===e)return null;let n=w_(e);return n.unit||(n=I_(e)),x_(e)&&!n.unit?T_(e):N_(n,t)}const M_={};function R_(e){let t="";return e.hasOwnProperty("fontSize")&&(t=":"+e.width),e.hasOwnProperty("lineHeight")&&(t=":"+e.lineHeight),e.hasOwnProperty("width")&&(t=":"+e.width),e.hasOwnProperty("height")&&(t=":"+e.height),e.hasOwnProperty("type")&&(t=":"+e.type),t}var L_=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e+R_(t);return M_[n]||(M_[n]=P_(e,t)),M_[n]}}(),(window.wp=window.wp||{}).blockEditor=o}();
1
+ !function(){var e={9367:function(e,t){var n,o;void 0===(o="function"==typeof(n=function(e,t){"use strict";var n,o,r="function"==typeof Map?new Map:(n=[],o=[],{has:function(e){return n.indexOf(e)>-1},get:function(e){return o[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),o.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),o.splice(t,1))}}),l=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){l=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function i(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!r.has(e)){var t=null,n=null,o=null,i=function(){e.clientWidth!==n&&d()},s=function(t){window.removeEventListener("resize",i,!1),e.removeEventListener("input",d,!1),e.removeEventListener("keyup",d,!1),e.removeEventListener("autosize:destroy",s,!1),e.removeEventListener("autosize:update",d,!1),Object.keys(t).forEach((function(n){e.style[n]=t[n]})),r.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",s,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",d,!1),window.addEventListener("resize",i,!1),e.addEventListener("input",d,!1),e.addEventListener("autosize:update",d,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",r.set(e,{destroy:s,update:d}),"vertical"===(a=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===a.resize&&(e.style.resize="horizontal"),t="content-box"===a.boxSizing?-(parseFloat(a.paddingTop)+parseFloat(a.paddingBottom)):parseFloat(a.borderTopWidth)+parseFloat(a.borderBottomWidth),isNaN(t)&&(t=0),d()}var a;function c(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function u(){if(0!==e.scrollHeight){var o=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}(e),r=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+t+"px",n=e.clientWidth,o.forEach((function(e){e.node.scrollTop=e.scrollTop})),r&&(document.documentElement.scrollTop=r)}}function d(){u();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),r="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(r<t?"hidden"===n.overflowY&&(c("scroll"),u(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(c("hidden"),u(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),o!==r){o=r;var i=l("autosize:resized");try{e.dispatchEvent(i)}catch(e){}}}}function s(e){var t=r.get(e);t&&t.destroy()}function a(e){var t=r.get(e);t&&t.update()}var c=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((c=function(e){return e}).destroy=function(e){return e},c.update=function(e){return e}):((c=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return i(e)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],s),e},c.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],a),e}),t.default=c,e.exports=t.default})?n.apply(t,[e,t]):n)||(e.exports=o)},4184:function(e,t){var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var l=typeof n;if("string"===l||"number"===l)e.push(n);else if(Array.isArray(n)){if(n.length){var i=r.apply(null,n);i&&e.push(i)}}else if("object"===l)if(n.toString===Object.prototype.toString)for(var s in n)o.call(n,s)&&n[s]&&e.push(s);else e.push(n.toString())}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},1934:function(e){e.exports=function(e,t,n){return((n=window.getComputedStyle)?n(e):e.currentStyle)[t.replace(/-(\w)/gi,(function(e,t){return t.toUpperCase()}))]}},5913:function(e,t){"use strict";function n(){}function o(e,t,n,o,r){for(var l=0,i=t.length,s=0,a=0;l<i;l++){var c=t[l];if(c.removed){if(c.value=e.join(o.slice(a,a+c.count)),a+=c.count,l&&t[l-1].added){var u=t[l-1];t[l-1]=t[l],t[l]=u}}else{if(!c.added&&r){var d=n.slice(s,s+c.count);d=d.map((function(e,t){var n=o[a+t];return n.length>e.length?n:e})),c.value=e.join(d)}else c.value=e.join(n.slice(s,s+c.count));s+=c.count,c.added||(a+=c.count)}}var p=t[i-1];return i>1&&"string"==typeof p.value&&(p.added||p.removed)&&e.equals("",p.value)&&(t[i-2].value+=p.value,t.pop()),t}function r(e){return{newPos:e.newPos,components:e.components.slice(0)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,n.prototype={diff:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=n.callback;"function"==typeof n&&(l=n,n={}),this.options=n;var i=this;function s(e){return l?(setTimeout((function(){l(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var a=(t=this.removeEmpty(this.tokenize(t))).length,c=e.length,u=1,d=a+c,p=[{newPos:-1,components:[]}],m=this.extractCommon(p[0],t,e,0);if(p[0].newPos+1>=a&&m+1>=c)return s([{value:this.join(t),count:t.length}]);function f(){for(var n=-1*u;n<=u;n+=2){var l=void 0,d=p[n-1],m=p[n+1],f=(m?m.newPos:0)-n;d&&(p[n-1]=void 0);var h=d&&d.newPos+1<a,g=m&&0<=f&&f<c;if(h||g){if(!h||g&&d.newPos<m.newPos?(l=r(m),i.pushComponent(l.components,void 0,!0)):((l=d).newPos++,i.pushComponent(l.components,!0,void 0)),f=i.extractCommon(l,t,e,n),l.newPos+1>=a&&f+1>=c)return s(o(i,l.components,t,e,i.useLongestToken));p[n]=l}else p[n]=void 0}u++}if(l)!function e(){setTimeout((function(){if(u>d)return l();f()||e()}),0)}();else for(;u<=d;){var h=f();if(h)return h}},pushComponent:function(e,t,n){var o=e[e.length-1];o&&o.added===t&&o.removed===n?e[e.length-1]={count:o.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,o){for(var r=t.length,l=n.length,i=e.newPos,s=i-o,a=0;i+1<r&&s+1<l&&this.equals(t[i+1],n[s+1]);)i++,s++,a++;return a&&e.components.push({count:a}),e.newPos=i,s},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}}},7630:function(e,t,n){"use strict";var o;t.Kx=function(e,t,n){return r.diff(e,t,n)};var r=new(((o=n(5913))&&o.__esModule?o:{default:o}).default)},9010:function(e,t,n){"use strict";var o=n(4657);e.exports=function(e,t,n){n=n||{},9===t.nodeType&&(t=o.getWindow(t));var r=n.allowHorizontalScroll,l=n.onlyScrollIfNeeded,i=n.alignWithTop,s=n.alignWithLeft,a=n.offsetTop||0,c=n.offsetLeft||0,u=n.offsetBottom||0,d=n.offsetRight||0;r=void 0===r||r;var p=o.isWindow(t),m=!(!p||!t.frameElement),f=o.offset(e),h=o.outerHeight(e),g=o.outerWidth(e),v=void 0,b=void 0,k=void 0,_=void 0,y=void 0,E=void 0,C=void 0,S=void 0,w=void 0,B=void 0;m&&(t=t.document.scrollingElement||t.document.body),p||m?(C=t,B=o.height(C),w=o.width(C),S={left:o.scrollLeft(C),top:o.scrollTop(C)},y={left:f.left-S.left-c,top:f.top-S.top-a},E={left:f.left+g-(S.left+w)+d,top:f.top+h-(S.top+B)+u},_=S):(v=o.offset(t),b=t.clientHeight,k=t.clientWidth,_={left:t.scrollLeft,top:t.scrollTop},y={left:f.left-(v.left+(parseFloat(o.css(t,"borderLeftWidth"))||0))-c,top:f.top-(v.top+(parseFloat(o.css(t,"borderTopWidth"))||0))-a},E={left:f.left+g-(v.left+k+(parseFloat(o.css(t,"borderRightWidth"))||0))+d,top:f.top+h-(v.top+b+(parseFloat(o.css(t,"borderBottomWidth"))||0))+u}),y.top<0||E.top>0?!0===i?o.scrollTop(t,_.top+y.top):!1===i?o.scrollTop(t,_.top+E.top):y.top<0?o.scrollTop(t,_.top+y.top):o.scrollTop(t,_.top+E.top):l||((i=void 0===i||!!i)?o.scrollTop(t,_.top+y.top):o.scrollTop(t,_.top+E.top)),r&&(y.left<0||E.left>0?!0===s?o.scrollLeft(t,_.left+y.left):!1===s?o.scrollLeft(t,_.left+E.left):y.left<0?o.scrollLeft(t,_.left+y.left):o.scrollLeft(t,_.left+E.left):l||((s=void 0===s||!!s)?o.scrollLeft(t,_.left+y.left):o.scrollLeft(t,_.left+E.left)))}},4979:function(e,t,n){"use strict";e.exports=n(9010)},4657:function(e){"use strict";var t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function o(e,t){var n=e["page"+(t?"Y":"X")+"Offset"],o="scroll"+(t?"Top":"Left");if("number"!=typeof n){var r=e.document;"number"!=typeof(n=r.documentElement[o])&&(n=r.body[o])}return n}function r(e){return o(e)}function l(e){return o(e,!0)}function i(e){var t=function(e){var t,n=void 0,o=void 0,r=e.ownerDocument,l=r.body,i=r&&r.documentElement;return n=(t=e.getBoundingClientRect()).left,o=t.top,{left:n-=i.clientLeft||l.clientLeft||0,top:o-=i.clientTop||l.clientTop||0}}(e),n=e.ownerDocument,o=n.defaultView||n.parentWindow;return t.left+=r(o),t.top+=l(o),t}var s=new RegExp("^("+/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source+")(?!px)[a-z%]+$","i"),a=/^(top|right|bottom|left)$/,c=void 0;function u(e,t){for(var n=0;n<e.length;n++)t(e[n])}function d(e){return"border-box"===c(e,"boxSizing")}"undefined"!=typeof window&&(c=window.getComputedStyle?function(e,t,n){var o="",r=e.ownerDocument,l=n||r.defaultView.getComputedStyle(e,null);return l&&(o=l.getPropertyValue(t)||l[t]),o}:function(e,t){var n=e.currentStyle&&e.currentStyle[t];if(s.test(n)&&!a.test(t)){var o=e.style,r=o.left,l=e.runtimeStyle.left;e.runtimeStyle.left=e.currentStyle.left,o.left="fontSize"===t?"1em":n||0,n=o.pixelLeft+"px",o.left=r,e.runtimeStyle.left=l}return""===n?"auto":n});var p=["margin","border","padding"];function m(e,t,n){var o={},r=e.style,l=void 0;for(l in t)t.hasOwnProperty(l)&&(o[l]=r[l],r[l]=t[l]);for(l in n.call(e),t)t.hasOwnProperty(l)&&(r[l]=o[l])}function f(e,t,n){var o=0,r=void 0,l=void 0,i=void 0;for(l=0;l<t.length;l++)if(r=t[l])for(i=0;i<n.length;i++){var s;s="border"===r?r+n[i]+"Width":r+n[i],o+=parseFloat(c(e,s))||0}return o}function h(e){return null!=e&&e==e.window}var g={};function v(e,t,n){if(h(e))return"width"===t?g.viewportWidth(e):g.viewportHeight(e);if(9===e.nodeType)return"width"===t?g.docWidth(e):g.docHeight(e);var o="width"===t?["Left","Right"]:["Top","Bottom"],r="width"===t?e.offsetWidth:e.offsetHeight,l=(c(e),d(e)),i=0;(null==r||r<=0)&&(r=void 0,(null==(i=c(e,t))||Number(i)<0)&&(i=e.style[t]||0),i=parseFloat(i)||0),void 0===n&&(n=l?1:-1);var s=void 0!==r||l,a=r||i;if(-1===n)return s?a-f(e,["border","padding"],o):i;if(s){var u=2===n?-f(e,["border"],o):f(e,["margin"],o);return a+(1===n?0:u)}return i+f(e,p.slice(n),o)}u(["Width","Height"],(function(e){g["doc"+e]=function(t){var n=t.document;return Math.max(n.documentElement["scroll"+e],n.body["scroll"+e],g["viewport"+e](n))},g["viewport"+e]=function(t){var n="client"+e,o=t.document,r=o.body,l=o.documentElement[n];return"CSS1Compat"===o.compatMode&&l||r&&r[n]||l}}));var b={position:"absolute",visibility:"hidden",display:"block"};function k(e){var t=void 0,n=arguments;return 0!==e.offsetWidth?t=v.apply(void 0,n):m(e,b,(function(){t=v.apply(void 0,n)})),t}function _(e,t,o){var r=o;if("object"!==(void 0===t?"undefined":n(t)))return void 0!==r?("number"==typeof r&&(r+="px"),void(e.style[t]=r)):c(e,t);for(var l in t)t.hasOwnProperty(l)&&_(e,l,t[l])}u(["width","height"],(function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);g["outer"+t]=function(t,n){return t&&k(t,e,n?0:1)};var n="width"===e?["Left","Right"]:["Top","Bottom"];g[e]=function(t,o){return void 0===o?t&&k(t,e,-1):t?(c(t),d(t)&&(o+=f(t,["padding","border"],n)),_(t,e,o)):void 0}})),e.exports=t({getWindow:function(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow},offset:function(e,t){if(void 0===t)return i(e);!function(e,t){"static"===_(e,"position")&&(e.style.position="relative");var n=i(e),o={},r=void 0,l=void 0;for(l in t)t.hasOwnProperty(l)&&(r=parseFloat(_(e,l))||0,o[l]=r+t[l]-n[l]);_(e,o)}(e,t)},isWindow:h,each:u,css:_,clone:function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);if(e.overflow)for(var n in e)e.hasOwnProperty(n)&&(t.overflow[n]=e.overflow[n]);return t},scrollLeft:function(e,t){if(h(e)){if(void 0===t)return r(e);window.scrollTo(t,l(e))}else{if(void 0===t)return e.scrollLeft;e.scrollLeft=t}},scrollTop:function(e,t){if(h(e)){if(void 0===t)return l(e);window.scrollTo(r(e),t)}else{if(void 0===t)return e.scrollTop;e.scrollTop=t}},viewportWidth:0,viewportHeight:0},g)},5717:function(e){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},8303:function(e,t,n){var o=n(1934);e.exports=function(e){var t=o(e,"line-height"),n=parseFloat(t,10);if(t===n+""){var r=e.style.lineHeight;e.style.lineHeight=t+"em",t=o(e,"line-height"),n=parseFloat(t,10),r?e.style.lineHeight=r:delete e.style.lineHeight}if(-1!==t.indexOf("pt")?(n*=4,n/=3):-1!==t.indexOf("mm")?(n*=96,n/=25.4):-1!==t.indexOf("cm")?(n*=96,n/=2.54):-1!==t.indexOf("in")?n*=96:-1!==t.indexOf("pc")&&(n*=16),n=Math.round(n),"normal"===t){var l=e.nodeName,i=document.createElement(l);i.innerHTML="&nbsp;","TEXTAREA"===l.toUpperCase()&&i.setAttribute("rows","1");var s=o(e,"font-size");i.style.fontSize=s,i.style.padding="0px",i.style.border="0px";var a=document.body;a.appendChild(i),n=i.offsetHeight,a.removeChild(i)}return n}},2703:function(e,t,n){"use strict";var o=n(414);function r(){}function l(){}l.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,l,i){if(i!==o){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:l,resetWarningCache:r};return n.PropTypes=n,n}},5697:function(e,t,n){e.exports=n(2703)()},414:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},4857:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),l=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&(n[o[r]]=e[o[r]])}return n};t.__esModule=!0;var s=n(3804),a=n(5697),c=n(9367),u=n(8303),d="autosize:resized",p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.textarea=null,t.onResize=function(e){t.props.onResize&&t.props.onResize(e)},t.updateLineHeight=function(){t.textarea&&t.setState({lineHeight:u(t.textarea)})},t.onChange=function(e){var n=t.props.onChange;t.currentValue=e.currentTarget.value,n&&n(e)},t}return r(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.maxRows,o=t.async;"number"==typeof n&&this.updateLineHeight(),"number"==typeof n||o?setTimeout((function(){return e.textarea&&c(e.textarea)})):this.textarea&&c(this.textarea),this.textarea&&this.textarea.addEventListener(d,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(d,this.onResize),c.destroy(this.textarea))},t.prototype.render=function(){var e=this,t=this.props,n=(t.onResize,t.maxRows),o=(t.onChange,t.style),r=(t.innerRef,t.children),a=i(t,["onResize","maxRows","onChange","style","innerRef","children"]),c=this.state.lineHeight,u=n&&c?c*n:null;return s.createElement("textarea",l({},a,{onChange:this.onChange,style:u?l({},o,{maxHeight:u}):o,ref:function(t){e.textarea=t,"function"==typeof e.props.innerRef?e.props.innerRef(t):e.props.innerRef&&(e.props.innerRef.current=t)}}),r)},t.prototype.componentDidUpdate=function(){this.textarea&&c.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:a.number,maxRows:a.number,onResize:a.func,innerRef:a.any,async:a.bool},t}(s.Component);t.TextareaAutosize=s.forwardRef((function(e,t){return s.createElement(p,l({},e,{innerRef:t}))}))},4042:function(e,t,n){"use strict";var o=n(4857);t.Z=o.TextareaAutosize},3692:function(e){var t=e.exports=function(e){return new n(e)};function n(e){this.value=e}function o(e,t,n){var o=[],i=[],u=!0;return function e(d){var p=n?r(d):d,m={},f=!0,h={node:p,node_:d,path:[].concat(o),parent:i[i.length-1],parents:i,key:o.slice(-1)[0],isRoot:0===o.length,level:o.length,circular:null,update:function(e,t){h.isRoot||(h.parent.node[h.key]=e),h.node=e,t&&(f=!1)},delete:function(e){delete h.parent.node[h.key],e&&(f=!1)},remove:function(e){s(h.parent.node)?h.parent.node.splice(h.key,1):delete h.parent.node[h.key],e&&(f=!1)},keys:null,before:function(e){m.before=e},after:function(e){m.after=e},pre:function(e){m.pre=e},post:function(e){m.post=e},stop:function(){u=!1},block:function(){f=!1}};if(!u)return h;function g(){if("object"==typeof h.node&&null!==h.node){h.keys&&h.node_===h.node||(h.keys=l(h.node)),h.isLeaf=0==h.keys.length;for(var e=0;e<i.length;e++)if(i[e].node_===d){h.circular=i[e];break}}else h.isLeaf=!0,h.keys=null;h.notLeaf=!h.isLeaf,h.notRoot=!h.isRoot}g();var v=t.call(h,h.node);return void 0!==v&&h.update&&h.update(v),m.before&&m.before.call(h,h.node),f?("object"!=typeof h.node||null===h.node||h.circular||(i.push(h),g(),a(h.keys,(function(t,r){o.push(t),m.pre&&m.pre.call(h,h.node[t],t);var l=e(h.node[t]);n&&c.call(h.node,t)&&(h.node[t]=l.node),l.isLast=r==h.keys.length-1,l.isFirst=0==r,m.post&&m.post.call(h,l),o.pop()})),i.pop()),m.after&&m.after.call(h,h.node),h):h}(e).node}function r(e){if("object"==typeof e&&null!==e){var t;if(s(e))t=[];else if("[object Date]"===i(e))t=new Date(e.getTime?e.getTime():e);else if("[object RegExp]"===i(e))t=new RegExp(e);else if(function(e){return"[object Error]"===i(e)}(e))t={message:e.message};else if(function(e){return"[object Boolean]"===i(e)}(e))t=new Boolean(e);else if(function(e){return"[object Number]"===i(e)}(e))t=new Number(e);else if(function(e){return"[object String]"===i(e)}(e))t=new String(e);else if(Object.create&&Object.getPrototypeOf)t=Object.create(Object.getPrototypeOf(e));else if(e.constructor===Object)t={};else{var n=e.constructor&&e.constructor.prototype||e.__proto__||{},o=function(){};o.prototype=n,t=new o}return a(l(e),(function(n){t[n]=e[n]})),t}return e}n.prototype.get=function(e){for(var t=this.value,n=0;n<e.length;n++){var o=e[n];if(!t||!c.call(t,o)){t=void 0;break}t=t[o]}return t},n.prototype.has=function(e){for(var t=this.value,n=0;n<e.length;n++){var o=e[n];if(!t||!c.call(t,o))return!1;t=t[o]}return!0},n.prototype.set=function(e,t){for(var n=this.value,o=0;o<e.length-1;o++){var r=e[o];c.call(n,r)||(n[r]={}),n=n[r]}return n[e[o]]=t,t},n.prototype.map=function(e){return o(this.value,e,!0)},n.prototype.forEach=function(e){return this.value=o(this.value,e,!1),this.value},n.prototype.reduce=function(e,t){var n=1===arguments.length,o=n?this.value:t;return this.forEach((function(t){this.isRoot&&n||(o=e.call(this,o,t))})),o},n.prototype.paths=function(){var e=[];return this.forEach((function(t){e.push(this.path)})),e},n.prototype.nodes=function(){var e=[];return this.forEach((function(t){e.push(this.node)})),e},n.prototype.clone=function(){var e=[],t=[];return function n(o){for(var i=0;i<e.length;i++)if(e[i]===o)return t[i];if("object"==typeof o&&null!==o){var s=r(o);return e.push(o),t.push(s),a(l(o),(function(e){s[e]=n(o[e])})),e.pop(),t.pop(),s}return o}(this.value)};var l=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};function i(e){return Object.prototype.toString.call(e)}var s=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},a=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t(e[n],n,e)};a(l(n.prototype),(function(e){t[e]=function(t){var o=[].slice.call(arguments,1),r=new n(t);return r[e].apply(r,o)}}));var c=Object.hasOwnProperty||function(e,t){return t in e}},3804:function(e){"use strict";e.exports=window.React}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var l=t[o]={exports:{}};return e[o].call(l.exports,l,l.exports,n),l.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};!function(){"use strict";n.r(o),n.d(o,{AlignmentControl:function(){return xg},AlignmentToolbar:function(){return Tg},Autocomplete:function(){return Rg},BlockAlignmentControl:function(){return zo},BlockAlignmentToolbar:function(){return Vo},BlockBreadcrumb:function(){return Fg},BlockColorsStyleSelector:function(){return Gg},BlockContextProvider:function(){return ir},BlockControls:function(){return Zn},BlockEdit:function(){return ur},BlockEditorKeyboardShortcuts:function(){return r_},BlockEditorProvider:function(){return $a},BlockFormatControls:function(){return Yn},BlockIcon:function(){return Ua},BlockInspector:function(){return e_},BlockList:function(){return pm},BlockMover:function(){return qd},BlockNavigationDropdown:function(){return uv},BlockPreview:function(){return pu},BlockSelectionClearer:function(){return qa},BlockSettingsMenu:function(){return zp},BlockSettingsMenuControls:function(){return Ap},BlockStyles:function(){return fv},BlockTitle:function(){return Ld},BlockToolbar:function(){return Vp},BlockTools:function(){return t_},BlockVerticalAlignmentControl:function(){return Av},BlockVerticalAlignmentToolbar:function(){return Dv},ButtonBlockAppender:function(){return Sd},ButtonBlockerAppender:function(){return Cd},ColorPalette:function(){return Fv},ColorPaletteControl:function(){return zv},ContrastChecker:function(){return gf},CopyHandler:function(){return Sp},DefaultBlockAppender:function(){return yd},FontSizePicker:function(){return Yf},InnerBlocks:function(){return am},Inserter:function(){return _d},InspectorAdvancedControls:function(){return Jo},InspectorControls:function(){return er},JustifyContentControl:function(){return go},JustifyToolbar:function(){return vo},LineHeightControl:function(){return Pf},MediaPlaceholder:function(){return Jb},MediaReplaceFlow:function(){return qb},MediaUpload:function(){return jb},MediaUploadCheck:function(){return Kb},MultiSelectScrollIntoView:function(){return l_},NavigableToolbar:function(){return Fd},ObserveTyping:function(){return c_},PanelColorSettings:function(){return ek},PlainText:function(){return Bk},PreserveScrollInReorder:function(){return u_},RichText:function(){return Ck},RichTextShortcut:function(){return Tk},RichTextToolbarButton:function(){return Nk},SETTINGS_DEFAULTS:function(){return v},SkipToSelectedBlock:function(){return qk},ToolSelector:function(){return Rk},Typewriter:function(){return f_},URLInput:function(){return Cb},URLInputButton:function(){return Ok},URLPopover:function(){return Xb},Warning:function(){return pr},WritingFlow:function(){return rc},__experimentalBlockAlignmentMatrixControl:function(){return Dg},__experimentalBlockContentOverlay:function(){return zg},__experimentalBlockFullHeightAligmentControl:function(){return Ag},__experimentalBlockPatternSetup:function(){return Bv},__experimentalBlockVariationPicker:function(){return gv},__experimentalBlockVariationTransforms:function(){return xv},__experimentalBorderRadiusControl:function(){return Vm},__experimentalBorderStyleControl:function(){return jm},__experimentalColorGradientControl:function(){return bm},__experimentalDuotoneControl:function(){return Zh},__experimentalFontAppearanceControl:function(){return Nf},__experimentalFontFamilyControl:function(){return Hf},__experimentalGetBorderClassesAndStyles:function(){return cg},__experimentalGetColorClassesAndStyles:function(){return dg},__experimentalGetGradientClass:function(){return tf},__experimentalGetGradientObjectByGradientValue:function(){return of},__experimentalGetMatchingVariation:function(){return Iv},__experimentalGetSpacingClassesAndStyles:function(){return mg},__experimentalImageEditingProvider:function(){return sb},__experimentalImageEditor:function(){return vb},__experimentalImageSizeControl:function(){return kb},__experimentalImageURLInputUI:function(){return $k},__experimentalLayoutStyle:function(){return Mo},__experimentalLetterSpacingControl:function(){return gh},__experimentalLibrary:function(){return n_},__experimentalLinkControl:function(){return Gb},__experimentalLinkControlSearchInput:function(){return Ab},__experimentalLinkControlSearchItem:function(){return Bb},__experimentalLinkControlSearchResults:function(){return Tb},__experimentalListView:function(){return av},__experimentalPanelColorGradientSettings:function(){return ff},__experimentalPreviewOptions:function(){return jk},__experimentalResponsiveBlockControl:function(){return xk},__experimentalTextDecorationControl:function(){return rh},__experimentalTextTransformControl:function(){return ph},__experimentalUnitControl:function(){return Lk},__experimentalUseBorderProps:function(){return ug},__experimentalUseColorProps:function(){return pg},__experimentalUseCustomSides:function(){return Fh},__experimentalUseGradient:function(){return lf},__experimentalUseNoRecursiveRenders:function(){return v_},__experimentalUseResizeCanvas:function(){return Kk},__unstableBlockSettingsMenuFirstItem:function(){return Np},__unstableEditorStyles:function(){return cu},__unstableIframe:function(){return sc},__unstableInserterMenuExtension:function(){return cd},__unstableRichTextInputEvent:function(){return Pk},__unstableUseBlockSelectionClearer:function(){return Ka},__unstableUseClipboardHandler:function(){return Cp},__unstableUseMouseMoveTypingReset:function(){return s_},__unstableUseTypewriter:function(){return m_},__unstableUseTypingObserver:function(){return a_},createCustomColorsHOC:function(){return bg},getColorClassName:function(){return Cm},getColorObjectByAttributeValues:function(){return ym},getColorObjectByColorValue:function(){return Em},getFontSize:function(){return jf},getFontSizeClass:function(){return qf},getFontSizeObjectByValue:function(){return Kf},getGradientSlugByValue:function(){return rf},getGradientValueBySlug:function(){return nf},getPxFromCssUnit:function(){return N_},store:function(){return Vn},storeConfig:function(){return zn},transformStyles:function(){return iu},useBlockDisplayInformation:function(){return Rd},useBlockEditContext:function(){return Wn},useBlockProps:function(){return Pa},useCachedTruthy:function(){return fg},useInnerBlocksProps:function(){return sm},useSetting:function(){return mo},validateThemeColors:function(){return b_},validateThemeGradients:function(){return k_},withColorContext:function(){return Ov},withColors:function(){return kg},withFontSizes:function(){return yg}});var e={};n.r(e),n.d(e,{__experimentalGetActiveBlockIdByBlockNames:function(){return Tt},__experimentalGetAllowedBlocks:function(){return ct},__experimentalGetAllowedPatterns:function(){return mt},__experimentalGetBlockListSettingsForBlocks:function(){return kt},__experimentalGetDirectInsertBlock:function(){return ut},__experimentalGetLastBlockAttributeChanges:function(){return Et},__experimentalGetParsedPattern:function(){return dt},__experimentalGetPatternTransformItems:function(){return ht},__experimentalGetPatternsByBlockTypes:function(){return ft},__experimentalGetReusableBlockTitle:function(){return _t},__unstableGetBlockWithoutInnerBlocks:function(){return $},__unstableGetClientIdWithClientIdsTree:function(){return K},__unstableGetClientIdsTree:function(){return q},__unstableIsLastBlockChangeIgnored:function(){return yt},areInnerBlocksControlled:function(){return xt},canInsertBlockType:function(){return Ye},canInsertBlocks:function(){return Ze},canMoveBlock:function(){return Je},canMoveBlocks:function(){return et},canRemoveBlock:function(){return Xe},canRemoveBlocks:function(){return Qe},didAutomaticChange:function(){return Bt},getAdjacentBlockClientId:function(){return me},getBlock:function(){return W},getBlockAttributes:function(){return G},getBlockCount:function(){return J},getBlockHierarchyRootClientId:function(){return de},getBlockIndex:function(){return xe},getBlockInsertionPoint:function(){return Ue},getBlockListSettings:function(){return gt},getBlockMode:function(){return Ae},getBlockName:function(){return H},getBlockOrder:function(){return Ie},getBlockParents:function(){return ce},getBlockParentsByBlockName:function(){return ue},getBlockRootClientId:function(){return ae},getBlockSelectionEnd:function(){return oe},getBlockSelectionStart:function(){return ne},getBlockTransformItems:function(){return st},getBlocks:function(){return j},getBlocksByClientId:function(){return Q},getClientIdsOfDescendants:function(){return Y},getClientIdsWithDescendants:function(){return Z},getDraggedBlockClientIds:function(){return Fe},getFirstMultiSelectedBlockClientId:function(){return _e},getGlobalBlockCount:function(){return X},getInserterItems:function(){return it},getLastMultiSelectedBlockClientId:function(){return ye},getLowestCommonAncestorWithSelectedBlock:function(){return pe},getMultiSelectedBlockClientIds:function(){return be},getMultiSelectedBlocks:function(){return ke},getMultiSelectedBlocksEndClientId:function(){return Be},getMultiSelectedBlocksStartClientId:function(){return we},getNextBlockClientId:function(){return he},getPreviousBlockClientId:function(){return fe},getSelectedBlock:function(){return se},getSelectedBlockClientId:function(){return ie},getSelectedBlockClientIds:function(){return ve},getSelectedBlockCount:function(){return re},getSelectedBlocksInitialCaretPosition:function(){return ge},getSelectionEnd:function(){return te},getSelectionStart:function(){return ee},getSettings:function(){return vt},getTemplate:function(){return $e},getTemplateLock:function(){return je},hasBlockMovingClientId:function(){return wt},hasInserterItems:function(){return at},hasMultiSelection:function(){return Me},hasSelectedBlock:function(){return le},hasSelectedInnerBlock:function(){return Ne},isAncestorBeingDragged:function(){return Ve},isAncestorMultiSelected:function(){return Se},isBlockBeingDragged:function(){return ze},isBlockHighlighted:function(){return It},isBlockInsertionPointVisible:function(){return Ge},isBlockMultiSelected:function(){return Ce},isBlockSelected:function(){return Te},isBlockValid:function(){return U},isBlockWithinSelection:function(){return Pe},isCaretWithinFormattedText:function(){return He},isDraggingBlocks:function(){return Oe},isFirstMultiSelectedBlock:function(){return Ee},isLastBlockChangePersistent:function(){return bt},isMultiSelecting:function(){return Re},isNavigationMode:function(){return St},isSelectionEnabled:function(){return Le},isTyping:function(){return De},isValidTemplate:function(){return We},wasBlockJustInserted:function(){return Nt}});var t={};n.r(t),n.d(t,{__unstableMarkAutomaticChange:function(){return Tn},__unstableMarkLastChangeAsPersistent:function(){return In},__unstableMarkNextChangeAsNotPersistent:function(){return xn},__unstableSaveReusableBlock:function(){return Bn},clearSelectedBlock:function(){return Kt},duplicateBlocks:function(){return Mn},enterFormattedText:function(){return kn},exitFormattedText:function(){return yn},flashBlock:function(){return Dn},hideInsertionPoint:function(){return sn},insertAfterBlock:function(){return Ln},insertBeforeBlock:function(){return Rn},insertBlock:function(){return on},insertBlocks:function(){return rn},insertDefaultBlock:function(){return Cn},mergeBlocks:function(){return un},moveBlockToPosition:function(){return nn},moveBlocksDown:function(){return Jt},moveBlocksToPosition:function(){return tn},moveBlocksUp:function(){return en},multiSelect:function(){return jt},receiveBlocks:function(){return Ft},removeBlock:function(){return pn},removeBlocks:function(){return dn},replaceBlock:function(){return Xt},replaceBlocks:function(){return Zt},replaceInnerBlocks:function(){return mn},resetBlocks:function(){return At},resetSelection:function(){return Ot},selectBlock:function(){return Ht},selectNextBlock:function(){return Gt},selectPreviousBlock:function(){return Ut},selectionChange:function(){return En},setBlockMovingClientId:function(){return Pn},setHasControlledInnerBlocks:function(){return On},setNavigationMode:function(){return Nn},setTemplateValidity:function(){return an},showInsertionPoint:function(){return ln},startDraggingBlocks:function(){return vn},startMultiSelect:function(){return Wt},startTyping:function(){return hn},stopDraggingBlocks:function(){return bn},stopMultiSelect:function(){return $t},stopTyping:function(){return gn},synchronizeTemplate:function(){return cn},toggleBlockHighlight:function(){return An},toggleBlockMode:function(){return fn},toggleSelection:function(){return qt},updateBlock:function(){return Vt},updateBlockAttributes:function(){return zt},updateBlockListSettings:function(){return Sn},updateSettings:function(){return wn},validateBlocksToTemplate:function(){return Dt}});var r=window.wp.blocks,l=window.wp.hooks;function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}(0,l.addFilter)("blocks.registerBlockType","core/compat/migrateLightBlockWrapper",(function(e){const{apiVersion:t=1}=e;return t<2&&(0,r.hasBlockSupport)(e,"lightBlockWrapper",!1)&&(e.apiVersion=2),e}));var s=window.wp.element,a=n(4184),c=n.n(a),u=window.lodash,d=window.wp.compose,p=window.wp.components,m=window.wp.data,f={default:(0,p.createSlotFill)("BlockControls"),block:(0,p.createSlotFill)("BlockControlsBlock"),inline:(0,p.createSlotFill)("BlockFormatControls"),other:(0,p.createSlotFill)("BlockControlsOther"),parent:(0,p.createSlotFill)("BlockControlsParent")},h=window.wp.i18n;const g={insertUsage:{}},v={alignWide:!1,supportsLayout:!0,colors:[{name:(0,h.__)("Black"),slug:"black",color:"#000000"},{name:(0,h.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:(0,h.__)("White"),slug:"white",color:"#ffffff"},{name:(0,h.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:(0,h.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:(0,h.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:(0,h.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:(0,h.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:(0,h.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:(0,h.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:(0,h.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:(0,h.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:(0,h._x)("Small","font size name"),size:13,slug:"small"},{name:(0,h._x)("Normal","font size name"),size:16,slug:"normal"},{name:(0,h._x)("Medium","font size name"),size:20,slug:"medium"},{name:(0,h._x)("Large","font size name"),size:36,slug:"large"},{name:(0,h._x)("Huge","font size name"),size:42,slug:"huge"}],imageDefaultSize:"large",imageSizes:[{slug:"thumbnail",name:(0,h.__)("Thumbnail")},{slug:"medium",name:(0,h.__)("Medium")},{slug:"large",name:(0,h.__)("Large")},{slug:"full",name:(0,h.__)("Full Size")}],imageEditing:!0,maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null,__experimentalCanUserUseUnfilteredHTML:!1,__experimentalBlockDirectory:!1,__mobileEnablePageTemplates:!1,__experimentalBlockPatterns:[],__experimentalBlockPatternCategories:[],__experimentalSpotlightEntityBlocks:[],__unstableGalleryWithImageBlocks:!1,gradients:[{name:(0,h.__)("Vivid cyan blue to vivid purple"),gradient:"linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)",slug:"vivid-cyan-blue-to-vivid-purple"},{name:(0,h.__)("Light green cyan to vivid green cyan"),gradient:"linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)",slug:"light-green-cyan-to-vivid-green-cyan"},{name:(0,h.__)("Luminous vivid amber to luminous vivid orange"),gradient:"linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)",slug:"luminous-vivid-amber-to-luminous-vivid-orange"},{name:(0,h.__)("Luminous vivid orange to vivid red"),gradient:"linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)",slug:"luminous-vivid-orange-to-vivid-red"},{name:(0,h.__)("Very light gray to cyan bluish gray"),gradient:"linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%)",slug:"very-light-gray-to-cyan-bluish-gray"},{name:(0,h.__)("Cool to warm spectrum"),gradient:"linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%)",slug:"cool-to-warm-spectrum"},{name:(0,h.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:(0,h.__)("Blush bordeaux"),gradient:"linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)",slug:"blush-bordeaux"},{name:(0,h.__)("Luminous dusk"),gradient:"linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%)",slug:"luminous-dusk"},{name:(0,h.__)("Pale ocean"),gradient:"linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%)",slug:"pale-ocean"},{name:(0,h.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:(0,h.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}]};function b(e,t,n){return[...e.slice(0,n),...(0,u.castArray)(t),...e.slice(n)]}function k(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const r=[...e];return r.splice(t,o),b(r,e.slice(t,t+o),n)}function _(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n={[t]:[]};return e.forEach((e=>{const{clientId:o,innerBlocks:r}=e;n[t].push(o),Object.assign(n,_(r,o))})),n}function y(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.reduce(((e,n)=>Object.assign(e,{[n.clientId]:t},y(n.innerBlocks,n.clientId))),{})}function E(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.identity;const n={},o=[...e];for(;o.length;){const{innerBlocks:e,...r}=o.shift();o.push(...e),n[r.clientId]=t(r)}return n}function C(e){return E(e,(e=>(0,u.omit)(e,"attributes")))}function S(e){return E(e,(e=>e.attributes))}function w(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return(0,u.reduce)(e[t],((t,o)=>n[o]?t:[...t,o,...w(e,o)]),[])}function B(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&(0,u.isEqual)(e.clientIds,t.clientIds)&&function(e,t){return(0,u.isEqual)((0,u.keys)(e),(0,u.keys)(t))}(e.attributes,t.attributes)}function I(e,t){const n={},o=[...t],r=[...t];for(;o.length;){const e=o.shift();o.push(...e.innerBlocks),r.push(...e.innerBlocks)}for(const e of r)n[e.clientId]={};for(const t of r)n[t.clientId]=Object.assign(n[t.clientId],{...e.byClientId[t.clientId],attributes:e.attributes[t.clientId],innerBlocks:t.innerBlocks.map((e=>n[e.clientId]))});return n}function x(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const r=new Set([]),l=new Set;for(const t of n){let n=o?t:e.parents[t];do{if(e.controlledInnerBlocks[n]){l.add(n);break}r.add(n),n=e.parents[n]}while(void 0!==n)}for(const e of r)t[e]={...t[e]};for(const n of r)t[n].innerBlocks=(e.order[n]||[]).map((e=>t[e]));for(const n of l)t["controlled||"+n]={innerBlocks:(e.order[n]||[]).map((e=>t[e]))};return t}const T=(0,u.flow)(m.combineReducers,(e=>(t,n)=>{if(t&&"SAVE_REUSABLE_BLOCK_SUCCESS"===n.type){const{id:e,updatedId:o}=n;if(e===o)return t;(t={...t}).attributes=(0,u.mapValues)(t.attributes,((n,r)=>{const{name:l}=t.byClientId[r];return"core/block"===l&&n.ref===e?{...n,ref:o}:n}))}return e(t,n)}),(e=>function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;const o=e(t,n);if(o===t)return t;switch(o.tree=t.tree?t.tree:{},n.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const e=I(o,n.blocks);o.tree=x(o,{...o.tree,...e},n.rootClientId?[n.rootClientId]:[""],!0);break}case"UPDATE_BLOCK":o.tree=x(o,{...o.tree,[n.clientId]:{...o.tree[n.clientId],...o.byClientId[n.clientId],attributes:o.attributes[n.clientId]}},[n.clientId],!1);break;case"UPDATE_BLOCK_ATTRIBUTES":{const e=n.clientIds.reduce(((e,t)=>(e[t]={...o.tree[t],attributes:o.attributes[t]},e)),{});o.tree=x(o,{...o.tree,...e},n.clientIds,!1);break}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const e=I(o,n.blocks);o.tree=x(o,{...(0,u.omit)(o.tree,n.replacedClientIds.concat(n.replacedClientIds.map((e=>"controlled||"+e)))),...e},n.blocks.map((e=>e.clientId)),!1);const r=[];for(const e of n.clientIds)void 0===t.parents[e]||""!==t.parents[e]&&!o.byClientId[t.parents[e]]||r.push(t.parents[e]);o.tree=x(o,o.tree,r,!0);break}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":const e=[];for(const r of n.clientIds)void 0===t.parents[r]||""!==t.parents[r]&&!o.byClientId[t.parents[r]]||e.push(t.parents[r]);o.tree=x(o,(0,u.omit)(o.tree,n.removedClientIds.concat(n.removedClientIds.map((e=>"controlled||"+e)))),e,!0);break;case"MOVE_BLOCKS_TO_POSITION":{const e=[];n.fromRootClientId&&e.push(n.fromRootClientId),n.toRootClientId&&e.push(n.toRootClientId),n.fromRootClientId&&n.fromRootClientId||e.push(""),o.tree=x(o,o.tree,e,!0);break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{const e=[n.rootClientId?n.rootClientId:""];o.tree=x(o,o.tree,e,!0);break}case"SAVE_REUSABLE_BLOCK_SUCCESS":{const e=(0,u.keys)((0,u.omitBy)(o.attributes,((e,t)=>"core/block"!==o.byClientId[t].name||e.ref!==n.updatedId)));o.tree=x(o,{...o.tree,...e.reduce(((e,t)=>(e[t]={...o.byClientId[t],attributes:o.attributes[t],innerBlocks:o.tree[t].innerBlocks},e)),{})},e,!1)}}return o}),(e=>(t,n)=>{const o=e=>{let o=e;for(let r=0;r<o.length;r++)!t.order[o[r]]||n.keepControlledInnerBlocks&&n.keepControlledInnerBlocks[o[r]]||(o===e&&(o=[...o]),o.push(...t.order[o[r]]));return o};if(t)switch(n.type){case"REMOVE_BLOCKS":n={...n,type:"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN",removedClientIds:o(n.clientIds)};break;case"REPLACE_BLOCKS":n={...n,type:"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN",replacedClientIds:o(n.clientIds)}}return e(t,n)}),(e=>(t,n)=>{if("REPLACE_INNER_BLOCKS"!==n.type)return e(t,n);const o={};if(Object.keys(t.controlledInnerBlocks).length){const e=[...n.blocks];for(;e.length;){const{innerBlocks:n,...r}=e.shift();e.push(...n),t.controlledInnerBlocks[r.clientId]&&(o[r.clientId]=!0)}}let r=t;t.order[n.rootClientId]&&(r=e(r,{type:"REMOVE_BLOCKS",keepControlledInnerBlocks:o,clientIds:t.order[n.rootClientId]}));let l=r;return n.blocks.length&&(l=e(l,{...n,type:"INSERT_BLOCKS",index:0}),l.order={...l.order,...(0,u.reduce)(o,((e,n,o)=>(t.order[o]&&(e[o]=t.order[o]),e)),{})}),l}),(e=>(t,n)=>{if("RESET_BLOCKS"===n.type){var o,r,l;const e=w(null!==(o=null==t?void 0:t.order)&&void 0!==o?o:{},"",null!==(r=null==t?void 0:t.controlledInnerBlocks)&&void 0!==r?r:{}),i=Object.keys((0,u.pickBy)(null!==(l=null==t?void 0:t.controlledInnerBlocks)&&void 0!==l?l:{})),s={...t,byClientId:{...(0,u.omit)(null==t?void 0:t.byClientId,e),...C(n.blocks)},attributes:{...(0,u.omit)(null==t?void 0:t.attributes,e),...S(n.blocks)},order:{...(0,u.omit)(null==t?void 0:t.order,e),...(0,u.omit)(_(n.blocks),i)},parents:{...(0,u.omit)(null==t?void 0:t.parents,e),...y(n.blocks)},controlledInnerBlocks:(null==t?void 0:t.controlledInnerBlocks)||{}},a=I(s,n.blocks);return s.tree={...(0,u.omit)(null==t?void 0:t.tree,e),...a,"":{innerBlocks:n.blocks.map((e=>a[e.clientId]))}},s}return e(t,n)}),(function(e){let t,n=!1;return(o,r)=>{let l=e(o,r);const i="MARK_LAST_CHANGE_AS_PERSISTENT"===r.type||n;if(o===l&&!i){var s;n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===r.type;const e=null===(s=null==o?void 0:o.isPersistentChange)||void 0===s||s;return o.isPersistentChange===e?o:{...l,isPersistentChange:e}}return l={...l,isPersistentChange:i?!n:!B(r,t)},t=r,n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===r.type,l}}),(function(e){const t=new Set(["RECEIVE_BLOCKS"]);return(n,o)=>{const r=e(n,o);return r!==n&&(r.isIgnoredChange=t.has(o.type)),r}}))({byClientId(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return{...e,...C(t.blocks)};case"UPDATE_BLOCK":if(!e[t.clientId])return e;const n=(0,u.omit)(t.updates,"attributes");return(0,u.isEmpty)(n)?e:{...e,[t.clientId]:{...e[t.clientId],...n}};case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?{...(0,u.omit)(e,t.replacedClientIds),...C(t.blocks)}:e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,u.omit)(e,t.removedClientIds)}return e},attributes(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return{...e,...S(t.blocks)};case"UPDATE_BLOCK":return e[t.clientId]&&t.updates.attributes?{...e,[t.clientId]:{...e[t.clientId],...t.updates.attributes}}:e;case"UPDATE_BLOCK_ATTRIBUTES":{if(t.clientIds.every((t=>!e[t])))return e;const n=t.clientIds.reduce(((n,o)=>({...n,[o]:(0,u.reduce)(t.uniqueByBlock?t.attributes[o]:t.attributes,((t,n,r)=>{var l,i;return n!==t[r]&&((t=(l=e[o])===(i=t)?{...l}:i)[r]=n),t}),e[o])})),{});return t.clientIds.every((t=>n[t]===e[t]))?e:{...e,...n}}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?{...(0,u.omit)(e,t.replacedClientIds),...S(t.blocks)}:e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,u.omit)(e,t.removedClientIds)}return e},order(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":{const n=_(t.blocks);return{...e,...(0,u.omit)(n,""),"":((null==e?void 0:e[""])||[]).concat(n[""])}}case"INSERT_BLOCKS":{const{rootClientId:n=""}=t,o=e[n]||[],r=_(t.blocks,n),{index:l=o.length}=t;return{...e,...r,[n]:b(o,r[n],l)}}case"MOVE_BLOCKS_TO_POSITION":{const{fromRootClientId:n="",toRootClientId:o="",clientIds:r}=t,{index:l=e[o].length}=t;if(n===o){const t=e[o].indexOf(r[0]);return{...e,[o]:k(e[o],t,l,r.length)}}return{...e,[n]:(0,u.without)(e[n],...r),[o]:b(e[o],r,l)}}case"MOVE_BLOCKS_UP":{const{clientIds:n,rootClientId:o=""}=t,r=(0,u.first)(n),l=e[o];if(!l.length||r===(0,u.first)(l))return e;const i=l.indexOf(r);return{...e,[o]:k(l,i,i-1,n.length)}}case"MOVE_BLOCKS_DOWN":{const{clientIds:n,rootClientId:o=""}=t,r=(0,u.first)(n),l=(0,u.last)(n),i=e[o];if(!i.length||l===(0,u.last)(i))return e;const s=i.indexOf(r);return{...e,[o]:k(i,s,s+1,n.length)}}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const{clientIds:n}=t;if(!t.blocks)return e;const o=_(t.blocks);return(0,u.flow)([e=>(0,u.omit)(e,t.replacedClientIds),e=>({...e,...(0,u.omit)(o,"")}),e=>(0,u.mapValues)(e,(e=>(0,u.reduce)(e,((e,t)=>t===n[0]?[...e,...o[""]]:(-1===n.indexOf(t)&&e.push(t),e)),[])))])(e)}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,u.flow)([e=>(0,u.omit)(e,t.removedClientIds),e=>(0,u.mapValues)(e,(e=>(0,u.without)(e,...t.removedClientIds)))])(e)}return e},parents(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":return{...e,...y(t.blocks)};case"INSERT_BLOCKS":return{...e,...y(t.blocks,t.rootClientId||"")};case"MOVE_BLOCKS_TO_POSITION":return{...e,...t.clientIds.reduce(((e,n)=>(e[n]=t.toRootClientId||"",e)),{})};case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return{...(0,u.omit)(e,t.replacedClientIds),...y(t.blocks,e[t.clientIds[0]])};case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,u.omit)(e,t.removedClientIds)}return e},controlledInnerBlocks(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{type:t,clientId:n,hasControlledInnerBlocks:o}=arguments.length>1?arguments[1]:void 0;return"SET_HAS_CONTROLLED_INNER_BLOCKS"===t?{...e,[n]:o}:e}});function N(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CLEAR_SELECTED_BLOCK":return e.clientId?{}:e;case"SELECT_BLOCK":return t.clientId===e.clientId?e:{clientId:t.clientId};case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":return t.updateSelection&&t.blocks.length?{clientId:t.blocks[0].clientId}:e;case"REMOVE_BLOCKS":return t.clientIds&&t.clientIds.length&&-1!==t.clientIds.indexOf(e.clientId)?{}:e;case"REPLACE_BLOCKS":{if(-1===t.clientIds.indexOf(e.clientId))return e;const n=t.blocks[t.indexToSelect]||t.blocks[t.blocks.length-1];return n?n.clientId===e.clientId?e:{clientId:n.clientId}:{}}}return e}var P,M,R=(0,m.combineReducers)({blocks:T,isTyping:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e},draggedBlocks:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e},isCaretWithinFormattedText:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ENTER_FORMATTED_TEXT":return!0;case"EXIT_FORMATTED_TEXT":return!1}return e},selection:function(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;switch(o.type){case"SELECTION_CHANGE":return{selectionStart:{clientId:o.clientId,attributeKey:o.attributeKey,offset:o.startOffset},selectionEnd:{clientId:o.clientId,attributeKey:o.attributeKey,offset:o.endOffset}};case"RESET_SELECTION":const{selectionStart:r,selectionEnd:l}=o;return{selectionStart:r,selectionEnd:l};case"MULTI_SELECT":const{start:i,end:s}=o;return{selectionStart:{clientId:i},selectionEnd:{clientId:s}};case"RESET_BLOCKS":const a=null==n||null===(e=n.selectionStart)||void 0===e?void 0:e.clientId,c=null==n||null===(t=n.selectionEnd)||void 0===t?void 0:t.clientId;if(!a&&!c)return n;if(!o.blocks.some((e=>e.clientId===a)))return{selectionStart:{},selectionEnd:{}};if(!o.blocks.some((e=>e.clientId===c)))return{...n,selectionEnd:n.selectionStart}}return{selectionStart:N(n.selectionStart,o),selectionEnd:N(n.selectionEnd,o)}},isMultiSelecting:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e},isSelectionEnabled:function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"TOGGLE_SELECTION":return t.isSelectionEnabled}return e},initialPosition:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"REPLACE_BLOCKS"===t.type&&void 0!==t.initialPosition||["SELECT_BLOCK","RESET_SELECTION","INSERT_BLOCKS","REPLACE_INNER_BLOCKS"].includes(t.type)?t.initialPosition:e},blocksMode:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("TOGGLE_BLOCK_MODE"===t.type){const{clientId:n}=t;return{...e,[n]:e[n]&&"html"===e[n]?"visual":"html"}}return e},blockListSettings:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":return(0,u.omit)(e,t.clientIds);case"UPDATE_BLOCK_LIST_SETTINGS":{const{clientId:n}=t;return t.settings?(0,u.isEqual)(e[n],t.settings)?e:{...e,[n]:t.settings}:e.hasOwnProperty(n)?(0,u.omit)(e,n):e}}return e},insertionPoint:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_INSERTION_POINT":const{rootClientId:e,index:n,__unstableWithInserter:o}=t;return{rootClientId:e,index:n,__unstableWithInserter:o};case"HIDE_INSERTION_POINT":return null}return e},template:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isValid:!0},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_TEMPLATE_VALIDITY":return{...e,isValid:t.isValid}}return e},settings:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_SETTINGS":return{...e,...t.settings}}return e},preferences:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":return t.blocks.reduce(((e,n)=>{const{attributes:o,name:l}=n,i=(0,m.select)(r.store).getActiveBlockVariation(l,o);let s=null!=i&&i.name?`${l}/${i.name}`:l;const a={name:s};return"core/block"===l&&(a.ref=o.ref,s+="/"+o.ref),{...e,insertUsage:{...e.insertUsage,[s]:{time:t.time,count:e.insertUsage[s]?e.insertUsage[s].count+1:1,insert:a}}}}),e)}return e},lastBlockAttributesChange:function(e,t){switch(t.type){case"UPDATE_BLOCK":if(!t.updates.attributes)break;return{[t.clientId]:t.updates.attributes};case"UPDATE_BLOCK_ATTRIBUTES":return t.clientIds.reduce(((e,n)=>({...e,[n]:t.uniqueByBlock?t.attributes[n]:t.attributes})),{})}return null},isNavigationMode:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return"INSERT_BLOCKS"!==t.type&&("SET_NAVIGATION_MODE"===t.type?t.isNavigationMode:e)},hasBlockMovingClientId:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"SET_BLOCK_MOVING_MODE"===t.type?t.hasBlockMovingClientId:"SET_NAVIGATION_MODE"===t.type?null:e},automaticChangeStatus:function(e,t){switch(t.type){case"MARK_AUTOMATIC_CHANGE":return"pending";case"MARK_AUTOMATIC_CHANGE_FINAL":return"pending"===e?"final":void 0;case"SELECTION_CHANGE":return"final"!==e?e:void 0;case"START_TYPING":case"STOP_TYPING":return e}},highlightedBlock:function(e,t){switch(t.type){case"TOGGLE_BLOCK_HIGHLIGHT":const{clientId:n,isHighlighted:o}=t;return o?n:e===n?null:e;case"SELECT_BLOCK":if(t.clientId!==e)return null}return e},lastBlockInserted:function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;switch(n.type){case"INSERT_BLOCKS":return n.blocks.length?{clientId:n.blocks[0].clientId,source:null===(e=n.meta)||void 0===e?void 0:e.source}:t;case"RESET_BLOCKS":return{}}return t}});function L(e){return[e]}function A(){var e={clear:function(){e.head=null}};return e}function D(e,t,n){var o;if(e.length!==t.length)return!1;for(o=n;o<e.length;o++)if(e[o]!==t[o])return!1;return!0}function O(e,t){var n,o;function r(){n=M?new WeakMap:A()}function l(){var n,r,l,i,s,a=arguments.length;for(i=new Array(a),l=0;l<a;l++)i[l]=arguments[l];for(s=t.apply(null,i),(n=o(s)).isUniqueByDependants||(n.lastDependants&&!D(s,n.lastDependants,0)&&n.clear(),n.lastDependants=s),r=n.head;r;){if(D(r.args,i,1))return r!==n.head&&(r.prev.next=r.next,r.next&&(r.next.prev=r.prev),r.next=n.head,r.prev=null,n.head.prev=r,n.head=r),r.val;r=r.next}return r={val:e.apply(null,i)},i[0]=null,r.args=i,n.head&&(n.head.prev=r,r.next=n.head),n.head=r,r.val}return t||(t=L),o=M?function(e){var t,o,r,l,i,s=n,a=!0;for(t=0;t<e.length;t++){if(!(i=o=e[t])||"object"!=typeof i){a=!1;break}s.has(o)?s=s.get(o):(r=new WeakMap,s.set(o,r),s=r)}return s.has(P)||((l=A()).isUniqueByDependants=a,s.set(P,l)),s.get(P)}:function(){return n},l.getDependants=t,l.clear=r,r(),l}P={},M="undefined"!=typeof WeakMap;var F=window.wp.primitives,z=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"}));const V=[];function H(e,t){const n=e.blocks.byClientId[t],o="core/social-link";if("web"!==s.Platform.OS&&(null==n?void 0:n.name)===o){const n=e.blocks.attributes[t],{service:r}=n;return r?`core/social-link-${r}`:o}return n?n.name:null}function U(e,t){const n=e.blocks.byClientId[t];return!!n&&n.isValid}function G(e,t){return e.blocks.byClientId[t]?e.blocks.attributes[t]:null}function W(e,t){return e.blocks.byClientId[t]?e.blocks.tree[t]:null}const $=O(((e,t)=>{const n=e.blocks.byClientId[t];return n?{...n,attributes:G(e,t)}:null}),((e,t)=>[e.blocks.byClientId[t],e.blocks.attributes[t]]));function j(e,t){var n;const o=t&&xt(e,t)?"controlled||"+t:t||"";return(null===(n=e.blocks.tree[o])||void 0===n?void 0:n.innerBlocks)||V}const K=O(((e,t)=>({clientId:t,innerBlocks:q(e,t)})),(e=>[e.blocks.order])),q=O((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(0,u.map)(Ie(e,t),(t=>K(e,t)))}),(e=>[e.blocks.order])),Y=(e,t)=>(0,u.flatMap)(t,(t=>{const n=Ie(e,t);return[...n,...Y(e,n)]})),Z=O((e=>{const t=Ie(e);return[...t,...Y(e,t)]}),(e=>[e.blocks.order])),X=O(((e,t)=>{const n=Z(e);return t?(0,u.reduce)(n,((n,o)=>e.blocks.byClientId[o].name===t?n+1:n),0):n.length}),(e=>[e.blocks.order,e.blocks.byClientId])),Q=O(((e,t)=>(0,u.map)((0,u.castArray)(t),(t=>W(e,t)))),((e,t)=>(0,u.map)((0,u.castArray)(t),(t=>e.blocks.tree[t]))));function J(e,t){return Ie(e,t).length}function ee(e){return e.selection.selectionStart}function te(e){return e.selection.selectionEnd}function ne(e){return e.selection.selectionStart.clientId}function oe(e){return e.selection.selectionEnd.clientId}function re(e){return be(e).length||(e.selection.selectionStart.clientId?1:0)}function le(e){const{selectionStart:t,selectionEnd:n}=e.selection;return!!t.clientId&&t.clientId===n.clientId}function ie(e){const{selectionStart:t,selectionEnd:n}=e.selection,{clientId:o}=t;return o&&o===n.clientId?o:null}function se(e){const t=ie(e);return t?W(e,t):null}function ae(e,t){return void 0!==e.blocks.parents[t]?e.blocks.parents[t]:null}const ce=O((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const o=[];let r=t;for(;e.blocks.parents[r];)r=e.blocks.parents[r],o.push(r);return n?o:o.reverse()}),(e=>[e.blocks.parents])),ue=O((function(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const r=ce(e,t,o);return(0,u.map)((0,u.filter)((0,u.map)(r,(t=>({id:t,name:H(e,t)}))),(e=>{let{name:t}=e;return Array.isArray(n)?n.includes(t):t===n})),(e=>{let{id:t}=e;return t}))}),(e=>[e.blocks.parents]));function de(e,t){let n,o=t;do{n=o,o=e.blocks.parents[o]}while(o);return n}function pe(e,t){const n=ie(e),o=[...ce(e,t),t],r=[...ce(e,n),n];let l;const i=Math.min(o.length,r.length);for(let e=0;e<i&&o[e]===r[e];e++)l=o[e];return l}function me(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(void 0===t&&(t=ie(e)),void 0===t&&(t=n<0?_e(e):ye(e)),!t)return null;const o=ae(e,t);if(null===o)return null;const{order:r}=e.blocks,l=r[o],i=l.indexOf(t),s=i+1*n;return s<0||s===l.length?null:l[s]}function fe(e,t){return me(e,t,-1)}function he(e,t){return me(e,t,1)}function ge(e){return e.initialPosition}const ve=O((e=>{const{selectionStart:t,selectionEnd:n}=e.selection;if(void 0===t.clientId||void 0===n.clientId)return V;if(t.clientId===n.clientId)return[t.clientId];const o=ae(e,t.clientId);if(null===o)return V;const r=Ie(e,o),l=r.indexOf(t.clientId),i=r.indexOf(n.clientId);return l>i?r.slice(i,l+1):r.slice(l,i+1)}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function be(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?V:ve(e)}const ke=O((e=>{const t=be(e);return t.length?t.map((t=>W(e,t))):V}),(e=>[...ve.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]));function _e(e){return(0,u.first)(be(e))||null}function ye(e){return(0,u.last)(be(e))||null}function Ee(e,t){return _e(e)===t}function Ce(e,t){return-1!==be(e).indexOf(t)}const Se=O(((e,t)=>{let n=t,o=!1;for(;n&&!o;)n=ae(e,n),o=Ce(e,n);return o}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function we(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:t.clientId||null}function Be(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:n.clientId||null}function Ie(e,t){return e.blocks.order[t||""]||V}function xe(e,t,n){return Ie(e,n).indexOf(t)}function Te(e,t){const{selectionStart:n,selectionEnd:o}=e.selection;return n.clientId===o.clientId&&n.clientId===t}function Ne(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return(0,u.some)(Ie(e,t),(t=>Te(e,t)||Ce(e,t)||n&&Ne(e,t,n)))}function Pe(e,t){if(!t)return!1;const n=be(e),o=n.indexOf(t);return o>-1&&o<n.length-1}function Me(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId!==n.clientId}function Re(e){return e.isMultiSelecting}function Le(e){return e.isSelectionEnabled}function Ae(e,t){return e.blocksMode[t]||"visual"}function De(e){return e.isTyping}function Oe(e){return!!e.draggedBlocks.length}function Fe(e){return e.draggedBlocks}function ze(e,t){return e.draggedBlocks.includes(t)}function Ve(e,t){if(!Oe(e))return!1;const n=ce(e,t);return(0,u.some)(n,(t=>ze(e,t)))}function He(e){return e.isCaretWithinFormattedText}function Ue(e){let t,n;const{insertionPoint:o,selection:{selectionEnd:r}}=e;if(null!==o)return o;const{clientId:l}=r;return l?(t=ae(e,l)||void 0,n=xe(e,r.clientId,t)+1):n=Ie(e).length,{rootClientId:t,index:n}}function Ge(e){return null!==e.insertionPoint}function We(e){return e.template.isValid}function $e(e){return e.settings.template}function je(e,t){if(!t)return e.settings.templateLock;const n=gt(e,t);return n?n.templateLock:null}const Ke=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return(0,u.isBoolean)(e)?e:(0,u.isArray)(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n},qe=function(e,t){let n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(t&&"object"==typeof t?(n=t,t=n.name):n=(0,r.getBlockType)(t),!n)return!1;const{allowedBlockTypes:l}=vt(e),i=Ke(l,t,!0);if(!i)return!1;const s=!!je(e,o);if(s)return!1;const a=gt(e,o);if(o&&void 0===a)return!1;const c=null==a?void 0:a.allowedBlocks,u=Ke(c,t),d=n.parent,p=H(e,o),m=Ke(d,p);return null!==u&&null!==m?u||m:null!==u?u:null===m||m},Ye=O(qe,((e,t,n)=>[e.blockListSettings[n],e.blocks.byClientId[n],e.settings.allowedBlockTypes,e.settings.templateLock]));function Ze(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>Ye(e,H(e,t),n)))}function Xe(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const o=G(e,t);if(null===o)return!0;const{lock:r}=o,l=!!je(e,n);return void 0===r||void 0===(null==r?void 0:r.remove)?!l:!(null!=r&&r.remove)}function Qe(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>Xe(e,t,n)))}function Je(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const o=G(e,t);if(null===o)return;const{lock:r}=o,l="all"===je(e,n);return void 0===r||void 0===(null==r?void 0:r.move)?!l:!(null!=r&&r.move)}function et(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>Je(e,t,n)))}function tt(e,t){var n,o;return null!==(n=null===(o=e.preferences.insertUsage)||void 0===o?void 0:o[t])&&void 0!==n?n:null}const nt=(e,t,n)=>!!(0,r.hasBlockSupport)(t,"inserter",!0)&&qe(e,t.name,n),ot=(e,t)=>n=>{const o=`${t.id}/${n.name}`,{time:r,count:l=0}=tt(e,o)||{};return{...t,id:o,icon:n.icon||t.icon,title:n.title||t.title,description:n.description||t.description,category:n.category||t.category,example:n.hasOwnProperty("example")?n.example:t.example,initialAttributes:{...t.initialAttributes,...n.attributes},innerBlocks:n.innerBlocks,keywords:n.keywords||t.keywords,frecency:rt(r,l)}},rt=(e,t)=>{if(!e)return t;const n=Date.now()-e;switch(!0){case n<36e5:return 4*t;case n<864e5:return 2*t;case n<6048e5:return t/2;default:return t/4}},lt=(e,t)=>{let{buildScope:n="inserter"}=t;return t=>{const o=t.name;let l=!1;(0,r.hasBlockSupport)(t.name,"multiple",!0)||(l=(0,u.some)(Q(e,Z(e)),{name:t.name}));const{time:i,count:s=0}=tt(e,o)||{},a={id:o,name:t.name,title:t.title,icon:t.icon,isDisabled:l,frecency:rt(i,s)};if("transform"===n)return a;const c=(0,r.getBlockVariations)(t.name,"inserter");return{...a,initialAttributes:{},description:t.description,category:t.category,keywords:t.keywords,variations:c,example:t.example,utility:1}}},it=O((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=lt(e,{buildScope:"inserter"}),o=/^\s*<!--\s+(\/)?wp:([a-z][a-z0-9_-]*\/)?([a-z][a-z0-9_-]*)\s+({(?:(?=([^}]+|}+(?=})|(?!}\s+\/?-->)[^])*)\5|[^]*?)}\s+)?(\/)?-->/,l=t=>{let n=z;if("web"===s.Platform.OS){const e=("string"==typeof t.content.raw?t.content.raw:t.content).match(o);if(e){const[,,t="core/",o]=e,l=(0,r.getBlockType)(t+o);l&&(n=l.icon)}}const l=`core/block/${t.id}`,{time:i,count:a=0}=tt(e,l)||{},c=rt(i,a);return{id:l,name:"core/block",initialAttributes:{ref:t.id},title:t.title.raw,icon:n,category:"reusable",keywords:[],isDisabled:!1,utility:1,frecency:c}},i=(0,r.getBlockTypes)().filter((n=>nt(e,n,t))).map(n),a=qe(e,"core/block",t)?Ct(e).map(l):[],c=i.reduce(((t,n)=>{const{variations:o=[]}=n;if(o.some((e=>{let{isDefault:t}=e;return t}))||t.push(n),o.length){const r=ot(e,n);t.push(...o.map(r))}return t}),[]),u=(e,t)=>{const{core:n,noncore:o}=e;return(t.name.startsWith("core/")?n:o).push(t),e},{core:d,noncore:p}=c.reduce(u,{core:[],noncore:[]}),m=[...d,...p];return[...m,...a]}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,Ct(e),(0,r.getBlockTypes)()])),st=O((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const o=lt(e,{buildScope:"transform"}),l=(0,r.getBlockTypes)().filter((t=>nt(e,t,n))).map(o),i=(0,u.mapKeys)(l,(e=>{let{name:t}=e;return t})),s=(0,r.getPossibleBlockTransformations)(t).reduce(((e,t)=>(i[null==t?void 0:t.name]&&e.push(i[t.name]),e)),[]),a=(0,u.orderBy)(s,(e=>i[e.name].frecency),"desc");return a}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,(0,r.getBlockTypes)()])),at=O((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=(0,u.some)((0,r.getBlockTypes)(),(n=>nt(e,n,t)));if(n)return!0;const o=qe(e,"core/block",t)&&Ct(e).length>0;return o}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Ct(e),(0,r.getBlockTypes)()])),ct=O((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t)return(0,u.filter)((0,r.getBlockTypes)(),(n=>nt(e,n,t)))}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,(0,r.getBlockTypes)()])),ut=O((function(e){var t,n;let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!o)return;const r=null===(t=e.blockListSettings[o])||void 0===t?void 0:t.__experimentalDefaultBlock,l=null===(n=e.blockListSettings[o])||void 0===n?void 0:n.__experimentalDirectInsert;return r&&l?"function"==typeof l?l(W(e,o))?r:null:r:void 0}),((e,t)=>[e.blockListSettings[t],e.blocks.tree[t]])),dt=O(((e,t)=>{const n=e.settings.__experimentalBlockPatterns.find((e=>{let{name:n}=e;return n===t}));return n?{...n,blocks:(0,r.parse)(n.content)}:null}),(e=>[e.settings.__experimentalBlockPatterns])),pt=O((e=>{const t=e.settings.__experimentalBlockPatterns,{allowedBlockTypes:n}=vt(e);return t.filter((e=>{let{inserter:t=!0}=e;return!!t})).map((t=>{let{name:n}=t;return dt(e,n)})).filter((e=>{let{blocks:t}=e;return((e,t)=>{if((0,u.isBoolean)(t))return t;const n=[...e];for(;n.length>0;){var o;const e=n.shift();if(!Ke(t,e.name||e.blockName,!0))return!1;null===(o=e.innerBlocks)||void 0===o||o.forEach((e=>{n.push(e)}))}return!0})(t,n)}))}),(e=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes])),mt=O((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=pt(e),o=(0,u.filter)(n,(n=>{let{blocks:o}=n;return o.every((n=>{let{name:o}=n;return Ye(e,o,t)}))}));return o}),((e,t)=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes,e.settings.templateLock,e.blockListSettings[t],e.blocks.byClientId[t]])),ft=O((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return V;const o=mt(e,n),r=Array.isArray(t)?t:[t];return o.filter((e=>{var t,n;return null==e||null===(t=e.blockTypes)||void 0===t||null===(n=t.some)||void 0===n?void 0:n.call(t,(e=>r.includes(e)))}))}),((e,t)=>[...mt.getDependants(e,t)])),ht=O((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return V;if(t.some((t=>{let{clientId:n,innerBlocks:o}=t;return o.length||xt(e,n)})))return V;const o=Array.from(new Set(t.map((e=>{let{name:t}=e;return t}))));return ft(e,o,n)}),((e,t)=>[...ft.getDependants(e,t)]));function gt(e,t){return e.blockListSettings[t]}function vt(e){return e.settings}function bt(e){return e.blocks.isPersistentChange}const kt=O((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.reduce(((t,n)=>e.blockListSettings[n]?{...t,[n]:e.blockListSettings[n]}:t),{})}),(e=>[e.blockListSettings])),_t=O(((e,t)=>{var n;const o=(0,u.find)(Ct(e),(e=>e.id===t));return o?null===(n=o.title)||void 0===n?void 0:n.raw:null}),(e=>[Ct(e)]));function yt(e){return e.blocks.isIgnoredChange}function Et(e){return e.lastBlockAttributesChange}function Ct(e){var t,n;return null!==(t=null==e||null===(n=e.settings)||void 0===n?void 0:n.__experimentalReusableBlocks)&&void 0!==t?t:V}function St(e){return e.isNavigationMode}function wt(e){return e.hasBlockMovingClientId}function Bt(e){return!!e.automaticChangeStatus}function It(e,t){return e.highlightedBlock===t}function xt(e,t){return!!e.blocks.controlledInnerBlocks[t]}const Tt=O(((e,t)=>{if(!t.length)return null;const n=ie(e);if(t.includes(H(e,n)))return n;const o=be(e),r=ue(e,n||o[0],t);return r?(0,u.last)(r):null}),((e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]));function Nt(e,t,n){const{lastBlockInserted:o}=e;return o.clientId===t&&o.source===n}var Pt=window.wp.a11y,Mt=window.wp.richText,Rt=window.wp.deprecated,Lt=n.n(Rt);const At=e=>t=>{let{dispatch:n}=t;n({type:"RESET_BLOCKS",blocks:e}),n(Dt(e))},Dt=e=>t=>{let{select:n,dispatch:o}=t;const l=n.getTemplate(),i=n.getTemplateLock(),s=!l||"all"!==i||(0,r.doBlocksMatchTemplate)(e,l);if(s!==n.isValidTemplate())return o.setTemplateValidity(s),s};function Ot(e,t,n){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:n}}function Ft(e){return Lt()('wp.data.dispatch( "core/block-editor" ).receiveBlocks',{since:"5.9",alternative:"resetBlocks or insertBlocks"}),{type:"RECEIVE_BLOCKS",blocks:e}}function zt(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:(0,u.castArray)(e),attributes:t,uniqueByBlock:n}}function Vt(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function Ht(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}const Ut=e=>t=>{let{select:n,dispatch:o}=t;const r=n.getPreviousBlockClientId(e);r&&o.selectBlock(r,-1)},Gt=e=>t=>{let{select:n,dispatch:o}=t;const r=n.getNextBlockClientId(e);r&&o.selectBlock(r)};function Wt(){return{type:"START_MULTI_SELECT"}}function $t(){return{type:"STOP_MULTI_SELECT"}}const jt=(e,t)=>n=>{let{select:o,dispatch:r}=n;if(o.getBlockRootClientId(e)!==o.getBlockRootClientId(t))return;r({type:"MULTI_SELECT",start:e,end:t});const l=o.getSelectedBlockCount();(0,Pt.speak)((0,h.sprintf)(
2
  /* translators: %s: number of selected blocks */
3
+ (0,h._n)("%s block selected.","%s blocks selected.",l),l),"assertive")};function Kt(){return{type:"CLEAR_SELECTED_BLOCK"}}function qt(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}function Yt(e,t){var n,o;const l=null!==(n=null==t||null===(o=t.__experimentalPreferredStyleVariations)||void 0===o?void 0:o.value)&&void 0!==n?n:{};return e.map((e=>{var t;const n=e.name;if(!(0,r.hasBlockSupport)(n,"defaultStylePicker",!0))return e;if(!l[n])return e;const o=null===(t=e.attributes)||void 0===t?void 0:t.className;if(null!=o&&o.includes("is-style-"))return e;const{attributes:i={}}=e,s=l[n];return{...e,attributes:{...i,className:`${o||""} is-style-${s}`.trim()}}}))}const Zt=function(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4?arguments[4]:void 0;return l=>{let{select:i,dispatch:s}=l;e=(0,u.castArray)(e),t=Yt((0,u.castArray)(t),i.getSettings());const a=i.getBlockRootClientId((0,u.first)(e));for(let e=0;e<t.length;e++){const n=t[e];if(!i.canInsertBlockType(n.name,a))return}s({type:"REPLACE_BLOCKS",clientIds:e,blocks:t,time:Date.now(),indexToSelect:n,initialPosition:o,meta:r}),s((e=>{let{select:t,dispatch:n}=e;if(t.getBlockCount()>0)return;const{__unstableHasCustomAppender:o}=t.getSettings();o||n.insertDefaultBlock()}))}};function Xt(e,t){return Zt(e,t)}const Qt=e=>(t,n)=>o=>{let{select:r,dispatch:l}=o;r.canMoveBlocks(t,n)&&l({type:e,clientIds:(0,u.castArray)(t),rootClientId:n})},Jt=Qt("MOVE_BLOCKS_DOWN"),en=Qt("MOVE_BLOCKS_UP"),tn=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments.length>3?arguments[3]:void 0;return r=>{let{select:l,dispatch:i}=r;if(l.canMoveBlocks(e,t)){if(t!==n){if(!l.canRemoveBlocks(e,t))return;if(!l.canInsertBlocks(e,n))return}i({type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientIds:e,index:o})}}};function nn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments.length>3?arguments[3]:void 0;return tn([e],t,n,o)}function on(e,t,n,o,r){return rn([e],t,n,o,0,r)}const rn=function(e,t,n){let o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,l=arguments.length>5?arguments[5]:void 0;return i=>{let{select:s,dispatch:a}=i;(0,u.isObject)(r)&&(l=r,r=0,Lt()("meta argument in wp.data.dispatch('core/block-editor')",{since:"10.1",plugin:"Gutenberg",hint:"The meta argument is now the 6th argument of the function"})),e=Yt((0,u.castArray)(e),s.getSettings());const c=[];for(const t of e)s.canInsertBlockType(t.name,n)&&c.push(t);c.length&&a({type:"INSERT_BLOCKS",blocks:c,index:t,rootClientId:n,time:Date.now(),updateSelection:o,initialPosition:o?r:null,meta:l})}};function ln(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{__unstableWithInserter:o}=n;return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t,__unstableWithInserter:o}}function sn(){return{type:"HIDE_INSERTION_POINT"}}function an(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}const cn=()=>e=>{let{select:t,dispatch:n}=e;n({type:"SYNCHRONIZE_TEMPLATE"});const o=t.getBlocks(),l=t.getTemplate(),i=(0,r.synchronizeBlocksWithTemplate)(o,l);n.resetBlocks(i)},un=(e,t)=>n=>{let{select:o,dispatch:l}=n;const i=[e,t];l({type:"MERGE_BLOCKS",blocks:i});const[s,a]=i,c=o.getBlock(s),d=(0,r.getBlockType)(c.name);if(d&&!d.merge)return void l.selectBlock(c.clientId);const p=o.getBlock(a),m=(0,r.getBlockType)(p.name),{clientId:f,attributeKey:h,offset:g}=o.getSelectionStart(),v=(f===s?d:m).attributes[h],b=(f===s||f===a)&&void 0!==h&&void 0!==g&&!!v;v||("number"==typeof h?window.console.error("RichText needs an identifier prop that is the block attribute key of the attribute it controls. Its type is expected to be a string, but was "+typeof h):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));const k=(0,r.cloneBlock)(c),_=(0,r.cloneBlock)(p);if(b){const e=f===s?k:_,t=e.attributes[h],{multiline:n,__unstableMultilineWrapperTags:o,__unstablePreserveWhiteSpace:r}=v,l=(0,Mt.insert)((0,Mt.create)({html:t,multilineTag:n,multilineWrapperTags:o,preserveWhiteSpace:r}),"†",g,g);e.attributes[h]=(0,Mt.toHTMLString)({value:l,multilineTag:n,preserveWhiteSpace:r})}const y=c.name===p.name?[_]:(0,r.switchToBlockType)(_,c.name);if(!y||!y.length)return;const E=d.merge(k.attributes,y[0].attributes);if(b){const e=(0,u.findKey)(E,(e=>"string"==typeof e&&-1!==e.indexOf("†"))),t=E[e],{multiline:n,__unstableMultilineWrapperTags:o,__unstablePreserveWhiteSpace:r}=d.attributes[e],i=(0,Mt.create)({html:t,multilineTag:n,multilineWrapperTags:o,preserveWhiteSpace:r}),s=i.text.indexOf("†"),a=(0,Mt.remove)(i,s,s+1),p=(0,Mt.toHTMLString)({value:a,multilineTag:n,preserveWhiteSpace:r});E[e]=p,l.selectionChange(c.clientId,e,s,s)}l.replaceBlocks([c.clientId,p.clientId],[{...c,attributes:{...c.attributes,...E}},...y.slice(1)],0)},dn=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return n=>{let{select:o,dispatch:r}=n;if(!e||!e.length)return;e=(0,u.castArray)(e);const l=o.getBlockRootClientId(e[0]);o.canRemoveBlocks(e,l)&&(t&&r.selectPreviousBlock(e[0]),r({type:"REMOVE_BLOCKS",clientIds:e}),r((e=>{let{select:t,dispatch:n}=e;if(t.getBlockCount()>0)return;const{__unstableHasCustomAppender:o}=t.getSettings();o||n.insertDefaultBlock()})))}};function pn(e,t){return dn([e],t)}function mn(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:n,initialPosition:n?o:null,time:Date.now()}}function fn(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function hn(){return{type:"START_TYPING"}}function gn(){return{type:"STOP_TYPING"}}function vn(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function bn(){return{type:"STOP_DRAGGING_BLOCKS"}}function kn(){return{type:"ENTER_FORMATTED_TEXT"}}function yn(){return{type:"EXIT_FORMATTED_TEXT"}}function En(e,t,n,o){return{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:o}}function Cn(e,t,n){const o=(0,r.getDefaultBlockName)();if(o)return on((0,r.createBlock)(o,e),n,t)}function Sn(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function wn(e){return{type:"UPDATE_SETTINGS",settings:e}}function Bn(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function In(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function xn(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}const Tn=()=>e=>{let{dispatch:t}=e;t({type:"MARK_AUTOMATIC_CHANGE"});const{requestIdleCallback:n=(e=>setTimeout(e,100))}=window;n((()=>{t({type:"MARK_AUTOMATIC_CHANGE_FINAL"})}))},Nn=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return t=>{let{dispatch:n}=t;n({type:"SET_NAVIGATION_MODE",isNavigationMode:e}),e?(0,Pt.speak)((0,h.__)("You are currently in navigation mode. Navigate blocks using the Tab key and Arrow keys. Use Left and Right Arrow keys to move between nesting levels. To exit navigation mode and edit the selected block, press Enter.")):(0,Pt.speak)((0,h.__)("You are currently in edit mode. To return to the navigation mode, press Escape."))}},Pn=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t=>{let{dispatch:n}=t;n({type:"SET_BLOCK_MOVING_MODE",hasBlockMovingClientId:e}),e&&(0,Pt.speak)((0,h.__)("Use the Tab key and Arrow keys to choose new block location. Use Left and Right Arrow keys to move between nesting levels. Once location is selected press Enter or Space to move the block."))}},Mn=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return n=>{let{select:o,dispatch:l}=n;if(!e||!e.length)return;const i=o.getBlocksByClientId(e);if((0,u.some)(i,(e=>!e)))return;if(i.map((e=>e.name)).some((e=>!(0,r.hasBlockSupport)(e,"multiple",!0))))return;const s=o.getBlockRootClientId(e[0]),a=o.getBlockIndex((0,u.last)((0,u.castArray)(e)),s),c=i.map((e=>(0,r.__experimentalCloneSanitizedBlock)(e)));return l.insertBlocks(c,a+1,s,t),c.length>1&&t&&l.multiSelect((0,u.first)(c).clientId,(0,u.last)(c).clientId),c.map((e=>e.clientId))}},Rn=e=>t=>{let{select:n,dispatch:o}=t;if(!e)return;const r=n.getBlockRootClientId(e);if(n.getTemplateLock(r))return;const l=n.getBlockIndex(e,r);return o.insertDefaultBlock({},r,l)},Ln=e=>t=>{let{select:n,dispatch:o}=t;if(!e)return;const r=n.getBlockRootClientId(e);if(n.getTemplateLock(r))return;const l=n.getBlockIndex(e,r);return o.insertDefaultBlock({},r,l+1)};function An(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}const Dn=e=>async t=>{let{dispatch:n}=t;n(An(e,!0)),await new Promise((e=>setTimeout(e,150))),n(An(e,!1))};function On(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}const Fn="core/block-editor",zn={reducer:R,selectors:e,actions:t,__experimentalUseThunks:!0},Vn=(0,m.createReduxStore)(Fn,{...zn,persist:["preferences"]});(0,m.registerStore)(Fn,{...zn,persist:["preferences"]});const Hn={name:"",isSelected:!1},Un=(0,s.createContext)(Hn),{Provider:Gn}=Un;function Wn(){return(0,s.useContext)(Un)}function $n(){const{isSelected:e,clientId:t,name:n}=Wn();return(0,m.useSelect)((o=>{if(e)return!0;const{getBlockName:r,isFirstMultiSelectedBlock:l,getMultiSelectedBlockClientIds:i}=o(Vn);return!!l(t)&&i().every((e=>r(e)===n))}),[t,e,n])}function jn(e){let{group:t="default",controls:n,children:o,__experimentalShareWithChildBlocks:l=!1}=e;const i=function(e,t){const n=$n(),{clientId:o}=Wn(),l=(0,m.useSelect)((e=>{const{getBlockName:n,hasSelectedInnerBlock:l}=e(Vn),{hasBlockSupport:i}=e(r.store);return t&&i(n(o),"__experimentalExposeControlsToChildren",!1)&&l(o)}),[t,o]);var i;return n?null===(i=f[e])||void 0===i?void 0:i.Fill:l?f.parent.Fill:null}(t,l);return i?(0,s.createElement)(p.__experimentalStyleProvider,{document:document},(0,s.createElement)(i,null,(e=>{const r=(0,u.isEmpty)(e)?null:e;return(0,s.createElement)(p.__experimentalToolbarContext.Provider,{value:r},"default"===t&&(0,s.createElement)(p.ToolbarGroup,{controls:n}),o)}))):null}function Kn(e){let{group:t="default",...n}=e;const o=(0,s.useContext)(p.__experimentalToolbarContext),r=f[t].Slot,l=(0,p.__experimentalUseSlot)(r.__unstableName);return Boolean(l.fills&&l.fills.length)?"default"===t?(0,s.createElement)(r,i({},n,{bubblesVirtually:!0,fillProps:o})):(0,s.createElement)(p.ToolbarGroup,null,(0,s.createElement)(r,i({},n,{bubblesVirtually:!0,fillProps:o}))):null}const qn=jn;qn.Slot=Kn;const Yn=e=>(0,s.createElement)(jn,i({group:"inline"},e));Yn.Slot=e=>(0,s.createElement)(Kn,i({group:"inline"},e));var Zn=qn,Xn=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M5 15h14V9H5v6zm0 4.8h14v-1.5H5v1.5zM5 4.2v1.5h14V4.2H5z"})),Qn=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M4 9v6h14V9H4zm8-4.8H4v1.5h8V4.2zM4 19.8h8v-1.5H4v1.5z"})),Jn=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M7 9v6h10V9H7zM5 19.8h14v-1.5H5v1.5zM5 4.3v1.5h14V4.3H5z"})),eo=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M6 15h14V9H6v6zm6-10.8v1.5h8V4.2h-8zm0 15.6h8v-1.5h-8v1.5z"})),to=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M5 9v6h14V9H5zm11-4.8H8v1.5h8V4.2zM8 19.8h8v-1.5H8v1.5z"})),no=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M5 4v11h14V4H5zm3 15.8h8v-1.5H8v1.5z"})),oo=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})),ro=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M20 9h-7.2V4h-1.6v5H4v6h7.2v5h1.6v-5H20z"})),lo=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})),io=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"})),so=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M14.3 6.7l-1.1 1.1 4 4H4v1.5h13.3l-4.1 4.4 1.1 1.1 5.8-6.3z"})),ao=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M16.2 13.2l-4 4V4h-1.5v13.3l-4.5-4.1-1 1.1 6.2 5.8 5.8-5.8-1-1.1z"}));function co(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.split(",").map((e=>`.editor-styles-wrapper ${e} ${t}`)).join(",")}const uo={"color.palette":e=>void 0===e.colors?void 0:e.colors,"color.gradients":e=>void 0===e.gradients?void 0:e.gradients,"color.custom":e=>void 0===e.disableCustomColors?void 0:!e.disableCustomColors,"color.customGradient":e=>void 0===e.disableCustomGradients?void 0:!e.disableCustomGradients,"typography.fontSizes":e=>void 0===e.fontSizes?void 0:e.fontSizes,"typography.customFontSize":e=>void 0===e.disableCustomFontSizes?void 0:!e.disableCustomFontSizes,"typography.lineHeight":e=>e.enableCustomLineHeight,"spacing.units":e=>{if(void 0!==e.enableCustomUnits)return!0===e.enableCustomUnits?["px","em","rem","vh","vw","%"]:e.enableCustomUnits},"spacing.padding":e=>e.enableCustomSpacing},po={"border.customColor":"border.color","border.customStyle":"border.style","border.customWidth":"border.width","typography.customFontStyle":"typography.fontStyle","typography.customFontWeight":"typography.fontWeight","typography.customLetterSpacing":"typography.letterSpacing","typography.customTextDecorations":"typography.textDecoration","typography.customTextTransforms":"typography.textTransform","border.customRadius":"border.radius","spacing.customMargin":"spacing.margin","spacing.customPadding":"spacing.padding","typography.customLineHeight":"typography.lineHeight"};function mo(e){const{name:t}=Wn();return(0,m.useSelect)((n=>{var o;const l=n(Vn).getSettings(),i=(e=>po[e]||e)(e),s=`__experimentalFeatures.${i}`,a=`__experimentalFeatures.blocks.${t}.${i}`,c=null!==(o=(0,u.get)(l,a))&&void 0!==o?o:(0,u.get)(l,s);var d,p;if(void 0!==c)return r.__EXPERIMENTAL_PATHS_WITH_MERGE[i]?null!==(d=null!==(p=c.custom)&&void 0!==p?p:c.theme)&&void 0!==d?d:c.default:c;const m=uo[i]?uo[i](l):void 0;return void 0!==m?m:"typography.dropCap"===i||void 0}),[t,e])}const fo={left:oo,center:ro,right:lo,"space-between":io};var ho=function(e){let{allowedControls:t=["left","center","right","space-between"],isCollapsed:n=!0,onChange:o,value:r,popoverProps:l,isToolbar:a}=e;const c=e=>{o(e===r?void 0:e)},u=r?fo[r]:fo.left,d=[{name:"left",icon:oo,title:(0,h.__)("Justify items left"),isActive:"left"===r,onClick:()=>c("left")},{name:"center",icon:ro,title:(0,h.__)("Justify items center"),isActive:"center"===r,onClick:()=>c("center")},{name:"right",icon:lo,title:(0,h.__)("Justify items right"),isActive:"right"===r,onClick:()=>c("right")},{name:"space-between",icon:io,title:(0,h.__)("Space between items"),isActive:"space-between"===r,onClick:()=>c("space-between")}],m=a?p.ToolbarGroup:p.ToolbarDropdownMenu,f=a?{isCollapsed:n}:{};return(0,s.createElement)(m,i({icon:u,popoverProps:l,label:(0,h.__)("Change items justification"),controls:d.filter((e=>t.includes(e.name)))},f))};function go(e){return(0,s.createElement)(ho,i({},e,{isToolbar:!1}))}function vo(e){return(0,s.createElement)(ho,i({},e,{isToolbar:!0}))}const bo={left:"flex-start",right:"flex-end",center:"center","space-between":"space-between"},ko={left:"flex-start",right:"flex-end",center:"center"},_o=["wrap","nowrap"];var yo={name:"flex",label:(0,h.__)("Flex"),inspectorControls:function(e){let{layout:t={},onChange:n}=e;const{allowOrientation:o=!0}=t;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.Flex,null,(0,s.createElement)(p.FlexItem,null,(0,s.createElement)(Eo,{layout:t,onChange:n})),(0,s.createElement)(p.FlexItem,null,o&&(0,s.createElement)(So,{layout:t,onChange:n}))),(0,s.createElement)(Co,{layout:t,onChange:n}))},toolBarControls:function(e){let{layout:t={},onChange:n,layoutBlockSupport:o}=e;return null!=o&&o.allowSwitching?null:(0,s.createElement)(Zn,{group:"block",__experimentalShareWithChildBlocks:!0},(0,s.createElement)(Eo,{layout:t,onChange:n,isToolbar:!0}))},save:function(e){let{selector:t,layout:n}=e;const{orientation:o="horizontal",setCascadingProperties:r=!1}=n,l=null!==mo("spacing.blockGap"),i=bo[n.justifyContent]||bo.left,a=_o.includes(n.flexWrap)?n.flexWrap:"wrap";let c=`\n\t\tflex-direction: row;\n\t\talign-items: center;\n\t\tjustify-content: ${i};\n\t\t`;r&&(c+=`\n\t\t\t--layout-justification-setting: ${i};\n\t\t\t--layout-direction: row;\n\t\t\t--layout-wrap: ${a};\n\t\t\t--layout-justify: ${i};\n\t\t\t--layout-align: center;\n\t\t\t`);const u=ko[n.justifyContent]||ko.left;let d=`\n\t\tflex-direction: column;\n\t\talign-items: ${u};\n\t\t`;return r&&(d+=`\n\t\t\t--layout-justification-setting: ${u};\n\t\t\t--layout-direction: column;\n\t\t\t--layout-justify: initial;\n\t\t\t--layout-align: ${u};\n\t\t\t`),(0,s.createElement)("style",null,`\n\t\t\t\t${co(t)} {\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\tgap: ${l?"var( --wp--style--block-gap, 0.5em )":"0.5em"};\n\t\t\t\t\tflex-wrap: ${a};\n\t\t\t\t\t${"horizontal"===o?c:d}\n\t\t\t\t}\n\n\t\t\t\t${co(t,"> *")} {\n\t\t\t\t\tmargin: 0;\n\t\t\t\t}\n\t\t\t`)},getOrientation(e){const{orientation:t="horizontal"}=e;return t},getAlignments:()=>[]};function Eo(e){let{layout:t,onChange:n,isToolbar:o=!1}=e;const{justifyContent:r="left",orientation:l="horizontal"}=t,i=e=>{n({...t,justifyContent:e})},a=["left","center","right"];if("horizontal"===l&&a.push("space-between"),o)return(0,s.createElement)(go,{allowedControls:a,value:r,onChange:i,popoverProps:{position:"bottom right",isAlternate:!0}});const c=[{value:"left",icon:oo,label:(0,h.__)("Justify items left")},{value:"center",icon:ro,label:(0,h.__)("Justify items center")},{value:"right",icon:lo,label:(0,h.__)("Justify items right")}];return"horizontal"===l&&c.push({value:"space-between",icon:io,label:(0,h.__)("Space between items")}),(0,s.createElement)("fieldset",{className:"block-editor-hooks__flex-layout-justification-controls"},(0,s.createElement)("legend",null,(0,h.__)("Justification")),(0,s.createElement)("div",null,c.map((e=>{let{value:t,icon:n,label:o}=e;return(0,s.createElement)(p.Button,{key:t,label:o,icon:n,isPressed:r===t,onClick:()=>i(t)})}))))}function Co(e){let{layout:t,onChange:n}=e;const{flexWrap:o="wrap"}=t;return(0,s.createElement)(p.ToggleControl,{label:(0,h.__)("Allow to wrap to multiple lines"),onChange:e=>{n({...t,flexWrap:e?"wrap":"nowrap"})},checked:"wrap"===o})}function So(e){let{layout:t,onChange:n}=e;const{orientation:o="horizontal"}=t;return(0,s.createElement)("fieldset",{className:"block-editor-hooks__flex-layout-orientation-controls"},(0,s.createElement)("legend",null,(0,h.__)("Orientation")),(0,s.createElement)(p.Button,{label:"horizontal",icon:so,isPressed:"horizontal"===o,onClick:()=>n({...t,orientation:"horizontal"})}),(0,s.createElement)(p.Button,{label:"vertical",icon:ao,isPressed:"vertical"===o,onClick:()=>n({...t,orientation:"vertical"})}))}var wo=function(e){let{icon:t,size:n=24,...o}=e;return(0,s.cloneElement)(t,{width:n,height:n,...o})};const Bo=[{name:"default",label:(0,h.__)("Flow"),inspectorControls:function(e){let{layout:t,onChange:n}=e;const{wideSize:o,contentSize:r}=t,l=(0,p.__experimentalUseCustomUnits)({availableUnits:mo("spacing.units")||["%","px","em","rem","vw"]});return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:"block-editor-hooks__layout-controls"},(0,s.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,s.createElement)(p.__experimentalUnitControl,{label:(0,h.__)("Content"),labelPosition:"top",__unstableInputWidth:"80px",value:r||o||"",onChange:e=>{e=0>parseFloat(e)?"0":e,n({...t,contentSize:e})},units:l}),(0,s.createElement)(wo,{icon:Jn})),(0,s.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,s.createElement)(p.__experimentalUnitControl,{label:(0,h.__)("Wide"),labelPosition:"top",__unstableInputWidth:"80px",value:o||r||"",onChange:e=>{e=0>parseFloat(e)?"0":e,n({...t,wideSize:e})},units:l}),(0,s.createElement)(wo,{icon:to}))),(0,s.createElement)("div",{className:"block-editor-hooks__layout-controls-reset"},(0,s.createElement)(p.Button,{variant:"secondary",isSmall:!0,disabled:!r&&!o,onClick:()=>n({contentSize:void 0,wideSize:void 0,inherit:!1})},(0,h.__)("Reset"))),(0,s.createElement)("p",{className:"block-editor-hooks__layout-controls-helptext"},(0,h.__)("Customize the width for all elements that are assigned to the center or wide columns.")))},toolBarControls:function(){return null},save:function(e){let{selector:t,layout:n={}}=e;const{contentSize:o,wideSize:r}=n,l=null!==mo("spacing.blockGap");let i=o||r?`\n\t\t\t\t\t${co(t,"> *")} {\n\t\t\t\t\t\tmax-width: ${null!=o?o:r};\n\t\t\t\t\t\tmargin-left: auto !important;\n\t\t\t\t\t\tmargin-right: auto !important;\n\t\t\t\t\t}\n\n\t\t\t\t\t${co(t,'> [data-align="wide"]')} {\n\t\t\t\t\t\tmax-width: ${null!=r?r:o};\n\t\t\t\t\t}\n\n\t\t\t\t\t${co(t,'> [data-align="full"]')} {\n\t\t\t\t\t\tmax-width: none;\n\t\t\t\t\t}\n\t\t\t\t`:"";return i+=`\n\t\t\t${co(t,'> [data-align="left"]')} {\n\t\t\t\tfloat: left;\n\t\t\t\tmargin-right: 2em;\n\t\t\t}\n\n\t\t\t${co(t,'> [data-align="right"]')} {\n\t\t\t\tfloat: right;\n\t\t\t\tmargin-left: 2em;\n\t\t\t}\n\n\t\t`,l&&(i+=`\n\t\t\t\t${co(t,"> *")} {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-bottom: 0;\n\t\t\t\t}\n\t\t\t\t${co(t,"> * + *")} {\n\t\t\t\t\tmargin-top: var( --wp--style--block-gap );\n\t\t\t\t}\n\t\t\t`),(0,s.createElement)("style",null,i)},getOrientation:()=>"vertical",getAlignments(e){const t=function(e){const{contentSize:t,wideSize:n}=e,o={},r=/^(?!0)\d+(px|em|rem|vw|vh|%)?$/i;return r.test(t)&&(
4
  // translators: %s: container size (i.e. 600px etc)
5
  o.none=(0,h.sprintf)((0,h.__)("Max %s wide"),t)),r.test(n)&&(
6
  // translators: %s: container size (i.e. 600px etc)
7
+ o.wide=(0,h.sprintf)((0,h.__)("Max %s wide"),n)),o}(e);if(void 0!==e.alignments)return e.alignments.includes("none")||e.alignments.unshift("none"),e.alignments.map((e=>({name:e,info:t[e]})));const{contentSize:n,wideSize:o}=e,r=[{name:"left"},{name:"center"},{name:"right"}];return n&&r.unshift({name:"full"}),o&&r.unshift({name:"wide",info:t.wide}),r.unshift({name:"none",info:t.none}),r}},yo];function Io(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return Bo.find((t=>t.name===e))}const xo={type:"default"},To=(0,s.createContext)(xo),No=To.Provider;function Po(){return(0,s.useContext)(To)}function Mo(e){let{layout:t={},...n}=e;const o=Io(t.type);return o?(0,s.createElement)(o.save,i({layout:t},n)):null}const Ro=["none","left","center","right","wide","full"],Lo=["wide","full"];function Ao(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ro;e.includes("none")||(e=["none",...e]);const{wideControlsEnabled:t=!1,themeSupportsLayout:n}=(0,m.useSelect)((e=>{const{getSettings:t}=e(Vn),n=t();return{wideControlsEnabled:n.alignWide,themeSupportsLayout:n.supportsLayout}}),[]),o=Po(),r=Io(null==o?void 0:o.type),l=r.getAlignments(o);if(n){const t=l.filter((t=>{let{name:n}=t;return e.includes(n)}));return 1===t.length&&"none"===t[0].name?[]:t}if("default"!==r.name)return[];const{alignments:i=Ro}=o,s=e.filter((e=>(o.alignments||t||!Lo.includes(e))&&i.includes(e))).map((e=>({name:e})));return 1===s.length&&"none"===s[0].name?[]:s}const Do={none:{icon:Xn,title:(0,h.__)("None")},left:{icon:Qn,title:(0,h.__)("Align left")},center:{icon:Jn,title:(0,h.__)("Align center")},right:{icon:eo,title:(0,h.__)("Align right")},wide:{icon:to,title:(0,h.__)("Wide width")},full:{icon:no,title:(0,h.__)("Full width")}},Oo={isAlternate:!0};var Fo=function(e){let{value:t,onChange:n,controls:o,isToolbar:r,isCollapsed:l=!0}=e;const a=Ao(o);if(!a.length)return null;function u(e){n([t,"none"].includes(e)?void 0:e)}const d=Do[t],m=Do.none,f=r?p.ToolbarGroup:p.ToolbarDropdownMenu,g={popoverProps:Oo,icon:d?d.icon:m.icon,label:(0,h.__)("Align"),toggleProps:{describedBy:(0,h.__)("Change alignment")}},v=r||s.Platform.isNative?{isCollapsed:r?l:void 0,controls:a.map((e=>{let{name:n}=e;return{...Do[n],isActive:t===n||!t&&"none"===n,role:l?"menuitemradio":void 0,onClick:()=>u(n)}}))}:{children:e=>{let{onClose:n}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.MenuGroup,{className:"block-editor-block-alignment-control__menu-group"},a.map((e=>{let{name:o,info:r}=e;const{icon:l,title:i}=Do[o],a=o===t||!t&&"none"===o;return(0,s.createElement)(p.MenuItem,{key:o,icon:l,iconPosition:"left",className:c()("components-dropdown-menu__menu-item",{"is-active":a}),isSelected:a,onClick:()=>{u(o),n()},role:"menuitemradio",info:r},i)}))))}};return(0,s.createElement)(f,i({},g,v))};function zo(e){return(0,s.createElement)(Fo,i({},e,{isToolbar:!1}))}function Vo(e){return(0,s.createElement)(Fo,i({},e,{isToolbar:!0}))}const Ho=["left","center","right","wide","full"],Uo=["wide","full"];function Go(e){let t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return t=Array.isArray(e)?Ho.filter((t=>e.includes(t))):!0===e?[...Ho]:[],!o||!0===e&&!n?(0,u.without)(t,...Uo):t}const Wo=(0,d.createHigherOrderComponent)((e=>t=>{const{name:n}=t,o=Ao(Go((0,r.getBlockSupport)(n,"align"),(0,r.hasBlockSupport)(n,"alignWide",!0))).map((e=>{let{name:t}=e;return t}));return(0,s.createElement)(s.Fragment,null,!!o.length&&(0,s.createElement)(Zn,{group:"block",__experimentalShareWithChildBlocks:!0},(0,s.createElement)(zo,{value:t.attributes.align,onChange:e=>{if(!e){var n,o;const l=(0,r.getBlockType)(t.name);(null==l||null===(n=l.attributes)||void 0===n||null===(o=n.align)||void 0===o?void 0:o.default)&&(e="")}t.setAttributes({align:e})},controls:o})),(0,s.createElement)(e,t))}),"withToolbarControls"),$o=(0,d.createHigherOrderComponent)((e=>t=>{const{name:n,attributes:o}=t,{align:l}=o,a=Ao(Go((0,r.getBlockSupport)(n,"align"),(0,r.hasBlockSupport)(n,"alignWide",!0)));if(void 0===l)return(0,s.createElement)(e,t);let c=t.wrapperProps;return a.some((e=>e.name===l))&&(c={...c,"data-align":l}),(0,s.createElement)(e,i({},t,{wrapperProps:c}))}));(0,l.addFilter)("blocks.registerBlockType","core/align/addAttribute",(function(e){return(0,u.has)(e.attributes,["align","type"])||(0,r.hasBlockSupport)(e,"align")&&(e.attributes={...e.attributes,align:{type:"string",enum:[...Ho,""]}}),e})),(0,l.addFilter)("editor.BlockListBlock","core/editor/align/with-data-align",$o),(0,l.addFilter)("editor.BlockEdit","core/editor/align/with-toolbar-controls",Wo),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",(function(e,t,n){const{align:o}=n;return Go((0,r.getBlockSupport)(t,"align"),(0,r.hasBlockSupport)(t,"alignWide",!0)).includes(o)&&(e.className=c()(`align${o}`,e.className)),e})),(0,l.addFilter)("blocks.registerBlockType","core/lock/addAttribute",(function(e){return(0,u.has)(e.attributes,["lock","type"])||(e.attributes={...e.attributes,lock:{type:"object"}}),e})),window.wp.warning;var jo={default:(0,p.createSlotFill)("InspectorControls"),advanced:(0,p.createSlotFill)("InspectorAdvancedControls"),border:(0,p.createSlotFill)("InspectorControlsBorder"),dimensions:(0,p.createSlotFill)("InspectorControlsDimensions"),typography:(0,p.createSlotFill)("InspectorControlsTypography")};function Ko(e){var t;let{__experimentalGroup:n="default",children:o}=e;const r=$n(),l=null===(t=jo[n])||void 0===t?void 0:t.Fill;return l?r?(0,s.createElement)(p.__experimentalStyleProvider,{document:document},(0,s.createElement)(l,null,(e=>{const t=(0,u.isEmpty)(e)?null:e;return(0,s.createElement)(p.__experimentalToolsPanelContext.Provider,{value:t},o)}))):null:("undefined"!=typeof process&&process.env,null)}const qo=e=>{if(!(0,u.isObject)(e)||Array.isArray(e))return e;const t=(0,u.pickBy)((0,u.mapValues)(e,qo),u.identity);return(0,u.isEmpty)(t)?void 0:t};function Yo(e){let{children:t,group:n,label:o}=e;const{clientId:r,attributes:l}=(0,m.useSelect)((e=>{const{getBlockAttributes:t,getSelectedBlockClientId:n}=e(Vn),o=n();return{clientId:o,attributes:t(o)}}),[]),{updateBlockAttributes:i}=(0,m.useDispatch)(Vn);return(0,s.createElement)(p.__experimentalToolsPanel,{className:`${n}-block-support-panel`,label:o,resetAll:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const{style:t}=l;let n={style:t};e.forEach((e=>{n={...n,...e(n)}})),n={...n,style:qo(n.style)},i(r,n)},key:r,panelId:r,hasInnerWrapper:!0,shouldRenderPlaceholderItems:!0},t)}function Zo(e){let{Slot:t,...n}=e;const o=(0,s.useContext)(p.__experimentalToolsPanelContext);return(0,s.createElement)(t,i({},n,{fillProps:o,bubblesVirtually:!0}))}function Xo(e){var t;let{__experimentalGroup:n="default",label:o,...r}=e;const l=null===(t=jo[n])||void 0===t?void 0:t.Slot,a=(0,p.__experimentalUseSlot)(null==l?void 0:l.__unstableName);return l&&a?Boolean(a.fills&&a.fills.length)?o?(0,s.createElement)(Yo,{group:n,label:o},(0,s.createElement)(Zo,i({},r,{Slot:l}))):(0,s.createElement)(l,i({},r,{bubblesVirtually:!0})):null:("undefined"!=typeof process&&process.env,null)}const Qo=Ko;Qo.Slot=Xo;const Jo=e=>(0,s.createElement)(Ko,i({},e,{__experimentalGroup:"advanced"}));Jo.Slot=e=>(0,s.createElement)(Xo,i({},e,{__experimentalGroup:"advanced"})),Jo.slotName="InspectorAdvancedControls";var er=Qo;const tr=/[\s#]/g,nr=(0,d.createHigherOrderComponent)((e=>t=>{if((0,r.hasBlockSupport)(t.name,"anchor")&&t.isSelected){const n="web"===s.Platform.OS,o=(0,s.createElement)(p.TextControl,{className:"html-anchor-control",label:(0,h.__)("HTML anchor"),help:(0,s.createElement)(s.Fragment,null,(0,h.__)("Enter a word or two — without spaces — to make a unique web address just for this block, called an “anchor.” Then, you’ll be able to link directly to this section of your page."),n&&(0,s.createElement)(p.ExternalLink,{href:(0,h.__)("https://wordpress.org/support/article/page-jumps/")},(0,h.__)("Learn more about anchors"))),value:t.attributes.anchor||"",placeholder:n?null:(0,h.__)("Add an anchor"),onChange:e=>{e=e.replace(tr,"-"),t.setAttributes({anchor:e})},autoCapitalize:"none",autoComplete:"off"});return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(e,t),n&&(0,s.createElement)(er,{__experimentalGroup:"advanced"},o),!n&&"core/heading"===t.name&&(0,s.createElement)(er,null,(0,s.createElement)(p.PanelBody,{title:(0,h.__)("Heading settings")},o)))}return(0,s.createElement)(e,t)}),"withInspectorControl");(0,l.addFilter)("blocks.registerBlockType","core/anchor/attribute",(function(e){return(0,u.has)(e.attributes,["anchor","type"])||(0,r.hasBlockSupport)(e,"anchor")&&(e.attributes={...e.attributes,anchor:{type:"string",source:"attribute",attribute:"id",selector:"*"}}),e})),(0,l.addFilter)("editor.BlockEdit","core/editor/anchor/with-inspector-control",nr),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/anchor/save-props",(function(e,t,n){return(0,r.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor),e}));const or=(0,d.createHigherOrderComponent)((e=>t=>(0,r.hasBlockSupport)(t.name,"customClassName",!0)&&t.isSelected?(0,s.createElement)(s.Fragment,null,(0,s.createElement)(e,t),(0,s.createElement)(er,{__experimentalGroup:"advanced"},(0,s.createElement)(p.TextControl,{autoComplete:"off",label:(0,h.__)("Additional CSS class(es)"),value:t.attributes.className||"",onChange:e=>{t.setAttributes({className:""!==e?e:void 0})},help:(0,h.__)("Separate multiple classes with spaces.")}))):(0,s.createElement)(e,t)),"withInspectorControl");(0,l.addFilter)("blocks.registerBlockType","core/custom-class-name/attribute",(function(e){return(0,r.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes={...e.attributes,className:{type:"string"}}),e})),(0,l.addFilter)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",or),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/custom-class-name/save-props",(function(e,t,n){return(0,r.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=c()(e.className,n.className)),e})),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return(0,r.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=(0,u.uniq)([(0,r.getBlockDefaultClassName)(t.name),...e.className.split(" ")]).join(" ").trim():e.className=(0,r.getBlockDefaultClassName)(t.name)),e}));var rr=window.wp.dom;const lr=(0,s.createContext)({});function ir(e){let{value:t,children:n}=e;const o=(0,s.useContext)(lr),r=(0,s.useMemo)((()=>({...o,...t})),[o,t]);return(0,s.createElement)(lr.Provider,{value:r,children:n})}var sr=lr;const ar={};var cr=(0,p.withFilters)("editor.BlockEdit")((e=>{const{attributes:t={},name:n}=e,o=(0,r.getBlockType)(n),l=(0,s.useContext)(sr),a=(0,s.useMemo)((()=>o&&o.usesContext?(0,u.pick)(l,o.usesContext):ar),[o,l]);if(!o)return null;const d=o.edit||o.save;if(o.apiVersion>1)return(0,s.createElement)(d,i({},e,{context:a}));const p=(0,r.hasBlockSupport)(o,"className",!0)?(0,r.getBlockDefaultClassName)(n):null,m=c()(p,t.className);return(0,s.createElement)(d,i({},e,{context:a,className:m}))}));function ur(e){const{name:t,isSelected:n,clientId:o}=e,r={name:t,isSelected:n,clientId:o};return(0,s.createElement)(Gn,{value:(0,s.useMemo)((()=>r),Object.values(r))},(0,s.createElement)(cr,e))}var dr=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z"})),pr=function(e){let{className:t,actions:n,children:o,secondaryActions:r}=e;return(0,s.createElement)("div",{className:c()(t,"block-editor-warning")},(0,s.createElement)("div",{className:"block-editor-warning__contents"},(0,s.createElement)("p",{className:"block-editor-warning__message"},o),(s.Children.count(n)>0||r)&&(0,s.createElement)("div",{className:"block-editor-warning__actions"},s.Children.count(n)>0&&s.Children.map(n,((e,t)=>(0,s.createElement)("span",{key:t,className:"block-editor-warning__action"},e))),r&&(0,s.createElement)(p.DropdownMenu,{className:"block-editor-warning__secondary",icon:dr,label:(0,h.__)("More options"),popoverProps:{position:"bottom left",className:"block-editor-warning__dropdown"},noIcons:!0},(()=>(0,s.createElement)(p.MenuGroup,null,r.map(((e,t)=>(0,s.createElement)(p.MenuItem,{onClick:e.onClick,key:t},e.title)))))))))},mr=n(7630);function fr(e){let{title:t,rawContent:n,renderedContent:o,action:r,actionText:l,className:i}=e;return(0,s.createElement)("div",{className:i},(0,s.createElement)("div",{className:"block-editor-block-compare__content"},(0,s.createElement)("h2",{className:"block-editor-block-compare__heading"},t),(0,s.createElement)("div",{className:"block-editor-block-compare__html"},n),(0,s.createElement)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor"},(0,s.createElement)(s.RawHTML,null,(0,rr.safeHTML)(o)))),(0,s.createElement)("div",{className:"block-editor-block-compare__action"},(0,s.createElement)(p.Button,{variant:"secondary",tabIndex:"0",onClick:r},l)))}var hr=function(e){let{block:t,onKeep:n,onConvert:o,convertor:l,convertButtonText:i}=e;const a=(d=l(t),(0,u.castArray)(d).map((e=>(0,r.getSaveContent)(e.name,e.attributes,e.innerBlocks))).join(""));var d;const p=(m=t.originalContent,f=a,(0,mr.Kx)(m,f).map(((e,t)=>{const n=c()({"block-editor-block-compare__added":e.added,"block-editor-block-compare__removed":e.removed});return(0,s.createElement)("span",{key:t,className:n},e.value)})));var m,f;return(0,s.createElement)("div",{className:"block-editor-block-compare__wrapper"},(0,s.createElement)(fr,{title:(0,h.__)("Current"),className:"block-editor-block-compare__current",action:n,actionText:(0,h.__)("Convert to HTML"),rawContent:t.originalContent,renderedContent:t.originalContent}),(0,s.createElement)(fr,{title:(0,h.__)("After Conversion"),className:"block-editor-block-compare__converted",action:o,actionText:i,rawContent:p,renderedContent:a}))};const gr=e=>(0,r.rawHandler)({HTML:e.originalContent});var vr=(0,d.compose)([(0,m.withSelect)(((e,t)=>{let{clientId:n}=t;return{block:e(Vn).getBlock(n)}})),(0,m.withDispatch)(((e,t)=>{let{block:n}=t;const{replaceBlock:o}=e(Vn);return{convertToClassic(){o(n.clientId,(e=>(0,r.createBlock)("core/freeform",{content:e.originalContent}))(n))},convertToHTML(){o(n.clientId,(e=>(0,r.createBlock)("core/html",{content:e.originalContent}))(n))},convertToBlocks(){o(n.clientId,gr(n))},attemptBlockRecovery(){o(n.clientId,(e=>{let{name:t,attributes:n,innerBlocks:o}=e;return(0,r.createBlock)(t,n,o)})(n))}}}))])((function(e){let{convertToHTML:t,convertToBlocks:n,convertToClassic:o,attemptBlockRecovery:l,block:i}=e;const a=!!(0,r.getBlockType)("core/html"),[c,u]=(0,s.useState)(!1),d=(0,s.useCallback)((()=>u(!0)),[]),m=(0,s.useCallback)((()=>u(!1)),[]),f=(0,s.useMemo)((()=>[{
8
  // translators: Button to fix block content
9
  title:(0,h._x)("Resolve","imperative verb"),onClick:d},a&&{title:(0,h.__)("Convert to HTML"),onClick:t},{title:(0,h.__)("Convert to Classic Block"),onClick:o}].filter(Boolean)),[d,t,o]);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(pr,{actions:[(0,s.createElement)(p.Button,{key:"recover",onClick:l,variant:"primary"},(0,h.__)("Attempt Block Recovery"))],secondaryActions:f},(0,h.__)("This block contains unexpected or invalid content.")),c&&(0,s.createElement)(p.Modal,{title:// translators: Dialog title to fix block content
10
+ (0,h.__)("Resolve Block"),onRequestClose:m,className:"block-editor-block-compare"},(0,s.createElement)(hr,{block:i,onKeep:t,onConvert:n,convertor:gr,convertButtonText:(0,h.__)("Convert to Blocks")})))}));const br=(0,s.createElement)(pr,{className:"block-editor-block-list__block-crash-warning"},(0,h.__)("This block has encountered an error and cannot be previewed."));var kr=()=>br;class _r extends s.Component{constructor(){super(...arguments),this.state={hasError:!1}}componentDidCatch(){this.setState({hasError:!0})}render(){return this.state.hasError?this.props.fallback:this.props.children}}var yr=_r,Er=n(4042),Cr=function(e){let{clientId:t}=e;const[n,o]=(0,s.useState)(""),l=(0,m.useSelect)((e=>e(Vn).getBlock(t)),[t]),{updateBlock:i}=(0,m.useDispatch)(Vn);return(0,s.useEffect)((()=>{o((0,r.getBlockContent)(l))}),[l]),(0,s.createElement)(Er.Z,{className:"block-editor-block-list__block-html-textarea",value:n,onBlur:()=>{const e=(0,r.getBlockType)(l.name);if(!e)return;const s=(0,r.getBlockAttributes)(e,n,l.attributes),a=n||(0,r.getSaveContent)(e,s),c=!n||(0,r.isValidBlockContent)(e,s,a);i(t,{attributes:s,originalContent:a,isValid:c}),n||o({content:a})},onChange:e=>o(e.target.value)})};let Sr=zr();const wr=e=>Ar(e,Sr);let Br=zr();wr.write=e=>Ar(e,Br);let Ir=zr();wr.onStart=e=>Ar(e,Ir);let xr=zr();wr.onFrame=e=>Ar(e,xr);let Tr=zr();wr.onFinish=e=>Ar(e,Tr);let Nr=[];wr.setTimeout=(e,t)=>{let n=wr.now()+t,o=()=>{let e=Nr.findIndex((e=>e.cancel==o));~e&&Nr.splice(e,1),Hr.count-=~e?1:0},r={time:n,handler:e,cancel:o};return Nr.splice(Pr(n),0,r),Hr.count+=1,Dr(),r};let Pr=e=>~(~Nr.findIndex((t=>t.time>e))||~Nr.length);wr.cancel=e=>{Sr.delete(e),Br.delete(e)},wr.sync=e=>{Lr=!0,wr.batchedUpdates(e),Lr=!1},wr.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function o(...e){t=e,wr.onStart(n)}return o.handler=e,o.cancel=()=>{Ir.delete(n),t=null},o};let Mr="undefined"!=typeof window?window.requestAnimationFrame:()=>{};wr.use=e=>Mr=e,wr.now="undefined"!=typeof performance?()=>performance.now():Date.now,wr.batchedUpdates=e=>e(),wr.catch=console.error,wr.frameLoop="always",wr.advance=()=>{"demand"!==wr.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):Fr()};let Rr=-1,Lr=!1;function Ar(e,t){Lr?(t.delete(e),e(0)):(t.add(e),Dr())}function Dr(){Rr<0&&(Rr=0,"demand"!==wr.frameLoop&&Mr(Or))}function Or(){~Rr&&(Mr(Or),wr.batchedUpdates(Fr))}function Fr(){let e=Rr;Rr=wr.now();let t=Pr(Rr);t&&(Vr(Nr.splice(0,t),(e=>e.handler())),Hr.count-=t),Ir.flush(),Sr.flush(e?Math.min(64,Rr-e):16.667),xr.flush(),Br.flush(),Tr.flush()}function zr(){let e=new Set,t=e;return{add(n){Hr.count+=t!=e||e.has(n)?0:1,e.add(n)},delete:n=>(Hr.count-=t==e&&e.has(n)?1:0,e.delete(n)),flush(n){t.size&&(e=new Set,Hr.count-=t.size,Vr(t,(t=>t(n)&&e.add(t))),Hr.count+=e.size,t=e)}}}function Vr(e,t){e.forEach((e=>{try{t(e)}catch(e){wr.catch(e)}}))}const Hr={count:0,clear(){Rr=-1,Nr=[],Ir=zr(),Sr=zr(),xr=zr(),Br=zr(),Tr=zr(),Hr.count=0}};var Ur=n(3804),Gr=n.n(Ur);function Wr(){}const $r={arr:Array.isArray,obj:e=>!!e&&"Object"===e.constructor.name,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e};function jr(e,t){if($r.arr(e)){if(!$r.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}const Kr=(e,t)=>e.forEach(t);function qr(e,t,n){for(const o in e)e.hasOwnProperty(o)&&t.call(n,e[o],o)}const Yr=e=>$r.und(e)?[]:$r.arr(e)?e:[e];function Zr(e,t){if(e.size){const n=Array.from(e);e.clear(),Kr(n,t)}}const Xr=(e,...t)=>Zr(e,(e=>e(...t)));let Qr,Jr,el=null,tl=!1,nl=Wr;var ol=Object.freeze({__proto__:null,get createStringInterpolator(){return Qr},get to(){return Jr},get colors(){return el},get skipAnimation(){return tl},get willAdvance(){return nl},assign:e=>{e.to&&(Jr=e.to),e.now&&(wr.now=e.now),void 0!==e.colors&&(el=e.colors),null!=e.skipAnimation&&(tl=e.skipAnimation),e.createStringInterpolator&&(Qr=e.createStringInterpolator),e.requestAnimationFrame&&wr.use(e.requestAnimationFrame),e.batchedUpdates&&(wr.batchedUpdates=e.batchedUpdates),e.willAdvance&&(nl=e.willAdvance),e.frameLoop&&(wr.frameLoop=e.frameLoop)}});const rl=new Set;let ll=[],il=[],sl=0;const al={get idle(){return!rl.size&&!ll.length},start(e){sl>e.priority?(rl.add(e),wr.onStart(cl)):(ul(e),wr(pl))},advance:pl,sort(e){if(sl)wr.onFrame((()=>al.sort(e)));else{const t=ll.indexOf(e);~t&&(ll.splice(t,1),dl(e))}},clear(){ll=[],rl.clear()}};function cl(){rl.forEach(ul),rl.clear(),wr(pl)}function ul(e){ll.includes(e)||dl(e)}function dl(e){ll.splice(function(t,n){const o=t.findIndex((t=>t.priority>e.priority));return o<0?t.length:o}(ll),0,e)}function pl(e){const t=il;for(let n=0;n<ll.length;n++){const o=ll[n];sl=o.priority,o.idle||(nl(o),o.advance(e),o.idle||t.push(o))}return sl=0,il=ll,il.length=0,ll=t,ll.length>0}const ml="[-+]?\\d*\\.?\\d+",fl=ml+"%";function hl(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}const gl=new RegExp("rgb"+hl(ml,ml,ml)),vl=new RegExp("rgba"+hl(ml,ml,ml,ml)),bl=new RegExp("hsl"+hl(ml,fl,fl)),kl=new RegExp("hsla"+hl(ml,fl,fl,ml)),_l=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,yl=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,El=/^#([0-9a-fA-F]{6})$/,Cl=/^#([0-9a-fA-F]{8})$/;function Sl(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function wl(e,t,n){const o=n<.5?n*(1+t):n+t-n*t,r=2*n-o,l=Sl(r,o,e+1/3),i=Sl(r,o,e),s=Sl(r,o,e-1/3);return Math.round(255*l)<<24|Math.round(255*i)<<16|Math.round(255*s)<<8}function Bl(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function Il(e){return(parseFloat(e)%360+360)%360/360}function xl(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function Tl(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function Nl(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=El.exec(e))?parseInt(t[1]+"ff",16)>>>0:el&&void 0!==el[e]?el[e]:(t=gl.exec(e))?(Bl(t[1])<<24|Bl(t[2])<<16|Bl(t[3])<<8|255)>>>0:(t=vl.exec(e))?(Bl(t[1])<<24|Bl(t[2])<<16|Bl(t[3])<<8|xl(t[4]))>>>0:(t=_l.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Cl.exec(e))?parseInt(t[1],16)>>>0:(t=yl.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=bl.exec(e))?(255|wl(Il(t[1]),Tl(t[2]),Tl(t[3])))>>>0:(t=kl.exec(e))?(wl(Il(t[1]),Tl(t[2]),Tl(t[3]))|xl(t[4]))>>>0:null}(e);return null===t?e:(t=t||0,`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`)}const Pl=(e,t,n)=>{if($r.fun(e))return e;if($r.arr(e))return Pl({range:e,output:t,extrapolate:n});if($r.str(e.output[0]))return Qr(e);const o=e,r=o.output,l=o.range||[0,1],i=o.extrapolateLeft||o.extrapolate||"extend",s=o.extrapolateRight||o.extrapolate||"extend",a=o.easing||(e=>e);return e=>{const t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,l);return function(e,t,n,o,r,l,i,s,a){let c=a?a(e):e;if(c<t){if("identity"===i)return c;"clamp"===i&&(c=t)}if(c>n){if("identity"===s)return c;"clamp"===s&&(c=n)}return o===r?o:t===n?e<=t?o:r:(t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t),c=l(c),o===-1/0?c=-c:r===1/0?c+=o:c=c*(r-o)+o,c)}(e,l[t],l[t+1],r[t],r[t+1],a,i,s,o.map)}};function Ml(){return(Ml=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}const Rl=Symbol.for("FluidValue.get"),Ll=Symbol.for("FluidValue.observers"),Al=e=>Boolean(e&&e[Rl]),Dl=e=>e&&e[Rl]?e[Rl]():e,Ol=e=>e[Ll]||null;function Fl(e,t){let n=e[Ll];n&&n.forEach((e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)}))}class zl{constructor(e){if(this[Rl]=void 0,this[Ll]=void 0,!e&&!(e=this.get))throw Error("Unknown getter");Vl(this,e)}}const Vl=(e,t)=>Gl(e,Rl,t);function Hl(e,t){if(e[Rl]){let n=e[Ll];n||Gl(e,Ll,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function Ul(e,t){let n=e[Ll];if(n&&n.has(t)){const o=n.size-1;o?n.delete(t):e[Ll]=null,e.observerRemoved&&e.observerRemoved(o,t)}}const Gl=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),Wl=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,$l=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi;let jl;const Kl=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,ql=(e,t,n,o,r)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(o)}, ${r})`,Yl=e=>{jl||(jl=el?new RegExp(`(${Object.keys(el).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map((e=>Dl(e).replace($l,Nl).replace(jl,Nl))),n=t.map((e=>e.match(Wl).map(Number))),o=n[0].map(((e,t)=>n.map((e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})))).map((t=>Pl(Ml({},e,{output:t}))));return e=>{let n=0;return t[0].replace(Wl,(()=>String(o[n++](e)))).replace(Kl,ql)}},Zl="react-spring: ",Xl=e=>{const t=e;let n=!1;if("function"!=typeof t)throw new TypeError(`${Zl}once requires a function parameter`);return(...e)=>{n||(t(...e),n=!0)}},Ql=Xl(console.warn),Jl=Xl(console.warn);function ei(e){return $r.str(e)&&("#"==e[0]||/\d/.test(e)||e in(el||{}))}const ti=e=>(0,Ur.useEffect)(e,ni),ni=[];function oi(){const e=(0,Ur.useState)()[1],t=(0,Ur.useState)(ri)[0];return ti(t.unmount),()=>{t.current&&e({})}}function ri(){const e={current:!0,unmount:()=>()=>{e.current=!1}};return e}function li(e){const t=(0,Ur.useRef)();return(0,Ur.useEffect)((()=>{t.current=e})),t.current}const ii="undefined"!=typeof window&&window.document&&window.document.createElement?Ur.useLayoutEffect:Ur.useEffect,si=Symbol.for("Animated:node"),ai=e=>e&&e[si],ci=(e,t)=>{return n=e,o=si,r=t,Object.defineProperty(n,o,{value:r,writable:!0,configurable:!0});var n,o,r},ui=e=>e&&e[si]&&e[si].getPayload();class di{constructor(){this.payload=void 0,ci(this,this)}getPayload(){return this.payload||[]}}class pi extends di{constructor(e){super(),this.done=!0,this.elapsedTime=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.v0=void 0,this.durationProgress=0,this._value=e,$r.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new pi(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return $r.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,$r.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}}class mi extends pi{constructor(e){super(0),this._string=null,this._toString=void 0,this._toString=Pl({output:[e,e]})}static create(e){return new mi(e)}getValue(){let e=this._string;return null==e?this._string=this._toString(this._value):e}setValue(e){if($r.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else{if(!super.setValue(e))return!1;this._string=null}return!0}reset(e){e&&(this._toString=Pl({output:[this.getValue(),e]})),this._value=0,super.reset()}}const fi={dependencies:null};class hi extends di{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return qr(this.source,((n,o)=>{var r;(r=n)&&r[si]===r?t[o]=n.getValue(e):Al(n)?t[o]=Dl(n):e||(t[o]=n)})),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&Kr(this.payload,(e=>e.reset()))}_makePayload(e){if(e){const t=new Set;return qr(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){fi.dependencies&&Al(e)&&fi.dependencies.add(e);const t=ui(e);t&&Kr(t,(e=>this.add(e)))}}class gi extends hi{constructor(e){super(e)}static create(e){return new gi(e)}getValue(){return this.source.map((e=>e.getValue()))}setValue(e){const t=this.getPayload();return e.length==t.length?t.map(((t,n)=>t.setValue(e[n]))).some(Boolean):(super.setValue(e.map(vi)),!0)}}function vi(e){return(ei(e)?mi:pi).create(e)}function bi(e){const t=ai(e);return t?t.constructor:$r.arr(e)?gi:ei(e)?mi:pi}function ki(){return(ki=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}const _i=(e,t)=>{const n=!$r.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,Ur.forwardRef)(((o,r)=>{const l=(0,Ur.useRef)(null),i=n&&(0,Ur.useCallback)((e=>{l.current=function(e,t){return e&&($r.fun(e)?e(t):e.current=t),t}(r,e)}),[r]),[s,a]=function(e,t){const n=new Set;return fi.dependencies=n,e.style&&(e=ki({},e,{style:t.createAnimatedStyle(e.style)})),e=new hi(e),fi.dependencies=null,[e,n]}(o,t),c=oi(),u=()=>{const e=l.current;n&&!e||!1===(!!e&&t.applyAnimatedValues(e,s.getValue(!0)))&&c()},d=new yi(u,a),p=(0,Ur.useRef)();ii((()=>{const e=p.current;p.current=d,Kr(a,(e=>Hl(e,d))),e&&(Kr(e.deps,(t=>Ul(t,e))),wr.cancel(e.update))})),(0,Ur.useEffect)(u,[]),ti((()=>()=>{const e=p.current;Kr(e.deps,(t=>Ul(t,e)))}));const m=t.getComponentProps(s.getValue());return Ur.createElement(e,ki({},m,{ref:i}))}))};class yi{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&wr.write(this.update)}}const Ei=Symbol.for("AnimatedComponent"),Ci=e=>$r.str(e)?e:e&&$r.str(e.displayName)?e.displayName:$r.fun(e)&&e.name||null;function Si(){return(Si=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function wi(e,...t){return $r.fun(e)?e(...t):e}const Bi=(e,t)=>!0===e||!!(t&&e&&($r.fun(e)?e(t):Yr(e).includes(t))),Ii=(e,t)=>$r.obj(e)?t&&e[t]:e,xi=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,Ti=e=>e,Ni=(e,t=Ti)=>{let n=Pi;e.default&&!0!==e.default&&(e=e.default,n=Object.keys(e));const o={};for(const r of n){const n=t(e[r],r);$r.und(n)||(o[r]=n)}return o},Pi=["config","onProps","onStart","onChange","onPause","onResume","onRest"],Mi={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function Ri(e){const t=function(e){const t={};let n=0;if(qr(e,((e,o)=>{Mi[o]||(t[o]=e,n++)})),n)return t}(e);if(t){const n={to:t};return qr(e,((e,o)=>o in t||(n[o]=e))),n}return Si({},e)}function Li(e){return e=Dl(e),$r.arr(e)?e.map(Li):ei(e)?ol.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function Ai(e){for(const t in e)return!0;return!1}function Di(e){return $r.fun(e)||$r.arr(e)&&$r.obj(e[0])}function Oi(e,t){var n;null==(n=e.ref)||n.delete(e),null==t||t.delete(e)}function Fi(e,t){var n;t&&e.ref!==t&&(null==(n=e.ref)||n.delete(e),t.add(e),e.ref=t)}const zi=Si({},{tension:170,friction:26},{mass:1,damping:1,easing:e=>e,clamp:!1});class Vi{constructor(){this.tension=void 0,this.friction=void 0,this.frequency=void 0,this.damping=void 0,this.mass=void 0,this.velocity=0,this.restVelocity=void 0,this.precision=void 0,this.progress=void 0,this.duration=void 0,this.easing=void 0,this.clamp=void 0,this.bounce=void 0,this.decay=void 0,this.round=void 0,Object.assign(this,zi)}}function Hi(e,t){if($r.und(t.decay)){const n=!$r.und(t.tension)||!$r.und(t.friction);!n&&$r.und(t.frequency)&&$r.und(t.damping)&&$r.und(t.mass)||(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}const Ui=[];class Gi{constructor(){this.changed=!1,this.values=Ui,this.toValues=null,this.fromValues=Ui,this.to=void 0,this.from=void 0,this.config=new Vi,this.immediate=!1}}function Wi(e,{key:t,props:n,defaultProps:o,state:r,actions:l}){return new Promise(((i,s)=>{var a;let c,u,d=Bi(null!=(a=n.cancel)?a:null==o?void 0:o.cancel,t);if(d)f();else{$r.und(n.pause)||(r.paused=Bi(n.pause,t));let e=null==o?void 0:o.pause;!0!==e&&(e=r.paused||Bi(e,t)),c=wi(n.delay||0,t),e?(r.resumeQueue.add(m),l.pause()):(l.resume(),m())}function p(){r.resumeQueue.add(m),r.timeouts.delete(u),u.cancel(),c=u.time-wr.now()}function m(){c>0?(u=wr.setTimeout(f,c),r.pauseQueue.add(p),r.timeouts.add(u)):f()}function f(){r.pauseQueue.delete(p),r.timeouts.delete(u),e<=(r.cancelId||0)&&(d=!0);try{l.start(Si({},n,{callId:e,cancel:d}),i)}catch(e){s(e)}}}))}const $i=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?qi(e.get()):t.every((e=>e.noop))?ji(e.get()):Ki(e.get(),t.every((e=>e.finished))),ji=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Ki=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),qi=e=>({value:e,cancelled:!0,finished:!1});function Yi(e,t,n,o){const{callId:r,parentId:l,onRest:i}=t,{asyncTo:s,promise:a}=n;return l||e!==s||t.reset?n.promise=(async()=>{n.asyncId=r,n.asyncTo=e;const c=Ni(t,((e,t)=>"onRest"===t?void 0:e));let u,d;const p=new Promise(((e,t)=>(u=e,d=t))),m=e=>{const t=r<=(n.cancelId||0)&&qi(o)||r!==n.asyncId&&Ki(o,!1);if(t)throw e.result=t,d(e),e},f=(e,t)=>{const l=new Xi,i=new Qi;return(async()=>{if(ol.skipAnimation)throw Zi(n),i.result=Ki(o,!1),d(i),i;m(l);const s=$r.obj(e)?Si({},e):Si({},t,{to:e});s.parentId=r,qr(c,((e,t)=>{$r.und(s[t])&&(s[t]=e)}));const a=await o.start(s);return m(l),n.paused&&await new Promise((e=>{n.resumeQueue.add(e)})),a})()};let h;if(ol.skipAnimation)return Zi(n),Ki(o,!1);try{let t;t=$r.arr(e)?(async e=>{for(const t of e)await f(t)})(e):Promise.resolve(e(f,o.stop.bind(o))),await Promise.all([t.then(u),p]),h=Ki(o.get(),!0,!1)}catch(e){if(e instanceof Xi)h=e.result;else{if(!(e instanceof Qi))throw e;h=e.result}}finally{r==n.asyncId&&(n.asyncId=l,n.asyncTo=l?s:void 0,n.promise=l?a:void 0)}return $r.fun(i)&&wr.batchedUpdates((()=>{i(h,o,o.item)})),h})():a}function Zi(e,t){Zr(e.timeouts,(e=>e.cancel())),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}class Xi extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise."),this.result=void 0}}class Qi extends Error{constructor(){super("SkipAnimationSignal"),this.result=void 0}}const Ji=e=>e instanceof ts;let es=1;class ts extends zl{constructor(...e){super(...e),this.id=es++,this.key=void 0,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=ai(this);return e&&e.getValue()}to(...e){return ol.to(this,e)}interpolate(...e){return Ql(`${Zl}The "interpolate" function is deprecated in v9 (use "to" instead)`),ol.to(this,e)}toJSON(){return this.get()}observerAdded(e){1==e&&this._attach()}observerRemoved(e){0==e&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){Fl(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||al.sort(this),Fl(this,{type:"priority",parent:this,priority:e})}}const ns=Symbol.for("SpringPhase"),os=e=>(1&e[ns])>0,rs=e=>(2&e[ns])>0,ls=e=>(4&e[ns])>0,is=(e,t)=>t?e[ns]|=3:e[ns]&=-3,ss=(e,t)=>t?e[ns]|=4:e[ns]&=-5;class as extends ts{constructor(e,t){if(super(),this.key=void 0,this.animation=new Gi,this.queue=void 0,this.defaultProps={},this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!$r.und(e)||!$r.und(t)){const n=$r.obj(e)?Si({},e):Si({},t,{from:e});$r.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(rs(this)||this._state.asyncTo)||ls(this)}get goal(){return Dl(this.animation.to)}get velocity(){const e=ai(this);return e instanceof pi?e.lastVelocity||0:e.getPayload().map((e=>e.lastVelocity||0))}get hasAnimated(){return os(this)}get isAnimating(){return rs(this)}get isPaused(){return ls(this)}advance(e){let t=!0,n=!1;const o=this.animation;let{config:r,toValues:l}=o;const i=ui(o.to);!i&&Al(o.to)&&(l=Yr(Dl(o.to))),o.values.forEach(((s,a)=>{if(s.done)return;const c=s.constructor==mi?1:i?i[a].lastPosition:l[a];let u=o.immediate,d=c;if(!u){if(d=s.lastPosition,r.tension<=0)return void(s.done=!0);let t=s.elapsedTime+=e;const n=o.fromValues[a],l=null!=s.v0?s.v0:s.v0=$r.arr(r.velocity)?r.velocity[a]:r.velocity;let i;if($r.und(r.duration))if(r.decay){const e=!0===r.decay?.998:r.decay,o=Math.exp(-(1-e)*t);d=n+l/(1-e)*(1-o),u=Math.abs(s.lastPosition-d)<.1,i=l*o}else{i=null==s.lastVelocity?l:s.lastVelocity;const t=r.precision||(n==c?.005:Math.min(1,.001*Math.abs(c-n))),o=r.restVelocity||t/10,a=r.clamp?0:r.bounce,p=!$r.und(a),m=n==c?s.v0>0:n<c;let f,h=!1;const g=1,v=Math.ceil(e/g);for(let e=0;e<v&&(f=Math.abs(i)>o,f||(u=Math.abs(c-d)<=t,!u));++e)p&&(h=d==c||d>c==m,h&&(i=-i*a,d=c)),i+=(1e-6*-r.tension*(d-c)+.001*-r.friction*i)/r.mass*g,d+=i*g}else{let o=1;r.duration>0&&(this._memoizedDuration!==r.duration&&(this._memoizedDuration=r.duration,s.durationProgress>0&&(s.elapsedTime=r.duration*s.durationProgress,t=s.elapsedTime+=e)),o=(r.progress||0)+t/this._memoizedDuration,o=o>1?1:o<0?0:o,s.durationProgress=o),d=n+r.easing(o)*(c-n),i=(d-s.lastPosition)/e,u=1==o}s.lastVelocity=i,Number.isNaN(d)&&(console.warn("Got NaN while animating:",this),u=!0)}i&&!i[a].done&&(u=!1),u?s.done=!0:t=!1,s.setValue(d,r.round)&&(n=!0)}));const s=ai(this),a=s.getValue();if(t){const e=Dl(o.to);a===e&&!n||r.decay?n&&r.decay&&this._onChange(a):(s.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(a)}set(e){return wr.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(rs(this)){const{to:e,config:t}=this.animation;wr.batchedUpdates((()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()}))}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return $r.und(e)?(n=this.queue||[],this.queue=[]):n=[$r.obj(e)?e:Si({},t,{to:e})],Promise.all(n.map((e=>this._update(e)))).then((e=>$i(this,e)))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),Zi(this._state,e&&this._lastCallId),wr.batchedUpdates((()=>this._stop(t,e))),this}reset(){this._update({reset:!0})}eventObserved(e){"change"==e.type?this._start():"priority"==e.type&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:o}=e;n=$r.obj(n)?n[t]:n,(null==n||Di(n))&&(n=void 0),o=$r.obj(o)?o[t]:o,null==o&&(o=void 0);const r={to:n,from:o};return os(this)||(e.reverse&&([n,o]=[o,n]),o=Dl(o),$r.und(o)?ai(this)||this._set(n):this._set(o)),r}_update(e,t){let n=Si({},e);const{key:o,defaultProps:r}=this;n.default&&Object.assign(r,Ni(n,((e,t)=>/^on/.test(t)?Ii(e,o):e))),hs(this,n,"onProps"),gs(this,"onProps",n,this);const l=this._prepareNode(n);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const i=this._state;return Wi(++this._lastCallId,{key:o,props:n,defaultProps:r,state:i,actions:{pause:()=>{ls(this)||(ss(this,!0),Xr(i.pauseQueue),gs(this,"onPause",Ki(this,cs(this,this.animation.to)),this))},resume:()=>{ls(this)&&(ss(this,!1),rs(this)&&this._resume(),Xr(i.resumeQueue),gs(this,"onResume",Ki(this,cs(this,this.animation.to)),this))},start:this._merge.bind(this,l)}}).then((e=>{if(n.loop&&e.finished&&(!t||!e.noop)){const e=us(n);if(e)return this._update(e,!0)}return e}))}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(qi(this));const o=!$r.und(e.to),r=!$r.und(e.from);if(o||r){if(!(t.callId>this._lastToId))return n(qi(this));this._lastToId=t.callId}const{key:l,defaultProps:i,animation:s}=this,{to:a,from:c}=s;let{to:u=a,from:d=c}=e;!r||o||t.default&&!$r.und(u)||(u=d),t.reverse&&([u,d]=[d,u]);const p=!jr(d,c);p&&(s.from=d),d=Dl(d);const m=!jr(u,a);m&&this._focus(u);const f=Di(t.to),{config:h}=s,{decay:g,velocity:v}=h;(o||r)&&(h.velocity=0),t.config&&!f&&function(e,t,n){n&&(Hi(n=Si({},n),t),t=Si({},n,t)),Hi(e,t),Object.assign(e,t);for(const t in zi)null==e[t]&&(e[t]=zi[t]);let{mass:o,frequency:r,damping:l}=e;$r.und(r)||(r<.01&&(r=.01),l<0&&(l=0),e.tension=Math.pow(2*Math.PI/r,2)*o,e.friction=4*Math.PI*l*o/r)}(h,wi(t.config,l),t.config!==i.config?wi(i.config,l):void 0);let b=ai(this);if(!b||$r.und(u))return n(Ki(this,!0));const k=$r.und(t.reset)?r&&!t.default:!$r.und(d)&&Bi(t.reset,l),_=k?d:this.get(),y=Li(u),E=$r.num(y)||$r.arr(y)||ei(y),C=!f&&(!E||Bi(i.immediate||t.immediate,l));if(m){const e=bi(u);if(e!==b.constructor){if(!C)throw Error(`Cannot animate between ${b.constructor.name} and ${e.name}, as the "to" prop suggests`);b=this._set(y)}}const S=b.constructor;let w=Al(u),B=!1;if(!w){const e=k||!os(this)&&p;(m||e)&&(B=jr(Li(_),y),w=!B),(jr(s.immediate,C)||C)&&jr(h.decay,g)&&jr(h.velocity,v)||(w=!0)}if(B&&rs(this)&&(s.changed&&!k?w=!0:w||this._stop(a)),!f&&((w||Al(a))&&(s.values=b.getPayload(),s.toValues=Al(u)?null:S==mi?[1]:Yr(y)),s.immediate!=C&&(s.immediate=C,C||k||this._set(a)),w)){const{onRest:e}=s;Kr(fs,(e=>hs(this,t,e)));const o=Ki(this,cs(this,a));Xr(this._pendingCalls,o),this._pendingCalls.add(n),s.changed&&wr.batchedUpdates((()=>{s.changed=!k,null==e||e(o,this),k?wi(i.onRest,o):null==s.onStart||s.onStart(o,this)}))}k&&this._set(_),f?n(Yi(t.to,t,this._state,this)):w?this._start():rs(this)&&!m?this._pendingCalls.add(n):n(ji(_))}_focus(e){const t=this.animation;e!==t.to&&(Ol(this)&&this._detach(),t.to=e,Ol(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;Al(t)&&(Hl(t,this),Ji(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;Al(e)&&Ul(e,this)}_set(e,t=!0){const n=Dl(e);if(!$r.und(n)){const e=ai(this);if(!e||!jr(n,e.getValue())){const o=bi(n);e&&e.constructor==o?e.setValue(n):ci(this,o.create(n)),e&&wr.batchedUpdates((()=>{this._onChange(n,t)}))}}return ai(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,gs(this,"onStart",Ki(this,cs(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),wi(this.animation.onChange,e,this)),wi(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;ai(this).reset(Dl(e.to)),e.immediate||(e.fromValues=e.values.map((e=>e.lastPosition))),rs(this)||(is(this,!0),ls(this)||this._resume())}_resume(){ol.skipAnimation?this.finish():al.start(this)}_stop(e,t){if(rs(this)){is(this,!1);const n=this.animation;Kr(n.values,(e=>{e.done=!0})),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Fl(this,{type:"idle",parent:this});const o=t?qi(this.get()):Ki(this.get(),cs(this,null!=e?e:n.to));Xr(this._pendingCalls,o),n.changed&&(n.changed=!1,gs(this,"onRest",o,this))}}}function cs(e,t){const n=Li(t);return jr(Li(e.get()),n)}function us(e,t=e.loop,n=e.to){let o=wi(t);if(o){const r=!0!==o&&Ri(o),l=(r||e).reverse,i=!r||r.reset;return ds(Si({},e,{loop:t,default:!1,pause:void 0,to:!l||Di(n)?n:void 0,from:i?e.from:void 0,reset:i},r))}}function ds(e){const{to:t,from:n}=e=Ri(e),o=new Set;return $r.obj(t)&&ms(t,o),$r.obj(n)&&ms(n,o),e.keys=o.size?Array.from(o):null,e}function ps(e){const t=ds(e);return $r.und(t.default)&&(t.default=Ni(t)),t}function ms(e,t){qr(e,((e,n)=>null!=e&&t.add(n)))}const fs=["onStart","onRest","onChange","onPause","onResume"];function hs(e,t,n){e.animation[n]=t[n]!==xi(t,n)?Ii(t[n],e.key):void 0}function gs(e,t,...n){var o,r,l,i;null==(o=(r=e.animation)[t])||o.call(r,...n),null==(l=(i=e.defaultProps)[t])||l.call(i,...n)}const vs=["onStart","onChange","onRest"];let bs=1;class ks{constructor(e,t){this.id=bs++,this.springs={},this.queue=[],this.ref=void 0,this._flush=void 0,this._initialProps=void 0,this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._item=void 0,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start(Si({default:!0},e))}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every((e=>e.idle))}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each(((t,n)=>e[n]=t.get())),e}set(e){for(const t in e){const n=e[t];$r.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(ds(e)),this}start(e){let{queue:t}=this;return e?t=Yr(e).map(ds):this.queue=[],this._flush?this._flush(this,t):(Bs(this,t),_s(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;Kr(Yr(t),(t=>n[t].stop(!!e)))}else Zi(this._state,this._lastAsyncId),this.each((t=>t.stop(!!e)));return this}pause(e){if($r.und(e))this.start({pause:!0});else{const t=this.springs;Kr(Yr(e),(e=>t[e].pause()))}return this}resume(e){if($r.und(e))this.start({pause:!1});else{const t=this.springs;Kr(Yr(e),(e=>t[e].resume()))}return this}each(e){qr(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,o=this._active.size>0,r=this._changed.size>0;(o&&!this._started||r&&!this._started)&&(this._started=!0,Zr(e,(([e,t])=>{t.value=this.get(),e(t,this,this._item)})));const l=!o&&this._started,i=r||l&&n.size?this.get():null;r&&t.size&&Zr(t,(([e,t])=>{t.value=i,e(t,this,this._item)})),l&&(this._started=!1,Zr(n,(([e,t])=>{t.value=i,e(t,this,this._item)})))}eventObserved(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}wr.onFrame(this._onFrame)}}function _s(e,t){return Promise.all(t.map((t=>ys(e,t)))).then((t=>$i(e,t)))}async function ys(e,t,n){const{keys:o,to:r,from:l,loop:i,onRest:s,onResolve:a}=t,c=$r.obj(t.default)&&t.default;i&&(t.loop=!1),!1===r&&(t.to=null),!1===l&&(t.from=null);const u=$r.arr(r)||$r.fun(r)?r:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):Kr(vs,(n=>{const o=t[n];if($r.fun(o)){const r=e._events[n];t[n]=({finished:e,cancelled:t})=>{const n=r.get(o);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):r.set(o,{value:null,finished:e||!1,cancelled:t||!1})},c&&(c[n]=t[n])}}));const d=e._state;t.pause===!d.paused?(d.paused=t.pause,Xr(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);const p=(o||Object.keys(e.springs)).map((n=>e.springs[n].start(t))),m=!0===t.cancel||!0===xi(t,"cancel");(u||m&&d.asyncId)&&p.push(Wi(++e._lastAsyncId,{props:t,state:d,actions:{pause:Wr,resume:Wr,start(t,n){m?(Zi(d,e._lastAsyncId),n(qi(e))):(t.onRest=s,n(Yi(u,t,d,e)))}}})),d.paused&&await new Promise((e=>{d.resumeQueue.add(e)}));const f=$i(e,await Promise.all(p));if(i&&f.finished&&(!n||!f.noop)){const n=us(t,i,r);if(n)return Bs(e,[n]),ys(e,n,!0)}return a&&wr.batchedUpdates((()=>a(f,e,e.item))),f}function Es(e,t){const n=Si({},e.springs);return t&&Kr(Yr(t),(e=>{$r.und(e.keys)&&(e=ds(e)),$r.obj(e.to)||(e=Si({},e,{to:void 0})),ws(n,e,(e=>Ss(e)))})),Cs(e,n),n}function Cs(e,t){qr(t,((t,n)=>{e.springs[n]||(e.springs[n]=t,Hl(t,e))}))}function Ss(e,t){const n=new as;return n.key=e,t&&Hl(n,t),n}function ws(e,t,n){t.keys&&Kr(t.keys,(o=>{(e[o]||(e[o]=n(o)))._prepareNode(t)}))}function Bs(e,t){Kr(t,(t=>{ws(e.springs,t,(t=>Ss(t,e)))}))}const Is=["children"],xs=e=>{let{children:t}=e,n=function(e,t){if(null==e)return{};var n,o,r={},l=Object.keys(e);for(o=0;o<l.length;o++)n=l[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,Is);const o=(0,Ur.useContext)(Ts),r=n.pause||!!o.pause,l=n.immediate||!!o.immediate;n=function(e,t){const[n]=(0,Ur.useState)((()=>({inputs:t,result:e()}))),o=(0,Ur.useRef)(),r=o.current;let l=r;return l?Boolean(t&&l.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,l.inputs))||(l={inputs:t,result:e()}):l=n,(0,Ur.useEffect)((()=>{o.current=l,r==n&&(n.inputs=n.result=void 0)}),[l]),l.result}((()=>({pause:r,immediate:l})),[r,l]);const{Provider:i}=Ts;return Ur.createElement(i,{value:n},t)},Ts=(Ns=xs,Ps={},Object.assign(Ns,Ur.createContext(Ps)),Ns.Provider._context=Ns,Ns.Consumer._context=Ns,Ns);var Ns,Ps;xs.Provider=Ts.Provider,xs.Consumer=Ts.Consumer;const Ms=()=>{const e=[],t=function(t){Jl(`${Zl}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`);const o=[];return Kr(e,((e,r)=>{if($r.und(t))o.push(e.start());else{const l=n(t,e,r);l&&o.push(e.start(l))}})),o};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){const n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return Kr(e,(e=>e.pause(...arguments))),this},t.resume=function(){return Kr(e,(e=>e.resume(...arguments))),this},t.set=function(t){Kr(e,(e=>e.set(t)))},t.start=function(t){const n=[];return Kr(e,((e,o)=>{if($r.und(t))n.push(e.start());else{const r=this._getProps(t,e,o);r&&n.push(e.start(r))}})),n},t.stop=function(){return Kr(e,(e=>e.stop(...arguments))),this},t.update=function(t){return Kr(e,((e,n)=>e.update(this._getProps(t,e,n)))),this};const n=function(e,t,n){return $r.fun(e)?e(n,t):e};return t._getProps=n,t};function Rs(e,t,n){const o=$r.fun(t)&&t;o&&!n&&(n=[]);const r=(0,Ur.useMemo)((()=>o||3==arguments.length?Ms():void 0),[]),l=(0,Ur.useRef)(0),i=oi(),s=(0,Ur.useMemo)((()=>({ctrls:[],queue:[],flush(e,t){const n=Es(e,t);return l.current>0&&!s.queue.length&&!Object.keys(n).some((t=>!e.springs[t]))?_s(e,t):new Promise((o=>{Cs(e,n),s.queue.push((()=>{o(_s(e,t))})),i()}))}})),[]),a=(0,Ur.useRef)([...s.ctrls]),c=[],u=li(e)||0;function d(e,n){for(let r=e;r<n;r++){const e=a.current[r]||(a.current[r]=new ks(null,s.flush)),n=o?o(r,e):t[r];n&&(c[r]=ps(n))}}(0,Ur.useMemo)((()=>{Kr(a.current.slice(e,u),(e=>{Oi(e,r),e.stop(!0)})),a.current.length=e,d(u,e)}),[e]),(0,Ur.useMemo)((()=>{d(0,Math.min(u,e))}),n);const p=a.current.map(((e,t)=>Es(e,c[t]))),m=(0,Ur.useContext)(xs),f=li(m),h=m!==f&&Ai(m);ii((()=>{l.current++,s.ctrls=a.current;const{queue:e}=s;e.length&&(s.queue=[],Kr(e,(e=>e()))),Kr(a.current,((e,t)=>{null==r||r.add(e),h&&e.start({default:m});const n=c[t];n&&(Fi(e,n.ref),e.ref?e.queue.push(n):e.start(n))}))})),ti((()=>()=>{Kr(s.ctrls,(e=>e.stop(!0)))}));const g=p.map((e=>Si({},e)));return r?[g,r]:g}let Ls;!function(e){e.MOUNT="mount",e.ENTER="enter",e.UPDATE="update",e.LEAVE="leave"}(Ls||(Ls={}));class As extends ts{constructor(e,t){super(),this.key=void 0,this.idle=!0,this.calc=void 0,this._active=new Set,this.source=e,this.calc=Pl(...t);const n=this._get(),o=bi(n);ci(this,o.create(n))}advance(e){const t=this._get();jr(t,this.get())||(ai(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&Os(this._active)&&Fs(this)}_get(){const e=$r.arr(this.source)?this.source.map(Dl):Yr(Dl(this.source));return this.calc(...e)}_start(){this.idle&&!Os(this._active)&&(this.idle=!1,Kr(ui(this),(e=>{e.done=!1})),ol.skipAnimation?(wr.batchedUpdates((()=>this.advance())),Fs(this)):al.start(this))}_attach(){let e=1;Kr(Yr(this.source),(t=>{Al(t)&&Hl(t,this),Ji(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))})),this.priority=e,this._start()}_detach(){Kr(Yr(this.source),(e=>{Al(e)&&Ul(e,this)})),this._active.clear(),Fs(this)}eventObserved(e){"change"==e.type?e.idle?this.advance():(this._active.add(e.parent),this._start()):"idle"==e.type?this._active.delete(e.parent):"priority"==e.type&&(this.priority=Yr(this.source).reduce(((e,t)=>Math.max(e,(Ji(t)?t.priority:0)+1)),0))}}function Ds(e){return!1!==e.idle}function Os(e){return!e.size||Array.from(e).every(Ds)}function Fs(e){e.idle||(e.idle=!0,Kr(ui(e),(e=>{e.done=!0})),Fl(e,{type:"idle",parent:e}))}ol.assign({createStringInterpolator:Yl,to:(e,t)=>new As(e,t)}),al.advance;var zs=window.ReactDOM;function Vs(e,t){if(null==e)return{};var n,o,r={},l=Object.keys(e);for(o=0;o<l.length;o++)n=l[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}const Hs=["style","children","scrollTop","scrollLeft"],Us=/^--/;function Gs(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||Us.test(e)||$s.hasOwnProperty(e)&&$s[e]?(""+t).trim():t+"px"}const Ws={};let $s={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};const js=["Webkit","Ms","Moz","O"];$s=Object.keys($s).reduce(((e,t)=>(js.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),$s);const Ks=["x","y","z"],qs=/^(matrix|translate|scale|rotate|skew)/,Ys=/^(translate)/,Zs=/^(rotate|skew)/,Xs=(e,t)=>$r.num(e)&&0!==e?e+t:e,Qs=(e,t)=>$r.arr(e)?e.every((e=>Qs(e,t))):$r.num(e)?e===t:parseFloat(e)===t;class Js extends hi{constructor(e){let{x:t,y:n,z:o}=e,r=Vs(e,Ks);const l=[],i=[];(t||n||o)&&(l.push([t||0,n||0,o||0]),i.push((e=>[`translate3d(${e.map((e=>Xs(e,"px"))).join(",")})`,Qs(e,0)]))),qr(r,((e,t)=>{if("transform"===t)l.push([e||""]),i.push((e=>[e,""===e]));else if(qs.test(t)){if(delete r[t],$r.und(e))return;const n=Ys.test(t)?"px":Zs.test(t)?"deg":"";l.push(Yr(e)),i.push("rotate3d"===t?([e,t,o,r])=>[`rotate3d(${e},${t},${o},${Xs(r,n)})`,Qs(r,0)]:e=>[`${t}(${e.map((e=>Xs(e,n))).join(",")})`,Qs(e,t.startsWith("scale")?1:0)])}})),l.length&&(r.transform=new ea(l,i)),super(r)}}class ea extends zl{constructor(e,t){super(),this._value=null,this.inputs=e,this.transforms=t}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return Kr(this.inputs,((n,o)=>{const r=Dl(n[0]),[l,i]=this.transforms[o]($r.arr(r)?r:n.map(Dl));e+=" "+l,t=t&&i})),t?"none":e}observerAdded(e){1==e&&Kr(this.inputs,(e=>Kr(e,(e=>Al(e)&&Hl(e,this)))))}observerRemoved(e){0==e&&Kr(this.inputs,(e=>Kr(e,(e=>Al(e)&&Ul(e,this)))))}eventObserved(e){"change"==e.type&&(this._value=null),Fl(this,e)}}const ta=["scrollTop","scrollLeft"];ol.assign({batchedUpdates:zs.unstable_batchedUpdates,createStringInterpolator:Yl,colors:{transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199}});const na=((e,{applyAnimatedValues:t=(()=>!1),createAnimatedStyle:n=(e=>new hi(e)),getComponentProps:o=(e=>e)}={})=>{const r={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:o},l=e=>{const t=Ci(e)||"Anonymous";return(e=$r.str(e)?l[e]||(l[e]=_i(e,r)):e[Ei]||(e[Ei]=_i(e,r))).displayName=`Animated(${t})`,e};return qr(e,((t,n)=>{$r.arr(e)&&(n=Ci(t)),l[n]=l(t)})),{animated:l}})(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],{applyAnimatedValues:function(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,o=t,{style:r,children:l,scrollTop:i,scrollLeft:s}=o,a=Vs(o,Hs),c=Object.values(a),u=Object.keys(a).map((t=>n||e.hasAttribute(t)?t:Ws[t]||(Ws[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())))));void 0!==l&&(e.textContent=l);for(let t in r)if(r.hasOwnProperty(t)){const n=Gs(t,r[t]);Us.test(t)?e.style.setProperty(t,n):e.style[t]=n}u.forEach(((t,n)=>{e.setAttribute(t,c[n])})),void 0!==i&&(e.scrollTop=i),void 0!==s&&(e.scrollLeft=s)},createAnimatedStyle:e=>new Js(e),getComponentProps:e=>Vs(e,ta)}).animated,oa=e=>e+1,ra=e=>({top:e.offsetTop,left:e.offsetLeft});var la=function(e){let{isSelected:t,adjustScrolling:n,enableAnimation:o,triggerAnimationOnChange:r}=e;const l=(0,s.useRef)(),i=(0,d.useReducedMotion)()||!o,[a,c]=(0,s.useReducer)(oa,0),[u,p]=(0,s.useReducer)(oa,0),[m,f]=(0,s.useState)({x:0,y:0}),h=(0,s.useMemo)((()=>l.current?ra(l.current):null),[r]),g=(0,s.useMemo)((()=>{if(!n||!l.current)return()=>{};const e=(0,rr.getScrollContainer)(l.current);if(!e)return()=>{};const t=l.current.getBoundingClientRect();return()=>{const n=l.current.getBoundingClientRect().top-t.top;n&&(e.scrollTop+=n)}}),[r,n]);function v(e){let{value:n}=e,{x:o,y:r}=n;o=Math.round(o),r=Math.round(r),o===v.x&&r===v.y||(function(e){let{x:n,y:o}=e;if(!l.current)return;const r=0===n&&0===o;l.current.style.transformOrigin=r?"":"center",l.current.style.transform=r?"":`translate3d(${n}px,${o}px,0)`,l.current.style.zIndex=!t||r?"":"1",g()}({x:o,y:r}),v.x=o,v.y=r)}return(0,s.useLayoutEffect)((()=>{a&&p()}),[a]),(0,s.useLayoutEffect)((()=>{if(!h)return;if(i)return void g();l.current.style.transform="";const e=ra(l.current);c(),f({x:Math.round(h.left-e.left),y:Math.round(h.top-e.top)})}),[r]),v.x=0,v.y=0,function(e,t){const n=$r.fun(e),[[o],r]=Rs(1,n?e:[e],n?t||[]:t)}({from:{x:m.x,y:m.y},to:{x:0,y:0},reset:a!==u,config:{mass:5,tension:2e3,friction:200},immediate:i,onChange:v}),l};const ia=".block-editor-block-list__block",sa=".block-list-appender";function aa(e,t){return t.closest([ia,sa].join(","))===e}function ca(e){const t=(0,s.useRef)(),n=function(e){return(0,m.useSelect)((t=>{const{getSelectedBlocksInitialCaretPosition:n,isMultiSelecting:o,isNavigationMode:r,isBlockSelected:l}=t(Vn);if(l(e)&&!o()&&!r())return n()}),[e])}(e);return(0,s.useEffect)((()=>{if(null==n)return;if(!t.current)return;const{ownerDocument:e}=t.current;if(t.current.contains(e.activeElement))return;const o=rr.focus.tabbable.find(t.current).filter((e=>(0,rr.isTextField)(e))),r=-1===n,l=(r?u.last:u.first)(o)||t.current;aa(t.current,l)?(0,rr.placeCaretAtHorizontalEdge)(l,r):t.current.focus()}),[n]),t}function ua(e){if(e.defaultPrevented)return;const t="mouseover"===e.type?"add":"remove";e.preventDefault(),e.currentTarget.classList[t]("is-hovered")}function da(){const e=(0,m.useSelect)((e=>{const{isNavigationMode:t,getSettings:n}=e(Vn);return t()||n().outlineMode}),[]);return(0,d.useRefEffect)((t=>{if(e)return t.addEventListener("mouseout",ua),t.addEventListener("mouseover",ua),()=>{t.removeEventListener("mouseout",ua),t.removeEventListener("mouseover",ua),t.classList.remove("is-hovered")}}),[e])}function pa(e){return(0,m.useSelect)((t=>{const{isBlockBeingDragged:n,isBlockHighlighted:o,isBlockSelected:l,isBlockMultiSelected:i,getBlockName:s,getSettings:a,hasSelectedInnerBlock:u,isTyping:d,__experimentalGetActiveBlockIdByBlockNames:p}=t(Vn),{__experimentalSpotlightEntityBlocks:m,outlineMode:f}=a(),h=n(e),g=l(e),v=s(e),b=u(e,!0),k=p(m);return c()({"is-selected":g,"is-highlighted":o(e),"is-multi-selected":i(e),"is-reusable":(0,r.isReusableBlock)((0,r.getBlockType)(v)),"is-dragging":h,"has-child-selected":b,"has-active-entity":k,"is-active-entity":k===e,"remove-outline":g&&f&&d()})}),[e])}function ma(e){return(0,m.useSelect)((t=>{const n=t(Vn).getBlockName(e),o=(0,r.getBlockType)(n);if((null==o?void 0:o.apiVersion)>1)return(0,r.getBlockDefaultClassName)(n)}),[e])}function fa(e){return(0,m.useSelect)((t=>{const{getBlockName:n,getBlockAttributes:o}=t(Vn),l=o(e);if(null==l||!l.className)return;const i=(0,r.getBlockType)(n(e));return(null==i?void 0:i.apiVersion)>1?l.className:void 0}),[e])}function ha(e){return(0,m.useSelect)((t=>{const{hasBlockMovingClientId:n,canInsertBlockType:o,getBlockName:r,getBlockRootClientId:l,isBlockSelected:i}=t(Vn);if(!i(e))return;const s=n();return s?c()("is-block-moving-mode",{"can-insert-moving-block":o(r(s),l(e))}):void 0}),[e])}function ga(e){const{isBlockSelected:t}=(0,m.useSelect)(Vn),{selectBlock:n,selectionChange:o}=(0,m.useDispatch)(Vn);return(0,d.useRefEffect)((r=>{function l(l){t(e)?l.target.isContentEditable||o(e):aa(r,l.target)&&n(e)}return r.addEventListener("focusin",l),()=>{r.removeEventListener("focusin",l)}}),[t,n])}var va=window.wp.keycodes;function ba(e){const t=(0,m.useSelect)((t=>t(Vn).isBlockSelected(e)),[e]),{getBlockRootClientId:n,getBlockIndex:o}=(0,m.useSelect)(Vn),{insertDefaultBlock:r,removeBlock:l}=(0,m.useDispatch)(Vn);return(0,d.useRefEffect)((i=>{if(t)return i.addEventListener("keydown",s),i.addEventListener("dragstart",a),()=>{i.removeEventListener("keydown",s),i.removeEventListener("dragstart",a)};function s(t){const{keyCode:s,target:a}=t;s!==va.ENTER&&s!==va.BACKSPACE&&s!==va.DELETE||a!==i||(0,rr.isTextField)(a)||(t.preventDefault(),s===va.ENTER?r({},n(e),o(e)+1):l(e))}function a(e){e.preventDefault()}}),[e,t,n,o,r,l])}function ka(e){const{isNavigationMode:t,isBlockSelected:n}=(0,m.useSelect)(Vn),{setNavigationMode:o,selectBlock:r}=(0,m.useDispatch)(Vn);return(0,d.useRefEffect)((l=>{function i(l){t()&&!l.defaultPrevented&&(l.preventDefault(),n(e)?o(!1):r(e))}return l.addEventListener("mousedown",i),()=>{l.addEventListener("mousedown",i)}}),[e,t,n,o])}var _a=n(4979),ya=n.n(_a);function Ea(e){const t=(0,s.useRef)(),n=(0,m.useSelect)((t=>{const{isBlockSelected:n,getBlockSelectionEnd:o}=t(Vn);return n(e)||o()===e}),[e]);return(0,s.useEffect)((()=>{if(!n)return;const e=t.current;if(!e)return;if(e.contains(e.ownerDocument.activeElement))return;const o=(0,rr.getScrollContainer)(e)||e.ownerDocument.defaultView;o&&ya()(e,o,{onlyScrollIfNeeded:!0})}),[n]),t}const Ca=(0,s.createContext)();function Sa(e){let{children:t}=e;const n=(0,s.useMemo)((()=>({refs:new Map,callbacks:new Map})),[]);return(0,s.createElement)(Ca.Provider,{value:n},t)}function wa(e){const{refs:t,callbacks:n}=(0,s.useContext)(Ca),o=(0,s.useRef)();return(0,s.useLayoutEffect)((()=>(t.set(o,e),()=>{t.delete(o)})),[e]),(0,d.useRefEffect)((t=>{o.current=t,n.forEach(((n,o)=>{e===n&&o(t)}))}),[e])}function Ba(e){const{refs:t}=(0,s.useContext)(Ca),n=(0,s.useRef)();return n.current=e,(0,s.useMemo)((()=>({get current(){let e=null;for(const[o,r]of t.entries())r===n.current&&o.current&&(e=o.current);return e}})),[])}function Ia(e){const{callbacks:t}=(0,s.useContext)(Ca),n=Ba(e),[o,r]=(0,s.useState)(null);return(0,s.useLayoutEffect)((()=>{if(e)return t.set(r,e),()=>{t.delete(r)}}),[e]),n.current||o}function xa(e,t){Array.from(e.closest(".is-root-container").querySelectorAll(".rich-text")).forEach((e=>{t?e.setAttribute("contenteditable",!0):e.removeAttribute("contenteditable")}))}function Ta(e){const{startMultiSelect:t,stopMultiSelect:n,multiSelect:o,selectBlock:r}=(0,m.useDispatch)(Vn),{isSelectionEnabled:l,isBlockSelected:i,getBlockParents:s,getBlockSelectionStart:a,hasMultiSelection:c}=(0,m.useSelect)(Vn);return(0,d.useRefEffect)((u=>{const{ownerDocument:d}=u,{defaultView:p}=d;let m,f;function h(t){let{isSelectionEnd:n}=t;const l=p.getSelection();if(!l.rangeCount||l.isCollapsed)return void xa(u,!0);const i=function(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;const t=e.closest(ia);return t?t.id.slice("block-".length):void 0}(l.focusNode);if(e===i){if(r(e),n&&(xa(u,!0),l.rangeCount)){const{commonAncestorContainer:e}=l.getRangeAt(0);m.contains(e)&&m.focus()}}else{const t=[...s(e),e],n=[...s(i),i],r=Math.min(t.length,n.length)-1;o(t[r],n[r])}}function g(){d.removeEventListener("selectionchange",h),p.removeEventListener("mouseup",g),f=p.requestAnimationFrame((()=>{h({isSelectionEnd:!0}),n()}))}function v(n){let{buttons:o}=n;1===o&&l()&&i(e)&&(m=d.activeElement,t(),d.addEventListener("selectionchange",h),p.addEventListener("mouseup",g),xa(u,!1))}function b(t){if(l()&&0===t.button)if(t.shiftKey){const n=a(),r=s(n);if(n&&n!==e&&(null==r||!r.includes(e))){const l=[...r,n],i=[...s(e),e],a=Math.min(l.length,i.length)-1,c=l[a],d=i[a];c!==d&&(xa(u,!1),o(c,d),t.preventDefault())}}else c()&&r(e)}return u.addEventListener("mousedown",b),u.addEventListener("mouseleave",v),()=>{u.removeEventListener("mousedown",b),u.removeEventListener("mouseleave",v),d.removeEventListener("selectionchange",h),p.removeEventListener("mouseup",g),p.cancelAnimationFrame(f)}}),[e,t,n,o,r,l,i,s])}function Na(){const e=(0,s.useContext)(um);return(0,d.useRefEffect)((t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}}),[e])}function Pa(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{__unstableIsHtml:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{clientId:n,className:o,wrapperProps:l={},isAligned:i}=(0,s.useContext)(Ma),{index:a,mode:u,name:p,blockApiVersion:f,blockTitle:g,isPartOfSelection:v,adjustScrolling:b,enableAnimation:k}=(0,m.useSelect)((e=>{const{getBlockRootClientId:t,getBlockIndex:o,getBlockMode:l,getBlockName:i,isTyping:s,getGlobalBlockCount:a,isBlockSelected:c,isBlockMultiSelected:u,isAncestorMultiSelected:d,isFirstMultiSelectedBlock:p}=e(Vn),m=c(n),f=u(n)||d(n),h=i(n),g=t(n),v=(0,r.getBlockType)(h);return{index:o(n,g),mode:l(n),name:h,blockApiVersion:(null==v?void 0:v.apiVersion)||1,blockTitle:null==v?void 0:v.title,isPartOfSelection:m||f,adjustScrolling:m||p(n),enableAnimation:!s()&&a()<=200}}),[n]),_=(0,h.sprintf)((0,h.__)("Block: %s"),g),y="html"!==u||t?"":"-visual",E=(0,d.useMergeRefs)([e.ref,ca(n),Ea(n),wa(n),ga(n),Ta(n),ba(n),ka(n),da(),Na(),la({isSelected:v,adjustScrolling:b,enableAnimation:k,triggerAnimationOnChange:a})]),C=Wn();return f<2&&n===C.clientId&&"undefined"!=typeof process&&process.env,{...l,...e,ref:E,id:`block-${n}${y}`,tabIndex:0,role:"document","aria-label":_,"data-block":n,"data-type":p,"data-title":g,className:c()(c()("block-editor-block-list__block",{"wp-block":!i}),o,e.className,l.className,pa(n),ma(n),fa(n),ha(n)),style:{...l.style,...e.style}}}Pa.save=r.__unstableGetBlockProps;const Ma=(0,s.createContext)();function Ra(e){let{children:t,isHtml:n,...o}=e;return(0,s.createElement)("div",Pa(o,{__unstableIsHtml:n}),t)}const La=(0,m.withSelect)(((e,t)=>{let{clientId:n,rootClientId:o}=t;const{isBlockSelected:r,getBlockMode:l,isSelectionEnabled:i,getTemplateLock:s,__unstableGetBlockWithoutInnerBlocks:a,canRemoveBlock:c,canMoveBlock:u}=e(Vn),d=a(n),p=r(n),m=s(o),f=c(n,o),h=u(n,o),{name:g,attributes:v,isValid:b}=d||{};return{mode:l(n),isSelectionEnabled:i(),isLocked:!!m,canRemove:f,canMove:h,block:d,name:g,attributes:v,isValid:b,isSelected:p}})),Aa=(0,m.withDispatch)(((e,t,n)=>{let{select:o}=n;const{updateBlockAttributes:l,insertBlocks:i,mergeBlocks:s,replaceBlocks:a,toggleSelection:c,__unstableMarkLastChangeAsPersistent:u}=e(Vn);return{setAttributes(e){const{getMultiSelectedBlockClientIds:n}=o(Vn),r=n(),{clientId:i}=t,s=r.length?r:[i];l(s,e)},onInsertBlocks(e,n){const{rootClientId:o}=t;i(e,n,o)},onInsertBlocksAfter(e){const{clientId:n,rootClientId:r}=t,{getBlockIndex:l}=o(Vn),s=l(n,r);i(e,s+1,r)},onMerge(e){const{clientId:n}=t,{getPreviousBlockClientId:r,getNextBlockClientId:l}=o(Vn);if(e){const e=l(n);e&&s(n,e)}else{const e=r(n);e&&s(e,n)}},onReplace(e,n,o){e.length&&!(0,r.isUnmodifiedDefaultBlock)(e[e.length-1])&&u(),a([t.clientId],e,n,o)},toggleSelection(e){c(e)}}}));var Da=(0,d.compose)(d.pure,La,Aa,(0,d.ifCondition)((e=>{let{block:t}=e;return!!t})),(0,p.withFilters)("editor.BlockListBlock"))((function(e){let{mode:t,isLocked:n,canRemove:o,clientId:l,isSelected:i,isSelectionEnabled:a,className:d,name:p,isValid:f,attributes:h,wrapperProps:g,setAttributes:v,onReplace:b,onInsertBlocksAfter:k,onMerge:_,toggleSelection:y}=e;const{removeBlock:E}=(0,m.useDispatch)(Vn),C=(0,s.useCallback)((()=>E(l)),[l]);let S=(0,s.createElement)(ur,{name:p,isSelected:i,attributes:h,setAttributes:v,insertBlocksAfter:n?void 0:k,onReplace:o?b:void 0,onRemove:o?C:void 0,mergeBlocks:o?_:void 0,clientId:l,isSelectionEnabled:a,toggleSelection:y});const w=(0,r.getBlockType)(p);null!=w&&w.getEditWrapperProps&&(g=function(e,t){const n={...e,...t};return e&&t&&e.className&&t.className&&(n.className=c()(e.className,t.className)),e&&t&&e.style&&t.style&&(n.style={...e.style,...t.style}),n}(g,w.getEditWrapperProps(h)));const B=g&&!!g["data-align"];let I;if(B&&(S=(0,s.createElement)("div",{className:"wp-block","data-align":g["data-align"]},S)),f)I="html"===t?(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{style:{display:"none"}},S),(0,s.createElement)(Ra,{isHtml:!0},(0,s.createElement)(Cr,{clientId:l}))):(null==w?void 0:w.apiVersion)>1?S:(0,s.createElement)(Ra,g,S);else{const e=(0,r.getSaveContent)(w,h);I=(0,s.createElement)(Ra,{className:"has-warning"},(0,s.createElement)(vr,{clientId:l}),(0,s.createElement)(s.RawHTML,null,(0,rr.safeHTML)(e)))}const x={clientId:l,className:d,wrapperProps:(0,u.omit)(g,["data-align"]),isAligned:B},T=(0,s.useMemo)((()=>x),Object.values(x));return(0,s.createElement)(Ma.Provider,{value:T},(0,s.createElement)(yr,{fallback:(0,s.createElement)(Ra,{className:"has-warning"},(0,s.createElement)(kr,null))},I))})),Oa=window.wp.htmlEntities,Fa=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));const za=[(0,s.createInterpolateElement)((0,h.__)("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:(0,s.createElement)("kbd",null)}),(0,s.createInterpolateElement)((0,h.__)("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:(0,s.createElement)("kbd",null)}),(0,s.createInterpolateElement)((0,h.__)("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:(0,s.createElement)("kbd",null)}),(0,h.__)("Drag files into the editor to automatically insert media blocks."),(0,h.__)("Change a block's type by pressing the block icon on the toolbar.")];var Va=function(){const[e]=(0,s.useState)(Math.floor(Math.random()*za.length));return(0,s.createElement)(p.Tip,null,za[e])},Ha=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"})),Ua=(0,s.memo)((function(e){var t;let{icon:n,showColors:o=!1,className:r}=e;"block-default"===(null===(t=n)||void 0===t?void 0:t.src)&&(n={src:Ha});const l=(0,s.createElement)(p.Icon,{icon:n&&n.src?n.src:n}),i=o?{backgroundColor:n&&n.background,color:n&&n.foreground}:{};return(0,s.createElement)("span",{style:i,className:c()("block-editor-block-icon",r,{"has-colors":o})},l)})),Ga=function(e){let{title:t,icon:n,description:o,blockType:r}=e;return r&&(Lt()("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),({title:t,icon:n,description:o}=r)),(0,s.createElement)("div",{className:"block-editor-block-card"},(0,s.createElement)(Ua,{icon:n,showColors:!0}),(0,s.createElement)("div",{className:"block-editor-block-card__content"},(0,s.createElement)("h2",{className:"block-editor-block-card__title"},t),(0,s.createElement)("span",{className:"block-editor-block-card__description"},o)))};function Wa(e){let{clientId:t=null,value:n,selection:o,onChange:l=u.noop,onInput:i=u.noop}=e;const a=(0,m.useRegistry)(),{resetBlocks:c,resetSelection:d,replaceInnerBlocks:p,setHasControlledInnerBlocks:f,__unstableMarkNextChangeAsNotPersistent:h}=a.dispatch(Vn),{getBlockName:g,getBlocks:v}=a.select(Vn),b=(0,s.useRef)({incoming:null,outgoing:[]}),k=(0,s.useRef)(!1),_=(0,s.useRef)(i),y=(0,s.useRef)(l);(0,s.useEffect)((()=>{_.current=i,y.current=l}),[i,l]),(0,s.useEffect)((()=>{b.current.outgoing.includes(n)?(0,u.last)(b.current.outgoing)===n&&(b.current.outgoing=[]):v(t)!==n&&(b.current.outgoing=[],(()=>{if(n)if(h(),t){f(t,!0),h();const e=n.map((e=>(0,r.cloneBlock)(e)));k.current&&(b.current.incoming=e),p(t,e)}else k.current&&(b.current.incoming=n),c(n)})(),o&&d(o.selectionStart,o.selectionEnd,o.initialPosition))}),[n,t]),(0,s.useEffect)((()=>{const{getSelectionStart:e,getSelectionEnd:n,getSelectedBlocksInitialCaretPosition:o,isLastBlockChangePersistent:r,__unstableIsLastBlockChangeIgnored:l}=a.select(Vn);let i=v(t),s=r(),c=!1;k.current=!0;const u=a.subscribe((()=>{if(null!==t&&null===g(t))return;const a=r(),u=v(t),d=u!==i;if(i=u,d&&(b.current.incoming||l()))return b.current.incoming=null,void(s=a);(d||c&&!d&&a&&!s)&&(s=a,b.current.outgoing.push(i),(s?y.current:_.current)(i,{selection:{selectionStart:e(),selectionEnd:n(),initialPosition:o()}})),c=d}));return()=>u()}),[a,t])}var $a=(0,d.createHigherOrderComponent)((e=>(0,m.withRegistry)((t=>{let{useSubRegistry:n=!0,registry:o,...r}=t;if(!n)return(0,s.createElement)(e,i({registry:o},r));const[l,a]=(0,s.useState)(null);return(0,s.useEffect)((()=>{const e=(0,m.createRegistry)({},o);e.registerStore(Fn,zn),a(e)}),[o]),l?(0,s.createElement)(m.RegistryProvider,{value:l},(0,s.createElement)(e,i({registry:l},r))):null}))),"withRegistryProvider")((function(e){const{children:t,settings:n}=e,{updateSettings:o}=(0,m.useDispatch)(Vn);return(0,s.useEffect)((()=>{o(n)}),[n]),Wa(e),(0,s.createElement)(Sa,null,t)}));function ja(e){let{onClick:t}=e;return(0,s.createElement)("div",{tabIndex:0,role:"button",onClick:t,onKeyPress:t},(0,s.createElement)(p.Disabled,null,(0,s.createElement)(pm,null)))}function Ka(){const{hasSelectedBlock:e,hasMultiSelection:t}=(0,m.useSelect)(Vn),{clearSelectedBlock:n}=(0,m.useDispatch)(Vn);return(0,d.useRefEffect)((o=>{function r(r){(e()||t())&&r.target===o&&n()}return o.addEventListener("mousedown",r),()=>{o.removeEventListener("mousedown",r)}}),[e,t,n])}function qa(e){return(0,s.createElement)("div",i({ref:Ka()},e))}function Ya(e,t){const n="start"===t?"firstChild":"lastChild",o="start"===t?"nextSibling":"previousSibling";for(;e[n];)for(e=e[n];e.nodeType===e.TEXT_NODE&&/^[ \t\n]*$/.test(e.data)&&e[o];)e=e[o];return e}function Za(e){const{isMultiSelecting:t,getMultiSelectedBlockClientIds:n,hasMultiSelection:o,getSelectedBlockClientId:r}=e(Vn);return{isMultiSelecting:t(),multiSelectedBlockClientIds:n(),hasMultiSelection:o(),selectedBlockClientId:r()}}function Xa(){const{isMultiSelecting:e,multiSelectedBlockClientIds:t,hasMultiSelection:n,selectedBlockClientId:o}=(0,m.useSelect)(Za,[]),r=Ba(o),l=Ba((0,u.first)(t)),i=Ba((0,u.last)(t));return(0,d.useRefEffect)((s=>{const{ownerDocument:a}=s,{defaultView:c}=a;if(!n||e){if(!o||e)return;const t=c.getSelection();if(t.rangeCount&&!t.isCollapsed){const e=r.current,{startContainer:n,endContainer:o}=t.getRangeAt(0);!e||e.contains(n)&&e.contains(o)||t.removeAllRanges()}return}const{length:u}=t;if(u<2)return;if(!l.current||!i.current)return;s.focus();const d=c.getSelection(),p=a.createRange(),m=Ya(l.current,"start"),f=Ya(i.current,"end");var h;h=s,Array.from(h.querySelectorAll(".rich-text:not( .editor-post-title__input )")).forEach((e=>{e.removeAttribute("contenteditable")})),p.setStartBefore(m),p.setEndAfter(f),d.removeAllRanges(),d.addRange(p)}),[n,e,t,o])}function Qa(e){const{tagName:t}=e;return"INPUT"===t||"BUTTON"===t||"SELECT"===t||"TEXTAREA"===t}function Ja(e,t,n,o){let r,l=rr.focus.focusable.find(n);return t&&(l=(0,u.reverse)(l)),l=l.slice(l.indexOf(e)+1),o&&(r=e.getBoundingClientRect()),(0,u.find)(l,(function(e){if(!rr.focus.tabbable.isTabbableIndex(e))return!1;if(e.isContentEditable&&"true"!==e.contentEditable)return!1;if(o){const t=e.getBoundingClientRect();if(t.left>=r.right||t.right<=r.left)return!1}return!0}))}function ec(){const{getSelectedBlockClientId:e,getMultiSelectedBlocksStartClientId:t,getMultiSelectedBlocksEndClientId:n,getPreviousBlockClientId:o,getNextBlockClientId:r,getFirstMultiSelectedBlockClientId:l,getLastMultiSelectedBlockClientId:i,getSettings:s,hasMultiSelection:a}=(0,m.useSelect)(Vn),{multiSelect:c,selectBlock:u}=(0,m.useDispatch)(Vn);return(0,d.useRefEffect)((d=>{let p;function m(){p=null}function f(l){const i=e(),s=t(),a=n(),d=o(a||i),p=r(a||i),m=l?d:p;m&&(s===m?u(m):c(s||i,m))}function h(e){const t=l(),n=i(),o=e?t:n;o&&u(o)}function g(t){const{keyCode:l,target:i}=t,c=l===va.UP,u=l===va.DOWN,m=l===va.LEFT,g=l===va.RIGHT,v=c||m,b=m||g,k=c||u,_=b||k,y=t.shiftKey,E=y||t.ctrlKey||t.altKey||t.metaKey,C=k?rr.isVerticalEdge:rr.isHorizontalEdge,{ownerDocument:S}=d,{defaultView:w}=S;if(a())return void(_&&((y?f:h)(v),t.preventDefault()));if(k?p||(p=(0,rr.computeCaretRect)(w)):p=null,t.defaultPrevented)return;if(!_)return;if(!function(e,t,n){if((t===va.UP||t===va.DOWN)&&!n)return!0;const{tagName:o}=e;return"INPUT"!==o&&"TEXTAREA"!==o}(i,l,E))return;const B=(0,rr.isRTL)(i)?!v:v,{keepCaretInsideBlock:I}=s(),x=e();if(y){const e=n(),l=o(e||x),s=r(e||x);(v&&l||!v&&s)&&function(e,t){const n=Ja(e,t,d);return!n||!function(e,t){return e.closest(ia)===t.closest(ia)}(e,n)}(i,v)&&C(i,v)&&(f(v),t.preventDefault())}else if(k&&(0,rr.isVerticalEdge)(i,v)&&!I){const e=Ja(i,v,d,!0);e&&((0,rr.placeCaretAtVerticalEdge)(e,v,p),t.preventDefault())}else if(b&&w.getSelection().isCollapsed&&(0,rr.isHorizontalEdge)(i,B)&&!I){const e=Ja(i,B,d);(0,rr.placeCaretAtHorizontalEdge)(e,v),t.preventDefault()}}return d.addEventListener("mousedown",m),d.addEventListener("keydown",g),()=>{d.removeEventListener("mousedown",m),d.removeEventListener("keydown",g)}}),[])}var tc=window.wp.keyboardShortcuts;function nc(){const{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:n}=(0,m.useSelect)(Vn),{multiSelect:o}=(0,m.useDispatch)(Vn),r=(0,tc.__unstableUseShortcutEventMatch)();return(0,d.useRefEffect)((l=>{function i(l){if(!r("core/block-editor/select-all",l))return;if(!(0,rr.isEntirelySelected)(l.target))return;const i=t(),[s]=i,a=n(s);let c=e(a);i.length===c.length&&(c=e(n(a)));const d=(0,u.first)(c),p=(0,u.last)(c);d!==p&&(o(d,p),l.preventDefault())}return l.addEventListener("keydown",i),()=>{l.removeEventListener("keydown",i)}}),[])}function oc(){const[e,t,n]=function(){const e=(0,s.useRef)(),t=(0,s.useRef)(),n=(0,s.useRef)(),o=(0,s.useRef)(),{hasMultiSelection:r,getSelectedBlockClientId:l,getBlockCount:i}=(0,m.useSelect)(Vn),{setNavigationMode:a}=(0,m.useDispatch)(Vn),c=(0,m.useSelect)((e=>e(Vn).isNavigationMode()),[])?void 0:"0",u=(0,s.useRef)();function p(t){if(u.current)u.current=null;else if(r())e.current.focus();else if(l())o.current.focus();else{a(!0);const n=t.target.compareDocumentPosition(e.current)&t.target.DOCUMENT_POSITION_FOLLOWING?"findNext":"findPrevious";rr.focus.tabbable[n](t.target).focus()}}const f=(0,s.createElement)("div",{ref:t,tabIndex:c,onFocus:p}),h=(0,s.createElement)("div",{ref:n,tabIndex:c,onFocus:p}),g=(0,d.useRefEffect)((s=>{function c(e){if(e.defaultPrevented)return;if(e.keyCode===va.ESCAPE&&!r())return e.preventDefault(),void a(!0);if(e.keyCode!==va.TAB)return;const o=e.shiftKey,i=o?"findPrevious":"findNext";if(!r()&&!l())return void(e.target===s&&a(!0));if(Qa(e.target)&&Qa(rr.focus.tabbable[i](e.target)))return;const c=o?t:n;u.current=!0,c.current.focus({preventScroll:!0})}function d(e){o.current=e.target;const{ownerDocument:t}=s;e.relatedTarget||t.activeElement!==t.body||0!==i()||s.focus()}function p(o){var r;if(o.keyCode!==va.TAB)return;if("region"===(null===(r=o.target)||void 0===r?void 0:r.getAttribute("role")))return;if(e.current===o.target)return;const l=o.shiftKey?"findPrevious":"findNext",i=rr.focus.tabbable[l](o.target);i!==t.current&&i!==n.current||(o.preventDefault(),i.focus({preventScroll:!0}))}const{ownerDocument:m}=s,{defaultView:f}=m;return f.addEventListener("keydown",p),s.addEventListener("keydown",c),s.addEventListener("focusout",d),()=>{f.removeEventListener("keydown",p),s.removeEventListener("keydown",c),s.removeEventListener("focusout",d)}}),[]);return[f,(0,d.useMergeRefs)([e,g]),h]}(),o=(0,m.useSelect)((e=>e(Vn).hasMultiSelection()),[]);return[e,(0,d.useMergeRefs)([t,Xa(),nc(),ec(),(0,d.useRefEffect)((e=>{if(e.tabIndex=-1,o)return e.setAttribute("aria-label",(0,h.__)("Multiple selected blocks")),()=>{e.removeAttribute("aria-label")}}),[o])]),n]}var rc=(0,s.forwardRef)((function(e,t){let{children:n,...o}=e;const[r,l,a]=oc();return(0,s.createElement)(s.Fragment,null,r,(0,s.createElement)("div",i({},o,{ref:(0,d.useMergeRefs)([l,t]),className:c()(o.className,"block-editor-writing-flow")}),n),a)}));const lc="editor-styles-wrapper";function ic(e){return(0,s.useMemo)((()=>{const t=document.implementation.createHTMLDocument("");return t.body.innerHTML=e,Array.from(t.body.children)}),[e])}var sc=(0,s.forwardRef)((function(e,t){var n,o;let{contentRef:r,children:l,head:a,tabIndex:u=0,...m}=e;const[,f]=(0,s.useReducer)((()=>({}))),[g,v]=(0,s.useState)(),[b,k]=(0,s.useState)([]),_=ic(null===(n=window.__editorAssets)||void 0===n?void 0:n.styles),y=ic(null===(o=window.__editorAssets)||void 0===o?void 0:o.scripts),E=Ka(),[C,S,w]=oc(),B=(0,d.useRefEffect)((e=>{function t(){const{contentDocument:t,ownerDocument:n}=e,{readyState:o,documentElement:r}=t;return("interactive"===o||"complete"===o)&&(function(e){const{defaultView:t}=e,{frameElement:n}=t;function o(e){const o=Object.getPrototypeOf(e).constructor.name,r=window[o],l={};for(const t in e)l[t]=e[t];if(e instanceof t.MouseEvent){const e=n.getBoundingClientRect();l.clientX+=e.left,l.clientY+=e.top}const i=new r(e.type,l);!n.dispatchEvent(i)&&e.preventDefault()}const r=["dragover"];for(const t of r)e.addEventListener(t,o)}(t),v(t),E(r),k(Array.from(n.body.classList).filter((e=>e.startsWith("admin-color-")||"wp-embed-responsive"===e))),t.dir=n.dir,r.removeChild(t.head),r.removeChild(t.body),!0)}t()||e.addEventListener("load",(()=>{t()}))}),[]),I=(0,d.useRefEffect)((e=>{y.reduce(((t,n)=>t.then((()=>async function(e,t){let{id:n,src:o}=t;return new Promise(((t,r)=>{const l=e.ownerDocument.createElement("script");l.id=n,o?(l.src=o,l.onload=()=>t(),l.onerror=()=>r()):t(),e.appendChild(l)}))}(e,n)))),Promise.resolve()).finally((()=>{f()}))}),[]),x=(0,d.useMergeRefs)([r,E,S]);return(0,s.useEffect)((()=>{var e;g&&(e=g,Array.from(document.styleSheets).forEach((t=>{try{t.cssRules}catch(e){return}const{ownerNode:n,cssRules:o}=t;if(o&&"LINK"===n.tagName&&"wp-reset-editor-styles-css"!==n.id&&Array.from(o).find((e=>{let{selectorText:t}=e;return t&&(t.includes(`.${lc}`)||t.includes(".wp-block"))}))&&!e.getElementById(n.id)){console.warn(`Stylesheet ${n.id} was not properly added.\nFor blocks, use the block API's style (https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#style) or editorStyle (https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#editor-style).\nFor themes, use add_editor_style (https://developer.wordpress.org/block-editor/how-to-guides/themes/theme-support/#editor-styles).`,n.outerHTML),e.head.appendChild(n.cloneNode(!0));const t=n.id.replace("-css","-inline-css"),o=document.getElementById(t);o&&e.head.appendChild(o.cloneNode(!0))}})))}),[g]),a=(0,s.createElement)(s.Fragment,null,(0,s.createElement)("style",null,"body{margin:0}"),_.map((e=>{let{tagName:t,href:n,id:o,rel:r,media:l,textContent:i}=e;const a=t.toLowerCase();return"style"===a?(0,s.createElement)(a,{id:o,key:o},i):(0,s.createElement)(a,{href:n,id:o,rel:r,media:l,key:o})})),a),(0,s.createElement)(s.Fragment,null,u>=0&&C,(0,s.createElement)("iframe",i({},m,{ref:(0,d.useMergeRefs)([t,B]),tabIndex:u,title:(0,h.__)("Editor canvas")}),g&&(0,s.createPortal)((0,s.createElement)(s.Fragment,null,(0,s.createElement)("head",{ref:I},a),(0,s.createElement)("body",{ref:x,className:c()(lc,...b)},(0,s.createElement)(p.__experimentalStyleProvider,{document:g},l))),g.documentElement)),u>=0&&w)})),ac={grad:.9,turn:360,rad:360/(2*Math.PI)},cc=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},uc=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},dc=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},pc=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},mc=function(e){return{r:dc(e.r,0,255),g:dc(e.g,0,255),b:dc(e.b,0,255),a:dc(e.a)}},fc=function(e){return{r:uc(e.r),g:uc(e.g),b:uc(e.b),a:uc(e.a,3)}},hc=/^#([0-9a-f]{3,8})$/i,gc=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},vc=function(e){var t=e.r,n=e.g,o=e.b,r=e.a,l=Math.max(t,n,o),i=l-Math.min(t,n,o),s=i?l===t?(n-o)/i:l===n?2+(o-t)/i:4+(t-n)/i:0;return{h:60*(s<0?s+6:s),s:l?i/l*100:0,v:l/255*100,a:r}},bc=function(e){var t=e.h,n=e.s,o=e.v,r=e.a;t=t/360*6,n/=100,o/=100;var l=Math.floor(t),i=o*(1-n),s=o*(1-(t-l)*n),a=o*(1-(1-t+l)*n),c=l%6;return{r:255*[o,s,i,i,a,o][c],g:255*[a,o,o,s,i,i][c],b:255*[i,i,a,o,o,s][c],a:r}},kc=function(e){return{h:pc(e.h),s:dc(e.s,0,100),l:dc(e.l,0,100),a:dc(e.a)}},_c=function(e){return{h:uc(e.h),s:uc(e.s),l:uc(e.l),a:uc(e.a,3)}},yc=function(e){return bc((n=(t=e).s,{h:t.h,s:(n*=((o=t.l)<50?o:100-o)/100)>0?2*n/(o+n)*100:0,v:o+n,a:t.a}));var t,n,o},Ec=function(e){return{h:(t=vc(e)).h,s:(r=(200-(n=t.s))*(o=t.v)/100)>0&&r<200?n*o/100/(r<=100?r:200-r)*100:0,l:r/2,a:t.a};var t,n,o,r},Cc=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Sc=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,wc=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Bc=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ic={string:[[function(e){var t=hc.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?uc(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?uc(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=wc.exec(e)||Bc.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:mc({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=Cc.exec(e)||Sc.exec(e);if(!t)return null;var n,o,r=kc({h:(n=t[1],o=t[2],void 0===o&&(o="deg"),Number(n)*(ac[o]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return yc(r)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,o=e.b,r=e.a,l=void 0===r?1:r;return cc(t)&&cc(n)&&cc(o)?mc({r:Number(t),g:Number(n),b:Number(o),a:Number(l)}):null},"rgb"],[function(e){var t=e.h,n=e.s,o=e.l,r=e.a,l=void 0===r?1:r;if(!cc(t)||!cc(n)||!cc(o))return null;var i=kc({h:Number(t),s:Number(n),l:Number(o),a:Number(l)});return yc(i)},"hsl"],[function(e){var t=e.h,n=e.s,o=e.v,r=e.a,l=void 0===r?1:r;if(!cc(t)||!cc(n)||!cc(o))return null;var i=function(e){return{h:pc(e.h),s:dc(e.s,0,100),v:dc(e.v,0,100),a:dc(e.a)}}({h:Number(t),s:Number(n),v:Number(o),a:Number(l)});return bc(i)},"hsv"]]},xc=function(e,t){for(var n=0;n<t.length;n++){var o=t[n][0](e);if(o)return[o,t[n][1]]}return[null,void 0]},Tc=function(e,t){var n=Ec(e);return{h:n.h,s:dc(n.s+100*t,0,100),l:n.l,a:n.a}},Nc=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},Pc=function(e,t){var n=Ec(e);return{h:n.h,s:n.s,l:dc(n.l+100*t,0,100),a:n.a}},Mc=function(){function e(e){this.parsed=function(e){return"string"==typeof e?xc(e.trim(),Ic.string):"object"==typeof e&&null!==e?xc(e,Ic.object):[null,void 0]}(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return uc(Nc(this.rgba),2)},e.prototype.isDark=function(){return Nc(this.rgba)<.5},e.prototype.isLight=function(){return Nc(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=fc(this.rgba)).r,n=e.g,o=e.b,l=(r=e.a)<1?gc(uc(255*r)):"","#"+gc(t)+gc(n)+gc(o)+l;var e,t,n,o,r,l},e.prototype.toRgb=function(){return fc(this.rgba)},e.prototype.toRgbString=function(){return t=(e=fc(this.rgba)).r,n=e.g,o=e.b,(r=e.a)<1?"rgba("+t+", "+n+", "+o+", "+r+")":"rgb("+t+", "+n+", "+o+")";var e,t,n,o,r},e.prototype.toHsl=function(){return _c(Ec(this.rgba))},e.prototype.toHslString=function(){return t=(e=_c(Ec(this.rgba))).h,n=e.s,o=e.l,(r=e.a)<1?"hsla("+t+", "+n+"%, "+o+"%, "+r+")":"hsl("+t+", "+n+"%, "+o+"%)";var e,t,n,o,r},e.prototype.toHsv=function(){return e=vc(this.rgba),{h:uc(e.h),s:uc(e.s),v:uc(e.v),a:uc(e.a,3)};var e},e.prototype.invert=function(){return Rc({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),Rc(Tc(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),Rc(Tc(this.rgba,-e))},e.prototype.grayscale=function(){return Rc(Tc(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),Rc(Pc(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),Rc(Pc(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?Rc({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):uc(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=Ec(this.rgba);return"number"==typeof e?Rc({h:e,s:t.s,l:t.l,a:t.a}):uc(t.h)},e.prototype.isEqual=function(e){return this.toHex()===Rc(e).toHex()},e}(),Rc=function(e){return e instanceof Mc?e:new Mc(e)},Lc=[],Ac=function(e){e.forEach((function(e){Lc.indexOf(e)<0&&(e(Mc,Ic),Lc.push(e))}))};function Dc(e,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},o={};for(var r in n)o[n[r]]=r;var l={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var r,i,s=o[this.toHex()];if(s)return s;if(null==t?void 0:t.closest){var a=this.toRgb(),c=1/0,u="black";if(!l.length)for(var d in n)l[d]=new e(n[d]).toRgb();for(var p in n){var m=(r=a,i=l[p],Math.pow(r.r-i.r,2)+Math.pow(r.g-i.g,2)+Math.pow(r.b-i.b,2));m<c&&(c=m,u=p)}return u}},t.string.push([function(t){var o=t.toLowerCase(),r="transparent"===o?"#0000":n[o];return r?new e(r).toRgb():null},"name"])}var Oc=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},Fc=function(e){return.2126*Oc(e.r)+.7152*Oc(e.g)+.0722*Oc(e.b)};function zc(e){e.prototype.luminance=function(){return e=Fc(this.rgba),void 0===(t=2)&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0;var e,t,n},e.prototype.contrast=function(t){void 0===t&&(t="#FFF");var n,o,r,l,i,s,a,c=t instanceof e?t:new e(t);return l=this.rgba,i=c.toRgb(),n=(s=Fc(l))>(a=Fc(i))?(s+.05)/(a+.05):(a+.05)/(s+.05),void 0===(o=2)&&(o=0),void 0===r&&(r=Math.pow(10,o)),Math.floor(r*n)/r+0},e.prototype.isReadable=function(e,t){return void 0===e&&(e="#FFF"),void 0===t&&(t={}),this.contrast(e)>=(i=void 0===(l=(n=t).size)?"normal":l,"AAA"===(r=void 0===(o=n.level)?"AA":o)&&"normal"===i?7:"AA"===r&&"large"===i?3:4.5);var n,o,r,l,i}}var Vc=n(3692),Hc=n.n(Vc);const Uc=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function Gc(e,t){t=t||{};let n=1,o=1;function r(e){const t=e.match(/\n/g);t&&(n+=t.length);const r=e.lastIndexOf("\n");o=~r?e.length-r:o+e.length}function l(){const e={line:n,column:o};return function(t){return t.position=new i(e),m(),t}}function i(e){this.start=e,this.end={line:n,column:o},this.source=t.source}i.prototype.content=e;const s=[];function a(r){const l=new Error(t.source+":"+n+":"+o+": "+r);if(l.reason=r,l.filename=t.source,l.line=n,l.column=o,l.source=e,!t.silent)throw l;s.push(l)}function c(){return p(/^{\s*/)}function u(){return p(/^}/)}function d(){let t;const n=[];for(m(),f(n);e.length&&"}"!==e.charAt(0)&&(t=S()||w());)!1!==t&&(n.push(t),f(n));return n}function p(t){const n=t.exec(e);if(!n)return;const o=n[0];return r(o),e=e.slice(o.length),n}function m(){p(/^\s*/)}function f(e){let t;for(e=e||[];t=h();)!1!==t&&e.push(t);return e}function h(){const t=l();if("/"!==e.charAt(0)||"*"!==e.charAt(1))return;let n=2;for(;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return a("End of comment missing");const i=e.slice(2,n-2);return o+=2,r(i),e=e.slice(n),o+=2,t({type:"comment",comment:i})}function g(){const e=p(/^([^{]+)/);if(e)return Wc(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"‌")})).split(/\s*(?![^(]*\)),\s*/).map((function(e){return e.replace(/\u200C/g,",")}))}function v(){const e=l();let t=p(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(!t)return;if(t=Wc(t[0]),!p(/^:\s*/))return a("property missing ':'");const n=p(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),o=e({type:"declaration",property:t.replace(Uc,""),value:n?Wc(n[0]).replace(Uc,""):""});return p(/^[;\s]*/),o}function b(){const e=[];if(!c())return a("missing '{'");let t;for(f(e);t=v();)!1!==t&&(e.push(t),f(e));return u()?e:a("missing '}'")}function k(){let e;const t=[],n=l();for(;e=p(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),p(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:b()})}const _=C("import"),y=C("charset"),E=C("namespace");function C(e){const t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){const n=l(),o=p(t);if(!o)return;const r={type:e};return r[e]=o[1].trim(),n(r)}}function S(){if("@"===e[0])return function(){const e=l();let t=p(/^@([-\w]+)?keyframes\s*/);if(!t)return;const n=t[1];if(t=p(/^([-\w]+)\s*/),!t)return a("@keyframes missing name");const o=t[1];if(!c())return a("@keyframes missing '{'");let r,i=f();for(;r=k();)i.push(r),i=i.concat(f());return u()?e({type:"keyframes",name:o,vendor:n,keyframes:i}):a("@keyframes missing '}'")}()||function(){const e=l(),t=p(/^@media *([^{]+)/);if(!t)return;const n=Wc(t[1]);if(!c())return a("@media missing '{'");const o=f().concat(d());return u()?e({type:"media",media:n,rules:o}):a("@media missing '}'")}()||function(){const e=l(),t=p(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:Wc(t[1]),media:Wc(t[2])})}()||function(){const e=l(),t=p(/^@supports *([^{]+)/);if(!t)return;const n=Wc(t[1]);if(!c())return a("@supports missing '{'");const o=f().concat(d());return u()?e({type:"supports",supports:n,rules:o}):a("@supports missing '}'")}()||_()||y()||E()||function(){const e=l(),t=p(/^@([-\w]+)?document *([^{]+)/);if(!t)return;const n=Wc(t[1]),o=Wc(t[2]);if(!c())return a("@document missing '{'");const r=f().concat(d());return u()?e({type:"document",document:o,vendor:n,rules:r}):a("@document missing '}'")}()||function(){const e=l();if(!p(/^@page */))return;const t=g()||[];if(!c())return a("@page missing '{'");let n,o=f();for(;n=v();)o.push(n),o=o.concat(f());return u()?e({type:"page",selectors:t,declarations:o}):a("@page missing '}'")}()||function(){const e=l();if(!p(/^@host\s*/))return;if(!c())return a("@host missing '{'");const t=f().concat(d());return u()?e({type:"host",rules:t}):a("@host missing '}'")}()||function(){const e=l();if(!p(/^@font-face\s*/))return;if(!c())return a("@font-face missing '{'");let t,n=f();for(;t=v();)n.push(t),n=n.concat(f());return u()?e({type:"font-face",declarations:n}):a("@font-face missing '}'")}()}function w(){const e=l(),t=g();return t?(f(),e({type:"rule",selectors:t,declarations:b()})):a("selector missing")}return $c(function(){const e=d();return{type:"stylesheet",stylesheet:{source:t.source,rules:e,parsingErrors:s}}}())}function Wc(e){return e?e.replace(/^\s+|\s+$/g,""):""}function $c(e,t){const n=e&&"string"==typeof e.type,o=n?e:t;for(const t in e){const n=e[t];Array.isArray(n)?n.forEach((function(e){$c(e,o)})):n&&"object"==typeof n&&$c(n,o)}return n&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var jc=n(5717),Kc=n.n(jc),qc=Yc;function Yc(e){this.options=e||{}}Yc.prototype.emit=function(e){return e},Yc.prototype.visit=function(e){return this[e.type](e)},Yc.prototype.mapVisit=function(e,t){let n="";t=t||"";for(let o=0,r=e.length;o<r;o++)n+=this.visit(e[o]),t&&o<r-1&&(n+=this.emit(t));return n};var Zc=Xc;function Xc(e){qc.call(this,e)}Kc()(Xc,qc),Xc.prototype.compile=function(e){return e.stylesheet.rules.map(this.visit,this).join("")},Xc.prototype.comment=function(e){return this.emit("",e.position)},Xc.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},Xc.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Xc.prototype.document=function(e){const t="@"+(e.vendor||"")+"document "+e.document;return this.emit(t,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Xc.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},Xc.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},Xc.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Xc.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit("{")+this.mapVisit(e.keyframes)+this.emit("}")},Xc.prototype.keyframe=function(e){const t=e.declarations;return this.emit(e.values.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}")},Xc.prototype.page=function(e){const t=e.selectors.length?e.selectors.join(", "):"";return this.emit("@page "+t,e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},Xc.prototype["font-face"]=function(e){return this.emit("@font-face",e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},Xc.prototype.host=function(e){return this.emit("@host",e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Xc.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},Xc.prototype.rule=function(e){const t=e.declarations;return t.length?this.emit(e.selectors.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}"):""},Xc.prototype.declaration=function(e){return this.emit(e.property+":"+e.value,e.position)+this.emit(";")};var Qc=Jc;function Jc(e){e=e||{},qc.call(this,e),this.indentation=e.indent}Kc()(Jc,qc),Jc.prototype.compile=function(e){return this.stylesheet(e)},Jc.prototype.stylesheet=function(e){return this.mapVisit(e.stylesheet.rules,"\n\n")},Jc.prototype.comment=function(e){return this.emit(this.indent()+"/*"+e.comment+"*/",e.position)},Jc.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},Jc.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Jc.prototype.document=function(e){const t="@"+(e.vendor||"")+"document "+e.document;return this.emit(t,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Jc.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},Jc.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},Jc.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Jc.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.keyframes,"\n")+this.emit(this.indent(-1)+"}")},Jc.prototype.keyframe=function(e){const t=e.declarations;return this.emit(this.indent())+this.emit(e.values.join(", "),e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(t,"\n")+this.emit(this.indent(-1)+"\n"+this.indent()+"}\n")},Jc.prototype.page=function(e){const t=e.selectors.length?e.selectors.join(", ")+" ":"";return this.emit("@page "+t,e.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(e.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},Jc.prototype["font-face"]=function(e){return this.emit("@font-face ",e.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(e.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},Jc.prototype.host=function(e){return this.emit("@host",e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Jc.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},Jc.prototype.rule=function(e){const t=this.indent(),n=e.declarations;return n.length?this.emit(e.selectors.map((function(e){return t+e})).join(",\n"),e.position)+this.emit(" {\n")+this.emit(this.indent(1))+this.mapVisit(n,"\n")+this.emit(this.indent(-1))+this.emit("\n"+this.indent()+"}"):""},Jc.prototype.declaration=function(e){return this.emit(this.indent())+this.emit(e.property+": "+e.value,e.position)+this.emit(";")},Jc.prototype.indent=function(e){return this.level=this.level||1,null!==e?(this.level+=e,""):Array(this.level).join(this.indentation||" ")};var eu=function(e,t){try{const r=Gc(e);return n=Hc().map(r,(function(e){if(!e)return e;const n=t(e);return this.update(n)})),((o=o||{}).compress?new Zc(o):new Qc(o)).compile(n)}catch(e){return console.warn("Error while traversing the CSS: "+e),null}var n,o};function tu(e){return 0!==e.value.indexOf("data:")&&0!==e.value.indexOf("#")&&(t=e.value,!/^\/(?!\/)/.test(t)&&!function(e){return/^(?:https?:)?\/\//.test(e)}(e.value));var t}function nu(e,t){return new URL(e,t).toString()}var ou=e=>t=>{if("declaration"===t.type){const l=function(e){const t=/url\((\s*)(['"]?)(.+?)\2(\s*)\)/g;let n;const o=[];for(;null!==(n=t.exec(e));){const e={source:n[0],before:n[1],quote:n[2],value:n[3],after:n[4]};tu(e)&&o.push(e)}return o}(t.value).map((r=e,e=>({...e,newUrl:"url("+e.before+e.quote+nu(e.value,r)+e.quote+e.after+")"})));return{...t,value:(n=t.value,o=l,o.forEach((e=>{n=n.replace(e.source,e.newUrl)})),n)}}var n,o,r;return t};const ru=/^(body|html|:root).*$/;var lu=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return n=>"rule"===n.type?{...n,selectors:n.selectors.map((n=>t.includes(n.trim())?n:n.match(ru)?n.replace(/^(body|html|:root)/,e):e+" "+n))}:n},iu=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(0,u.map)(e,(e=>{let{css:n,baseURL:o,__experimentalNoWrapper:r=!1}=e;const l=[];return t&&!r&&l.push(lu(t)),o&&l.push(ou(o)),l.length?eu(n,(0,d.compose)(l)):n}))};const su=".editor-styles-wrapper";function au(e){return(0,s.useCallback)((e=>{if(!e)return;const{ownerDocument:t}=e,{defaultView:n,body:o}=t,r=t.querySelector(su);let l;if(r)l=n.getComputedStyle(r,null).getPropertyValue("background-color");else{const e=t.createElement("div");e.classList.add("editor-styles-wrapper"),o.appendChild(e),l=n.getComputedStyle(e,null).getPropertyValue("background-color"),o.removeChild(e)}const i=Rc(l);i.luminance()>.5||0===i.alpha()?o.classList.remove("is-dark-theme"):o.classList.add("is-dark-theme")}),[e])}function cu(e){let{styles:t}=e;const n=(0,s.useMemo)((()=>iu(t,su)),[t]);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("style",{ref:au(t)}),n.map(((e,t)=>(0,s.createElement)("style",{key:t},e))))}let uu;Ac([Dc,zc]);var du=function(e){let{viewportWidth:t,__experimentalPadding:n}=e;const[o,{width:r}]=(0,d.useResizeObserver)(),[l,{height:i}]=(0,d.useResizeObserver)(),a=(0,m.useSelect)((e=>e(Vn).getSettings().styles),[]);uu=uu||(0,d.pure)(pm);const c=r/t;return(0,s.createElement)("div",{className:"block-editor-block-preview__container"},o,(0,s.createElement)(p.Disabled,{className:"block-editor-block-preview__content",style:{transform:`scale(${c})`,height:i*c}},(0,s.createElement)(sc,{head:(0,s.createElement)(cu,{styles:a}),contentRef:(0,d.useRefEffect)((e=>{const{ownerDocument:{documentElement:t}}=e;t.classList.add("block-editor-block-preview__content-iframe"),t.style.position="absolute",t.style.width="100%",e.style.padding=n+"px"}),[]),"aria-hidden":!0,tabIndex:-1,style:{position:"absolute",width:t,height:i,pointerEvents:"none"}},l,(0,s.createElement)(uu,{renderAppender:!1}))))},pu=(0,s.memo)((function(e){let{blocks:t,__experimentalPadding:n=0,viewportWidth:o=1200,__experimentalLive:r=!1,__experimentalOnClick:l}=e;const i=(0,m.useSelect)((e=>e(Vn).getSettings()),[]),a=(0,s.useMemo)((()=>{const e={...i};return e.__experimentalBlockPatterns=[],e}),[i]),c=(0,s.useMemo)((()=>(0,u.castArray)(t)),[t]);return t&&0!==t.length?(0,s.createElement)($a,{value:c,settings:a},r?(0,s.createElement)(ja,{onClick:l}):(0,s.createElement)(du,{viewportWidth:o,__experimentalPadding:n})):null})),mu=function(e){var t,n;let{item:o}=e;const{name:l,title:i,icon:a,description:c,initialAttributes:u}=o,d=(0,r.getBlockType)(l),p=(0,r.isReusableBlock)(o);return(0,s.createElement)("div",{className:"block-editor-inserter__preview-container"},(0,s.createElement)("div",{className:"block-editor-inserter__preview"},p||null!=d&&d.example?(0,s.createElement)("div",{className:"block-editor-inserter__preview-content"},(0,s.createElement)(pu,{__experimentalPadding:16,viewportWidth:null!==(t=null===(n=d.example)||void 0===n?void 0:n.viewportWidth)&&void 0!==t?t:500,blocks:d.example?(0,r.getBlockFromExample)(o.name,{attributes:{...d.example.attributes,...u},innerBlocks:d.example.innerBlocks}):(0,r.createBlock)(l,u)})):(0,s.createElement)("div",{className:"block-editor-inserter__preview-content-missing"},(0,h.__)("No Preview Available."))),!p&&(0,s.createElement)(Ga,{title:i,icon:a,description:c}))},fu=(0,s.createContext)(),hu=(0,s.forwardRef)((function(e,t){let{isFirst:n,as:o,children:r,...l}=e;const a=(0,s.useContext)(fu);return(0,s.createElement)(p.__unstableCompositeItem,i({ref:t,state:a,role:"option",focusable:!0},l),(e=>{const t={...e,tabIndex:n?0:e.tabIndex};return o?(0,s.createElement)(o,t,r):"function"==typeof r?r(t):(0,s.createElement)(p.Button,t,r)}))})),gu=(0,s.createElement)(F.SVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},(0,s.createElement)(F.Path,{d:"M5 4h2V2H5v2zm6-2v2h2V2h-2zm-6 8h2V8H5v2zm6 0h2V8h-2v2zm-6 6h2v-2H5v2zm6 0h2v-2h-2v2z"}));function vu(e){let{count:t,icon:n}=e;return(0,s.createElement)("div",{className:"block-editor-block-draggable-chip-wrapper"},(0,s.createElement)("div",{className:"block-editor-block-draggable-chip"},(0,s.createElement)(p.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content"},(0,s.createElement)(p.FlexItem,null,n?(0,s.createElement)(Ua,{icon:n}):(0,h.sprintf)(
11
  /* translators: %d: Number of blocks. */
12
  (0,h._n)("%d block","%d blocks",t),t)),(0,s.createElement)(p.FlexItem,null,(0,s.createElement)(Ua,{icon:gu})))))}var bu=e=>{let{isEnabled:t,blocks:n,icon:o,children:r}=e;const l={type:"inserter",blocks:n};return(0,s.createElement)(p.Draggable,{__experimentalTransferDataType:"wp-blocks",transferData:l,__experimentalDragComponent:(0,s.createElement)(vu,{count:n.length,icon:o})},(e=>{let{onDraggableStart:n,onDraggableEnd:o}=e;return r({draggable:t,onDragStart:t?n:void 0,onDragEnd:t?o:void 0})}))};function ku(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;const{platform:t}=e.navigator;return-1!==t.indexOf("Mac")||["iPad","iPhone"].includes(t)}var _u=(0,s.memo)((function(e){let{className:t,isFirst:n,item:o,onSelect:l,onHover:a,isDraggable:u,...d}=e;const p=(0,s.useRef)(!1),m=o.icon?{backgroundColor:o.icon.background,color:o.icon.foreground}:{},f=(0,s.useMemo)((()=>[(0,r.createBlock)(o.name,o.initialAttributes,(0,r.createBlocksFromInnerBlocksTemplate)(o.innerBlocks))]),[o.name,o.initialAttributes,o.initialAttributes]);return(0,s.createElement)(bu,{isEnabled:u&&!o.disabled,blocks:f,icon:o.icon},(e=>{let{draggable:r,onDragStart:u,onDragEnd:f}=e;return(0,s.createElement)("div",{className:"block-editor-block-types-list__list-item",draggable:r,onDragStart:e=>{p.current=!0,u&&(a(null),u(e))},onDragEnd:e=>{p.current=!1,f&&f(e)}},(0,s.createElement)(hu,i({isFirst:n,className:c()("block-editor-block-types-list__item",t),disabled:o.isDisabled,onClick:e=>{e.preventDefault(),l(o,ku()?e.metaKey:e.ctrlKey),a(null)},onKeyDown:e=>{const{keyCode:t}=e;t===va.ENTER&&(e.preventDefault(),l(o,ku()?e.metaKey:e.ctrlKey),a(null))},onFocus:()=>{p.current||a(o)},onMouseEnter:()=>{p.current||a(o)},onMouseLeave:()=>a(null),onBlur:()=>a(null)},d),(0,s.createElement)("span",{className:"block-editor-block-types-list__item-icon",style:m},(0,s.createElement)(Ua,{icon:o.icon,showColors:!0})),(0,s.createElement)("span",{className:"block-editor-block-types-list__item-title"},o.title)))}))})),yu=(0,s.forwardRef)((function(e,t){const[n,o]=(0,s.useState)(!1);return(0,s.useEffect)((()=>{n&&(0,Pt.speak)((0,h.__)("Use left and right arrow keys to move through blocks"))}),[n]),(0,s.createElement)("div",i({ref:t,role:"listbox","aria-orientation":"horizontal",onFocus:()=>{o(!0)},onBlur:e=>{!e.currentTarget.contains(e.relatedTarget)&&o(!1)}},e))})),Eu=(0,s.forwardRef)((function(e,t){const n=(0,s.useContext)(fu);return(0,s.createElement)(p.__unstableCompositeGroup,i({state:n,role:"presentation",ref:t},e))})),Cu=function(e){let{items:t=[],onSelect:n,onHover:o=(()=>{}),children:l,label:i,isDraggable:a=!0}=e;return(0,s.createElement)(yu,{className:"block-editor-block-types-list","aria-label":i},function(e,t){const n=[];for(let t=0,o=e.length;t<o;t+=3)n.push(e.slice(t,t+3));return n}(t).map(((e,t)=>(0,s.createElement)(Eu,{key:t},e.map(((e,l)=>(0,s.createElement)(_u,{key:e.id,item:e,className:(0,r.getBlockMenuDefaultClassName)(e.id),onSelect:n,onHover:o,isDraggable:a,isFirst:0===t&&0===l})))))),l)},Su=function(e){let{title:t,icon:n,children:o}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:"block-editor-inserter__panel-header"},(0,s.createElement)("h2",{className:"block-editor-inserter__panel-title"},t),(0,s.createElement)(p.Icon,{icon:n})),(0,s.createElement)("div",{className:"block-editor-inserter__panel-content"},o))},wu=(e,t)=>{const{categories:n,collections:o,items:l}=(0,m.useSelect)((t=>{const{getInserterItems:n}=t(Vn),{getCategories:o,getCollections:l}=t(r.store);return{categories:o(),collections:l(),items:n(e)}}),[e]);return[l,n,o,(0,s.useCallback)(((e,n)=>{let{name:o,initialAttributes:l,innerBlocks:i}=e;const s=(0,r.createBlock)(o,l,(0,r.createBlocksFromInnerBlocksTemplate)(i));t(s,void 0,n)}),[t])]},Bu=function(e){let{children:t}=e;const n=(0,p.__unstableUseCompositeState)({shift:!0,wrap:"horizontal"});return(0,s.createElement)(fu.Provider,{value:n},t)};const Iu=[];var xu=function(e){let{rootClientId:t,onInsert:n,onHover:o,showMostUsedBlocks:r}=e;const[l,i,a,c]=wu(t,n),p=(0,s.useMemo)((()=>(0,u.orderBy)(l,["frecency"],["desc"]).slice(0,6)),[l]),m=(0,s.useMemo)((()=>l.filter((e=>!e.category))),[l]),f=(0,s.useMemo)((()=>(0,u.flow)((e=>e.filter((e=>e.category&&"reusable"!==e.category))),(e=>(0,u.groupBy)(e,"category")))(l)),[l]),g=(0,s.useMemo)((()=>{const e={...a};return Object.keys(a).forEach((t=>{e[t]=l.filter((e=>(e=>e.name.split("/")[0])(e)===t)),0===e[t].length&&delete e[t]})),e}),[l,a]);(0,s.useEffect)((()=>()=>o(null)),[]);const v=(0,d.useAsyncList)(i),b=i.length===v.length,k=(0,s.useMemo)((()=>Object.entries(a)),[a]),_=(0,d.useAsyncList)(b?k:Iu);return(0,s.createElement)(Bu,null,(0,s.createElement)("div",null,r&&!!p.length&&(0,s.createElement)(Su,{title:(0,h._x)("Most used","blocks")},(0,s.createElement)(Cu,{items:p,onSelect:c,onHover:o,label:(0,h._x)("Most used","blocks")})),(0,u.map)(v,(e=>{const t=f[e.slug];return t&&t.length?(0,s.createElement)(Su,{key:e.slug,title:e.title,icon:e.icon},(0,s.createElement)(Cu,{items:t,onSelect:c,onHover:o,label:e.title})):null})),b&&m.length>0&&(0,s.createElement)(Su,{className:"block-editor-inserter__uncategorized-blocks-panel",title:(0,h.__)("Uncategorized")},(0,s.createElement)(Cu,{items:m,onSelect:c,onHover:o,label:(0,h.__)("Uncategorized")})),(0,u.map)(_,(e=>{let[t,n]=e;const r=g[t];return r&&r.length?(0,s.createElement)(Su,{key:t,title:n.title,icon:n.icon},(0,s.createElement)(Cu,{items:r,onSelect:c,onHover:o,label:n.title})):null}))))},Tu=function(e){let{selectedCategory:t,patternCategories:n,onClickCategory:o,openPatternExplorer:r}=e;const l=(0,d.useViewportMatch)("medium","<"),i=c()("block-editor-inserter__panel-header","block-editor-inserter__panel-header-patterns");return(0,s.createElement)(p.Flex,{justify:"space-between",align:"start",gap:"4",className:i},(0,s.createElement)(p.FlexItem,{isBlock:!0},(0,s.createElement)(p.SelectControl,{className:"block-editor-inserter__panel-dropdown",label:(0,h.__)("Filter patterns"),hideLabelFromVision:!0,value:t.name,onChange:e=>{o(n.find((t=>e===t.name)))},onBlur:e=>{null!=e&&e.relatedTarget||e.stopPropagation()},options:(()=>{const e=[];return n.map((t=>e.push({value:t.name,label:t.label}))),e})()})),!l&&(0,s.createElement)(p.FlexItem,null,(0,s.createElement)(p.Button,{variant:"secondary",className:"block-editor-inserter__patterns-explorer-expand",label:(0,h.__)("Explore all patterns"),onClick:()=>r()},(0,h._x)("Explore","Label for showing all block patterns"))))},Nu=window.wp.notices,Pu=(e,t)=>{const{patternCategories:n,patterns:o}=(0,m.useSelect)((e=>{const{__experimentalGetAllowedPatterns:n,getSettings:o}=e(Vn);return{patterns:n(t),patternCategories:o().__experimentalBlockPatternCategories}}),[t]),{createSuccessNotice:l}=(0,m.useDispatch)(Nu.store);return[o,n,(0,s.useCallback)(((t,n)=>{e((0,u.map)(n,(e=>(0,r.cloneBlock)(e))),t.name),l((0,h.sprintf)(
13
  /* translators: %s: block pattern title. */
26
  /* translators: Reusable blocks tab title in the block inserter. */
27
  title:(0,h.__)("Reusable")};var hd=function(e){let{children:t,showPatterns:n=!1,showReusableBlocks:o=!1,onSelect:r}=e;const l=(0,s.useMemo)((()=>{const e=[pd];return n&&e.push(md),o&&e.push(fd),e}),[pd,n,md,o,fd]);return(0,s.createElement)(p.TabPanel,{className:"block-editor-inserter__tabs",tabs:l,onSelect:r},t)},gd=function(e){let{rootClientId:t,clientId:n,isAppender:o,__experimentalInsertionIndex:r,onSelect:l,showInserterHelpPanel:i,showMostUsedBlocks:a,__experimentalFilterValue:c="",shouldFocusBlock:u=!0}=e;const[d,f]=(0,s.useState)(c),[g,v]=(0,s.useState)(null),[b,k]=(0,s.useState)(null),[_,y,E]=zu({rootClientId:t,clientId:n,isAppender:o,insertionIndex:r,shouldFocusBlock:u}),{showPatterns:C,hasReusableBlocks:S}=(0,m.useSelect)((e=>{var t;const{__experimentalGetAllowedPatterns:n,getSettings:o}=e(Vn);return{showPatterns:!!n(_).length,hasReusableBlocks:!(null===(t=o().__experimentalReusableBlocks)||void 0===t||!t.length)}}),[_]),w=(0,s.useCallback)(((e,t,n)=>{y(e,t,n),l()}),[y,l]),B=(0,s.useCallback)(((e,t)=>{y(e,{patternName:t}),l()}),[y,l]),I=(0,s.useCallback)((e=>{E(!!e),v(e)}),[E,v]),x=(0,s.useCallback)((e=>{k(e)}),[k]),T=(0,s.useMemo)((()=>(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:"block-editor-inserter__block-list"},(0,s.createElement)(xu,{rootClientId:_,onInsert:w,onHover:I,showMostUsedBlocks:a})),i&&(0,s.createElement)("div",{className:"block-editor-inserter__tips"},(0,s.createElement)(p.VisuallyHidden,{as:"h2"},(0,h.__)("A tip for using the block editor")),(0,s.createElement)(Va,null)))),[_,w,I,d,a,i]),N=(0,s.useMemo)((()=>(0,s.createElement)(od,{rootClientId:_,onInsert:B,onClickCategory:x,selectedCategory:b})),[_,B,x,b]),P=(0,s.useMemo)((()=>(0,s.createElement)(id,{rootClientId:_,onInsert:w,onHover:I})),[_,w,I]),M=(0,s.useCallback)((e=>"blocks"===e.name?T:"patterns"===e.name?N:P),[T,N,P]);return(0,s.createElement)("div",{className:"block-editor-inserter__menu"},(0,s.createElement)("div",{className:"block-editor-inserter__main-area"},(0,s.createElement)("div",{className:"block-editor-inserter__content"},(0,s.createElement)(p.SearchControl,{className:"block-editor-inserter__search",onChange:e=>{g&&v(null),f(e)},value:d,label:(0,h.__)("Search for blocks and patterns"),placeholder:(0,h.__)("Search")}),!!d&&(0,s.createElement)(dd,{filterValue:d,onSelect:l,onHover:I,rootClientId:t,clientId:n,isAppender:o,__experimentalInsertionIndex:r,showBlockDirectory:!0,shouldFocusBlock:u}),!d&&(C||S)&&(0,s.createElement)(hd,{showPatterns:C,showReusableBlocks:S},M),!d&&!C&&!S&&T)),i&&g&&(0,s.createElement)(mu,{item:g}))};function vd(e){let{onSelect:t,rootClientId:n,clientId:o,isAppender:r}=e;const[l,i]=(0,s.useState)(""),[a,u]=zu({onSelect:t,rootClientId:n,clientId:o,isAppender:r}),[d]=wu(a,u),[f]=Pu(u,a),g=f.length&&!!l,v=g&&f.length>6||d.length>6,{setInserterIsOpened:b,insertionIndex:k}=(0,m.useSelect)((e=>{const{getSettings:t,getBlockIndex:r,getBlockCount:l}=e(Vn),i=r(o,n);return{setInserterIsOpened:t().__experimentalSetIsInserterOpened,insertionIndex:-1===i?l():i}}),[o,n]);return(0,s.useEffect)((()=>{b&&b(!1)}),[b]),(0,s.createElement)("div",{className:c()("block-editor-inserter__quick-inserter",{"has-search":v,"has-expand":b})},v&&(0,s.createElement)(p.SearchControl,{className:"block-editor-inserter__search",value:l,onChange:e=>{i(e)},label:(0,h.__)("Search for blocks and patterns"),placeholder:(0,h.__)("Search")}),(0,s.createElement)("div",{className:"block-editor-inserter__quick-inserter-results"},(0,s.createElement)(dd,{filterValue:l,onSelect:t,rootClientId:n,clientId:o,isAppender:r,maxBlockPatterns:g?2:0,maxBlockTypes:6,isDraggable:!1})),b&&(0,s.createElement)(p.Button,{className:"block-editor-inserter__quick-inserter-expand",onClick:()=>{b({rootClientId:n,insertionIndex:k,filterValue:l})},"aria-label":(0,h.__)("Browse all. This will open the main inserter panel in the editor toolbar.")},(0,h.__)("Browse all")))}const bd=e=>{let t,{onToggle:n,disabled:o,isOpen:r,blockTitle:l,hasSingleBlockType:a,toggleProps:c={}}=e;t=a?(0,h.sprintf)(// translators: %s: the name of the block when there is only one
28
  (0,h._x)("Add %s","directly add the only allowed block"),l):(0,h._x)("Add block","Generic label for block inserter button");const{onClick:u,...d}=c;return(0,s.createElement)(p.Button,i({icon:Fa,label:t,tooltipPosition:"bottom",onClick:function(e){n&&n(e),u&&u(e)},className:"block-editor-inserter__toggle","aria-haspopup":!a&&"true","aria-expanded":!a&&r,disabled:o},d))};class kd extends s.Component{constructor(){super(...arguments),this.onToggle=this.onToggle.bind(this),this.renderToggle=this.renderToggle.bind(this),this.renderContent=this.renderContent.bind(this)}onToggle(e){const{onToggle:t}=this.props;t&&t(e)}renderToggle(e){let{onToggle:t,isOpen:n}=e;const{disabled:o,blockTitle:r,hasSingleBlockType:l,directInsertBlock:i,toggleProps:s,hasItems:a,renderToggle:c=bd}=this.props;return c({onToggle:t,isOpen:n,disabled:o||!a,blockTitle:r,hasSingleBlockType:l,directInsertBlock:i,toggleProps:s})}renderContent(e){let{onClose:t}=e;const{rootClientId:n,clientId:o,isAppender:r,showInserterHelpPanel:l,__experimentalIsQuick:i}=this.props;return i?(0,s.createElement)(vd,{onSelect:()=>{t()},rootClientId:n,clientId:o,isAppender:r}):(0,s.createElement)(gd,{onSelect:()=>{t()},rootClientId:n,clientId:o,isAppender:r,showInserterHelpPanel:l})}render(){const{position:e,hasSingleBlockType:t,directInsertBlock:n,insertOnlyAllowedBlock:o,__experimentalIsQuick:r,onSelectOrClose:l}=this.props;return t||null!=n&&n.length?this.renderToggle({onToggle:o}):(0,s.createElement)(p.Dropdown,{className:"block-editor-inserter",contentClassName:c()("block-editor-inserter__popover",{"is-quick":r}),position:e,onToggle:this.onToggle,expandOnMobile:!0,headerTitle:(0,h.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent,onClose:l})}}var _d=(0,d.compose)([(0,m.withSelect)(((e,t)=>{let{clientId:n,rootClientId:o}=t;const{getBlockRootClientId:l,hasInserterItems:i,__experimentalGetAllowedBlocks:s,__experimentalGetDirectInsertBlock:a}=e(Vn),{getBlockVariations:c}=e(r.store);o=o||l(n)||void 0;const d=s(o),p=a(o),m=1===(0,u.size)(d)&&0===(0,u.size)(c(d[0].name,"inserter"));let f=!1;return m&&(f=d[0]),{hasItems:i(o),hasSingleBlockType:m,blockTitle:f?f.title:"",allowedBlockType:f,directInsertBlock:p,rootClientId:o}})),(0,m.withDispatch)(((e,t,n)=>{let{select:o}=n;return{insertOnlyAllowedBlock(){const{rootClientId:n,clientId:l,isAppender:i,hasSingleBlockType:s,allowedBlockType:a,directInsertBlock:c,onSelectOrClose:u}=t;if(!(s||null!=c&&c.length))return;const{insertBlock:d}=e(Vn);d(null!=c&&c.length?(0,r.createBlock)(...c):(0,r.createBlock)(a.name),function(){const{getBlockIndex:e,getBlockSelectionEnd:t,getBlockOrder:r,getBlockRootClientId:s}=o(Vn);if(l)return e(l,n);const a=t();return!i&&a&&s(a)===n?e(a,n)+1:r(n).length}(),n),u&&u();const p=(0,h.sprintf)(// translators: %s: the name of the block that has been added
29
+ (0,h.__)("%s block added"),a.title);(0,Pt.speak)(p)}}})),(0,d.ifCondition)((e=>{let{hasItems:t,isAppender:n,rootClientId:o,clientId:r}=e;return t||!n&&!o&&!r}))])(kd),yd=(0,d.compose)((0,m.withSelect)(((e,t)=>{const{getBlockCount:n,getSettings:o,getTemplateLock:r}=e(Vn),l=!n(t.rootClientId),{bodyPlaceholder:i}=o();return{showPrompt:l,isLocked:!!r(t.rootClientId),placeholder:i}})),(0,m.withDispatch)(((e,t)=>{const{insertDefaultBlock:n,startTyping:o}=e(Vn);return{onAppend(){const{rootClientId:e}=t;n(void 0,e),o()}}})))((function(e){let{isLocked:t,onAppend:n,showPrompt:o,placeholder:r,rootClientId:l}=e;if(t)return null;const i=(0,Oa.decodeEntities)(r)||(0,h.__)("Type / to choose a block");return(0,s.createElement)("div",{"data-root-client-id":l||"",className:c()("block-editor-default-block-appender",{"has-visible-prompt":o})},(0,s.createElement)("p",{tabIndex:"0",role:"button","aria-label":(0,h.__)("Add default block"),className:"block-editor-default-block-appender__content",onKeyDown:e=>{va.ENTER!==e.keyCode&&va.SPACE!==e.keyCode||n()},onClick:()=>n(),onFocus:()=>{o&&n()}},o?i:"\ufeff"),(0,s.createElement)(_d,{rootClientId:l,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0}))}));function Ed(e,t){let{rootClientId:n,className:o,onFocus:r,tabIndex:l}=e;return(0,s.createElement)(_d,{position:"bottom center",rootClientId:n,__experimentalIsQuick:!0,renderToggle:e=>{let n,{onToggle:i,disabled:a,isOpen:u,blockTitle:d,hasSingleBlockType:m}=e;n=m?(0,h.sprintf)(// translators: %s: the name of the block when there is only one
30
+ (0,h._x)("Add %s","directly add the only allowed block"),d):(0,h._x)("Add block","Generic label for block inserter button");const f=!m;let g=(0,s.createElement)(p.Button,{ref:t,onFocus:r,tabIndex:l,className:c()(o,"block-editor-button-block-appender"),onClick:i,"aria-haspopup":f?"true":void 0,"aria-expanded":f?u:void 0,disabled:a,label:n},!m&&(0,s.createElement)(p.VisuallyHidden,{as:"span"},n),(0,s.createElement)(wo,{icon:Fa}));return(f||m)&&(g=(0,s.createElement)(p.Tooltip,{text:n},g)),g},isAppender:!0})}const Cd=(0,s.forwardRef)(((e,t)=>(Lt()("wp.blockEditor.ButtonBlockerAppender",{alternative:"wp.blockEditor.ButtonBlockAppender"}),Ed(e,t))));var Sd=(0,s.forwardRef)(Ed),wd=(0,m.withSelect)(((e,t)=>{let{rootClientId:n}=t;const{canInsertBlockType:o,getTemplateLock:l,getSelectedBlockClientId:i}=e(Vn);return{isLocked:!!l(n),canInsertDefaultBlock:o((0,r.getDefaultBlockName)(),n),selectedBlockClientId:i()}}))((function(e){let t,{rootClientId:n,canInsertDefaultBlock:o,isLocked:r,renderAppender:l,className:i,selectedBlockClientId:a,tagName:u="div"}=e;if(r||!1===l)return null;if(l)t=(0,s.createElement)(l,null);else{if(a!==n&&(n||a))return null;t=o?(0,s.createElement)(yd,{rootClientId:n}):(0,s.createElement)(Sd,{rootClientId:n,className:"block-list-appender__toggle"})}return(0,s.createElement)(u,{tabIndex:-1,className:c()("block-list-appender wp-block",i),"data-block":!0},t)}));function Bd(e){return(0,d.useRefEffect)((t=>{if(!e)return;function n(t){const{deltaX:n,deltaY:o}=t;e.current.scrollBy(n,o)}const o={passive:!0};return t.addEventListener("wheel",n,o),()=>{t.removeEventListener("wheel",n,o)}}),[e])}const Id=(0,s.createContext)();function xd(e){let{__unstablePopoverSlot:t,__unstableContentRef:n}=e;const{selectBlock:o,hideInsertionPoint:r}=(0,m.useDispatch)(Vn),l=(0,s.useContext)(Id),i=(0,s.useRef)(),{orientation:a,previousClientId:u,nextClientId:f,rootClientId:g,isInserterShown:v}=(0,m.useSelect)((e=>{var t;const{getBlockOrder:n,getBlockListSettings:o,getBlockInsertionPoint:r,isBlockBeingDragged:l,getPreviousBlockClientId:i,getNextBlockClientId:s}=e(Vn),a=r(),c=n(a.rootClientId);if(!c.length)return{};let u=c[a.index-1],d=c[a.index];for(;l(u);)u=i(u);for(;l(d);)d=s(d);return{previousClientId:u,nextClientId:d,orientation:(null===(t=o(a.rootClientId))||void 0===t?void 0:t.orientation)||"vertical",rootClientId:a.rootClientId,isInserterShown:null==a?void 0:a.__unstableWithInserter}}),[]),b=Ia(u),k=Ia(f),_="vertical"===a,y=(0,s.useMemo)((()=>{if(!b&&!k)return{};const e=b?b.getBoundingClientRect():null,t=k?k.getBoundingClientRect():null;if(_)return{width:b?b.offsetWidth:k.offsetWidth,height:t&&e?t.top-e.bottom:0};let n=0;return e&&t&&(n=(0,h.isRTL)()?e.left-t.right:t.left-e.right),{width:n,height:b?b.offsetHeight:k.offsetHeight}}),[b,k]),E=(0,s.useCallback)((()=>{if(!b&&!k)return{};const{ownerDocument:e}=b||k,t=b?b.getBoundingClientRect():null,n=k?k.getBoundingClientRect():null;return _?(0,h.isRTL)()?{top:t?t.bottom:n.top,left:t?t.right:n.right,right:t?t.left:n.left,bottom:n?n.top:t.bottom,ownerDocument:e}:{top:t?t.bottom:n.top,left:t?t.left:n.left,right:t?t.right:n.right,bottom:n?n.top:t.bottom,ownerDocument:e}:(0,h.isRTL)()?{top:t?t.top:n.top,left:t?t.left:n.right,right:n?n.right:t.left,bottom:t?t.bottom:n.bottom,ownerDocument:e}:{top:t?t.top:n.top,left:t?t.right:n.left,right:n?n.left:t.right,bottom:t?t.bottom:n.bottom,ownerDocument:e}}),[b,k]),C=Bd(n),S=(0,d.useReducedMotion)(),w=c()("block-editor-block-list__insertion-point","is-"+a),B=b&&k&&v,I={start:{..._?{height:0,left:"50%",right:"50%",y:0}:{width:0,top:"50%",bottom:"50%",x:0},opacity:0},rest:{..._?{height:4,left:0,right:0,y:-2}:{width:4,top:0,bottom:0,x:-2},opacity:1,borderRadius:"2px",transition:{delay:B?.4:0}},hover:{..._?{height:4,left:0,right:0,y:-2}:{width:4,top:0,bottom:0,x:-2},opacity:1,borderRadius:"2px",transition:{delay:.4}}},x={start:{scale:S?1:0},rest:{scale:1,transition:{delay:.2}}};return(0,s.createElement)(p.Popover,{ref:C,noArrow:!0,animate:!1,getAnchorRect:E,focusOnMount:!1,className:"block-editor-block-list__insertion-point-popover",__unstableSlotName:t||null,key:f+"--"+g},(0,s.createElement)(p.__unstableMotion.div,{layout:!S,initial:S?"rest":"start",animate:"rest",whileHover:"hover",whileTap:"pressed",exit:"start",ref:i,tabIndex:-1,onClick:function(e){e.target===i.current&&f&&o(f,-1)},onFocus:function(e){e.target!==i.current&&(l.current=!0)},className:c()(w,{"is-with-inserter":B}),onHoverEnd:function(e){e.target!==i.current||l.current||r()},style:y},(0,s.createElement)(p.__unstableMotion.div,{variants:I,className:"block-editor-block-list__insertion-point-indicator"}),B&&(0,s.createElement)(p.__unstableMotion.div,{variants:x,className:c()("block-editor-block-list__insertion-point-inserter")},(0,s.createElement)(_d,{position:"bottom center",clientId:f,rootClientId:g,__experimentalIsQuick:!0,onToggle:e=>{l.current=e},onSelectOrClose:()=>{l.current=!1}}))))}function Td(e){let{children:t,__unstablePopoverSlot:n,__unstableContentRef:o}=e;const r=(0,m.useSelect)((e=>e(Vn).isBlockInsertionPointVisible()),[]);return(0,s.createElement)(Id.Provider,{value:(0,s.useRef)(!1)},r&&(0,s.createElement)(xd,{__unstablePopoverSlot:n,__unstableContentRef:o}),t)}function Nd(){const e=(0,s.useContext)(Id),t=(0,m.useSelect)((e=>e(Vn).getSettings().hasReducedUI),[]),{getBlockListSettings:n,getBlockRootClientId:o,getBlockIndex:r,isBlockInsertionPointVisible:l,isMultiSelecting:i,getSelectedBlockClientIds:a,getTemplateLock:c}=(0,m.useSelect)(Vn),{showInsertionPoint:u,hideInsertionPoint:p}=(0,m.useDispatch)(Vn);return(0,d.useRefEffect)((o=>{if(!t)return o.addEventListener("mousemove",s),()=>{o.removeEventListener("mousemove",s)};function s(t){var o,s;if(e.current)return;if(i())return;if(!t.target.classList.contains("block-editor-block-list__layout"))return void(l()&&p());let d;if(t.target.classList.contains("is-root-container")||(d=(t.target.getAttribute("data-block")?t.target:t.target.closest("[data-block]")).getAttribute("data-block")),c(d))return;const m=(null===(o=n(d))||void 0===o?void 0:o.orientation)||"vertical",f=t.target.getBoundingClientRect(),h=t.clientY-f.top,g=t.clientX-f.left;let v=Array.from(t.target.children).find((e=>e.classList.contains("wp-block")&&"vertical"===m&&e.offsetTop>h||e.classList.contains("wp-block")&&"horizontal"===m&&e.offsetLeft>g));if(!v)return;if(!v.id&&(v=v.firstElementChild,!v))return;if(null===(s=v.parentElement)||void 0===s?void 0:s.closest(".block-editor-block-content-overlay.overlay-active"))return;const b=v.id.slice("block-".length);if(!b)return;if(a().includes(b))return;const k=v.getBoundingClientRect();if("horizontal"===m&&(t.clientY>k.bottom||t.clientY<k.top)||"vertical"===m&&(t.clientX>k.right||t.clientX<k.left))return void(l()&&p());const _=r(b,d);0!==_?u(d,_,{__unstableWithInserter:!0}):l()&&p()}}),[e,n,o,r,l,i,u,p,a])}const Pd="undefined"==typeof window?e=>{setTimeout((()=>e(Date.now())),0)}:window.requestIdleCallback||window.requestAnimationFrame,Md="undefined"==typeof window?clearTimeout:window.cancelIdleCallback||window.cancelAnimationFrame;function Rd(e){return(0,m.useSelect)((t=>{if(!e)return null;const{getBlockName:n,getBlockAttributes:o}=t(Vn),{getBlockType:l,getActiveBlockVariation:i}=t(r.store),s=n(e),a=l(s);if(!a)return null;const c=o(e),u=i(s,c),d={title:a.title,icon:a.icon,description:a.description,anchor:null==c?void 0:c.anchor};return u?{title:u.title||a.title,icon:u.icon||a.icon,description:u.description||a.description}:d}),[e])}function Ld(e){let{clientId:t}=e;const{attributes:n,name:o,reusableBlockTitle:l}=(0,m.useSelect)((e=>{if(!t)return{};const{getBlockName:n,getBlockAttributes:o,__experimentalGetReusableBlockTitle:l}=e(Vn),i=n(t);if(!i)return{};const s=(0,r.isReusableBlock)((0,r.getBlockType)(i));return{attributes:o(t),name:i,reusableBlockTitle:s&&l(o(t).ref)}}),[t]),i=Rd(t);if(!o||!i)return null;const s=(0,r.getBlockType)(o),a=s?(0,r.__experimentalGetBlockLabel)(s,n):null,c=l||a;return c&&c!==s.title?(0,u.truncate)(c,{length:35}):i.title}var Ad=e=>{let{children:t,clientIds:n,cloneClassname:o,onDragStart:l,onDragEnd:i}=e;const{srcRootClientId:a,isDraggable:c,icon:u}=(0,m.useSelect)((e=>{var t;const{getBlockRootClientId:o,getTemplateLock:l,getBlockName:i}=e(Vn),s=o(n[0]),a=s?l(s):null,c=i(n[0]);return{srcRootClientId:s,isDraggable:"all"!==a,icon:null===(t=(0,r.getBlockType)(c))||void 0===t?void 0:t.icon}}),[n]),d=(0,s.useRef)(!1),[f,h,g]=function(){const e=(0,s.useRef)(null),t=(0,s.useRef)(null),n=(0,s.useRef)(null),o=(0,s.useRef)(null);return(0,s.useEffect)((()=>()=>{o.current&&(clearInterval(o.current),o.current=null)}),[]),[(0,s.useCallback)((r=>{e.current=r.clientY,n.current=(0,rr.getScrollContainer)(r.target),o.current=setInterval((()=>{if(n.current&&t.current){const e=n.current.scrollTop+t.current;n.current.scroll({top:e})}}),25)}),[]),(0,s.useCallback)((o=>{if(!n.current)return;const r=n.current.offsetHeight,l=e.current-n.current.offsetTop,i=o.clientY-n.current.offsetTop;if(o.clientY>l){const e=Math.max(r-l-50,0),n=Math.max(i-l-50,0)/e;t.current=25*n}else if(o.clientY<l){const e=Math.max(l-50,0),n=Math.max(l-i-50,0)/e;t.current=-25*n}else t.current=0}),[]),()=>{e.current=null,n.current=null,o.current&&(clearInterval(o.current),o.current=null)}]}(),{startDraggingBlocks:v,stopDraggingBlocks:b}=(0,m.useDispatch)(Vn);if((0,s.useEffect)((()=>()=>{d.current&&b()}),[]),!c)return t({isDraggable:!1});const k={type:"block",srcClientIds:n,srcRootClientId:a};return(0,s.createElement)(p.Draggable,{cloneClassname:o,__experimentalTransferDataType:"wp-blocks",transferData:k,onDragStart:e=>{v(n),d.current=!0,f(e),l&&l()},onDragOver:h,onDragEnd:()=>{b(),d.current=!1,g(),i&&i()},__experimentalDragComponent:(0,s.createElement)(vu,{count:n.length,icon:u})},(e=>{let{onDraggableStart:n,onDraggableEnd:o}=e;return t({draggable:!0,onDragStart:n,onDragEnd:o})}))},Dd=function(e){let{clientId:t,rootClientId:n,blockElement:o}=e;const l=Rd(t),a=(0,m.useSelect)((e=>{var o;const{getBlock:r,getBlockIndex:l,hasBlockMovingClientId:i,getBlockListSettings:s}=e(Vn),a=l(t,n),{name:c,attributes:u}=r(t);return{index:a,name:c,attributes:u,blockMovingMode:i(),orientation:null===(o=s(n))||void 0===o?void 0:o.orientation}}),[t,n]),{index:u,name:d,attributes:f,blockMovingMode:g,orientation:v}=a,{setNavigationMode:b,removeBlock:k}=(0,m.useDispatch)(Vn),_=(0,s.useRef)(),y=(0,r.getBlockType)(d),E=(0,r.__experimentalGetAccessibleBlockLabel)(y,f,u+1,v);(0,s.useEffect)((()=>{_.current.focus(),(0,Pt.speak)(E)}),[E]);const{hasBlockMovingClientId:C,getBlockIndex:S,getBlockRootClientId:w,getClientIdsOfDescendants:B,getSelectedBlockClientId:I,getMultiSelectedBlocksEndClientId:x,getPreviousBlockClientId:T,getNextBlockClientId:N,isNavigationMode:P}=(0,m.useSelect)(Vn),{selectBlock:M,clearSelectedBlock:R,setBlockMovingClientId:L,moveBlockToPosition:A}=(0,m.useDispatch)(Vn),D=c()("block-editor-block-list__block-selection-button",{"is-block-moving-mode":!!g}),O=(0,h.__)("Drag");return(0,s.createElement)("div",{className:D},(0,s.createElement)(p.Flex,{justify:"center",className:"block-editor-block-list__block-selection-button__content"},(0,s.createElement)(p.FlexItem,null,(0,s.createElement)(Ua,{icon:null==l?void 0:l.icon,showColors:!0})),(0,s.createElement)(p.FlexItem,null,(0,s.createElement)(Ad,{clientIds:[t]},(e=>(0,s.createElement)(p.Button,i({icon:gu,className:"block-selection-button_drag-handle","aria-hidden":"true",label:O,tabIndex:"-1"},e))))),(0,s.createElement)(p.FlexItem,null,(0,s.createElement)(p.Button,{ref:_,onClick:()=>b(!1),onKeyDown:function(e){const{keyCode:n}=e,r=n===va.UP,l=n===va.DOWN,i=n===va.LEFT,s=n===va.RIGHT,a=n===va.TAB,c=n===va.ESCAPE,u=n===va.ENTER,d=n===va.SPACE,p=e.shiftKey;if(n===va.BACKSPACE||n===va.DELETE)return k(t),void e.preventDefault();const m=I(),f=x(),h=T(f||m),g=N(f||m),v=a&&p||r,b=a&&!p||l,_=i,y=s;let E;if(v)E=h;else if(b)E=g;else if(_){var D;E=null!==(D=w(m))&&void 0!==D?D:m}else if(y){var O;E=null!==(O=B([m])[0])&&void 0!==O?O:m}const F=C();if(c&&P()&&(R(),e.preventDefault()),c&&F&&!e.defaultPrevented&&(L(null),e.preventDefault()),(u||d)&&F){const e=w(F),t=w(m),n=S(F,e);let o=S(m,t);n<o&&e===t&&(o-=1),A(F,e,t,o),M(F),L(null)}if(b||v||_||y)if(E)e.preventDefault(),M(E);else if(a&&m){let t;b?(t=rr.focus.tabbable.findNext(o),t||(t=o.ownerDocument.defaultView.frameElement,t=rr.focus.tabbable.findNext(t))):t=rr.focus.tabbable.findPrevious(o),t&&(e.preventDefault(),t.focus(),R())}},label:E,className:"block-selection-button_select-button"},(0,s.createElement)(Ld,{clientId:t})))))};function Od(e){return Array.from(e.querySelectorAll("[data-toolbar-item]"))}var Fd=function(e){let{children:t,focusOnMount:n,__experimentalInitialIndex:o,__experimentalOnIndexChange:r,...l}=e;const a=(0,s.useRef)(),c=function(e){const[t,n]=(0,s.useState)(!0),o=(0,s.useCallback)((()=>{const t=!rr.focus.tabbable.find(e.current).some((e=>!("toolbarItem"in e.dataset)));t||Lt()("Using custom components as toolbar controls",{since:"5.6",alternative:"ToolbarItem, ToolbarButton or ToolbarDropdownMenu components",link:"https://developer.wordpress.org/block-editor/components/toolbar-button/#inside-blockcontrols"}),n(t)}),[]);return(0,s.useLayoutEffect)((()=>{const t=new window.MutationObserver(o);return t.observe(e.current,{childList:!0,subtree:!0}),()=>t.disconnect()}),[t]),t}(a);return function(e,t,n,o,r){const[l]=(0,s.useState)(t),[i]=(0,s.useState)(o),a=(0,s.useCallback)((()=>{!function(e){const[t]=rr.focus.tabbable.find(e);t&&t.focus()}(e.current)}),[]);(0,tc.useShortcut)("core/block-editor/focus-toolbar",a),(0,s.useEffect)((()=>{l&&a()}),[n,l,a]),(0,s.useEffect)((()=>{let t=0;return i&&!l&&(t=window.requestAnimationFrame((()=>{const t=Od(e.current),n=i||0;var o;t[n]&&(o=e.current).contains(o.ownerDocument.activeElement)&&t[n].focus()}))),()=>{if(window.cancelAnimationFrame(t),!r||!e.current)return;const n=Od(e.current).findIndex((e=>0===e.tabIndex));r(n)}}),[i,l])}(a,n,c,o,r),c?(0,s.createElement)(p.Toolbar,i({label:l["aria-label"],ref:a},l),t):(0,s.createElement)(p.NavigableMenu,i({orientation:"horizontal",role:"toolbar",ref:a},l),t)},zd=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})),Vd=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})),Hd=(0,s.createElement)(F.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(F.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})),Ud=(0,s.createElement)(F.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(F.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));const Gd=(e,t)=>"up"===e?"horizontal"===t?(0,h.isRTL)()?zd:Vd:Hd:"down"===e?"horizontal"===t?(0,h.isRTL)()?Vd:zd:Ud:null,Wd=(e,t)=>"up"===e?"horizontal"===t?(0,h.isRTL)()?(0,h.__)("Move right"):(0,h.__)("Move left"):(0,h.__)("Move up"):"down"===e?"horizontal"===t?(0,h.isRTL)()?(0,h.__)("Move left"):(0,h.__)("Move right"):(0,h.__)("Move down"):null,$d=(0,s.forwardRef)(((e,t)=>{let{clientIds:n,direction:o,orientation:l,...a}=e;const f=(0,d.useInstanceId)($d),g=(0,u.castArray)(n).length,{blockType:v,isDisabled:b,rootClientId:k,isFirst:_,isLast:y,firstIndex:E,orientation:C="vertical"}=(0,m.useSelect)((e=>{const{getBlockIndex:t,getBlockRootClientId:i,getBlockOrder:s,getBlock:a,getBlockListSettings:c}=e(Vn),d=(0,u.castArray)(n),p=(0,u.first)(d),m=i(p),f=t(p,m),h=t((0,u.last)(d),m),g=s(m),v=a(p),b=0===f,k=h===g.length-1,{orientation:_}=c(m)||{};return{blockType:v?(0,r.getBlockType)(v.name):null,isDisabled:"up"===o?b:k,rootClientId:m,firstIndex:f,isFirst:b,isLast:k,orientation:l||_}}),[n,o]),{moveBlocksDown:S,moveBlocksUp:w}=(0,m.useDispatch)(Vn),B="up"===o?w:S,I=`block-editor-block-mover-button__description-${f}`;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.Button,i({ref:t,className:c()("block-editor-block-mover-button",`is-${o}-button`),icon:Gd(o,C),label:Wd(o,C),"aria-describedby":I},a,{onClick:b?null:e=>{B(n,k),a.onClick&&a.onClick(e)},"aria-disabled":b})),(0,s.createElement)("span",{id:I,className:"block-editor-block-mover-button__description"},function(e,t,n,o,r,l,i){const s=n+1,a=e=>"up"===e?"horizontal"===i?(0,h.isRTL)()?"right":"left":"up":"down"===e?"horizontal"===i?(0,h.isRTL)()?"left":"right":"down":null;if(e>1)return function(e,t,n,o,r){const l=t+1;return r<0&&n?(0,h.__)("Blocks cannot be moved up as they are already at the top"):r>0&&o?(0,h.__)("Blocks cannot be moved down as they are already at the bottom"):r<0&&!n?(0,h.sprintf)(// translators: 1: Number of selected blocks, 2: Position of selected blocks
31
  (0,h._n)("Move %1$d block from position %2$d up by one place","Move %1$d blocks from position %2$d up by one place",e),e,l):r>0&&!o?(0,h.sprintf)(// translators: 1: Number of selected blocks, 2: Position of selected blocks
32
  (0,h._n)("Move %1$d block from position %2$d down by one place","Move %1$d blocks from position %2$d down by one place",e),e,l):void 0}(e,n,o,r,l);if(o&&r)return(0,h.sprintf)(// translators: %s: Type of block (i.e. Text, Image etc)
33
  (0,h.__)("Block %s is the only block, and cannot be moved"),t);if(l>0&&!r){const e=a("down");if("down"===e)return(0,h.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
55
  (0,h._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",r.length),r.length);n(l,{type:"snackbar"})}),[])}function Cp(){const{getBlocksByClientId:e,getSelectedBlockClientIds:t,hasMultiSelection:n,getSettings:o}=(0,m.useSelect)(Vn),{flashBlock:l,removeBlocks:i,replaceBlocks:s}=(0,m.useDispatch)(Vn),a=Ep();return(0,d.useRefEffect)((c=>{function u(u){const d=t();if(0===d.length)return;if(!n()){const{target:e}=u,{ownerDocument:t}=e;if("copy"===u.type||"cut"===u.type?(0,rr.documentHasUncollapsedSelection)(t):(0,rr.documentHasSelection)(t))return}if(!c.contains(u.target.ownerDocument.activeElement))return;const p=u.defaultPrevented;if(u.preventDefault(),"copy"===u.type||"cut"===u.type){1===d.length&&l(d[0]),a(u.type,d);const t=e(d),n=(0,r.serialize)(t);u.clipboardData.setData("text/plain",n),u.clipboardData.setData("text/html",n)}if("cut"===u.type)i(d);else if("paste"===u.type){if(p)return;const{__experimentalCanUserUseUnfilteredHTML:e}=o(),{plainText:t,html:n}=function(e){let{clipboardData:t}=e,n="",o="";try{n=t.getData("text/plain"),o=t.getData("text/html")}catch(e){try{o=t.getData("Text")}catch(e){return}}const r=(0,rr.getFilesFromDataTransfer)(t).filter((e=>{let{type:t}=e;return/^image\/(?:jpe?g|png|gif|webp)$/.test(t)}));return r.length&&!o&&(o=r.map((e=>`<img src="${(0,yp.createBlobURL)(e)}">`)).join(""),n=""),{html:o,plainText:n}}(u),l=(0,r.pasteHandler)({HTML:n,plainText:t,mode:"BLOCKS",canUserUseUnfilteredHTML:e});s(d,l,l.length-1,-1)}}return c.ownerDocument.addEventListener("copy",u),c.ownerDocument.addEventListener("cut",u),c.ownerDocument.addEventListener("paste",u),()=>{c.ownerDocument.removeEventListener("copy",u),c.ownerDocument.removeEventListener("cut",u),c.ownerDocument.removeEventListener("paste",u)}}),[])}var Sp=function(e){let{children:t}=e;return(0,s.createElement)("div",{ref:Cp()},t)};function wp(e){let{clientIds:t,children:n,__experimentalUpdateSelection:o}=e;const{canInsertBlockType:l,getBlockRootClientId:i,getBlocksByClientId:s,canMoveBlocks:a,canRemoveBlocks:c}=(0,m.useSelect)(Vn),{getDefaultBlockName:d,getGroupingBlockName:p}=(0,m.useSelect)(r.store),f=s(t),h=i(t[0]),g=(0,u.every)(f,(e=>!!e&&(0,r.hasBlockSupport)(e.name,"multiple",!0)&&l(e.name,h))),v=l(d(),h),b=a(t,h),k=c(t,h),{removeBlocks:_,replaceBlocks:y,duplicateBlocks:E,insertAfterBlock:C,insertBeforeBlock:S,flashBlock:w,setBlockMovingClientId:B,setNavigationMode:I,selectBlock:x}=(0,m.useDispatch)(Vn),T=Ep();return n({canDuplicate:g,canInsertDefaultBlock:v,canMove:b,canRemove:k,rootClientId:h,blocks:f,onDuplicate:()=>E(t,o),onRemove:()=>_(t,o),onInsertBefore(){S((0,u.first)((0,u.castArray)(t)))},onInsertAfter(){C((0,u.last)((0,u.castArray)(t)))},onMoveTo(){I(!0),x(t[0]),B(t[0])},onGroup(){if(!f.length)return;const e=p(),n=(0,r.switchToBlockType)(f,e);n&&y(t,n)},onUngroup(){if(!f.length)return;const e=f[0].innerBlocks;e.length&&y(t,e)},onCopy(){const e=f.map((e=>{let{clientId:t}=e;return t}));1===f.length&&w(e[0]),T("copy",e)}})}var Bp=(0,d.compose)([(0,m.withSelect)(((e,t)=>{let{clientId:n}=t;const{getBlock:o,getBlockMode:l,getSettings:i}=e(Vn),s=o(n),a=i().codeEditingEnabled;return{mode:l(n),blockType:s?(0,r.getBlockType)(s.name):null,isCodeEditingEnabled:a}})),(0,m.withDispatch)(((e,t)=>{let{onToggle:n=u.noop,clientId:o}=t;return{onToggleMode(){e(Vn).toggleBlockMode(o),n()}}}))])((function(e){let{blockType:t,mode:n,onToggleMode:o,small:l=!1,isCodeEditingEnabled:i=!0}=e;if(!(0,r.hasBlockSupport)(t,"html",!0)||!i)return null;const a="visual"===n?(0,h.__)("Edit as HTML"):(0,h.__)("Edit visually");return(0,s.createElement)(p.MenuItem,{onClick:o},!l&&a)})),Ip=(0,d.compose)((0,m.withSelect)(((e,t)=>{let{clientId:n}=t;const o=e(Vn).getBlock(n);return{block:o,shouldRender:o&&"core/html"===o.name}})),(0,m.withDispatch)(((e,t)=>{let{block:n}=t;return{onClick:()=>e(Vn).replaceBlocks(n.clientId,(0,r.rawHandler)({HTML:(0,r.getBlockContent)(n)}))}})))((function(e){let{shouldRender:t,onClick:n,small:o}=e;if(!t)return null;const r=(0,h.__)("Convert to Blocks");return(0,s.createElement)(p.MenuItem,{onClick:n},!o&&r)}));const{Fill:xp,Slot:Tp}=(0,p.createSlotFill)("__unstableBlockSettingsMenuFirstItem");xp.Slot=Tp;var Np=xp;function Pp(e){let{clientIds:t,isGroupable:n,isUngroupable:o,blocksSelection:l,groupingBlockName:i,onClose:a=(()=>{})}=e;const{replaceBlocks:c}=(0,m.useDispatch)(Vn);return n||o?(0,s.createElement)(s.Fragment,null,n&&(0,s.createElement)(p.MenuItem,{onClick:()=>{(()=>{const e=(0,r.switchToBlockType)(l,i);e&&c(t,e)})(),a()}},(0,h._x)("Group","verb")),o&&(0,s.createElement)(p.MenuItem,{onClick:()=>{(()=>{const e=l[0].innerBlocks;e.length&&c(t,e)})(),a()}},(0,h._x)("Ungroup","Ungrouping blocks from within a Group block back into individual blocks within the Editor "))):null}const{Fill:Mp,Slot:Rp}=(0,p.createSlotFill)("BlockSettingsMenuControls");function Lp(e){let{...t}=e;return(0,s.createElement)(p.__experimentalStyleProvider,{document:document},(0,s.createElement)(Mp,t))}Lp.Slot=e=>{let{fillProps:t,clientIds:n=null}=e;const{selectedBlocks:o,selectedClientIds:l}=(0,m.useSelect)((e=>{const{getBlocksByClientId:t,getSelectedBlockClientIds:o}=e(Vn),r=null!==n?n:o();return{selectedBlocks:(0,u.map)((0,u.compact)(t(r)),(e=>e.name)),selectedClientIds:r}}),[n]),a=function(){const{clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:o,groupingBlockName:l}=(0,m.useSelect)((e=>{var t;const{getBlockRootClientId:n,getBlocksByClientId:o,canInsertBlockType:l,getSelectedBlockClientIds:i}=e(Vn),{getGroupingBlockName:s}=e(r.store),a=i(),c=s(),u=l(c,null!=a&&a.length?n(a[0]):void 0),d=o(a),p=1===d.length&&(null===(t=d[0])||void 0===t?void 0:t.name)===c;return{clientIds:a,isGroupable:u&&d.length&&!p,isUngroupable:p&&!!d[0].innerBlocks.length,blocksSelection:d,groupingBlockName:c}}),[]);return{clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:o,groupingBlockName:l}}(),{isGroupable:c,isUngroupable:d}=a,f=c||d;return(0,s.createElement)(Rp,{fillProps:{...t,selectedBlocks:o,selectedClientIds:l}},(e=>{if((null==e?void 0:e.length)>0||f)return(0,s.createElement)(p.MenuGroup,null,e,(0,s.createElement)(Pp,i({},a,{onClose:null==t?void 0:t.onClose})))}))};var Ap=Lp;const Dp={className:"block-editor-block-settings-menu__popover",position:"bottom right",isAlternate:!0};function Op(e){let{blocks:t,onCopy:n}=e;const o=(0,d.useCopyToClipboard)((()=>(0,r.serialize)(t)),n);return(0,s.createElement)(p.MenuItem,{ref:o},(0,h.__)("Copy"))}var Fp=function(e){let{clientIds:t,__experimentalSelectBlock:n,children:o,...l}=e;const a=(0,u.castArray)(t),c=a.length,d=a[0],{onlyBlock:f,title:g}=(0,m.useSelect)((e=>{var t;const{getBlockCount:n,getBlockName:o}=e(Vn),{getBlockType:l}=e(r.store);return{onlyBlock:1===n(),title:null===(t=l(o(d)))||void 0===t?void 0:t.title}}),[d]),v=(0,m.useSelect)((e=>{const{getShortcutRepresentation:t}=e(tc.store);return{duplicate:t("core/block-editor/duplicate"),remove:t("core/block-editor/remove"),insertAfter:t("core/block-editor/insert-after"),insertBefore:t("core/block-editor/insert-before")}}),[]),b=(0,s.useCallback)(n?async e=>{const t=await e;t&&t[0]&&n(t[0])}:u.noop,[n]),k=(0,h.sprintf)(
56
  /* translators: %s: block name */
57
  (0,h.__)("Remove %s"),g),_=1===c?k:(0,h.__)("Remove blocks");return(0,s.createElement)(wp,{clientIds:t,__experimentalUpdateSelection:!n},(e=>{let{canDuplicate:n,canInsertDefaultBlock:r,canMove:a,canRemove:m,onDuplicate:g,onInsertAfter:k,onInsertBefore:y,onRemove:E,onCopy:C,onMoveTo:S,blocks:w}=e;return(0,s.createElement)(p.DropdownMenu,i({icon:_p,label:(0,h.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:Dp,noIcons:!0},l),(e=>{let{onClose:l}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.MenuGroup,null,(0,s.createElement)(Np.Slot,{fillProps:{onClose:l}}),1===c&&(0,s.createElement)(Ip,{clientId:d}),(0,s.createElement)(Op,{blocks:w,onCopy:C}),n&&(0,s.createElement)(p.MenuItem,{onClick:(0,u.flow)(l,g,b),shortcut:v.duplicate},(0,h.__)("Duplicate")),r&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.MenuItem,{onClick:(0,u.flow)(l,y),shortcut:v.insertBefore},(0,h.__)("Insert before")),(0,s.createElement)(p.MenuItem,{onClick:(0,u.flow)(l,k),shortcut:v.insertAfter},(0,h.__)("Insert after"))),a&&!f&&(0,s.createElement)(p.MenuItem,{onClick:(0,u.flow)(l,S)},(0,h.__)("Move to")),1===c&&(0,s.createElement)(Bp,{clientId:d,onToggle:l})),(0,s.createElement)(Ap.Slot,{fillProps:{onClose:l},clientIds:t}),"function"==typeof o?o({onClose:l}):s.Children.map((e=>(0,s.cloneElement)(e,{onClose:l}))),m&&(0,s.createElement)(p.MenuGroup,null,(0,s.createElement)(p.MenuItem,{onClick:(0,u.flow)(l,E,b),shortcut:v.remove},_)))}))}))},zp=function(e){let{clientIds:t,...n}=e;return(0,s.createElement)(p.ToolbarGroup,null,(0,s.createElement)(p.ToolbarItem,null,(e=>(0,s.createElement)(Fp,i({clientIds:t,toggleProps:e},n)))))};function Vp(e){let{hideDragHandle:t}=e;const{blockClientIds:n,blockClientId:o,blockType:l,hasFixedToolbar:a,hasReducedUI:u,isValid:f,isVisual:h}=(0,m.useSelect)((e=>{const{getBlockName:t,getBlockMode:n,getSelectedBlockClientIds:o,isBlockValid:l,getBlockRootClientId:i,getSettings:s}=e(Vn),a=o(),c=a[0],u=i(c),d=s();return{blockClientIds:a,blockClientId:c,blockType:c&&(0,r.getBlockType)(t(c)),hasFixedToolbar:d.hasFixedToolbar,hasReducedUI:d.hasReducedUI,rootClientId:u,isValid:a.every((e=>l(e))),isVisual:a.every((e=>"visual"===n(e)))}}),[]),{toggleBlockHighlight:g}=(0,m.useDispatch)(Vn),v=(0,s.useRef)(),{showMovers:b,gestures:k}=Jd({ref:v,onChange(e){e&&u||g(o,e)}}),_=(0,d.useViewportMatch)("medium","<")||a;if(l&&!(0,r.hasBlockSupport)(l,"__experimentalToolbar",!0))return null;const y=_||b;if(0===n.length)return null;const E=f&&h,C=n.length>1,S=c()("block-editor-block-toolbar",y&&"is-showing-movers");return(0,s.createElement)("div",{className:S},!C&&!_&&(0,s.createElement)(ep,{clientIds:n}),(0,s.createElement)("div",i({ref:v},k),(E||C)&&(0,s.createElement)(p.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls"},(0,s.createElement)(kp,{clientIds:n}),(0,s.createElement)(qd,{clientIds:n,hideDragHandle:t||u}))),E&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Zn.Slot,{group:"parent",className:"block-editor-block-toolbar__slot"}),(0,s.createElement)(Zn.Slot,{group:"block",className:"block-editor-block-toolbar__slot"}),(0,s.createElement)(Zn.Slot,{className:"block-editor-block-toolbar__slot"}),(0,s.createElement)(Zn.Slot,{group:"inline",className:"block-editor-block-toolbar__slot"}),(0,s.createElement)(Zn.Slot,{group:"other",className:"block-editor-block-toolbar__slot"})),(0,s.createElement)(zp,{clientIds:n}))}var Hp=function(e){let{focusOnMount:t,isFixed:n,...o}=e;const{blockType:l,hasParents:a,showParentSelector:u}=(0,m.useSelect)((e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientIds:o}=e(Vn),{getBlockType:l}=e(r.store),i=o(),s=i[0],a=n(s),c=l(t(a[a.length-1]));return{blockType:s&&l(t(s)),hasParents:a.length,showParentSelector:(0,r.hasBlockSupport)(c,"__experimentalParentSelector",!0)&&i.length<=1}}),[]);if(l&&!(0,r.hasBlockSupport)(l,"__experimentalToolbar",!0))return null;const d=c()("block-editor-block-contextual-toolbar",{"has-parent":a&&u,"is-fixed":n});return(0,s.createElement)(Fd,i({focusOnMount:t,className:d
58
+ /* translators: accessibility text for the block toolbar */,"aria-label":(0,h.__)("Block tools")},o),(0,s.createElement)(Vp,{hideDragHandle:n}))};function Up(e){const{isNavigationMode:t,isMultiSelecting:n,hasMultiSelection:o,isTyping:r,isCaretWithinFormattedText:l,getSettings:i,getLastMultiSelectedBlockClientId:s}=e(Vn);return{isNavigationMode:t(),isMultiSelecting:n(),isTyping:r(),isCaretWithinFormattedText:l(),hasMultiSelection:o(),hasFixedToolbar:i().hasFixedToolbar,lastClientId:s()}}function Gp(e){let{clientId:t,rootClientId:n,isValid:o,isEmptyDefaultBlock:r,capturingClientId:l,__unstablePopoverSlot:i,__unstableContentRef:a}=e;const{isNavigationMode:u,isMultiSelecting:f,isTyping:h,isCaretWithinFormattedText:g,hasMultiSelection:v,hasFixedToolbar:b,lastClientId:k}=(0,m.useSelect)(Up,[]),_=(0,m.useSelect)((e=>{const{isBlockInsertionPointVisible:n,getBlockInsertionPoint:o,getBlockOrder:r}=e(Vn);if(!n())return!1;const l=o();return r(l.rootClientId)[l.index]===t}),[t]),y=(0,d.useViewportMatch)("medium"),[E,C]=(0,s.useState)(!1),[S,w]=(0,s.useState)(!1),{stopTyping:B}=(0,m.useDispatch)(Vn),I=!h&&!u&&r&&o,x=u,T=!u&&!b&&y&&!I&&!f&&(!h||g),N=!(u||T||b||r);(0,tc.useShortcut)("core/block-editor/focus-toolbar",(()=>{C(!0),B(!0)}),{isDisabled:!N}),(0,s.useEffect)((()=>{T||C(!1)}),[T]);const P=(0,s.useRef)(),M=Ia(t),R=Ia(k),L=Ia(l),A=Bd(a);if(!(x||T||E||I))return null;let D=M;if(!D)return null;l&&(D=L);let O=D;if(v){if(!R)return null;O={top:D,bottom:R}}const F=I?"top left right":"top right left",{ownerDocument:z}=D,V=I?void 0:z.defaultView.frameElement||(0,rr.getScrollContainer)(D)||z.body;return(0,s.createElement)(p.Popover,{ref:A,noArrow:!0,animate:!1,position:F,focusOnMount:!1,anchorRef:O,className:c()("block-editor-block-list__block-popover",{"is-insertion-point-visible":_}),__unstableStickyBoundaryElement:V,__unstableSlotName:i||null,__unstableBoundaryParent:!0,__unstableObserveElement:D,shouldAnchorIncludePadding:!0,__unstableEditorCanvasWrapper:null==a?void 0:a.current},(T||E)&&(0,s.createElement)("div",{onFocus:function(){w(!0)},onBlur:function(){w(!1)},tabIndex:-1,className:c()("block-editor-block-list__block-popover-inserter",{"is-visible":S})},(0,s.createElement)(_d,{clientId:t,rootClientId:n,__experimentalIsQuick:!0})),(T||E)&&(0,s.createElement)(Hp,{focusOnMount:E,__experimentalInitialIndex:P.current,__experimentalOnIndexChange:e=>{P.current=e},key:t}),x&&(0,s.createElement)(Dd,{clientId:t,rootClientId:n,blockElement:D}),I&&(0,s.createElement)("div",{className:"block-editor-block-list__empty-block-inserter"},(0,s.createElement)(_d,{position:"bottom right",rootClientId:n,clientId:t,__experimentalIsQuick:!0})))}function Wp(e){const{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:n,getBlockRootClientId:o,getBlock:l,getBlockParents:i,__experimentalGetBlockListSettingsForBlocks:s}=e(Vn),a=t()||n();if(!a)return;const{name:c,attributes:d={},isValid:p}=l(a)||{},m=i(a),f=s(m),h=(0,u.find)(m,(e=>{var t;return null===(t=f[e])||void 0===t?void 0:t.__experimentalCaptureToolbars}));return{clientId:a,rootClientId:o(a),name:c,isValid:p,isEmptyDefaultBlock:c&&(0,r.isUnmodifiedDefaultBlock)({name:c,attributes:d}),capturingClientId:h}}function $p(e){let{__unstablePopoverSlot:t,__unstableContentRef:n}=e;const o=(0,m.useSelect)(Wp,[]);if(!o)return null;const{clientId:r,rootClientId:l,name:i,isValid:a,isEmptyDefaultBlock:c,capturingClientId:u}=o;return i?(0,s.createElement)(Gp,{clientId:r,rootClientId:l,isValid:a,isEmptyDefaultBlock:c,capturingClientId:u,__unstablePopoverSlot:t,__unstableContentRef:n}):null}function jp(e){let{children:t}=e;const n=(0,s.useContext)(Id),o=(0,s.useContext)(p.Disabled.Context);return n||o?t:(Lt()('wp.components.Popover.Slot name="block-toolbar"',{alternative:"wp.blockEditor.BlockTools"}),(0,s.createElement)(Td,{__unstablePopoverSlot:"block-toolbar"},(0,s.createElement)($p,{__unstablePopoverSlot:"block-toolbar"}),t))}var Kp=(0,d.createHigherOrderComponent)((e=>t=>{const{clientId:n}=Wn();return(0,s.createElement)(e,i({},t,{clientId:n}))}),"withClientId"),qp=Kp((e=>{let{clientId:t,showSeparator:n,isFloating:o,onAddBlock:r,isToggle:l}=e;return(0,s.createElement)(Sd,{className:c()({"block-list-appender__toggle":l}),rootClientId:t,showSeparator:n,isFloating:o,onAddBlock:r})})),Yp=(0,d.compose)([Kp,(0,m.withSelect)(((e,t)=>{let{clientId:n}=t;const{getBlockOrder:o}=e(Vn),r=o(n);return{lastBlockClientId:(0,u.last)(r)}}))])((e=>{let{clientId:t}=e;return(0,s.createElement)(yd,{rootClientId:t})})),Zp=window.wp.isShallowEqual,Xp=n.n(Zp);const Qp=new WeakMap;function Jp(e,t){const n=(0,m.useSelect)((e=>e(Vn).getSettings().mediaUpload),[]),{canInsertBlockType:o,getBlockIndex:l,getClientIdsOfDescendants:i}=(0,m.useSelect)(Vn),{insertBlocks:s,moveBlocksToPosition:a,updateBlockAttributes:c,clearSelectedBlock:u}=(0,m.useDispatch)(Vn),d=function(e,t,n,o,l,i,s){return a=>{const{srcRootClientId:c,srcClientIds:u,type:d,blocks:p}=function(e){let t={srcRootClientId:null,srcClientIds:null,srcIndex:null,type:null,blocks:null};if(!e.dataTransfer)return t;try{t=Object.assign(t,JSON.parse(e.dataTransfer.getData("wp-blocks")))}catch(e){return t}return t}(a);if("inserter"===d){s();const n=p.map((e=>(0,r.cloneBlock)(e)));i(n,t,e,!0,null)}if("block"===d){const r=n(u[0],c);if(c===e&&r===t)return;if(u.includes(e)||o(u).some((t=>t===e)))return;const i=c===e,s=u.length;l(u,c,e,i&&r<t?t-s:t)}}}(e,t,l,i,a,s,u),p=function(e,t,n,o,l,i){return s=>{if(!n)return;const a=(0,r.findTransform)((0,r.getBlockTransforms)("from"),(t=>"files"===t.type&&l(t.blockName,e)&&t.isMatch(s)));if(a){const n=a.transform(s,o);i(n,t,e)}}}(e,t,n,c,o,s),f=function(e,t,n){return o=>{const l=(0,r.pasteHandler)({HTML:o,mode:"BLOCKS"});l.length&&n(l,t,e)}}(e,t,s);return e=>{const t=(0,rr.getFilesFromDataTransfer)(e.dataTransfer),n=e.dataTransfer.getData("text/html");t.length?p(t):n?f(n):d(e)}}function em(e,t,n){const o="top"===n||"bottom"===n,{x:r,y:l}=e,i=o?r:l,s=o?l:r,a=o?t.left:t.top,c=o?t.right:t.bottom,u=t[n];let d;return d=i>=a&&i<=c?i:i<c?a:c,Math.sqrt((i-d)**2+(s-u)**2)}function tm(e,t){let n,o,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["top","bottom","left","right"];return r.forEach((r=>{const l=em(e,t,r);(void 0===n||l<n)&&(n=l,o=r)})),[n,o]}function nm(e,t,n){const o="horizontal"===n?["left","right"]:["top","bottom"],r=(0,h.isRTL)();let l,i;return e.forEach(((e,n)=>{const s=e.getBoundingClientRect(),[a,c]=tm(t,s,o);(void 0===i||a<i)&&(i=a,l=n+("bottom"===c||!r&&"right"===c||r&&"left"===c?1:0))})),l}function om(){let{rootClientId:e=""}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[t,n]=(0,s.useState)(null),o=(0,m.useSelect)((t=>{const{getTemplateLock:n}=t(Vn);return"all"===n(e)}),[e]),{getBlockListSettings:r}=(0,m.useSelect)(Vn),{showInsertionPoint:l,hideInsertionPoint:i}=(0,m.useDispatch)(Vn),a=Jp(e,t),c=(0,d.useThrottle)((0,s.useCallback)(((t,o)=>{var i;const s=nm(Array.from(o.children).filter((e=>e.classList.contains("wp-block"))),{x:t.clientX,y:t.clientY},null===(i=r(e))||void 0===i?void 0:i.orientation);n(void 0===s?0:s),null!==s&&l(e,s)}),[]),200);return(0,d.__experimentalUseDropZone)({isDisabled:o,onDrop:a,onDragOver(e){c(e,e.currentTarget)},onDragLeave(){c.cancel(),i(),n(null)},onDragEnd(){c.cancel(),i(),n(null)}})}function rm(e){const{clientId:t,allowedBlocks:n,__experimentalDefaultBlock:o,__experimentalDirectInsert:l,template:i,templateLock:a,wrapperRef:c,templateInsertUpdatesSelection:d,__experimentalCaptureToolbars:p,__experimentalAppenderTagName:f,renderAppender:h,orientation:g,placeholder:v,__experimentalLayout:b}=e;!function(e,t,n,o,r,l,i,a){const{updateBlockListSettings:c}=(0,m.useDispatch)(Vn),{blockListSettings:u,parentLock:d}=(0,m.useSelect)((t=>{const n=t(Vn).getBlockRootClientId(e);return{blockListSettings:t(Vn).getBlockListSettings(e),parentLock:t(Vn).getTemplateLock(n)}}),[e]),p=(0,s.useMemo)((()=>t),t);(0,s.useLayoutEffect)((()=>{const t={allowedBlocks:p,templateLock:void 0===r?d:r};if(void 0!==l&&(t.__experimentalCaptureToolbars=l),void 0!==i)t.orientation=i;else{const e=Io(null==a?void 0:a.type);t.orientation=e.getOrientation(a)}void 0!==n&&(t.__experimentalDefaultBlock=n),void 0!==o&&(t.__experimentalDirectInsert=o),Xp()(u,t)||c(e,t)}),[e,u,p,n,o,r,d,l,i,c,a])}(t,n,o,l,a,p,g,b),function(e,t,n,o){const{getSelectedBlocksInitialCaretPosition:l}=(0,m.useSelect)(Vn),{replaceInnerBlocks:i}=(0,m.useDispatch)(Vn),a=(0,m.useSelect)((t=>t(Vn).getBlocks(e)),[e]),c=(0,s.useRef)(null);(0,s.useLayoutEffect)((()=>{if((0===a.length||"all"===n)&&!(0,u.isEqual)(t,c.current)){c.current=t;const n=(0,r.synchronizeBlocksWithTemplate)(a,t);(0,u.isEqual)(n,a)||i(e,n,0===a.length&&o&&0!==n.length,l())}}),[a,t,n,e])}(t,i,a,d);const k=(0,m.useSelect)((e=>{const n=e(Vn).getBlock(t),o=(0,r.getBlockType)(n.name);if(o&&o.providesContext)return function(e,t){Qp.has(t)||Qp.set(t,new WeakMap);const n=Qp.get(t);if(!n.has(e)){const o=(0,u.mapValues)(t.providesContext,(t=>e[t]));n.set(e,o)}return n.get(e)}(n.attributes,o)}),[t]);return(0,s.createElement)(ir,{value:k},(0,s.createElement)(fm,{rootClientId:t,renderAppender:h,__experimentalAppenderTagName:f,__experimentalLayout:b,wrapperRef:c,placeholder:v}))}function lm(e){return Wa(e),(0,s.createElement)(rm,e)}const im=(0,s.forwardRef)(((e,t)=>{const n=sm({ref:t},e);return(0,s.createElement)("div",{className:"block-editor-inner-blocks"},(0,s.createElement)("div",n))}));function sm(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{clientId:n}=Wn(),o=(0,d.useViewportMatch)("medium","<"),{__experimentalCaptureToolbars:l,hasOverlay:a}=(0,m.useSelect)((e=>{if(!n)return{};const{getBlockName:t,isBlockSelected:l,hasSelectedInnerBlock:i,isNavigationMode:s}=e(Vn),a=t(n),c=s()||o;return{__experimentalCaptureToolbars:e(r.store).hasBlockSupport(a,"__experimentalExposeControlsToChildren",!1),hasOverlay:"core/template"!==a&&!l(n)&&!i(n,!0)&&c}}),[n,o]),u=(0,d.useMergeRefs)([e.ref,om({rootClientId:n})]),p={__experimentalCaptureToolbars:l,...t},f=p.value&&p.onChange?lm:rm;return{...e,ref:u,className:c()(e.className,"block-editor-block-list__layout",{"has-overlay":a}),children:n?(0,s.createElement)(f,i({},p,{clientId:n})):(0,s.createElement)(fm,t)}}sm.save=r.__unstableGetInnerBlocksProps,im.DefaultBlockAppender=Yp,im.ButtonBlockAppender=qp,im.Content=()=>sm.save().children;var am=im;const cm=(0,s.createContext)(),um=(0,s.createContext)();function dm(e){let{className:t,...n}=e;const[o,r]=(0,s.useState)(),l=(0,d.useViewportMatch)("medium"),{isOutlineMode:i,isFocusMode:a,isNavigationMode:u}=(0,m.useSelect)((e=>{const{getSettings:t,isNavigationMode:n}=e(Vn),{outlineMode:o,focusMode:r}=t();return{isOutlineMode:o,isFocusMode:r,isNavigationMode:n()}}),[]),p=sm({ref:(0,d.useMergeRefs)([Ka(),Nd(),r]),className:c()("is-root-container",t,{"is-outline-mode":i,"is-focus-mode":a&&l,"is-navigate-mode":u})},n);return(0,s.createElement)(cm.Provider,{value:o},(0,s.createElement)("div",p))}function pm(e){return function(){const e=(0,m.useSelect)((e=>e(Vn).getSettings().__experimentalBlockPatterns),[]);(0,s.useEffect)((()=>{if(null==e||!e.length)return;let t,n=-1;const o=()=>{n++,n>=e.length||((0,m.select)(Vn).__experimentalGetParsedPattern(e[n].name),t=Pd(o))};return t=Pd(o),()=>Md(t)}),[e])}(),(0,s.createElement)(jp,null,(0,s.createElement)(Gn,{value:Hn},(0,s.createElement)(dm,e)))}function mm(e){let{placeholder:t,rootClientId:n,renderAppender:o,__experimentalAppenderTagName:r,__experimentalLayout:l=xo}=e;const[i,a]=(0,s.useState)(new Set),c=(0,s.useMemo)((()=>{const{IntersectionObserver:e}=window;if(e)return new e((e=>{a((t=>{const n=new Set(t);for(const t of e){const e=t.target.getAttribute("data-block");n[t.isIntersecting?"add":"delete"](e)}return n}))}))}),[a]),{order:u,selectedBlocks:d}=(0,m.useSelect)((e=>{const{getBlockOrder:t,getSelectedBlockClientIds:o}=e(Vn);return{order:t(n),selectedBlocks:o()}}),[n]);return(0,s.createElement)(No,{value:l},(0,s.createElement)(um.Provider,{value:c},u.map((e=>(0,s.createElement)(m.AsyncModeProvider,{key:e,value:!i.has(e)&&!d.includes(e)},(0,s.createElement)(Da,{rootClientId:n,clientId:e}))))),u.length<1&&t,(0,s.createElement)(wd,{tagName:r,rootClientId:n,renderAppender:o}))}function fm(e){return(0,s.createElement)(m.AsyncModeProvider,{value:!1},(0,s.createElement)(mm,e))}pm.__unstableElementContext=cm;const hm=["colors","disableCustomColors","gradients","disableCustomGradients"];function gm(e){let{colors:t,gradients:n,disableCustomColors:o,disableCustomGradients:r,__experimentalHasMultipleOrigins:l,__experimentalIsRenderedInSidebar:i,className:a,label:d,onColorChange:m,onGradientChange:f,colorValue:g,gradientValue:v,clearable:b,showTitle:k=!0,enableAlpha:_}=e;const y=m&&(!(0,u.isEmpty)(t)||!o),E=f&&(!(0,u.isEmpty)(n)||!r),[C,S]=(0,s.useState)(v?"gradient":!!y&&"color");return y||E?(0,s.createElement)(p.BaseControl,{className:c()("block-editor-color-gradient-control",a)},(0,s.createElement)("fieldset",null,(0,s.createElement)(p.__experimentalVStack,{spacing:1},k&&(0,s.createElement)("legend",null,(0,s.createElement)("div",{className:"block-editor-color-gradient-control__color-indicator"},(0,s.createElement)(p.BaseControl.VisualLabel,null,d))),y&&E&&(0,s.createElement)(p.__experimentalToggleGroupControl,{value:C,onChange:S,label:(0,h.__)("Select color type"),hideLabelFromVision:!0,isBlock:!0},(0,s.createElement)(p.__experimentalToggleGroupControlOption,{value:"color",label:(0,h.__)("Solid")}),(0,s.createElement)(p.__experimentalToggleGroupControlOption,{value:"gradient",label:(0,h.__)("Gradient")})),("color"===C||!E)&&(0,s.createElement)(p.ColorPalette,{value:g,onChange:E?e=>{m(e),f()}:m,colors:t,disableCustomColors:o,__experimentalHasMultipleOrigins:l,__experimentalIsRenderedInSidebar:i,clearable:b,enableAlpha:_}),("gradient"===C||!y)&&(0,s.createElement)(p.GradientPicker,{value:v,onChange:y?e=>{f(e),m()}:f,gradients:n,disableCustomGradients:r,__experimentalHasMultipleOrigins:l,clearable:b})))):null}function vm(e){const t={};return t.colors=mo("color.palette"),t.gradients=mo("color.gradients"),t.disableCustomColors=!mo("color.custom"),t.disableCustomGradients=!mo("color.customGradient"),(0,s.createElement)(gm,i({},t,e))}var bm=function(e){return(0,u.every)(hm,(t=>e.hasOwnProperty(t)))?(0,s.createElement)(gm,e):(0,s.createElement)(vm,e)};function km(){return{disableCustomColors:!mo("color.custom"),disableCustomGradients:!mo("color.customGradient")}}function _m(){const e=km(),t=mo("color.palette.custom"),n=mo("color.palette.theme"),o=mo("color.palette.default"),r=mo("color.defaultPalette");e.colors=(0,s.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:(0,h._x)("Theme","Indicates this palette comes from the theme."),colors:n}),r&&o&&o.length&&e.push({name:(0,h._x)("Default","Indicates this palette comes from WordPress."),colors:o}),t&&t.length&&e.push({name:(0,h._x)("Custom","Indicates this palette comes from the theme."),colors:t}),e}),[o,n,t]);const l=mo("color.gradients.custom"),i=mo("color.gradients.theme"),a=mo("color.gradients.default"),c=mo("color.defaultGradients");return e.gradients=(0,s.useMemo)((()=>{const e=[];return i&&i.length&&e.push({name:(0,h._x)("Theme","Indicates this palette comes from the theme."),gradients:i}),c&&a&&a.length&&e.push({name:(0,h._x)("Default","Indicates this palette comes from WordPress."),gradients:a}),l&&l.length&&e.push({name:(0,h._x)("Custom","Indicates this palette is created by the user."),gradients:l}),e}),[l,i,a]),e}Ac([Dc,zc]);const ym=(e,t,n)=>{if(t){const n=(0,u.find)(e,{slug:t});if(n)return n}return{color:n}},Em=(e,t)=>(0,u.find)(e,{color:t});function Cm(e,t){if(e&&t)return`has-${(0,u.kebabCase)(t)}-${e}`}const Sm=[];function wm(e){const{attributes:{borderColor:t,style:n},setAttributes:o}=e,r=_m(),l=r.colors.reduce(((e,t)=>e.concat(t.colors)),[]),[a,c]=(0,s.useState)((()=>{var e,o;return null===(e=ym(l,t,null==n||null===(o=n.border)||void 0===o?void 0:o.color))||void 0===e?void 0:e.color}));return(0,s.createElement)(bm,i({label:(0,h.__)("Color"),colorValue:a,onColorChange:e=>{c(e);const t=Em(l,e),r={...n,border:{...null==n?void 0:n.border,color:null!=t&&t.slug?void 0:e}},i=null!=t&&t.slug?t.slug:void 0;o({style:qo(r),borderColor:i})},clearable:!1,__experimentalHasMultipleOrigins:!0,__experimentalIsRenderedInSidebar:!0},r))}function Bm(e,t,n){var o;if(!Xm(t,"color")||Qm(t))return e;const{borderColor:r,style:l}=n,i=Cm("border-color",r),s=c()(e.className,{"has-border-color":r||(null==l||null===(o=l.border)||void 0===o?void 0:o.color),[i]:!!i});return e.className=s||void 0,e}const Im=(0,d.createHigherOrderComponent)((e=>t=>{var n,o;const{name:r,attributes:l}=t,{borderColor:a}=l,c=mo("color.palette")||Sm;if(!Xm(r,"color")||Qm(r))return(0,s.createElement)(e,t);const u={borderColor:a?null===(n=ym(c,a))||void 0===n?void 0:n.color:void 0};let d=t.wrapperProps;return d={...t.wrapperProps,style:{...u,...null===(o=t.wrapperProps)||void 0===o?void 0:o.style}},(0,s.createElement)(e,i({},t,{wrapperProps:d}))}));function xm(e){return[...e].sort(((t,n)=>e.filter((e=>e===n)).length-e.filter((e=>e===t)).length)).shift()}function Tm(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("string"==typeof e)return e;const t=Object.values(e).map((e=>(0,p.__experimentalParseUnit)(e))),n=t.map((e=>e[0])),o=t.map((e=>e[1])),r=n.every((e=>e===n[0]))?n[0]:"",l=xm(o),i=0===r||r?`${r}${l}`:null;return i}function Nm(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Tm(e),n=isNaN(parseFloat(t));return n}function Pm(e){return!!e&&("string"==typeof e||!!Object.values(e).filter((e=>!!e||0===e)).length)}function Mm(e){let{onChange:t,values:n,...o}=e;const r=Tm(n),l=Pm(n)&&Nm(n),a=l?(0,h.__)("Mixed"):null;return(0,s.createElement)(p.__experimentalUnitControl,i({},o,{"aria-label":(0,h.__)("Border radius"),disableUnits:l,isOnly:!0,value:r,onChange:t,placeholder:a}))}(0,l.addFilter)("blocks.registerBlockType","core/border/addAttributes",(function(e){return Xm(e,"color")?e.attributes.borderColor?e:{...e,attributes:{...e.attributes,borderColor:{type:"string"}}}:e})),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/border/addSaveProps",Bm),(0,l.addFilter)("blocks.registerBlockType","core/border/addEditProps",(function(e){if(!Xm(e,"color")||Qm(e))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),Bm(o,e,n)},e})),(0,l.addFilter)("editor.BlockListBlock","core/border/with-border-color-palette-styles",Im);const Rm={topLeft:(0,h.__)("Top left"),topRight:(0,h.__)("Top right"),bottomLeft:(0,h.__)("Bottom left"),bottomRight:(0,h.__)("Bottom right")};function Lm(e){let{onChange:t,values:n,...o}=e;const r="string"!=typeof n?n:{topLeft:n,topRight:n,bottomLeft:n,bottomRight:n};return(0,s.createElement)("div",{className:"components-border-radius-control__input-controls-wrapper"},Object.entries(Rm).map((e=>{let[n,l]=e;return(0,s.createElement)(p.__experimentalUnitControl,i({},o,{key:n,"aria-label":l,value:r[n],onChange:(a=n,e=>{t&&t({...r,[a]:e||void 0})})}));var a})))}var Am=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"})),Dm=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M15.6 7.3h-.7l1.6-3.5-.9-.4-3.9 8.5H9v1.5h2l-1.3 2.8H8.4c-2 0-3.7-1.7-3.7-3.7s1.7-3.7 3.7-3.7H10V7.3H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H9l-1.4 3.2.9.4 5.7-12.5h1.4c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.9 0 5.2-2.3 5.2-5.2 0-2.9-2.4-5.2-5.2-5.2z"}));function Om(e){let{isLinked:t,...n}=e;const o=t?(0,h.__)("Unlink Radii"):(0,h.__)("Link Radii");return(0,s.createElement)(p.Tooltip,{text:o},(0,s.createElement)(p.Button,i({},n,{className:"component-border-radius-control__linked-button",isPrimary:t,isSecondary:!t,isSmall:!0,icon:t?Am:Dm,iconSize:16,"aria-label":o})))}const Fm={topLeft:null,topRight:null,bottomLeft:null,bottomRight:null},zm={px:100,em:20,rem:20};function Vm(e){let{onChange:t,values:n}=e;const[o,r]=(0,s.useState)(!Pm(n)||!Nm(n)),l=(0,p.__experimentalUseCustomUnits)({availableUnits:mo("spacing.units")||["px","em","rem"]}),i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("string"==typeof e){const[,t]=(0,p.__experimentalParseUnit)(e);return t||"px"}return xm(Object.values(e).map((e=>{const[,t]=(0,p.__experimentalParseUnit)(e);return t})))||"px"}(n),a=l&&l.find((e=>e.value===i)),c=(null==a?void 0:a.step)||1,[u]=(0,p.__experimentalParseUnit)(Tm(n));return(0,s.createElement)("fieldset",{className:"components-border-radius-control"},(0,s.createElement)("legend",null,(0,h.__)("Radius")),(0,s.createElement)("div",{className:"components-border-radius-control__wrapper"},o?(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Mm,{className:"components-border-radius-control__unit-control",values:n,min:0,onChange:t,unit:i,units:l}),(0,s.createElement)(p.RangeControl,{className:"components-border-radius-control__range-control",value:u,min:0,max:zm[i],initialPosition:0,withInputField:!1,onChange:e=>{t(void 0!==e?`${e}${i}`:void 0)},step:c})):(0,s.createElement)(Lm,{min:0,onChange:t,values:n||Fm,units:l}),(0,s.createElement)(Om,{onClick:()=>r(!o),isLinked:o})))}function Hm(e){var t;const{attributes:{style:n},setAttributes:o}=e;return(0,s.createElement)(Vm,{values:null==n||null===(t=n.border)||void 0===t?void 0:t.radius,onChange:e=>{let t={...n,border:{...null==n?void 0:n.border,radius:e}};void 0!==e&&""!==e||(t=qo(t)),o({style:t})}})}var Um=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none"},(0,s.createElement)(F.Path,{d:"M5 11.25h14v1.5H5z"})),Gm=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none"},(0,s.createElement)(F.Path,{fillRule:"evenodd",d:"M5 11.25h3v1.5H5v-1.5zm5.5 0h3v1.5h-3v-1.5zm8.5 0h-3v1.5h3v-1.5z",clipRule:"evenodd"})),Wm=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none"},(0,s.createElement)(F.Path,{fillRule:"evenodd",d:"M5.25 11.25h1.5v1.5h-1.5v-1.5zm3 0h1.5v1.5h-1.5v-1.5zm4.5 0h-1.5v1.5h1.5v-1.5zm1.5 0h1.5v1.5h-1.5v-1.5zm4.5 0h-1.5v1.5h1.5v-1.5z",clipRule:"evenodd"}));const $m=[{label:(0,h.__)("Solid"),icon:Um,value:"solid"},{label:(0,h.__)("Dashed"),icon:Gm,value:"dashed"},{label:(0,h.__)("Dotted"),icon:Wm,value:"dotted"}];function jm(e){let{onChange:t,value:n}=e;return(0,s.createElement)("fieldset",{className:"components-border-style-control"},(0,s.createElement)("legend",null,(0,h.__)("Style")),(0,s.createElement)("div",{className:"components-border-style-control__buttons"},$m.map((e=>(0,s.createElement)(p.Button,{key:e.value,icon:e.icon,isSmall:!0,isPressed:e.value===n,onClick:()=>t(e.value===n?void 0:e.value),"aria-label":e.label})))))}const Km=e=>{var t;const{attributes:{style:n},setAttributes:o}=e;return(0,s.createElement)(jm,{value:null==n||null===(t=n.border)||void 0===t?void 0:t.style,onChange:e=>{const t={...n,border:{...null==n?void 0:n.border,style:e}};o({style:qo(t)})}})},qm=e=>{const{attributes:{borderColor:t,style:n},setAttributes:o}=e,{width:r,color:l,style:i}=(null==n?void 0:n.border)||{},[a,c]=(0,s.useState)(),[u,d]=(0,s.useState)();(0,s.useEffect)((()=>{"none"!==i&&c(i)}),[i]),(0,s.useEffect)((()=>{(t||l)&&d({name:t||void 0,color:l||void 0})}),[t,l]);const m=(0,p.__experimentalUseCustomUnits)({availableUnits:mo("spacing.units")||["px","em","rem"]});return(0,s.createElement)(p.__experimentalUnitControl,{value:r,label:(0,h.__)("Width"),min:0,onChange:e=>{let r={...n,border:{...null==n?void 0:n.border,width:e}},l=t;const s=0===parseFloat(e);s&&(l=void 0,r.border.color=void 0,r.border.style="none"),s||"none"!==i||(r.border.style=a),s||void 0!==t||(l=null==u?void 0:u.name,r.border.color=null==u?void 0:u.color),void 0!==e&&""!==e||(r=qo(r)),o({borderColor:l,style:r})},units:m})},Ym="__experimentalBorder";function Zm(e){const{clientId:t}=e,n=Jm(e),o=Xm(e.name),l=mo("border.color")&&Xm(e.name,"color"),i=mo("border.radius")&&Xm(e.name,"radius"),a=mo("border.style")&&Xm(e.name,"style"),c=mo("border.width")&&Xm(e.name,"width");if(n||!o)return null;const u=(0,r.getBlockSupport)(e.name,[Ym,"__experimentalDefaultControls"]),d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=>{var o;return{...n,...t,style:{...n.style,border:{...null===(o=n.style)||void 0===o?void 0:o.border,[e]:void 0}}}}};return(0,s.createElement)(er,{__experimentalGroup:"border"},c&&(0,s.createElement)(p.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.border)||void 0===n||!n.width)}(e),label:(0,h.__)("Width"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:ef(o,"width")})}(e),isShownByDefault:null==u?void 0:u.width,resetAllFilter:d("width"),panelId:t},(0,s.createElement)(qm,e)),a&&(0,s.createElement)(p.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.border)||void 0===n||!n.style)}(e),label:(0,h.__)("Style"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:ef(o,"style")})}(e),isShownByDefault:null==u?void 0:u.style,resetAllFilter:d("style"),panelId:t},(0,s.createElement)(Km,e)),l&&(0,s.createElement)(p.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t;const{attributes:{borderColor:n,style:o}}=e;return!!n||!(null==o||null===(t=o.border)||void 0===t||!t.color)}(e),label:(0,h.__)("Color"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({borderColor:void 0,style:ef(o,"color")})}(e),isShownByDefault:null==u?void 0:u.color,resetAllFilter:d("color",{borderColor:void 0}),panelId:t},(0,s.createElement)(wm,e)),i&&(0,s.createElement)(p.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t,n;const o=null===(t=e.attributes.style)||void 0===t||null===(n=t.border)||void 0===n?void 0:n.radius;return"object"==typeof o?Object.entries(o).some(Boolean):!!o}(e),label:(0,h.__)("Radius"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:ef(o,"radius")})}(e),isShownByDefault:null==u?void 0:u.radius,resetAllFilter:d("radius"),panelId:t},(0,s.createElement)(Hm,e)))}function Xm(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"any";if("web"!==s.Platform.OS)return!1;const n=(0,r.getBlockSupport)(e,Ym);return!!(!0===n||("any"===t?null!=n&&n.color||null!=n&&n.radius||null!=n&&n.width||null!=n&&n.style:null!=n&&n[t]))}function Qm(e){const t=(0,r.getBlockSupport)(e,Ym);return null==t?void 0:t.__experimentalSkipSerialization}const Jm=()=>[!mo("border.color"),!mo("border.radius"),!mo("border.style"),!mo("border.width")].every(Boolean);function ef(e,t){return qo({...e,border:{...null==e?void 0:e.border,[t]:void 0}})}function tf(e){if(e)return`has-${e}-gradient-background`}function nf(e,t){const n=(0,u.find)(e,["slug",t]);return n&&n.gradient}function of(e,t){return(0,u.find)(e,["gradient",t])}function rf(e,t){const n=of(e,t);return n&&n.slug}function lf(){let{gradientAttribute:e="gradient",customGradientAttribute:t="customGradient"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{clientId:n}=Wn(),{gradients:o}=mo("color")||{},r=(0,s.useMemo)((()=>[...(null==o?void 0:o.custom)||[],...(null==o?void 0:o.theme)||[],...(null==o?void 0:o.default)||[]]),[o]),{gradient:l,customGradient:i}=(0,m.useSelect)((o=>{const{getBlockAttributes:r}=o(Vn),l=r(n)||{};return{customGradient:l[t],gradient:l[e]}}),[n,e,t]),{updateBlockAttributes:a}=(0,m.useDispatch)(Vn),c=(0,s.useCallback)((o=>{const l=rf(r,o);a(n,l?{[e]:l,[t]:void 0}:{[e]:void 0,[t]:o})}),[r,n,a]),u=tf(l);let d;return d=l?nf(r,l):i,{gradientClass:u,gradientValue:d,setGradient:c}}
59
  // translators: first %s: The type of color or gradient (e.g. background, overlay...), second %s: the color name or value (e.g. red or #ff0000)
60
+ const sf=(0,h.__)("(%s: color %s)"),af=(0,h.__)("(%s: gradient %s)"),cf=["colors","disableCustomColors","gradients","disableCustomGradients"],uf=e=>{let{colors:t,gradients:n,settings:o}=e;return o.map(((e,o)=>{let r,{colorValue:l,gradientValue:i,label:a,colors:c,gradients:u}=e;if(!l&&!i)return null;if(l){const e=Em(c||t,l);r=(0,h.sprintf)(sf,a.toLowerCase(),e&&e.name||l)}else{const e=of(u||n,l);r=(0,h.sprintf)(af,a.toLowerCase(),e&&e.name||i)}return(0,s.createElement)(p.ColorIndicator,{key:o,colorValue:l||i,"aria-label":r})}))},df=e=>{let{className:t,colors:n,gradients:o,disableCustomColors:r,disableCustomGradients:l,children:a,settings:d,title:m,showTitle:f=!0,__experimentalHasMultipleOrigins:h,__experimentalIsRenderedInSidebar:g,enableAlpha:v,...b}=e;if((0,u.isEmpty)(n)&&(0,u.isEmpty)(o)&&r&&l&&(0,u.every)(d,(e=>(0,u.isEmpty)(e.colors)&&(0,u.isEmpty)(e.gradients)&&(void 0===e.disableCustomColors||e.disableCustomColors)&&(void 0===e.disableCustomGradients||e.disableCustomGradients))))return null;const k=(0,s.createElement)("span",{className:"block-editor-panel-color-gradient-settings__panel-title"},m,(0,s.createElement)(uf,{colors:n,gradients:o,settings:d}));return(0,s.createElement)(p.PanelBody,i({className:c()("block-editor-panel-color-gradient-settings",t),title:f?k:void 0},b),d.map(((e,t)=>(0,s.createElement)(bm,i({showTitle:f,key:t,colors:n,gradients:o,disableCustomColors:r,disableCustomGradients:l,__experimentalHasMultipleOrigins:h,__experimentalIsRenderedInSidebar:g,enableAlpha:v},e)))),a)},pf=e=>{const t=km();return t.colors=mo("color.palette"),t.gradients=mo("color.gradients"),(0,s.createElement)(df,i({},t,e))},mf=e=>{const t=_m();return(0,s.createElement)(df,i({},t,e))};// translators: first %s: The type of color or gradient (e.g. background, overlay...), second %s: the color name or value (e.g. red or #ff0000)
61
+ var ff=e=>(0,u.every)(cf,(t=>e.hasOwnProperty(t)))?(0,s.createElement)(df,e):e.__experimentalHasMultipleOrigins?(0,s.createElement)(mf,e):(0,s.createElement)(pf,e);function hf(e){let{colordBackgroundColor:t,colordTextColor:n,backgroundColor:o,textColor:r}=e;const l=t.brightness()<n.brightness()?(0,h.__)("This color combination may be hard for people to read. Try using a darker background color and/or a brighter text color."):(0,h.__)("This color combination may be hard for people to read. Try using a brighter background color and/or a darker text color.");return(0,s.useEffect)((()=>{(0,Pt.speak)((0,h.__)("This color combination may be hard for people to read."))}),[o,r]),(0,s.createElement)("div",{className:"block-editor-contrast-checker"},(0,s.createElement)(p.Notice,{spokenMessage:null,status:"warning",isDismissible:!1},l))}Ac([Dc,zc]);var gf=function(e){let{backgroundColor:t,fallbackBackgroundColor:n,fallbackTextColor:o,fontSize:r,isLargeText:l,textColor:i}=e;if(!t&&!n||!i&&!o)return null;const a=Rc(t||n),c=Rc(i||o);return 1!==a.alpha()||1!==c.alpha()||c.isReadable(a,{level:"AA",size:l||!1!==l&&r>=24?"large":"small"})?null:(0,s.createElement)(hf,{backgroundColor:t,textColor:i,colordBackgroundColor:a,colordTextColor:c})};function vf(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function bf(e){let{settings:t,clientId:n,enableContrastChecking:o=!0,showTitle:r=!0}=e;const[l,i]=(0,s.useState)(),[a,c]=(0,s.useState)(),u=Ba(n);return(0,s.useEffect)((()=>{if(!o)return;if(!u.current)return;c(vf(u.current).color);let e=u.current,t=vf(e).backgroundColor;for(;"rgba(0, 0, 0, 0)"===t&&e.parentNode&&e.parentNode.nodeType===e.parentNode.ELEMENT_NODE;)e=e.parentNode,t=vf(e).backgroundColor;i(t)})),(0,s.createElement)(er,null,(0,s.createElement)(ff,{title:(0,h.__)("Color"),initialOpen:!1,settings:t,showTitle:r,__experimentalHasMultipleOrigins:!0,__experimentalIsRenderedInSidebar:!0},o&&(0,s.createElement)(gf,{backgroundColor:l,textColor:a})))}const kf="color",_f=e=>{const t=(0,r.getBlockSupport)(e,kf);return t&&(!0===t.link||!0===t.gradient||!1!==t.background||!1!==t.text)},yf=e=>{const t=(0,r.getBlockSupport)(e,kf);return null==t?void 0:t.__experimentalSkipSerialization},Ef=e=>{const t=(0,r.getBlockSupport)(e,kf);return(0,u.isObject)(t)&&!!t.gradients};function Cf(e,t,n){var o,r,l,i,s,a;if(!_f(t)||yf(t))return e;const u=Ef(t),{backgroundColor:d,textColor:p,gradient:m,style:f}=n,h=Cm("background-color",d),g=tf(m),v=Cm("color",p),b=c()(e.className,v,g,{[h]:!(u&&null!=f&&null!==(o=f.color)&&void 0!==o&&o.gradient||!h),"has-text-color":p||(null==f||null===(r=f.color)||void 0===r?void 0:r.text),"has-background":d||(null==f||null===(l=f.color)||void 0===l?void 0:l.background)||u&&(m||(null==f||null===(i=f.color)||void 0===i?void 0:i.gradient)),"has-link-color":null==f||null===(s=f.elements)||void 0===s||null===(a=s.link)||void 0===a?void 0:a.color});return e.className=b||void 0,e}const Sf=(e,t)=>{const n=/var:preset\|color\|(.+)/.exec(t);return n&&n[1]?ym(e,n[1]).color:t};function wf(e){var t,n,o,l,i,a,c,d,p,m,f;const{name:g,attributes:v}=e,{palette:b,gradients:k,customGradient:_,custom:y,text:E,background:C,link:S}=mo("color")||{},w=y||!(null!=b&&b.theme)||(null==b||null===(t=b.theme)||void 0===t?void 0:t.length)>0,B=_||!(null!=k&&k.theme)||(null==k||null===(n=k.theme)||void 0===n?void 0:n.length)>0,I=(0,s.useMemo)((()=>[...(null==b?void 0:b.custom)||[],...(null==b?void 0:b.theme)||[],...(null==b?void 0:b.default)||[]]),[b]),x=(0,s.useMemo)((()=>[...(null==k?void 0:k.custom)||[],...(null==k?void 0:k.theme)||[],...(null==k?void 0:k.default)||[]]),[k]),T=(0,s.useRef)(v);if((0,s.useEffect)((()=>{T.current=v}),[v]),!_f(g))return null;const N=(e=>{if("web"!==s.Platform.OS)return!1;const t=(0,r.getBlockSupport)(e,kf);return(0,u.isObject)(t)&&!!t.link})(g)&&S&&w,P=(e=>{const t=(0,r.getBlockSupport)(e,kf);return t&&!1!==t.text})(g)&&E&&w,M=(e=>{const t=(0,r.getBlockSupport)(e,kf);return t&&!1!==t.background})(g)&&C&&w,R=Ef(g)&&B;if(!(N||P||M||R))return null;const{style:L,textColor:A,backgroundColor:D,gradient:O}=v;let F;if(R&&O)F=nf(x,O);else if(R){var z;F=null==L||null===(z=L.color)||void 0===z?void 0:z.gradient}const V=t=>n=>{var o,r;const l=Em(I,n),i=t+"Color",s={...T.current.style,color:{...null===(o=T.current)||void 0===o||null===(r=o.style)||void 0===r?void 0:r.color,[t]:null!=l&&l.slug?void 0:n}},a=null!=l&&l.slug?l.slug:void 0,c={style:qo(s),[i]:a};e.setAttributes(c),T.current={...T.current,...c}};return(0,s.createElement)(bf,{enableContrastChecking:!("web"!==s.Platform.OS||O||null!=L&&null!==(o=L.color)&&void 0!==o&&o.gradient),clientId:e.clientId,settings:[...P?[{label:(0,h.__)("Text color"),onColorChange:V("text"),colorValue:ym(I,A,null==L||null===(l=L.color)||void 0===l?void 0:l.text).color}]:[],...M||R?[{label:(0,h.__)("Background color"),onColorChange:M?V("background"):void 0,colorValue:ym(I,D,null==L||null===(i=L.color)||void 0===i?void 0:i.background).color,gradientValue:F,onGradientChange:R?t=>{const n=rf(x,t);let o;if(n){var r,l,i;const e={...null===(r=T.current)||void 0===r?void 0:r.style,color:{...null===(l=T.current)||void 0===l||null===(i=l.style)||void 0===i?void 0:i.color,gradient:void 0}};o={style:qo(e),gradient:n}}else{var s,a,c;const e={...null===(s=T.current)||void 0===s?void 0:s.style,color:{...null===(a=T.current)||void 0===a||null===(c=a.style)||void 0===c?void 0:c.color,gradient:t}};o={style:qo(e),gradient:void 0}}e.setAttributes(o),T.current={...T.current,...o}}:void 0}]:[],...N?[{label:(0,h.__)("Link Color"),onColorChange:t=>{const n=Em(I,t),o=null!=n&&n.slug?`var:preset|color|${n.slug}`:t,r=qo(function(e,t,n){return(0,u.setWith)(e?(0,u.clone)(e):{},["elements","link","color","text"],n,u.clone)}(L,0,o));e.setAttributes({style:r})},colorValue:Sf(I,null==L||null===(a=L.elements)||void 0===a||null===(c=a.link)||void 0===c||null===(d=c.color)||void 0===d?void 0:d.text),clearable:!(null==L||null===(p=L.elements)||void 0===p||null===(m=p.link)||void 0===m||null===(f=m.color)||void 0===f||!f.text)}]:[]]})}const Bf=(0,d.createHigherOrderComponent)((e=>t=>{var n,o,r;const{name:l,attributes:a}=t,{backgroundColor:c,textColor:u}=a,{palette:d}=mo("color")||{},p=(0,s.useMemo)((()=>[...(null==d?void 0:d.custom)||[],...(null==d?void 0:d.theme)||[],...(null==d?void 0:d.default)||[]]),[d]);if(!_f(l)||yf(l))return(0,s.createElement)(e,t);const m={color:u?null===(n=ym(p,u))||void 0===n?void 0:n.color:void 0,backgroundColor:c?null===(o=ym(p,c))||void 0===o?void 0:o.color:void 0};let f=t.wrapperProps;return f={...t.wrapperProps,style:{...m,...null===(r=t.wrapperProps)||void 0===r?void 0:r.style}},(0,s.createElement)(e,i({},t,{wrapperProps:f}))}));(0,l.addFilter)("blocks.registerBlockType","core/color/addAttribute",(function(e){return _f(e)?(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),Ef(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}}),e):e})),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/color/addSaveProps",Cf),(0,l.addFilter)("blocks.registerBlockType","core/color/addEditProps",(function(e){if(!_f(e)||yf(e))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),Cf(o,e,n)},e})),(0,l.addFilter)("editor.BlockListBlock","core/color/with-color-palette-styles",Bf);const If=[{name:(0,h.__)("Regular"),value:"normal"},{name:(0,h.__)("Italic"),value:"italic"}],xf=[{name:(0,h.__)("Thin"),value:"100"},{name:(0,h.__)("Extra Light"),value:"200"},{name:(0,h.__)("Light"),value:"300"},{name:(0,h.__)("Regular"),value:"400"},{name:(0,h.__)("Medium"),value:"500"},{name:(0,h.__)("Semi Bold"),value:"600"},{name:(0,h.__)("Bold"),value:"700"},{name:(0,h.__)("Extra Bold"),value:"800"},{name:(0,h.__)("Black"),value:"900"}],Tf=(e,t)=>e?t?(0,h.__)("Appearance"):(0,h.__)("Font style"):(0,h.__)("Font weight");function Nf(e){const{onChange:t,hasFontStyles:n=!0,hasFontWeights:o=!0,value:{fontStyle:r,fontWeight:l}}=e,i=n||o,a=Tf(n,o),c={key:"default",name:(0,h.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},u=(0,s.useMemo)((()=>n&&o?(()=>{const e=[c];return If.forEach((t=>{let{name:n,value:o}=t;xf.forEach((t=>{let{name:r,value:l}=t;const i="normal"===o?r:(0,h.sprintf)(
62
  /* translators: 1: Font weight name. 2: Font style name. */
63
  (0,h.__)("%1$s %2$s"),r,n);e.push({key:`${o}-${l}`,name:i,style:{fontStyle:o,fontWeight:l}})}))})),e})():n?(()=>{const e=[c];return If.forEach((t=>{let{name:n,value:o}=t;e.push({key:o,name:n,style:{fontStyle:o,fontWeight:void 0}})})),e})():(()=>{const e=[c];return xf.forEach((t=>{let{name:n,value:o}=t;e.push({key:o,name:n,style:{fontStyle:void 0,fontWeight:o}})})),e})()),[e.options]),d=u.find((e=>e.style.fontStyle===r&&e.style.fontWeight===l))||u[0];return i&&(0,s.createElement)(p.CustomSelectControl,{className:"components-font-appearance-control",label:a,describedBy:d?n?o?(0,h.sprintf)(// translators: %s: Currently selected font appearance.
64
  (0,h.__)("Currently selected font appearance: %s"),d.name):(0,h.sprintf)(// translators: %s: Currently selected font style.
65
  (0,h.__)("Currently selected font style: %s"),d.name):(0,h.sprintf)(// translators: %s: Currently selected font weight.
66
+ (0,h.__)("Currently selected font weight: %s"),d.name):(0,h.__)("No selected font appearance"),options:u,value:d,onChange:e=>{let{selectedItem:n}=e;return t(n.style)}})}function Pf(e){let{value:t,onChange:n}=e;const o=function(e){return void 0!==e&&""!==e}(t),r=o?t:"";return(0,s.createElement)("div",{className:"block-editor-line-height-control"},(0,s.createElement)(p.TextControl,{autoComplete:"off",onKeyDown:e=>{const{keyCode:t}=e;t!==va.ZERO||o||(e.preventDefault(),n("0"))},onChange:e=>{if(o)return void n(e);let t=e;switch(e){case"0.1":t=1.6;break;case"0":t=1.4}n(t)},label:(0,h.__)("Line height"),placeholder:1.5,step:.1,type:"number",value:r,min:0}))}const Mf="typography.lineHeight";function Rf(e){var t;const{attributes:{style:n},setAttributes:o}=e;return(0,s.createElement)(Pf,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.lineHeight,onChange:e=>{const t={...n,typography:{...null==n?void 0:n.typography,lineHeight:e}};o({style:qo(t)})}})}function Lf(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!mo("typography.lineHeight");return!(0,r.hasBlockSupport)(e,Mf)||t}const Af="typography.__experimentalFontStyle",Df="typography.__experimentalFontWeight";function Of(e){var t,n;const{attributes:{style:o},setAttributes:r}=e,l=!Ff(e),i=!zf(e),a=null==o||null===(t=o.typography)||void 0===t?void 0:t.fontStyle,c=null==o||null===(n=o.typography)||void 0===n?void 0:n.fontWeight;return(0,s.createElement)(Nf,{onChange:e=>{r({style:qo({...o,typography:{...null==o?void 0:o.typography,fontStyle:e.fontStyle,fontWeight:e.fontWeight}})})},hasFontStyles:l,hasFontWeights:i,value:{fontStyle:a,fontWeight:c}})}function Ff(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,r.hasBlockSupport)(e,Af),n=mo("typography.fontStyle");return!t||!n}function zf(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,r.hasBlockSupport)(e,Df),n=mo("typography.fontWeight");return!t||!n}function Vf(e){const t=Ff(e),n=zf(e);return t&&n}function Hf(e){let{value:t="",onChange:n,fontFamilies:o,...r}=e;const l=mo("typography.fontFamilies");if(o||(o=l),(0,u.isEmpty)(o))return null;const a=[{value:"",label:(0,h.__)("Default")},...o.map((e=>{let{fontFamily:t,name:n}=e;return{value:t,label:n||t}}))];return(0,s.createElement)(p.SelectControl,i({label:(0,h.__)("Font family"),options:a,value:t,onChange:n,labelPosition:"top"},r))}const Uf="typography.__experimentalFontFamily";function Gf(e,t,n){if(!(0,r.hasBlockSupport)(t,Uf))return e;if((0,r.hasBlockSupport)(t,"typography.__experimentalSkipSerialization"))return e;if(null==n||!n.fontFamily)return e;const o=new(ip())(e.className);o.add(`has-${(0,u.kebabCase)(null==n?void 0:n.fontFamily)}-font-family`);const l=o.value;return e.className=l||void 0,e}function Wf(e){var t;let{setAttributes:n,attributes:{fontFamily:o}}=e;const r=mo("typography.fontFamilies"),l=null===(t=(0,u.find)(r,(e=>{let{slug:t}=e;return o===t})))||void 0===t?void 0:t.fontFamily;return(0,s.createElement)(Hf,{className:"block-editor-hooks-font-family-control",fontFamilies:r,value:l,onChange:function(e){const t=(0,u.find)(r,(t=>{let{fontFamily:n}=t;return n===e}));n({fontFamily:null==t?void 0:t.slug})}})}function $f(e){let{name:t}=e;const n=mo("typography.fontFamilies");return!n||0===n.length||!(0,r.hasBlockSupport)(t,Uf)}(0,l.addFilter)("blocks.registerBlockType","core/fontFamily/addAttribute",(function(e){return(0,r.hasBlockSupport)(e,Uf)?(e.attributes.fontFamily||Object.assign(e.attributes,{fontFamily:{type:"string"}}),e):e})),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/fontFamily/addSaveProps",Gf),(0,l.addFilter)("blocks.registerBlockType","core/fontFamily/addEditProps",(function(e){if(!(0,r.hasBlockSupport)(e,Uf))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),Gf(o,e,n)},e}));const jf=(e,t,n)=>{if(t){const n=(0,u.find)(e,{slug:t});if(n)return n}return{size:n}};function Kf(e,t){return(0,u.find)(e,{size:t})||{size:t}}function qf(e){if(e)return`has-${(0,u.kebabCase)(e)}-font-size`}var Yf=function(e){const t=mo("typography.fontSizes"),n=!mo("typography.customFontSize");return(0,s.createElement)(p.FontSizePicker,i({},e,{fontSizes:t,disableCustomFontSizes:n}))};const Zf="typography.fontSize";function Xf(e,t,n){if(!(0,r.hasBlockSupport)(t,Zf))return e;if((0,r.hasBlockSupport)(t,"typography.__experimentalSkipSerialization"))return e;const o=new(ip())(e.className);o.add(qf(n.fontSize));const l=o.value;return e.className=l||void 0,e}function Qf(e){var t,n;const{attributes:{fontSize:o,style:r},setAttributes:l}=e,i=mo("typography.fontSizes"),a=jf(i,o,null==r||null===(t=r.typography)||void 0===t?void 0:t.fontSize),c=(null==a?void 0:a.size)||(null==r||null===(n=r.typography)||void 0===n?void 0:n.fontSize)||o;return(0,s.createElement)(Yf,{onChange:e=>{const t=Kf(i,e).slug;l({style:qo({...r,typography:{...null==r?void 0:r.typography,fontSize:t?void 0:e}}),fontSize:t})},value:c,withReset:!1})}function Jf(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=mo("typography.fontSizes"),n=!(null==t||!t.length);return!(0,r.hasBlockSupport)(e,Zf)||!n}const eh=(0,d.createHigherOrderComponent)((e=>t=>{var n,o;const l=mo("typography.fontSizes"),{name:i,attributes:{fontSize:a,style:c},wrapperProps:u}=t;if(!(0,r.hasBlockSupport)(i,Zf)||(0,r.hasBlockSupport)(i,"typography.__experimentalSkipSerialization")||!a||null!=c&&null!==(n=c.typography)&&void 0!==n&&n.fontSize)return(0,s.createElement)(e,t);const d=jf(l,a,null==c||null===(o=c.typography)||void 0===o?void 0:o.fontSize).size,p={...t,wrapperProps:{...u,style:{fontSize:d,...null==u?void 0:u.style}}};return(0,s.createElement)(e,p)}),"withFontSizeInlineStyles");(0,l.addFilter)("blocks.registerBlockType","core/font/addAttribute",(function(e){return(0,r.hasBlockSupport)(e,Zf)?(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}}),e):e})),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/font/addSaveProps",Xf),(0,l.addFilter)("blocks.registerBlockType","core/font/addEditProps",(function(e){if(!(0,r.hasBlockSupport)(e,Zf))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),Xf(o,e,n)},e})),(0,l.addFilter)("editor.BlockListBlock","core/font-size/with-font-size-inline-styles",eh);var th=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M7 18v1h10v-1H7zm5-2c1.5 0 2.6-.4 3.4-1.2.8-.8 1.1-2 1.1-3.5V5H15v5.8c0 1.2-.2 2.1-.6 2.8-.4.7-1.2 1-2.4 1s-2-.3-2.4-1c-.4-.7-.6-1.6-.6-2.8V5H7.5v6.2c0 1.5.4 2.7 1.1 3.5.8.9 1.9 1.3 3.4 1.3z"})),nh=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z"}));const oh=[{name:(0,h.__)("Underline"),value:"underline",icon:th},{name:(0,h.__)("Strikethrough"),value:"line-through",icon:nh}];function rh(e){let{value:t,onChange:n}=e;return(0,s.createElement)("fieldset",{className:"block-editor-text-decoration-control"},(0,s.createElement)("legend",null,(0,h.__)("Decoration")),(0,s.createElement)("div",{className:"block-editor-text-decoration-control__buttons"},oh.map((e=>(0,s.createElement)(p.Button,{key:e.value,icon:e.icon,isSmall:!0,isPressed:e.value===t,onClick:()=>n(e.value===t?void 0:e.value),"aria-label":e.name})))))}const lh="typography.__experimentalTextDecoration";function ih(e){var t;const{attributes:{style:n},setAttributes:o}=e;return(0,s.createElement)(rh,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textDecoration,onChange:function(e){o({style:qo({...n,typography:{...null==n?void 0:n.typography,textDecoration:e}})})}})}function sh(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!(0,r.hasBlockSupport)(e,lh),n=mo("typography.textDecoration");return t||!n}var ah=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M6.1 6.8L2.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H6.1zm-.8 6.8L7 8.9l1.7 4.7H5.3zm15.1-.7c-.4-.5-.9-.8-1.6-1 .4-.2.7-.5.8-.9.2-.4.3-.9.3-1.4 0-.9-.3-1.6-.8-2-.6-.5-1.3-.7-2.4-.7h-3.5V18h4.2c1.1 0 2-.3 2.6-.8.6-.6 1-1.4 1-2.4-.1-.8-.3-1.4-.6-1.9zm-5.7-4.7h1.8c.6 0 1.1.1 1.4.4.3.2.5.7.5 1.3 0 .6-.2 1.1-.5 1.3-.3.2-.8.4-1.4.4h-1.8V8.2zm4 8c-.4.3-.9.5-1.5.5h-2.6v-3.8h2.6c1.4 0 2 .6 2 1.9.1.6-.1 1-.5 1.4z"})),ch=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M11 16.8c-.1-.1-.2-.3-.3-.5v-2.6c0-.9-.1-1.7-.3-2.2-.2-.5-.5-.9-.9-1.2-.4-.2-.9-.3-1.6-.3-.5 0-1 .1-1.5.2s-.9.3-1.2.6l.2 1.2c.4-.3.7-.4 1.1-.5.3-.1.7-.2 1-.2.6 0 1 .1 1.3.4.3.2.4.7.4 1.4-1.2 0-2.3.2-3.3.7s-1.4 1.1-1.4 2.1c0 .7.2 1.2.7 1.6.4.4 1 .6 1.8.6.9 0 1.7-.4 2.4-1.2.1.3.2.5.4.7.1.2.3.3.6.4.3.1.6.1 1.1.1h.1l.2-1.2h-.1c-.4.1-.6 0-.7-.1zM9.2 16c-.2.3-.5.6-.9.8-.3.1-.7.2-1.1.2-.4 0-.7-.1-.9-.3-.2-.2-.3-.5-.3-.9 0-.6.2-1 .7-1.3.5-.3 1.3-.4 2.5-.5v2zm10.6-3.9c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2s-.2 1.4-.6 2z"})),uh=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M7.1 6.8L3.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H7.1zm-.8 6.8L8 8.9l1.7 4.7H6.3zm14.5-1.5c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2 .1.8-.2 1.4-.6 2z"}));const dh=[{name:(0,h.__)("Uppercase"),value:"uppercase",icon:ah},{name:(0,h.__)("Lowercase"),value:"lowercase",icon:ch},{name:(0,h.__)("Capitalize"),value:"capitalize",icon:uh}];function ph(e){let{value:t,onChange:n}=e;return(0,s.createElement)("fieldset",{className:"block-editor-text-transform-control"},(0,s.createElement)("legend",null,(0,h.__)("Letter case")),(0,s.createElement)("div",{className:"block-editor-text-transform-control__buttons"},dh.map((e=>(0,s.createElement)(p.Button,{key:e.value,icon:e.icon,isSmall:!0,isPressed:t===e.value,"aria-label":e.name,onClick:()=>n(t===e.value?void 0:e.value)})))))}const mh="typography.__experimentalTextTransform";function fh(e){var t;const{attributes:{style:n},setAttributes:o}=e;return(0,s.createElement)(ph,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textTransform,onChange:function(e){o({style:qo({...n,typography:{...null==n?void 0:n.typography,textTransform:e}})})}})}function hh(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!(0,r.hasBlockSupport)(e,mh),n=mo("typography.textTransform");return t||!n}function gh(e){let{value:t,onChange:n,__unstableInputWidth:o="60px"}=e;const r=(0,p.__experimentalUseCustomUnits)({availableUnits:mo("spacing.units")||["px","em","rem"],defaultValues:{px:"2",em:".2",rem:".2"}});return(0,s.createElement)(p.__experimentalUnitControl,{label:(0,h.__)("Letter spacing"),value:t,__unstableInputWidth:o,units:r,onChange:n})}const vh="typography.__experimentalLetterSpacing";function bh(e){var t;const{attributes:{style:n},setAttributes:o}=e;return(0,s.createElement)(gh,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.letterSpacing,onChange:function(e){o({style:qo({...n,typography:{...null==n?void 0:n.typography,letterSpacing:e}})})},__unstableInputWidth:"100%"})}function kh(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!(0,r.hasBlockSupport)(e,vh),n=mo("typography.letterSpacing");return t||!n}const _h="typography",yh=[Mf,Zf,Af,Df,Uf,lh,mh,vh];function Eh(e){const{clientId:t}=e,n=$f(e),o=Jf(e),l=Vf(e),i=Lf(e),a=sh(e),c=hh(e),u=kh(e),d=!Ff(e),m=!zf(e),f=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=[Vf(e),Jf(e),Lf(e),$f(e),sh(e),hh(e),kh(e)];return t.filter(Boolean).length===t.length}(e),g=Ch(e.name);if(f||!g)return null;const v=(0,r.getBlockSupport)(e.name,[_h,"__experimentalDefaultControls"]),b=e=>t=>{var n;return{...t,style:{...t.style,typography:{...null===(n=t.style)||void 0===n?void 0:n.typography,[e]:void 0}}}};return(0,s.createElement)(er,{__experimentalGroup:"typography"},!n&&(0,s.createElement)(p.__experimentalToolsPanelItem,{hasValue:()=>function(e){return!!e.attributes.fontFamily}(e),label:(0,h.__)("Font family"),onDeselect:()=>function(e){let{setAttributes:t}=e;t({fontFamily:void 0})}(e),isShownByDefault:null==v?void 0:v.fontFamily,resetAllFilter:e=>({...e,fontFamily:void 0}),panelId:t},(0,s.createElement)(Wf,e)),!o&&(0,s.createElement)(p.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t;const{fontSize:n,style:o}=e.attributes;return!!n||!(null==o||null===(t=o.typography)||void 0===t||!t.fontSize)}(e),label:(0,h.__)("Font size"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({fontSize:void 0,style:qo({...o,typography:{...null==o?void 0:o.typography,fontSize:void 0}})})}(e),isShownByDefault:null==v?void 0:v.fontSize,resetAllFilter:e=>{var t;return{...e,fontSize:void 0,style:{...e.style,typography:{...null===(t=e.style)||void 0===t?void 0:t.typography,fontSize:void 0}}}},panelId:t},(0,s.createElement)(Qf,e)),!l&&(0,s.createElement)(p.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t;const{fontStyle:n,fontWeight:o}=(null===(t=e.attributes.style)||void 0===t?void 0:t.typography)||{};return!!n||!!o}(e),label:Tf(d,m),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:qo({...o,typography:{...null==o?void 0:o.typography,fontStyle:void 0,fontWeight:void 0}})})}(e),isShownByDefault:null==v?void 0:v.fontAppearance,resetAllFilter:e=>{var t;return{...e,style:{...e.style,typography:{...null===(t=e.style)||void 0===t?void 0:t.typography,fontStyle:void 0,fontWeight:void 0}}}},panelId:t},(0,s.createElement)(Of,e)),!i&&(0,s.createElement)(p.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.lineHeight)}(e),label:(0,h.__)("Line height"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:qo({...o,typography:{...null==o?void 0:o.typography,lineHeight:void 0}})})}(e),isShownByDefault:null==v?void 0:v.lineHeight,resetAllFilter:b("lineHeight"),panelId:t},(0,s.createElement)(Rf,e)),!a&&(0,s.createElement)(p.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.textDecoration)}(e),label:(0,h.__)("Decoration"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:qo({...o,typography:{...null==o?void 0:o.typography,textDecoration:void 0}})})}(e),isShownByDefault:null==v?void 0:v.textDecoration,resetAllFilter:b("textDecoration"),panelId:t},(0,s.createElement)(ih,e)),!c&&(0,s.createElement)(p.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.textTransform)}(e),label:(0,h.__)("Letter case"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:qo({...o,typography:{...null==o?void 0:o.typography,textTransform:void 0}})})}(e),isShownByDefault:null==v?void 0:v.textTransform,resetAllFilter:b("textTransform"),panelId:t},(0,s.createElement)(fh,e)),!u&&(0,s.createElement)(p.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.letterSpacing)}(e),label:(0,h.__)("Letter spacing"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:qo({...o,typography:{...null==o?void 0:o.typography,letterSpacing:void 0}})})}(e),isShownByDefault:null==v?void 0:v.letterSpacing,resetAllFilter:b("letterSpacing"),panelId:t},(0,s.createElement)(bh,e)))}const Ch=e=>yh.some((t=>(0,r.hasBlockSupport)(e,t)));function Sh(e){const t=(0,r.getBlockSupport)(e,Rh);return!!(!0===t||null!=t&&t.blockGap)}function wh(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!mo("spacing.blockGap");return!Sh(e)||t}function Bh(e){var t;const{clientId:n,attributes:{style:o},setAttributes:r}=e,l=(0,p.__experimentalUseCustomUnits)({availableUnits:mo("spacing.units")||["%","px","em","rem","vw"]}),i=Ba(n);return wh(e)?null:s.Platform.select({web:(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.__experimentalUnitControl,{label:(0,h.__)("Block spacing"),__unstableInputWidth:"80px",min:0,onChange:e=>{var t;const n={...o,spacing:{...null==o?void 0:o.spacing,blockGap:e}};r({style:qo(n)});const l=(null===(t=window)||void 0===t?void 0:t.navigator.userAgent)&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome ")&&!window.navigator.userAgent.includes("Chromium ");var s;i.current&&l&&(null===(s=i.current.parentNode)||void 0===s||s.replaceChild(i.current,i.current))},units:l,value:null==o||null===(t=o.spacing)||void 0===t?void 0:t.blockGap})),native:null})}function Ih(e){const t=(0,r.getBlockSupport)(e,Rh);return!!(!0===t||null!=t&&t.margin)}function xh(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!mo("spacing.margin"),n=!zh(e,"margin");return!Ih(e)||t||n}function Th(e){var t;const{name:n,attributes:{style:o},setAttributes:r}=e,l=(0,p.__experimentalUseCustomUnits)({availableUnits:mo("spacing.units")||["%","px","em","rem","vw"]}),i=Fh(n,"margin"),a=i&&i.some((e=>Ah.includes(e)));return xh(e)?null:s.Platform.select({web:(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.__experimentalBoxControl,{values:null==o||null===(t=o.spacing)||void 0===t?void 0:t.margin,onChange:e=>{const t={...o,spacing:{...null==o?void 0:o.spacing,margin:e}};r({style:qo(t)})},onChangeShowVisualizer:e=>{const t={...o,visualizers:{margin:e}};r({style:qo(t)})},label:(0,h.__)("Margin"),sides:i,units:l,allowReset:!1,splitOnAxis:a})),native:null})}function Nh(e){const t=(0,r.getBlockSupport)(e,Rh);return!!(!0===t||null!=t&&t.padding)}function Ph(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!mo("spacing.padding"),n=!zh(e,"padding");return!Nh(e)||t||n}function Mh(e){var t;const{name:n,attributes:{style:o},setAttributes:r}=e,l=(0,p.__experimentalUseCustomUnits)({availableUnits:mo("spacing.units")||["%","px","em","rem","vw"]}),i=Fh(n,"padding"),a=i&&i.some((e=>Ah.includes(e)));return Ph(e)?null:s.Platform.select({web:(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.__experimentalBoxControl,{values:null==o||null===(t=o.spacing)||void 0===t?void 0:t.padding,onChange:e=>{const t={...o,spacing:{...null==o?void 0:o.spacing,padding:e}};r({style:qo(t)})},onChangeShowVisualizer:e=>{const t={...o,visualizers:{padding:e}};r({style:qo(t)})},label:(0,h.__)("Padding"),sides:i,units:l,allowReset:!1,splitOnAxis:a})),native:null})}const Rh="spacing",Lh=["top","right","bottom","left"],Ah=["vertical","horizontal"];function Dh(e){const t=wh(e),n=Ph(e),o=xh(e),l=Oh(e),i=(a=e.name,"web"===s.Platform.OS&&(Sh(a)||Nh(a)||Ih(a)));var a;if(l||!i)return null;const c=(0,r.getBlockSupport)(e.name,[Rh,"__experimentalDefaultControls"]),u=e=>t=>{var n;return{...t,style:{...t.style,spacing:{...null===(n=t.style)||void 0===n?void 0:n.spacing,[e]:void 0}}}};return(0,s.createElement)(er,{__experimentalGroup:"dimensions"},!n&&(0,s.createElement)(p.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.padding)}(e),label:(0,h.__)("Padding"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:qo({...o,spacing:{...null==o?void 0:o.spacing,padding:void 0}})})}(e),resetAllFilter:u("padding"),isShownByDefault:null==c?void 0:c.padding,panelId:e.clientId},(0,s.createElement)(Mh,e)),!o&&(0,s.createElement)(p.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.margin)}(e),label:(0,h.__)("Margin"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:qo({...o,spacing:{...null==o?void 0:o.spacing,margin:void 0}})})}(e),resetAllFilter:u("margin"),isShownByDefault:null==c?void 0:c.margin,panelId:e.clientId},(0,s.createElement)(Th,e)),!t&&(0,s.createElement)(p.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.blockGap)}(e),label:(0,h.__)("Block spacing"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:{...o,spacing:{...null==o?void 0:o.spacing,blockGap:void 0}}})}(e),resetAllFilter:u("blockGap"),isShownByDefault:null==c?void 0:c.blockGap,panelId:e.clientId},(0,s.createElement)(Bh,e)))}const Oh=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=wh(e),n=Ph(e),o=xh(e);return t&&n&&o};function Fh(e,t){const n=(0,r.getBlockSupport)(e,Rh);if(n&&"boolean"!=typeof n[t])return n[t]}function zh(e,t){const n=Fh(e,t);return!(n&&n.some((e=>Lh.includes(e)))&&n.some((e=>Ah.includes(e)))&&(console.warn(`The ${t} support for the "${e}" block can not be configured to support both axial and arbitrary sides.`),1))}const Vh=[...yh,Ym,kf,Rh],Hh=e=>Vh.some((t=>(0,r.hasBlockSupport)(e,t))),Uh="var:";function Gh(e){return(0,u.startsWith)(e,Uh)?`var(--wp--${e.slice(Uh.length).split("|").join("--")})`:e}function Wh(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t={};return Object.keys(r.__EXPERIMENTAL_STYLE_PROPERTY).forEach((n=>{const o=r.__EXPERIMENTAL_STYLE_PROPERTY[n].value,l=r.__EXPERIMENTAL_STYLE_PROPERTY[n].properties;if((0,u.has)(e,o)&&"elements"!==(0,u.first)(o)){const r=(0,u.get)(e,o);l&&!(0,u.isString)(r)?Object.entries(l).forEach((e=>{const[n,o]=e,l=(0,u.get)(r,[o]);l&&(t[n]=Gh(l))})):t[n]=Gh((0,u.get)(e,o))}})),t}const $h={"__experimentalBorder.__experimentalSkipSerialization":["border"],"color.__experimentalSkipSerialization":[kf],"typography.__experimentalSkipSerialization":[_h],[`${Rh}.__experimentalSkipSerialization`]:["spacing"]},jh={...$h,[`${Rh}`]:["spacing.blockGap"]};function Kh(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:jh;if(!Hh(t))return e;let{style:l}=n;return(0,u.forEach)(o,((e,n)=>{(0,r.getBlockSupport)(t,n)&&(l=(0,u.omit)(l,e))})),e.style={...Wh(l),...e.style},e}const qh=(0,d.createHigherOrderComponent)((e=>t=>{const n=$n();return(0,s.createElement)(s.Fragment,null,n&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(wf,t),(0,s.createElement)(Eh,t),(0,s.createElement)(Zm,t),(0,s.createElement)(Dh,t)),(0,s.createElement)(e,t))}),"withToolbarControls"),Yh=(0,d.createHigherOrderComponent)((e=>t=>{var n,o;const l=null===(n=t.attributes.style)||void 0===n?void 0:n.elements,a=`wp-elements-${(0,d.useInstanceId)(e)}`,p=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,u.map)(t,((t,n)=>{const o=Wh(t);return(0,u.isEmpty)(o)?"":[`.${e} ${r.__EXPERIMENTAL_ELEMENTS[n]}{`,...(0,u.map)(o,((e,t)=>`\t${(0,u.kebabCase)(t)}: ${e};`)),"}"].join("\n")})).join("\n")}(a,null===(o=t.attributes.style)||void 0===o?void 0:o.elements),m=(0,s.useContext)(pm.__unstableElementContext);return(0,s.createElement)(s.Fragment,null,l&&m&&(0,s.createPortal)((0,s.createElement)("style",{dangerouslySetInnerHTML:{__html:p}}),m),(0,s.createElement)(e,i({},t,{className:l?c()(t.className,a):t.className})))}));(0,l.addFilter)("blocks.registerBlockType","core/style/addAttribute",(function(e){return Hh(e)?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/style/addSaveProps",Kh),(0,l.addFilter)("blocks.registerBlockType","core/style/addEditProps",(function(e){if(!Hh(e))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),Kh(o,e,n,$h)},e})),(0,l.addFilter)("editor.BlockEdit","core/style/with-block-controls",qh),(0,l.addFilter)("editor.BlockListBlock","core/editor/with-elements-styles",Yh);var Zh=function(e){let{colorPalette:t,duotonePalette:n,disableCustomColors:o,disableCustomDuotone:r,value:l,onChange:i}=e;return(0,s.createElement)(p.Dropdown,{popoverProps:{className:"block-editor-duotone-control__popover",headerTitle:(0,h.__)("Duotone"),isAlternate:!0},renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return(0,s.createElement)(p.ToolbarButton,{showTooltip:!0,onClick:n,"aria-haspopup":"true","aria-expanded":t,onKeyDown:e=>{t||e.keyCode!==va.DOWN||(e.preventDefault(),n())},label:(0,h.__)("Apply duotone filter"),icon:(0,s.createElement)(p.DuotoneSwatch,{values:l})})},renderContent:()=>(0,s.createElement)(p.MenuGroup,{label:(0,h.__)("Duotone")},(0,s.createElement)("div",{className:"block-editor-duotone-control__description"},(0,h.__)("Create a two-tone color effect without losing your original image.")),(0,s.createElement)(p.DuotonePicker,{colorPalette:t,duotonePalette:n,disableCustomColors:o,disableCustomDuotone:r,value:l,onChange:i}))})};const Xh=[];function Qh(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={r:[],g:[],b:[],a:[]};return e.forEach((e=>{const n=Rc(e).toRgb();t.r.push(n.r/255),t.g.push(n.g/255),t.b.push(n.b/255),t.a.push(n.a)})),t}function Jh(e){let{selector:t,id:n,values:o}=e;const r=`\n${t} {\n\tfilter: url( #${n} );\n}\n`;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.SVG,{xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 0 0",width:"0",height:"0",focusable:"false",role:"none",style:{visibility:"hidden",position:"absolute",left:"-9999px",overflow:"hidden"}},(0,s.createElement)("defs",null,(0,s.createElement)("filter",{id:n},(0,s.createElement)("feColorMatrix",{colorInterpolationFilters:"sRGB",type:"matrix",values:" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "}),(0,s.createElement)("feComponentTransfer",{colorInterpolationFilters:"sRGB"},(0,s.createElement)("feFuncR",{type:"table",tableValues:o.r.join(" ")}),(0,s.createElement)("feFuncG",{type:"table",tableValues:o.g.join(" ")}),(0,s.createElement)("feFuncB",{type:"table",tableValues:o.b.join(" ")}),(0,s.createElement)("feFuncA",{type:"table",tableValues:o.a.join(" ")})),(0,s.createElement)("feComposite",{in2:"SourceGraphic",operator:"in"})))),(0,s.createElement)("style",{dangerouslySetInnerHTML:{__html:r}}))}function eg(e){var t;let{attributes:n,setAttributes:o}=e;const r=null==n?void 0:n.style,l=null==r||null===(t=r.color)||void 0===t?void 0:t.duotone,i=mo("color.duotone")||Xh,a=mo("color.palette")||Xh,c=!mo("color.custom"),u=!mo("color.customDuotone")||0===(null==a?void 0:a.length)&&c;return 0===(null==i?void 0:i.length)&&u?null:(0,s.createElement)(Zn,{group:"block",__experimentalShareWithChildBlocks:!0},(0,s.createElement)(Zh,{duotonePalette:i,colorPalette:a,disableCustomDuotone:u,disableCustomColors:c,value:l,onChange:e=>{const t={...r,color:{...null==r?void 0:r.color,duotone:e}};o({style:t})}}))}Ac([Dc]);const tg=(0,d.createHigherOrderComponent)((e=>t=>{const n=(0,r.hasBlockSupport)(t.name,"color.__experimentalDuotone");return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(e,t),n&&(0,s.createElement)(eg,t))}),"withDuotoneControls"),ng=(0,d.createHigherOrderComponent)((e=>t=>{var n,o,l;const a=(0,r.getBlockSupport)(t.name,"color.__experimentalDuotone"),u=null==t||null===(n=t.attributes)||void 0===n||null===(o=n.style)||void 0===o||null===(l=o.color)||void 0===l?void 0:l.duotone;if(!a||!u)return(0,s.createElement)(e,t);const p=`wp-duotone-${(0,d.useInstanceId)(e)}`,m=function(e,t){const n=e.split(","),o=t.split(","),r=[];return n.forEach((e=>{o.forEach((t=>{r.push(`${e.trim()} ${t.trim()}`)}))})),r.join(", ")}(`.editor-styles-wrapper .${p}`,a),f=c()(null==t?void 0:t.className,p),h=(0,s.useContext)(pm.__unstableElementContext);return(0,s.createElement)(s.Fragment,null,h&&(0,s.createPortal)((0,s.createElement)(Jh,{selector:m,id:p,values:Qh(u)}),h),(0,s.createElement)(e,i({},t,{className:f})))}),"withDuotoneStyles");(0,l.addFilter)("blocks.registerBlockType","core/editor/duotone/add-attributes",(function(e){return(0,r.hasBlockSupport)(e,"color.__experimentalDuotone")?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),(0,l.addFilter)("editor.BlockEdit","core/editor/duotone/with-editor-controls",tg),(0,l.addFilter)("editor.BlockListBlock","core/editor/duotone/with-styles",ng);const og="__experimentalLayout";function rg(e){let{setAttributes:t,attributes:n,name:o}=e;const{layout:l}=n,i=mo("layout"),a=(0,m.useSelect)((e=>{const{getSettings:t}=e(Vn);return t().supportsLayout}),[]),c=(0,r.getBlockSupport)(o,og,{}),{allowSwitching:u,allowEditing:d=!0,allowInheriting:f=!0,default:g}=c;if(!d)return null;const v=l||g||{},{inherit:b=!1,type:k="default"}=v;if("default"===k&&!a)return null;const _=Io(k),y=e=>t({layout:e});return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(er,null,(0,s.createElement)(p.PanelBody,{title:(0,h.__)("Layout")},f&&!!i&&(0,s.createElement)(p.ToggleControl,{label:(0,h.__)("Inherit default layout"),checked:!!b,onChange:()=>t({layout:{inherit:!b}})}),!b&&u&&(0,s.createElement)(lg,{type:k,onChange:e=>t({layout:{type:e}})}),!b&&_&&(0,s.createElement)(_.inspectorControls,{layout:v,onChange:y,layoutBlockSupport:c}))),!b&&_&&(0,s.createElement)(_.toolBarControls,{layout:v,onChange:y,layoutBlockSupport:c}))}function lg(e){let{type:t,onChange:n}=e;return(0,s.createElement)(p.ButtonGroup,null,Bo.map((e=>{let{name:o,label:r}=e;return(0,s.createElement)(p.Button,{key:o,isPressed:t===o,onClick:()=>n(o)},r)})))}const ig=(0,d.createHigherOrderComponent)((e=>t=>{const{name:n}=t;return[(0,r.hasBlockSupport)(n,og)&&(0,s.createElement)(rg,i({key:"layout"},t)),(0,s.createElement)(e,i({key:"edit"},t))]}),"withInspectorControls"),sg=(0,d.createHigherOrderComponent)((e=>t=>{const{name:n,attributes:o}=t,l=(0,r.hasBlockSupport)(n,og),a=(0,d.useInstanceId)(e),u=mo("layout")||{},p=(0,s.useContext)(pm.__unstableElementContext),{layout:m}=o,{default:f}=(0,r.getBlockSupport)(n,og)||{},h=null!=m&&m.inherit?u:m||f||{},g=c()(null==t?void 0:t.className,{[`wp-container-${a}`]:l});return(0,s.createElement)(s.Fragment,null,l&&p&&(0,s.createPortal)((0,s.createElement)(Mo,{selector:`.wp-container-${a}`,layout:h}),p),(0,s.createElement)(e,i({},t,{className:g})))}));(0,l.addFilter)("blocks.registerBlockType","core/layout/addAttribute",(function(e){return(0,u.has)(e.attributes,["layout","type"])||(0,r.hasBlockSupport)(e,og)&&(e.attributes={...e.attributes,layout:{type:"object"}}),e})),(0,l.addFilter)("editor.BlockListBlock","core/editor/layout/with-layout-styles",sg),(0,l.addFilter)("editor.BlockEdit","core/editor/layout/with-inspector-controls",ig);const ag=[];function cg(e){var t;let{borderColor:n,style:o}=e;const r=(null==o?void 0:o.border)||{},l=Cm("border-color",n);return{className:c()({[l]:!!l,"has-border-color":n||(null==o||null===(t=o.border)||void 0===t?void 0:t.color)})||void 0,style:Wh({border:r})}}function ug(e){const t=mo("color.palette")||ag,n=cg(e);if(e.borderColor){const o=ym(t,e.borderColor);n.style.borderColor=o.color}return n}function dg(e){var t,n,o,r,l,i;const{backgroundColor:s,textColor:a,gradient:u,style:d}=e,p=Cm("background-color",s),m=Cm("color",a),f=tf(u),h=f||(null==d||null===(t=d.color)||void 0===t?void 0:t.gradient);return{className:c()(m,f,{[p]:!h&&!!p,"has-text-color":a||(null==d||null===(n=d.color)||void 0===n?void 0:n.text),"has-background":s||(null==d||null===(o=d.color)||void 0===o?void 0:o.background)||u||(null==d||null===(r=d.color)||void 0===r?void 0:r.gradient),"has-link-color":null==d||null===(l=d.elements)||void 0===l||null===(i=l.link)||void 0===i?void 0:i.color})||void 0,style:Wh({color:(null==d?void 0:d.color)||{}})}}function pg(e){const{backgroundColor:t,textColor:n,gradient:o}=e,{palette:r,gradients:l}=mo("color")||{},i=(0,s.useMemo)((()=>[...(null==r?void 0:r.custom)||[],...(null==r?void 0:r.theme)||[],...(null==r?void 0:r.default)||[]]),[r]),a=(0,s.useMemo)((()=>[...(null==l?void 0:l.custom)||[],...(null==l?void 0:l.theme)||[],...(null==l?void 0:l.default)||[]]),[l]),c=dg(e);if(t){const e=ym(i,t);c.style.backgroundColor=e.color}if(o&&(c.style.background=nf(a,o)),n){const e=ym(i,n);c.style.color=e.color}return c}function mg(e){const{style:t}=e;return{style:Wh({spacing:(null==t?void 0:t.spacing)||{}})}}function fg(e){const[t,n]=(0,s.useState)(e);return(0,s.useEffect)((()=>{e&&n(e)}),[e]),t}const hg=e=>(0,d.createHigherOrderComponent)((t=>n=>(0,s.createElement)(t,i({},n,{colors:e}))),"withCustomColorPalette"),gg=()=>(0,d.createHigherOrderComponent)((e=>t=>{const{palette:n}=mo("color")||{},o=(0,s.useMemo)((()=>[...(null==n?void 0:n.custom)||[],...(null==n?void 0:n.theme)||[],...(null==n?void 0:n.default)||[]]),[n]);return(0,s.createElement)(e,i({},t,{colors:o}))}),"withEditorColorPalette");function vg(e,t){const n=(0,u.reduce)(e,((e,t)=>({...e,...(0,u.isString)(t)?{[t]:(0,u.kebabCase)(t)}:t})),{});return(0,d.compose)([t,e=>class extends s.Component{constructor(e){super(e),this.setters=this.createSetters(),this.colorUtils={getMostReadableColor:this.getMostReadableColor.bind(this)},this.state={}}getMostReadableColor(e){const{colors:t}=this.props;return function(e,t){const n=Rc(t);return(0,u.maxBy)(e,(e=>{let{color:t}=e;return n.contrast(t)})).color}(t,e)}createSetters(){return(0,u.reduce)(n,((e,t,n)=>{const o=(0,u.upperFirst)(n),r=`custom${o}`;return e[`set${o}`]=this.createSetColor(n,r),e}),{})}createSetColor(e,t){return n=>{const o=Em(this.props.colors,n);this.props.setAttributes({[e]:o&&o.slug?o.slug:void 0,[t]:o&&o.slug?void 0:n})}}static getDerivedStateFromProps(e,t){let{attributes:o,colors:r}=e;return(0,u.reduce)(n,((e,n,l)=>{const i=ym(r,o[l],o[`custom${(0,u.upperFirst)(l)}`]),s=t[l];return(null==s?void 0:s.color)===i.color&&s?e[l]=s:e[l]={...i,class:Cm(n,i.slug)},e}),{})}render(){return(0,s.createElement)(e,i({},this.props,{colors:void 0},this.state,this.setters,{colorUtils:this.colorUtils}))}}])}function bg(e){return function(){const t=hg(e);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return(0,d.createHigherOrderComponent)(vg(o,t),"withCustomColors")}}function kg(){const e=gg();for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return(0,d.createHigherOrderComponent)(vg(n,e),"withColors")}const _g=[];var yg=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const o=(0,u.reduce)(t,((e,t)=>(e[t]=`custom${(0,u.upperFirst)(t)}`,e)),{});return(0,d.createHigherOrderComponent)((0,d.compose)([(0,d.createHigherOrderComponent)((e=>t=>{const n=mo("typography.fontSizes")||_g;return(0,s.createElement)(e,i({},t,{fontSizes:n}))}),"withFontSizes"),e=>class extends s.Component{constructor(e){super(e),this.setters=this.createSetters(),this.state={}}createSetters(){return(0,u.reduce)(o,((e,t,n)=>(e[`set${(0,u.upperFirst)(n)}`]=this.createSetFontSize(n,t),e)),{})}createSetFontSize(e,t){return n=>{const o=(0,u.find)(this.props.fontSizes,{size:Number(n)});this.props.setAttributes({[e]:o&&o.slug?o.slug:void 0,[t]:o&&o.slug?void 0:n})}}static getDerivedStateFromProps(e,t){let{attributes:n,fontSizes:r}=e;const l=(e,o)=>!t[o]||(n[o]?n[o]!==t[o].slug:t[o].size!==n[e]);if(!(0,u.some)(o,l))return null;const i=(0,u.reduce)((0,u.pickBy)(o,l),((e,t,o)=>{const l=n[o],i=jf(r,l,n[t]);return e[o]={...i,class:qf(l)},e}),{});return{...t,...i}}render(){return(0,s.createElement)(e,i({},this.props,{fontSizes:void 0},this.state,this.setters))}}]),"withFontSizes")},Eg=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M4 19.8h8.9v-1.5H4v1.5zm8.9-15.6H4v1.5h8.9V4.2zm-8.9 7v1.5h16v-1.5H4z"})),Cg=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M16.4 4.2H7.6v1.5h8.9V4.2zM4 11.2v1.5h16v-1.5H4zm3.6 8.6h8.9v-1.5H7.6v1.5z"})),Sg=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M11.1 19.8H20v-1.5h-8.9v1.5zm0-15.6v1.5H20V4.2h-8.9zM4 12.8h16v-1.5H4v1.5z"}));const wg=[{icon:Eg,title:(0,h.__)("Align text left"),align:"left"},{icon:Cg,title:(0,h.__)("Align text center"),align:"center"},{icon:Sg,title:(0,h.__)("Align text right"),align:"right"}],Bg={position:"bottom right",isAlternate:!0};var Ig=function(e){let{value:t,onChange:n,alignmentControls:o=wg,label:r=(0,h.__)("Align"),describedBy:l=(0,h.__)("Change text alignment"),isCollapsed:a=!0,isToolbar:c}=e;function d(e){return()=>n(t===e?void 0:e)}const m=(0,u.find)(o,(e=>e.align===t)),f=c?p.ToolbarGroup:p.ToolbarDropdownMenu,g=c?{isCollapsed:a}:{};return(0,s.createElement)(f,i({icon:m?m.icon:(0,h.isRTL)()?Sg:Eg,label:r,toggleProps:{describedBy:l},popoverProps:Bg,controls:o.map((e=>{const{align:n}=e,o=t===n;return{...e,isActive:o,role:a?"menuitemradio":void 0,onClick:d(n)}}))},g))};function xg(e){return(0,s.createElement)(Ig,i({},e,{isToolbar:!1}))}function Tg(e){return(0,s.createElement)(Ig,i({},e,{isToolbar:!0}))}var Ng={name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems(e){const{rootClientId:t,selectedBlockName:n}=(0,m.useSelect)((e=>{const{getSelectedBlockClientId:t,getBlockName:n,getBlockInsertionPoint:o}=e(Vn),r=t();return{selectedBlockName:r?n(r):null,rootClientId:o().rootClientId}}),[]),[o,r,l]=wu(t,u.noop),i=(0,s.useMemo)((()=>(e.trim()?Yu(o,r,l,e):(0,u.orderBy)(o,["frecency"],["desc"])).filter((e=>e.name!==n)).slice(0,9)),[e,n,o,r,l]);return[(0,s.useMemo)((()=>i.map((e=>{const{title:t,icon:n,isDisabled:o}=e;return{key:`block-${e.id}`,value:e,label:(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Ua,{key:"icon",icon:n,showColors:!0}),t),isDisabled:o}}))),[i])]},allowContext:(e,t)=>!(/\S/.test(e)||/\S/.test(t)),getOptionCompletion(e){const{name:t,initialAttributes:n,innerBlocks:o}=e;return{action:"replace",value:(0,r.createBlock)(t,n,(0,r.createBlocksFromInnerBlocksTemplate)(o))}}};const Pg=[];function Mg(e){let{completers:t=Pg}=e;const{name:n}=Wn();return(0,s.useMemo)((()=>{let e=t;return(n===(0,r.getDefaultBlockName)()||(0,r.getBlockSupport)(n,"__experimentalSlashInserter",!1))&&(e=e.concat([Ng])),(0,l.hasFilter)("editor.Autocomplete.completers")&&(e===t&&(e=e.map(u.clone)),e=(0,l.applyFilters)("editor.Autocomplete.completers",e,n)),e}),[t,n])}var Rg=function(e){return(0,s.createElement)(p.Autocomplete,i({},e,{completers:Mg(e)}))},Lg=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M4.2 9h1.5V5.8H9V4.2H4.2V9zm14 9.2H15v1.5h4.8V15h-1.5v3.2zM15 4.2v1.5h3.2V9h1.5V4.2H15zM5.8 15H4.2v4.8H9v-1.5H5.8V15z"})),Ag=function(e){let{isActive:t,label:n=(0,h.__)("Toggle full height"),onToggle:o,isDisabled:r}=e;return(0,s.createElement)(p.ToolbarButton,{isActive:t,icon:Lg,label:n,onClick:()=>o(!t),disabled:r})},Dg=function(e){const{label:t=(0,h.__)("Change matrix alignment"),onChange:n=u.noop,value:o="center",isDisabled:r}=e,l=(0,s.createElement)(p.__experimentalAlignmentMatrixControl.Icon,{value:o}),i="block-editor-block-alignment-matrix-control",a=`${i}__popover`;return(0,s.createElement)(p.Dropdown,{position:"bottom right",className:i,popoverProps:{className:a,isAlternate:!0},renderToggle:e=>{let{onToggle:n,isOpen:o}=e;return(0,s.createElement)(p.ToolbarButton,{onClick:n,"aria-haspopup":"true","aria-expanded":o,onKeyDown:e=>{o||e.keyCode!==va.DOWN||(e.preventDefault(),n())},label:t,icon:l,showTooltip:!0,disabled:r})},renderContent:()=>(0,s.createElement)(p.__experimentalAlignmentMatrixControl,{hasFocusBorder:!1,onChange:n,value:o})})},Og=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"})),Fg=function(e){let{rootLabelText:t}=e;const{selectBlock:n,clearSelectedBlock:o}=(0,m.useDispatch)(Vn),{clientId:r,parents:l,hasSelection:i}=(0,m.useSelect)((e=>{const{getSelectionStart:t,getSelectedBlockClientId:n,getBlockParents:o}=e(Vn),r=n();return{parents:o(r),clientId:r,hasSelection:!!t().clientId}}),[]),a=t||(0,h.__)("Document");return(0,s.createElement)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":(0,h.__)("Block breadcrumb")},(0,s.createElement)("li",{className:i?void 0:"block-editor-block-breadcrumb__current","aria-current":i?void 0:"true"},i&&(0,s.createElement)(p.Button,{className:"block-editor-block-breadcrumb__button",variant:"tertiary",onClick:o},a),!i&&a,!!r&&(0,s.createElement)(wo,{icon:Og,className:"block-editor-block-breadcrumb__separator"})),l.map((e=>(0,s.createElement)("li",{key:e},(0,s.createElement)(p.Button,{className:"block-editor-block-breadcrumb__button",variant:"tertiary",onClick:()=>n(e)},(0,s.createElement)(Ld,{clientId:e})),(0,s.createElement)(wo,{icon:Og,className:"block-editor-block-breadcrumb__separator"})))),!!r&&(0,s.createElement)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true"},(0,s.createElement)(Ld,{clientId:r})))};function zg(e){let{clientId:t,tagName:n="div",wrapperProps:o,className:r}=e;const[l,a]=(0,s.useState)(!0),[u,d]=(0,s.useState)(!1),{isParentSelected:p,hasChildSelected:f,isDraggingBlocks:h,isParentHighlighted:g}=(0,m.useSelect)((e=>{const{isBlockSelected:n,hasSelectedInnerBlock:o,isDraggingBlocks:r,isBlockHighlighted:l}=e(Vn);return{isParentSelected:n(t),hasChildSelected:o(t,!0),isDraggingBlocks:r(),isParentHighlighted:l(t)}}),[t]),v=c()("block-editor-block-content-overlay",null==o?void 0:o.className,r,{"overlay-active":l,"parent-highlighted":g,"is-dragging-blocks":h});return(0,s.useEffect)((()=>{p||f||l||a(!0),p&&!u&&l&&a(!1),f&&l&&a(!1)}),[p,f,l,u]),(0,s.createElement)(n,i({},o,{className:v,onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),onMouseUp:l?()=>a(!1):void 0}),null==o?void 0:o.children)}const Vg=()=>(0,s.createElement)(p.SVG,{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 20 20"},(0,s.createElement)(p.Path,{d:"M7.434 5l3.18 9.16H8.538l-.692-2.184H4.628l-.705 2.184H2L5.18 5h2.254zm-1.13 1.904h-.115l-1.148 3.593H7.44L6.304 6.904zM14.348 7.006c1.853 0 2.9.876 2.9 2.374v4.78h-1.79v-.914h-.114c-.362.64-1.123 1.022-2.031 1.022-1.346 0-2.292-.826-2.292-2.108 0-1.27.972-2.006 2.71-2.107l1.696-.102V9.38c0-.584-.42-.914-1.18-.914-.667 0-1.112.228-1.264.647h-1.701c.12-1.295 1.307-2.107 3.066-2.107zm1.079 4.1l-1.416.09c-.793.056-1.18.342-1.18.844 0 .52.45.837 1.091.837.857 0 1.505-.545 1.505-1.256v-.515z"})),Hg=e=>{let{style:t,className:n}=e;return(0,s.createElement)("div",{className:"block-library-colors-selector__icon-container"},(0,s.createElement)("div",{className:`${n} block-library-colors-selector__state-selection`,style:t},(0,s.createElement)(Vg,null)))},Ug=e=>{let{TextColor:t,BackgroundColor:n}=e;return e=>{let{onToggle:o,isOpen:r}=e;return(0,s.createElement)(p.ToolbarGroup,null,(0,s.createElement)(p.ToolbarButton,{className:"components-toolbar__control block-library-colors-selector__toggle",label:(0,h.__)("Open Colors Selector"),onClick:o,onKeyDown:e=>{r||e.keyCode!==va.DOWN||(e.preventDefault(),o())},icon:(0,s.createElement)(n,null,(0,s.createElement)(t,null,(0,s.createElement)(Hg,null)))}))}};var Gg=e=>{let{children:t,...n}=e;return(0,s.createElement)(p.Dropdown,{position:"bottom right",className:"block-library-colors-selector",contentClassName:"block-library-colors-selector__popover",renderToggle:Ug(n),renderContent:()=>t})},Wg=(0,s.createElement)(F.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(F.Path,{d:"M13.8 5.2H3v1.5h10.8V5.2zm-3.6 12v1.5H21v-1.5H10.2zm7.2-6H6.6v1.5h10.8v-1.5z"}));const $g=na(p.__experimentalTreeGridRow);function jg(e){let{isSelected:t,position:n,level:o,rowCount:r,children:l,className:a,path:u,...d}=e;const p=la({isSelected:t,adjustScrolling:!1,enableAnimation:!0,triggerAnimationOnChange:u});return(0,s.createElement)($g,i({ref:p,className:c()("block-editor-list-view-leaf",a),level:o,positionInSet:n,setSize:r},d),l)}function Kg(e){let{onClick:t}=e;return(0,s.createElement)("span",{className:"block-editor-list-view__expander",onClick:e=>t(e,{forceToggle:!0}),"aria-hidden":"true"},(0,s.createElement)(wo,{icon:Og}))}var qg=(0,s.forwardRef)((function e(t,n){let{className:o,block:{clientId:r},isSelected:l,onClick:i,onToggleExpanded:a,position:u,siblingBlockCount:m,level:f,tabIndex:g,onFocus:v,onDragStart:b,onDragEnd:k,draggable:_}=t;const y=Rd(r),E=`list-view-block-select-button__${(0,d.useInstanceId)(e)}`,C=((e,t,n)=>(0,h.sprintf)(
67
  /* translators: 1: The numerical position of the block. 2: The total number of blocks. 3. The level of nesting for the block. */
68
+ (0,h.__)("Block %1$d of %2$d, Level %3$d"),e,t,n))(u,m,f);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.Button,{className:c()("block-editor-list-view-block-select-button",o),onClick:i,onKeyDown:function(e){e.keyCode!==va.ENTER&&e.keyCode!==va.SPACE||(e.preventDefault(),i(e))},"aria-describedby":E,ref:n,tabIndex:g,onFocus:v,onDragStart:e=>{e.dataTransfer.clearData(),b(e)},onDragEnd:k,draggable:_,href:`#block-${r}`},(0,s.createElement)(Kg,{onClick:a}),(0,s.createElement)(Ua,{icon:null==y?void 0:y.icon,showColors:!0}),(0,s.createElement)(Ld,{clientId:r}),(null==y?void 0:y.anchor)&&(0,s.createElement)("span",{className:"block-editor-list-view-block-select-button__anchor"},y.anchor),l&&(0,s.createElement)(p.VisuallyHidden,null,(0,h.__)("(selected block)"))),(0,s.createElement)("div",{className:"block-editor-list-view-block-select-button__description",id:E},C))})),Yg=(0,s.forwardRef)(((e,t)=>{let{onClick:n,onToggleExpanded:o,block:r,isSelected:l,position:a,siblingBlockCount:u,level:d,...p}=e;const{clientId:f}=r,{blockMovingClientId:h,selectedBlockInBlockEditor:g}=(0,m.useSelect)((e=>{const{getBlockRootClientId:t,hasBlockMovingClientId:n,getSelectedBlockClientId:o}=e(Vn);return{rootClientId:t(f)||"",blockMovingClientId:n(),selectedBlockInBlockEditor:o()}}),[f]),v=h&&g===f,b=c()("block-editor-list-view-block-contents",{"is-dropping-before":v});return(0,s.createElement)(Ad,{clientIds:[r.clientId]},(e=>{let{draggable:c,onDragStart:m,onDragEnd:f}=e;return(0,s.createElement)(qg,i({ref:t,className:b,block:r,onClick:n,onToggleExpanded:o,isSelected:l,position:a,siblingBlockCount:u,level:d,draggable:c,onDragStart:m,onDragEnd:f},p))}))}));const Zg=(0,s.createContext)({__experimentalFeatures:!1,__experimentalPersistentListViewFeatures:!1}),Xg=()=>(0,s.useContext)(Zg);var Qg=(0,s.memo)((function(e){let{block:t,isDragged:n,isSelected:o,isBranchSelected:r,selectBlock:l,position:i,level:a,rowCount:u,siblingBlockCount:d,showBlockMovers:f,path:h,isExpanded:g}=e;const v=(0,s.useRef)(null),[b,k]=(0,s.useState)(!1),{clientId:_}=t,{toggleBlockHighlight:y}=(0,m.useDispatch)(Vn),{__experimentalFeatures:E,__experimentalPersistentListViewFeatures:C,__experimentalHideContainerBlockActions:S,isTreeGridMounted:w,expand:B,collapse:I}=Xg(),x=f&&d>0,T=c()("block-editor-list-view-block__mover-cell",{"is-visible":b||o}),N=c()("block-editor-list-view-block__menu-cell",{"is-visible":b||o});(0,s.useEffect)((()=>{C&&!w&&o&&v.current.focus()}),[]);const P=C?y:()=>{},M=(0,s.useCallback)((()=>{k(!0),P(_,!0)}),[_,k,P]),R=(0,s.useCallback)((()=>{k(!1),P(_,!1)}),[_,k,P]),L=(0,s.useCallback)((e=>{e.stopPropagation(),l(_)}),[_,l]),A=(0,s.useCallback)((e=>{e.stopPropagation(),!0===g?I(_):!1===g&&B(_)}),[_,B,I,g]),D=E&&(!S||S&&a>1),O=E&&!D;let F;x?F=2:O&&(F=3);const z=c()({"is-selected":o,"is-branch-selected":C&&r,"is-dragging":n,"has-single-cell":O});return(0,s.createElement)(jg,{className:z,onMouseEnter:M,onMouseLeave:R,onFocus:M,onBlur:R,level:a,position:i,rowCount:u,path:h,id:`list-view-block-${_}`,"data-block":_,isExpanded:g},(0,s.createElement)(p.__experimentalTreeGridCell,{className:"block-editor-list-view-block__contents-cell",colSpan:F,ref:v},(e=>{let{ref:n,tabIndex:r,onFocus:l}=e;return(0,s.createElement)("div",{className:"block-editor-list-view-block__contents-container"},(0,s.createElement)(Yg,{block:t,onClick:L,onToggleExpanded:A,isSelected:o,position:i,siblingBlockCount:d,level:a,ref:n,tabIndex:r,onFocus:l}))})),x&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.__experimentalTreeGridCell,{className:T,withoutGridItem:!0},(0,s.createElement)(p.__experimentalTreeGridItem,null,(e=>{let{ref:t,tabIndex:n,onFocus:o}=e;return(0,s.createElement)(jd,{orientation:"vertical",clientIds:[_],ref:t,tabIndex:n,onFocus:o})})),(0,s.createElement)(p.__experimentalTreeGridItem,null,(e=>{let{ref:t,tabIndex:n,onFocus:o}=e;return(0,s.createElement)(Kd,{orientation:"vertical",clientIds:[_],ref:t,tabIndex:n,onFocus:o})})))),D&&(0,s.createElement)(p.__experimentalTreeGridCell,{className:N},(e=>{let{ref:t,tabIndex:n,onFocus:o}=e;return(0,s.createElement)(Fp,{clientIds:[_],icon:_p,toggleProps:{ref:t,className:"block-editor-list-view-block__menu",tabIndex:n,onFocus:o},disableOpenOnArrowDown:!0,__experimentalSelectBlock:L})})))}));function Jg(e,t,n){var o;return(null==n?void 0:n.includes(e.clientId))?0:null===(o=t[e.clientId])||void 0===o||o?1+e.innerBlocks.reduce(ev(t,n),0):1}const ev=(e,t)=>(n,o)=>{var r;return(null==t?void 0:t.includes(o.clientId))?n:(null===(r=e[o.clientId])||void 0===r||r)&&o.innerBlocks.length>0?n+Jg(o,e,t):n+1};function tv(e){const{blocks:t,selectBlock:n,showBlockMovers:o,showNestedBlocks:r,selectedClientIds:l,level:i=1,path:a="",isBranchSelected:c=!1,listPosition:d=0,fixedListWindow:p}=e,{expandedState:f,draggedClientIds:h,__experimentalPersistentListViewFeatures:g}=Xg(),v=(0,u.compact)(t),b=v.length;let k=d;return(0,s.createElement)(s.Fragment,null,v.map(((e,t)=>{var d;const{clientId:_,innerBlocks:y}=e;t>0&&(k+=Jg(v[t-1],f,h));const E=g,{itemInView:C}=p,S=!E||C(k),w=t+1,B=a.length>0?`${a}_${w}`:`${w}`,I=r&&!!y&&!!y.length,x=I?null===(d=f[_])||void 0===d||d:void 0,T=!(null==h||!h.includes(_)),N=T||S,P=((e,t)=>(0,u.isArray)(t)&&t.length?-1!==t.indexOf(e):t===e)(_,l),M=c||P&&I;return(0,s.createElement)(m.AsyncModeProvider,{key:_,value:!P},N&&(0,s.createElement)(Qg,{block:e,selectBlock:n,isSelected:P,isBranchSelected:M,isDragged:T,level:i,position:w,rowCount:b,siblingBlockCount:b,showBlockMovers:o,path:B,isExpanded:x,listPosition:k}),!N&&(0,s.createElement)("tr",null,(0,s.createElement)("td",{className:"block-editor-list-view-placeholder"})),I&&x&&!T&&(0,s.createElement)(tv,{blocks:y,selectBlock:n,showBlockMovers:o,showNestedBlocks:r,level:i+1,path:B,listPosition:k+1,fixedListWindow:p,isBranchSelected:M,selectedClientIds:l}))})))}tv.defaultProps={selectBlock:()=>{}};var nv=(0,s.memo)(tv);function ov(e){let{listViewRef:t,blockDropTarget:n}=e;const{rootClientId:o,clientId:r,dropPosition:l}=n||{},[i,a]=(0,s.useMemo)((()=>t.current?[o?t.current.querySelector(`[data-block="${o}"]`):void 0,r?t.current.querySelector(`[data-block="${r}"]`):void 0]:[]),[o,r]),c=a||i,u=(0,s.useCallback)((()=>{if(!i)return 0;const e=c.getBoundingClientRect();return i.querySelector(".block-editor-block-icon").getBoundingClientRect().right-e.left}),[i,c]),d=(0,s.useMemo)((()=>{if(!c)return{};const e=u();return{width:c.offsetWidth-e}}),[u,c]),m=(0,s.useCallback)((()=>{if(!c)return{};const e=c.ownerDocument,t=c.getBoundingClientRect(),n=u(),o={left:t.left+n,right:t.right,width:0,height:t.height,ownerDocument:e};return"top"===l?{...o,top:t.top,bottom:t.top}:"bottom"===l||"inside"===l?{...o,top:t.bottom,bottom:t.bottom}:{}}),[c,l,u]);return c?(0,s.createElement)(p.Popover,{noArrow:!0,animate:!1,getAnchorRect:m,focusOnMount:!1,className:"block-editor-list-view-drop-indicator"},(0,s.createElement)("div",{style:d,className:"block-editor-list-view-drop-indicator__line"})):null}function rv(e,t){return t.left<=e.x&&t.right>=e.x&&t.top<=e.y&&t.bottom>=e.y}const lv=["top","bottom"];const iv=()=>{},sv=(e,t)=>{switch(t.type){case"expand":return{...e,[t.clientId]:!0};case"collapse":return{...e,[t.clientId]:!1};default:return e}};var av=(0,s.forwardRef)((function(e,t){let{blocks:n,onSelect:o=iv,__experimentalFeatures:r,__experimentalPersistentListViewFeatures:l,__experimentalHideContainerBlockActions:a,showNestedBlocks:c,showBlockMovers:u,...f}=e;const{clientIdsTree:g,draggedClientIds:v,selectedClientIds:b}=function(e){return(0,m.useSelect)((t=>{const{getDraggedBlockClientIds:n,getSelectedBlockClientIds:o,__unstableGetClientIdsTree:r}=t(Vn);return{selectedClientIds:o(),draggedClientIds:n(),clientIdsTree:e||r()}}),[e])}(n),{selectBlock:k}=(0,m.useDispatch)(Vn),{visibleBlockCount:_}=(0,m.useSelect)((e=>{const{getGlobalBlockCount:t,getClientIdsOfDescendants:n}=e(Vn),o=(null==v?void 0:v.length)>0?n(v).length+1:0;return{visibleBlockCount:t()-o}}),[v]),y=(0,s.useCallback)((e=>{k(e),o(e)}),[k,o]),[E,C]=(0,s.useReducer)(sv,{}),{ref:S,target:w}=function(){const{getBlockRootClientId:e,getBlockIndex:t,getBlockCount:n,getDraggedBlockClientIds:o,canInsertBlocks:r}=(0,m.useSelect)(Vn),[l,i]=(0,s.useState)(),{rootClientId:a,blockIndex:c}=l||{},u=Jp(a,c),p=o(),f=(0,d.useThrottle)((0,s.useCallback)(((o,l)=>{const s={x:o.clientX,y:o.clientY},a=!(null==p||!p.length),c=function(e,t){let n,o,r,l;for(const i of e){if(i.isDraggedBlock)continue;const s=i.element.getBoundingClientRect(),[a,c]=tm(t,s,lv),u=rv(t,s);if(void 0===r||a<r||u){r=a;const t=e.indexOf(i),d=e[t-1];if("top"===c&&d&&d.rootClientId===i.rootClientId&&!d.isDraggedBlock?(o=d,n="bottom",l=d.element.getBoundingClientRect()):(o=i,n=c,l=s),u)break}}if(!o)return;const i="bottom"===n;if(i&&o.canInsertDraggedBlocksAsChild&&(o.innerBlockCount>0||function(e,t){const n=t.left+t.width/2;return e.x>n}(t,l)))return{rootClientId:o.clientId,blockIndex:0,dropPosition:"inside"};if(!o.canInsertDraggedBlocksAsSibling)return;const s=i?1:0;return{rootClientId:o.rootClientId,clientId:o.clientId,blockIndex:o.blockIndex+s,dropPosition:n}}(Array.from(l.querySelectorAll("[data-block]")).map((o=>{const l=o.dataset.block,i=e(l);return{clientId:l,rootClientId:i,blockIndex:t(l,i),element:o,isDraggedBlock:!!a&&p.includes(l),innerBlockCount:n(l),canInsertDraggedBlocksAsSibling:!a||r(p,i),canInsertDraggedBlocksAsChild:!a||r(p,l)}})),s);c&&i(c)}),[p]),200);return{ref:(0,d.__experimentalUseDropZone)({onDrop:u,onDragOver(e){f(e,e.currentTarget)},onDragEnd(){f.cancel(),i(null)}}),target:l}}(),B=(0,s.useRef)(),I=(0,d.useMergeRefs)([B,S,t]),x=(0,s.useRef)(!1);(0,s.useEffect)((()=>{x.current=!0}),[]);const[T]=(0,d.__experimentalUseFixedWindowList)(B,36,_,{useWindowing:l,windowOverscan:40}),N=(0,s.useCallback)((e=>{e&&C({type:"expand",clientId:e})}),[C]),P=(0,s.useCallback)((e=>{e&&C({type:"collapse",clientId:e})}),[C]),M=(0,s.useCallback)((e=>{var t;N(null==e||null===(t=e.dataset)||void 0===t?void 0:t.block)}),[N]),R=(0,s.useCallback)((e=>{var t;P(null==e||null===(t=e.dataset)||void 0===t?void 0:t.block)}),[P]),L=(0,s.useMemo)((()=>({__experimentalFeatures:r,__experimentalPersistentListViewFeatures:l,__experimentalHideContainerBlockActions:a,isTreeGridMounted:x.current,draggedClientIds:v,expandedState:E,expand:N,collapse:P})),[r,l,a,x.current,v,E,N,P]);return(0,s.createElement)(m.AsyncModeProvider,{value:!0},(0,s.createElement)(ov,{listViewRef:B,blockDropTarget:w}),(0,s.createElement)(p.__experimentalTreeGrid,{className:"block-editor-list-view-tree","aria-label":(0,h.__)("Block navigation structure"),ref:I,onCollapseRow:R,onExpandRow:M},(0,s.createElement)(Zg.Provider,{value:L},(0,s.createElement)(nv,i({blocks:g,selectBlock:y,showNestedBlocks:c,showBlockMovers:u,fixedListWindow:T,selectedClientIds:b},f)))))}));function cv(e){let{isEnabled:t,onToggle:n,isOpen:o,innerRef:r,...l}=e;return(0,s.createElement)(p.Button,i({},l,{ref:r,icon:Wg,"aria-expanded":o,"aria-haspopup":"true",onClick:t?n:void 0
69
+ /* translators: button label text should, if possible, be under 16 characters. */,label:(0,h.__)("List view"),className:"block-editor-block-navigation","aria-disabled":!t}))}var uv=(0,s.forwardRef)((function(e,t){let{isDisabled:n,__experimentalFeatures:o,...r}=e;const l=(0,m.useSelect)((e=>!!e(Vn).getBlockCount()),[])&&!n;return(0,s.createElement)(p.Dropdown,{contentClassName:"block-editor-block-navigation__popover",position:"bottom right",renderToggle:e=>{let{isOpen:n,onToggle:o}=e;return(0,s.createElement)(cv,i({},r,{innerRef:t,isOpen:n,onToggle:o,isEnabled:l}))},renderContent:()=>(0,s.createElement)("div",{className:"block-editor-block-navigation__container"},(0,s.createElement)("p",{className:"block-editor-block-navigation__label"},(0,h.__)("List view")),(0,s.createElement)(av,{showNestedBlocks:!0,__experimentalFeatures:o}))})}));function dv(e){let{genericPreviewBlock:t,style:n,className:o,activeStyle:r}=e;const l=sp(o,r,n),i=(0,s.useMemo)((()=>({...t,title:n.label||n.name,description:n.description,initialAttributes:{...t.attributes,className:l+" block-editor-block-styles__block-preview-container"}})),[t,l]);return(0,s.createElement)(mu,{item:i,isStylePreview:!0})}function pv(e){let{children:t,scope:n,...o}=e;return(0,s.createElement)(p.Fill,{name:`BlockStylesPreviewPanel/${n}`},(0,s.createElement)("div",o,t))}function mv(e){let{clientId:t,onSwitch:n=u.noop,onHoverClassName:o=u.noop,scope:r}=e;const{onSelect:l,stylesToRender:i,activeStyle:a,genericPreviewBlock:m,className:f}=cp({clientId:t,onSwitch:n}),[h,g]=(0,s.useState)(null),[v,b]=(0,s.useState)(0),k=(0,d.useViewportMatch)("medium","<");if((0,s.useLayoutEffect)((()=>{const e=document.querySelector(".interface-interface-skeleton__content"),t=(null==e?void 0:e.scrollTop)||0;b(t+16)}),[h]),!i||0===i.length)return null;const _=(0,u.debounce)(g,250),y=e=>{l(e),o(null),g(null),_.cancel()},E=e=>{var t;h!==e?(_(e),o(null!==(t=null==e?void 0:e.name)&&void 0!==t?t:null)):_.cancel()};return(0,s.createElement)("div",{className:"block-editor-block-styles"},(0,s.createElement)("div",{className:"block-editor-block-styles__variants"},i.map((e=>{const t=e.label||e.name;return(0,s.createElement)(p.Button,{className:c()("block-editor-block-styles__item",{"is-active":a.name===e.name}),key:e.name,variant:"secondary",label:t,onMouseEnter:()=>E(e),onFocus:()=>E(e),onMouseLeave:()=>E(null),onBlur:()=>E(null),onKeyDown:t=>{va.ENTER!==t.keyCode&&va.SPACE!==t.keyCode||(t.preventDefault(),y(e))},onClick:()=>y(e),role:"button",tabIndex:"0"},(0,s.createElement)(p.__experimentalText,{as:"span",limit:12,ellipsizeMode:"tail",className:"block-editor-block-styles__item-text",truncate:!0},t))}))),h&&!k&&(0,s.createElement)(pv,{scope:r,className:"block-editor-block-styles__preview-panel",style:{top:v},onMouseLeave:()=>E(null)},(0,s.createElement)(dv,{activeStyle:a,className:f,genericPreviewBlock:m,style:h})))}mv.Slot=function(e){let{scope:t}=e;return(0,s.createElement)(p.Slot,{name:`BlockStylesPreviewPanel/${t}`})};var fv=mv,hv=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})),gv=function(e){let{icon:t=hv,label:n=(0,h.__)("Choose variation"),instructions:o=(0,h.__)("Select a variation to start with."),variations:r,onSelect:l,allowSkip:i}=e;const a=c()("block-editor-block-variation-picker",{"has-many-variations":r.length>4});return(0,s.createElement)(p.Placeholder,{icon:t,label:n,instructions:o,className:a},(0,s.createElement)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":(0,h.__)("Block variations")},r.map((e=>(0,s.createElement)("li",{key:e.name},(0,s.createElement)(p.Button,{variant:"secondary",icon:e.icon,iconSize:48,onClick:()=>l(e),className:"block-editor-block-variation-picker__variation",label:e.description||e.title}),(0,s.createElement)("span",{className:"block-editor-block-variation-picker__variation-label",role:"presentation"},e.title))))),i&&(0,s.createElement)("div",{className:"block-editor-block-variation-picker__skip"},(0,s.createElement)(p.Button,{variant:"link",onClick:()=>l()},(0,h.__)("Skip"))))},vv=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7.8 16.5H5c-.3 0-.5-.2-.5-.5v-6.2h6.8v6.7zm0-8.3H4.5V5c0-.3.2-.5.5-.5h6.2v6.7zm8.3 7.8c0 .3-.2.5-.5.5h-6.2v-6.8h6.8V19zm0-7.8h-6.8V4.5H19c.3 0 .5.2.5.5v6.2z",fillRule:"evenodd",clipRule:"evenodd"}));const bv="carousel",kv="grid",_v=e=>{let{onStartBlank:t,onBlockPatternSelect:n}=e;return(0,s.createElement)("div",{className:"block-editor-block-pattern-setup__actions"},(0,s.createElement)(p.Button,{onClick:t},(0,h.__)("Start blank")),(0,s.createElement)(p.Button,{variant:"primary",onClick:n},(0,h.__)("Choose")))},yv=e=>{let{handlePrevious:t,handleNext:n,activeSlide:o,totalSlides:r}=e;return(0,s.createElement)("div",{className:"block-editor-block-pattern-setup__navigation"},(0,s.createElement)(p.Button,{icon:Vd,label:(0,h.__)("Previous pattern"),onClick:t,disabled:0===o}),(0,s.createElement)(p.Button,{icon:zd,label:(0,h.__)("Next pattern"),onClick:n,disabled:o===r-1}))};var Ev=e=>{let{viewMode:t,setViewMode:n,handlePrevious:o,handleNext:r,activeSlide:l,totalSlides:i,onBlockPatternSelect:a,onStartBlank:c}=e;const u=t===bv,d=(0,s.createElement)("div",{className:"block-editor-block-pattern-setup__display-controls"},(0,s.createElement)(p.Button,{icon:no,label:(0,h.__)("Carousel view"),onClick:()=>n(bv),isPressed:u}),(0,s.createElement)(p.Button,{icon:vv,label:(0,h.__)("Grid view"),onClick:()=>n(kv),isPressed:t===kv}));return(0,s.createElement)("div",{className:"block-editor-block-pattern-setup__toolbar"},u&&(0,s.createElement)(yv,{handlePrevious:o,handleNext:r,activeSlide:l,totalSlides:i}),d,u&&(0,s.createElement)(_v,{onBlockPatternSelect:a,onStartBlank:c}))};const Cv=e=>{let{viewMode:t,activeSlide:n,patterns:o,onBlockPatternSelect:r}=e;const l=(0,p.__unstableUseCompositeState)(),a="block-editor-block-pattern-setup__container";if(t===bv){const e=new Map([[n,"active-slide"],[n-1,"previous-slide"],[n+1,"next-slide"]]);return(0,s.createElement)("div",{className:a},(0,s.createElement)("ul",{className:"carousel-container"},o.map(((t,n)=>(0,s.createElement)(wv,{className:e.get(n)||"",key:t.name,pattern:t})))))}return(0,s.createElement)(p.__unstableComposite,i({},l,{role:"listbox",className:a,"aria-label":(0,h.__)("Patterns list")}),o.map((e=>(0,s.createElement)(Sv,{key:e.name,pattern:e,onSelect:r,composite:l}))))};function Sv(e){let{pattern:t,onSelect:n,composite:o}=e;const r="block-editor-block-pattern-setup-list",{blocks:l,title:a,description:c,viewportWidth:u=700}=t,m=(0,d.useInstanceId)(Sv,`${r}__item-description`);return(0,s.createElement)("div",{className:`${r}__list-item`,"aria-label":t.title,"aria-describedby":t.description?m:void 0},(0,s.createElement)(p.__unstableCompositeItem,i({role:"option",as:"div"},o,{className:`${r}__item`,onClick:()=>n(l)}),(0,s.createElement)(pu,{blocks:l,viewportWidth:u}),(0,s.createElement)("div",{className:`${r}__item-title`},a)),!!c&&(0,s.createElement)(p.VisuallyHidden,{id:m},c))}function wv(e){let{className:t,pattern:n}=e;const{blocks:o,title:r,description:l}=n,i=(0,d.useInstanceId)(wv,"block-editor-block-pattern-setup-list__item-description");return(0,s.createElement)("li",{className:`pattern-slide ${t}`,"aria-label":r,"aria-describedby":l?i:void 0},(0,s.createElement)(pu,{blocks:o,__experimentalLive:!0}),!!l&&(0,s.createElement)(p.VisuallyHidden,{id:i},l))}var Bv=e=>{let{clientId:t,blockName:n,filterPatternsFn:o,startBlankComponent:l,onBlockPatternSelect:i}=e;const[a,c]=(0,s.useState)(bv),[u,d]=(0,s.useState)(0),[p,f]=(0,s.useState)(!1),{replaceBlock:h}=(0,m.useDispatch)(Vn),g=function(e,t,n){return(0,m.useSelect)((o=>{const{getBlockRootClientId:r,__experimentalGetPatternsByBlockTypes:l,__experimentalGetAllowedPatterns:i}=o(Vn),s=r(e);return n?i(s).filter(n):l(t,s)}),[e,t,n])}(t,n,o);if(null==g||!g.length||p)return l;const v=i||(e=>{const n=e.map((e=>(0,r.cloneBlock)(e)));h(t,n)});return(0,s.createElement)("div",{className:`block-editor-block-pattern-setup view-mode-${a}`},(0,s.createElement)(Ev,{viewMode:a,setViewMode:c,activeSlide:u,totalSlides:g.length,handleNext:()=>{d((e=>e+1))},handlePrevious:()=>{d((e=>e-1))},onBlockPatternSelect:()=>{v(g[u].blocks)},onStartBlank:()=>{f(!0)}}),(0,s.createElement)(Cv,{viewMode:a,activeSlide:u,patterns:g,onBlockPatternSelect:v}))};const Iv=(e,t)=>{if(!t||!e)return;const n=t.filter((t=>{let{attributes:n}=t;return!(!n||!Object.keys(n).length)&&(0,u.isMatch)(e,n)}));return 1===n.length?n[0]:void 0};var xv=function(e){let{blockClientId:t}=e;const[n,o]=(0,s.useState)(),{updateBlockAttributes:l}=(0,m.useDispatch)(Vn),{variations:i,blockAttributes:a}=(0,m.useSelect)((e=>{const{getBlockVariations:n}=e(r.store),{getBlockName:o,getBlockAttributes:l}=e(Vn),i=t&&o(t);return{variations:i&&n(i,"transform"),blockAttributes:l(t)}}),[t]);if((0,s.useEffect)((()=>{var e;o(null===(e=Iv(a,i))||void 0===e?void 0:e.name)}),[a,i]),null==i||!i.length)return null;const c=i.map((e=>{let{name:t,title:n,description:o}=e;return{value:t,label:n,info:o}})),u=e=>{l(t,{...i.find((t=>{let{name:n}=t;return n===e})).attributes})},d="block-editor-block-variation-transforms";return(0,s.createElement)(p.DropdownMenu,{className:d,label:(0,h.__)("Transform to variation"),text:(0,h.__)("Transform to variation"),popoverProps:{position:"bottom center",className:`${d}__popover`},icon:Ud,toggleProps:{iconPosition:"right"}},(()=>(0,s.createElement)("div",{className:`${d}__container`},(0,s.createElement)(p.MenuGroup,null,(0,s.createElement)(p.MenuItemsChoice,{choices:c,value:n,onSelect:u})))))};const Tv=(0,s.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(p.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),Nv=(0,s.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(p.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})),Pv={top:{icon:(0,s.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(p.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),title:(0,h._x)("Align top","Block vertical alignment setting")},center:{icon:Nv,title:(0,h._x)("Align middle","Block vertical alignment setting")},bottom:{icon:Tv,title:(0,h._x)("Align bottom","Block vertical alignment setting")}},Mv=["top","center","bottom"],Rv={isAlternate:!0};var Lv=function(e){let{value:t,onChange:n,controls:o=Mv,isCollapsed:r=!0,isToolbar:l}=e;const a=Pv[t],c=Pv.top,u=l?p.ToolbarGroup:p.ToolbarDropdownMenu,d=l?{isCollapsed:r}:{};return(0,s.createElement)(u,i({popoverProps:Rv,icon:a?a.icon:c.icon,label:(0,h._x)("Change vertical alignment","Block vertical alignment setting label"),controls:o.map((e=>{return{...Pv[e],isActive:t===e,role:r?"menuitemradio":void 0,onClick:(o=e,()=>n(t===o?void 0:o))};var o}))},d))};function Av(e){return(0,s.createElement)(Lv,i({},e,{isToolbar:!1}))}function Dv(e){return(0,s.createElement)(Lv,i({},e,{isToolbar:!0}))}var Ov=(0,d.createHigherOrderComponent)((e=>t=>{const n=mo("color.palette"),o=!mo("color.custom"),r=void 0===t.colors?n:t.colors,l=void 0===t.disableCustomColors?o:t.disableCustomColors,a=!(0,u.isEmpty)(r)||!l;return(0,s.createElement)(e,i({},t,{colors:r,disableCustomColors:l,hasColorsToChoose:a}))}),"withColorContext"),Fv=Ov(p.ColorPalette);function zv(e){let{onChange:t,value:n,...o}=e;return(0,s.createElement)(bm,i({},o,{onColorChange:t,colorValue:n,gradients:[],disableCustomGradients:!0}))}var Vv=function(e,t){return(Vv=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},Hv=function(){return(Hv=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function Uv(e,t,n,o){void 0===o&&(o=0);var r=Jv(e,t,o),l=r.width,i=r.height;return e>=t*n&&l>t*n?{width:t*n,height:t}:l>t*n?{width:e,height:e/n}:l>i*n?{width:i*n,height:i}:{width:l,height:l/n}}function Gv(e,t,n,o,r){void 0===r&&(r=0);var l=Jv(t.width,t.height,r),i=l.width,s=l.height;return{x:Wv(e.x,i,n.width,o),y:Wv(e.y,s,n.height,o)}}function Wv(e,t,n,o){var r=t*o/2-n/2;return Math.min(r,Math.max(e,-r))}function $v(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function jv(e,t){return 180*Math.atan2(t.y-e.y,t.x-e.x)/Math.PI}function Kv(e,t,n,o,r,l,i){void 0===l&&(l=0),void 0===i&&(i=!0);var s=i&&0===l?qv:Yv,a={x:s(100,((t.width-n.width/r)/2-e.x/r)/t.width*100),y:s(100,((t.height-n.height/r)/2-e.y/r)/t.height*100),width:s(100,n.width/t.width*100/r),height:s(100,n.height/t.height*100/r)},c=Math.round(s(t.naturalWidth,a.width*t.naturalWidth/100)),u=Math.round(s(t.naturalHeight,a.height*t.naturalHeight/100)),d=t.naturalWidth>=t.naturalHeight*o?{width:Math.round(u*o),height:u}:{width:c,height:Math.round(c/o)};return{croppedAreaPercentages:a,croppedAreaPixels:Hv(Hv({},d),{x:Math.round(s(t.naturalWidth-d.width,a.x*t.naturalWidth/100)),y:Math.round(s(t.naturalHeight-d.height,a.y*t.naturalHeight/100))})}}function qv(e,t){return Math.min(e,Math.max(0,t))}function Yv(e,t){return t}function Zv(e,t,n){var o=t.width/t.naturalWidth,r=function(e,t,n){var o=t.width/t.naturalWidth;if(n)return n.height>n.width?n.height/o/e.height:n.width/o/e.width;var r=e.width/e.height;return t.naturalWidth>=t.naturalHeight*r?t.naturalHeight/e.height:t.naturalWidth/e.width}(e,t,n),l=o*r;return{crop:{x:((t.naturalWidth-e.width)/2-e.x)*l,y:((t.naturalHeight-e.height)/2-e.y)*l},zoom:r}}function Xv(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function Qv(e,t,n,o,r){var l=Math.cos,i=Math.sin,s=r*Math.PI/180;return[(e-n)*l(s)-(t-o)*i(s)+n,(e-n)*i(s)+(t-o)*l(s)+o]}function Jv(e,t,n){var o=e/2,r=t/2,l=[Qv(0,0,o,r,n),Qv(e,0,o,r,n),Qv(e,t,o,r,n),Qv(0,t,o,r,n)],i=Math.min.apply(Math,l.map((function(e){return e[0]}))),s=Math.max.apply(Math,l.map((function(e){return e[0]}))),a=Math.min.apply(Math,l.map((function(e){return e[1]})));return{width:s-i,height:Math.max.apply(Math,l.map((function(e){return e[1]})))-a}}function eb(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter((function(e){return"string"==typeof e&&e.length>0})).join(" ").trim()}var tb=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.imageRef=null,n.videoRef=null,n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.state={cropSize:null,hasWheelJustStarted:!1},n.preventZoomSafari=function(e){return e.preventDefault()},n.cleanEvents=function(){document.removeEventListener("mousemove",n.onMouseMove),document.removeEventListener("mouseup",n.onDragStopped),document.removeEventListener("touchmove",n.onTouchMove),document.removeEventListener("touchend",n.onDragStopped)},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){n.computeSizes(),n.emitCropData(),n.setInitialCrop(),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(){var e=n.props,t=e.initialCroppedAreaPixels,o=e.cropSize;if(t){var r=Zv(t,n.mediaSize,o),l=r.crop,i=r.zoom;n.props.onCropChange(l),n.props.onZoomChange&&n.props.onZoomChange(i)}},n.computeSizes=function(){var e,t,o,r,l=n.imageRef||n.videoRef;if(l){n.mediaSize={width:l.offsetWidth,height:l.offsetHeight,naturalWidth:(null===(e=n.imageRef)||void 0===e?void 0:e.naturalWidth)||(null===(t=n.videoRef)||void 0===t?void 0:t.videoWidth)||0,naturalHeight:(null===(o=n.imageRef)||void 0===o?void 0:o.naturalHeight)||(null===(r=n.videoRef)||void 0===r?void 0:r.videoHeight)||0};var i=n.props.cropSize?n.props.cropSize:Uv(l.offsetWidth,l.offsetHeight,n.props.aspect,n.props.rotation);n.setState({cropSize:i},n.recomputeCropPosition)}n.containerRef&&(n.containerRect=n.containerRef.getBoundingClientRect())},n.onMouseDown=function(e){e.preventDefault(),document.addEventListener("mousemove",n.onMouseMove),document.addEventListener("mouseup",n.onDragStopped),n.onDragStart(t.getMousePoint(e))},n.onMouseMove=function(e){return n.onDrag(t.getMousePoint(e))},n.onTouchStart=function(e){e.preventDefault(),document.addEventListener("touchmove",n.onTouchMove,{passive:!1}),document.addEventListener("touchend",n.onDragStopped),2===e.touches.length?n.onPinchStart(e):1===e.touches.length&&n.onDragStart(t.getTouchPoint(e.touches[0]))},n.onTouchMove=function(e){e.preventDefault(),2===e.touches.length?n.onPinchMove(e):1===e.touches.length&&n.onDrag(t.getTouchPoint(e.touches[0]))},n.onDragStart=function(e){var t,o,r=e.x,l=e.y;n.dragStartPosition={x:r,y:l},n.dragStartCrop=Hv({},n.props.crop),null===(o=(t=n.props).onInteractionStart)||void 0===o||o.call(t)},n.onDrag=function(e){var t=e.x,o=e.y;n.rafDragTimeout&&window.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=window.requestAnimationFrame((function(){if(n.state.cropSize&&void 0!==t&&void 0!==o){var e=t-n.dragStartPosition.x,r=o-n.dragStartPosition.y,l={x:n.dragStartCrop.x+e,y:n.dragStartCrop.y+r},i=n.props.restrictPosition?Gv(l,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):l;n.props.onCropChange(i)}}))},n.onDragStopped=function(){var e,t;n.cleanEvents(),n.emitCropData(),null===(t=(e=n.props).onInteractionEnd)||void 0===t||t.call(e)},n.onWheel=function(e){e.preventDefault();var o=t.getMousePoint(e),r=n.props.zoom-e.deltaY*n.props.zoomSpeed/200;n.setNewZoom(r,o),n.state.hasWheelJustStarted||n.setState({hasWheelJustStarted:!0},(function(){var e,t;return null===(t=(e=n.props).onInteractionStart)||void 0===t?void 0:t.call(e)})),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=window.setTimeout((function(){return n.setState({hasWheelJustStarted:!1},(function(){var e,t;return null===(t=(e=n.props).onInteractionEnd)||void 0===t?void 0:t.call(e)}))}),250)},n.getPointOnContainer=function(e){var t=e.x,o=e.y;if(!n.containerRect)throw new Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(t-n.containerRect.left),y:n.containerRect.height/2-(o-n.containerRect.top)}},n.getPointOnMedia=function(e){var t=e.x,o=e.y,r=n.props,l=r.crop,i=r.zoom;return{x:(t+l.x)/i,y:(o+l.y)/i}},n.setNewZoom=function(e,t){if(n.state.cropSize&&n.props.onZoomChange){var o=n.getPointOnContainer(t),r=n.getPointOnMedia(o),l=Math.min(n.props.maxZoom,Math.max(e,n.props.minZoom)),i={x:r.x*l-o.x,y:r.y*l-o.y},s=n.props.restrictPosition?Gv(i,n.mediaSize,n.state.cropSize,l,n.props.rotation):i;n.props.onCropChange(s),n.props.onZoomChange(l)}},n.emitCropData=function(){if(n.state.cropSize){var e=Kv(n.props.restrictPosition?Gv(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop,n.mediaSize,n.state.cropSize,n.getAspect(),n.props.zoom,n.props.rotation,n.props.restrictPosition),t=e.croppedAreaPercentages,o=e.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(t,o)}},n.recomputeCropPosition=function(){if(n.state.cropSize){var e=n.props.restrictPosition?Gv(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;n.props.onCropChange(e),n.emitCropData()}},n}return function(e,t){function __(){this.constructor=e}Vv(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}(t,e),t.prototype.componentDidMount=function(){window.addEventListener("resize",this.computeSizes),this.containerRef&&(this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.preventZoomSafari),this.containerRef.addEventListener("gesturechange",this.preventZoomSafari)),this.props.disableAutomaticStylesInjection||(this.styleRef=document.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.styleRef.innerHTML=".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n user-select: none;\n touch-action: none;\n cursor: move;\n}\n\n.reactEasyCrop_Image,\n.reactEasyCrop_Video {\n max-width: 100%;\n max-height: 100%;\n margin: auto;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\n}\n\n.reactEasyCrop_CropArea {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n border: 1px solid rgba(255, 255, 255, 0.5);\n box-sizing: border-box;\n box-shadow: 0 0 0 9999em;\n color: rgba(0, 0, 0, 0.5);\n overflow: hidden;\n}\n\n.reactEasyCrop_CropAreaRound {\n border-radius: 50%;\n}\n\n.reactEasyCrop_CropAreaGrid::before {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 0;\n bottom: 0;\n left: 33.33%;\n right: 33.33%;\n border-top: 0;\n border-bottom: 0;\n}\n\n.reactEasyCrop_CropAreaGrid::after {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 33.33%;\n bottom: 33.33%;\n left: 0;\n right: 0;\n border-left: 0;\n border-right: 0;\n}\n",document.head.appendChild(this.styleRef)),this.imageRef&&this.imageRef.complete&&this.onMediaLoad()},t.prototype.componentWillUnmount=function(){window.removeEventListener("resize",this.computeSizes),this.containerRef&&(this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.containerRef.removeEventListener("gesturechange",this.preventZoomSafari)),this.styleRef&&this.styleRef.remove(),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent()},t.prototype.componentDidUpdate=function(e){e.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):e.aspect!==this.props.aspect?this.computeSizes():e.zoom!==this.props.zoom?this.recomputeCropPosition():e.cropSize!==this.props.cropSize&&this.computeSizes(),e.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent())},t.prototype.getAspect=function(){var e=this.props,t=e.cropSize,n=e.aspect;return t?t.width/t.height:n},t.prototype.onPinchStart=function(e){var n=t.getTouchPoint(e.touches[0]),o=t.getTouchPoint(e.touches[1]);this.lastPinchDistance=$v(n,o),this.lastPinchRotation=jv(n,o),this.onDragStart(Xv(n,o))},t.prototype.onPinchMove=function(e){var n=this,o=t.getTouchPoint(e.touches[0]),r=t.getTouchPoint(e.touches[1]),l=Xv(o,r);this.onDrag(l),this.rafPinchTimeout&&window.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=window.requestAnimationFrame((function(){var e=$v(o,r),t=n.props.zoom*(e/n.lastPinchDistance);n.setNewZoom(t,l),n.lastPinchDistance=e;var i=jv(o,r),s=n.props.rotation+(i-n.lastPinchRotation);n.props.onRotationChange&&n.props.onRotationChange(s),n.lastPinchRotation=i}))},t.prototype.render=function(){var e=this,t=this.props,n=t.image,o=t.video,r=t.mediaProps,l=t.crop,i=l.x,s=l.y,a=t.rotation,c=t.zoom,u=t.cropShape,d=t.showGrid,p=t.style,m=p.containerStyle,f=p.cropAreaStyle,h=p.mediaStyle,g=t.classes,v=g.containerClassName,b=g.cropAreaClassName,k=g.mediaClassName;return Gr().createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(t){return e.containerRef=t},"data-testid":"container",style:m,className:eb("reactEasyCrop_Container",v)},n?Gr().createElement("img",Hv({alt:"",className:eb("reactEasyCrop_Image",k)},r,{src:n,ref:function(t){return e.imageRef=t},style:Hv(Hv({},h),{transform:"translate("+i+"px, "+s+"px) rotate("+a+"deg) scale("+c+")"}),onLoad:this.onMediaLoad})):o&&Gr().createElement("video",Hv({autoPlay:!0,loop:!0,muted:!0,className:eb("reactEasyCrop_Video",k)},r,{src:o,ref:function(t){return e.videoRef=t},onLoadedMetadata:this.onMediaLoad,style:Hv(Hv({},h),{transform:"translate("+i+"px, "+s+"px) rotate("+a+"deg) scale("+c+")"}),controls:!1})),this.state.cropSize&&Gr().createElement("div",{style:Hv(Hv({},f),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:eb("reactEasyCrop_CropArea","round"===u&&"reactEasyCrop_CropAreaRound",d&&"reactEasyCrop_CropAreaGrid",b)}))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:3,minZoom:1,cropShape:"rect",showGrid:!0,style:{},classes:{},mediaProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0},t.getMousePoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t.getTouchPoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t}(Gr().Component);const nb={position:"bottom right",isAlternate:!0};var ob=window.wp.apiFetch,rb=n.n(ob);const lb=(0,s.createContext)({}),ib=()=>(0,s.useContext)(lb);function sb(e){let{id:t,url:n,naturalWidth:o,naturalHeight:r,isEditing:i,onFinishEditing:a,onSaveImage:c,children:u}=e;const d=function(e,t){const n=function(e){let{url:t,naturalWidth:n,naturalHeight:o}=e;const[r,i]=(0,s.useState)(),[a,c]=(0,s.useState)(),[u,d]=(0,s.useState)({x:0,y:0}),[p,m]=(0,s.useState)(),[f,h]=(0,s.useState)(),[g,v]=(0,s.useState)(),[b,k]=(0,s.useState)(),_=(0,s.useCallback)((()=>{d({x:0,y:0}),m(100),h(0),v(n/o),k(n/o)}),[n,o,d,m,h,v,k]),y=(0,s.useCallback)((()=>{const e=(f+90)%360;let r=n/o;if(f%180==90&&(r=o/n),0===e)return i(),h(e),v(1/g),void d({x:-u.y*r,y:u.x*r});const s=new window.Image;s.src=t,s.onload=function(t){const n=document.createElement("canvas");let o=0,l=0;e%180?(n.width=t.target.height,n.height=t.target.width):(n.width=t.target.width,n.height=t.target.height),90!==e&&180!==e||(o=n.width),270!==e&&180!==e||(l=n.height);const s=n.getContext("2d");s.translate(o,l),s.rotate(e*Math.PI/180),s.drawImage(t.target,0,0),n.toBlob((t=>{i(URL.createObjectURL(t)),h(e),v(1/g),d({x:-u.y*r,y:u.x*r})}))};const a=(0,l.applyFilters)("media.crossOrigin",void 0,t);"string"==typeof a&&(s.crossOrigin=a)}),[f,n,o,i,h,v,d]);return(0,s.useMemo)((()=>({editedUrl:r,setEditedUrl:i,crop:a,setCrop:c,position:u,setPosition:d,zoom:p,setZoom:m,rotation:f,setRotation:h,rotateClockwise:y,aspect:g,setAspect:v,defaultAspect:b,initializeTransformValues:_})),[r,i,a,c,u,d,p,m,f,h,y,g,v,b,_])}(e),{initializeTransformValues:o}=n;return(0,s.useEffect)((()=>{t&&o()}),[t,o]),n}({url:n,naturalWidth:o,naturalHeight:r},i),p=function(e){let{crop:t,rotation:n,height:o,width:r,aspect:l,url:i,id:a,onSaveImage:c,onFinishEditing:u}=e;const{createErrorNotice:d}=(0,m.useDispatch)(Nu.store),[p,f]=(0,s.useState)(!1),g=(0,s.useCallback)((()=>{f(!1),u()}),[f,u]),v=(0,s.useCallback)((()=>{f(!0);let e={};(t.width<99.9||t.height<99.9)&&(e=t),n>0&&(e.rotation=n),e.src=i,rb()({path:`/wp/v2/media/${a}/edit`,method:"POST",data:e}).then((e=>{c({id:e.id,url:e.source_url,height:o&&r?r/l:void 0})})).catch((e=>{d((0,h.sprintf)(
70
  /* translators: 1. Error message */
71
+ (0,h.__)("Could not edit image. %s"),e.message),{id:"image-editing-error",type:"snackbar"})})).finally((()=>{f(!1),u()}))}),[f,t,n,o,r,l,i,c,d,f,u]);return(0,s.useMemo)((()=>({isInProgress:p,apply:v,cancel:g})),[p,v,g])}({id:t,url:n,onSaveImage:c,onFinishEditing:a,...d}),f=(0,s.useMemo)((()=>({...d,...p})),[d,p]);return(0,s.createElement)(lb.Provider,{value:f},u)}function ab(e){let{url:t,width:n,height:o,clientWidth:r,naturalHeight:l,naturalWidth:i}=e;const{isInProgress:a,editedUrl:u,position:d,zoom:m,aspect:f,setPosition:h,setCrop:g,setZoom:v,rotation:b}=ib();let k=o||r*l/i;return b%180==90&&(k=r*i/l),(0,s.createElement)("div",{className:c()("wp-block-image__crop-area",{"is-applying":a}),style:{width:n||r,height:k}},(0,s.createElement)(tb,{image:u||t,disabled:a,minZoom:1,maxZoom:3,crop:d,zoom:m/100,aspect:f,onCropChange:h,onCropComplete:e=>{g(e)},onZoomChange:e=>{v(100*e)}}),a&&(0,s.createElement)(p.Spinner,null))}var cb=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"}));function ub(){const{isInProgress:e,zoom:t,setZoom:n}=ib();return(0,s.createElement)(p.Dropdown,{contentClassName:"wp-block-image__zoom",popoverProps:nb,renderToggle:t=>{let{isOpen:n,onToggle:o}=t;return(0,s.createElement)(p.ToolbarButton,{icon:cb,label:(0,h.__)("Zoom"),onClick:o,"aria-expanded":n,disabled:e})},renderContent:()=>(0,s.createElement)(p.RangeControl,{label:(0,h.__)("Zoom"),min:100,max:300,value:Math.round(t),onChange:n})})}var db=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M18.5 5.5h-13c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2v-9c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5h-13c-.3 0-.5-.2-.5-.5v-9c0-.3.2-.5.5-.5h13c.3 0 .5.2.5.5v9zM6.5 12H8v-2h2V8.5H6.5V12zm9.5 2h-2v1.5h3.5V12H16v2z"}));function pb(e){let{aspectRatios:t,isDisabled:n,label:o,onClick:r,value:l}=e;return(0,s.createElement)(p.MenuGroup,{label:o},t.map((e=>{let{title:t,aspect:o}=e;return(0,s.createElement)(p.MenuItem,{key:o,disabled:n,onClick:()=>{r(o)},role:"menuitemradio",isSelected:o===l,icon:o===l?rp:void 0},t)})))}function mb(e){let{toggleProps:t}=e;const{isInProgress:n,aspect:o,setAspect:r,defaultAspect:l}=ib();return(0,s.createElement)(p.DropdownMenu,{icon:db,label:(0,h.__)("Aspect Ratio"),popoverProps:nb,toggleProps:t,className:"wp-block-image__aspect-ratio"},(e=>{let{onClose:t}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(pb,{isDisabled:n,onClick:e=>{r(e),t()},value:o,aspectRatios:[{title:(0,h.__)("Original"),aspect:l},{title:(0,h.__)("Square"),aspect:1}]}),(0,s.createElement)(pb,{label:(0,h.__)("Landscape"),isDisabled:n,onClick:e=>{r(e),t()},value:o,aspectRatios:[{title:(0,h.__)("16:10"),aspect:1.6},{title:(0,h.__)("16:9"),aspect:16/9},{title:(0,h.__)("4:3"),aspect:4/3},{title:(0,h.__)("3:2"),aspect:1.5}]}),(0,s.createElement)(pb,{label:(0,h.__)("Portrait"),isDisabled:n,onClick:e=>{r(e),t()},value:o,aspectRatios:[{title:(0,h.__)("10:16"),aspect:.625},{title:(0,h.__)("9:16"),aspect:9/16},{title:(0,h.__)("3:4"),aspect:3/4},{title:(0,h.__)("2:3"),aspect:2/3}]}))}))}var fb=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M15.1 4.8l-3-2.5V4c-4.4 0-8 3.6-8 8 0 3.7 2.5 6.9 6 7.7.3.1.6.1 1 .2l.2-1.5c-.4 0-.7-.1-1.1-.2l-.1.2v-.2c-2.6-.8-4.5-3.3-4.5-6.2 0-3.6 2.9-6.5 6.5-6.5v1.8l3-2.5zM20 11c-.2-1.4-.7-2.7-1.6-3.8l-1.2.8c.7.9 1.1 2 1.3 3.1L20 11zm-1.5 1.8c-.1.5-.2 1.1-.4 1.6s-.5 1-.8 1.5l1.2.9c.4-.5.8-1.1 1-1.8s.5-1.3.5-2l-1.5-.2zm-5.6 5.6l.2 1.5c1.4-.2 2.7-.7 3.8-1.6l-.9-1.1c-.9.7-2 1.1-3.1 1.2z"}));function hb(){const{isInProgress:e,rotateClockwise:t}=ib();return(0,s.createElement)(p.ToolbarButton,{icon:fb,label:(0,h.__)("Rotate"),onClick:t,disabled:e})}function gb(){const{isInProgress:e,apply:t,cancel:n}=ib();return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.ToolbarButton,{onClick:t,disabled:e},(0,h.__)("Apply")),(0,s.createElement)(p.ToolbarButton,{onClick:n},(0,h.__)("Cancel")))}function vb(e){let{url:t,width:n,height:o,clientWidth:r,naturalHeight:l,naturalWidth:i}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(ab,{url:t,width:n,height:o,clientWidth:r,naturalHeight:l,naturalWidth:i}),(0,s.createElement)(Zn,null,(0,s.createElement)(p.ToolbarGroup,null,(0,s.createElement)(ub,null),(0,s.createElement)(p.ToolbarItem,null,(e=>(0,s.createElement)(mb,{toggleProps:e}))),(0,s.createElement)(hb,null)),(0,s.createElement)(p.ToolbarGroup,null,(0,s.createElement)(gb,null))))}const bb=[25,50,75,100];function kb(e){let{imageWidth:t,imageHeight:n,imageSizeOptions:o=[],isResizable:r=!0,slug:l,width:i,height:a,onChange:c,onChangeImage:d=u.noop}=e;const{currentHeight:m,currentWidth:f,updateDimension:g,updateDimensions:v}=function(e,t,n,o,r){var l,i;const[a,c]=(0,s.useState)(null!==(l=null!=t?t:o)&&void 0!==l?l:""),[u,d]=(0,s.useState)(null!==(i=null!=e?e:n)&&void 0!==i?i:"");return(0,s.useEffect)((()=>{void 0===t&&void 0!==o&&c(o),void 0===e&&void 0!==n&&d(n)}),[o,n]),(0,s.useEffect)((()=>{void 0!==t&&Number.parseInt(t)!==Number.parseInt(a)&&c(t),void 0!==e&&Number.parseInt(e)!==Number.parseInt(u)&&d(e)}),[t,e]),{currentHeight:u,currentWidth:a,updateDimension:(e,t)=>{"width"===e?c(t):d(t),r({[e]:""===t?void 0:parseInt(t,10)})},updateDimensions:(e,t)=>{d(null!=e?e:n),c(null!=t?t:o),r({height:e,width:t})}}}(a,i,n,t,c);return(0,s.createElement)(s.Fragment,null,!(0,u.isEmpty)(o)&&(0,s.createElement)(p.SelectControl,{label:(0,h.__)("Image size"),value:l,options:o,onChange:d}),r&&(0,s.createElement)("div",{className:"block-editor-image-size-control"},(0,s.createElement)("p",{className:"block-editor-image-size-control__row"},(0,h.__)("Image dimensions")),(0,s.createElement)("div",{className:"block-editor-image-size-control__row"},(0,s.createElement)(p.TextControl,{type:"number",className:"block-editor-image-size-control__width",label:(0,h.__)("Width"),value:f,min:1,onChange:e=>g("width",e)}),(0,s.createElement)(p.TextControl,{type:"number",className:"block-editor-image-size-control__height",label:(0,h.__)("Height"),value:m,min:1,onChange:e=>g("height",e)})),(0,s.createElement)("div",{className:"block-editor-image-size-control__row"},(0,s.createElement)(p.ButtonGroup,{"aria-label":(0,h.__)("Image size presets")},bb.map((e=>{const o=Math.round(t*(e/100)),r=Math.round(n*(e/100)),l=f===o&&m===r;return(0,s.createElement)(p.Button,{key:e,isSmall:!0,variant:l?"primary":void 0,isPressed:l,onClick:()=>v(r,o)},e,"%")}))),(0,s.createElement)(p.Button,{isSmall:!0,onClick:()=>v()},(0,h.__)("Reset")))))}var _b=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,s.createElement)(F.Path,{d:"M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z"})),yb=e=>{let{value:t,onChange:n=u.noop,settings:o}=e;if(!o||!o.length)return null;const r=e=>o=>{n({...t,[e.id]:o})},l=o.map((e=>(0,s.createElement)(p.ToggleControl,{className:"block-editor-link-control__setting",key:e.id,label:e.title,onChange:r(e),checked:!!t&&!!t[e.id]})));return(0,s.createElement)("fieldset",{className:"block-editor-link-control__settings"},(0,s.createElement)(p.VisuallyHidden,{as:"legend"},(0,h.__)("Currently selected link settings")),l)};class Eb extends s.Component{constructor(e){super(e),this.onChange=this.onChange.bind(this),this.onFocus=this.onFocus.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.selectLink=this.selectLink.bind(this),this.handleOnClick=this.handleOnClick.bind(this),this.bindSuggestionNode=this.bindSuggestionNode.bind(this),this.autocompleteRef=e.autocompleteRef||(0,s.createRef)(),this.inputRef=(0,s.createRef)(),this.updateSuggestions=(0,u.debounce)(this.updateSuggestions.bind(this),200),this.suggestionNodes=[],this.isUpdatingSuggestions=!1,this.state={suggestions:[],showSuggestions:!1,selectedSuggestion:null,suggestionsListboxId:"",suggestionOptionIdPrefix:""}}componentDidUpdate(e){const{showSuggestions:t,selectedSuggestion:n}=this.state,{value:o,__experimentalShowInitialSuggestions:r=!1}=this.props;t&&null!==n&&this.suggestionNodes[n]&&!this.scrollingIntoView&&(this.scrollingIntoView=!0,ya()(this.suggestionNodes[n],this.autocompleteRef.current,{onlyScrollIfNeeded:!0}),this.props.setTimeout((()=>{this.scrollingIntoView=!1}),100)),e.value===o||this.props.disableSuggestions||this.isUpdatingSuggestions||(null!=o&&o.length?this.updateSuggestions(o):r&&this.updateSuggestions())}componentDidMount(){this.shouldShowInitialSuggestions()&&this.updateSuggestions()}componentWillUnmount(){var e,t;null===(e=this.suggestionsRequest)||void 0===e||null===(t=e.cancel)||void 0===t||t.call(e),delete this.suggestionsRequest}bindSuggestionNode(e){return t=>{this.suggestionNodes[e]=t}}shouldShowInitialSuggestions(){const{suggestions:e}=this.state,{__experimentalShowInitialSuggestions:t=!1,value:n}=this.props;return!this.isUpdatingSuggestions&&t&&!(n&&n.length)&&!(e&&e.length)}updateSuggestions(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{__experimentalFetchLinkSuggestions:n,__experimentalHandleURLSuggestions:o}=this.props;if(!n)return;const r=!(null!==(e=t)&&void 0!==e&&e.length);if(t=t.trim(),!r&&(t.length<2||!o&&(0,rd.isURL)(t)))return void this.setState({showSuggestions:!1,selectedSuggestion:null,loading:!1});this.isUpdatingSuggestions=!0,this.setState({selectedSuggestion:null,loading:!0});const l=n(t,{isInitialSuggestions:r});l.then((e=>{this.suggestionsRequest===l&&(this.setState({suggestions:e,loading:!1,showSuggestions:!!e.length}),e.length?this.props.debouncedSpeak((0,h.sprintf)(
72
  /* translators: %s: number of results. */
73
+ (0,h._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",e.length),e.length),"assertive"):this.props.debouncedSpeak((0,h.__)("No results."),"assertive"),this.isUpdatingSuggestions=!1)})).catch((()=>{this.suggestionsRequest===l&&(this.setState({loading:!1}),this.isUpdatingSuggestions=!1)})),this.suggestionsRequest=l}onChange(e){const t=e.target.value;this.props.onChange(t),this.props.disableSuggestions||this.updateSuggestions(t)}onFocus(){const{suggestions:e}=this.state,{disableSuggestions:t,value:n}=this.props;!n||t||this.isUpdatingSuggestions||e&&e.length||this.updateSuggestions(n)}onKeyDown(e){const{showSuggestions:t,selectedSuggestion:n,suggestions:o,loading:r}=this.state;if(!t||!o.length||r){switch(e.keyCode){case va.UP:0!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(0,0));break;case va.DOWN:this.props.value.length!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length));break;case va.ENTER:this.props.onSubmit&&this.props.onSubmit(null,e)}return}const l=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case va.UP:{e.preventDefault();const t=n?n-1:o.length-1;this.setState({selectedSuggestion:t});break}case va.DOWN:{e.preventDefault();const t=null===n||n===o.length-1?0:n+1;this.setState({selectedSuggestion:t});break}case va.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(l),this.props.speak((0,h.__)("Link selected.")));break;case va.ENTER:null!==this.state.selectedSuggestion?(this.selectLink(l),this.props.onSubmit&&this.props.onSubmit(l,e)):this.props.onSubmit&&this.props.onSubmit(null,e)}}selectLink(e){this.props.onChange(e.url,e),this.setState({selectedSuggestion:null,showSuggestions:!1})}handleOnClick(e){this.selectLink(e),this.inputRef.current.focus()}static getDerivedStateFromProps(e,t){let{value:n,instanceId:o,disableSuggestions:r,__experimentalShowInitialSuggestions:l=!1}=e,{showSuggestions:i}=t,s=i;const a=n&&n.length;return l||a||(s=!1),!0===r&&(s=!1),{showSuggestions:s,suggestionsListboxId:`block-editor-url-input-suggestions-${o}`,suggestionOptionIdPrefix:`block-editor-url-input-suggestion-${o}`}}render(){return(0,s.createElement)(s.Fragment,null,this.renderControl(),this.renderSuggestions())}renderControl(){const{label:e,className:t,isFullWidth:n,instanceId:o,placeholder:r=(0,h.__)("Paste URL or type to search"),__experimentalRenderControl:l,value:i=""}=this.props,{loading:a,showSuggestions:u,selectedSuggestion:d,suggestionsListboxId:m,suggestionOptionIdPrefix:f}=this.state,g={id:`url-input-control-${o}`,label:e,className:c()("block-editor-url-input",t,{"is-full-width":n})},v={value:i,required:!0,className:"block-editor-url-input__input",type:"text",onChange:this.onChange,onFocus:this.onFocus,placeholder:r,onKeyDown:this.onKeyDown,role:"combobox","aria-label":(0,h.__)("URL"),"aria-expanded":u,"aria-autocomplete":"list","aria-owns":m,"aria-activedescendant":null!==d?`${f}-${d}`:void 0,ref:this.inputRef};return l?l(g,v,a):(0,s.createElement)(p.BaseControl,g,(0,s.createElement)("input",v),a&&(0,s.createElement)(p.Spinner,null))}renderSuggestions(){const{className:e,__experimentalRenderSuggestions:t,value:n="",__experimentalShowInitialSuggestions:o=!1}=this.props,{showSuggestions:r,suggestions:l,selectedSuggestion:a,suggestionsListboxId:d,suggestionOptionIdPrefix:m,loading:f}=this.state,h={id:d,ref:this.autocompleteRef,role:"listbox"},g=(e,t)=>({role:"option",tabIndex:"-1",id:`${m}-${t}`,ref:this.bindSuggestionNode(t),"aria-selected":t===a});return(0,u.isFunction)(t)&&r&&l.length?t({suggestions:l,selectedSuggestion:a,suggestionsListProps:h,buildSuggestionItemProps:g,isLoading:f,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:o&&!(n&&n.length)}):!(0,u.isFunction)(t)&&r&&l.length?(0,s.createElement)(p.Popover,{position:"bottom",noArrow:!0,focusOnMount:!1},(0,s.createElement)("div",i({},h,{className:c()("block-editor-url-input__suggestions",`${e}__suggestions`)}),l.map(((e,t)=>(0,s.createElement)(p.Button,i({},g(0,t),{key:e.id,className:c()("block-editor-url-input__suggestion",{"is-selected":t===a}),onClick:()=>this.handleOnClick(e)}),e.title))))):null}}var Cb=(0,d.compose)(d.withSafeTimeout,p.withSpokenMessages,d.withInstanceId,(0,m.withSelect)(((e,t)=>{if((0,u.isFunction)(t.__experimentalFetchLinkSuggestions))return;const{getSettings:n}=e(Vn);return{__experimentalFetchLinkSuggestions:n().__experimentalFetchLinkSuggestions}})))(Eb),Sb=e=>{let t,{searchTerm:n,onClick:o,itemProps:r,isSelected:l,buttonText:a}=e;return n?(t=a?(0,u.isFunction)(a)?a(n):a:(0,s.createInterpolateElement)((0,h.sprintf)(
74
  /* translators: %s: search term. */
75
+ (0,h.__)("Create: <mark>%s</mark>"),n),{mark:(0,s.createElement)("mark",null)}),(0,s.createElement)(p.Button,i({},r,{className:c()("block-editor-link-control__search-create block-editor-link-control__search-item",{"is-selected":l}),onClick:o}),(0,s.createElement)(wo,{className:"block-editor-link-control__search-item-icon",icon:Fa}),(0,s.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,s.createElement)("span",{className:"block-editor-link-control__search-item-title"},t)))):null},wb=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M12 3.3c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8s-4-8.8-8.8-8.8zm6.5 5.5h-2.6C15.4 7.3 14.8 6 14 5c2 .6 3.6 2 4.5 3.8zm.7 3.2c0 .6-.1 1.2-.2 1.8h-2.9c.1-.6.1-1.2.1-1.8s-.1-1.2-.1-1.8H19c.2.6.2 1.2.2 1.8zM12 18.7c-1-.7-1.8-1.9-2.3-3.5h4.6c-.5 1.6-1.3 2.9-2.3 3.5zm-2.6-4.9c-.1-.6-.1-1.1-.1-1.8 0-.6.1-1.2.1-1.8h5.2c.1.6.1 1.1.1 1.8s-.1 1.2-.1 1.8H9.4zM4.8 12c0-.6.1-1.2.2-1.8h2.9c-.1.6-.1 1.2-.1 1.8 0 .6.1 1.2.1 1.8H5c-.2-.6-.2-1.2-.2-1.8zM12 5.3c1 .7 1.8 1.9 2.3 3.5H9.7c.5-1.6 1.3-2.9 2.3-3.5zM10 5c-.8 1-1.4 2.3-1.8 3.8H5.5C6.4 7 8 5.6 10 5zM5.5 15.3h2.6c.4 1.5 1 2.8 1.8 3.7-1.8-.6-3.5-2-4.4-3.7zM14 19c.8-1 1.4-2.2 1.8-3.7h2.6C17.6 17 16 18.4 14 19z"})),Bb=e=>{let{itemProps:t,suggestion:n,isSelected:o=!1,onClick:r,isURL:l=!1,searchTerm:a="",shouldShowType:u=!1}=e;return(0,s.createElement)(p.Button,i({},t,{onClick:r,className:c()("block-editor-link-control__search-item",{"is-selected":o,"is-url":l,"is-entity":!l})}),l&&(0,s.createElement)(wo,{className:"block-editor-link-control__search-item-icon",icon:wb}),(0,s.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,s.createElement)("span",{className:"block-editor-link-control__search-item-title"},(0,s.createElement)(p.TextHighlight,{text:n.title,highlight:a})),(0,s.createElement)("span",{"aria-hidden":!l,className:"block-editor-link-control__search-item-info"},!l&&((0,rd.filterURLForDisplay)((0,rd.safeDecodeURI)(n.url))||""),l&&(0,h.__)("Press ENTER to add this link"))),u&&n.type&&(0,s.createElement)("span",{className:"block-editor-link-control__search-item-type"},"post_tag"===n.type?"tag":n.type))};const Ib="__CREATE__",xb=[{id:"opensInNewTab",title:(0,h.__)("Open in new tab")}];function Tb(e){let{instanceId:t,withCreateSuggestion:n,currentInputValue:o,handleSuggestionClick:r,suggestionsListProps:l,buildSuggestionItemProps:a,suggestions:u,selectedSuggestion:d,isLoading:m,isInitialSuggestions:f,createSuggestionButtonText:g,suggestionsQuery:v}=e;const b=c()("block-editor-link-control__search-results",{"is-loading":m}),k=["url","mailto","tel","internal"],_=1===u.length&&k.includes(u[0].type.toLowerCase()),y=n&&!_&&!f,E=!(null!=v&&v.type),C=`block-editor-link-control-search-results-label-${t}`,S=f?(0,h.__)("Recently updated"):(0,h.sprintf)(
76
  /* translators: %s: search term. */
77
+ (0,h.__)('Search results for "%s"'),o),w=(0,s.createElement)(f?s.Fragment:p.VisuallyHidden,{},(0,s.createElement)("span",{className:"block-editor-link-control__search-results-label",id:C},S));return(0,s.createElement)("div",{className:"block-editor-link-control__search-results-wrapper"},w,(0,s.createElement)("div",i({},l,{className:b,"aria-labelledby":C}),u.map(((e,t)=>y&&Ib===e.type?(0,s.createElement)(Sb,{searchTerm:o,buttonText:g,onClick:()=>r(e),key:e.type,itemProps:a(e,t),isSelected:t===d}):Ib===e.type?null:(0,s.createElement)(Bb,{key:`${e.id}-${e.type}`,itemProps:a(e,t),suggestion:e,index:t,onClick:()=>{r(e)},isSelected:t===d,isURL:k.includes(e.type.toLowerCase()),searchTerm:o,shouldShowType:E})))))}function Nb(e){const t=(0,u.startsWith)(e,"#");return(0,rd.isURL)(e)||e&&e.includes("www.")||t}const Pb=()=>Promise.resolve([]),Mb=e=>{let t="URL";const n=(0,rd.getProtocol)(e)||"";return n.includes("mailto")&&(t="mailto"),n.includes("tel")&&(t="tel"),(0,u.startsWith)(e,"#")&&(t="internal"),Promise.resolve([{id:e,title:e,url:"URL"===t?(0,rd.prependHTTP)(e):e,type:t}])};const Rb=()=>Promise.resolve([]),Lb=(0,s.forwardRef)(((e,t)=>{let{value:n,children:o,currentLink:r={},className:l=null,placeholder:i=null,withCreateSuggestion:a=!1,onCreateSuggestion:p=u.noop,onChange:f=u.noop,onSelect:g=u.noop,showSuggestions:v=!0,renderSuggestions:b=(e=>(0,s.createElement)(Tb,e)),fetchSuggestions:k=null,allowDirectEntry:_=!0,showInitialSuggestions:y=!1,suggestionsQuery:E={},withURLSuggestion:C=!0,createSuggestionButtonText:S,useLabel:w=!1}=e;const B=function(e,t,n,o){const{fetchSearchSuggestions:r}=(0,m.useSelect)((e=>{const{getSettings:t}=e(Vn);return{fetchSearchSuggestions:t().__experimentalFetchLinkSuggestions}}),[]),l=t?Mb:Pb;return(0,s.useCallback)(((t,i)=>{let{isInitialSuggestions:s}=i;return Nb(t)?l(t,{isInitialSuggestions:s}):(async(e,t,n,o,r,l)=>{const{isInitialSuggestions:i}=t;let s=await Promise.all([n(e,t),o(e)]);return s=e.includes(" ")||!l||i?s[0]:s[0].concat(s[1]),i||Nb(e)||!r?s:s.concat({title:e,url:e,type:Ib})})(t,{...e,isInitialSuggestions:s},r,l,n,o)}),[l,r,n])}(E,_,a,C),I=v?k||B:Rb,x=(0,d.useInstanceId)(Lb),[T,N]=(0,s.useState)(),P=async e=>{let t=e;if(Ib!==e.type)(_||t&&Object.keys(t).length>=1)&&g({...(0,u.omit)(r,"id","url"),...t},t);else try{var n;t=await p(e.title),null!==(n=t)&&void 0!==n&&n.url&&g(t)}catch(e){}},M=c()(l,{"has-no-label":!w});return(0,s.createElement)("div",{className:"block-editor-link-control__search-input-container"},(0,s.createElement)(Cb,{label:w?"URL":void 0,className:M,value:n,onChange:(e,t)=>{f(e),N(t)},placeholder:null!=i?i:(0,h.__)("Search or type url"),__experimentalRenderSuggestions:v?e=>b({...e,instanceId:x,withCreateSuggestion:a,currentInputValue:n,createSuggestionButtonText:S,suggestionsQuery:E,handleSuggestionClick:t=>{e.handleSuggestionClick&&e.handleSuggestionClick(t),P(t)}}):null,__experimentalFetchLinkSuggestions:I,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:y,onSubmit:(e,t)=>{var o;const r=e||T;r||null!=n&&null!==(o=n.trim())&&void 0!==o&&o.length?P(r||{url:n}):t.preventDefault()},ref:t}),o)}));var Ab=Lb,Db=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"})),Ob=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"}));const{Slot:Fb,Fill:zb}=(0,p.createSlotFill)("BlockEditorLinkControlViewer");function Vb(e,t){switch(t.type){case"RESOLVED":return{...e,isFetching:!1,richData:t.richData};case"ERROR":return{...e,isFetching:!1,richData:null};case"LOADING":return{...e,isFetching:!0};default:throw new Error(`Unexpected action type ${t.type}`)}}function Hb(e){let{value:t,onEditClick:n,hasRichPreviews:o=!1,hasUnlinkControl:r=!1,onRemove:l}=e;const i=o?null==t?void 0:t.url:null,{richData:a,isFetching:u}=function(e){const[t,n]=(0,s.useReducer)(Vb,{richData:null,isFetching:!1}),{fetchRichUrlData:o}=(0,m.useSelect)((e=>{const{getSettings:t}=e(Vn);return{fetchRichUrlData:t().__experimentalFetchRichUrlData}}),[]);return(0,s.useEffect)((()=>{if(null!=e&&e.length&&o&&"undefined"!=typeof AbortController){n({type:"LOADING"});const t=new window.AbortController,r=t.signal;return o(e,{signal:r}).then((e=>{n({type:"RESOLVED",richData:e})})).catch((()=>{r.aborted||n({type:"ERROR"})})),()=>{t.abort()}}}),[e]),t}(i),d=a&&Object.keys(a).length,f=t&&(0,rd.filterURLForDisplay)((0,rd.safeDecodeURI)(t.url),16)||"",g=(null==a?void 0:a.title)||(null==t?void 0:t.title)||f,v=!t.url.length;let b;return b=null!=a&&a.icon?(0,s.createElement)("img",{src:null==a?void 0:a.icon,alt:""}):v?(0,s.createElement)(wo,{icon:Db,size:32}):(0,s.createElement)(wo,{icon:wb}),(0,s.createElement)("div",{"aria-label":(0,h.__)("Currently selected"),"aria-selected":"true",className:c()("block-editor-link-control__search-item",{"is-current":!0,"is-rich":d,"is-fetching":!!u,"is-preview":!0,"is-error":v})},(0,s.createElement)("div",{className:"block-editor-link-control__search-item-top"},(0,s.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,s.createElement)("span",{className:c()("block-editor-link-control__search-item-icon",{"is-image":null==a?void 0:a.icon})},b),(0,s.createElement)("span",{className:"block-editor-link-control__search-item-details"},v?(0,s.createElement)("span",{className:"block-editor-link-control__search-item-error-notice"},"Link is empty"):(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.ExternalLink,{className:"block-editor-link-control__search-item-title",href:t.url},(0,rr.__unstableStripHTML)(g)),(null==t?void 0:t.url)&&(0,s.createElement)("span",{className:"block-editor-link-control__search-item-info"},f)))),(0,s.createElement)(p.Button,{icon:Ob,label:(0,h.__)("Edit"),className:"block-editor-link-control__search-item-action",onClick:n,iconSize:24}),r&&(0,s.createElement)(p.Button,{icon:Dm,label:(0,h.__)("Unlink"),className:"block-editor-link-control__search-item-action block-editor-link-control__unlink",onClick:l,iconSize:24}),(0,s.createElement)(Fb,{fillProps:t})),(d&&((null==a?void 0:a.image)||(null==a?void 0:a.description))||u)&&(0,s.createElement)("div",{className:"block-editor-link-control__search-item-bottom"},((null==a?void 0:a.image)||u)&&(0,s.createElement)("div",{"aria-hidden":!(null!=a&&a.image),className:c()("block-editor-link-control__search-item-image",{"is-placeholder":!(null!=a&&a.image)})},(null==a?void 0:a.image)&&(0,s.createElement)("img",{src:null==a?void 0:a.image,alt:""})),((null==a?void 0:a.description)||u)&&(0,s.createElement)("div",{"aria-hidden":!(null!=a&&a.description),className:c()("block-editor-link-control__search-item-description",{"is-placeholder":!(null!=a&&a.description)})},(null==a?void 0:a.description)&&(0,s.createElement)(p.__experimentalText,{truncate:!0,numberOfLines:"2"},a.description))))}function Ub(e){var t,n,o;let{searchInputPlaceholder:r,value:l,settings:i=xb,onChange:a=u.noop,onRemove:d,noDirectEntry:m=!1,showSuggestions:f=!0,showInitialSuggestions:g,forceIsEditingLink:v,createSuggestion:b,withCreateSuggestion:k,inputValue:_="",suggestionsQuery:y={},noURLSuggestion:E=!1,createSuggestionButtonText:C,hasRichPreviews:S=!1,hasTextControl:w=!1,renderControlBottom:B=null}=e;void 0===k&&b&&(k=!0);const I=(0,s.useRef)(!0),x=(0,s.useRef)(),T=(0,s.useRef)(),[N,P]=(0,s.useState)((null==l?void 0:l.url)||""),[M,R]=(0,s.useState)((null==l?void 0:l.title)||""),L=_||N,[A,D]=(0,s.useState)(void 0!==v?v:!l||!l.url),O=(0,s.useRef)(!1),F=!(null!=L&&null!==(t=L.trim())&&void 0!==t&&t.length);function z(){var e;O.current=!(null===(e=x.current)||void 0===e||!e.contains(x.current.ownerDocument.activeElement)),D(!1)}(0,s.useEffect)((()=>{void 0!==v&&v!==A&&D(v)}),[v]),(0,s.useEffect)((()=>{if(I.current)return void(I.current=!1);const e=null!=T&&T.current?1:0;(rr.focus.focusable.find(x.current)[e]||x.current).focus(),O.current=!1}),[A]),(0,s.useEffect)((()=>{null!=l&&l.title&&l.title!==M&&R(l.title),null!=l&&l.url&&P(l.url)}),[l]);const{createPage:V,isCreatingPage:H,errorMessage:U}=function(e){const t=(0,s.useRef)(),[n,o]=(0,s.useState)(!1),[r,l]=(0,s.useState)(null);return(0,s.useEffect)((()=>()=>{t.current&&t.current.cancel()}),[]),{createPage:async function(n){o(!0),l(null);try{return t.current=(e=>{let t=!1;return{promise:new Promise(((n,o)=>{e.then((e=>t?o({isCanceled:!0}):n(e)),(e=>o(t?{isCanceled:!0}:e)))})),cancel(){t=!0}}})(Promise.resolve(e(n))),await t.current.promise}catch(e){if(e&&e.isCanceled)return;throw l(e.message||(0,h.__)("An unknown error occurred during creation. Please try again.")),e}finally{o(!1)}},isCreatingPage:n,errorMessage:r}}(b),G=()=>{L===(null==l?void 0:l.url)&&M===(null==l?void 0:l.title)||a({url:L,title:M}),z()},W=d&&l&&!A&&!H,$=!(null==i||!i.length),j=(null==l||null===(n=l.url)||void 0===n||null===(o=n.trim())||void 0===o?void 0:o.length)>0&&w;return(0,s.createElement)("div",{tabIndex:-1,ref:x,className:"block-editor-link-control"},H&&(0,s.createElement)("div",{className:"block-editor-link-control__loading"},(0,s.createElement)(p.Spinner,null)," ",(0,h.__)("Creating"),"…"),(A||!l)&&!H&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:c()({"block-editor-link-control__search-input-wrapper":!0,"has-text-control":j})},j&&(0,s.createElement)(p.TextControl,{ref:T,className:"block-editor-link-control__field block-editor-link-control__text-content",label:"Text",value:M,onChange:R,onKeyDown:e=>{const{keyCode:t}=e;t!==va.ENTER||F||(e.preventDefault(),G())}}),(0,s.createElement)(Ab,{currentLink:l,className:"block-editor-link-control__field block-editor-link-control__search-input",placeholder:r,value:L,withCreateSuggestion:k,onCreateSuggestion:V,onChange:P,onSelect:e=>{a({...e,title:M||(null==e?void 0:e.title)}),z()},showInitialSuggestions:g,allowDirectEntry:!m,showSuggestions:f,suggestionsQuery:y,withURLSuggestion:!E,createSuggestionButtonText:C,useLabel:j},(0,s.createElement)("div",{className:"block-editor-link-control__search-actions"},(0,s.createElement)(p.Button,{onClick:G,label:(0,h.__)("Submit"),icon:_b,className:"block-editor-link-control__search-submit",disabled:F})))),U&&(0,s.createElement)(p.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1},U)),l&&!A&&!H&&(0,s.createElement)(Hb,{key:null==l?void 0:l.url,value:l,onEditClick:()=>D(!0),hasRichPreviews:S,hasUnlinkControl:W,onRemove:d}),$&&(0,s.createElement)("div",{className:"block-editor-link-control__tools"},(0,s.createElement)(yb,{value:l,settings:i,onChange:a})),B&&B())}Ub.ViewerFill=zb;var Gb=Ub,Wb=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z"})),$b=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"})),jb=(0,p.withFilters)("editor.MediaUpload")((()=>null)),Kb=function(e){let{fallback:t=null,children:n}=e;return(0,m.useSelect)((e=>{const{getSettings:t}=e(Vn);return!!t().mediaUpload}),[])?n:t},qb=(0,d.compose)([(0,m.withDispatch)((e=>{const{createNotice:t,removeNotice:n}=e(Nu.store);return{createNotice:t,removeNotice:n}})),(0,p.withFilters)("editor.MediaReplaceFlow")])((e=>{let{mediaURL:t,mediaId:n,allowedTypes:o,accept:r,onSelect:l,onSelectURL:i,onFilesUpload:a=u.noop,name:c=(0,h.__)("Replace"),createNotice:d,removeNotice:f,children:g}=e;const[v,b]=(0,s.useState)(t),k=(0,m.useSelect)((e=>e(Vn).getSettings().mediaUpload),[]),_=(0,s.createRef)(),y=(0,u.uniqueId)("block-editor/media-replace-flow/error-notice/"),E=e=>{const t=document.createElement("div");t.innerHTML=(0,s.renderToString)(e);const n=t.textContent||t.innerText||"";setTimeout((()=>{d("error",n,{speak:!0,id:y,isDismissible:!0})}),1e3)},C=e=>{b(e.url),l(e),(0,Pt.speak)((0,h.__)("The media file has been replaced")),f(y)},S=e=>{e.keyCode===va.DOWN&&(e.preventDefault(),e.target.click())};return(0,s.createElement)(p.Dropdown,{popoverProps:{isAlternate:!0},contentClassName:"block-editor-media-replace-flow__options",renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return(0,s.createElement)(p.ToolbarButton,{ref:_,"aria-expanded":t,"aria-haspopup":"true",onClick:n,onKeyDown:S},c)},renderContent:e=>{let{onClose:t}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu"},(0,s.createElement)(jb,{value:n,onSelect:e=>C(e),allowedTypes:o,render:e=>{let{open:t}=e;return(0,s.createElement)(p.MenuItem,{icon:Wb,onClick:t},(0,h.__)("Open Media Library"))}}),(0,s.createElement)(Kb,null,(0,s.createElement)(p.FormFileUpload,{onChange:e=>{(e=>{const t=e.target.files;a(t),k({allowedTypes:o,filesList:t,onFileChange:e=>{let[t]=e;C(t)},onError:E})})(e)},accept:r,render:e=>{let{openFileDialog:t}=e;return(0,s.createElement)(p.MenuItem,{icon:$b,onClick:()=>{t()}},(0,h.__)("Upload"))}})),g),i&&(0,s.createElement)("form",{className:"block-editor-media-flow__url-input"},(0,s.createElement)("span",{className:"block-editor-media-replace-flow__image-url-label"},(0,h.__)("Current media URL:")),(0,s.createElement)(Gb,{value:{url:v},settings:[],showSuggestions:!1,onChange:e=>{let{url:t}=e;b(t),i(t),_.current.focus()}})))}})}));function Yb(e){let{url:t,urlLabel:n,className:o}=e;const r=c()(o,"block-editor-url-popover__link-viewer-url");return t?(0,s.createElement)(p.ExternalLink,{className:r,href:t},n||(0,rd.filterURLForDisplay)((0,rd.safeDecodeURI)(t))):(0,s.createElement)("span",{className:r})}function Zb(e){let{additionalControls:t,children:n,renderSettings:o,position:r="bottom center",focusOnMount:l="firstElement",...a}=e;const[c,u]=(0,s.useState)(!1),d=!!o&&c;return(0,s.createElement)(p.Popover,i({className:"block-editor-url-popover",focusOnMount:l,position:r},a),(0,s.createElement)("div",{className:"block-editor-url-popover__input-container"},(0,s.createElement)("div",{className:"block-editor-url-popover__row"},n,!!o&&(0,s.createElement)(p.Button,{className:"block-editor-url-popover__settings-toggle",icon:Ud,label:(0,h.__)("Link settings"),onClick:()=>{u(!c)},"aria-expanded":c})),d&&(0,s.createElement)("div",{className:"block-editor-url-popover__row block-editor-url-popover__settings"},o())),t&&!d&&(0,s.createElement)("div",{className:"block-editor-url-popover__additional-controls"},t))}Zb.LinkEditor=function(e){let{autocompleteRef:t,className:n,onChangeInputValue:o,value:r,...l}=e;return(0,s.createElement)("form",i({className:c()("block-editor-url-popover__link-editor",n)},l),(0,s.createElement)(Cb,{value:r,onChange:o,autocompleteRef:t}),(0,s.createElement)(p.Button,{icon:_b,label:(0,h.__)("Apply"),type:"submit"}))},Zb.LinkViewer=function(e){let{className:t,linkClassName:n,onEditLinkClick:o,url:r,urlLabel:l,...a}=e;return(0,s.createElement)("div",i({className:c()("block-editor-url-popover__link-viewer",t)},a),(0,s.createElement)(Yb,{url:r,urlLabel:l,className:n}),o&&(0,s.createElement)(p.Button,{icon:Ob,label:(0,h.__)("Edit"),onClick:o}))};var Xb=Zb;const Qb=e=>{let{src:t,onChange:n,onSubmit:o,onClose:r}=e;return(0,s.createElement)(Xb,{onClose:r},(0,s.createElement)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:o},(0,s.createElement)("input",{className:"block-editor-media-placeholder__url-input-field",type:"text","aria-label":(0,h.__)("URL"),placeholder:(0,h.__)("Paste or type URL"),onChange:n,value:t}),(0,s.createElement)(p.Button,{className:"block-editor-media-placeholder__url-input-submit-button",icon:_b,label:(0,h.__)("Apply"),type:"submit"})))};var Jb=(0,p.withFilters)("editor.MediaPlaceholder")((function(e){let{value:t={},allowedTypes:n,className:o,icon:r,labels:l={},mediaPreview:i,notices:a,isAppender:d,accept:f,addToGallery:g,multiple:v=!1,handleUpload:b=!0,dropZoneUIOnly:k,disableDropZone:_,disableMediaButtons:y,onError:E,onSelect:C,onCancel:S,onSelectURL:w,onDoubleClick:B,onFilesPreUpload:I=u.noop,onHTMLDrop:x=u.noop,children:T,mediaLibraryButton:N,placeholder:P,style:M}=e;const R=(0,m.useSelect)((e=>{const{getSettings:t}=e(Vn);return t().mediaUpload}),[]),[L,A]=(0,s.useState)(""),[D,O]=(0,s.useState)(!1);(0,s.useEffect)((()=>{var e;A(null!==(e=null==t?void 0:t.src)&&void 0!==e?e:"")}),[null==t?void 0:t.src]);const F=e=>{A(e.target.value)},z=()=>{O(!0)},V=()=>{O(!1)},H=e=>{e.preventDefault(),L&&w&&(w(L),V())},U=e=>{if(!b)return C(e);let o;if(I(e),v)if(g){let e=[];o=n=>{const o=(null!=t?t:[]).filter((t=>t.id?!e.some((e=>{let{id:n}=e;return Number(n)===Number(t.id)})):!e.some((e=>{let{urlSlug:n}=e;return t.url.includes(n)}))));C(o.concat(n)),e=n.map((e=>{const t=e.url.lastIndexOf("."),n=e.url.slice(0,t);return{id:e.id,urlSlug:n}}))}}else o=C;else o=e=>{let[t]=e;return C(t)};R({allowedTypes:n,filesList:e,onFileChange:o,onError:E})},G=e=>{U(e.target.files)},W=null!=P?P:e=>{let{instructions:t,title:u}=l;if(R||w||(t=(0,h.__)("To edit this block, you need permission to upload media.")),void 0===t||void 0===u){const e=null!=n?n:[],[o]=e,r=1===e.length,l=r&&"audio"===o,i=r&&"image"===o,s=r&&"video"===o;void 0===t&&R&&(t=(0,h.__)("Upload a media file or pick one from your media library."),l?t=(0,h.__)("Upload an audio file, pick one from your media library, or add one with a URL."):i?t=(0,h.__)("Upload an image file, pick one from your media library, or add one with a URL."):s&&(t=(0,h.__)("Upload a video file, pick one from your media library, or add one with a URL."))),void 0===u&&(u=(0,h.__)("Media"),l?u=(0,h.__)("Audio"):i?u=(0,h.__)("Image"):s&&(u=(0,h.__)("Video")))}const m=c()("block-editor-media-placeholder",o,{"is-appender":d});return(0,s.createElement)(p.Placeholder,{icon:r,label:u,instructions:t,className:m,notices:a,onDoubleClick:B,preview:i,style:M},e,T)},$=()=>_?null:(0,s.createElement)(p.DropZone,{onFilesDrop:U,onHTMLDrop:x}),j=()=>S&&(0,s.createElement)(p.Button,{className:"block-editor-media-placeholder__cancel-button",title:(0,h.__)("Cancel"),variant:"link",onClick:S},(0,h.__)("Cancel")),K=()=>w&&(0,s.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},(0,s.createElement)(p.Button,{className:"block-editor-media-placeholder__button",onClick:z,isPressed:D,variant:"tertiary"},(0,h.__)("Insert from URL")),D&&(0,s.createElement)(Qb,{src:L,onChange:F,onSubmit:H,onClose:V}));return k||y?(k&&Lt()("wp.blockEditor.MediaPlaceholder dropZoneUIOnly prop",{since:"5.4",alternative:"disableMediaButtons"}),(0,s.createElement)(Kb,null,$())):(0,s.createElement)(Kb,{fallback:W(K())},(()=>{const e=null!=N?N:e=>{let{open:t}=e;return(0,s.createElement)(p.Button,{variant:"tertiary",onClick:()=>{t()}},(0,h.__)("Media Library"))},o=(0,s.createElement)(jb,{addToGallery:g,gallery:v&&!(!n||0===n.length)&&n.every((e=>"image"===e||e.startsWith("image/"))),multiple:v,onSelect:C,allowedTypes:n,value:Array.isArray(t)?t.map((e=>{let{id:t}=e;return t})):t.id,render:e});if(R&&d)return(0,s.createElement)(s.Fragment,null,$(),(0,s.createElement)(p.FormFileUpload,{onChange:G,accept:f,multiple:v,render:e=>{let{openFileDialog:t}=e;const n=(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.Button,{variant:"primary",className:c()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onClick:t},(0,h.__)("Upload")),o,K(),j());return W(n)}}));if(R){const e=(0,s.createElement)(s.Fragment,null,$(),(0,s.createElement)(p.FormFileUpload,{variant:"primary",className:c()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onChange:G,accept:f,multiple:v},(0,h.__)("Upload")),o,K(),j());return W(e)}return W(o)})())})),ek=e=>{let{colorSettings:t,...n}=e;const o=t.map((e=>{let{value:t,onChange:n,...o}=e;return{...o,colorValue:t,onColorChange:n}}));return(0,s.createElement)(ff,i({settings:o,gradients:[],disableCustomGradients:!0},n))};const tk={position:"bottom right",isAlternate:!0};var nk=()=>(0,s.createElement)(s.Fragment,null,["bold","italic","link"].map((e=>(0,s.createElement)(p.Slot,{name:`RichText.ToolbarControls.${e}`,key:e}))),(0,s.createElement)(p.Slot,{name:"RichText.ToolbarControls"},(e=>{if(!e.length)return null;const t=e.map((e=>{let[{props:t}]=e;return t})).some((e=>{let{isActive:t}=e;return t}));return(0,s.createElement)(p.ToolbarItem,null,(n=>(0,s.createElement)(p.DropdownMenu,{icon:Ud
78
+ /* translators: button label text should, if possible, be under 16 characters. */,label:(0,h.__)("More"),toggleProps:{...n,className:c()(n.className,{"is-pressed":t}),describedBy:(0,h.__)("Displays more block tools")},controls:(0,u.orderBy)(e.map((e=>{let[{props:t}]=e;return t})),"title"),popoverProps:tk})))}))),ok=e=>{let{inline:t,anchorRef:n}=e;return t?(0,s.createElement)(p.Popover,{noArrow:!0,position:"top center",focusOnMount:!1,anchorRef:n,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar"},(0,s.createElement)("div",{className:"block-editor-rich-text__inline-format-toolbar-group"},(0,s.createElement)(p.ToolbarGroup,null,(0,s.createElement)(nk,null)))):(0,s.createElement)(Zn,{group:"inline"},(0,s.createElement)(nk,null))};function rk(){const{didAutomaticChange:e,getSettings:t}=(0,m.useSelect)(Vn);return(0,d.useRefEffect)((n=>{function o(n){const{keyCode:o}=n;n.defaultPrevented||o!==va.DELETE&&o!==va.BACKSPACE&&o!==va.ESCAPE||e()&&(n.preventDefault(),t().__experimentalUndo())}return n.addEventListener("keydown",o),()=>{n.removeEventListener("keydown",o)}}),[])}function lk(e){return e.filter((e=>{let{type:t}=e;return/^image\/(?:jpe?g|png|gif|webp)$/.test(t)})).map((e=>`<img src="${(0,yp.createBlobURL)(e)}">`)).join("")}var ik=window.wp.shortcode;function sk(e,t){if(null!=t&&t.length){let n=e.formats.length;for(;n--;)e.formats[n]=[...t,...e.formats[n]||[]]}}function ak(e){if(!0===e||"p"===e||"li"===e)return!0===e?"p":e}function ck(e){let{allowedFormats:t,formattingControls:n,disableFormats:o}=e;return o?ck.EMPTY_ARRAY:t||n?t||(Lt()("wp.blockEditor.RichText formattingControls prop",{since:"5.4",alternative:"allowedFormats"}),n.map((e=>`core/${e}`))):void 0}function uk(e){let{value:t,pastedBlocks:n=[],onReplace:o,onSplit:r,onSplitMiddle:l,multilineTag:i}=e;if(!o||!r)return;const s=[],[a,c]=(0,Mt.split)(t),u=n.length>0;let d=-1;const p=(0,Mt.isEmpty)(a)&&!(0,Mt.isEmpty)(c);u&&(0,Mt.isEmpty)(a)||(s.push(r((0,Mt.toHTMLString)({value:a,multilineTag:i}),!p)),d+=1),u?(s.push(...n),d+=n.length):l&&s.push(l()),(u||l)&&(0,Mt.isEmpty)(c)||s.push(r((0,Mt.toHTMLString)({value:c,multilineTag:i}),p)),o(s,u?d:1,u?-1:0)}function dk(e,t){return t?(0,Mt.replace)(e,/\n+/g,Mt.__UNSTABLE_LINE_SEPARATOR):(0,Mt.replace)(e,new RegExp(Mt.__UNSTABLE_LINE_SEPARATOR,"g"),"\n")}function pk(e){const t=(0,s.useRef)(e);return t.current=e,(0,d.useRefEffect)((e=>{function n(e){const{isSelected:n,disableFormats:o,onChange:l,value:i,formatTypes:s,tagName:a,onReplace:c,onSplit:u,onSplitMiddle:d,__unstableEmbedURLOnPaste:p,multilineTag:m,preserveWhiteSpace:f,pastePlainText:h}=t.current;if(!n)return void e.preventDefault();const{clipboardData:g}=e;let v="",b="";try{v=g.getData("text/plain"),b=g.getData("text/html")}catch(e){try{b=g.getData("Text")}catch(e){return}}if(b=function(e){return e.replace(/.*<!--StartFragment-->/s,"").replace(/<!--EndFragment-->.*/s,"")}(b),b=function(e){const t="<meta charset='utf-8'>";return e.startsWith(t)?e.slice(t.length):e}(b),e.preventDefault(),window.console.log("Received HTML:\n\n",b),window.console.log("Received plain text:\n\n",v),o)return void l((0,Mt.insert)(i,v));const k=s.reduce(((e,t)=>{let{__unstablePasteRule:n}=t;return n&&e===i&&(e=n(i,{html:b,plainText:v})),e}),i);if(k!==i)return void l(k);const _=[...(0,rr.getFilesFromDataTransfer)(g)];if("true"===g.getData("rich-text")){const e=g.getData("rich-text-multi-line-tag")||void 0;let t=(0,Mt.create)({html:b,multilineTag:e,multilineWrapperTags:"li"===e?["ul","ol"]:void 0,preserveWhiteSpace:f});return t=dk(t,!!m),sk(t,i.activeFormats),void l((0,Mt.insert)(i,t))}if(h)return void l((0,Mt.insert)(i,(0,Mt.create)({text:v})));if(_&&_.length&&!b){const e=(0,r.pasteHandler)({HTML:lk(_),mode:"BLOCKS",tagName:a,preserveWhiteSpace:f});return window.console.log("Received items:\n\n",_),void(c&&(0,Mt.isEmpty)(i)?c(e):uk({value:i,pastedBlocks:e,onReplace:c,onSplit:u,onSplitMiddle:d,multilineTag:m}))}let y=c&&u?"AUTO":"INLINE";var E;"AUTO"===y&&(0,Mt.isEmpty)(i)&&(E=v,(0,ik.regexp)(".*").test(E))&&(y="BLOCKS"),p&&(0,Mt.isEmpty)(i)&&(0,rd.isURL)(v.trim())&&(y="BLOCKS");const C=(0,r.pasteHandler)({HTML:b,plainText:v,mode:y,tagName:a,preserveWhiteSpace:f});if("string"==typeof C){let e=(0,Mt.create)({html:C});e=dk(e,!!m),sk(e,i.activeFormats),l((0,Mt.insert)(i,e))}else C.length>0&&(c&&(0,Mt.isEmpty)(i)?c(C,C.length-1,-1):uk({value:i,pastedBlocks:C,onReplace:c,onSplit:u,onSplitMiddle:d,multilineTag:m}))}return e.addEventListener("paste",n),()=>{e.removeEventListener("paste",n)}}),[])}function mk(e){const{__unstableMarkLastChangeAsPersistent:t,__unstableMarkAutomaticChange:n}=(0,m.useDispatch)(Vn),o=(0,s.useRef)(e);return o.current=e,(0,d.useRefEffect)((e=>{function l(){const{value:e,onReplace:t}=o.current;if(!t)return;const{start:l,text:i}=e;if(" "!==i.slice(l-1,l))return;const s=i.slice(0,l).trim(),a=(0,r.getBlockTransforms)("from").filter((e=>{let{type:t}=e;return"prefix"===t})),c=(0,r.findTransform)(a,(e=>{let{prefix:t}=e;return s===t}));if(!c)return;const u=(0,Mt.toHTMLString)({value:(0,Mt.slice)(e,l,i.length)});t([c.transform(u)]),n()}function i(e){const{inputType:r,type:i}=e,{value:s,onChange:a,__unstableAllowPrefixTransformations:c,formatTypes:u}=o.current;if("insertText"!==r&&"compositionend"!==i)return;c&&l&&l();const d=u.reduce(((e,t)=>{let{__unstableInputRule:n}=t;return n&&(e=n(e)),e}),s);d!==s&&(t(),a({...d,activeFormats:s.activeFormats}),n())}return e.addEventListener("input",i),e.addEventListener("compositionend",i),()=>{e.removeEventListener("input",i),e.removeEventListener("compositionend",i)}}),[])}function fk(e){const{__unstableMarkAutomaticChange:t}=(0,m.useDispatch)(Vn),n=(0,s.useRef)(e);return n.current=e,(0,d.useRefEffect)((e=>{function o(e){if(e.defaultPrevented)return;const{removeEditorOnlyFormats:o,value:l,onReplace:i,onSplit:s,onSplitMiddle:a,multilineTag:c,onChange:u,disableLineBreaks:d,onSplitAtEnd:p}=n.current;if(e.keyCode!==va.ENTER)return;e.preventDefault();const m={...l};m.formats=o(l);const f=i&&s;if(i){const e=(0,r.getBlockTransforms)("from").filter((e=>{let{type:t}=e;return"enter"===t})),n=(0,r.findTransform)(e,(e=>e.regExp.test(m.text)));n&&(i([n.transform({content:m.text})]),t())}if(c)e.shiftKey?d||u((0,Mt.insert)(m,"\n")):f&&(0,Mt.__unstableIsEmptyLine)(m)?uk({value:m,onReplace:i,onSplit:s,onSplitMiddle:a,multilineTag:c}):u((0,Mt.__unstableInsertLineSeparator)(m));else{const{text:t,start:n,end:o}=m,r=p&&n===o&&o===t.length;e.shiftKey||!f&&!r?d||u((0,Mt.insert)(m,"\n")):!f&&r?p():f&&uk({value:m,onReplace:i,onSplit:s,onSplitMiddle:a,multilineTag:c})}}return e.addEventListener("keydown",o),()=>{e.removeEventListener("keydown",o)}}),[])}function hk(e){return e(Mt.store).getFormatTypes()}ck.EMPTY_ARRAY=[];const gk=new Set(["a","audio","button","details","embed","iframe","input","label","select","textarea","video"]);function vk(e){return(0,d.useRefEffect)((t=>{function n(t){for(const n of e.current)n(t)}return t.addEventListener("keydown",n),()=>{t.removeEventListener("keydown",n)}}),[])}function bk(e){return(0,d.useRefEffect)((t=>{function n(t){for(const n of e.current)n(t)}return t.addEventListener("input",n),()=>{t.removeEventListener("input",n)}}),[])}function kk(e){let{formatTypes:t,onChange:n,onFocus:o,value:r,forwardedRef:l}=e;return t.map((e=>{const{name:t,edit:i}=e;if(!i)return null;const a=(0,Mt.getActiveFormat)(r,t);let c=void 0!==a;const d=(0,Mt.getActiveObject)(r),p=void 0!==d&&d.type===t;if("core/link"===t&&!(0,Mt.isCollapsed)(r)){const e=r.formats,t=(0,u.find)(e[r.start],{type:"core/link"}),n=(0,u.find)(e[r.end-1],{type:"core/link"});t&&n&&t===n||(c=!1)}return(0,s.createElement)(i,{key:t,isActive:c,activeAttributes:c&&a.attributes||{},isObjectActive:p,activeObjectAttributes:p&&d.attributes||{},value:r,onChange:n,onFocus:o,contentRef:l})}))}const _k=(0,s.createContext)(),yk=(0,s.createContext)(),Ek=(0,s.forwardRef)((function e(t,n){let{children:o,tagName:l="div",value:a="",onChange:f,isSelected:h,multiline:g,inlineToolbar:v,wrapperClassName:b,autocompleters:k,onReplace:_,placeholder:y,allowedFormats:E,formattingControls:C,withoutInteractiveFormatting:S,onRemove:w,onMerge:B,onSplit:I,__unstableOnSplitAtEnd:x,__unstableOnSplitMiddle:T,identifier:N,preserveWhiteSpace:P,__unstablePastePlainText:M,__unstableEmbedURLOnPaste:R,__unstableDisableFormats:L,disableLineBreaks:A,unstableOnFocus:D,__unstableAllowPrefixTransformations:O,...F}=t;const z=(0,d.useInstanceId)(e);N=N||z,F=function(e){return(0,u.omit)(e,["__unstableMobileNoFocusOnMount","deleteEnter","placeholderTextColor","textAlign","selectionColor","tagsToEliminate","rootTagsToEliminate","disableEditingMenu","fontSize","fontFamily","fontWeight","fontStyle","minWidth","maxWidth","setRef"])}(F);const V=(0,s.useRef)(),{clientId:H}=Wn(),{selectionStart:U,selectionEnd:G,isSelected:W,disabled:$}=(0,m.useSelect)((e=>{const{getSelectionStart:t,getSelectionEnd:n,isMultiSelecting:o,hasMultiSelection:r}=e(Vn),l=t(),i=n();let s;return void 0===h?s=l.clientId===H&&l.attributeKey===N:h&&(s=l.clientId===H),{selectionStart:s?l.offset:void 0,selectionEnd:s?i.offset:void 0,isSelected:s,disabled:o()||r()}})),{selectionChange:j}=(0,m.useDispatch)(Vn),K=ak(g),q=ck({allowedFormats:E,formattingControls:C,disableFormats:L}),Y=!q||q.length>0;let Z=a,X=f;Array.isArray(a)&&(Z=r.children.toHTML(a),X=e=>f(r.children.fromDOM((0,Mt.__unstableCreateElement)(document,e).childNodes)));const Q=(0,s.useCallback)(((e,t)=>{j(H,N,e,t)}),[H,N]),{formatTypes:J,prepareHandlers:ee,valueHandlers:te,changeHandlers:ne,dependencies:oe}=function(e){let{clientId:t,identifier:n,withoutInteractiveFormatting:o,allowedFormats:r}=e;const l=(0,m.useSelect)(hk,[]),i=(0,s.useMemo)((()=>l.filter((e=>{let{name:t,tagName:n}=e;return!(r&&!r.includes(t)||o&&gk.has(n))}))),[l,r,gk]),a=(0,m.useSelect)((e=>i.reduce(((o,r)=>(r.__experimentalGetPropsForEditableTreePreparation&&(o[r.name]=r.__experimentalGetPropsForEditableTreePreparation(e,{richTextIdentifier:n,blockClientId:t})),o)),{})),[i,t,n]),c=(0,m.useDispatch)(),u=[],d=[],p=[],f=[];return i.forEach((e=>{if(e.__experimentalCreatePrepareEditableTree){const o=a[e.name],r=e.__experimentalCreatePrepareEditableTree(o,{richTextIdentifier:n,blockClientId:t});e.__experimentalCreateOnChangeEditableValue?d.push(r):u.push(r);for(const e in o)f.push(o[e])}if(e.__experimentalCreateOnChangeEditableValue){let o={};e.__experimentalGetPropsForEditableTreeChangeHandler&&(o=e.__experimentalGetPropsForEditableTreeChangeHandler(c,{richTextIdentifier:n,blockClientId:t})),p.push(e.__experimentalCreateOnChangeEditableValue({...a[e.name]||{},...o},{richTextIdentifier:n,blockClientId:t}))}})),{formatTypes:i,prepareHandlers:u,valueHandlers:d,changeHandlers:p,dependencies:f}}({clientId:H,identifier:N,withoutInteractiveFormatting:S,allowedFormats:q});function re(e){return J.forEach((t=>{t.__experimentalCreatePrepareEditableTree&&(e=(0,Mt.removeFormat)(e,t.name,0,e.text.length))})),e.formats}const{value:le,onChange:ie,ref:se}=(0,Mt.__unstableUseRichText)({value:Z,onChange(e,t){let{__unstableFormats:n,__unstableText:o}=t;X(e),Object.values(ne).forEach((e=>{e(n,o)}))},selectionStart:U,selectionEnd:G,onSelectionChange:Q,placeholder:y,__unstableIsSelected:W,__unstableMultilineTag:K,__unstableDisableFormats:L,preserveWhiteSpace:P,__unstableDependencies:[...oe,l],__unstableAfterParse:function(e){return te.reduce(((t,n)=>n(t,e.text)),e.formats)},__unstableBeforeSerialize:re,__unstableAddInvisibleFormats:function(e){return ee.reduce(((t,n)=>n(t,e.text)),e.formats)}}),ae=function(e){return(0,p.__unstableUseAutocompleteProps)({...e,completers:Mg(e)})}({onReplace:_,completers:k,record:le,onChange:ie});!function(e){let{value:t}=e;const n=t.activeFormats&&!!t.activeFormats.length,{isCaretWithinFormattedText:o}=(0,m.useSelect)(Vn),{enterFormattedText:r,exitFormattedText:l}=(0,m.useDispatch)(Vn);(0,s.useEffect)((()=>{n?o()||r():o()&&l()}),[n])}({value:le}),function(e){let{html:t,value:n}=e;const o=(0,s.useRef)(),r=n.activeFormats&&!!n.activeFormats.length,{__unstableMarkLastChangeAsPersistent:l}=(0,m.useDispatch)(Vn);(0,s.useLayoutEffect)((()=>{if(o.current){if(o.current!==n.text){const e=window.setTimeout((()=>{l()}),1e3);return o.current=n.text,()=>{window.clearTimeout(e)}}l()}else o.current=n.text}),[t,r])}({html:Z,value:le});const ce=(0,s.useRef)(new Set),ue=(0,s.useRef)(new Set);function de(){V.current.focus()}const pe=l,me=(0,s.createElement)(s.Fragment,null,W&&(0,s.createElement)(_k.Provider,{value:ce},(0,s.createElement)(yk.Provider,{value:ue},(0,s.createElement)(p.Popover.__unstableSlotNameProvider,{value:"__unstable-block-tools-after"},o&&o({value:le,onChange:ie,onFocus:de}),(0,s.createElement)(kk,{value:le,onChange:ie,onFocus:de,formatTypes:J,forwardedRef:V})))),W&&Y&&(0,s.createElement)(ok,{inline:v,anchorRef:V.current}),(0,s.createElement)(pe,i({role:"textbox","aria-multiline":!0,"aria-label":y},F,ae,{ref:(0,d.useMergeRefs)([ae.ref,F.ref,se,mk({value:le,onChange:ie,__unstableAllowPrefixTransformations:O,formatTypes:J,onReplace:_}),(0,d.useRefEffect)((e=>{function t(e){(va.isKeyboardEvent.primary(e,"z")||va.isKeyboardEvent.primary(e,"y")||va.isKeyboardEvent.primaryShift(e,"z"))&&e.preventDefault()}return e.addEventListener("keydown",t),()=>{e.addEventListener("keydown",t)}}),[]),vk(ce),bk(ue),rk(),pk({isSelected:W,disableFormats:L,onChange:ie,value:le,formatTypes:J,tagName:l,onReplace:_,onSplit:I,onSplitMiddle:T,__unstableEmbedURLOnPaste:R,multilineTag:K,preserveWhiteSpace:P,pastePlainText:M}),fk({removeEditorOnlyFormats:re,value:le,onReplace:_,onSplit:I,onSplitMiddle:T,multilineTag:K,onChange:ie,disableLineBreaks:A,onSplitAtEnd:x}),V,n]),contentEditable:!$||void 0,suppressContentEditableWarning:!$,className:c()("block-editor-rich-text__editable",F.className,"rich-text"),onFocus:D,onKeyDown:function(e){const{keyCode:t}=e;if(!e.defaultPrevented&&(t===va.DELETE||t===va.BACKSPACE)){const{start:n,end:o,text:r}=le,l=t===va.BACKSPACE,i=le.activeFormats&&!!le.activeFormats.length;if(!(0,Mt.isCollapsed)(le)||i||l&&0!==n||!l&&o!==r.length)return;B&&B(!l),w&&(0,Mt.isEmpty)(le)&&l&&w(!l),e.preventDefault()}}})));if(!b)return me;Lt()("wp.blockEditor.RichText wrapperClassName prop",{since:"5.4",alternative:"className prop or create your own wrapper div"});const fe=c()("block-editor-rich-text",b);return(0,s.createElement)("div",{className:fe},me)}));Ek.Content=e=>{let{value:t,tagName:n,multiline:o,...l}=e;Array.isArray(t)&&(t=r.children.toHTML(t));const i=ak(o);!t&&i&&(t=`<${i}></${i}>`);const a=(0,s.createElement)(s.RawHTML,null,t);return n?(0,s.createElement)(n,(0,u.omit)(l,["format"]),a):a},Ek.isEmpty=e=>!e||0===e.length;var Ck=Ek;const Sk=(0,s.forwardRef)(((e,t)=>(0,s.createElement)(Ck,i({ref:t},e,{__unstableDisableFormats:!0,preserveWhiteSpace:!0}))));Sk.Content=e=>{let{value:t="",tagName:n="div",...o}=e;return(0,s.createElement)(n,o,t)};var wk=Sk,Bk=(0,s.forwardRef)(((e,t)=>{let{__experimentalVersion:n,...o}=e;if(2===n)return(0,s.createElement)(wk,i({ref:t},o));const{className:r,onChange:l,...a}=o;return(0,s.createElement)(Er.Z,i({ref:t,className:c()("block-editor-plain-text",r),onChange:e=>l(e.target.value)},a))}));function Ik(e){let{property:t,viewport:n,desc:o}=e;const r=(0,d.useInstanceId)(Ik),l=o||(0,h.sprintf)(
79
  /* translators: 1: property name. 2: viewport name. */
80
+ (0,h._x)("Controls the %1$s property for %2$s viewports.","Text labelling a interface as controlling a given layout property (eg: margin) for a given screen size."),t,n.label);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("span",{"aria-describedby":`rbc-desc-${r}`},n.label),(0,s.createElement)(p.VisuallyHidden,{as:"span",id:`rbc-desc-${r}`},l))}var xk=function(e){const{title:t,property:n,toggleLabel:o,onIsResponsiveChange:r,renderDefaultControl:l,renderResponsiveControls:i,isResponsive:a=!1,defaultLabel:u={id:"all",
81
  /* translators: 'Label. Used to signify a layout property (eg: margin, padding) will apply uniformly to all screensizes.' */
82
  label:(0,h.__)("All")},viewports:d=[{id:"small",label:(0,h.__)("Small screens")},{id:"medium",label:(0,h.__)("Medium screens")},{id:"large",label:(0,h.__)("Large screens")}]}=e;if(!t||!n||!l)return null;const m=o||(0,h.sprintf)(
83
  /* translators: 'Toggle control label. Should the property be the same across all screen sizes or unique per screen size.'. %s property value for the control (eg: margin, padding...etc) */
84
+ (0,h.__)("Use the same %s on all screensizes."),n),f=(0,h.__)("Toggle between using the same value for all screen sizes or using a unique value per screen size."),g=l((0,s.createElement)(Ik,{property:n,viewport:u}),u);
85
+ /* translators: 'Help text for the responsive mode toggle control.' */return(0,s.createElement)("fieldset",{className:"block-editor-responsive-block-control"},(0,s.createElement)("legend",{className:"block-editor-responsive-block-control__title"},t),(0,s.createElement)("div",{className:"block-editor-responsive-block-control__inner"},(0,s.createElement)(p.ToggleControl,{className:"block-editor-responsive-block-control__toggle",label:m,checked:!a,onChange:r,help:f}),(0,s.createElement)("div",{className:c()("block-editor-responsive-block-control__group",{"is-responsive":a})},!a&&g,a&&(i?i(d):d.map((e=>(0,s.createElement)(s.Fragment,{key:e.id},l((0,s.createElement)(Ik,{property:n,viewport:e}),e))))))))};function Tk(e){let{character:t,type:n,onUse:o}=e;const r=(0,s.useContext)(_k),l=(0,s.useRef)();return l.current=o,(0,s.useEffect)((()=>{function e(e){va.isKeyboardEvent[n](e,t)&&(l.current(),e.preventDefault())}return r.current.add(e),()=>{r.current.delete(e)}}),[t,n]),null}function Nk(e){let t,{name:n,shortcutType:o,shortcutCharacter:r,...l}=e,a="RichText.ToolbarControls";return n&&(a+=`.${n}`),o&&r&&(t=va.displayShortcut[o](r)),(0,s.createElement)(p.Fill,{name:a},(0,s.createElement)(p.ToolbarButton,i({},l,{shortcut:t})))}function Pk(e){let{inputType:t,onInput:n}=e;const o=(0,s.useContext)(yk),r=(0,s.useRef)();return r.current=n,(0,s.useEffect)((()=>{function e(e){e.inputType===t&&(r.current(),e.preventDefault())}return o.current.add(e),()=>{o.current.delete(e)}}),[t]),null}const Mk=(0,s.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,s.createElement)(p.Path,{d:"M9.4 20.5L5.2 3.8l14.6 9-2 .3c-.2 0-.4.1-.7.1-.9.2-1.6.3-2.2.5-.8.3-1.4.5-1.8.8-.4.3-.8.8-1.3 1.5-.4.5-.8 1.2-1.2 2l-.3.6-.9 1.9zM7.6 7.1l2.4 9.3c.2-.4.5-.8.7-1.1.6-.8 1.1-1.4 1.6-1.8.5-.4 1.3-.8 2.2-1.1l1.2-.3-8.1-5z"}));var Rk=(0,s.forwardRef)((function(e,t){const n=(0,m.useSelect)((e=>e(Vn).isNavigationMode()),[]),{setNavigationMode:o}=(0,m.useDispatch)(Vn),r=e=>{o("edit"!==e)};return(0,s.createElement)(p.Dropdown,{renderToggle:o=>{let{isOpen:r,onToggle:l}=o;return(0,s.createElement)(p.Button,i({},e,{ref:t,icon:n?Mk:Ob,"aria-expanded":r,"aria-haspopup":"true",onClick:l
86
+ /* translators: button label text should, if possible, be under 16 characters. */,label:(0,h.__)("Tools")}))},position:"bottom right",renderContent:()=>(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.NavigableMenu,{role:"menu","aria-label":(0,h.__)("Tools")},(0,s.createElement)(p.MenuItemsChoice,{value:n?"select":"edit",onSelect:r,choices:[{value:"edit",label:(0,s.createElement)(s.Fragment,null,(0,s.createElement)(wo,{icon:Ob}),(0,h.__)("Edit"))},{value:"select",label:(0,s.createElement)(s.Fragment,null,Mk,(0,h.__)("Select"))}]})),(0,s.createElement)("div",{className:"block-editor-tool-selector__help"},(0,h.__)("Tools provide different interactions for selecting, navigating, and editing blocks. Toggle between select and edit by pressing Escape and Enter.")))})}));function Lk(e){let{units:t,...n}=e;const o=(0,p.__experimentalUseCustomUnits)({availableUnits:mo("spacing.units")||["%","px","em","rem","vw"],units:t});return(0,s.createElement)(p.__experimentalUnitControl,i({units:o},n))}var Ak=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M20 10.8H6.7l4.1-4.5-1.1-1.1-5.8 6.3 5.8 5.8 1.1-1.1-4-3.9H20z"}));class Dk extends s.Component{constructor(){super(...arguments),this.toggle=this.toggle.bind(this),this.submitLink=this.submitLink.bind(this),this.state={expanded:!1}}toggle(){this.setState({expanded:!this.state.expanded})}submitLink(e){e.preventDefault(),this.toggle()}render(){const{url:e,onChange:t}=this.props,{expanded:n}=this.state,o=e?(0,h.__)("Edit link"):(0,h.__)("Insert link");return(0,s.createElement)("div",{className:"block-editor-url-input__button"},(0,s.createElement)(p.Button,{icon:Am,label:o,onClick:this.toggle,className:"components-toolbar__control",isPressed:!!e}),n&&(0,s.createElement)("form",{className:"block-editor-url-input__button-modal",onSubmit:this.submitLink},(0,s.createElement)("div",{className:"block-editor-url-input__button-modal-line"},(0,s.createElement)(p.Button,{className:"block-editor-url-input__back",icon:Ak,label:(0,h.__)("Close"),onClick:this.toggle}),(0,s.createElement)(Cb,{value:e||"",onChange:t}),(0,s.createElement)(p.Button,{icon:_b,label:(0,h.__)("Submit"),type:"submit"}))))}}var Ok=Dk,Fk=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));const zk="none",Vk="custom",Hk="media",Uk="attachment",Gk=["noreferrer","noopener"],Wk=(0,s.createElement)(p.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(p.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),(0,s.createElement)(p.Path,{d:"m19 5v14h-14v-14h14m0-2h-14c-1.1 0-2 0.9-2 2v14c0 1.1 0.9 2 2 2h14c1.1 0 2-0.9 2-2v-14c0-1.1-0.9-2-2-2z"}),(0,s.createElement)(p.Path,{d:"m14.14 11.86l-3 3.87-2.14-2.59-3 3.86h12l-3.86-5.14z"})),$k=e=>{let{linkDestination:t,onChangeUrl:n,url:o,mediaType:r="image",mediaUrl:l,mediaLink:i,linkTarget:a,linkClass:c,rel:d}=e;const[m,f]=(0,s.useState)(!1),g=(0,s.useCallback)((()=>{f(!0)})),[v,b]=(0,s.useState)(!1),[k,_]=(0,s.useState)(null),y=(0,s.useRef)(null),E=(0,s.useCallback)((()=>{t!==Hk&&t!==Uk||_(""),b(!0)})),C=(0,s.useCallback)((()=>{b(!1)})),S=(0,s.useCallback)((()=>{_(null),C(),f(!1)})),w=e=>{let t=e;return void 0===e||(0,u.isEmpty)(t)||(0,u.isEmpty)(t)||((0,u.each)(Gk,(e=>{const n=new RegExp("\\b"+e+"\\b","gi");t=t.replace(n,"")})),t!==e&&(t=t.trim()),(0,u.isEmpty)(t)&&(t=void 0)),t},B=(0,s.useCallback)((()=>e=>{const t=y.current;t&&t.contains(e.target)||(f(!1),_(null),C())})),I=(0,s.useCallback)((()=>e=>{if(k){var t;const e=(null===(t=T().find((e=>e.url===k)))||void 0===t?void 0:t.linkDestination)||Vk;n({href:k,linkDestination:e})}C(),_(null),e.preventDefault()})),x=(0,s.useCallback)((()=>{n({linkDestination:zk,href:""})})),T=()=>{const e=[{linkDestination:Hk,title:(0,h.__)("Media File"),url:"image"===r?l:void 0,icon:Wk}];return"image"===r&&i&&e.push({linkDestination:Uk,title:(0,h.__)("Attachment Page"),url:"image"===r?i:void 0,icon:(0,s.createElement)(p.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(p.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),(0,s.createElement)(p.Path,{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z"}))}),e},N=(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.ToggleControl,{label:(0,h.__)("Open in new tab"),onChange:e=>{const t=(e=>{const t=e?"_blank":void 0;let n;return n=t||d?w(d):void 0,{linkTarget:t,rel:n}})(e);n(t)},checked:"_blank"===a}),(0,s.createElement)(p.TextControl,{label:(0,h.__)("Link Rel"),value:w(d)||"",onChange:e=>{n({rel:e})}}),(0,s.createElement)(p.TextControl,{label:(0,h.__)("Link CSS Class"),value:c||"",onChange:e=>{n({linkClass:e})}})),P=null!==k?k:o,M=((0,u.find)(T(),["linkDestination",t])||{}).title;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.ToolbarButton,{icon:Am,className:"components-toolbar__control",label:o?(0,h.__)("Edit link"):(0,h.__)("Insert link"),"aria-expanded":m,onClick:g}),m&&(0,s.createElement)(Xb,{onFocusOutside:B(),onClose:S,renderSettings:()=>N,additionalControls:!P&&(0,s.createElement)(p.NavigableMenu,null,(0,u.map)(T(),(e=>(0,s.createElement)(p.MenuItem,{key:e.linkDestination,icon:e.icon,onClick:()=>{_(null),(e=>{const t=T();let o;o=e?((0,u.find)(t,(t=>t.url===e))||{linkDestination:Vk}).linkDestination:zk,n({linkDestination:o,href:e})})(e.url),C()}},e.title))))},(!o||v)&&(0,s.createElement)(Xb.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:P,onChangeInputValue:_,onSubmit:I(),autocompleteRef:y}),o&&!v&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Xb.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:o,onEditLinkClick:E,urlLabel:M}),(0,s.createElement)(p.Button,{icon:Fk,label:(0,h.__)("Remove link"),onClick:x}))))};function jk(e){let{children:t,className:n,isEnabled:o=!0,deviceType:r,setDeviceType:l}=e;if((0,d.useViewportMatch)("small","<"))return null;const i={className:c()(n,"block-editor-post-preview__dropdown-content"),position:"bottom left"},a={variant:"tertiary",className:"block-editor-post-preview__button-toggle",disabled:!o,
87
  /* translators: button label text should, if possible, be under 16 characters. */
88
+ children:(0,h.__)("Preview")};return(0,s.createElement)(p.DropdownMenu,{className:"block-editor-post-preview__dropdown",popoverProps:i,toggleProps:a,icon:null},(()=>(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.MenuGroup,null,(0,s.createElement)(p.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>l("Desktop"),icon:"Desktop"===r&&rp},(0,h.__)("Desktop")),(0,s.createElement)(p.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>l("Tablet"),icon:"Tablet"===r&&rp},(0,h.__)("Tablet")),(0,s.createElement)(p.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>l("Mobile"),icon:"Mobile"===r&&rp},(0,h.__)("Mobile"))),t)))}function Kk(e){const[t,n]=(0,s.useState)(window.innerWidth);(0,s.useEffect)((()=>{if("Desktop"===e)return;const t=()=>n(window.innerWidth);return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}}),[e]);const o=e=>{let n;switch(e){case"Tablet":n=780;break;case"Mobile":n=360;break;default:return null}return n<t?n:t};return(e=>{const t="Mobile"===e?"768px":"1024px";switch(e){case"Tablet":case"Mobile":return{width:o(e),margin:(window.innerHeight<800?36:72)+"px auto",height:t,borderRadius:"2px 2px 2px 2px",border:"1px solid #ddd",overflowY:"auto"};default:return null}})(e)}var qk=(0,m.withSelect)((e=>({selectedBlockClientId:e(Vn).getBlockSelectionStart()})))((e=>{let{selectedBlockClientId:t}=e;const n=Ba(t);return t?(0,s.createElement)(p.Button,{variant:"secondary",className:"block-editor-skip-to-selected-block",onClick:()=>{n.current.focus()}},(0,h.__)("Skip to the selected block")):null})),Yk=window.wp.wordcount,Zk=(0,m.withSelect)((e=>{const{getMultiSelectedBlocks:t}=e(Vn);return{blocks:t()}}))((function(e){let{blocks:t}=e;const n=(0,Yk.count)((0,r.serialize)(t),"words");return(0,s.createElement)("div",{className:"block-editor-multi-selection-inspector__card"},(0,s.createElement)(Ua,{icon:tp,showColors:!0}),(0,s.createElement)("div",{className:"block-editor-multi-selection-inspector__card-content"},(0,s.createElement)("div",{className:"block-editor-multi-selection-inspector__card-title"},(0,h.sprintf)(
89
  /* translators: %d: number of blocks */
90
  (0,h._n)("%d block","%d blocks",t.length),t.length)),(0,s.createElement)("div",{className:"block-editor-multi-selection-inspector__card-description"},(0,h.sprintf)(
91
  /* translators: %d: number of words */
92
+ (0,h._n)("%d word","%d words",n),n))))}));function Xk(e){let{blockName:t}=e;const{preferredStyle:n,onUpdatePreferredStyleVariations:o,styles:l}=(0,m.useSelect)((e=>{var n,o;const l=e(Vn).getSettings().__experimentalPreferredStyleVariations;return{preferredStyle:null==l||null===(n=l.value)||void 0===n?void 0:n[t],onUpdatePreferredStyleVariations:null!==(o=null==l?void 0:l.onChange)&&void 0!==o?o:null,styles:e(r.store).getBlockStyles(t)}}),[t]),i=(0,s.useMemo)((()=>[{label:(0,h.__)("Not set"),value:""},...l.map((e=>{let{label:t,name:n}=e;return{label:t,value:n}}))]),[l]),a=(0,s.useMemo)((()=>{var e;return null===(e=ap(l))||void 0===e?void 0:e.name}),[l]),c=(0,s.useCallback)((e=>{o(t,e)}),[t,o]);return n&&n!==a?o&&(0,s.createElement)("div",{className:"default-style-picker__default-switcher"},(0,s.createElement)(p.SelectControl,{options:i,value:n||"",label:(0,h.__)("Default Style"),onChange:c})):null}const Qk=e=>{let{clientId:t,blockName:n,hasBlockStyles:o}=e;const l=Rd(t);return(0,s.createElement)("div",{className:"block-editor-block-inspector"},(0,s.createElement)(Ga,l),(0,s.createElement)(xv,{blockClientId:t}),o&&(0,s.createElement)("div",null,(0,s.createElement)(p.PanelBody,{title:(0,h.__)("Styles")},(0,s.createElement)(fv,{scope:"core/edit-post",clientId:t}),(0,r.hasBlockSupport)(n,"defaultStylePicker",!0)&&(0,s.createElement)(Xk,{blockName:n}))),(0,s.createElement)(er.Slot,null),(0,s.createElement)(er.Slot,{__experimentalGroup:"typography",label:(0,h.__)("Typography")}),(0,s.createElement)(er.Slot,{__experimentalGroup:"border",label:(0,h.__)("Border")}),(0,s.createElement)(er.Slot,{__experimentalGroup:"dimensions",label:(0,h.__)("Dimensions")}),(0,s.createElement)("div",null,(0,s.createElement)(Jk,null)),(0,s.createElement)(qk,{key:"back"}))},Jk=()=>{const e=(0,p.__experimentalUseSlot)(Jo.slotName);return Boolean(e.fills&&e.fills.length)?(0,s.createElement)(p.PanelBody,{className:"block-editor-block-inspector__advanced",title:(0,h.__)("Advanced"),initialOpen:!1},(0,s.createElement)(er.Slot,{__experimentalGroup:"advanced"})):null};var e_=e=>{let{showNoBlockSelectedMessage:t=!0}=e;const{count:n,hasBlockStyles:o,selectedBlockName:l,selectedBlockClientId:i,blockType:a}=(0,m.useSelect)((e=>{const{getSelectedBlockClientId:t,getSelectedBlockCount:n,getBlockName:o}=e(Vn),{getBlockStyles:l}=e(r.store),i=t(),s=i&&o(i),a=s&&(0,r.getBlockType)(s),c=s&&l(s);return{count:n(),selectedBlockClientId:i,selectedBlockName:s,blockType:a,hasBlockStyles:c&&c.length>0}}),[]);if(n>1)return(0,s.createElement)("div",{className:"block-editor-block-inspector"},(0,s.createElement)(Zk,null),(0,s.createElement)(er.Slot,null));const c=l===(0,r.getUnregisteredTypeHandlerName)();return a&&i&&!c?(0,s.createElement)(Qk,{clientId:i,blockName:a.name,hasBlockStyles:o}):t?(0,s.createElement)("span",{className:"block-editor-block-inspector__no-blocks"},(0,h.__)("No block selected.")):null};function t_(e){let{children:t,__unstableContentRef:n,...o}=e;const r=(0,d.useViewportMatch)("medium"),l=(0,m.useSelect)((e=>e(Vn).getSettings().hasFixedToolbar),[]),a=(0,tc.__unstableUseShortcutEventMatch)(),{getSelectedBlockClientIds:c,getBlockRootClientId:f}=(0,m.useSelect)(Vn),{duplicateBlocks:h,removeBlocks:g,insertAfterBlock:v,insertBeforeBlock:b,clearSelectedBlock:k,moveBlocksUp:_,moveBlocksDown:y}=(0,m.useDispatch)(Vn);return(0,s.createElement)("div",i({},o,{onKeyDown:function(e){if(a("core/block-editor/move-up",e)){const t=c();if(t.length){e.preventDefault();const n=f((0,u.first)(t));_(t,n)}}else if(a("core/block-editor/move-down",e)){const t=c();if(t.length){e.preventDefault();const n=f((0,u.first)(t));y(t,n)}}else if(a("core/block-editor/duplicate",e)){const t=c();t.length&&(e.preventDefault(),h(t))}else if(a("core/block-editor/remove",e)){const t=c();t.length&&(e.preventDefault(),g(t))}else if(a("core/block-editor/insert-after",e)){const t=c();t.length&&(e.preventDefault(),v((0,u.last)(t)))}else if(a("core/block-editor/insert-before",e)){const t=c();t.length&&(e.preventDefault(),b((0,u.first)(t)))}else if(a("core/block-editor/delete-multi-selection",e)){const t=c();t.length>1&&(e.preventDefault(),g(t))}else a("core/block-editor/unselect",e)&&c().length>1&&(e.preventDefault(),k(),e.target.ownerDocument.defaultView.getSelection().removeAllRanges())}}),(0,s.createElement)(Td,{__unstableContentRef:n},(l||!r)&&(0,s.createElement)(Hp,{isFixed:!0}),(0,s.createElement)($p,{__unstableContentRef:n}),(0,s.createElement)(p.Popover.Slot,{name:"block-toolbar",ref:Bd(n)}),t,(0,s.createElement)(p.Popover.Slot,{name:"__unstable-block-tools-after",ref:Bd(n)})))}var n_=function(e){let{rootClientId:t,clientId:n,isAppender:o,showInserterHelpPanel:r,showMostUsedBlocks:l=!1,__experimentalInsertionIndex:i,__experimentalFilterValue:a,onSelect:c=u.noop,shouldFocusBlock:d=!1}=e;const p=(0,m.useSelect)((e=>{const{getBlockRootClientId:o}=e(Vn);return t||o(n)||void 0}),[n,t]);return(0,s.createElement)(gd,{onSelect:c,rootClientId:p,clientId:n,isAppender:o,showInserterHelpPanel:r,showMostUsedBlocks:l,__experimentalInsertionIndex:i,__experimentalFilterValue:a,shouldFocusBlock:d})};function o_(){return null}o_.Register=function(){const{registerShortcut:e}=(0,m.useDispatch)(tc.store);return(0,s.useEffect)((()=>{e({name:"core/block-editor/duplicate",category:"block",description:(0,h.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:(0,h.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/insert-before",category:"block",description:(0,h.__)("Insert a new block before the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"t"}}),e({name:"core/block-editor/insert-after",category:"block",description:(0,h.__)("Insert a new block after the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"y"}}),e({name:"core/block-editor/delete-multi-selection",category:"block",description:(0,h.__)("Remove multiple selected blocks."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:(0,h.__)("Select all text when typing. Press again to select all blocks."),keyCombination:{modifier:"primary",character:"a"}}),e({name:"core/block-editor/unselect",category:"selection",description:(0,h.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:(0,h.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:(0,h.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:(0,h.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}})}),[e]),null};var r_=o_;function l_(){return Lt()("wp.blockEditor.MultiSelectScrollIntoView",{hint:"This behaviour is now built-in."}),null}const i_=new Set([va.UP,va.RIGHT,va.DOWN,va.LEFT,va.ENTER,va.BACKSPACE]);function s_(){const e=(0,m.useSelect)((e=>e(Vn).isTyping()),[]),{stopTyping:t}=(0,m.useDispatch)(Vn);return(0,d.useRefEffect)((n=>{if(!e)return;const{ownerDocument:o}=n;let r,l;function i(e){const{clientX:n,clientY:o}=e;r&&l&&(r!==n||l!==o)&&t(),r=n,l=o}return o.addEventListener("mousemove",i),()=>{o.removeEventListener("mousemove",i)}}),[e,t])}function a_(){const e=(0,m.useSelect)((e=>e(Vn).isTyping())),{startTyping:t,stopTyping:n}=(0,m.useDispatch)(Vn),o=s_(),r=(0,d.useRefEffect)((o=>{const{ownerDocument:r}=o,{defaultView:l}=r;if(e){let e;function t(t){const{target:o}=t;e=l.setTimeout((()=>{(0,rr.isTextField)(o)||n()}))}function i(e){const{keyCode:t}=e;t!==va.ESCAPE&&t!==va.TAB||n()}function s(){const e=l.getSelection();e.rangeCount>0&&e.getRangeAt(0).collapsed||n()}return o.addEventListener("focus",t),o.addEventListener("keydown",i),r.addEventListener("selectionchange",s),()=>{l.clearTimeout(e),o.removeEventListener("focus",t),o.removeEventListener("keydown",i),r.removeEventListener("selectionchange",s)}}function i(e){const{type:n,target:r}=e;(0,rr.isTextField)(r)&&o.contains(r)&&("keydown"!==n||function(e){const{keyCode:t,shiftKey:n}=e;return!n&&i_.has(t)}(e))&&t()}return o.addEventListener("keypress",i),o.addEventListener("keydown",i),()=>{o.removeEventListener("keypress",i),o.removeEventListener("keydown",i)}}),[e,t,n]);return(0,d.useMergeRefs)([o,r])}var c_=function(e){let{children:t}=e;return(0,s.createElement)("div",{ref:a_()},t)};function u_(){return Lt()("PreserveScrollInReorder component",{since:"5.4",hint:"This behavior is now built-in the block list"}),null}const d_=-1!==window.navigator.userAgent.indexOf("Trident"),p_=new Set([va.UP,va.DOWN,va.LEFT,va.RIGHT]);function m_(){const e=(0,m.useSelect)((e=>e(Vn).hasSelectedBlock()),[]);return(0,d.useRefEffect)((t=>{if(!e)return;const{ownerDocument:n}=t,{defaultView:o}=n;let r,l,i;function s(){r||(r=o.requestAnimationFrame((()=>{p(),r=null})))}function a(e){l&&o.cancelAnimationFrame(l),l=o.requestAnimationFrame((()=>{c(e),l=null}))}function c(e){let{keyCode:r}=e;if(!m())return;const l=(0,rr.computeCaretRect)(o);if(!l)return;if(!i)return void(i=l);if(p_.has(r))return void(i=l);const s=l.top-i.top;if(0===s)return;const a=(0,rr.getScrollContainer)(t);if(!a)return;const c=a===n.body,u=c?o.scrollY:a.scrollTop,d=c?0:a.getBoundingClientRect().top,p=c?i.top/o.innerHeight:(i.top-d)/(o.innerHeight-d);if(0===u&&p<.75&&function(){const e=t.querySelectorAll('[contenteditable="true"]');return e[e.length-1]===n.activeElement}())return void(i=l);const f=c?o.innerHeight:a.clientHeight;i.top+i.height>d+f||i.top<d?i=l:c?o.scrollBy(0,s):a.scrollTop+=s}function u(){n.addEventListener("selectionchange",d)}function d(){n.removeEventListener("selectionchange",d),p()}function p(){m()&&(i=(0,rr.computeCaretRect)(o))}function m(){return t.contains(n.activeElement)&&n.activeElement.isContentEditable}return o.addEventListener("scroll",s,!0),o.addEventListener("resize",s,!0),t.addEventListener("keydown",a),t.addEventListener("keyup",c),t.addEventListener("mousedown",u),t.addEventListener("touchstart",u),()=>{o.removeEventListener("scroll",s,!0),o.removeEventListener("resize",s,!0),t.removeEventListener("keydown",a),t.removeEventListener("keyup",c),t.removeEventListener("mousedown",u),t.removeEventListener("touchstart",u),n.removeEventListener("selectionchange",d),o.cancelAnimationFrame(r),o.cancelAnimationFrame(l)}}),[e])}var f_=d_?e=>e.children:function(e){let{children:t}=e;return(0,s.createElement)("div",{ref:m_(),className:"block-editor__typewriter"},t)};const h_=(0,s.createContext)({});function g_(e,t,n){const o={...e,[t]:e[t]?new Set(e[t]):new Set};return o[t].add(n),o}function v_(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const o=(0,s.useContext)(h_),{name:r}=Wn();n=n||r;const l=Boolean(null===(t=o[n])||void 0===t?void 0:t.has(e)),i=(0,s.useMemo)((()=>g_(o,n,e)),[o,n,e]),a=(0,s.useCallback)((e=>{let{children:t}=e;return(0,s.createElement)(h_.Provider,{value:i},t)}),[i]);return[l,a]}function b_(e){if(void 0===e)e=v.colors;else{const t=e.filter((e=>e.color));0===t.length?e=v.colors:t.length<e.length&&(e=t)}return e}function k_(e){if(void 0===e)e=v.gradients;else{const t=e.filter((e=>e.gradient));0===t.length?e=v.gradients:t.length<e.length&&(e=t)}return e}function y_(e){const t=null==e?void 0:e.trim().match(/^(0?[-.]?\d+)(r?e[m|x]|v[h|w|min|max]+|p[x|t|c]|[c|m]m|%|in|ch|Q|lh)$/);return isNaN(e)||isNaN(parseFloat(e))?t?{value:parseFloat(t[1])||t[1],unit:t[2]}:{value:e,unit:void 0}:{value:parseFloat(e),unit:"px"}}function E_(e,t){const n=e.split(/[(),]/g).filter(Boolean),o=n.slice(1).map((e=>y_(I_(e,t)).value)).filter(Boolean);switch(n[0]){case"min":return Math.min(...o)+"px";case"max":return Math.max(...o)+"px";case"clamp":return 3!==o.length?null:o[1]<o[0]?o[0]+"px":o[1]>o[2]?o[2]+"px":o[1]+"px";case"calc":return o[0]+"px"}}function C_(e){for(;;){const t=e,n=/(max|min|calc|clamp)\(([^()]*)\)/g.exec(e)||[];if(n[0]){const t=E_(n[0]);e=e.replace(n[0],t)}if(e===t||parseFloat(e))break}return y_(e)}function S_(e){for(let t=0;t<e.length;t++)if(["+","-","/","*"].includes(e[t]))return!0;return!1}function w_(e){let t=!1;const n=e.split(/[+-/*/]/g).filter(Boolean);for(const o of n){const n=y_(I_(o));if(!parseFloat(n.value)){t=!0;break}e=e.replace(o,n.value)}return t?null:(o=e,Function(`'use strict'; return (${o})`)()).toFixed(0)+"px";var o}function B_(e,t){const n=.01,o=Object.assign({},{fontSize:16,lineHeight:16,width:375,height:812,type:"font"},t),r={em:o.fontSize,rem:o.fontSize,vh:o.height*n,vw:o.width*n,vmin:(o.width<o.height?o.width:o.height)*n,vmax:(o.width>o.height?o.width:o.height)*n,"%":("font"===o.type?o.fontSize:o.width)*n,ch:8,ex:7.15625,lh:o.lineHeight},l={in:96,cm:37.79527559055118,mm:3.7795275590551185,pt:1.3333333333333333,pc:16,px:1,Q:.9448818897637794};return r[e.unit]?(r[e.unit]*e.value).toFixed(0)+"px":l[e.unit]?(l[e.unit]*e.value).toFixed(0)+"px":null}function I_(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Number.isFinite(e))return e.toFixed(0)+"px";if(void 0===e)return null;let n=y_(e);return n.unit||(n=C_(e)),S_(e)&&!n.unit?w_(e):B_(n,t)}const x_={};function T_(e){let t="";return e.hasOwnProperty("fontSize")&&(t=":"+e.width),e.hasOwnProperty("lineHeight")&&(t=":"+e.lineHeight),e.hasOwnProperty("width")&&(t=":"+e.width),e.hasOwnProperty("height")&&(t=":"+e.height),e.hasOwnProperty("type")&&(t=":"+e.type),t}var N_=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e+T_(t);return x_[n]||(x_[n]=I_(e,t)),x_[n]}}(),(window.wp=window.wp||{}).blockEditor=o}();
build/block-editor/style-rtl.css CHANGED
@@ -1 +1 @@
1
- :root{--wp-admin-theme-color:#007cba;--wp-admin-theme-color--rgb:0,124,186;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-10--rgb:0,107,161;--wp-admin-theme-color-darker-20:#005a87;--wp-admin-theme-color-darker-20--rgb:0,90,135;--wp-admin-border-width-focus:2px}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){:root{--wp-admin-border-width-focus:1.5px}}.block-editor-autocompleters__block{white-space:nowrap}.block-editor-autocompleters__block .block-editor-block-icon{margin-left:8px}.block-editor-block-alignment-control__menu-group .components-menu-item__info{margin-top:0}.block-editor-block-alignment-matrix-control__popover .components-popover__content{min-width:0;width:auto}.block-editor-block-alignment-matrix-control__popover .components-popover__content>div{padding:8px}.block-editor-block-icon{align-items:center;display:flex;height:24px;justify-content:center;width:24px}.block-editor-block-icon.has-colors svg{fill:currentColor}@media (forced-colors:active){.block-editor-block-icon.has-colors svg{fill:CanvasText}}.block-editor-block-icon svg{max-height:24px;max-width:24px;min-height:20px;min-width:20px}.block-editor-block-inspector p{margin-top:0}.block-editor-block-inspector h2,.block-editor-block-inspector h3{color:#1e1e1e;font-size:13px;margin-bottom:1.5em}.block-editor-block-inspector .components-base-control{margin-bottom:24px}.block-editor-block-inspector .components-base-control:last-child{margin-bottom:8px}.block-editor-block-inspector .components-panel__body{border:none;border-top:1px solid #e0e0e0}.block-editor-block-inspector .block-editor-block-card{padding:16px}.block-editor-block-inspector__no-blocks{background:#fff;display:block;font-size:13px;padding:32px 16px;text-align:center}.block-editor-block-styles .block-editor-block-list__block{margin:0}.block-editor-block-list__layout{position:relative}.block-editor-block-list__layout.is-navigate-mode{cursor:default}.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted:after,.block-editor-block-list__layout .block-editor-block-list__block.is-multi-selected:after,.block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-hovered:after,.block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-selected:after{border-radius:1px;bottom:1px;box-shadow:0 0 0 1px var(--wp-admin-theme-color);content:"";left:1px;outline:2px solid transparent;pointer-events:none;position:absolute;right:1px;top:1px;z-index:1}.is-dark-theme .block-editor-block-list__layout .block-editor-block-list__block.is-highlighted:after,.is-dark-theme .block-editor-block-list__layout .block-editor-block-list__block.is-multi-selected:after,.is-dark-theme .block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-hovered:after,.is-dark-theme .block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-selected:after{box-shadow:0 0 0 1px #fff}.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted .components-placeholder ::selection,.block-editor-block-list__layout .block-editor-block-list__block.is-multi-selected .components-placeholder ::selection,.block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-hovered .components-placeholder ::selection,.block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-selected .components-placeholder ::selection{background:transparent}.block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-hovered:not(.is-selected):after{box-shadow:0 0 0 1px var(--wp-admin-theme-color)}.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted:after{box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:1px solid transparent}.block-editor-block-list__layout .block-editor-block-list__block.is-multi-selected:after,.block-editor-block-list__layout .is-block-moving-mode.block-editor-block-list__block.has-child-selected,.block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-selected:after{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:2px solid transparent}.block-editor-block-list__layout .is-block-moving-mode.block-editor-block-list__block.is-selected:before{border-radius:2px;border-top:4px solid #ccc;content:"";left:0;pointer-events:none;position:absolute;right:0;top:-14px;transition:border-color .1s linear,border-style .1s linear,box-shadow .1s linear;z-index:0}.block-editor-block-list__layout .is-block-moving-mode.block-editor-block-list__block.is-selected:after{content:none}.block-editor-block-list__layout .is-block-moving-mode.can-insert-moving-block.block-editor-block-list__block.is-selected:before{border-color:var(--wp-admin-theme-color)}.is-block-moving-mode.block-editor-block-list__block-selection-button{font-size:1px;height:1px;opacity:0;padding:0}.block-editor-block-list__layout .block-editor-block-list__block{overflow-wrap:break-word;position:relative}.block-editor-block-list__layout .block-editor-block-list__block .reusable-block-edit-panel *{z-index:1}.block-editor-block-list__layout .block-editor-block-list__block .components-placeholder .components-with-notices-ui{margin:-10px 0 12px}.block-editor-block-list__layout .block-editor-block-list__block .components-with-notices-ui{margin:0 0 12px;width:100%}.block-editor-block-list__layout .block-editor-block-list__block .components-with-notices-ui .components-notice{margin-left:0;margin-right:0}.block-editor-block-list__layout .block-editor-block-list__block .components-with-notices-ui .components-notice .components-notice__content{font-size:13px}.block-editor-block-list__layout .block-editor-block-list__block:not([contenteditable]):focus{outline:none}.block-editor-block-list__layout .block-editor-block-list__block:not([contenteditable]):focus:after{border-radius:1px;bottom:1px;box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);content:"";left:1px;outline:2px solid transparent;pointer-events:none;position:absolute;right:1px;top:1px;z-index:1}.is-dark-theme .block-editor-block-list__layout .block-editor-block-list__block:not([contenteditable]):focus:after{box-shadow:0 0 0 var(--wp-admin-border-width-focus) #fff}.block-editor-block-list__layout .block-editor-block-list__block:after{border-radius:2px;bottom:0;box-shadow:0 0 0 var(--wp-admin-border-width-focus) transparent;content:"";left:0;pointer-events:none;position:absolute;right:0;top:0}.block-editor-block-list__layout .block-editor-block-list__block.has-warning{min-height:48px}.block-editor-block-list__layout .block-editor-block-list__block.has-warning>*{pointer-events:none;-webkit-user-select:none;user-select:none}.block-editor-block-list__layout .block-editor-block-list__block.has-warning .block-editor-warning{pointer-events:all}.block-editor-block-list__layout .block-editor-block-list__block.has-warning:after{background-color:hsla(0,0%,100%,.4);border-radius:2px;bottom:0;content:"";left:0;position:absolute;right:0;top:0}.block-editor-block-list__layout .block-editor-block-list__block.has-warning.is-multi-selected:after{background-color:transparent}.block-editor-block-list__layout .block-editor-block-list__block.is-reusable>.block-editor-inner-blocks>.block-editor-block-list__layout.has-overlay:after{display:none}.block-editor-block-list__layout .block-editor-block-list__block.is-reusable>.block-editor-inner-blocks>.block-editor-block-list__layout.has-overlay .block-editor-block-list__layout.has-overlay:after{display:block}.block-editor-block-list__layout .block-editor-block-list__block.is-reusable.has-child-selected:after{box-shadow:0 0 0 1px var(--wp-admin-theme-color)}.block-editor-block-list__layout .block-editor-block-list__block[data-clear=true]{float:none}.is-outline-mode .block-editor-block-list__block:not(.remove-outline).is-hovered{cursor:default}.is-outline-mode .block-editor-block-list__block:not(.remove-outline).is-hovered:after{border-radius:1px;bottom:1px;box-shadow:0 0 0 1px var(--wp-admin-theme-color);left:1px;right:1px;top:1px}.is-outline-mode .block-editor-block-list__block:not(.remove-outline).is-selected{cursor:unset}.is-outline-mode .block-editor-block-list__block:not(.remove-outline).is-selected:after{border-radius:1px;bottom:1px;box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);left:1px;right:1px;top:1px}.is-outline-mode .block-editor-block-list__block:not(.remove-outline).is-selected:focus:after{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.is-focus-mode .block-editor-block-list__block:not(.has-child-selected){opacity:.5;transition:opacity .1s linear}@media (prefers-reduced-motion:reduce){.is-focus-mode .block-editor-block-list__block:not(.has-child-selected){transition-delay:0s;transition-duration:0s}}.is-focus-mode .block-editor-block-list__block:not(.has-child-selected) .block-editor-block-list__block,.is-focus-mode .block-editor-block-list__block:not(.has-child-selected).is-multi-selected,.is-focus-mode .block-editor-block-list__block:not(.has-child-selected).is-selected{opacity:1}.is-root-container:not(.is-focus-mode) .block-editor-block-list__block.has-active-entity{opacity:.5;transition:opacity .1s linear}@media (prefers-reduced-motion:reduce){.is-root-container:not(.is-focus-mode) .block-editor-block-list__block.has-active-entity{transition-delay:0s;transition-duration:0s}}.is-root-container:not(.is-focus-mode) .block-editor-block-list__block.has-active-entity.has-child-selected,.is-root-container:not(.is-focus-mode) .block-editor-block-list__block.has-active-entity.is-active-entity,.is-root-container:not(.is-focus-mode) .block-editor-block-list__block.has-active-entity.is-active-entity .block-editor-block-list__block,.is-root-container:not(.is-focus-mode) .block-editor-block-list__block.has-active-entity .is-active-entity .block-editor-block-list__block,.is-root-container:not(.is-focus-mode) .block-editor-block-list__block.has-active-entity:not(.has-child-selected) .block-editor-block-list__block{opacity:1}.wp-block[data-align=left]>*,.wp-block[data-align=right]>*{z-index:21}.wp-site-blocks>[data-align=left]{float:right;margin-left:2em}.wp-site-blocks>[data-align=right]{float:left;margin-right:2em}.wp-site-blocks>[data-align=center]{justify-content:center;margin-left:auto;margin-right:auto}.block-editor-block-list .block-editor-inserter{cursor:move;cursor:grab;margin:8px}@keyframes block-editor-inserter__toggle__fade-in-animation{0%{opacity:0}to{opacity:1}}.wp-block .block-list-appender .block-editor-inserter__toggle{animation:block-editor-inserter__toggle__fade-in-animation .1s ease;animation-fill-mode:forwards}@media (prefers-reduced-motion:reduce){.wp-block .block-list-appender .block-editor-inserter__toggle{animation-delay:0s;animation-duration:1ms}}.block-editor-block-list__block:not(.is-selected):not(.has-child-selected) .block-editor-default-block-appender{display:none}.block-editor-block-list__block:not(.is-selected):not(.has-child-selected) .block-editor-default-block-appender .block-editor-inserter__toggle{opacity:0;transform:scale(0)}.block-editor-block-list__block .block-editor-block-list__block-html-textarea{border:none;border-radius:2px;box-shadow:inset 0 0 0 1px #1e1e1e;display:block;font-family:Menlo,Consolas,monaco,monospace;font-size:15px;line-height:1.5;margin:0;outline:none;overflow:hidden;padding:12px;resize:none;transition:padding .2s linear;width:100%}@media (prefers-reduced-motion:reduce){.block-editor-block-list__block .block-editor-block-list__block-html-textarea{transition-delay:0s;transition-duration:0s}}.block-editor-block-list__block .block-editor-block-list__block-html-textarea:focus{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.block-editor-block-list__block .block-editor-warning{position:relative;z-index:5}.block-editor-block-list__block .block-editor-warning.block-editor-block-list__block-crash-warning{margin-bottom:auto}.block-editor-block-list__insertion-point{position:absolute}.block-editor-block-list__insertion-point-indicator{background:var(--wp-admin-theme-color);position:absolute}.block-editor-block-list__insertion-point.is-vertical>.block-editor-block-list__insertion-point-indicator{height:1px;top:50%}.block-editor-block-list__insertion-point.is-horizontal>.block-editor-block-list__insertion-point-indicator{left:0;right:50%;top:0;width:1px}.block-editor-block-list__insertion-point-inserter{display:none;justify-content:center;position:absolute;right:calc(50% - 12px);top:calc(50% - 12px)}@media (min-width:480px){.block-editor-block-list__insertion-point-inserter{display:flex}}.block-editor-block-list__block-popover-inserter{margin-bottom:14px;position:absolute;top:-9999em}.block-editor-block-list__block-popover-inserter.is-visible{position:static}.block-editor-block-list__block-popover-inserter .block-editor-inserter__toggle.components-button.has-icon,.block-editor-block-list__empty-block-inserter .block-editor-inserter__toggle.components-button.has-icon,.block-editor-block-list__insertion-point-inserter .block-editor-inserter__toggle.components-button.has-icon,.block-editor-default-block-appender .block-editor-inserter__toggle.components-button.has-icon{background:#1e1e1e;border-radius:2px;color:#fff;height:24px;min-width:24px;padding:0}.block-editor-block-list__block-popover-inserter .block-editor-inserter__toggle.components-button.has-icon:hover,.block-editor-block-list__empty-block-inserter .block-editor-inserter__toggle.components-button.has-icon:hover,.block-editor-block-list__insertion-point-inserter .block-editor-inserter__toggle.components-button.has-icon:hover,.block-editor-default-block-appender .block-editor-inserter__toggle.components-button.has-icon:hover{background:var(--wp-admin-theme-color);color:#fff}.block-editor-block-list__insertion-point-inserter .block-editor-inserter__toggle.components-button.has-icon{background:var(--wp-admin-theme-color)}.block-editor-block-list__insertion-point-inserter .block-editor-inserter__toggle.components-button.has-icon:hover{background:#1e1e1e}.block-editor-block-contextual-toolbar{background-color:#fff;border:1px solid #1e1e1e;border-radius:2px;display:inline-flex}.block-editor-block-contextual-toolbar .block-editor-block-toolbar .components-toolbar,.block-editor-block-contextual-toolbar .block-editor-block-toolbar .components-toolbar-group{border-left-color:#1e1e1e}.block-editor-block-contextual-toolbar.is-fixed{border:none;border-bottom:1px solid #e0e0e0;border-radius:0;display:block;min-height:48px;position:sticky;top:0;width:100%;z-index:31}.block-editor-block-contextual-toolbar.is-fixed .block-editor-block-toolbar .components-toolbar,.block-editor-block-contextual-toolbar.is-fixed .block-editor-block-toolbar .components-toolbar-group{border-left-color:#e0e0e0}.block-editor-block-contextual-toolbar .block-editor-block-mover-button{overflow:hidden}.block-editor-block-contextual-toolbar .block-editor-block-mover.is-horizontal .block-editor-block-mover-button.block-editor-block-mover-button{min-width:24px;width:24px}.block-editor-block-contextual-toolbar .block-editor-block-mover.is-horizontal .block-editor-block-mover-button.block-editor-block-mover-button svg{min-width:24px}.block-editor-block-contextual-toolbar .block-editor-block-mover:not(.is-horizontal) .block-editor-block-mover-button:focus:before{min-width:0;right:0!important;width:100%}@media (min-width:600px){.block-editor-block-contextual-toolbar .block-editor-block-mover:not(.is-horizontal) .block-editor-block-mover-button.is-up-button svg{top:5px}.block-editor-block-contextual-toolbar .block-editor-block-mover:not(.is-horizontal) .block-editor-block-mover-button.is-down-button svg{bottom:5px}}.block-editor-block-list__block-selection-button{background-color:#1e1e1e;border-radius:2px;display:inline-flex;font-size:13px;height:48px;padding:0 12px;z-index:22}.block-editor-block-list__block-selection-button .block-editor-block-list__block-selection-button__content{align-items:center;display:inline-flex;margin:auto}.block-editor-block-list__block-selection-button .block-editor-block-list__block-selection-button__content>.components-flex__item{margin-left:6px}.block-editor-block-list__block-selection-button .components-button.has-icon.block-selection-button_drag-handle{cursor:grab;height:24px;margin-right:-2px;min-width:24px;padding:0}.block-editor-block-list__block-selection-button .components-button.has-icon.block-selection-button_drag-handle svg{min-height:18px;min-width:18px}.block-editor-block-list__block-selection-button .block-editor-block-icon{color:#fff;font-size:13px;height:48px}.block-editor-block-list__block-selection-button .components-button{color:#fff;display:flex;height:48px;min-width:36px}.block-editor-block-list__block-selection-button .components-button:focus{border:none;box-shadow:none}.block-editor-block-list__block-selection-button .components-button:active{color:#fff}.block-editor-block-list__block-selection-button .block-selection-button_select-button.components-button{padding:0}.block-editor-block-list__insertion-point-popover.is-without-arrow{pointer-events:none;position:absolute;z-index:28}.block-editor-block-list__insertion-point-popover.is-without-arrow *{pointer-events:none}.block-editor-block-list__insertion-point-popover.is-without-arrow .is-with-inserter,.block-editor-block-list__insertion-point-popover.is-without-arrow .is-with-inserter *{pointer-events:all}.block-editor-block-list__insertion-point-popover.is-without-arrow .components-popover__content.components-popover__content{background:none;border:none;box-shadow:none;margin-right:0;overflow-y:visible}@keyframes hide-during-dragging{to{position:fixed;transform:translate(-9999px,9999px)}}.components-popover.block-editor-block-list__block-popover{position:absolute;z-index:31}.components-popover.block-editor-block-list__block-popover .components-popover__content{background:none;border:none;box-shadow:none;margin:0!important;min-width:auto;overflow-y:visible;pointer-events:none;width:max-content}.components-popover.block-editor-block-list__block-popover .components-popover__content .block-editor-block-contextual-toolbar,.components-popover.block-editor-block-list__block-popover .components-popover__content .block-editor-block-list__block-selection-button,.components-popover.block-editor-block-list__block-popover .components-popover__content .block-editor-block-list__empty-block-inserter{pointer-events:all}.components-popover.block-editor-block-list__block-popover .components-popover__content .block-editor-block-contextual-toolbar,.components-popover.block-editor-block-list__block-popover .components-popover__content .block-editor-block-list__block-selection-button{margin-bottom:12px;margin-top:12px}.components-popover.block-editor-block-list__block-popover.is-insertion-point-visible{visibility:hidden}.is-dragging-components-draggable .components-popover.block-editor-block-list__block-popover{animation:hide-during-dragging 1ms linear forwards;opacity:0}.is-dragging-components-draggable .components-tooltip{display:none}.block-editor-block-list__block .block-list-appender{align-self:center;list-style:none;margin-bottom:revert;padding:0}.block-editor-block-list__block .block-list-appender.wp-block{max-width:none}.block-editor-block-list__block .block-list-appender .block-editor-default-block-appender{margin:8px 0}.block-editor-block-list__block .block-list-appender .block-list-appender__toggle{margin-right:8px;opacity:1;padding:0;transform:scale(1);transition:all .1s ease}@media (prefers-reduced-motion:reduce){.block-editor-block-list__block .block-list-appender .block-list-appender__toggle{transition-delay:0s;transition-duration:0s}}.block-editor-block-list__block .block-list-appender:first-of-type .block-list-appender__toggle{margin-right:0}.is-vertical .block-list-appender{margin-left:auto;margin-right:12px;margin-top:12px;width:24px}.block-list-appender>.block-editor-inserter{display:block}.block-editor-block-list__block:not(.is-selected):not(.has-child-selected):not(.block-editor-block-list__layout) .block-editor-block-list__layout>.block-list-appender .block-list-appender__toggle{opacity:0;transform:scale(0)}.block-editor-block-breadcrumb{list-style:none;margin:0;padding:0}.block-editor-block-breadcrumb li{display:inline-flex;margin:0}.block-editor-block-breadcrumb li .block-editor-block-breadcrumb__separator{fill:currentColor;margin-left:-4px;margin-right:-4px;transform:scaleX(-1)}.block-editor-block-breadcrumb li:last-child .block-editor-block-breadcrumb__separator{display:none}.block-editor-block-breadcrumb__button.components-button{height:24px;line-height:24px;padding:0;position:relative}.block-editor-block-breadcrumb__button.components-button:hover:not(:disabled){box-shadow:none;text-decoration:underline}.block-editor-block-breadcrumb__button.components-button:focus{box-shadow:none}.block-editor-block-breadcrumb__button.components-button:focus:before{border-radius:2px;bottom:1px;box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);content:"";display:block;left:1px;position:absolute;right:1px;top:1px}.block-editor-block-breadcrumb__current{cursor:default}.block-editor-block-breadcrumb__button.components-button,.block-editor-block-breadcrumb__current{color:#1e1e1e;font-size:inherit;padding:0 8px}.block-editor-block-card{align-items:flex-start;display:flex}.block-editor-block-card__content{flex-grow:1;margin-bottom:4px}.block-editor-block-card__title{font-weight:500}.block-editor-block-card__title.block-editor-block-card__title{line-height:24px;margin:0 0 4px}.block-editor-block-card__description{font-size:13px}.block-editor-block-card .block-editor-block-icon{flex:0 0 24px;height:24px;margin-left:12px;margin-right:0;width:24px}.block-editor-block-compare{height:auto}.block-editor-block-compare__wrapper{display:flex;padding-bottom:16px}.block-editor-block-compare__wrapper>div{display:flex;flex-direction:column;justify-content:space-between;max-width:600px;min-width:200px;padding:0 0 0 16px;width:50%}.block-editor-block-compare__wrapper>div button{float:left}.block-editor-block-compare__wrapper .block-editor-block-compare__converted{border-right:1px solid #ddd;padding-left:0;padding-right:15px}.block-editor-block-compare__wrapper .block-editor-block-compare__html{border-bottom:1px solid #ddd;color:#1e1e1e;font-family:Menlo,Consolas,monaco,monospace;font-size:12px;line-height:1.7;padding-bottom:15px}.block-editor-block-compare__wrapper .block-editor-block-compare__html span{background-color:#e6ffed;padding-bottom:3px;padding-top:3px}.block-editor-block-compare__wrapper .block-editor-block-compare__html span.block-editor-block-compare__added{background-color:#acf2bd}.block-editor-block-compare__wrapper .block-editor-block-compare__html span.block-editor-block-compare__removed{background-color:#cc1818}.block-editor-block-compare__wrapper .block-editor-block-compare__preview{padding:16px 0 0}.block-editor-block-compare__wrapper .block-editor-block-compare__preview p{font-size:12px;margin-top:0}.block-editor-block-compare__wrapper .block-editor-block-compare__action{margin-top:16px}.block-editor-block-compare__wrapper .block-editor-block-compare__heading{font-size:1em;font-weight:400;margin:.67em 0}.block-editor-block-content-overlay.overlay-active:before{background:transparent;border:none;border-radius:2px;content:"";height:100%;pointer-events:none;position:absolute;right:0;top:0;width:100%;z-index:10}.block-editor-block-content-overlay.parent-highlighted.overlay-active:before,.block-editor-block-content-overlay:hover:not(.is-dragging-blocks).overlay-active:before{background:rgba(var(--wp-admin-theme-color--rgb),.1);box-shadow:0 0 0 1px var(--wp-admin-theme-color) inset}.block-editor-block-content-overlay.overlay-active:not(.is-dragging-blocks) *{pointer-events:none}.block-editor-block-content-overlay.is-dragging-blocks{box-shadow:0 0 0 1px var(--wp-admin-theme-color)}.block-editor-block-draggable-chip-wrapper{position:absolute;right:0;top:-24px}.block-editor-block-draggable-chip{background-color:#1e1e1e;border-radius:2px;box-shadow:0 6px 8px rgba(0,0,0,.3);color:#fff;cursor:grabbing;display:inline-flex;height:48px;padding:0 13px;-webkit-user-select:none;user-select:none}.block-editor-block-draggable-chip svg{fill:currentColor}.block-editor-block-draggable-chip .block-editor-block-draggable-chip__content{justify-content:flex-start;margin:auto}.block-editor-block-draggable-chip .block-editor-block-draggable-chip__content>.components-flex__item{margin-left:6px}.block-editor-block-draggable-chip .block-editor-block-draggable-chip__content>.components-flex__item:last-child{margin-left:0}.block-editor-block-draggable-chip .block-editor-block-draggable-chip__content .block-editor-block-icon svg{min-height:18px;min-width:18px}.block-editor-block-draggable-chip .components-flex__item{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px}.block-editor-block-list__layout .is-dragging{background-color:currentColor!important;border-radius:2px!important;opacity:.05!important;pointer-events:none!important}.block-editor-block-list__layout .is-dragging::selection{background:transparent!important}.block-editor-block-list__layout .is-dragging:after{content:none!important}.block-editor-block-mobile-toolbar{border-left:1px solid #ddd;display:flex;flex-direction:row}.block-editor-block-mobile-toolbar .block-editor-block-mover-button{align-items:center;border-radius:2px;height:36px;justify-content:center;margin:0;padding:3px;width:36px}.block-editor-block-mobile-toolbar .block-editor-block-mover-button .dashicon{margin:auto}.block-editor-block-mobile-toolbar .block-editor-block-mover{display:flex;margin-left:auto}.block-editor-block-mobile-toolbar .block-editor-block-mover .block-editor-block-mover-button{float:right}.block-editor-block-mover-button__description{display:none}.block-editor-block-mover-button.has-icon{padding:0}.block-editor-block-mover{display:inline-flex;flex-direction:row}.block-editor-block-mover .block-editor-block-mover__move-button-container,.block-editor-block-mover .components-toolbar{border-left:none!important;flex:1;flex-direction:row}@media (min-width:600px){.block-editor-block-mover .block-editor-block-mover__move-button-container,.block-editor-block-mover .components-toolbar{flex-direction:column}}.block-editor-block-mover.is-horizontal .block-editor-block-mover__move-button-container,.block-editor-block-mover.is-horizontal .components-toolbar{flex-direction:row}.block-editor-block-mover .block-editor-block-mover-button.block-editor-block-mover-button{min-width:36px;padding-left:0;padding-right:0}@media (min-width:600px){.block-editor-block-mover .block-editor-block-mover-button{height:24px;padding-left:11px!important;padding-right:6px!important;width:42px}.block-editor-block-mover .block-editor-block-mover-button.block-editor-block-mover-button{min-width:42px}}@media (min-width:600px){.block-editor-block-mover .block-editor-block-mover-button:before{left:8px!important;right:8px!important}}.block-editor-block-mover .block-editor-block-mover__drag-handle{cursor:grab;min-width:24px!important;padding:0!important;width:24px}.block-editor-block-mover .block-editor-block-mover__drag-handle:focus:before{left:0!important;right:0!important}@media (min-width:600px){.block-editor-block-mover .components-toolbar-group .block-editor-block-mover-button,.block-editor-block-mover .components-toolbar .block-editor-block-mover-button{margin:0 0 0 auto}.block-editor-block-mover .components-toolbar-group .block-editor-block-mover-button.is-up-button:before,.block-editor-block-mover .components-toolbar .block-editor-block-mover-button.is-up-button:before{bottom:0;height:calc(100% - 1px)}.block-editor-block-mover .components-toolbar-group .block-editor-block-mover-button.is-down-button:before,.block-editor-block-mover .components-toolbar .block-editor-block-mover-button.is-down-button:before{height:calc(100% - 1px);top:0}}.block-editor-block-mover.is-horizontal .block-editor-block-mover-button.has-icon{height:48px;padding-left:0;padding-right:0;width:24px}.block-editor-block-mover.is-horizontal .block-editor-block-mover-button.has-icon:before{bottom:1px;height:auto;min-width:0;top:1px;width:auto}.block-editor-block-mover.is-horizontal .block-editor-block-mover-button.is-up-button.has-icon svg{margin-bottom:0;margin-left:-8px;margin-right:0}.block-editor-block-mover.is-horizontal .block-editor-block-mover-button.is-up-button.has-icon:before{left:0!important;right:0!important}.block-editor-block-mover.is-horizontal .block-editor-block-mover-button.is-down-button.has-icon svg{margin-left:0;margin-right:-8px;margin-top:0}.block-editor-block-mover.is-horizontal .block-editor-block-mover-button.is-down-button.has-icon:before{left:0!important;right:0!important;width:calc(100% + 1px)}.block-editor-block-navigation__container{min-width:280px}.block-editor-block-navigation__label{color:#757575;font-size:11px;font-weight:500;margin:0 0 12px;text-transform:uppercase}.block-editor-block-parent-selector{background:#fff;border-radius:2px}.block-editor-block-parent-selector .block-editor-block-parent-selector__button{border:1px solid #1e1e1e;border-radius:2px;height:48px;width:48px}.block-editor-block-patterns-list__list-item{cursor:pointer;margin-bottom:24px}.block-editor-block-patterns-list__list-item.is-placeholder{min-height:100px}.block-editor-block-patterns-list__list-item[draggable=true] .block-editor-block-preview__container{cursor:grab}.block-editor-block-patterns-list__item{height:100%}.block-editor-block-patterns-list__item .block-editor-block-preview__container{align-items:center;border:1px solid #f0f0f0;border-radius:2px;display:flex;overflow:hidden}.block-editor-block-patterns-list__item .block-editor-block-patterns-list__item-title{font-size:12px;padding-top:8px;text-align:center}.block-editor-block-patterns-list__item:hover .block-editor-block-preview__container{border:1px solid var(--wp-admin-theme-color)}.block-editor-block-patterns-list__item:focus .block-editor-block-preview__container{box-shadow:inset 0 0 0 1px #fff,0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:2px solid transparent}.block-editor-block-patterns-list__item:focus .block-editor-block-patterns-list__item-title,.block-editor-block-patterns-list__item:hover .block-editor-block-patterns-list__item-title{color:var(--wp-admin-theme-color)}.block-editor-block-preview__container{overflow:hidden;position:relative;width:100%}.block-editor-block-preview__container .block-editor-block-preview__content{margin:0;min-height:auto;overflow:visible;right:0;text-align:initial;top:0;transform-origin:top right}.block-editor-block-preview__container .block-editor-block-preview__content .block-editor-block-drop-zone,.block-editor-block-preview__container .block-editor-block-preview__content .block-editor-block-list__insertion-point,.block-editor-block-preview__container .block-editor-block-preview__content .block-list-appender,.block-editor-block-preview__container .block-editor-block-preview__content .reusable-block-indicator{display:none}.block-editor-block-settings-menu__popover .components-dropdown-menu__menu{padding:0}.block-editor-block-styles__preview-panel{background:#fff;border:1px solid #ddd;border-radius:2px;display:none;left:16px;overflow:hidden;position:absolute;right:auto;top:16px;width:300px;z-index:90}@media (min-width:782px){.block-editor-block-styles__preview-panel{display:block}}.block-editor-block-styles__preview-panel .block-editor-inserter__preview-container{left:auto;position:static;right:auto;top:auto}.block-editor-block-styles__preview-panel .block-editor-block-card__title.block-editor-block-card__title{margin:0}.block-editor-block-styles__preview-panel .block-editor-block-icon{display:none}.block-editor-block-styles__variants{display:flex;flex-wrap:wrap;gap:8px;justify-content:space-between}.block-editor-block-styles__variants .block-editor-block-styles__item{box-shadow:inset 0 0 0 1px #ccc;color:#2f2f2f;display:inline-block;width:calc(50% - 4px)}.block-editor-block-styles__variants .block-editor-block-styles__item:focus,.block-editor-block-styles__variants .block-editor-block-styles__item:hover{box-shadow:inset 0 0 0 2px var(--wp-admin-theme-color);color:var(--wp-admin-theme-color)}.block-editor-block-styles__variants .block-editor-block-styles__item.is-active,.block-editor-block-styles__variants .block-editor-block-styles__item.is-active:hover{background-color:#2f2f2f;box-shadow:none}.block-editor-block-styles__variants .block-editor-block-styles__item.is-active .block-editor-block-styles__item-text,.block-editor-block-styles__variants .block-editor-block-styles__item.is-active:hover .block-editor-block-styles__item-text{color:#fff}.block-editor-block-styles__variants .block-editor-block-styles__item.is-active:focus{box-shadow:inset 0 0 0 1px #fff,0 0 0 2px var(--wp-admin-theme-color)}.block-editor-block-styles__block-preview-container,.block-editor-block-styles__block-preview-container *{box-sizing:border-box!important}.block-editor-block-switcher,.block-editor-block-switcher__no-switcher-icon,.block-editor-block-switcher__toggle{position:relative}.components-button.block-editor-block-switcher__no-switcher-icon,.components-button.block-editor-block-switcher__toggle{display:block;height:48px;margin:0}.components-button.block-editor-block-switcher__no-switcher-icon .block-editor-block-icon,.components-button.block-editor-block-switcher__toggle .block-editor-block-icon{margin:auto}.block-editor-block-switcher__toggle-text{margin-right:8px}.show-icon-labels .block-editor-block-switcher__toggle-text{display:none}.show-icon-labels .block-editor-block-toolbar .block-editor-block-switcher .components-button.has-icon:after{font-size:14px}.block-editor-block-switcher__popover{margin-right:6px}.components-button.block-editor-block-switcher__no-switcher-icon{width:48px}.components-button.block-editor-block-switcher__no-switcher-icon .block-editor-blocks-icon{margin-left:auto;margin-right:auto}.components-button.block-editor-block-switcher__no-switcher-icon:disabled{opacity:1}.components-button.block-editor-block-switcher__no-switcher-icon:disabled,.components-button.block-editor-block-switcher__no-switcher-icon:disabled .block-editor-block-icon.has-colors{color:#1e1e1e}.block-editor-block-toolbar .components-toolbar-group .components-button.block-editor-block-switcher__no-switcher-icon.has-icon.has-icon .block-editor-block-icon,.block-editor-block-toolbar .components-toolbar-group .components-button.block-editor-block-switcher__toggle.has-icon.has-icon .block-editor-block-icon,.block-editor-block-toolbar .components-toolbar .components-button.block-editor-block-switcher__no-switcher-icon.has-icon.has-icon .block-editor-block-icon,.block-editor-block-toolbar .components-toolbar .components-button.block-editor-block-switcher__toggle.has-icon.has-icon .block-editor-block-icon{align-items:center;display:flex;height:100%;margin:0 auto;min-width:100%;position:relative}.block-editor-block-toolbar .components-toolbar-group .components-button.block-editor-block-switcher__no-switcher-icon.has-icon.has-icon:before,.block-editor-block-toolbar .components-toolbar-group .components-button.block-editor-block-switcher__toggle.has-icon.has-icon:before,.block-editor-block-toolbar .components-toolbar .components-button.block-editor-block-switcher__no-switcher-icon.has-icon.has-icon:before,.block-editor-block-toolbar .components-toolbar .components-button.block-editor-block-switcher__toggle.has-icon.has-icon:before{bottom:8px;left:8px;right:8px;top:8px}.components-popover.block-editor-block-switcher__popover .components-popover__content{min-width:300px}.components-popover.block-editor-block-switcher__popover .components-popover__content>div{background:#fff;display:flex;min-width:auto;padding:0}.components-popover.block-editor-block-switcher__popover .components-popover__content>div .components-menu-group{margin:0}.block-editor-block-switcher__popover .components-popover__content .block-editor-block-styles{margin:0 -3px}.block-editor-block-switcher__popover .components-popover__content .components-panel__body{border:0;position:relative;z-index:1}.block-editor-block-switcher__popover .components-popover__content .components-panel__body+.components-panel__body{border-top:1px solid #e0e0e0}.block-editor-block-switcher__popover__preview__parent .block-editor-block-switcher__popover__preview__container{position:absolute;right:calc(100% + 32px);top:-12px}.block-editor-block-switcher__preview__popover{display:none}.block-editor-block-switcher__preview__popover.components-popover{margin-right:4px;margin-top:11px}@media (min-width:782px){.block-editor-block-switcher__preview__popover{display:block}}.block-editor-block-switcher__preview__popover .components-popover__content{background:#fff;border:1px solid #1e1e1e;border-radius:2px;box-shadow:none}.block-editor-block-switcher__preview__popover .block-editor-block-switcher__preview{height:auto;max-height:500px;padding:16px;width:300px}.block-editor-block-switcher__preview-title{color:#757575;font-size:11px;font-weight:500;margin-bottom:12px;text-transform:uppercase}.block-editor-block-contextual-toolbar .components-button.block-editor-block-switcher__no-switcher-icon{width:48px}.block-editor-block-contextual-toolbar .components-button.block-editor-block-switcher__no-switcher-icon,.block-editor-block-contextual-toolbar .components-button.block-editor-block-switcher__toggle{height:48px}.block-editor-block-contextual-toolbar .components-button.block-editor-block-switcher__no-switcher-icon .block-editor-block-icon,.block-editor-block-contextual-toolbar .components-button.block-editor-block-switcher__no-switcher-icon .block-editor-block-switcher__transform,.block-editor-block-contextual-toolbar .components-button.block-editor-block-switcher__toggle .block-editor-block-icon,.block-editor-block-contextual-toolbar .components-button.block-editor-block-switcher__toggle .block-editor-block-switcher__transform{height:48px;width:48px}.block-editor-block-contextual-toolbar .components-button.block-editor-block-switcher__no-switcher-icon .block-editor-block-switcher__transform,.block-editor-block-contextual-toolbar .components-button.block-editor-block-switcher__toggle .block-editor-block-switcher__transform{padding:12px}.block-editor-block-switcher__preview-patterns-container{padding-bottom:16px}.block-editor-block-switcher__preview-patterns-container .block-editor-block-switcher__preview-patterns-container-list__list-item{margin-top:16px}.block-editor-block-switcher__preview-patterns-container .block-editor-block-switcher__preview-patterns-container-list__list-item .block-editor-block-preview__container{cursor:pointer}.block-editor-block-switcher__preview-patterns-container .block-editor-block-switcher__preview-patterns-container-list__list-item .block-editor-block-switcher__preview-patterns-container-list__item{border:1px solid transparent;border-radius:2px;height:100%;position:relative;transition:all .05s ease-in-out}.block-editor-block-switcher__preview-patterns-container .block-editor-block-switcher__preview-patterns-container-list__list-item .block-editor-block-switcher__preview-patterns-container-list__item:focus,.block-editor-block-switcher__preview-patterns-container .block-editor-block-switcher__preview-patterns-container-list__list-item .block-editor-block-switcher__preview-patterns-container-list__item:hover{box-shadow:inset 0 0 0 1px #fff,0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:2px solid transparent}.block-editor-block-switcher__preview-patterns-container .block-editor-block-switcher__preview-patterns-container-list__list-item .block-editor-block-switcher__preview-patterns-container-list__item:hover{box-shadow:inset 0 0 0 1px #fff,0 0 0 var(--wp-admin-border-width-focus) #1e1e1e}.block-editor-block-switcher__preview-patterns-container .block-editor-block-switcher__preview-patterns-container-list__list-item .block-editor-block-switcher__preview-patterns-container-list__item .block-editor-block-switcher__preview-patterns-container-list__item-title{cursor:pointer;font-size:12px;padding:4px;text-align:center}.block-editor-block-types-list>[role=presentation]{display:flex;flex-wrap:wrap;overflow:hidden}.block-editor-block-variation-picker .components-placeholder__instructions{margin-bottom:0}.block-editor-block-variation-picker .components-placeholder__fieldset{flex-direction:column}.block-editor-block-variation-picker.has-many-variations .components-placeholder__fieldset{max-width:90%}.block-editor-block-variation-picker__variations.block-editor-block-variation-picker__variations{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-start;list-style:none;margin:16px 0;padding:0;width:100%}.block-editor-block-variation-picker__variations.block-editor-block-variation-picker__variations>li{flex-shrink:1;list-style:none;margin:8px 0 0 20px;text-align:center;width:75px}.block-editor-block-variation-picker__variations.block-editor-block-variation-picker__variations>li button{display:inline-flex;margin-left:0}.block-editor-block-variation-picker__variations.block-editor-block-variation-picker__variations .block-editor-block-variation-picker__variation{padding:8px}.block-editor-block-variation-picker__variations.block-editor-block-variation-picker__variations .block-editor-block-variation-picker__variation-label{display:block;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:12px;line-height:1.4}.block-editor-block-variation-picker__variation{width:100%}.block-editor-block-variation-picker__variation.components-button.has-icon{justify-content:center;width:auto}.block-editor-block-variation-picker__variation.components-button.has-icon.is-secondary{background-color:#fff}.block-editor-block-variation-picker__variation.components-button{height:auto;padding:0}.block-editor-block-variation-picker__variation:before{content:"";padding-bottom:100%}.block-editor-block-variation-picker__variation:first-child{margin-right:0}.block-editor-block-variation-picker__variation:last-child{margin-left:0}.block-editor-block-pattern-setup{align-items:flex-start;border-radius:2px;box-shadow:inset 0 0 0 1px #1e1e1e;display:flex;flex-direction:column;justify-content:center;outline:1px solid transparent;width:100%}.block-editor-block-pattern-setup.view-mode-grid .block-editor-block-pattern-setup__toolbar{justify-content:center}.block-editor-block-pattern-setup.view-mode-grid .block-editor-block-pattern-setup__container{grid-gap:16px;background:#fff;display:grid;grid-template-columns:1fr 1fr;margin:0 1px 1px;max-height:550px;overflow:auto;padding:16px;width:calc(100% - 2px)}.block-editor-block-pattern-setup.view-mode-grid .block-editor-block-pattern-setup__container .block-editor-block-preview__container,.block-editor-block-pattern-setup.view-mode-grid .block-editor-block-pattern-setup__container div[role=button]{cursor:pointer}.block-editor-block-pattern-setup.view-mode-grid .block-editor-block-pattern-setup__container .block-editor-block-pattern-setup-list__item-title{font-size:12px;padding:4px;text-align:center}.block-editor-block-pattern-setup.view-mode-grid .block-editor-block-pattern-setup__container .block-editor-block-preview__container{border:1px solid #ddd;border-radius:2px}.block-editor-block-pattern-setup .block-editor-block-pattern-setup__toolbar{align-items:center;background-color:#fff;border-radius:2px 2px 0 0;box-shadow:inset 0 0 0 1px #1e1e1e;box-sizing:border-box;color:#1e1e1e;display:flex;flex-direction:row;justify-content:space-between;margin:0;outline:1px solid transparent;padding:16px;position:relative;text-align:right;width:100%}.block-editor-block-pattern-setup .block-editor-block-pattern-setup__toolbar .block-editor-block-pattern-setup__display-controls{display:flex}.block-editor-block-pattern-setup .block-editor-block-pattern-setup__toolbar .block-editor-block-pattern-setup__actions,.block-editor-block-pattern-setup .block-editor-block-pattern-setup__toolbar .block-editor-block-pattern-setup__navigation{display:flex;width:calc(50% - 36px)}.block-editor-block-pattern-setup .block-editor-block-pattern-setup__toolbar .block-editor-block-pattern-setup__actions{justify-content:flex-end}.block-editor-block-pattern-setup .block-editor-block-pattern-setup__container{box-sizing:border-box;display:flex;flex-direction:column;width:100%}.block-editor-block-pattern-setup .block-editor-block-pattern-setup__container .carousel-container{list-style:none;margin:0;overflow:hidden;padding:0;position:relative;transform-style:preserve-3d}.block-editor-block-pattern-setup .block-editor-block-pattern-setup__container .carousel-container *{box-sizing:border-box}.block-editor-block-pattern-setup .block-editor-block-pattern-setup__container .carousel-container .pattern-slide{margin:auto;opacity:0;padding:16px;position:absolute;top:0;transition:transform .5s,opacity .5s,z-index .5s;width:100%;z-index:100}.block-editor-block-pattern-setup .block-editor-block-pattern-setup__container .carousel-container .pattern-slide.active-slide{opacity:1;position:relative;z-index:102}.block-editor-block-pattern-setup .block-editor-block-pattern-setup__container .carousel-container .pattern-slide.previous-slide{transform:translateX(100%);z-index:101}.block-editor-block-pattern-setup .block-editor-block-pattern-setup__container .carousel-container .pattern-slide.next-slide{transform:translateX(-100%);z-index:101}.block-editor-block-pattern-setup .block-editor-block-pattern-setup__container .block-list-appender{display:none}.block-editor-block-variation-transforms{padding:0 56px 16px 16px;width:100%}.block-editor-block-variation-transforms .components-dropdown-menu__toggle{border:1px solid #757575;border-radius:2px;justify-content:left;min-height:30px;padding:6px 12px;position:relative;text-align:right;width:100%}.block-editor-block-variation-transforms .components-dropdown-menu__toggle.components-dropdown-menu__toggle{padding-left:24px}.block-editor-block-variation-transforms .components-dropdown-menu__toggle:focus:not(:disabled){border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 calc(var(--wp-admin-border-width-focus) - 1px) var(--wp-admin-theme-color)}.block-editor-block-variation-transforms .components-dropdown-menu__toggle svg{height:100%;left:0;padding:0;position:absolute;top:0}.block-editor-block-variation-transforms__popover .components-popover__content{min-width:230px}.components-border-radius-control{margin-bottom:12px}.components-border-radius-control legend{padding-bottom:4px}.components-border-radius-control .components-border-radius-control__wrapper{align-items:flex-start;display:flex;justify-content:space-between}.components-border-radius-control .components-border-radius-control__wrapper>.components-unit-control-wrapper{margin-bottom:0;width:calc(50% - 26px)}.components-border-radius-control .components-border-radius-control__wrapper .components-range-control{margin-bottom:0;width:calc(50% - 26px)}.components-border-radius-control .components-border-radius-control__wrapper .components-range-control .components-base-control__field{height:30px;margin-bottom:0}.components-border-radius-control .components-border-radius-control__wrapper .components-range-control .components-range-control__wrapper{margin-left:10px}.components-border-radius-control .components-border-radius-control__wrapper>span{flex:0 0 auto}.components-border-radius-control .components-border-radius-control__input-controls-wrapper{display:flex;flex-wrap:wrap;width:70%}.components-border-radius-control .components-border-radius-control__input-controls-wrapper .components-unit-control-wrapper{margin-bottom:8px;margin-left:8px;width:calc(50% - 8px)}.components-border-radius-control .component-border-radius-control__linked-button.has-icon{display:flex;justify-content:center}.components-border-radius-control .component-border-radius-control__linked-button.has-icon svg{margin-left:0}.components-border-style-control legend{line-height:1.2;padding-bottom:4px}.components-border-style-control .components-border-style-control__buttons{display:inline-flex;margin-bottom:24px}.components-border-style-control .components-border-style-control__buttons .components-button.has-icon{height:30px;margin-left:4px;min-width:30px;padding:3px}.block-editor-button-block-appender{align-items:center;box-shadow:inset 0 0 0 1px #1e1e1e;color:#1e1e1e;display:flex;flex-direction:column;height:auto;justify-content:center;padding:8px;width:100%}.is-dark-theme .block-editor-button-block-appender{box-shadow:inset 0 0 0 1px hsla(0,0%,100%,.65);color:hsla(0,0%,100%,.65)}.block-editor-button-block-appender:hover{box-shadow:inset 0 0 0 1px var(--wp-admin-theme-color);color:var(--wp-admin-theme-color)}.block-editor-button-block-appender:focus{box-shadow:inset 0 0 0 2px var(--wp-admin-theme-color)}.block-editor-button-block-appender:active{color:#000}.block-editor-button-block-appender.block-list-appender__toggle{box-shadow:none;display:flex;flex-direction:row;height:24px;width:24px}.block-editor-button-block-appender.block-list-appender__toggle>svg{background-color:#1e1e1e;border-radius:2px;color:#fff;flex:1 0 auto;width:24px}.block-editor-color-gradient-control .block-editor-color-gradient-control__color-indicator{margin-bottom:12px}.block-editor-panel-color-gradient-settings .component-color-indicator{vertical-align:text-bottom}.block-editor-panel-color-gradient-settings__panel-title .component-color-indicator{display:inline-block}.block-editor-panel-color-gradient-settings.is-opened .block-editor-panel-color-gradient-settings__panel-title .component-color-indicator{display:none}@media screen and (min-width:782px){.block-editor-panel-color-gradient-settings .components-circular-option-picker__swatches{display:grid;grid-template-columns:repeat(6,28px);justify-content:space-between}}.block-editor-block-inspector .block-editor-panel-color-gradient-settings .components-base-control{margin-bottom:inherit}.block-editor-contrast-checker>.components-notice{margin:0}.block-editor-default-block-appender{clear:both;margin-left:auto;margin-right:auto;position:relative}.block-editor-default-block-appender[data-root-client-id=""] .block-editor-default-block-appender__content:hover{outline:1px solid transparent}.block-editor-default-block-appender .block-editor-default-block-appender__content{opacity:.62}.block-editor-default-block-appender .components-drop-zone__content-icon{display:none}.block-editor-block-list__empty-block-inserter.block-editor-block-list__empty-block-inserter,.block-editor-default-block-appender .block-editor-inserter{height:32px;position:absolute;top:0}.block-editor-block-list__empty-block-inserter.block-editor-block-list__empty-block-inserter .block-editor-inserter__toggle,.block-editor-default-block-appender .block-editor-inserter .block-editor-inserter__toggle{margin-left:0}@media (min-width:600px){.block-editor-block-list__empty-block-inserter,.block-editor-default-block-appender .block-editor-inserter{display:flex;height:100%}}.block-editor-block-list__empty-block-inserter:disabled,.block-editor-default-block-appender .block-editor-inserter:disabled{display:none}.block-editor-block-list__empty-block-inserter,.block-editor-default-block-appender.has-visible-prompt .block-editor-inserter{left:0}.default-style-picker__default-switcher{text-align:center}.block-editor-duotone-control__popover>.components-popover__content>div{padding:16px;width:280px}.block-editor-duotone-control__popover .components-menu-group__label{padding:0}.block-editor-duotone-control__popover .components-custom-gradient-picker__gradient-bar{margin:16px 0 12px}.block-editor-duotone-control__popover .components-circular-option-picker__swatches{display:grid;gap:12px;grid-template-columns:repeat(6,28px);justify-content:space-between}.block-editor-duotone-control__description{font-size:12px;margin:16px 0}.block-editor-duotone-control__popover:not([data-y-axis=middle][data-x-axis=right])>.components-popover__content{margin-right:-14px}.components-font-appearance-control{margin-bottom:24px}.components-font-appearance-control ul li{color:#1e1e1e;text-transform:capitalize}.block-editor-image-size-control{margin-bottom:1em}.block-editor-image-size-control .block-editor-image-size-control__row{display:flex;justify-content:space-between}.block-editor-image-size-control .block-editor-image-size-control__row .block-editor-image-size-control__height,.block-editor-image-size-control .block-editor-image-size-control__row .block-editor-image-size-control__width{margin-bottom:.5em}.block-editor-image-size-control .block-editor-image-size-control__row .block-editor-image-size-control__height input,.block-editor-image-size-control .block-editor-image-size-control__row .block-editor-image-size-control__width input{line-height:1.25}.block-editor-image-size-control .block-editor-image-size-control__row .block-editor-image-size-control__width{margin-left:5px}.block-editor-image-size-control .block-editor-image-size-control__row .block-editor-image-size-control__height{margin-right:5px}.block-editor-block-list__layout.has-overlay:after{bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:60}.block-editor-block-types-list__list-item{display:block;margin:0;padding:0;width:33.33%}.components-button.block-editor-block-types-list__item{align-items:stretch;background:transparent;border-radius:2px;color:#1e1e1e;cursor:pointer;display:flex;flex-direction:column;font-size:13px;height:auto;justify-content:center;padding:8px;position:relative;transition:all .05s ease-in-out;width:100%;word-break:break-word}@media (prefers-reduced-motion:reduce){.components-button.block-editor-block-types-list__item{transition-delay:0s;transition-duration:0s}}.components-button.block-editor-block-types-list__item:disabled{cursor:default;opacity:.6}.components-button.block-editor-block-types-list__item:not(:disabled):hover{color:var(--wp-admin-theme-color)!important}.components-button.block-editor-block-types-list__item:not(:disabled):focus{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.components-button.block-editor-block-types-list__item:not(:disabled).is-active{background:#1e1e1e;color:#fff;outline:2px solid transparent;outline-offset:-2px}.block-editor-block-types-list__item-icon{border-radius:2px;color:#1e1e1e;padding:12px 20px;transition:all .05s ease-in-out}@media (prefers-reduced-motion:reduce){.block-editor-block-types-list__item-icon{transition-delay:0s;transition-duration:0s}}.block-editor-block-types-list__item-icon .block-editor-block-icon{margin-left:auto;margin-right:auto}.block-editor-block-types-list__item-icon svg{transition:all .15s ease-out}@media (prefers-reduced-motion:reduce){.block-editor-block-types-list__item-icon svg{transition-delay:0s;transition-duration:0s}}.block-editor-block-types-list__list-item[draggable=true] .block-editor-block-types-list__item-icon{cursor:grab}.block-editor-block-types-list__item-title{font-size:12px;padding:4px 2px 8px}.items-justified-left{justify-content:flex-start}.items-justified-center{justify-content:center}.items-justified-right{justify-content:flex-end}.items-justified-space-between{justify-content:space-between}.block-editor-line-height-control{margin-bottom:24px}.block-editor-line-height-control input{display:block;max-width:60px}@keyframes loadingpulse{0%{opacity:1}50%{opacity:0}to{opacity:1}}.block-editor-link-control{min-width:360px;position:relative}.components-popover__content .block-editor-link-control{max-width:360px;min-width:auto;width:90vw}.block-editor-link-control__search-input-container,.block-editor-link-control__search-input-wrapper{position:relative}.block-editor-link-control__search-input.has-no-label .block-editor-url-input__input{flex:1}.block-editor-link-control__field{margin:16px}.block-editor-link-control__field>.components-base-control__field{align-items:center;display:flex;margin:0}.block-editor-link-control__field .components-base-control__label{margin-bottom:0;margin-left:16px}.block-editor-link-control__field.block-editor-url-input input[type=text].block-editor-url-input__input,.block-editor-link-control__field input[type=text]{border:1px solid #ddd;border-radius:2px;box-shadow:0 0 0 transparent;display:block;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:16px;line-height:normal;margin:0;padding:11px 16px 11px 36px;position:relative;transition:box-shadow .1s linear;width:calc(100% - 32px)}@media (prefers-reduced-motion:reduce){.block-editor-link-control__field.block-editor-url-input input[type=text].block-editor-url-input__input,.block-editor-link-control__field input[type=text]{transition-delay:0s;transition-duration:0s}}@media (min-width:600px){.block-editor-link-control__field.block-editor-url-input input[type=text].block-editor-url-input__input,.block-editor-link-control__field input[type=text]{font-size:13px;line-height:normal}}.block-editor-link-control__field.block-editor-url-input input[type=text].block-editor-url-input__input:focus,.block-editor-link-control__field input[type=text]:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:2px solid transparent}.block-editor-link-control__field.block-editor-url-input input[type=text].block-editor-url-input__input::-webkit-input-placeholder,.block-editor-link-control__field input[type=text]::-webkit-input-placeholder{color:rgba(30,30,30,.62)}.block-editor-link-control__field.block-editor-url-input input[type=text].block-editor-url-input__input::-moz-placeholder,.block-editor-link-control__field input[type=text]::-moz-placeholder{color:rgba(30,30,30,.62);opacity:1}.block-editor-link-control__field.block-editor-url-input input[type=text].block-editor-url-input__input:-ms-input-placeholder,.block-editor-link-control__field input[type=text]:-ms-input-placeholder{color:rgba(30,30,30,.62)}.block-editor-link-control__search-error{margin:-8px 16px 16px}.block-editor-link-control__search-actions{left:19px;position:absolute;top:3px}.components-button .block-editor-link-control__search-submit .has-icon{margin:-1px}.block-editor-link-control__search-results-wrapper{margin-top:-15px;position:relative}.block-editor-link-control__search-results-wrapper:after,.block-editor-link-control__search-results-wrapper:before{content:"";display:block;left:16px;pointer-events:none;position:absolute;right:-1px;z-index:100}.block-editor-link-control__search-results-wrapper:before{bottom:auto;height:8px;top:0}.block-editor-link-control__search-results-wrapper:after{bottom:0;height:16px;top:auto}.block-editor-link-control__search-results-label{display:block;font-weight:600;padding:16px 32px 0}.block-editor-link-control__search-results{margin:0;max-height:200px;overflow-y:auto;padding:8px 16px}.block-editor-link-control__search-results.is-loading{opacity:.2}.block-editor-link-control__search-item{align-items:flex-start;background:#fff;border:none;border-radius:2px;cursor:pointer;display:flex;font-size:13px;height:auto;padding:12px 16px;position:relative;text-align:right;width:100%}.block-editor-link-control__search-item:focus,.block-editor-link-control__search-item:hover{background-color:#f0f0f0}.block-editor-link-control__search-item:focus .block-editor-link-control__search-item-type,.block-editor-link-control__search-item:hover .block-editor-link-control__search-item-type{background:#fff}.block-editor-link-control__search-item:focus:not(:disabled){box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color) inset}.block-editor-link-control__search-item.is-selected{background:#f0f0f0}.block-editor-link-control__search-item.is-selected .block-editor-link-control__search-item-type{background:#fff}.block-editor-link-control__search-item.is-current{background:transparent;border:0;cursor:default;flex-direction:column;padding:16px;width:100%}.block-editor-link-control__search-item .block-editor-link-control__search-item-header{word-wrap:break-word;align-items:flex-start;display:block;flex-direction:row;margin-left:8px;white-space:pre-wrap}.block-editor-link-control__search-item.is-preview .block-editor-link-control__search-item-header{display:flex;flex:1}.block-editor-link-control__search-item.is-error .block-editor-link-control__search-item-header{align-items:center}.block-editor-link-control__search-item .block-editor-link-control__search-item-icon{display:flex;flex-shrink:0;justify-content:center;margin-left:8px;max-height:24px;position:relative;top:.2em;width:24px}.block-editor-link-control__search-item .block-editor-link-control__search-item-icon img{width:16px}.block-editor-link-control__search-item.is-error .block-editor-link-control__search-item-icon{max-height:32px;top:0;width:32px}.block-editor-link-control__search-item .block-editor-link-control__search-item-info,.block-editor-link-control__search-item .block-editor-link-control__search-item-title{overflow:hidden;text-overflow:ellipsis}.block-editor-link-control__search-item .block-editor-link-control__search-item-info .components-external-link__icon,.block-editor-link-control__search-item .block-editor-link-control__search-item-title .components-external-link__icon{left:0;margin-top:0;position:absolute}.block-editor-link-control__search-item .block-editor-link-control__search-item-title{display:block;font-weight:500;margin-bottom:.2em;position:relative}.block-editor-link-control__search-item .block-editor-link-control__search-item-title mark{background-color:transparent;color:inherit;font-weight:700}.block-editor-link-control__search-item .block-editor-link-control__search-item-title span{font-weight:400}.block-editor-link-control__search-item .block-editor-link-control__search-item-title svg{display:none}.block-editor-link-control__search-item .block-editor-link-control__search-item-info{color:#757575;display:block;font-size:.9em;line-height:1.3}.block-editor-link-control__search-item .block-editor-link-control__search-item-error-notice{font-size:1.1em;font-style:italic}.block-editor-link-control__search-item .block-editor-link-control__search-item-type{background-color:#f0f0f0;border-radius:2px;display:block;font-size:.9em;margin-right:auto;padding:3px 6px}.block-editor-link-control__search-item .block-editor-link-control__search-item-description{margin:0;padding-top:12px}.block-editor-link-control__search-item .block-editor-link-control__search-item-description.is-placeholder{display:flex;flex-direction:column;height:28px;justify-content:space-around;margin-top:12px;padding-top:0}.block-editor-link-control__search-item .block-editor-link-control__search-item-description.is-placeholder:after,.block-editor-link-control__search-item .block-editor-link-control__search-item-description.is-placeholder:before{background-color:#f0f0f0;border-radius:3px;content:"";display:block;height:.7em;width:100%}.block-editor-link-control__search-item .block-editor-link-control__search-item-description .components-text{font-size:.9em}.block-editor-link-control__search-item .block-editor-link-control__search-item-image{background-color:#f0f0f0;border-radius:2px;display:flex;height:140px;justify-content:center;margin-top:12px;max-height:140px;overflow:hidden;width:100%}.block-editor-link-control__search-item .block-editor-link-control__search-item-image.is-placeholder{background-color:#f0f0f0;border-radius:3px}.block-editor-link-control__search-item .block-editor-link-control__search-item-image img{display:block;height:140px;max-height:140px;max-width:100%}.block-editor-link-control__search-item-top{display:flex;flex-direction:row;width:100%}.block-editor-link-control__search-item-bottom{transition:opacity 1.5s;width:100%}.block-editor-link-control__search-item.is-fetching .block-editor-link-control__search-item-description:after,.block-editor-link-control__search-item.is-fetching .block-editor-link-control__search-item-description:before{animation:loadingpulse 1s linear infinite;animation-delay:.5s}.block-editor-link-control__search-item.is-fetching .block-editor-link-control__search-item-image{animation:loadingpulse 1s linear infinite;animation-delay:.5s}.block-editor-link-control__search-item.is-fetching .block-editor-link-control__search-item-icon img,.block-editor-link-control__search-item.is-fetching .block-editor-link-control__search-item-icon svg{opacity:0}.block-editor-link-control__search-item.is-fetching .block-editor-link-control__search-item-icon:before{animation:loadingpulse 1s linear infinite;animation-delay:.5s;background-color:#f0f0f0;border-radius:100%;bottom:0;content:"";display:block;left:0;position:absolute;right:0;top:0}.block-editor-link-control__loading{align-items:center;display:flex;margin:16px}.block-editor-link-control__loading .components-spinner{margin-top:0}.components-button+.block-editor-link-control__search-create{overflow:visible;padding:12px 16px}.components-button+.block-editor-link-control__search-create:before{content:"";display:block;position:absolute;right:0;top:-10px;width:100%}.block-editor-link-control__search-create{align-items:center}.block-editor-link-control__search-create .block-editor-link-control__search-item-title{margin-bottom:0}.block-editor-link-control__search-create .block-editor-link-control__search-item-icon{top:0}.block-editor-link-control__search-results div[role=menu]>.block-editor-link-control__search-item.block-editor-link-control__search-item{padding:10px}.block-editor-link-control__tools{align-items:center;border-top:1px solid #ddd;display:flex;margin:0;padding:16px}.block-editor-link-control__unlink{padding-left:16px;padding-right:16px}.block-editor-link-control__settings{flex:1;margin:0}.block-editor-link-control__settings :last-child{margin-bottom:0}.is-alternate .block-editor-link-control__settings{border-top:1px solid #1e1e1e}.block-editor-link-control__setting{margin-bottom:16px}.block-editor-link-control__setting :last-child{margin-bottom:0}.block-editor-link-control .block-editor-link-control__search-input .components-spinner{display:block}.block-editor-link-control .block-editor-link-control__search-input .components-spinner.components-spinner{bottom:auto;left:62px;position:absolute;right:auto;top:28px}.block-editor-link-control__search-item-action{flex-shrink:0;margin-right:auto}.block-editor-list-view-tree{border-collapse:collapse;margin:0;padding:0;width:100%}.components-modal__content .block-editor-list-view-tree{margin:-12px -6px 0;width:calc(100% + 12px)}.block-editor-list-view-leaf{position:relative}.block-editor-list-view-leaf.is-selected{background:var(--wp-admin-theme-color)}.block-editor-list-view-leaf.is-selected .block-editor-list-view-block-contents,.block-editor-list-view-leaf.is-selected .components-button.has-icon{color:#fff}.is-dragging-components-draggable .block-editor-list-view-leaf.is-selected .block-editor-list-view-block-contents{background:none;color:#1e1e1e}.block-editor-list-view-leaf.is-selected .block-editor-list-view-block-contents:focus:after{box-shadow:inset 0 0 0 1px #fff,0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.block-editor-list-view-leaf.is-selected .block-editor-list-view-block__menu:focus{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) #fff}.block-editor-list-view-leaf.is-branch-selected:not(.is-selected){background:linear-gradient(hsla(0,0%,100%,.9),hsla(0,0%,100%,.9)),linear-gradient(var(--wp-admin-theme-color),var(--wp-admin-theme-color))}.block-editor-list-view-leaf.is-branch-selected.is-selected .block-editor-list-view-block-contents{border-radius:2px 2px 0 0}.block-editor-list-view-leaf[aria-expanded=false].is-branch-selected.is-selected .block-editor-list-view-block-contents{border-radius:2px}.block-editor-list-view-leaf.is-branch-selected:not(.is-selected) .block-editor-list-view-block-contents{border-radius:0}.block-editor-list-view-leaf.is-dragging{display:none}.block-editor-list-view-leaf .block-editor-list-view-block-contents{align-items:center;border-radius:2px;color:#1e1e1e;display:flex;height:auto;padding:6px 0 6px 12px;position:relative;text-align:right;white-space:nowrap;width:100%}.block-editor-list-view-leaf .block-editor-list-view-block-contents.is-dropping-before:before{border-top:4px solid var(--wp-admin-theme-color);content:"";left:0;pointer-events:none;position:absolute;right:0;top:-2px;transition:border-color .1s linear,border-style .1s linear,box-shadow .1s linear}.components-modal__content .block-editor-list-view-leaf .block-editor-list-view-block-contents{padding-left:0;padding-right:0}.block-editor-list-view-leaf .block-editor-list-view-block-contents:focus{box-shadow:none}.block-editor-list-view-leaf .block-editor-list-view-block-contents:focus:after{border-radius:inherit;bottom:0;box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);content:"";left:-29px;pointer-events:none;position:absolute;right:0;top:0;z-index:1}.is-dragging-components-draggable .block-editor-list-view-leaf .block-editor-list-view-block-contents:focus:after{box-shadow:none}.block-editor-list-view-leaf.has-single-cell .block-editor-list-view-block-contents:focus:after{left:0}.block-editor-list-view-leaf .block-editor-list-view-block__menu:focus{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);z-index:1}.is-dragging-components-draggable .block-editor-list-view-leaf .block-editor-list-view-block__menu:focus{box-shadow:none}.block-editor-list-view-leaf.is-visible .block-editor-list-view-block-contents{animation:edit-post__fade-in-animation .2s ease-out 0s;animation-fill-mode:forwards;opacity:1}@media (prefers-reduced-motion:reduce){.block-editor-list-view-leaf.is-visible .block-editor-list-view-block-contents{animation-delay:0s;animation-duration:1ms}}.block-editor-list-view-leaf .block-editor-block-icon{align-self:flex-start;margin-left:8px;width:24px}.block-editor-list-view-leaf .block-editor-list-view-block__contents-cell,.block-editor-list-view-leaf .block-editor-list-view-block__menu-cell,.block-editor-list-view-leaf .block-editor-list-view-block__mover-cell{padding-bottom:0;padding-top:0}.block-editor-list-view-leaf .block-editor-list-view-block__menu-cell,.block-editor-list-view-leaf .block-editor-list-view-block__mover-cell{line-height:0;opacity:0;vertical-align:middle;width:36px}@media (prefers-reduced-motion:reduce){.block-editor-list-view-leaf .block-editor-list-view-block__menu-cell,.block-editor-list-view-leaf .block-editor-list-view-block__mover-cell{transition-delay:0s;transition-duration:0s}}.block-editor-list-view-leaf .block-editor-list-view-block__menu-cell.is-visible,.block-editor-list-view-leaf .block-editor-list-view-block__menu-cell:hover,.block-editor-list-view-leaf .block-editor-list-view-block__mover-cell.is-visible,.block-editor-list-view-leaf .block-editor-list-view-block__mover-cell:hover{animation:edit-post__fade-in-animation .2s ease-out 0s;animation-fill-mode:forwards;opacity:1;position:relative;z-index:1}@media (prefers-reduced-motion:reduce){.block-editor-list-view-leaf .block-editor-list-view-block__menu-cell.is-visible,.block-editor-list-view-leaf .block-editor-list-view-block__menu-cell:hover,.block-editor-list-view-leaf .block-editor-list-view-block__mover-cell.is-visible,.block-editor-list-view-leaf .block-editor-list-view-block__mover-cell:hover{animation-delay:0s;animation-duration:1ms}}.block-editor-list-view-leaf .block-editor-list-view-block__menu-cell,.block-editor-list-view-leaf .block-editor-list-view-block__menu-cell .components-button.has-icon,.block-editor-list-view-leaf .block-editor-list-view-block__mover-cell,.block-editor-list-view-leaf .block-editor-list-view-block__mover-cell .components-button.has-icon{min-width:24px;padding:0;width:24px}.block-editor-list-view-leaf .block-editor-list-view-block__menu-cell{padding-left:5px}.block-editor-list-view-leaf .block-editor-list-view-block__menu-cell .components-button.has-icon{height:24px}.block-editor-list-view-leaf .block-editor-list-view-block__mover-cell-alignment-wrapper{align-items:center;display:flex;flex-direction:column;height:100%}.block-editor-list-view-leaf .block-editor-block-mover-button{height:24px;position:relative;width:36px}.block-editor-list-view-leaf .block-editor-block-mover-button svg{height:24px;position:relative}.block-editor-list-view-leaf .block-editor-block-mover-button.is-up-button{align-items:flex-end;margin-top:-6px}.block-editor-list-view-leaf .block-editor-block-mover-button.is-up-button svg{bottom:-4px}.block-editor-list-view-leaf .block-editor-block-mover-button.is-down-button{align-items:flex-start;margin-bottom:-6px}.block-editor-list-view-leaf .block-editor-block-mover-button.is-down-button svg{top:-4px}.block-editor-list-view-leaf .block-editor-block-mover-button:focus:enabled{box-shadow:none;outline:none}.block-editor-list-view-leaf .block-editor-block-mover-button:focus{box-shadow:none;outline:none}.block-editor-list-view-leaf .block-editor-block-mover-button:focus:before{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color),inset 0 0 0 4px #fff;outline:2px solid transparent}.block-editor-list-view-leaf .block-editor-block-mover-button:before{animation:components-button__appear-animation .1s ease;animation-fill-mode:forwards;border-radius:2px;content:"";display:block;height:16px;left:0;min-width:100%;position:absolute;right:0}@media (prefers-reduced-motion:reduce){.block-editor-list-view-leaf .block-editor-block-mover-button:before{animation-delay:0s;animation-duration:1ms}}.block-editor-list-view-leaf .block-editor-inserter__toggle{background:#1e1e1e;color:#fff;height:24px;margin:6px 1px 6px 6px;min-width:24px}.block-editor-list-view-leaf .block-editor-inserter__toggle:active{color:#fff}.block-editor-list-view-leaf .block-editor-list-view-block-select-button__anchor{background:rgba(0,0,0,.1);border-radius:2px;display:inline-block;margin:0 8px;max-width:120px;overflow:hidden;padding:2px 6px;text-overflow:ellipsis}.block-editor-list-view-leaf.is-selected .block-editor-list-view-block-select-button__anchor{background:rgba(0,0,0,.3)}.block-editor-list-view-appender__description,.block-editor-list-view-block-select-button__description{display:none}.block-editor-list-view-appender__cell .block-editor-list-view-appender__container,.block-editor-list-view-appender__cell .block-editor-list-view-block__contents-container,.block-editor-list-view-block__contents-cell .block-editor-list-view-appender__container,.block-editor-list-view-block__contents-cell .block-editor-list-view-block__contents-container{display:flex}.block-editor-list-view__expander{height:24px;margin-right:4px;width:24px}.block-editor-list-view-leaf[aria-level] .block-editor-list-view__expander{margin-right:220px}.block-editor-list-view-leaf:not([aria-level="1"]) .block-editor-list-view__expander{margin-left:4px}.block-editor-list-view-leaf[aria-level="1"] .block-editor-list-view__expander{margin-right:0}.block-editor-list-view-leaf[aria-level="2"] .block-editor-list-view__expander{margin-right:24px}.block-editor-list-view-leaf[aria-level="3"] .block-editor-list-view__expander{margin-right:52px}.block-editor-list-view-leaf[aria-level="4"] .block-editor-list-view__expander{margin-right:80px}.block-editor-list-view-leaf[aria-level="5"] .block-editor-list-view__expander{margin-right:108px}.block-editor-list-view-leaf[aria-level="6"] .block-editor-list-view__expander{margin-right:136px}.block-editor-list-view-leaf[aria-level="7"] .block-editor-list-view__expander{margin-right:164px}.block-editor-list-view-leaf[aria-level="8"] .block-editor-list-view__expander{margin-right:192px}.block-editor-list-view-leaf .block-editor-list-view__expander{visibility:hidden}.block-editor-list-view-leaf[aria-expanded=true] .block-editor-list-view__expander svg{transform:rotate(-90deg);transition:transform .2s ease;visibility:visible}@media (prefers-reduced-motion:reduce){.block-editor-list-view-leaf[aria-expanded=true] .block-editor-list-view__expander svg{transition-delay:0s;transition-duration:0s}}.block-editor-list-view-leaf[aria-expanded=false] .block-editor-list-view__expander svg{transform:rotate(0deg);transition:transform .2s ease;visibility:visible}@media (prefers-reduced-motion:reduce){.block-editor-list-view-leaf[aria-expanded=false] .block-editor-list-view__expander svg{transition-delay:0s;transition-duration:0s}}.block-editor-list-view-drop-indicator{pointer-events:none}.block-editor-list-view-drop-indicator .block-editor-list-view-drop-indicator__line{background:var(--wp-admin-theme-color);height:1px}.block-editor-list-view-drop-indicator:not([data-y-axis=middle][data-x-axis=right])>.components-popover__content{border:none;box-shadow:none;margin-right:0}.block-editor-list-view-placeholder{height:36px;margin:0;padding:0}.modal-open .block-editor-media-replace-flow__options{display:none}.block-editor-media-replace-flow__indicator{margin-right:4px}.block-editor-media-flow__url-input{border-top:1px solid #1e1e1e;margin-left:-8px;margin-right:-8px;margin-top:8px;padding:16px}.block-editor-media-flow__url-input .block-editor-media-replace-flow__image-url-label{display:block;margin-bottom:8px;top:16px}.block-editor-media-flow__url-input .block-editor-link-control{width:220px}.block-editor-media-flow__url-input .block-editor-link-control .block-editor-url-input{padding:0}.block-editor-media-flow__url-input .block-editor-link-control .components-base-control .components-base-control__field{margin-bottom:0}.block-editor-media-flow__url-input .block-editor-link-control .block-editor-link-control__search-item-title{max-width:180px;white-space:nowrap}.block-editor-media-flow__url-input .block-editor-link-control .block-editor-link-control__search-item-info{white-space:nowrap}.block-editor-media-flow__url-input .block-editor-link-control .block-editor-link-control__search-item.is-current{padding:0;width:auto}.block-editor-media-flow__url-input .block-editor-link-control .block-editor-link-control__search-input.block-editor-link-control__search-input input[type=text]{margin:0;width:100%}.block-editor-media-flow__url-input .block-editor-link-control .block-editor-link-control__search-actions{left:4px;top:0}.block-editor-media-flow__error{max-width:255px;padding:0 20px 20px}.block-editor-media-flow__error .components-with-notices-ui{max-width:255px}.block-editor-media-flow__error .components-with-notices-ui .components-notice__content{word-wrap:break-word;overflow:hidden}.block-editor-media-flow__error .components-with-notices-ui .components-notice__dismiss{left:10px;position:absolute}.block-editor-media-placeholder__url-input-container .block-editor-media-placeholder__button{margin-bottom:0}.block-editor-media-placeholder__url-input-form{display:flex}.block-editor-media-placeholder__url-input-form input[type=url].block-editor-media-placeholder__url-input-field{border:none;border-radius:0;flex-grow:1;margin:2px;min-width:200px;width:100%}@media (min-width:600px){.block-editor-media-placeholder__url-input-form input[type=url].block-editor-media-placeholder__url-input-field{width:300px}}.block-editor-media-placeholder__url-input-submit-button{flex-shrink:1}.block-editor-media-placeholder__button{margin-bottom:.5rem}.block-editor-media-placeholder__cancel-button.is-link{display:block;margin:1em}.block-editor-media-placeholder.is-appender{min-height:0}.block-editor-media-placeholder.is-appender:hover{box-shadow:0 0 0 1px var(--wp-admin-theme-color);cursor:pointer}.block-editor-multi-selection-inspector__card{align-items:flex-start;display:flex;padding:16px}.block-editor-multi-selection-inspector__card-content{flex-grow:1}.block-editor-multi-selection-inspector__card-title{font-weight:500;margin-bottom:5px}.block-editor-multi-selection-inspector__card-description{font-size:13px}.block-editor-multi-selection-inspector__card .block-editor-block-icon{height:24px;margin-left:10px;margin-right:-2px;padding:0 3px;width:36px}.block-editor-plain-text{border:none;box-shadow:none;color:inherit;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;padding:0;width:100%}.block-editor-responsive-block-control{border-bottom:1px solid #ccc;margin-bottom:28px;padding-bottom:14px}.block-editor-responsive-block-control:last-child{border-bottom:0;padding-bottom:0}.block-editor-responsive-block-control__title{margin:0 -3px .6em 0}.block-editor-responsive-block-control__label{font-weight:600;margin-bottom:.6em;margin-right:-3px}.block-editor-responsive-block-control__inner{margin-right:-1px}.block-editor-responsive-block-control__toggle{margin-right:1px}.block-editor-responsive-block-control .components-base-control__help{clip:rect(1px,1px,1px,1px);word-wrap:normal!important;border:0;-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.rich-text [data-rich-text-placeholder]{pointer-events:none}.rich-text [data-rich-text-placeholder]:after{content:attr(data-rich-text-placeholder);opacity:.62}.rich-text:focus{outline:none}.rich-text:focus [data-rich-text-format-boundary]{border-radius:2px}.block-editor-rich-text__editable>p:first-child{margin-top:0}figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]:before{opacity:.8}.components-popover.block-editor-rich-text__inline-format-toolbar{z-index:99998}.components-popover.block-editor-rich-text__inline-format-toolbar .components-popover__content{background-color:#fff;border:1px solid #1e1e1e;border-radius:2px;box-shadow:none;margin-bottom:8px;min-width:auto;width:auto}.components-popover.block-editor-rich-text__inline-format-toolbar .components-toolbar,.components-popover.block-editor-rich-text__inline-format-toolbar .components-toolbar-group{border:none}.components-popover.block-editor-rich-text__inline-format-toolbar .components-dropdown-menu__toggle,.components-popover.block-editor-rich-text__inline-format-toolbar .components-toolbar__control{min-height:48px;min-width:48px;padding-left:12px;padding-right:12px}.block-editor-rich-text__inline-format-toolbar-group .components-dropdown-menu__toggle{justify-content:center}.show-icon-labels .block-editor-rich-text__inline-format-toolbar-group .components-button.has-icon{width:auto}.show-icon-labels .block-editor-rich-text__inline-format-toolbar-group .components-button.has-icon svg{display:none}.show-icon-labels .block-editor-rich-text__inline-format-toolbar-group .components-button.has-icon:after{content:attr(aria-label)}[data-rich-text-script]{display:inline}[data-rich-text-script]:before{background:#ff0;content:"</>"}.block-editor-skip-to-selected-block{position:absolute;top:-9999em}.block-editor-skip-to-selected-block:focus{background:#f1f1f1;box-shadow:0 0 2px 2px rgba(0,0,0,.6);color:var(--wp-admin-theme-color);display:block;font-size:14px;font-weight:600;height:auto;line-height:normal;outline:none;padding:15px 23px 14px;text-decoration:none;width:auto;z-index:100000}.block-editor-text-transform-control{flex:0 0 50%}.block-editor-text-transform-control legend{margin-bottom:8px}.block-editor-text-transform-control .block-editor-text-transform-control__buttons{display:inline-flex;margin-bottom:24px}.block-editor-text-transform-control .block-editor-text-transform-control__buttons .components-button.has-icon{margin-left:4px;min-width:24px;padding:0}.block-editor-text-decoration-control{flex:0 0 50%}.block-editor-text-decoration-control legend{margin-bottom:8px}.block-editor-text-decoration-control .block-editor-text-decoration-control__buttons{display:inline-flex;margin-bottom:24px}.block-editor-text-decoration-control .block-editor-text-decoration-control__buttons .components-button.has-icon{margin-left:4px;min-width:24px;padding:0}.block-editor-tool-selector__help{border-top:1px solid #ddd;color:#757575;margin:8px -8px -8px;min-width:280px;padding:16px}.block-editor-block-list__block .block-editor-url-input,.block-editor-url-input,.components-popover .block-editor-url-input{flex-grow:1;padding:1px;position:relative}.block-editor-block-list__block .block-editor-url-input input[type=text],.block-editor-url-input input[type=text],.components-popover .block-editor-url-input input[type=text]{border:none;border-radius:0;font-size:16px;margin-left:0;margin-right:0;padding:8px 12px 8px 8px;width:100%}@media (min-width:600px){.block-editor-block-list__block .block-editor-url-input input[type=text],.block-editor-url-input input[type=text],.components-popover .block-editor-url-input input[type=text]{width:300px}}@media (min-width:600px){.block-editor-block-list__block .block-editor-url-input input[type=text],.block-editor-url-input input[type=text],.components-popover .block-editor-url-input input[type=text]{font-size:13px}}.block-editor-block-list__block .block-editor-url-input input[type=text]::-ms-clear,.block-editor-url-input input[type=text]::-ms-clear,.components-popover .block-editor-url-input input[type=text]::-ms-clear{display:none}.block-editor-block-list__block .block-editor-url-input.is-full-width,.block-editor-url-input.is-full-width,.components-popover .block-editor-url-input.is-full-width{width:100%}.block-editor-block-list__block .block-editor-url-input.is-full-width .block-editor-url-input__input[type=text],.block-editor-url-input.is-full-width .block-editor-url-input__input[type=text],.components-popover .block-editor-url-input.is-full-width .block-editor-url-input__input[type=text]{width:100%}.block-editor-block-list__block .block-editor-url-input.is-full-width__suggestions,.block-editor-url-input.is-full-width__suggestions,.components-popover .block-editor-url-input.is-full-width__suggestions{width:100%}.block-editor-block-list__block .block-editor-url-input .components-spinner,.block-editor-url-input .components-spinner,.components-popover .block-editor-url-input .components-spinner{bottom:8px 8px 8px 12px8px1;left:8px 8px 8px 12px;margin:0;position:absolute}.block-editor-url-input__input[type=text]{border:1px solid #757575;border-radius:2px;box-shadow:0 0 0 transparent;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:16px;line-height:normal;padding:6px 8px;transition:box-shadow .1s linear}@media (prefers-reduced-motion:reduce){.block-editor-url-input__input[type=text]{transition-delay:0s;transition-duration:0s}}@media (min-width:600px){.block-editor-url-input__input[type=text]{font-size:13px;line-height:normal}}.block-editor-url-input__input[type=text]:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:2px solid transparent}.block-editor-url-input__input[type=text]::-webkit-input-placeholder{color:rgba(30,30,30,.62)}.block-editor-url-input__input[type=text]::-moz-placeholder{color:rgba(30,30,30,.62);opacity:1}.block-editor-url-input__input[type=text]:-ms-input-placeholder{color:rgba(30,30,30,.62)}.block-editor-url-input__suggestions{max-height:200px;overflow-y:auto;padding:4px 0;transition:all .15s ease-in-out;width:302px}@media (prefers-reduced-motion:reduce){.block-editor-url-input__suggestions{transition-delay:0s;transition-duration:0s}}.block-editor-url-input .components-spinner,.block-editor-url-input__suggestions{display:none}@media (min-width:600px){.block-editor-url-input .components-spinner,.block-editor-url-input__suggestions{display:inherit}}.block-editor-url-input__suggestion{background:#fff;border:none;box-shadow:none;color:#757575;cursor:pointer;display:block;font-size:13px;padding:4px 8px 8px;text-align:right;width:100%}.block-editor-url-input__suggestion:hover{background:#ddd}.block-editor-url-input__suggestion.is-selected,.block-editor-url-input__suggestion:focus{background:var(--wp-admin-theme-color-darker-20);color:#fff;outline:none}.components-toolbar-group>.block-editor-url-input__button,.components-toolbar>.block-editor-url-input__button{position:inherit}.block-editor-url-input__button .block-editor-url-input__back{margin-left:4px;overflow:visible}.block-editor-url-input__button .block-editor-url-input__back:after{background:#ddd;content:"";display:block;height:24px;left:-1px;position:absolute;width:1px}.block-editor-url-input__button-modal{background:#fff;border:1px solid #ddd;box-shadow:0 2px 6px rgba(0,0,0,.05)}.block-editor-url-input__button-modal-line{align-items:flex-start;display:flex;flex-direction:row;flex-grow:1;flex-shrink:1;min-width:0}.block-editor-url-input__button-modal-line .components-button{flex-shrink:0;height:36px;width:36px}.block-editor-url-popover__additional-controls{border-top:1px solid #ddd}.block-editor-url-popover__additional-controls>div[role=menu] .components-button:not(:disabled):not([aria-disabled=true]):not(.is-secondary)>svg{box-shadow:none}.block-editor-url-popover__additional-controls div[role=menu]>.components-button{padding-right:12px}.block-editor-url-popover__row{display:flex}.block-editor-url-popover__row>:not(.block-editor-url-popover__settings-toggle){flex-grow:1}.block-editor-url-popover .components-button.has-icon{padding:3px}.block-editor-url-popover .components-button.has-icon>svg{border-radius:2px;height:30px;padding:5px;width:30px}.block-editor-url-popover .components-button.has-icon:not(:disabled):focus{box-shadow:none}.block-editor-url-popover .components-button.has-icon:not(:disabled):focus>svg{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color),inset 0 0 0 4px #fff;outline:2px solid transparent}.block-editor-url-popover__settings-toggle{border-radius:0;border-right:1px solid #ddd;flex-shrink:0;margin-right:1px}.block-editor-url-popover__settings-toggle[aria-expanded=true] .dashicon{transform:rotate(-180deg)}.block-editor-url-popover__input-container .components-base-control:last-child,.block-editor-url-popover__input-container .components-base-control:last-child .components-base-control__field{margin-bottom:0}.block-editor-url-popover__settings{border-top:1px solid #ddd;display:block;padding:16px}.block-editor-url-popover__link-editor,.block-editor-url-popover__link-viewer{display:flex}.block-editor-url-popover__link-editor .block-editor-url-input .components-base-control__field,.block-editor-url-popover__link-viewer .block-editor-url-input .components-base-control__field{margin-bottom:0}.block-editor-url-popover__link-editor .block-editor-url-input .components-spinner,.block-editor-url-popover__link-viewer .block-editor-url-input .components-spinner{bottom:8px 8px 8px 12px1}.block-editor-url-popover__link-viewer-url{flex-grow:1;flex-shrink:1;margin:7px;max-width:500px;min-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.block-editor-url-popover__link-viewer-url.has-invalid-link{color:#cc1818}.block-editor-warning{align-items:center;background-color:#fff;border:1px solid #1e1e1e;border-radius:2px;display:flex;flex-wrap:wrap;padding:1em}.block-editor-warning,.block-editor-warning .block-editor-warning__message{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif}.block-editor-warning .block-editor-warning__message{color:#1e1e1e;font-size:13px;line-height:1.4;margin:0}.block-editor-warning p.block-editor-warning__message.block-editor-warning__message{min-height:auto}.block-editor-warning .block-editor-warning__contents{align-items:baseline;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;width:100%}.block-editor-warning .block-editor-warning__actions{display:flex;margin-top:1em}.block-editor-warning .block-editor-warning__action{margin:0 0 0 8px}.block-editor-warning__secondary{margin:auto 8px auto 0}.components-popover.block-editor-warning__dropdown{z-index:99998}.html-anchor-control .components-external-link{display:block;margin-top:8px}.block-editor-hooks__layout-controls{display:flex;margin-bottom:16px}.block-editor-hooks__layout-controls .block-editor-hooks__layout-controls-unit{display:flex;margin-left:24px}.block-editor-hooks__layout-controls .block-editor-hooks__layout-controls-unit svg{margin:auto 8px 4px 0}.block-editor-hooks__layout-controls-reset{display:flex;justify-content:flex-end;margin-bottom:24px}.block-editor-hooks__layout-controls-helptext{font-size:12px}.block-editor-hooks__flex-layout-justification-controls,.block-editor-hooks__flex-layout-orientation-controls{margin-bottom:12px}.block-editor-hooks__flex-layout-justification-controls legend,.block-editor-hooks__flex-layout-orientation-controls legend{margin-bottom:8px}.block-editor-hooks__border-controls .block-editor-hooks__border-controls-row{display:flex;justify-content:space-between}.block-editor-hooks__border-controls .block-editor-hooks__border-controls-row>*{width:calc(50% - 8px)}.block-editor-hooks__border-controls .components-unit-control-wrapper{margin-bottom:24px}.block-editor-hooks__border-controls .components-unit-control-wrapper:last-child{margin-bottom:8px}.typography-block-support-panel .block-editor-text-decoration-control__buttons,.typography-block-support-panel .block-editor-text-transform-control__buttons,.typography-block-support-panel .components-font-appearance-control,.typography-block-support-panel .components-font-size-picker__controls{margin-bottom:0}.typography-block-support-panel .block-editor-line-height-control input{max-width:100%}.typography-block-support-panel .single-column{grid-column:span 1}.block-editor-block-toolbar{display:flex;flex-grow:1;overflow-x:auto;overflow-y:hidden;position:relative;transition:border-color .1s linear,box-shadow .1s linear;width:100%}@media (prefers-reduced-motion:reduce){.block-editor-block-toolbar{transition-delay:0s;transition-duration:0s}}@media (min-width:600px){.block-editor-block-toolbar{overflow:inherit}}.block-editor-block-toolbar .components-toolbar,.block-editor-block-toolbar .components-toolbar-group{background:none;border:0;border-left:1px solid #ddd;line-height:0;margin-bottom:-1px;margin-top:-1px}.block-editor-block-toolbar>:last-child,.block-editor-block-toolbar>:last-child .components-toolbar,.block-editor-block-toolbar>:last-child .components-toolbar-group{border-left:none}.block-editor-block-contextual-toolbar.has-parent:not(.is-fixed){margin-right:56px}.show-icon-labels .block-editor-block-contextual-toolbar.has-parent:not(.is-fixed){margin-right:0}.block-editor-block-parent-selector{position:absolute;right:-57px;top:-1px}.show-icon-labels .block-editor-block-parent-selector{margin-bottom:-1px;margin-right:-1px;margin-top:-1px;position:relative;right:auto;top:auto}.block-editor-block-toolbar__block-controls{height:auto!important;margin-right:-1px;padding:0!important}.block-editor-block-toolbar__block-controls .block-editor-block-switcher .components-dropdown-menu__toggle .block-editor-block-icon,.block-editor-block-toolbar__block-controls .block-editor-block-switcher__no-switcher-icon .block-editor-block-icon{margin:0!important;width:24px!important}.block-editor-block-toolbar__block-controls .block-editor-block-mover{margin-right:-6px}.block-editor-block-toolbar .components-toolbar,.block-editor-block-toolbar .components-toolbar-group,.block-editor-rich-text__inline-format-toolbar-group .components-toolbar,.block-editor-rich-text__inline-format-toolbar-group .components-toolbar-group{display:flex;flex-wrap:nowrap}.block-editor-block-toolbar__slot{display:inline-block;line-height:0}@supports (position:sticky){.block-editor-block-toolbar__slot{display:inline-flex}}.show-icon-labels .block-editor-block-toolbar .components-button.has-icon{width:auto}.show-icon-labels .block-editor-block-toolbar .components-button.has-icon svg{display:none}.show-icon-labels .block-editor-block-toolbar .components-button.has-icon:after{content:attr(aria-label);font-size:12px}.show-icon-labels .components-accessible-toolbar .components-toolbar-group>div:first-child:last-child>.components-button.has-icon{padding-left:6px;padding-right:6px}.show-icon-labels .block-editor-block-switcher{border-left:1px solid #1e1e1e}.show-icon-labels .block-editor-block-switcher .components-dropdown-menu__toggle{margin-right:0}.show-icon-labels .block-editor-block-switcher .components-dropdown-menu__toggle .block-editor-block-icon,.show-icon-labels .block-editor-block-switcher__no-switcher-icon .block-editor-block-icon{height:0!important;width:0!important}.show-icon-labels .block-editor-block-parent-selector__button .block-editor-block-icon{width:0}.show-icon-labels .block-editor-block-toolbar__block-controls .block-editor-block-mover{margin-right:0;white-space:nowrap}.show-icon-labels .block-editor-block-mover-button{padding-left:8px!important;padding-right:8px!important}.show-icon-labels .block-editor-block-mover__drag-handle.has-icon{border-left:1px solid #1e1e1e;padding-left:6px!important;padding-right:6px!important}@media (min-width:600px){.show-icon-labels .is-up-button.is-up-button.is-up-button{border-bottom:1px solid #1e1e1e;border-radius:0;margin-left:0}}.show-icon-labels .block-editor-block-contextual-toolbar .block-editor-block-mover.is-horizontal .block-editor-block-mover-button.block-editor-block-mover-button{width:auto}.show-icon-labels .components-toolbar,.show-icon-labels .components-toolbar-group{flex-shrink:1}.show-icon-labels .block-editor-rich-text__inline-format-toolbar-group .components-button+.components-button{margin-right:6px}.block-editor-inserter{background:none;border:none;display:inline-block;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;line-height:0;padding:0}@media (min-width:782px){.block-editor-inserter{position:relative}}.block-editor-inserter__content{position:relative}.block-editor-inserter__popover.is-quick .components-popover__content{border:none}.block-editor-inserter__popover.is-quick .components-popover__content .block-editor-inserter__quick-inserter>*{border-left:1px solid #ccc;border-right:1px solid #ccc}.block-editor-inserter__popover.is-quick .components-popover__content .block-editor-inserter__quick-inserter>:first-child{border-top:1px solid #ccc}.block-editor-inserter__popover.is-quick .components-popover__content .block-editor-inserter__quick-inserter>:last-child{border-bottom:1px solid #ccc}.block-editor-inserter__popover.is-quick .components-popover__content .block-editor-inserter__quick-inserter>.components-button{border:1px solid #1e1e1e}.block-editor-inserter__popover .block-editor-inserter__menu{margin:-12px}.block-editor-inserter__popover .block-editor-inserter__menu .block-editor-inserter__tabs .components-tab-panel__tabs{top:60px}.block-editor-inserter__popover .block-editor-inserter__menu .block-editor-inserter__main-area{height:auto;overflow:visible}.block-editor-inserter__popover .block-editor-inserter__menu .block-editor-inserter__preview-container{display:none}.block-editor-inserter__toggle.components-button{align-items:center;border:none;cursor:pointer;display:inline-flex;outline:none;padding:0;transition:color .2s ease}@media (prefers-reduced-motion:reduce){.block-editor-inserter__toggle.components-button{transition-delay:0s;transition-duration:0s}}.block-editor-inserter__menu{height:100%;overflow:visible;position:relative}.block-editor-inserter__main-area{height:100%;overflow-y:auto;width:auto}@media (min-width:782px){.block-editor-inserter__main-area{width:350px}}.block-editor-inserter__inline-elements{margin-top:-1px}.block-editor-inserter__menu.is-bottom:after{border-bottom-color:#fff}.components-popover.block-editor-inserter__popover{z-index:99999}.block-editor-inserter__search{background:#fff;padding:16px 16px 0;position:sticky;top:0;z-index:1}.block-editor-inserter__search .components-search-control__icon{left:20px}.block-editor-inserter__search .components-base-control__field{margin-bottom:0}.block-editor-inserter__tabs{display:flex;flex-direction:column}.block-editor-inserter__tabs .components-tab-panel__tabs{background:#fff;border-bottom:1px solid #ddd;position:sticky;top:64px;z-index:1}.block-editor-inserter__tabs .components-tab-panel__tabs .components-tab-panel__tabs-item{flex-grow:1;margin-bottom:-1px}.block-editor-inserter__tabs .components-tab-panel__tab-content{display:flex;flex-direction:column;flex-grow:1;position:relative;z-index:0}.block-editor-inserter__panel-header{align-items:center;display:inline-flex;padding:16px 16px 0}.block-editor-inserter__panel-header-patterns{padding:16px 16px 0}.block-editor-inserter__panel-content{padding:16px}.block-editor-inserter__panel-title,.block-editor-inserter__panel-title button{color:#757575;font-size:11px;font-weight:500;margin:0 0 0 12px;text-transform:uppercase}.block-editor-inserter__panel-dropdown select.components-select-control__input.components-select-control__input.components-select-control__input{height:36px;line-height:36px}.block-editor-inserter__panel-dropdown select{border:none}.block-editor-inserter__block-list{flex-grow:1;position:relative}.block-editor-inserter__reusable-blocks-panel{position:relative;text-align:left}.block-editor-inserter__manage-reusable-blocks{display:inline-block;margin:16px}.block-editor-inserter__no-results{padding:32px;text-align:center}.block-editor-inserter__no-results-icon{fill:#949494}.block-editor-inserter__child-blocks{padding:0 16px}.block-editor-inserter__parent-block-header{align-items:center;display:flex}.block-editor-inserter__parent-block-header h2{font-size:13px}.block-editor-inserter__parent-block-header .block-editor-block-icon{margin-left:8px}.block-editor-inserter__preview-container{background:#fff;border:1px solid #ddd;border-radius:2px;display:none;max-height:calc(100% - 32px);overflow-y:hidden;position:absolute;right:calc(100% + 16px);top:16px;width:300px}@media (min-width:782px){.block-editor-inserter__preview-container{display:block}}.block-editor-inserter__preview-container .block-editor-block-card{padding:16px}.block-editor-inserter__preview-container .block-editor-block-card__title{font-size:13px}.block-editor-inserter__preview-content{align-items:center;background:#f0f0f0;display:grid;flex-grow:1;min-height:144px}.block-editor-inserter__preview-content-missing{align-items:center;background:#f0f0f0;color:#757575;display:flex;flex:1;justify-content:center;min-height:144px}.block-editor-inserter__tips{border-top:1px solid #ddd;flex-shrink:0;padding:16px;position:relative}.block-editor-inserter__manage-reusable-blocks-container{padding:16px}.block-editor-inserter__quick-inserter{max-width:100%;width:100%}@media (min-width:782px){.block-editor-inserter__quick-inserter{width:350px}}.block-editor-inserter__quick-inserter-results .block-editor-inserter__panel-header{float:right;height:0;padding:0}.block-editor-inserter__quick-inserter.has-expand .block-editor-inserter__panel-content,.block-editor-inserter__quick-inserter.has-search .block-editor-inserter__panel-content{padding:16px}.block-editor-inserter__quick-inserter-patterns .block-editor-block-patterns-list{grid-gap:8px;display:grid;grid-template-columns:1fr 1fr}.block-editor-inserter__quick-inserter-patterns .block-editor-block-patterns-list .block-editor-block-patterns-list__list-item{margin-bottom:0}.block-editor-inserter__quick-inserter-patterns .block-editor-block-patterns-list .block-editor-block-preview__container{min-height:100px}.block-editor-inserter__quick-inserter-separator{border-top:1px solid #ddd}.block-editor-inserter__popover.is-quick>.components-popover__content>div{padding:0}.block-editor-inserter__quick-inserter-expand.components-button{background:#1e1e1e;border-radius:0;color:#fff;display:block;height:44px;width:100%}.block-editor-inserter__quick-inserter-expand.components-button:hover{color:#fff}.block-editor-inserter__quick-inserter-expand.components-button:active{color:#ccc}.block-editor-inserter__quick-inserter-expand.components-button.components-button:focus:not(:disabled){background:var(--wp-admin-theme-color);border-color:var(--wp-admin-theme-color);box-shadow:none}.block-editor-block-patterns-explorer__sidebar{bottom:0;overflow-x:visible;overflow-y:scroll;padding:24px 32px 32px;position:absolute;right:0;top:60px;width:280px}.block-editor-block-patterns-explorer__sidebar__categories-list__item{display:block;height:48px;text-align:right;width:100%}.block-editor-block-patterns-explorer__search{margin-bottom:32px}.block-editor-block-patterns-explorer__search-results-count{padding-bottom:32px}.block-editor-block-patterns-explorer__list{margin-right:248px}.block-editor-block-patterns-explorer .block-editor-block-patterns-list{grid-gap:32px;display:grid;grid-template-columns:repeat(1,1fr)}@media (min-width:1080px){.block-editor-block-patterns-explorer .block-editor-block-patterns-list{grid-template-columns:repeat(2,1fr)}}@media (min-width:1440px){.block-editor-block-patterns-explorer .block-editor-block-patterns-list{grid-template-columns:repeat(3,1fr)}}.block-editor-block-patterns-explorer .block-editor-block-patterns-list .block-editor-block-patterns-list__list-item{min-height:240px}.block-editor-block-patterns-explorer .block-editor-block-patterns-list .block-editor-block-preview__container{height:inherit;max-height:800px;min-height:100px}.block-editor-post-preview__dropdown{padding:0}.block-editor-post-preview__button-resize.block-editor-post-preview__button-resize{padding-right:40px}.block-editor-post-preview__button-resize.block-editor-post-preview__button-resize.has-icon{padding-right:8px}.block-editor-post-preview__dropdown-content .components-popover__content{overflow-y:visible}.block-editor-post-preview__dropdown-content.edit-post-post-preview-dropdown .components-menu-group:first-child{padding-bottom:8px}.block-editor-post-preview__dropdown-content.edit-post-post-preview-dropdown .components-menu-group:last-child{margin-bottom:0}.block-editor-post-preview__dropdown-content .components-menu-group+.components-menu-group{padding:8px}@media (min-width:600px){.edit-post-header__settings .editor-post-preview,.edit-site-header__actions .editor-post-preview{display:none}.edit-post-header.has-reduced-ui .edit-post-header__settings .block-editor-post-preview__button-toggle,.edit-post-header.has-reduced-ui .edit-post-header__settings .editor-post-save-draft,.edit-post-header.has-reduced-ui .edit-post-header__settings .editor-post-saved-state{transition:opacity .1s linear}}@media (min-width:600px) and (prefers-reduced-motion:reduce){.edit-post-header.has-reduced-ui .edit-post-header__settings .block-editor-post-preview__button-toggle,.edit-post-header.has-reduced-ui .edit-post-header__settings .editor-post-save-draft,.edit-post-header.has-reduced-ui .edit-post-header__settings .editor-post-saved-state{transition-delay:0s;transition-duration:0s}}@media (min-width:600px){.edit-post-header.has-reduced-ui:not(:hover) .edit-post-header__settings .block-editor-post-preview__button-toggle,.edit-post-header.has-reduced-ui:not(:hover) .edit-post-header__settings .editor-post-save-draft,.edit-post-header.has-reduced-ui:not(:hover) .edit-post-header__settings .editor-post-saved-state{opacity:0}.edit-post-header.has-reduced-ui:not(:hover) .edit-post-header__settings .block-editor-post-preview__button-toggle.is-opened{opacity:1}}body.admin-color-light{--wp-admin-theme-color:#0085ba;--wp-admin-theme-color--rgb:0,133,186;--wp-admin-theme-color-darker-10:#0073a1;--wp-admin-theme-color-darker-10--rgb:0,115,161;--wp-admin-theme-color-darker-20:#006187;--wp-admin-theme-color-darker-20--rgb:0,97,135;--wp-admin-border-width-focus:2px}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){body.admin-color-light{--wp-admin-border-width-focus:1.5px}}body.admin-color-modern{--wp-admin-theme-color:#3858e9;--wp-admin-theme-color--rgb:56,88,233;--wp-admin-theme-color-darker-10:#2145e6;--wp-admin-theme-color-darker-10--rgb:33,69,230;--wp-admin-theme-color-darker-20:#183ad6;--wp-admin-theme-color-darker-20--rgb:24,58,214;--wp-admin-border-width-focus:2px}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){body.admin-color-modern{--wp-admin-border-width-focus:1.5px}}body.admin-color-blue{--wp-admin-theme-color:#096484;--wp-admin-theme-color--rgb:9,100,132;--wp-admin-theme-color-darker-10:#07526c;--wp-admin-theme-color-darker-10--rgb:7,82,108;--wp-admin-theme-color-darker-20:#064054;--wp-admin-theme-color-darker-20--rgb:6,64,84;--wp-admin-border-width-focus:2px}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){body.admin-color-blue{--wp-admin-border-width-focus:1.5px}}body.admin-color-coffee{--wp-admin-theme-color:#46403c;--wp-admin-theme-color--rgb:70,64,60;--wp-admin-theme-color-darker-10:#383330;--wp-admin-theme-color-darker-10--rgb:56,51,48;--wp-admin-theme-color-darker-20:#2b2724;--wp-admin-theme-color-darker-20--rgb:43,39,36;--wp-admin-border-width-focus:2px}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){body.admin-color-coffee{--wp-admin-border-width-focus:1.5px}}body.admin-color-ectoplasm{--wp-admin-theme-color:#523f6d;--wp-admin-theme-color--rgb:82,63,109;--wp-admin-theme-color-darker-10:#46365d;--wp-admin-theme-color-darker-10--rgb:70,54,93;--wp-admin-theme-color-darker-20:#3a2c4d;--wp-admin-theme-color-darker-20--rgb:58,44,77;--wp-admin-border-width-focus:2px}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){body.admin-color-ectoplasm{--wp-admin-border-width-focus:1.5px}}body.admin-color-midnight{--wp-admin-theme-color:#e14d43;--wp-admin-theme-color--rgb:225,77,67;--wp-admin-theme-color-darker-10:#dd382d;--wp-admin-theme-color-darker-10--rgb:221,56,45;--wp-admin-theme-color-darker-20:#d02c21;--wp-admin-theme-color-darker-20--rgb:208,44,33;--wp-admin-border-width-focus:2px}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){body.admin-color-midnight{--wp-admin-border-width-focus:1.5px}}body.admin-color-ocean{--wp-admin-theme-color:#627c83;--wp-admin-theme-color--rgb:98,124,131;--wp-admin-theme-color-darker-10:#576e74;--wp-admin-theme-color-darker-10--rgb:87,110,116;--wp-admin-theme-color-darker-20:#4c6066;--wp-admin-theme-color-darker-20--rgb:76,96,102;--wp-admin-border-width-focus:2px}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){body.admin-color-ocean{--wp-admin-border-width-focus:1.5px}}body.admin-color-sunrise{--wp-admin-theme-color:#dd823b;--wp-admin-theme-color--rgb:221,130,59;--wp-admin-theme-color-darker-10:#d97426;--wp-admin-theme-color-darker-10--rgb:217,116,38;--wp-admin-theme-color-darker-20:#c36922;--wp-admin-theme-color-darker-20--rgb:195,105,34;--wp-admin-border-width-focus:2px}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){body.admin-color-sunrise{--wp-admin-border-width-focus:1.5px}}
1
+ :root{--wp-admin-theme-color:#007cba;--wp-admin-theme-color--rgb:0,124,186;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-10--rgb:0,107,161;--wp-admin-theme-color-darker-20:#005a87;--wp-admin-theme-color-darker-20--rgb:0,90,135;--wp-admin-border-width-focus:2px}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){:root{--wp-admin-border-width-focus:1.5px}}.block-editor-autocompleters__block{white-space:nowrap}.block-editor-autocompleters__block .block-editor-block-icon{margin-left:8px}.block-editor-block-alignment-control__menu-group .components-menu-item__info{margin-top:0}.block-editor-block-alignment-matrix-control__popover .components-popover__content{min-width:0;width:auto}.block-editor-block-alignment-matrix-control__popover .components-popover__content>div{padding:8px}.block-editor-block-icon{align-items:center;display:flex;height:24px;justify-content:center;width:24px}.block-editor-block-icon.has-colors svg{fill:currentColor}@media (forced-colors:active){.block-editor-block-icon.has-colors svg{fill:CanvasText}}.block-editor-block-icon svg{max-height:24px;max-width:24px;min-height:20px;min-width:20px}.block-editor-block-inspector p{margin-top:0}.block-editor-block-inspector h2,.block-editor-block-inspector h3{color:#1e1e1e;font-size:13px;margin-bottom:1.5em}.block-editor-block-inspector .components-base-control{margin-bottom:24px}.block-editor-block-inspector .components-base-control:last-child{margin-bottom:8px}.block-editor-block-inspector .components-panel__body{border:none;border-top:1px solid #e0e0e0}.block-editor-block-inspector .block-editor-block-card{padding:16px}.block-editor-block-inspector__no-blocks{background:#fff;display:block;font-size:13px;padding:32px 16px;text-align:center}.block-editor-block-styles .block-editor-block-list__block{margin:0}.block-editor-block-list__layout{position:relative}.block-editor-block-list__layout.is-navigate-mode{cursor:default}.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted:after,.block-editor-block-list__layout .block-editor-block-list__block.is-multi-selected:after,.block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-hovered:after,.block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-selected:after{border-radius:1px;bottom:1px;box-shadow:0 0 0 1px var(--wp-admin-theme-color);content:"";left:1px;outline:2px solid transparent;pointer-events:none;position:absolute;right:1px;top:1px;z-index:1}.is-dark-theme .block-editor-block-list__layout .block-editor-block-list__block.is-highlighted:after,.is-dark-theme .block-editor-block-list__layout .block-editor-block-list__block.is-multi-selected:after,.is-dark-theme .block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-hovered:after,.is-dark-theme .block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-selected:after{box-shadow:0 0 0 1px #fff}.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted .components-placeholder ::selection,.block-editor-block-list__layout .block-editor-block-list__block.is-multi-selected .components-placeholder ::selection,.block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-hovered .components-placeholder ::selection,.block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-selected .components-placeholder ::selection{background:transparent}.block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-hovered:not(.is-selected):after{box-shadow:0 0 0 1px var(--wp-admin-theme-color)}.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted:after{box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:1px solid transparent}.block-editor-block-list__layout .block-editor-block-list__block.is-multi-selected:after,.block-editor-block-list__layout .is-block-moving-mode.block-editor-block-list__block.has-child-selected,.block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-selected:after{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:2px solid transparent}.block-editor-block-list__layout .is-block-moving-mode.block-editor-block-list__block.is-selected:before{border-radius:2px;border-top:4px solid #ccc;content:"";left:0;pointer-events:none;position:absolute;right:0;top:-14px;transition:border-color .1s linear,border-style .1s linear,box-shadow .1s linear;z-index:0}.block-editor-block-list__layout .is-block-moving-mode.block-editor-block-list__block.is-selected:after{content:none}.block-editor-block-list__layout .is-block-moving-mode.can-insert-moving-block.block-editor-block-list__block.is-selected:before{border-color:var(--wp-admin-theme-color)}.is-block-moving-mode.block-editor-block-list__block-selection-button{font-size:1px;height:1px;opacity:0;padding:0}.block-editor-block-list__layout .block-editor-block-list__block{overflow-wrap:break-word;position:relative}.block-editor-block-list__layout .block-editor-block-list__block .reusable-block-edit-panel *{z-index:1}.block-editor-block-list__layout .block-editor-block-list__block .components-placeholder .components-with-notices-ui{margin:-10px 0 12px}.block-editor-block-list__layout .block-editor-block-list__block .components-with-notices-ui{margin:0 0 12px;width:100%}.block-editor-block-list__layout .block-editor-block-list__block .components-with-notices-ui .components-notice{margin-left:0;margin-right:0}.block-editor-block-list__layout .block-editor-block-list__block .components-with-notices-ui .components-notice .components-notice__content{font-size:13px}.block-editor-block-list__layout .block-editor-block-list__block:not([contenteditable]):focus{outline:none}.block-editor-block-list__layout .block-editor-block-list__block:not([contenteditable]):focus:after{border-radius:1px;bottom:1px;box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);content:"";left:1px;outline:2px solid transparent;pointer-events:none;position:absolute;right:1px;top:1px;z-index:1}.is-dark-theme .block-editor-block-list__layout .block-editor-block-list__block:not([contenteditable]):focus:after{box-shadow:0 0 0 var(--wp-admin-border-width-focus) #fff}.block-editor-block-list__layout .block-editor-block-list__block:after{border-radius:2px;bottom:0;box-shadow:0 0 0 var(--wp-admin-border-width-focus) transparent;content:"";left:0;pointer-events:none;position:absolute;right:0;top:0}.block-editor-block-list__layout .block-editor-block-list__block.has-warning{min-height:48px}.block-editor-block-list__layout .block-editor-block-list__block.has-warning>*{pointer-events:none;-webkit-user-select:none;user-select:none}.block-editor-block-list__layout .block-editor-block-list__block.has-warning .block-editor-warning{pointer-events:all}.block-editor-block-list__layout .block-editor-block-list__block.has-warning:after{background-color:hsla(0,0%,100%,.4);border-radius:2px;bottom:0;content:"";left:0;position:absolute;right:0;top:0}.block-editor-block-list__layout .block-editor-block-list__block.has-warning.is-multi-selected:after{background-color:transparent}.block-editor-block-list__layout .block-editor-block-list__block.is-reusable>.block-editor-inner-blocks>.block-editor-block-list__layout.has-overlay:after{display:none}.block-editor-block-list__layout .block-editor-block-list__block.is-reusable>.block-editor-inner-blocks>.block-editor-block-list__layout.has-overlay .block-editor-block-list__layout.has-overlay:after{display:block}.block-editor-block-list__layout .block-editor-block-list__block.is-reusable.has-child-selected:after{box-shadow:0 0 0 1px var(--wp-admin-theme-color)}.block-editor-block-list__layout .block-editor-block-list__block[data-clear=true]{float:none}.is-outline-mode .block-editor-block-list__block:not(.remove-outline).is-hovered{cursor:default}.is-outline-mode .block-editor-block-list__block:not(.remove-outline).is-hovered:after{border-radius:1px;bottom:1px;box-shadow:0 0 0 1px var(--wp-admin-theme-color);left:1px;right:1px;top:1px}.is-outline-mode .block-editor-block-list__block:not(.remove-outline).is-selected{cursor:unset}.is-outline-mode .block-editor-block-list__block:not(.remove-outline).is-selected:after{border-radius:1px;bottom:1px;box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);left:1px;right:1px;top:1px}.is-outline-mode .block-editor-block-list__block:not(.remove-outline).is-selected:focus:after{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.is-focus-mode .block-editor-block-list__block:not(.has-child-selected){opacity:.5;transition:opacity .1s linear}@media (prefers-reduced-motion:reduce){.is-focus-mode .block-editor-block-list__block:not(.has-child-selected){transition-delay:0s;transition-duration:0s}}.is-focus-mode .block-editor-block-list__block:not(.has-child-selected) .block-editor-block-list__block,.is-focus-mode .block-editor-block-list__block:not(.has-child-selected).is-multi-selected,.is-focus-mode .block-editor-block-list__block:not(.has-child-selected).is-selected{opacity:1}.is-root-container:not(.is-focus-mode) .block-editor-block-list__block.has-active-entity{opacity:.5;transition:opacity .1s linear}@media (prefers-reduced-motion:reduce){.is-root-container:not(.is-focus-mode) .block-editor-block-list__block.has-active-entity{transition-delay:0s;transition-duration:0s}}.is-root-container:not(.is-focus-mode) .block-editor-block-list__block.has-active-entity.has-child-selected,.is-root-container:not(.is-focus-mode) .block-editor-block-list__block.has-active-entity.is-active-entity,.is-root-container:not(.is-focus-mode) .block-editor-block-list__block.has-active-entity.is-active-entity .block-editor-block-list__block,.is-root-container:not(.is-focus-mode) .block-editor-block-list__block.has-active-entity .is-active-entity .block-editor-block-list__block,.is-root-container:not(.is-focus-mode) .block-editor-block-list__block.has-active-entity:not(.has-child-selected) .block-editor-block-list__block{opacity:1}.wp-block[data-align=left]>*,.wp-block[data-align=right]>*{z-index:21}.wp-site-blocks>[data-align=left]{float:right;margin-left:2em}.wp-site-blocks>[data-align=right]{float:left;margin-right:2em}.wp-site-blocks>[data-align=center]{justify-content:center;margin-left:auto;margin-right:auto}.block-editor-block-list .block-editor-inserter{cursor:move;cursor:grab;margin:8px}@keyframes block-editor-inserter__toggle__fade-in-animation{0%{opacity:0}to{opacity:1}}.wp-block .block-list-appender .block-editor-inserter__toggle{animation:block-editor-inserter__toggle__fade-in-animation .1s ease;animation-fill-mode:forwards}@media (prefers-reduced-motion:reduce){.wp-block .block-list-appender .block-editor-inserter__toggle{animation-delay:0s;animation-duration:1ms}}.block-editor-block-list__block:not(.is-selected):not(.has-child-selected) .block-editor-default-block-appender{display:none}.block-editor-block-list__block:not(.is-selected):not(.has-child-selected) .block-editor-default-block-appender .block-editor-inserter__toggle{opacity:0;transform:scale(0)}.block-editor-block-list__block .block-editor-block-list__block-html-textarea{border:none;border-radius:2px;box-shadow:inset 0 0 0 1px #1e1e1e;display:block;font-family:Menlo,Consolas,monaco,monospace;font-size:15px;line-height:1.5;margin:0;outline:none;overflow:hidden;padding:12px;resize:none;transition:padding .2s linear;width:100%}@media (prefers-reduced-motion:reduce){.block-editor-block-list__block .block-editor-block-list__block-html-textarea{transition-delay:0s;transition-duration:0s}}.block-editor-block-list__block .block-editor-block-list__block-html-textarea:focus{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.block-editor-block-list__block .block-editor-warning{position:relative;z-index:5}.block-editor-block-list__block .block-editor-warning.block-editor-block-list__block-crash-warning{margin-bottom:auto}.block-editor-block-list__insertion-point{position:absolute}.block-editor-block-list__insertion-point-indicator{background:var(--wp-admin-theme-color);position:absolute}.block-editor-block-list__insertion-point.is-vertical>.block-editor-block-list__insertion-point-indicator{height:1px;top:50%}.block-editor-block-list__insertion-point.is-horizontal>.block-editor-block-list__insertion-point-indicator{left:0;right:50%;top:0;width:1px}.block-editor-block-list__insertion-point-inserter{display:none;justify-content:center;position:absolute;right:calc(50% - 12px);top:calc(50% - 12px)}@media (min-width:480px){.block-editor-block-list__insertion-point-inserter{display:flex}}.block-editor-block-list__block-popover-inserter{margin-bottom:14px;position:absolute;top:-9999em}.block-editor-block-list__block-popover-inserter.is-visible{position:static}.block-editor-block-list__block-popover-inserter .block-editor-inserter__toggle.components-button.has-icon,.block-editor-block-list__empty-block-inserter .block-editor-inserter__toggle.components-button.has-icon,.block-editor-block-list__insertion-point-inserter .block-editor-inserter__toggle.components-button.has-icon,.block-editor-default-block-appender .block-editor-inserter__toggle.components-button.has-icon{background:#1e1e1e;border-radius:2px;color:#fff;height:24px;min-width:24px;padding:0}.block-editor-block-list__block-popover-inserter .block-editor-inserter__toggle.components-button.has-icon:hover,.block-editor-block-list__empty-block-inserter .block-editor-inserter__toggle.components-button.has-icon:hover,.block-editor-block-list__insertion-point-inserter .block-editor-inserter__toggle.components-button.has-icon:hover,.block-editor-default-block-appender .block-editor-inserter__toggle.components-button.has-icon:hover{background:var(--wp-admin-theme-color);color:#fff}.block-editor-block-list__insertion-point-inserter .block-editor-inserter__toggle.components-button.has-icon{background:var(--wp-admin-theme-color)}.block-editor-block-list__insertion-point-inserter .block-editor-inserter__toggle.components-button.has-icon:hover{background:#1e1e1e}.block-editor-block-contextual-toolbar{background-color:#fff;border:1px solid #1e1e1e;border-radius:2px;display:inline-flex}.block-editor-block-contextual-toolbar .block-editor-block-toolbar .components-toolbar,.block-editor-block-contextual-toolbar .block-editor-block-toolbar .components-toolbar-group{border-left-color:#1e1e1e}.block-editor-block-contextual-toolbar.is-fixed{border:none;border-bottom:1px solid #e0e0e0;border-radius:0;display:block;min-height:48px;position:sticky;top:0;width:100%;z-index:31}.block-editor-block-contextual-toolbar.is-fixed .block-editor-block-toolbar .components-toolbar,.block-editor-block-contextual-toolbar.is-fixed .block-editor-block-toolbar .components-toolbar-group{border-left-color:#e0e0e0}.block-editor-block-contextual-toolbar .block-editor-block-mover-button{overflow:hidden}.block-editor-block-contextual-toolbar .block-editor-block-mover.is-horizontal .block-editor-block-mover-button.block-editor-block-mover-button{min-width:24px;width:24px}.block-editor-block-contextual-toolbar .block-editor-block-mover.is-horizontal .block-editor-block-mover-button.block-editor-block-mover-button svg{min-width:24px}.block-editor-block-contextual-toolbar .block-editor-block-mover:not(.is-horizontal) .block-editor-block-mover-button:focus:before{min-width:0;right:0!important;width:100%}@media (min-width:600px){.block-editor-block-contextual-toolbar .block-editor-block-mover:not(.is-horizontal) .block-editor-block-mover-button.is-up-button svg{top:5px}.block-editor-block-contextual-toolbar .block-editor-block-mover:not(.is-horizontal) .block-editor-block-mover-button.is-down-button svg{bottom:5px}}.block-editor-block-list__block-selection-button{background-color:#1e1e1e;border-radius:2px;display:inline-flex;font-size:13px;height:48px;padding:0 12px;z-index:22}.block-editor-block-list__block-selection-button .block-editor-block-list__block-selection-button__content{align-items:center;display:inline-flex;margin:auto}.block-editor-block-list__block-selection-button .block-editor-block-list__block-selection-button__content>.components-flex__item{margin-left:6px}.block-editor-block-list__block-selection-button .components-button.has-icon.block-selection-button_drag-handle{cursor:grab;height:24px;margin-right:-2px;min-width:24px;padding:0}.block-editor-block-list__block-selection-button .components-button.has-icon.block-selection-button_drag-handle svg{min-height:18px;min-width:18px}.block-editor-block-list__block-selection-button .block-editor-block-icon{color:#fff;font-size:13px;height:48px}.block-editor-block-list__block-selection-button .components-button{color:#fff;display:flex;height:48px;min-width:36px}.block-editor-block-list__block-selection-button .components-button:focus{border:none;box-shadow:none}.block-editor-block-list__block-selection-button .components-button:active{color:#fff}.block-editor-block-list__block-selection-button .block-selection-button_select-button.components-button{padding:0}.block-editor-block-list__insertion-point-popover.is-without-arrow{pointer-events:none;position:absolute;z-index:28}.block-editor-block-list__insertion-point-popover.is-without-arrow *{pointer-events:none}.block-editor-block-list__insertion-point-popover.is-without-arrow .is-with-inserter,.block-editor-block-list__insertion-point-popover.is-without-arrow .is-with-inserter *{pointer-events:all}.block-editor-block-list__insertion-point-popover.is-without-arrow .components-popover__content.components-popover__content{background:none;border:none;box-shadow:none;margin-right:0;overflow-y:visible}@keyframes hide-during-dragging{to{position:fixed;transform:translate(-9999px,9999px)}}.components-popover.block-editor-block-list__block-popover{position:absolute;z-index:31}.components-popover.block-editor-block-list__block-popover .components-popover__content{background:none;border:none;box-shadow:none;margin:0!important;min-width:auto;overflow-y:visible;pointer-events:none;width:max-content}.components-popover.block-editor-block-list__block-popover .components-popover__content .block-editor-block-contextual-toolbar,.components-popover.block-editor-block-list__block-popover .components-popover__content .block-editor-block-list__block-selection-button,.components-popover.block-editor-block-list__block-popover .components-popover__content .block-editor-block-list__empty-block-inserter{pointer-events:all}.components-popover.block-editor-block-list__block-popover .components-popover__content .block-editor-block-contextual-toolbar,.components-popover.block-editor-block-list__block-popover .components-popover__content .block-editor-block-list__block-selection-button{margin-bottom:12px;margin-top:12px}.components-popover.block-editor-block-list__block-popover.is-insertion-point-visible{visibility:hidden}.is-dragging-components-draggable .components-popover.block-editor-block-list__block-popover{animation:hide-during-dragging 1ms linear forwards;opacity:0}.is-dragging-components-draggable .components-tooltip{display:none}.is-vertical .block-list-appender{margin-left:auto;margin-right:12px;margin-top:12px;width:24px}.block-list-appender>.block-editor-inserter{display:block}.block-editor-block-list__block:not(.is-selected):not(.has-child-selected):not(.block-editor-block-list__layout) .block-editor-block-list__layout>.block-list-appender .block-list-appender__toggle{opacity:0;transform:scale(0)}.block-editor-block-breadcrumb{list-style:none;margin:0;padding:0}.block-editor-block-breadcrumb li{display:inline-flex;margin:0}.block-editor-block-breadcrumb li .block-editor-block-breadcrumb__separator{fill:currentColor;margin-left:-4px;margin-right:-4px;transform:scaleX(-1)}.block-editor-block-breadcrumb li:last-child .block-editor-block-breadcrumb__separator{display:none}.block-editor-block-breadcrumb__button.components-button{height:24px;line-height:24px;padding:0;position:relative}.block-editor-block-breadcrumb__button.components-button:hover:not(:disabled){box-shadow:none;text-decoration:underline}.block-editor-block-breadcrumb__button.components-button:focus{box-shadow:none}.block-editor-block-breadcrumb__button.components-button:focus:before{border-radius:2px;bottom:1px;box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);content:"";display:block;left:1px;position:absolute;right:1px;top:1px}.block-editor-block-breadcrumb__current{cursor:default}.block-editor-block-breadcrumb__button.components-button,.block-editor-block-breadcrumb__current{color:#1e1e1e;font-size:inherit;padding:0 8px}.block-editor-block-card{align-items:flex-start;display:flex}.block-editor-block-card__content{flex-grow:1;margin-bottom:4px}.block-editor-block-card__title{font-weight:500}.block-editor-block-card__title.block-editor-block-card__title{line-height:24px;margin:0 0 4px}.block-editor-block-card__description{font-size:13px}.block-editor-block-card .block-editor-block-icon{flex:0 0 24px;height:24px;margin-left:12px;margin-right:0;width:24px}.block-editor-block-compare{height:auto}.block-editor-block-compare__wrapper{display:flex;padding-bottom:16px}.block-editor-block-compare__wrapper>div{display:flex;flex-direction:column;justify-content:space-between;max-width:600px;min-width:200px;padding:0 0 0 16px;width:50%}.block-editor-block-compare__wrapper>div button{float:left}.block-editor-block-compare__wrapper .block-editor-block-compare__converted{border-right:1px solid #ddd;padding-left:0;padding-right:15px}.block-editor-block-compare__wrapper .block-editor-block-compare__html{border-bottom:1px solid #ddd;color:#1e1e1e;font-family:Menlo,Consolas,monaco,monospace;font-size:12px;line-height:1.7;padding-bottom:15px}.block-editor-block-compare__wrapper .block-editor-block-compare__html span{background-color:#e6ffed;padding-bottom:3px;padding-top:3px}.block-editor-block-compare__wrapper .block-editor-block-compare__html span.block-editor-block-compare__added{background-color:#acf2bd}.block-editor-block-compare__wrapper .block-editor-block-compare__html span.block-editor-block-compare__removed{background-color:#cc1818}.block-editor-block-compare__wrapper .block-editor-block-compare__preview{padding:16px 0 0}.block-editor-block-compare__wrapper .block-editor-block-compare__preview p{font-size:12px;margin-top:0}.block-editor-block-compare__wrapper .block-editor-block-compare__action{margin-top:16px}.block-editor-block-compare__wrapper .block-editor-block-compare__heading{font-size:1em;font-weight:400;margin:.67em 0}.block-editor-block-content-overlay.overlay-active:before{background:transparent;border:none;border-radius:2px;content:"";height:100%;pointer-events:none;position:absolute;right:0;top:0;width:100%;z-index:10}.block-editor-block-content-overlay.parent-highlighted.overlay-active:before,.block-editor-block-content-overlay:hover:not(.is-dragging-blocks).overlay-active:before{background:rgba(var(--wp-admin-theme-color--rgb),.1);box-shadow:0 0 0 1px var(--wp-admin-theme-color) inset}.block-editor-block-content-overlay.overlay-active:not(.is-dragging-blocks) *{pointer-events:none}.block-editor-block-content-overlay.is-dragging-blocks{box-shadow:0 0 0 1px var(--wp-admin-theme-color)}.block-editor-block-draggable-chip-wrapper{position:absolute;right:0;top:-24px}.block-editor-block-draggable-chip{background-color:#1e1e1e;border-radius:2px;box-shadow:0 6px 8px rgba(0,0,0,.3);color:#fff;cursor:grabbing;display:inline-flex;height:48px;padding:0 13px;-webkit-user-select:none;user-select:none}.block-editor-block-draggable-chip svg{fill:currentColor}.block-editor-block-draggable-chip .block-editor-block-draggable-chip__content{justify-content:flex-start;margin:auto}.block-editor-block-draggable-chip .block-editor-block-draggable-chip__content>.components-flex__item{margin-left:6px}.block-editor-block-draggable-chip .block-editor-block-draggable-chip__content>.components-flex__item:last-child{margin-left:0}.block-editor-block-draggable-chip .block-editor-block-draggable-chip__content .block-editor-block-icon svg{min-height:18px;min-width:18px}.block-editor-block-draggable-chip .components-flex__item{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px}.block-editor-block-list__layout .is-dragging{background-color:currentColor!important;border-radius:2px!important;opacity:.05!important;pointer-events:none!important}.block-editor-block-list__layout .is-dragging::selection{background:transparent!important}.block-editor-block-list__layout .is-dragging:after{content:none!important}.block-editor-block-mobile-toolbar{border-left:1px solid #ddd;display:flex;flex-direction:row}.block-editor-block-mobile-toolbar .block-editor-block-mover-button{align-items:center;border-radius:2px;height:36px;justify-content:center;margin:0;padding:3px;width:36px}.block-editor-block-mobile-toolbar .block-editor-block-mover-button .dashicon{margin:auto}.block-editor-block-mobile-toolbar .block-editor-block-mover{display:flex;margin-left:auto}.block-editor-block-mobile-toolbar .block-editor-block-mover .block-editor-block-mover-button{float:right}.block-editor-block-mover-button__description{display:none}.block-editor-block-mover-button.has-icon{padding:0}.block-editor-block-mover{display:inline-flex;flex-direction:row}.block-editor-block-mover .block-editor-block-mover__move-button-container,.block-editor-block-mover .components-toolbar{border-left:none!important;flex:1;flex-direction:row}@media (min-width:600px){.block-editor-block-mover .block-editor-block-mover__move-button-container,.block-editor-block-mover .components-toolbar{flex-direction:column}}.block-editor-block-mover.is-horizontal .block-editor-block-mover__move-button-container,.block-editor-block-mover.is-horizontal .components-toolbar{flex-direction:row}.block-editor-block-mover .block-editor-block-mover-button.block-editor-block-mover-button{min-width:36px;padding-left:0;padding-right:0}@media (min-width:600px){.block-editor-block-mover .block-editor-block-mover-button{height:24px;padding-left:11px!important;padding-right:6px!important;width:42px}.block-editor-block-mover .block-editor-block-mover-button.block-editor-block-mover-button{min-width:42px}}@media (min-width:600px){.block-editor-block-mover .block-editor-block-mover-button:before{left:8px!important;right:8px!important}}.block-editor-block-mover .block-editor-block-mover__drag-handle{cursor:grab;min-width:24px!important;padding:0!important;width:24px}.block-editor-block-mover .block-editor-block-mover__drag-handle:focus:before{left:0!important;right:0!important}@media (min-width:600px){.block-editor-block-mover .components-toolbar-group .block-editor-block-mover-button,.block-editor-block-mover .components-toolbar .block-editor-block-mover-button{margin:0 0 0 auto}.block-editor-block-mover .components-toolbar-group .block-editor-block-mover-button.is-up-button:before,.block-editor-block-mover .components-toolbar .block-editor-block-mover-button.is-up-button:before{bottom:0;height:calc(100% - 1px)}.block-editor-block-mover .components-toolbar-group .block-editor-block-mover-button.is-down-button:before,.block-editor-block-mover .components-toolbar .block-editor-block-mover-button.is-down-button:before{height:calc(100% - 1px);top:0}}.block-editor-block-mover.is-horizontal .block-editor-block-mover-button.has-icon{height:48px;padding-left:0;padding-right:0;width:24px}.block-editor-block-mover.is-horizontal .block-editor-block-mover-button.has-icon:before{bottom:1px;height:auto;min-width:0;top:1px;width:auto}.block-editor-block-mover.is-horizontal .block-editor-block-mover-button.is-up-button.has-icon svg{margin-bottom:0;margin-left:-8px;margin-right:0}.block-editor-block-mover.is-horizontal .block-editor-block-mover-button.is-up-button.has-icon:before{left:0!important;right:0!important}.block-editor-block-mover.is-horizontal .block-editor-block-mover-button.is-down-button.has-icon svg{margin-left:0;margin-right:-8px;margin-top:0}.block-editor-block-mover.is-horizontal .block-editor-block-mover-button.is-down-button.has-icon:before{left:0!important;right:0!important;width:calc(100% + 1px)}.block-editor-block-navigation__container{min-width:280px}.block-editor-block-navigation__label{color:#757575;font-size:11px;font-weight:500;margin:0 0 12px;text-transform:uppercase}.block-editor-block-parent-selector{background:#fff;border-radius:2px}.block-editor-block-parent-selector .block-editor-block-parent-selector__button{border:1px solid #1e1e1e;border-radius:2px;height:48px;width:48px}.block-editor-block-patterns-list__list-item{cursor:pointer;margin-bottom:24px}.block-editor-block-patterns-list__list-item.is-placeholder{min-height:100px}.block-editor-block-patterns-list__list-item[draggable=true] .block-editor-block-preview__container{cursor:grab}.block-editor-block-patterns-list__item{height:100%}.block-editor-block-patterns-list__item .block-editor-block-preview__container{align-items:center;border:1px solid #f0f0f0;border-radius:2px;display:flex;overflow:hidden}.block-editor-block-patterns-list__item .block-editor-block-patterns-list__item-title{font-size:12px;padding-top:8px;text-align:center}.block-editor-block-patterns-list__item:hover .block-editor-block-preview__container{border:1px solid var(--wp-admin-theme-color)}.block-editor-block-patterns-list__item:focus .block-editor-block-preview__container{box-shadow:inset 0 0 0 1px #fff,0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:2px solid transparent}.block-editor-block-patterns-list__item:focus .block-editor-block-patterns-list__item-title,.block-editor-block-patterns-list__item:hover .block-editor-block-patterns-list__item-title{color:var(--wp-admin-theme-color)}.block-editor-block-preview__container{overflow:hidden;position:relative;width:100%}.block-editor-block-preview__container .block-editor-block-preview__content{margin:0;min-height:auto;overflow:visible;right:0;text-align:initial;top:0;transform-origin:top right}.block-editor-block-preview__container .block-editor-block-preview__content .block-editor-block-drop-zone,.block-editor-block-preview__container .block-editor-block-preview__content .block-editor-block-list__insertion-point,.block-editor-block-preview__container .block-editor-block-preview__content .block-list-appender,.block-editor-block-preview__container .block-editor-block-preview__content .reusable-block-indicator,.block-editor-block-preview__content-iframe .block-list-appender{display:none}.block-editor-block-settings-menu__popover .components-dropdown-menu__menu{padding:0}.block-editor-block-styles+.default-style-picker__default-switcher{margin-top:16px}.block-editor-block-styles__preview-panel{background:#fff;border:1px solid #ddd;border-radius:2px;display:none;left:16px;overflow:hidden;position:absolute;right:auto;top:16px;width:300px;z-index:90}@media (min-width:782px){.block-editor-block-styles__preview-panel{display:block}}.block-editor-block-styles__preview-panel .block-editor-inserter__preview-container{left:auto;position:static;right:auto;top:auto}.block-editor-block-styles__preview-panel .block-editor-block-card__title.block-editor-block-card__title{margin:0}.block-editor-block-styles__preview-panel .block-editor-block-icon{display:none}.block-editor-block-styles__variants{display:flex;flex-wrap:wrap;gap:8px;justify-content:space-between}.block-editor-block-styles__variants .block-editor-block-styles__item{box-shadow:inset 0 0 0 1px #ccc;color:#2f2f2f;display:inline-block;width:calc(50% - 4px)}.block-editor-block-styles__variants .block-editor-block-styles__item:focus,.block-editor-block-styles__variants .block-editor-block-styles__item:hover{box-shadow:inset 0 0 0 2px var(--wp-admin-theme-color);color:var(--wp-admin-theme-color)}.block-editor-block-styles__variants .block-editor-block-styles__item.is-active,.block-editor-block-styles__variants .block-editor-block-styles__item.is-active:hover{background-color:#2f2f2f;box-shadow:none}.block-editor-block-styles__variants .block-editor-block-styles__item.is-active .block-editor-block-styles__item-text,.block-editor-block-styles__variants .block-editor-block-styles__item.is-active:hover .block-editor-block-styles__item-text{color:#fff}.block-editor-block-styles__variants .block-editor-block-styles__item.is-active:focus{box-shadow:inset 0 0 0 1px #fff,0 0 0 2px var(--wp-admin-theme-color)}.block-editor-block-styles__block-preview-container,.block-editor-block-styles__block-preview-container *{box-sizing:border-box!important}.block-editor-block-switcher,.block-editor-block-switcher__no-switcher-icon,.block-editor-block-switcher__toggle{position:relative}.components-button.block-editor-block-switcher__no-switcher-icon,.components-button.block-editor-block-switcher__toggle{display:block;height:48px;margin:0}.components-button.block-editor-block-switcher__no-switcher-icon .block-editor-block-icon,.components-button.block-editor-block-switcher__toggle .block-editor-block-icon{margin:auto}.block-editor-block-switcher__toggle-text{margin-right:8px}.show-icon-labels .block-editor-block-switcher__toggle-text{display:none}.show-icon-labels .block-editor-block-toolbar .block-editor-block-switcher .components-button.has-icon:after{font-size:14px}.block-editor-block-switcher__popover{margin-right:6px}.components-button.block-editor-block-switcher__no-switcher-icon{width:48px}.components-button.block-editor-block-switcher__no-switcher-icon .block-editor-blocks-icon{margin-left:auto;margin-right:auto}.components-button.block-editor-block-switcher__no-switcher-icon:disabled{opacity:1}.components-button.block-editor-block-switcher__no-switcher-icon:disabled,.components-button.block-editor-block-switcher__no-switcher-icon:disabled .block-editor-block-icon.has-colors{color:#1e1e1e}.block-editor-block-toolbar .components-toolbar-group .components-button.block-editor-block-switcher__no-switcher-icon.has-icon.has-icon .block-editor-block-icon,.block-editor-block-toolbar .components-toolbar-group .components-button.block-editor-block-switcher__toggle.has-icon.has-icon .block-editor-block-icon,.block-editor-block-toolbar .components-toolbar .components-button.block-editor-block-switcher__no-switcher-icon.has-icon.has-icon .block-editor-block-icon,.block-editor-block-toolbar .components-toolbar .components-button.block-editor-block-switcher__toggle.has-icon.has-icon .block-editor-block-icon{align-items:center;display:flex;height:100%;margin:0 auto;min-width:100%;position:relative}.block-editor-block-toolbar .components-toolbar-group .components-button.block-editor-block-switcher__no-switcher-icon.has-icon.has-icon:before,.block-editor-block-toolbar .components-toolbar-group .components-button.block-editor-block-switcher__toggle.has-icon.has-icon:before,.block-editor-block-toolbar .components-toolbar .components-button.block-editor-block-switcher__no-switcher-icon.has-icon.has-icon:before,.block-editor-block-toolbar .components-toolbar .components-button.block-editor-block-switcher__toggle.has-icon.has-icon:before{bottom:8px;left:8px;right:8px;top:8px}.components-popover.block-editor-block-switcher__popover .components-popover__content{min-width:300px}.components-popover.block-editor-block-switcher__popover .components-popover__content>div{background:#fff;display:flex;min-width:auto;padding:0}.components-popover.block-editor-block-switcher__popover .components-popover__content>div .components-menu-group{margin:0}.block-editor-block-switcher__popover .components-popover__content .block-editor-block-styles{margin:0 -3px}.block-editor-block-switcher__popover .components-popover__content .components-panel__body{border:0;position:relative;z-index:1}.block-editor-block-switcher__popover .components-popover__content .components-panel__body+.components-panel__body{border-top:1px solid #e0e0e0}.block-editor-block-switcher__popover__preview__parent .block-editor-block-switcher__popover__preview__container{position:absolute;right:calc(100% + 32px);top:-12px}.block-editor-block-switcher__preview__popover{display:none}.block-editor-block-switcher__preview__popover.components-popover{margin-right:4px;margin-top:11px}@media (min-width:782px){.block-editor-block-switcher__preview__popover{display:block}}.block-editor-block-switcher__preview__popover .components-popover__content{background:#fff;border:1px solid #1e1e1e;border-radius:2px;box-shadow:none}.block-editor-block-switcher__preview__popover .block-editor-block-switcher__preview{height:auto;max-height:500px;padding:16px;width:300px}.block-editor-block-switcher__preview-title{color:#757575;font-size:11px;font-weight:500;margin-bottom:12px;text-transform:uppercase}.block-editor-block-contextual-toolbar .components-button.block-editor-block-switcher__no-switcher-icon{width:48px}.block-editor-block-contextual-toolbar .components-button.block-editor-block-switcher__no-switcher-icon,.block-editor-block-contextual-toolbar .components-button.block-editor-block-switcher__toggle{height:48px}.block-editor-block-contextual-toolbar .components-button.block-editor-block-switcher__no-switcher-icon .block-editor-block-icon,.block-editor-block-contextual-toolbar .components-button.block-editor-block-switcher__no-switcher-icon .block-editor-block-switcher__transform,.block-editor-block-contextual-toolbar .components-button.block-editor-block-switcher__toggle .block-editor-block-icon,.block-editor-block-contextual-toolbar .components-button.block-editor-block-switcher__toggle .block-editor-block-switcher__transform{height:48px;width:48px}.block-editor-block-contextual-toolbar .components-button.block-editor-block-switcher__no-switcher-icon .block-editor-block-switcher__transform,.block-editor-block-contextual-toolbar .components-button.block-editor-block-switcher__toggle .block-editor-block-switcher__transform{padding:12px}.block-editor-block-switcher__preview-patterns-container{padding-bottom:16px}.block-editor-block-switcher__preview-patterns-container .block-editor-block-switcher__preview-patterns-container-list__list-item{margin-top:16px}.block-editor-block-switcher__preview-patterns-container .block-editor-block-switcher__preview-patterns-container-list__list-item .block-editor-block-preview__container{cursor:pointer}.block-editor-block-switcher__preview-patterns-container .block-editor-block-switcher__preview-patterns-container-list__list-item .block-editor-block-switcher__preview-patterns-container-list__item{border:1px solid transparent;border-radius:2px;height:100%;position:relative;transition:all .05s ease-in-out}.block-editor-block-switcher__preview-patterns-container .block-editor-block-switcher__preview-patterns-container-list__list-item .block-editor-block-switcher__preview-patterns-container-list__item:focus,.block-editor-block-switcher__preview-patterns-container .block-editor-block-switcher__preview-patterns-container-list__list-item .block-editor-block-switcher__preview-patterns-container-list__item:hover{box-shadow:inset 0 0 0 1px #fff,0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:2px solid transparent}.block-editor-block-switcher__preview-patterns-container .block-editor-block-switcher__preview-patterns-container-list__list-item .block-editor-block-switcher__preview-patterns-container-list__item:hover{box-shadow:inset 0 0 0 1px #fff,0 0 0 var(--wp-admin-border-width-focus) #1e1e1e}.block-editor-block-switcher__preview-patterns-container .block-editor-block-switcher__preview-patterns-container-list__list-item .block-editor-block-switcher__preview-patterns-container-list__item .block-editor-block-switcher__preview-patterns-container-list__item-title{cursor:pointer;font-size:12px;padding:4px;text-align:center}.block-editor-block-types-list>[role=presentation]{display:flex;flex-wrap:wrap;overflow:hidden}.block-editor-block-variation-picker .components-placeholder__instructions{margin-bottom:0}.block-editor-block-variation-picker .components-placeholder__fieldset{flex-direction:column}.block-editor-block-variation-picker.has-many-variations .components-placeholder__fieldset{max-width:90%}.block-editor-block-variation-picker__variations.block-editor-block-variation-picker__variations{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-start;list-style:none;margin:16px 0;padding:0;width:100%}.block-editor-block-variation-picker__variations.block-editor-block-variation-picker__variations>li{flex-shrink:1;list-style:none;margin:8px 0 0 20px;text-align:center;width:75px}.block-editor-block-variation-picker__variations.block-editor-block-variation-picker__variations>li button{display:inline-flex;margin-left:0}.block-editor-block-variation-picker__variations.block-editor-block-variation-picker__variations .block-editor-block-variation-picker__variation{padding:8px}.block-editor-block-variation-picker__variations.block-editor-block-variation-picker__variations .block-editor-block-variation-picker__variation-label{display:block;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:12px;line-height:1.4}.block-editor-block-variation-picker__variation{width:100%}.block-editor-block-variation-picker__variation.components-button.has-icon{justify-content:center;width:auto}.block-editor-block-variation-picker__variation.components-button.has-icon.is-secondary{background-color:#fff}.block-editor-block-variation-picker__variation.components-button{height:auto;padding:0}.block-editor-block-variation-picker__variation:before{content:"";padding-bottom:100%}.block-editor-block-variation-picker__variation:first-child{margin-right:0}.block-editor-block-variation-picker__variation:last-child{margin-left:0}.block-editor-block-pattern-setup{align-items:flex-start;border-radius:2px;box-shadow:inset 0 0 0 1px #1e1e1e;display:flex;flex-direction:column;justify-content:center;outline:1px solid transparent;width:100%}.block-editor-block-pattern-setup.view-mode-grid .block-editor-block-pattern-setup__toolbar{justify-content:center}.block-editor-block-pattern-setup.view-mode-grid .block-editor-block-pattern-setup__container{grid-gap:16px;background:#fff;display:grid;grid-template-columns:1fr 1fr;margin:0 1px 1px;max-height:550px;overflow:auto;padding:16px;width:calc(100% - 2px)}.block-editor-block-pattern-setup.view-mode-grid .block-editor-block-pattern-setup__container .block-editor-block-preview__container,.block-editor-block-pattern-setup.view-mode-grid .block-editor-block-pattern-setup__container div[role=button]{cursor:pointer}.block-editor-block-pattern-setup.view-mode-grid .block-editor-block-pattern-setup__container .block-editor-block-pattern-setup-list__item-title{font-size:12px;padding:4px;text-align:center}.block-editor-block-pattern-setup.view-mode-grid .block-editor-block-pattern-setup__container .block-editor-block-preview__container{border:1px solid #ddd;border-radius:2px}.block-editor-block-pattern-setup .block-editor-block-pattern-setup__toolbar{align-items:center;background-color:#fff;border-radius:2px 2px 0 0;box-shadow:inset 0 0 0 1px #1e1e1e;box-sizing:border-box;color:#1e1e1e;display:flex;flex-direction:row;justify-content:space-between;margin:0;outline:1px solid transparent;padding:16px;position:relative;text-align:right;width:100%}.block-editor-block-pattern-setup .block-editor-block-pattern-setup__toolbar .block-editor-block-pattern-setup__display-controls{display:flex}.block-editor-block-pattern-setup .block-editor-block-pattern-setup__toolbar .block-editor-block-pattern-setup__actions,.block-editor-block-pattern-setup .block-editor-block-pattern-setup__toolbar .block-editor-block-pattern-setup__navigation{display:flex;width:calc(50% - 36px)}.block-editor-block-pattern-setup .block-editor-block-pattern-setup__toolbar .block-editor-block-pattern-setup__actions{justify-content:flex-end}.block-editor-block-pattern-setup .block-editor-block-pattern-setup__container{box-sizing:border-box;display:flex;flex-direction:column;width:100%}.block-editor-block-pattern-setup .block-editor-block-pattern-setup__container .carousel-container{list-style:none;margin:0;overflow:hidden;padding:0;position:relative;transform-style:preserve-3d}.block-editor-block-pattern-setup .block-editor-block-pattern-setup__container .carousel-container *{box-sizing:border-box}.block-editor-block-pattern-setup .block-editor-block-pattern-setup__container .carousel-container .pattern-slide{margin:auto;opacity:0;padding:16px;position:absolute;top:0;transition:transform .5s,opacity .5s,z-index .5s;width:100%;z-index:100}.block-editor-block-pattern-setup .block-editor-block-pattern-setup__container .carousel-container .pattern-slide.active-slide{opacity:1;position:relative;z-index:102}.block-editor-block-pattern-setup .block-editor-block-pattern-setup__container .carousel-container .pattern-slide.previous-slide{transform:translateX(100%);z-index:101}.block-editor-block-pattern-setup .block-editor-block-pattern-setup__container .carousel-container .pattern-slide.next-slide{transform:translateX(-100%);z-index:101}.block-editor-block-pattern-setup .block-editor-block-pattern-setup__container .block-list-appender{display:none}.block-editor-block-variation-transforms{padding:0 56px 16px 16px;width:100%}.block-editor-block-variation-transforms .components-dropdown-menu__toggle{border:1px solid #757575;border-radius:2px;justify-content:left;min-height:30px;padding:6px 12px;position:relative;text-align:right;width:100%}.block-editor-block-variation-transforms .components-dropdown-menu__toggle.components-dropdown-menu__toggle{padding-left:24px}.block-editor-block-variation-transforms .components-dropdown-menu__toggle:focus:not(:disabled){border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 calc(var(--wp-admin-border-width-focus) - 1px) var(--wp-admin-theme-color)}.block-editor-block-variation-transforms .components-dropdown-menu__toggle svg{height:100%;left:0;padding:0;position:absolute;top:0}.block-editor-block-variation-transforms__popover .components-popover__content{min-width:230px}.components-border-radius-control{margin-bottom:12px}.components-border-radius-control legend{padding-bottom:4px}.components-border-radius-control .components-border-radius-control__wrapper{align-items:flex-start;display:flex;justify-content:space-between}.components-border-radius-control .components-border-radius-control__wrapper>.components-unit-control-wrapper{margin-bottom:0;width:calc(50% - 26px)}.components-border-radius-control .components-border-radius-control__wrapper .components-range-control{margin-bottom:0;width:calc(50% - 26px)}.components-border-radius-control .components-border-radius-control__wrapper .components-range-control .components-base-control__field{height:30px;margin-bottom:0}.components-border-radius-control .components-border-radius-control__wrapper .components-range-control .components-range-control__wrapper{margin-left:10px}.components-border-radius-control .components-border-radius-control__wrapper>span{flex:0 0 auto}.components-border-radius-control .components-border-radius-control__input-controls-wrapper{display:flex;flex-wrap:wrap;width:70%}.components-border-radius-control .components-border-radius-control__input-controls-wrapper .components-unit-control-wrapper{margin-bottom:8px;margin-left:8px;width:calc(50% - 8px)}.components-border-radius-control .component-border-radius-control__linked-button.has-icon{display:flex;justify-content:center}.components-border-radius-control .component-border-radius-control__linked-button.has-icon svg{margin-left:0}.components-border-style-control legend{line-height:1.2;padding-bottom:4px}.components-border-style-control .components-border-style-control__buttons{display:inline-flex}.components-border-style-control .components-border-style-control__buttons .components-button.has-icon{height:30px;margin-left:4px;min-width:30px;padding:3px}.block-editor-button-block-appender{align-items:center;box-shadow:inset 0 0 0 1px #1e1e1e;color:#1e1e1e;display:flex;flex-direction:column;height:auto;justify-content:center;padding:8px;width:100%}.is-dark-theme .block-editor-button-block-appender{box-shadow:inset 0 0 0 1px hsla(0,0%,100%,.65);color:hsla(0,0%,100%,.65)}.block-editor-button-block-appender:hover{box-shadow:inset 0 0 0 1px var(--wp-admin-theme-color);color:var(--wp-admin-theme-color)}.block-editor-button-block-appender:focus{box-shadow:inset 0 0 0 2px var(--wp-admin-theme-color)}.block-editor-button-block-appender:active{color:#000}.block-editor-color-gradient-control .block-editor-color-gradient-control__color-indicator{margin-bottom:12px}.block-editor-panel-color-gradient-settings .component-color-indicator{vertical-align:text-bottom}.block-editor-panel-color-gradient-settings__panel-title .component-color-indicator{display:inline-block}.block-editor-panel-color-gradient-settings.is-opened .block-editor-panel-color-gradient-settings__panel-title .component-color-indicator{display:none}@media screen and (min-width:782px){.block-editor-panel-color-gradient-settings .components-circular-option-picker__swatches{display:grid;grid-template-columns:repeat(6,28px);justify-content:space-between}}.block-editor-block-inspector .block-editor-panel-color-gradient-settings .components-base-control{margin-bottom:inherit}.block-editor-contrast-checker>.components-notice{margin:0}.block-editor-default-block-appender{clear:both;margin-left:auto;margin-right:auto;position:relative}.block-editor-default-block-appender[data-root-client-id=""] .block-editor-default-block-appender__content:hover{outline:1px solid transparent}.block-editor-default-block-appender .block-editor-default-block-appender__content{opacity:.62}.block-editor-default-block-appender .components-drop-zone__content-icon{display:none}.block-editor-block-list__empty-block-inserter.block-editor-block-list__empty-block-inserter,.block-editor-default-block-appender .block-editor-inserter{left:0;line-height:0;position:absolute;top:0}.block-editor-block-list__empty-block-inserter.block-editor-block-list__empty-block-inserter:disabled,.block-editor-default-block-appender .block-editor-inserter:disabled{display:none}.block-editor-block-list__block .block-list-appender{bottom:0;left:0;list-style:none;padding:0;position:absolute;z-index:2}.block-editor-block-list__block .block-list-appender.block-list-appender{line-height:0;margin:0}.block-editor-block-list__block .block-list-appender .block-editor-default-block-appender{height:24px}.block-editor-block-list__block .block-list-appender .block-editor-inserter__toggle.components-button.has-icon,.block-editor-block-list__block .block-list-appender .block-list-appender__toggle{background:#1e1e1e;box-shadow:none;color:#fff;display:none;flex-direction:row;height:24px;padding:0!important;width:24px}.block-editor-block-list__block .block-list-appender .block-editor-inserter__toggle.components-button.has-icon:hover,.block-editor-block-list__block .block-list-appender .block-list-appender__toggle:hover{background:var(--wp-admin-theme-color);color:#fff}.block-editor-block-list__block .block-list-appender .block-editor-default-block-appender__content{display:none}.block-editor-block-list__block .block-list-appender:only-child{align-self:center;left:auto;line-height:inherit;list-style:none;position:relative}.block-editor-block-list__block .block-list-appender:only-child .block-editor-default-block-appender__content{display:block}.block-editor-block-list__block.is-selected .block-editor-block-list__layout>.block-list-appender .block-editor-inserter__toggle.components-button.has-icon,.block-editor-block-list__block.is-selected .block-editor-block-list__layout>.block-list-appender .block-list-appender__toggle,.block-editor-block-list__block.is-selected>.block-list-appender .block-editor-inserter__toggle.components-button.has-icon,.block-editor-block-list__block.is-selected>.block-list-appender .block-list-appender__toggle{display:flex}.block-editor-default-block-appender__content{cursor:text}.block-editor-duotone-control__popover>.components-popover__content>div{padding:16px;width:280px}.block-editor-duotone-control__popover .components-menu-group__label{padding:0}.block-editor-duotone-control__popover .components-custom-gradient-picker__gradient-bar{margin:16px 0 12px}.block-editor-duotone-control__popover .components-circular-option-picker__swatches{display:grid;gap:12px;grid-template-columns:repeat(6,28px);justify-content:space-between}.block-editor-duotone-control__description{font-size:12px;margin:16px 0}.block-editor-duotone-control__popover:not([data-y-axis=middle][data-x-axis=right])>.components-popover__content{margin-right:-14px}.components-font-appearance-control{margin-bottom:24px}.components-font-appearance-control ul li{color:#1e1e1e;text-transform:capitalize}.block-editor-image-size-control{margin-bottom:1em}.block-editor-image-size-control .block-editor-image-size-control__row{display:flex;justify-content:space-between}.block-editor-image-size-control .block-editor-image-size-control__row .block-editor-image-size-control__height,.block-editor-image-size-control .block-editor-image-size-control__row .block-editor-image-size-control__width{margin-bottom:.5em}.block-editor-image-size-control .block-editor-image-size-control__row .block-editor-image-size-control__height input,.block-editor-image-size-control .block-editor-image-size-control__row .block-editor-image-size-control__width input{line-height:1.25}.block-editor-image-size-control .block-editor-image-size-control__row .block-editor-image-size-control__width{margin-left:5px}.block-editor-image-size-control .block-editor-image-size-control__row .block-editor-image-size-control__height{margin-right:5px}.block-editor-block-list__layout.has-overlay:after{bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:60}.block-editor-block-types-list__list-item{display:block;margin:0;padding:0;width:33.33%}.components-button.block-editor-block-types-list__item{align-items:stretch;background:transparent;border-radius:2px;color:#1e1e1e;cursor:pointer;display:flex;flex-direction:column;font-size:13px;height:auto;justify-content:center;padding:8px;position:relative;transition:all .05s ease-in-out;width:100%;word-break:break-word}@media (prefers-reduced-motion:reduce){.components-button.block-editor-block-types-list__item{transition-delay:0s;transition-duration:0s}}.components-button.block-editor-block-types-list__item:disabled{cursor:default;opacity:.6}.components-button.block-editor-block-types-list__item:not(:disabled):hover{color:var(--wp-admin-theme-color)!important}.components-button.block-editor-block-types-list__item:not(:disabled):focus{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focu