/******/ (function() { // webpackBootstrap
/******/ 	"use strict";
/******/ 	var __webpack_modules__ = ({

/***/ "./src/atomic-wind/blocks/image/block.json":
/*!*************************************************!*\
  !*** ./src/atomic-wind/blocks/image/block.json ***!
  \*************************************************/
/***/ (function(module) {

module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"atomic-wind/image","title":"Image","category":"atomic-wind","description":"A simple image element. Set via media library or direct URL.","keywords":["image","img","photo"],"textdomain":"atomic-wind","attributes":{"id":{"type":"number"},"url":{"type":"string","source":"attribute","selector":"img","attribute":"src"},"alt":{"type":"string","source":"attribute","selector":"img","attribute":"alt","default":""},"className":{"type":"string","default":"w-full"},"metadata":{"type":"object"}},"supports":{"anchor":true,"html":false,"color":false,"typography":false,"spacing":false},"editorScript":"file:./index.js"}');

/***/ }),

/***/ "./src/atomic-wind/blocks/image/edit.js":
/*!**********************************************!*\
  !*** ./src/atomic-wind/blocks/image/edit.js ***!
  \**********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": function() { return /* binding */ Edit; }
/* harmony export */ });
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose");
/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _query_use_query_preview__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../query/use-query-preview */ "./src/atomic-wind/query/use-query-preview.js");
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__);






const IMAGE_PREVIEW_STYLE = {
  display: 'block',
  width: '100%',
  height: '120px',
  objectFit: 'contain',
  boxSizing: 'border-box',
  backgroundColor: '#f6f7f7',
  border: '1px solid #ddd',
  borderRadius: '2px',
  marginBottom: '8px'
};
const IMAGE_ACTIONS_STYLE = {
  display: 'flex',
  gap: '8px',
  flexWrap: 'wrap',
  marginBottom: '16px'
};
function getFeaturedImageUrl(post) {
  if (!post) {
    return '';
  }
  const embedded = post._embedded?.['wp:featuredmedia'];
  if (embedded && embedded.length > 0) {
    return embedded[0]?.media_details?.sizes?.large?.source_url || embedded[0]?.source_url || '';
  }
  return '';
}
function getAuthorAvatarUrl(post) {
  if (!post) {
    return '';
  }
  const authors = post._embedded?.author;
  if (authors && authors.length > 0) {
    const urls = authors[0]?.avatar_urls;
    return urls?.['256'] || urls?.['96'] || urls?.['48'] || urls?.['24'] || '';
  }
  return '';
}
function ImageSettings({
  id,
  url,
  alt,
  onSelectImage,
  setAttributes
}) {
  const instanceId = (0,_wordpress_compose__WEBPACK_IMPORTED_MODULE_2__.useInstanceId)(ImageSettings);
  const imageControlId = `atomic-wind-image-control-${instanceId}`;
  return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.InspectorControls, {
    children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelBody, {
      title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Settings', 'otter-blocks'),
      children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.BaseControl, {
        id: imageControlId,
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Image', 'otter-blocks'),
        children: [url && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("img", {
          src: url,
          alt: alt || '',
          style: IMAGE_PREVIEW_STYLE
        }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("div", {
          style: IMAGE_ACTIONS_STYLE,
          children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.MediaUploadCheck, {
            children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.MediaUpload, {
              onSelect: onSelectImage,
              allowedTypes: ['image'],
              value: id,
              render: ({
                open
              }) => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, {
                isSecondary: true,
                onClick: open,
                children: url ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Replace image', 'otter-blocks') : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Select image', 'otter-blocks')
              })
            })
          }), url && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, {
            isSecondary: true,
            onClick: () => setAttributes({
              id: undefined,
              url: undefined,
              alt: ''
            }),
            children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Remove image', 'otter-blocks')
          })]
        })]
      }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.TextControl, {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Image URL', 'otter-blocks'),
        value: url || '',
        onChange: value => setAttributes({
          url: value,
          id: undefined
        })
      }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.TextControl, {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Alt Text', 'otter-blocks'),
        value: alt || '',
        onChange: value => setAttributes({
          alt: value
        })
      })]
    })
  });
}
function Edit({
  attributes,
  setAttributes,
  clientId
}) {
  const {
    id,
    url,
    alt,
    postField
  } = attributes;
  const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.useBlockProps)();
  const {
    isActive,
    post
  } = (0,_query_use_query_preview__WEBPACK_IMPORTED_MODULE_4__["default"])(clientId, postField);
  const selectImage = media => setAttributes({
    id: media.id,
    url: media.url || media.source_url,
    alt: media.alt || media.alt_text || ''
  });
  if (isActive) {
    const previewUrl = postField === 'author_avatar' ? getAuthorAvatarUrl(post) : getFeaturedImageUrl(post);
    const placeholderLabel = postField === 'author_avatar' ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Author Avatar', 'otter-blocks') : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Featured Image', 'otter-blocks');
    if (previewUrl) {
      return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("img", {
        ...blockProps,
        src: previewUrl,
        alt: ""
      });
    }
    return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("div", {
      ...blockProps,
      style: {
        display: 'flex',
        alignItems: 'center',
        justifyContent: 'center',
        minHeight: '200px',
        background: '#f0f0f0',
        color: '#757575',
        fontSize: '13px'
      },
      children: placeholderLabel
    });
  }
  if (!url) {
    return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("div", {
      ...blockProps,
      children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.MediaPlaceholder, {
        onSelect: selectImage,
        allowedTypes: ['image'],
        labels: {
          title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Image', 'otter-blocks'),
          instructions: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Upload or select an image, or enter a URL.', 'otter-blocks')
        }
      }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(ImageSettings, {
        id: id,
        url: url,
        alt: alt,
        onSelectImage: selectImage,
        setAttributes: setAttributes
      })]
    });
  }
  return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.Fragment, {
    children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.BlockControls, {
      children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.MediaReplaceFlow, {
        mediaId: id,
        mediaURL: url,
        allowedTypes: ['image'],
        onSelect: selectImage
      })
    }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(ImageSettings, {
      id: id,
      url: url,
      alt: alt,
      onSelectImage: selectImage,
      setAttributes: setAttributes
    }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("img", {
      ...blockProps,
      src: url,
      alt: alt
    })]
  });
}

/***/ }),

/***/ "./src/atomic-wind/blocks/image/icon.js":
/*!**********************************************!*\
  !*** ./src/atomic-wind/blocks/image/icon.js ***!
  \**********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives");
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__);


/* harmony default export */ __webpack_exports__["default"] = (/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_0__.SVG, {
  width: "20",
  height: "20",
  viewBox: "0 0 20 20",
  fill: "none",
  xmlns: "http://www.w3.org/2000/svg",
  children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_0__.Path, {
    opacity: "0.1",
    d: "M18.7844 15.8089C19.1975 15.8404 19.5064 16.2005 19.4749 16.6135C19.4167 17.3763 19.1605 18.0861 18.6233 18.6233C18.0861 19.1605 17.3763 19.4167 16.6135 19.4749C16.2005 19.5064 15.8404 19.1975 15.8089 18.7844C15.7774 18.3715 16.0863 18.0113 16.4993 17.9797C17.0014 17.9415 17.34 17.7855 17.5628 17.5628C17.7855 17.34 17.9415 17.0014 17.9797 16.4993C18.0113 16.0863 18.3715 15.7774 18.7844 15.8089ZM9.68483 15.9212C9.91778 15.5788 10.3844 15.4901 10.7268 15.7229C11.7199 16.3983 12.6798 16.9329 13.5628 17.3128C13.9429 17.4766 14.119 17.9178 13.9553 18.2981C13.7917 18.6784 13.3503 18.854 12.97 18.6907C11.9845 18.2667 10.9406 17.6825 9.88307 16.9631C9.54077 16.7301 9.45193 16.2636 9.68483 15.9212ZM4.73073 11.2844C5.03998 11.0089 5.51376 11.0367 5.78932 11.346C6.1494 11.7501 6.52919 12.1522 6.92701 12.5501C7.32484 12.9479 7.72701 13.3277 8.13112 13.6878C8.44037 13.9633 8.4682 14.4371 8.19264 14.7464C7.91708 15.0556 7.44329 15.0824 7.13405 14.8069C6.70833 14.4276 6.28454 14.0287 5.86647 13.6106C5.44839 13.1925 5.04952 12.7688 4.67018 12.343C4.39465 12.0338 4.42152 11.56 4.73073 11.2844ZM15.9212 9.68483C16.2636 9.45193 16.7301 9.54077 16.9631 9.88307C17.6825 10.9406 18.2667 11.9845 18.6907 12.97C18.854 13.3503 18.6784 13.7917 18.2981 13.9553C17.9178 14.119 17.4766 13.9429 17.3128 13.5628C16.9329 12.6798 16.3983 11.7199 15.7229 10.7268C15.4901 10.3844 15.5788 9.91778 15.9212 9.68483ZM1.17897 5.52174C1.55931 5.35811 2.00046 5.53415 2.16432 5.91432C2.5442 6.79729 3.07874 7.75722 3.75416 8.75026C3.98699 9.09271 3.8983 9.5593 3.55592 9.79225C3.21351 10.0251 2.74694 9.9363 2.51393 9.59401C1.79462 8.53645 1.21039 7.49261 0.78639 6.50709C0.623086 6.12676 0.798726 5.68541 1.17897 5.52174ZM11.2844 4.73073C11.56 4.42152 12.0338 4.39465 12.343 4.67018C12.7688 5.04952 13.1925 5.44839 13.6106 5.86647C14.0287 6.28454 14.4276 6.70833 14.8069 7.13405C15.0824 7.44329 15.0556 7.91708 14.7464 8.19264C14.4371 8.46821 13.9633 8.44037 13.6878 8.13112C13.3277 7.72701 12.9479 7.32484 12.5501 6.92701C12.1522 6.52919 11.7501 6.1494 11.346 5.78932C11.0367 5.51376 11.0089 5.03998 11.2844 4.73073ZM5.52174 1.17897C5.68541 0.798726 6.12676 0.623086 6.50709 0.78639C7.49261 1.21039 8.53645 1.79462 9.59401 2.51393C9.9363 2.74694 10.0251 3.21351 9.79225 3.55592C9.5593 3.8983 9.09271 3.98699 8.75026 3.75416C7.75722 3.07874 6.79729 2.5442 5.91432 2.16432C5.53415 2.00046 5.35811 1.55931 5.52174 1.17897ZM2.86354 0.00221015C3.27655 -0.0292902 3.63673 0.279626 3.66823 0.69264C3.6997 1.10562 3.39078 1.46581 2.9778 1.49733C2.47567 1.53562 2.1371 1.69154 1.91432 1.91432C1.69154 2.1371 1.53562 2.47567 1.49733 2.9778C1.46581 3.39078 1.10562 3.6997 0.69264 3.66823C0.279626 3.63673 -0.0292901 3.27655 0.00221014 2.86354C0.0604195 2.10076 0.316588 1.39096 0.853773 0.853773C1.39096 0.316588 2.10076 0.0604195 2.86354 0.00221015Z",
    fill: "black"
  }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_0__.Path, {
    opacity: "0.1",
    d: "M3.66844 18.7844C3.63694 19.1974 3.27677 19.5064 2.86376 19.4749C2.10097 19.4167 1.39118 19.1605 0.85399 18.6233C0.316822 18.0861 0.0606346 17.3763 0.00242733 16.6135C-0.0290725 16.2005 0.279842 15.8404 0.692857 15.8088C1.10583 15.7774 1.46602 16.0863 1.49754 16.4993C1.53584 17.0014 1.69176 17.34 1.91454 17.5628C2.13733 17.7855 2.47589 17.9415 2.97801 17.9797C3.39098 18.0113 3.6999 18.3715 3.66844 18.7844ZM3.55614 9.68483C3.8985 9.91778 3.98721 10.3844 3.75438 10.7268C3.07895 11.7199 2.54442 12.6798 2.16454 13.5628C2.00068 13.9429 1.55952 14.119 1.17919 13.9553C0.798926 13.7917 0.623295 13.3503 0.786607 12.97C1.21061 11.9845 1.79483 10.9406 2.51415 9.88307C2.74716 9.54077 3.21372 9.45193 3.55614 9.68483ZM8.19286 4.73073C8.46842 5.03998 8.44059 5.51376 8.13133 5.78932C7.72723 6.1494 7.32506 6.52919 6.92723 6.92701C6.5294 7.32484 6.14962 7.72701 5.78954 8.13112C5.51397 8.44037 5.0402 8.4682 4.73094 8.19264C4.42174 7.91708 4.39489 7.44329 4.6704 7.13405C5.04974 6.70833 5.4486 6.28454 5.86669 5.86647C6.28477 5.44839 6.70854 5.04952 7.13426 4.67018C7.4435 4.39465 7.9173 4.42152 8.19286 4.73073ZM9.79247 15.9212C10.0254 16.2636 9.93652 16.7301 9.59422 16.9631C8.53666 17.6825 7.49284 18.2667 6.50731 18.6907C6.12696 18.854 5.68562 18.6784 5.52196 18.2981C5.35832 17.9178 5.53436 17.4766 5.91454 17.3128C6.79751 16.9329 7.75743 16.3983 8.75047 15.7229C9.09292 15.4901 9.55951 15.5788 9.79247 15.9212ZM13.9556 1.17897C14.1192 1.5593 13.9431 2.00046 13.563 2.16432C12.68 2.5442 11.7201 3.07874 10.727 3.75416C10.3846 3.98699 9.91799 3.8983 9.68505 3.55592C9.45215 3.21351 9.541 2.74694 9.88329 2.51393C10.9408 1.79462 11.9847 1.21039 12.9702 0.78639C13.3505 0.623085 13.7919 0.798726 13.9556 1.17897ZM14.7466 11.2844C15.0558 11.56 15.0826 12.0338 14.8071 12.343C14.4278 12.7688 14.0289 13.1925 13.6108 13.6106C13.1928 14.0287 12.769 14.4276 12.3432 14.8069C12.034 15.0824 11.5602 15.0556 11.2847 14.7463C11.0091 14.4371 11.0369 13.9633 11.3462 13.6878C11.7503 13.3277 12.1525 12.9479 12.5503 12.5501C12.9481 12.1522 13.3279 11.7501 13.688 11.346C13.9635 11.0367 14.4373 11.0089 14.7466 11.2844ZM18.2983 5.52174C18.6786 5.68541 18.8542 6.12676 18.6909 6.50709C18.2669 7.49261 17.6827 8.53645 16.9634 9.59401C16.7304 9.9363 16.2638 10.0251 15.9214 9.79225C15.579 9.5593 15.4903 9.09271 15.7231 8.75026C16.3986 7.75721 16.9331 6.79728 17.313 5.91432C17.4768 5.53415 17.918 5.35811 18.2983 5.52174ZM19.4751 2.86354C19.5066 3.27655 19.1977 3.63673 18.7847 3.66823C18.3717 3.6997 18.0115 3.39078 17.98 2.9778C17.9417 2.47567 17.7858 2.1371 17.563 1.91432C17.3402 1.69154 17.0016 1.53562 16.4995 1.49733C16.0865 1.46581 15.7776 1.10562 15.8091 0.69264C15.8406 0.279626 16.2007 -0.0292903 16.6138 0.00221001C17.3765 0.0604194 18.0863 0.316588 18.6235 0.853773C19.1607 1.39096 19.4169 2.10076 19.4751 2.86354Z",
    fill: "black"
  }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_0__.Path, {
    d: "M9.40304 2.85835C9.65446 2.73239 9.96005 2.75729 10.1901 2.93062C13.0594 5.09201 14.4097 6.54029 16.5378 9.27534C16.7426 9.53853 16.7489 9.90556 16.5534 10.1757C15.7233 11.3225 14.7345 12.4849 13.611 13.6084C12.4876 14.7318 11.3252 15.7206 10.1784 16.5507C9.90983 16.745 9.54502 16.7398 9.28194 16.538C6.45635 14.371 5.04466 12.981 2.93331 10.1884C2.73468 9.92553 2.73142 9.56381 2.92452 9.29683C3.75467 8.15009 4.74345 6.98767 5.8669 5.86421C6.99037 4.74075 8.15278 3.75198 9.29952 2.92183L9.40304 2.85835ZM9.73311 4.46773C8.79746 5.17832 7.85043 6.00178 6.92745 6.92476C6.00575 7.84646 5.18327 8.79212 4.47335 9.72652C6.20253 11.967 7.46735 13.2183 9.74972 14.999C10.6834 14.2894 11.6295 13.4688 12.5505 12.5478C13.471 11.6274 14.2914 10.6821 15.0007 9.74898C13.2464 7.52477 12.0231 6.23313 9.73311 4.46773Z",
    fill: "#F16574"
  }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_0__.Path, {
    d: "M11.2429 9.73877C11.2429 8.90761 10.5739 8.23881 9.75464 8.23877H9.7312C8.91199 8.23881 8.24292 8.90761 8.24292 9.73877C8.24292 10.5699 8.91199 11.2387 9.7312 11.2388H9.75464C10.5739 11.2387 11.2429 10.5699 11.2429 9.73877ZM12.2429 9.73877C12.2429 11.1167 11.1316 12.2387 9.75464 12.2388H9.7312C8.35421 12.2387 7.24292 11.1167 7.24292 9.73877C7.24292 8.36084 8.35421 7.23881 9.7312 7.23877H9.75464C11.1316 7.23881 12.2429 8.36084 12.2429 9.73877Z",
    fill: "#F16574"
  })]
}));

/***/ }),

/***/ "./src/atomic-wind/blocks/image/save.js":
/*!**********************************************!*\
  !*** ./src/atomic-wind/blocks/image/save.js ***!
  \**********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": function() { return /* binding */ save; }
/* harmony export */ });
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__);


function save({
  attributes
}) {
  const {
    url,
    alt
  } = attributes;
  const blockProps = _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.useBlockProps.save();
  return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("img", {
    ...blockProps,
    src: url || '',
    alt: alt || ''
  });
}

/***/ }),

/***/ "./src/atomic-wind/blocks/labels.js":
/*!******************************************!*\
  !*** ./src/atomic-wind/blocks/labels.js ***!
  \******************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   boxLabel: function() { return /* binding */ boxLabel; },
/* harmony export */   getStructuralLabel: function() { return /* binding */ getStructuralLabel; },
/* harmony export */   iconLabel: function() { return /* binding */ iconLabel; },
/* harmony export */   imageLabel: function() { return /* binding */ imageLabel; },
/* harmony export */   linkLabel: function() { return /* binding */ linkLabel; },
/* harmony export */   textLabel: function() { return /* binding */ textLabel; },
/* harmony export */   toPlainText: function() { return /* binding */ toPlainText; }
/* harmony export */ });
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);

const LABEL_CONTEXTS = ['list-view', 'breadcrumb'];

// Resolved lazily so locale data registered after module init still applies.
// div and span intentionally have no label so generic wrappers fall through
// to the block title and block variation matching.
const getTagLabel = tagName => {
  switch (tagName) {
    case 'section':
      return (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Section', 'otter-blocks');
    case 'article':
      return (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Article', 'otter-blocks');
    case 'main':
      return (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Main', 'otter-blocks');
    case 'aside':
      return (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Aside', 'otter-blocks');
    case 'header':
      return (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Header', 'otter-blocks');
    case 'footer':
      return (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Footer', 'otter-blocks');
    case 'nav':
      return (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Navigation', 'otter-blocks');
    case 'details':
      return (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Details', 'otter-blocks');
    case 'summary':
      return (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Summary', 'otter-blocks');
    default:
      return undefined;
  }
};
const toPlainText = value => {
  if (!value) {
    return '';
  }
  const text = typeof value === 'string' ? value.replace(/<[^>]+>/g, ' ') : value.toPlainText?.() ?? '';
  return text.replace(/\s+/g, ' ').trim();
};

// Builds an __experimentalLabel callback. The custom name written by the core
// Rename UI (attributes.metadata.name) must win, because defining our own
// label callback prevents core from displaying it; returning undefined when
// there is no better label keeps the block title and variation titles working.
// Content fallbacks return the raw attribute value (string or RichTextData)
// so core converts and decodes it exactly once.
const createLabel = getFallback => (attributes, {
  context
} = {}) => {
  if (!LABEL_CONTEXTS.includes(context)) {
    return undefined;
  }
  const customName = attributes?.metadata?.name;
  if (customName) {
    return customName;
  }
  return getFallback ? getFallback(attributes) : undefined;
};
const boxLabel = createLabel(({
  tagName
}) => getTagLabel(tagName));
const textLabel = createLabel(({
  content
}) => toPlainText(content) ? content : undefined);
const linkLabel = createLabel(({
  mode,
  text
}) => {
  if (mode === 'inner-blocks') {
    return undefined;
  }
  return toPlainText(text) ? text : undefined;
});
const imageLabel = createLabel(({
  alt
}) => toPlainText(alt) || undefined);
const iconLabel = createLabel();
const getStructuralLabel = (blockName, attributes) => {
  if (attributes?.metadata?.name) {
    return attributes.metadata.name;
  }
  return blockName === 'atomic-wind/box' ? getTagLabel(attributes?.tagName) : undefined;
};

/***/ }),

/***/ "./src/atomic-wind/query/use-query-preview.js":
/*!****************************************************!*\
  !*** ./src/atomic-wind/query/use-query-preview.js ***!
  \****************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": function() { return /* binding */ useQueryPreview; }
/* harmony export */ });
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);


/**
 * Returns preview data from the first queried post when inside a query box with a postField set.
 *
 * @param {string} clientId  Block client ID.
 * @param {string} postField The postField attribute value.
 * @return {{ isActive: boolean, post: Object|null, queryPostType: string }} Preview state.
 */
function useQueryPreview(clientId, postField) {
  return (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.useSelect)(select => {
    const inactive = {
      isActive: false,
      post: null,
      queryPostType: ''
    };
    if (!postField) {
      return inactive;
    }
    const {
      getBlockParents,
      getBlock
    } = select('core/block-editor');
    const parents = getBlockParents(clientId);
    let queryPostType = '';
    for (const parentId of parents) {
      const parent = getBlock(parentId);
      if (parent?.name === 'atomic-wind/box' && parent?.attributes?.queryPostType) {
        queryPostType = parent.attributes.queryPostType;
        break;
      }
    }
    if (!queryPostType) {
      return inactive;
    }
    const posts = select('core').getEntityRecords('postType', queryPostType, {
      per_page: 1,
      _embed: true
    });
    return {
      isActive: true,
      post: posts && posts.length > 0 ? posts[0] : null,
      queryPostType
    };
  }, [clientId, postField]);
}

/***/ }),

/***/ "@wordpress/block-editor":
/*!*************************************!*\
  !*** external ["wp","blockEditor"] ***!
  \*************************************/
/***/ (function(module) {

module.exports = window["wp"]["blockEditor"];

/***/ }),

/***/ "@wordpress/blocks":
/*!********************************!*\
  !*** external ["wp","blocks"] ***!
  \********************************/
/***/ (function(module) {

module.exports = window["wp"]["blocks"];

/***/ }),

/***/ "@wordpress/components":
/*!************************************!*\
  !*** external ["wp","components"] ***!
  \************************************/
/***/ (function(module) {

module.exports = window["wp"]["components"];

/***/ }),

/***/ "@wordpress/compose":
/*!*********************************!*\
  !*** external ["wp","compose"] ***!
  \*********************************/
/***/ (function(module) {

module.exports = window["wp"]["compose"];

/***/ }),

/***/ "@wordpress/data":
/*!******************************!*\
  !*** external ["wp","data"] ***!
  \******************************/
/***/ (function(module) {

module.exports = window["wp"]["data"];

/***/ }),

/***/ "@wordpress/i18n":
/*!******************************!*\
  !*** external ["wp","i18n"] ***!
  \******************************/
/***/ (function(module) {

module.exports = window["wp"]["i18n"];

/***/ }),

/***/ "@wordpress/primitives":
/*!************************************!*\
  !*** external ["wp","primitives"] ***!
  \************************************/
/***/ (function(module) {

module.exports = window["wp"]["primitives"];

/***/ }),

/***/ "react/jsx-runtime":
/*!**********************************!*\
  !*** external "ReactJSXRuntime" ***!
  \**********************************/
/***/ (function(module) {

module.exports = window["ReactJSXRuntime"];

/***/ })

/******/ 	});
/************************************************************************/
/******/ 	// The module cache
/******/ 	var __webpack_module_cache__ = {};
/******/ 	
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/ 		// Check if module is in cache
/******/ 		var cachedModule = __webpack_module_cache__[moduleId];
/******/ 		if (cachedModule !== undefined) {
/******/ 			return cachedModule.exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = __webpack_module_cache__[moduleId] = {
/******/ 			// no module.id needed
/******/ 			// no module.loaded needed
/******/ 			exports: {}
/******/ 		};
/******/ 	
/******/ 		// Execute the module function
/******/ 		__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/ 	
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/ 	
/************************************************************************/
/******/ 	/* webpack/runtime/compat get default export */
/******/ 	!function() {
/******/ 		// getDefaultExport function for compatibility with non-harmony modules
/******/ 		__webpack_require__.n = function(module) {
/******/ 			var getter = module && module.__esModule ?
/******/ 				function() { return module['default']; } :
/******/ 				function() { return module; };
/******/ 			__webpack_require__.d(getter, { a: getter });
/******/ 			return getter;
/******/ 		};
/******/ 	}();
/******/ 	
/******/ 	/* webpack/runtime/define property getters */
/******/ 	!function() {
/******/ 		// define getter functions for harmony exports
/******/ 		__webpack_require__.d = function(exports, definition) {
/******/ 			for(var key in definition) {
/******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ 				}
/******/ 			}
/******/ 		};
/******/ 	}();
/******/ 	
/******/ 	/* webpack/runtime/hasOwnProperty shorthand */
/******/ 	!function() {
/******/ 		__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
/******/ 	}();
/******/ 	
/******/ 	/* webpack/runtime/make namespace object */
/******/ 	!function() {
/******/ 		// define __esModule on exports
/******/ 		__webpack_require__.r = function(exports) {
/******/ 			if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 				Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 			}
/******/ 			Object.defineProperty(exports, '__esModule', { value: true });
/******/ 		};
/******/ 	}();
/******/ 	
/************************************************************************/
var __webpack_exports__ = {};
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk.
!function() {
/*!***********************************************!*\
  !*** ./src/atomic-wind/blocks/image/index.js ***!
  \***********************************************/
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./block.json */ "./src/atomic-wind/blocks/image/block.json");
/* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./icon */ "./src/atomic-wind/blocks/image/icon.js");
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./edit */ "./src/atomic-wind/blocks/image/edit.js");
/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./save */ "./src/atomic-wind/blocks/image/save.js");
/* harmony import */ var _labels__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../labels */ "./src/atomic-wind/blocks/labels.js");






const {
  name,
  ...settings
} = _block_json__WEBPACK_IMPORTED_MODULE_1__;
(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.registerBlockType)(name, {
  ...settings,
  icon: _icon__WEBPACK_IMPORTED_MODULE_2__["default"],
  edit: _edit__WEBPACK_IMPORTED_MODULE_3__["default"],
  save: _save__WEBPACK_IMPORTED_MODULE_4__["default"],
  __experimentalLabel: _labels__WEBPACK_IMPORTED_MODULE_5__.imageLabel
});
}();
/******/ })()
;
//# sourceMappingURL=index.js.map