FileMaster
Search
Toggle Dark Mode
Home
/
.
/
wp-content
/
plugins
/
cozy-addons
/
cozy-blocks
/
dist
/
magazine-grid
/
build
Edit File: index.js
(()=>{var e,t={453:(e,t,o)=>{"use strict";const n=window.wp.i18n,a=window.wp.blocks,s=window.wp.blockEditor,r=window.wp.element,i=window.wp.components,l=window.wp.primitives,d=window.ReactJSXRuntime,c=(0,d.jsx)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(l.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})}),u=(0,d.jsx)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(l.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})}),p=(0,d.jsx)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(l.Path,{d:"M12.5 15v5H11v-5H4V9h7V4h1.5v5h7v6h-7Z"})}),h=(0,d.jsx)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(l.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"})}),g=(0,d.jsx)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(l.Path,{d:"M13 5.5H4V4h9v1.5Zm7 7H4V11h16v1.5Zm-7 7H4V18h9v1.5Z"})}),f=(0,d.jsx)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(l.Path,{d:"M7.5 5.5h9V4h-9v1.5Zm-3.5 7h16V11H4v1.5Zm3.5 7h9V18h-9v1.5Z"})}),_=(0,d.jsx)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(l.Path,{d:"M11.111 5.5H20V4h-8.889v1.5ZM4 12.5h16V11H4v1.5Zm7.111 7H20V18h-8.889v1.5Z"})}),x=(0,d.jsx)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(l.Path,{d:"M5 11.25h14v1.5H5z"})}),b=(0,d.jsx)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(l.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"})}),y=(0,d.jsx)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(l.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"})}),m=(0,d.jsx)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(l.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"})}),v=(0,d.jsx)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(l.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"})}),C=(0,d.jsx)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(l.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"})});var j=o(942);const O=window.wp.apiFetch;var z=o.n(O);async function P(){try{return await z()({path:"/cozy-block/v1/posts?per_page=-1"})}catch(e){return console.log("Unable to fetch posts..."),[]}}const w=[{label:(0,n.__)("Thin","cozy-addons"),value:"100"},{label:(0,n.__)("Extra Light","cozy-addons"),value:"200"},{label:(0,n.__)("Light","cozy-addons"),value:"300"},{label:(0,n.__)("Normal","cozy-addons"),value:"400"},{label:(0,n.__)("Medium","cozy-addons"),value:"500"},{label:(0,n.__)("Semi Bold","cozy-addons"),value:"600"},{label:(0,n.__)("Bold","cozy-addons"),value:"700"},{label:(0,n.__)("Extra Bold","cozy-addons"),value:"800"},{label:(0,n.__)("Black","cozy-addons"),value:"900"}];function S(e,t=40){var o;if(o=e.replace(/\[.*?\]/g,""),e=(new DOMParser).parseFromString(o,"text/html").body.textContent||"",null===t)return e;var n=e.split(" ");return n.length>t?n.slice(0,t).join(" ")+"...":n.join(" ")}const H=[{label:"H1",value:"h1"},{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"},{label:"Paragraph",value:"p"}],M=(0,r.memo)((({attributes:e,data:t})=>{let o="";return t&&Object.keys(t).length>0&&(o=S(t.post_content,e.enableOptions.featuredPostExcerpt)),(0,d.jsxs)(d.Fragment,{children:[(void 0===t||"object"==typeof t&&Object.keys(t).length<=0)&&(0,n.__)("Featured Post not set!","cozy-addons"),t&&Object.keys(t).length>0&&(0,d.jsx)("div",{className:"cozy-block-magazine-grid__featured-post-wrapper",children:(0,d.jsxs)("div",{className:`cozy-block-magazine-grid__featured-post${e.featuredPostOptions.imageOverlay?" has-image-overlay":""}${e.featuredPostOptions.sticky?" is-sticky":""}`,children:[e.enableOptions.postImage&&(0,d.jsx)("figure",{className:"featured-post__image"+(e.postOptions.image.hoverEffect?" has-hover-effect":""),children:(0,d.jsx)("img",{src:t.post_image_url})}),(0,d.jsx)("div",{className:"featured-post__content-overlay-wrapper",children:(0,d.jsxs)("div",{className:"featured-post__content-wrapper",children:[e.enableOptions?.featuredPostCategories&&(0,d.jsx)("div",{className:"featured-post__categories post__categories",children:t.post_categories.map((t=>(0,d.jsx)("a",{className:"featured-post__category-item post__category-item"+(e.postCategories.hoverEffect?" has-hover-effect":""),children:(0,n.__)(t.name,"cozy-addons")})))}),(0,d.jsx)("h4",{className:`featured-post__title ${e.featuredPostOptions.title?.className}`,children:(0,d.jsx)("a",{children:(0,n.__)(t.post_title,"cozy-addons")})}),(e.enableOptions?.featuredPostAuthor||e.enableOptions?.featuredPostComments||e.enableOptions?.featuredPostDate)&&(0,d.jsxs)("div",{className:"featured-post__meta post__meta",children:[e.enableOptions?.featuredPostAuthor&&(0,d.jsxs)("a",{className:"featured-post__author display-flex",children:[e.enableOptions?.enableFeaturedMetaIcon&&(0,d.jsx)("svg",{width:e.postMeta.font.size,height:e.postMeta.font.size,xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,viewBox:"0 0 12 15",children:(0,d.jsx)("path",{d:"M11.2972 14.6667H0.630493V13.3333C0.630493 12.4493 0.981683 11.6014 1.6068 10.9763C2.23193 10.3512 3.07977 10 3.96383 10H7.96383C8.84788 10 9.69573 10.3512 10.3208 10.9763C10.946 11.6014 11.2972 12.4493 11.2972 13.3333V14.6667ZM5.96383 8.66667C5.43854 8.66667 4.9184 8.5632 4.43309 8.36218C3.94779 8.16117 3.50683 7.86653 3.1354 7.49509C2.76396 7.12366 2.46933 6.6827 2.26831 6.1974C2.06729 5.7121 1.96383 5.19195 1.96383 4.66667C1.96383 4.14138 2.06729 3.62124 2.26831 3.13593C2.46933 2.65063 2.76396 2.20967 3.1354 1.83824C3.50683 1.4668 3.94779 1.17217 4.43309 0.971148C4.9184 0.770129 5.43854 0.666666 5.96383 0.666666C7.02469 0.666666 8.04211 1.08809 8.79225 1.83824C9.5424 2.58838 9.96383 3.6058 9.96383 4.66667C9.96383 5.72753 9.5424 6.74495 8.79225 7.49509C8.04211 8.24524 7.02469 8.66667 5.96383 8.66667Z"})}),(0,d.jsx)("p",{children:(0,n.__)(t.post_author_name,"cozy-addons")})]}),e.enableOptions?.featuredPostComments&&(0,d.jsxs)("a",{className:"featured-post__comments display-flex",children:[e.enableOptions?.enableFeaturedMetaIcon&&(0,d.jsx)("svg",{width:e.postMeta.font.size,height:e.postMeta.font.size,xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,viewBox:"0 0 25 20",children:(0,d.jsx)("path",{d:"M18.0556 6.94444C18.0556 3.10764 14.0148 0 9.02778 0C4.0408 0 0 3.10764 0 6.94444C0 8.43316 0.611979 9.80469 1.64931 10.9375C1.06771 12.2483 0.108507 13.2899 0.0954861 13.3029C0 13.4028 -0.0260417 13.5503 0.0303819 13.6806C0.0868056 13.8108 0.208333 13.8889 0.347222 13.8889C1.93576 13.8889 3.25087 13.355 4.19705 12.8038C5.59462 13.4852 7.24826 13.8889 9.02778 13.8889C14.0148 13.8889 18.0556 10.7812 18.0556 6.94444ZM23.3507 16.4931C24.388 15.3646 25 13.9887 25 12.5C25 9.59635 22.678 7.10937 19.388 6.07205C19.4271 6.35851 19.4444 6.6493 19.4444 6.94444C19.4444 11.5408 14.77 15.2778 9.02778 15.2778C8.55903 15.2778 8.1033 15.2431 7.65191 15.1953C9.0191 17.691 12.2309 19.4444 15.9722 19.4444C17.7517 19.4444 19.4054 19.0451 20.8029 18.3594C21.7491 18.9106 23.0642 19.4444 24.6528 19.4444C24.7917 19.4444 24.9175 19.362 24.9696 19.2361C25.026 19.1102 25 18.9627 24.9045 18.8585C24.8915 18.8455 23.9323 17.8082 23.3507 16.4931Z"})}),(0,d.jsx)("p",{children:parseInt(t.comment_count)>0?(0,n.__)(t.comment_count,"cozy-addons"):"No Comments!"})]}),e.enableOptions?.featuredPostDate&&(0,d.jsxs)("a",{className:"featured-post__date display-flex",children:[e.enableOptions?.enableFeaturedMetaIcon&&(0,d.jsx)("svg",{width:e.postMeta.font.size,height:e.postMeta.font.size,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 18","aria-hidden":!0,children:(0,d.jsx)("path",{d:"M7.66699 10.6666C7.43088 10.6666 7.23296 10.5868 7.07324 10.427C6.91352 10.2673 6.83366 10.0694 6.83366 9.83329C6.83366 9.59718 6.91352 9.39927 7.07324 9.23954C7.23296 9.07982 7.43088 8.99996 7.66699 8.99996C7.9031 8.99996 8.10102 9.07982 8.26074 9.23954C8.42046 9.39927 8.50033 9.59718 8.50033 9.83329C8.50033 10.0694 8.42046 10.2673 8.26074 10.427C8.10102 10.5868 7.9031 10.6666 7.66699 10.6666ZM4.33366 10.6666C4.09755 10.6666 3.89963 10.5868 3.73991 10.427C3.58019 10.2673 3.50033 10.0694 3.50033 9.83329C3.50033 9.59718 3.58019 9.39927 3.73991 9.23954C3.89963 9.07982 4.09755 8.99996 4.33366 8.99996C4.56977 8.99996 4.76769 9.07982 4.92741 9.23954C5.08713 9.39927 5.16699 9.59718 5.16699 9.83329C5.16699 10.0694 5.08713 10.2673 4.92741 10.427C4.76769 10.5868 4.56977 10.6666 4.33366 10.6666ZM11.0003 10.6666C10.7642 10.6666 10.5663 10.5868 10.4066 10.427C10.2469 10.2673 10.167 10.0694 10.167 9.83329C10.167 9.59718 10.2469 9.39927 10.4066 9.23954C10.5663 9.07982 10.7642 8.99996 11.0003 8.99996C11.2364 8.99996 11.4344 9.07982 11.5941 9.23954C11.7538 9.39927 11.8337 9.59718 11.8337 9.83329C11.8337 10.0694 11.7538 10.2673 11.5941 10.427C11.4344 10.5868 11.2364 10.6666 11.0003 10.6666ZM7.66699 14C7.43088 14 7.23296 13.9201 7.07324 13.7604C6.91352 13.6007 6.83366 13.4027 6.83366 13.1666C6.83366 12.9305 6.91352 12.7326 7.07324 12.5729C7.23296 12.4132 7.43088 12.3333 7.66699 12.3333C7.9031 12.3333 8.10102 12.4132 8.26074 12.5729C8.42046 12.7326 8.50033 12.9305 8.50033 13.1666C8.50033 13.4027 8.42046 13.6007 8.26074 13.7604C8.10102 13.9201 7.9031 14 7.66699 14ZM4.33366 14C4.09755 14 3.89963 13.9201 3.73991 13.7604C3.58019 13.6007 3.50033 13.4027 3.50033 13.1666C3.50033 12.9305 3.58019 12.7326 3.73991 12.5729C3.89963 12.4132 4.09755 12.3333 4.33366 12.3333C4.56977 12.3333 4.76769 12.4132 4.92741 12.5729C5.08713 12.7326 5.16699 12.9305 5.16699 13.1666C5.16699 13.4027 5.08713 13.6007 4.92741 13.7604C4.76769 13.9201 4.56977 14 4.33366 14ZM11.0003 14C10.7642 14 10.5663 13.9201 10.4066 13.7604C10.2469 13.6007 10.167 13.4027 10.167 13.1666C10.167 12.9305 10.2469 12.7326 10.4066 12.5729C10.5663 12.4132 10.7642 12.3333 11.0003 12.3333C11.2364 12.3333 11.4344 12.4132 11.5941 12.5729C11.7538 12.7326 11.8337 12.9305 11.8337 13.1666C11.8337 13.4027 11.7538 13.6007 11.5941 13.7604C11.4344 13.9201 11.2364 14 11.0003 14ZM1.83366 17.3333C1.37533 17.3333 0.982964 17.1701 0.656576 16.8437C0.330187 16.5173 0.166992 16.125 0.166992 15.6666V3.99996C0.166992 3.54163 0.330187 3.14926 0.656576 2.82288C0.982964 2.49649 1.37533 2.33329 1.83366 2.33329H2.66699V0.666626H4.33366V2.33329H11.0003V0.666626H12.667V2.33329H13.5003C13.9587 2.33329 14.351 2.49649 14.6774 2.82288C15.0038 3.14926 15.167 3.54163 15.167 3.99996V15.6666C15.167 16.125 15.0038 16.5173 14.6774 16.8437C14.351 17.1701 13.9587 17.3333 13.5003 17.3333H1.83366ZM1.83366 15.6666H13.5003V7.33329H1.83366V15.6666Z"})}),(0,d.jsx)("p",{children:(0,n.__)(t.post_date_formatted,"cozy-addons")})]})]}),e.enableOptions?.featuredPostContent&&(0,d.jsxs)("div",{className:"featured-post__content",children:[t.post_excerpt.length>0&&(0,d.jsx)("p",{children:t.post_excerpt}),t.post_excerpt.length<=0&&(0,d.jsx)("p",{dangerouslySetInnerHTML:{__html:o}}),e.enableOptions?.featuredReadMore&&(0,d.jsx)("span",{className:"post__read-more",children:(0,d.jsx)("a",{className:"post__read-more-link",children:(0,n.__)("Read More","cozy-addons")})})]})]})})]})})]})})),T=(0,r.memo)((({attributes:e,data:t})=>{let o="";return o=S(t.post_content,e.enableOptions.postExcerpt),(0,d.jsx)(d.Fragment,{children:(0,d.jsxs)("li",{className:`cozy-block-magazine-grid__post-item${e.postBoxStyles.hoverEffect?" has-hover-effect":""}${e.postBoxStyles.shadow.enabled?" has-box-shadow":""}${e.postBoxStyles.shadowHover.enabled?" has-hover-box-shadow":""}${e.postOptions.imageOverlay?" has-image-overlay":""}`,children:[e.enableOptions.postImage&&(0,d.jsx)("figure",{className:"post__image"+(e.postOptions.image.hoverEffect?" has-hover-effect":""),children:(0,d.jsx)("img",{src:t.post_image_url})}),(0,d.jsxs)("div",{className:"post__content-wrapper",children:[e.enableOptions.postCategories&&(0,d.jsx)("div",{className:"post__categories",children:t.post_categories.map((t=>(0,d.jsx)("a",{className:"post__category-item"+(e.postCategories.hoverEffect?" has-hover-effect":""),children:(0,n.__)(t.name,"cozy-addons")})))}),(0,d.jsx)("h4",{className:`post__title ${e.postOptions.title?.className}`,children:(0,d.jsx)("a",{children:(0,n.__)(t.post_title,"cozy-addons")})}),(e.enableOptions.postAuthor||e.enableOptions.postComments||e.enableOptions.postDate)&&(0,d.jsxs)("div",{className:"post__meta",children:[e.enableOptions.postAuthor&&(0,d.jsxs)("a",{className:"post__author display-flex",children:[e.enableOptions?.enableMetaIcon&&(0,d.jsx)("svg",{width:16,height:16,xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,viewBox:"0 0 12 15",children:(0,d.jsx)("path",{d:"M11.2972 14.6667H0.630493V13.3333C0.630493 12.4493 0.981683 11.6014 1.6068 10.9763C2.23193 10.3512 3.07977 10 3.96383 10H7.96383C8.84788 10 9.69573 10.3512 10.3208 10.9763C10.946 11.6014 11.2972 12.4493 11.2972 13.3333V14.6667ZM5.96383 8.66667C5.43854 8.66667 4.9184 8.5632 4.43309 8.36218C3.94779 8.16117 3.50683 7.86653 3.1354 7.49509C2.76396 7.12366 2.46933 6.6827 2.26831 6.1974C2.06729 5.7121 1.96383 5.19195 1.96383 4.66667C1.96383 4.14138 2.06729 3.62124 2.26831 3.13593C2.46933 2.65063 2.76396 2.20967 3.1354 1.83824C3.50683 1.4668 3.94779 1.17217 4.43309 0.971148C4.9184 0.770129 5.43854 0.666666 5.96383 0.666666C7.02469 0.666666 8.04211 1.08809 8.79225 1.83824C9.5424 2.58838 9.96383 3.6058 9.96383 4.66667C9.96383 5.72753 9.5424 6.74495 8.79225 7.49509C8.04211 8.24524 7.02469 8.66667 5.96383 8.66667Z"})}),(0,d.jsx)("p",{children:(0,n.__)(t.post_author_name,"cozy-addons")})]}),e.enableOptions.postComments&&(0,d.jsxs)("a",{className:"post__comments display-flex",children:[e.enableOptions?.enableMetaIcon&&(0,d.jsx)("svg",{width:16,height:16,xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,viewBox:"0 0 25 20",children:(0,d.jsx)("path",{d:"M18.0556 6.94444C18.0556 3.10764 14.0148 0 9.02778 0C4.0408 0 0 3.10764 0 6.94444C0 8.43316 0.611979 9.80469 1.64931 10.9375C1.06771 12.2483 0.108507 13.2899 0.0954861 13.3029C0 13.4028 -0.0260417 13.5503 0.0303819 13.6806C0.0868056 13.8108 0.208333 13.8889 0.347222 13.8889C1.93576 13.8889 3.25087 13.355 4.19705 12.8038C5.59462 13.4852 7.24826 13.8889 9.02778 13.8889C14.0148 13.8889 18.0556 10.7812 18.0556 6.94444ZM23.3507 16.4931C24.388 15.3646 25 13.9887 25 12.5C25 9.59635 22.678 7.10937 19.388 6.07205C19.4271 6.35851 19.4444 6.6493 19.4444 6.94444C19.4444 11.5408 14.77 15.2778 9.02778 15.2778C8.55903 15.2778 8.1033 15.2431 7.65191 15.1953C9.0191 17.691 12.2309 19.4444 15.9722 19.4444C17.7517 19.4444 19.4054 19.0451 20.8029 18.3594C21.7491 18.9106 23.0642 19.4444 24.6528 19.4444C24.7917 19.4444 24.9175 19.362 24.9696 19.2361C25.026 19.1102 25 18.9627 24.9045 18.8585C24.8915 18.8455 23.9323 17.8082 23.3507 16.4931Z"})}),(0,d.jsx)("p",{children:parseInt(t.comment_count)>0?(0,n.__)(t.comment_count,"cozy-addons"):"No Comments!"})]}),e.enableOptions.postDate&&(0,d.jsxs)("a",{className:"post__date display-flex",children:[e.enableOptions?.enableMetaIcon&&(0,d.jsx)("svg",{width:16,height:16,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 18","aria-hidden":!0,children:(0,d.jsx)("path",{d:"M7.66699 10.6666C7.43088 10.6666 7.23296 10.5868 7.07324 10.427C6.91352 10.2673 6.83366 10.0694 6.83366 9.83329C6.83366 9.59718 6.91352 9.39927 7.07324 9.23954C7.23296 9.07982 7.43088 8.99996 7.66699 8.99996C7.9031 8.99996 8.10102 9.07982 8.26074 9.23954C8.42046 9.39927 8.50033 9.59718 8.50033 9.83329C8.50033 10.0694 8.42046 10.2673 8.26074 10.427C8.10102 10.5868 7.9031 10.6666 7.66699 10.6666ZM4.33366 10.6666C4.09755 10.6666 3.89963 10.5868 3.73991 10.427C3.58019 10.2673 3.50033 10.0694 3.50033 9.83329C3.50033 9.59718 3.58019 9.39927 3.73991 9.23954C3.89963 9.07982 4.09755 8.99996 4.33366 8.99996C4.56977 8.99996 4.76769 9.07982 4.92741 9.23954C5.08713 9.39927 5.16699 9.59718 5.16699 9.83329C5.16699 10.0694 5.08713 10.2673 4.92741 10.427C4.76769 10.5868 4.56977 10.6666 4.33366 10.6666ZM11.0003 10.6666C10.7642 10.6666 10.5663 10.5868 10.4066 10.427C10.2469 10.2673 10.167 10.0694 10.167 9.83329C10.167 9.59718 10.2469 9.39927 10.4066 9.23954C10.5663 9.07982 10.7642 8.99996 11.0003 8.99996C11.2364 8.99996 11.4344 9.07982 11.5941 9.23954C11.7538 9.39927 11.8337 9.59718 11.8337 9.83329C11.8337 10.0694 11.7538 10.2673 11.5941 10.427C11.4344 10.5868 11.2364 10.6666 11.0003 10.6666ZM7.66699 14C7.43088 14 7.23296 13.9201 7.07324 13.7604C6.91352 13.6007 6.83366 13.4027 6.83366 13.1666C6.83366 12.9305 6.91352 12.7326 7.07324 12.5729C7.23296 12.4132 7.43088 12.3333 7.66699 12.3333C7.9031 12.3333 8.10102 12.4132 8.26074 12.5729C8.42046 12.7326 8.50033 12.9305 8.50033 13.1666C8.50033 13.4027 8.42046 13.6007 8.26074 13.7604C8.10102 13.9201 7.9031 14 7.66699 14ZM4.33366 14C4.09755 14 3.89963 13.9201 3.73991 13.7604C3.58019 13.6007 3.50033 13.4027 3.50033 13.1666C3.50033 12.9305 3.58019 12.7326 3.73991 12.5729C3.89963 12.4132 4.09755 12.3333 4.33366 12.3333C4.56977 12.3333 4.76769 12.4132 4.92741 12.5729C5.08713 12.7326 5.16699 12.9305 5.16699 13.1666C5.16699 13.4027 5.08713 13.6007 4.92741 13.7604C4.76769 13.9201 4.56977 14 4.33366 14ZM11.0003 14C10.7642 14 10.5663 13.9201 10.4066 13.7604C10.2469 13.6007 10.167 13.4027 10.167 13.1666C10.167 12.9305 10.2469 12.7326 10.4066 12.5729C10.5663 12.4132 10.7642 12.3333 11.0003 12.3333C11.2364 12.3333 11.4344 12.4132 11.5941 12.5729C11.7538 12.7326 11.8337 12.9305 11.8337 13.1666C11.8337 13.4027 11.7538 13.6007 11.5941 13.7604C11.4344 13.9201 11.2364 14 11.0003 14ZM1.83366 17.3333C1.37533 17.3333 0.982964 17.1701 0.656576 16.8437C0.330187 16.5173 0.166992 16.125 0.166992 15.6666V3.99996C0.166992 3.54163 0.330187 3.14926 0.656576 2.82288C0.982964 2.49649 1.37533 2.33329 1.83366 2.33329H2.66699V0.666626H4.33366V2.33329H11.0003V0.666626H12.667V2.33329H13.5003C13.9587 2.33329 14.351 2.49649 14.6774 2.82288C15.0038 3.14926 15.167 3.54163 15.167 3.99996V15.6666C15.167 16.125 15.0038 16.5173 14.6774 16.8437C14.351 17.1701 13.9587 17.3333 13.5003 17.3333H1.83366ZM1.83366 15.6666H13.5003V7.33329H1.83366V15.6666Z"})}),(0,d.jsx)("p",{children:(0,n.__)(t.post_date_formatted,"cozy-addons")})]})]}),e.enableOptions.postContent&&(0,d.jsxs)("div",{className:"post__content",children:[t.post_excerpt.length>0&&(0,d.jsx)("p",{children:t.post_excerpt}),t.post_excerpt.length<=0&&(0,d.jsx)("p",{dangerouslySetInnerHTML:{__html:o}}),e.enableOptions.readMore&&(0,d.jsx)("span",{className:"post__read-more",children:(0,d.jsx)("a",{className:"post__read-more-link",children:(0,n.__)("Read More","cozy-addons")})})]})]})]})})})),B=window.wp.data,$=(0,r.memo)((({attributes:e,setAttributes:t})=>{const o=function(){let e=[{label:"Default",value:""}];if("object"==typeof cozyBlockAssets.googleFonts)for(let t in cozyBlockAssets.googleFonts)e.push({label:cozyBlockAssets.googleFonts[t],value:t});return e}(),a=(0,B.select)("core/editor").getEditorSettings().colors,l=(0,j.useQuery)(["postCategories"],(()=>async function(){try{return await z()({path:"/cozy-block/v1/post-categories?per_page=-1"})}catch(e){return console.log("Error fetching post categories..."),[]}}())),O=(0,j.useQuery)(["stickyPosts"],(()=>async function(){try{return await z()({path:"/cozy-block/v1/posts/sticky"})}catch(e){return console.log("Unable to fetch sticky posts..."),[]}}())),S=(0,j.useQuery)(["postsCollection"],(()=>P())),M=function(e){if(e&&e.length>0){let t=[{label:(0,n.__)("--Select a Category--","cozy-addons"),value:"",disabled:!0}];return t=[...t,...e.map((e=>({label:e.cat_name,value:e.cat_ID})))],t}return[]}(l.data);let T=[{label:(0,n.__)("--Select a Featured Post--"),value:"",disabled:!0}];if("latest"===e.sortBy){const e=O.data&&O.data.map((e=>({label:(0,n.__)(e.post_title,"cozy-addons"),value:e.ID})));e&&(T=[...T,...e])}else{const t=O.data&&O.data.filter((t=>t.post_categories.some((t=>t.ID===parseInt(e.selectedCategory))))).map((e=>({label:(0,n.__)(e.post_title,"cozy-addons"),value:e.ID})));t&&(T=[...T,...t])}let $=[{label:(0,n.__)("--Select a Featured Post--"),value:"",disabled:!0}];if("latest"===e.sortBy){const e=S.data&&S.data.map((e=>({label:(0,n.__)(e.post_title,"cozy-addons"),value:e.ID})));e&&($=[...$,...e])}else{const t=S.data&&S.data.filter((t=>t.post_categories.some((t=>t.ID===parseInt(e.selectedCategory))))).map((e=>({label:(0,n.__)(e.post_title,"cozy-addons"),value:e.ID})));t&&($=[...$,...t])}const[L,k]=(0,r.useState)("general");return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(s.InspectorControls,{group:"settings",children:[(0,d.jsxs)(i.PanelBody,{title:(0,n.__)("General Options","cozy-addons"),opened:"general"===L,onToggle:()=>k("general"),children:[(0,d.jsx)(i.SelectControl,{label:(0,n.__)("Layout","cozy-addons"),options:[{label:(0,n.__)("Grid with Featured Post","cozy-addons"),value:"grid-featured"},{label:(0,n.__)("List with Featured Post","cozy-addons"),value:"list-featured"},{label:(0,n.__)("Grid","cozy-addons"),value:"grid"},{label:(0,n.__)("List","cozy-addons"),value:"list"}],value:e.layout,onChange:o=>{switch(o){case"grid-featured":t({...e,layout:o,featuredPostOptions:{...e.featuredPostOptions,enabled:!0,position:"left"},postOptions:{...e.postOptions,column:2,invert:!1,masonry:!1,image:{...e.postOptions.image,width:"",height:"220px"}}});break;case"grid":t({...e,layout:o,featuredPostOptions:{...e.featuredPostOptions,enabled:!1},postOptions:{...e.postOptions,column:2,invert:!1,masonry:!1,image:{...e.postOptions.image,width:"",height:"220px"}}});break;case"list-featured":t({...e,layout:o,featuredPostOptions:{...e.featuredPostOptions,enabled:!0,position:"left"},postOptions:{...e.postOptions,column:1,invert:!0,masonry:!1,image:{...e.postOptions.image,width:"30%",height:"200px"}}});break;case"list":t({...e,layout:o,featuredPostOptions:{...e.featuredPostOptions,enabled:!1},postOptions:{...e.postOptions,column:2,invert:!0,masonry:!1,image:{...e.postOptions.image,width:"30%",height:"200px"}}})}}}),(0,d.jsx)(i.SelectControl,{label:(0,n.__)("Posts Sort By","cozy-addons"),options:[{label:(0,n.__)("Latest","cozy-addons"),value:"latest"},{label:(0,n.__)("Category","cozy-addons"),value:"category"}],value:e.sortBy,onChange:o=>t({...e,sortBy:o})}),"category"===e.sortBy&&(0,d.jsx)(i.SelectControl,{label:(0,n.__)("Post Category","cozy-addons"),options:M,value:e.selectedCategory,onChange:o=>t({...e,selectedCategory:o,featuredPostOptions:{...e.featuredPostOptions,postID:""}})}),(0,d.jsx)(i.ToggleControl,{label:(0,n.__)("Enable Featured Post","cozy-addons"),checked:e.featuredPostOptions.enabled,onChange:o=>t({...e,featuredPostOptions:{...e.featuredPostOptions,enabled:o}})}),e.featuredPostOptions.enabled&&(0,d.jsxs)(i.__experimentalToggleGroupControl,{label:(0,n.__)("Featured Post Position","cozy-addons"),isBlock:!0,value:e.featuredPostOptions.position,onChange:o=>t({...e,featuredPostOptions:{...e.featuredPostOptions,position:o}}),children:[(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Left","cozy-addons"),value:"left",icon:c}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Right","cozy-addons"),value:"right",icon:u})]}),!e.featuredPostOptions.enabled&&(0,d.jsx)(i.ToggleControl,{label:(0,n.__)("Enable Ajax Loader","cozy-addons"),checked:e.ajaxLoader.enabled,onChange:o=>t({...e,ajaxLoader:{...e.ajaxLoader,enabled:o}})})]}),(0,d.jsxs)(i.PanelBody,{title:(0,n.__)("Query Options","cozy-addons"),opened:"query-options"===L,onToggle:()=>k("query-options"),children:[(0,d.jsx)(i.ToggleControl,{label:(0,n.__)("Heading","cozy-addons"),checked:e.enableOptions.heading,onChange:o=>t({...e,enableOptions:{...e.enableOptions,heading:o}})}),(0,d.jsx)(i.ToggleControl,{label:(0,n.__)("Sub Heading","cozy-addons"),checked:e.enableOptions.subHeading,onChange:o=>t({...e,enableOptions:{...e.enableOptions,subHeading:o}})}),(0,d.jsx)(i.RangeControl,{label:(0,n.__)("Posts Per Page","cozy-addons"),min:-1,max:50,step:1,value:e.perPage,onChange:o=>t({...e,perPage:o}),help:(0,n.__)("*Note: Set the value to -1 to fetch all posts.","cozy-addons")}),(0,d.jsx)(i.ToggleControl,{label:(0,n.__)("Hide Sticky Posts","cozy-addons"),checked:e.enableOptions.ignoreSticky,onChange:o=>t({...e,enableOptions:{...e.enableOptions,ignoreSticky:o}})}),(0,d.jsx)(i.ToggleControl,{label:(0,n.__)("Post Image","cozy-addons"),checked:e.enableOptions.postImage,onChange:o=>t({...e,enableOptions:{...e.enableOptions,postImage:o}})}),e.enableOptions.postImage&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(i.ToggleControl,{label:(0,n.__)("Link Image to Post","cozy-addons"),checked:e.enableOptions?.imgLinkPost,onChange:o=>t({...e,enableOptions:{...e.enableOptions,imgLinkPost:o}})}),e.enableOptions?.imgLinkPost&&(0,d.jsx)(i.ToggleControl,{label:(0,n.__)("Open link in new tab","cozy-addons"),checked:e.enableOptions?.imgLinkNewTab,onChange:o=>t({...e,enableOptions:{...e.enableOptions,imgLinkNewTab:o}})})]}),(0,d.jsx)(i.ToggleControl,{label:(0,n.__)("Link Title to Post","cozy-addons"),checked:e.enableOptions?.titleLinkPost,onChange:o=>t({...e,enableOptions:{...e.enableOptions,titleLinkPost:o}})}),e.enableOptions?.titleLinkPost&&(0,d.jsx)(i.ToggleControl,{label:(0,n.__)("Open link in new tab","cozy-addons"),checked:e.enableOptions?.titleLinkNewTab,onChange:o=>t({...e,enableOptions:{...e.enableOptions,titleLinkNewTab:o}})}),(0,d.jsx)(i.TabPanel,{className:"cozy-tab-panel",tabs:[{name:"cozy-tab__one",title:(0,n.__)("Default","cozy-addons"),className:"cozy-tab-one"},{name:"cozy-tab__two",title:(0,n.__)("Featured","cozy-addons"),className:"cozy-tab-two"}],activeClass:"active-tab",children:o=>(0,d.jsxs)(d.Fragment,{children:["cozy-tab__one"===o.name&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(i.ToggleControl,{label:(0,n.__)("Post Categories","cozy-addons"),checked:e.enableOptions.postCategories,onChange:o=>t({...e,enableOptions:{...e.enableOptions,postCategories:o}})}),(e.enableOptions.postCategories||e.enableOptions?.featuredPostCategories)&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(i.ToggleControl,{label:(0,n.__)("Link Categories","cozy-addons"),checked:e.enableOptions?.linkCat,onChange:o=>t({...e,enableOptions:{...e.enableOptions,linkCat:o}})}),e.enableOptions?.linkCat&&(0,d.jsx)(i.ToggleControl,{label:(0,n.__)("Open link in new tab","cozy-addons"),checked:e.enableOptions?.catNewTab,onChange:o=>t({...e,enableOptions:{...e.enableOptions,catNewTab:o}})})]}),(0,d.jsx)(i.ToggleControl,{label:(0,n.__)("Post Author","cozy-addons"),checked:e.enableOptions.postAuthor,onChange:o=>t({...e,enableOptions:{...e.enableOptions,postAuthor:o}})}),(0,d.jsx)(i.ToggleControl,{label:(0,n.__)("Post Comments","cozy-addons"),checked:e.enableOptions.postComments,onChange:o=>t({...e,enableOptions:{...e.enableOptions,postComments:o}})}),(0,d.jsx)(i.ToggleControl,{label:(0,n.__)("Post Date","cozy-addons"),checked:e.enableOptions.postDate,onChange:o=>t({...e,enableOptions:{...e.enableOptions,postDate:o}})}),(e.enableOptions.postAuthor||e.enableOptions.postComments||e.enableOptions.postDate)&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(i.ToggleControl,{label:(0,n.__)("Enable Post Meta Icon","cozy-addons"),checked:e.enableOptions?.enableMetaIcon,onChange:o=>t({...e,enableOptions:{...e.enableOptions,enableMetaIcon:o}})}),(0,d.jsx)(i.ToggleControl,{label:(0,n.__)("Link Post Meta","cozy-addons"),checked:e.enableOptions?.linkPostMeta,onChange:o=>t({...e,enableOptions:{...e.enableOptions,linkPostMeta:o}})}),e.enableOptions?.linkPostMeta&&(0,d.jsx)(i.ToggleControl,{label:(0,n.__)("Open link in new tab","cozy-addons"),checked:e.enableOptions?.postMetaNewTab,onChange:o=>t({...e,enableOptions:{...e.enableOptions,postMetaNewTab:o}})})]}),(0,d.jsx)(i.ToggleControl,{label:(0,n.__)("Post Content","cozy-addons"),checked:e.enableOptions.postContent,onChange:o=>t({...e,enableOptions:{...e.enableOptions,postContent:o}})}),e.enableOptions.postContent&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(i.RangeControl,{label:(0,n.__)("Post Excerpt","cozy-addons"),min:10,max:200,step:1,value:e.enableOptions.postExcerpt,onChange:o=>t({...e,enableOptions:{...e.enableOptions,postExcerpt:Math.abs(o)}})}),(0,d.jsx)(i.ToggleControl,{label:(0,n.__)("Read More","cozy-addons"),checked:e.enableOptions.readMore,onChange:o=>t({...e,enableOptions:{...e.enableOptions,readMore:o}})}),e.enableOptions.readMore&&(0,d.jsx)(i.ToggleControl,{label:(0,n.__)("Open link in new tab","cozy-addons"),checked:e.enableOptions?.readMoreNewTab,onChange:o=>t({...e,enableOptions:{...e.enableOptions,readMoreNewTab:o}})})]}),(0,d.jsx)(i.TextareaControl,{label:(0,n.__)("Exclude Posts","cozy-addons"),value:e?.exclude,onChange:o=>t({...e,exclude:o}),help:(0,n.__)("Enter values in comma separated format.","cozy-addons")}),(0,d.jsx)(i.TextControl,{label:(0,n.__)("Post Offset","cozy-addons"),min:0,value:e?.offset,onChange:o=>t({...e,offset:o})})]}),"cozy-tab__two"===o.name&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(i.ToggleControl,{label:(0,n.__)("Featured Post Categories","cozy-addons"),checked:e.enableOptions?.featuredPostCategories,onChange:o=>t({...e,enableOptions:{...e.enableOptions,featuredPostCategories:o}})}),e.enableOptions?.featuredPostCategories&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(i.ToggleControl,{label:(0,n.__)("Link Categories","cozy-addons"),checked:e.enableOptions?.linkCat,onChange:o=>t({...e,enableOptions:{...e.enableOptions,linkCat:o}})}),e.enableOptions?.linkCat&&(0,d.jsx)(i.ToggleControl,{label:(0,n.__)("Open link in new tab","cozy-addons"),checked:e.enableOptions?.catNewTab,onChange:o=>t({...e,enableOptions:{...e.enableOptions,catNewTab:o}})})]}),(0,d.jsx)(i.ToggleControl,{label:(0,n.__)("Post Author","cozy-addons"),checked:e.enableOptions?.featuredPostAuthor,onChange:o=>t({...e,enableOptions:{...e.enableOptions,featuredPostAuthor:o}})}),(0,d.jsx)(i.ToggleControl,{label:(0,n.__)("Post Comments","cozy-addons"),checked:e.enableOptions?.featuredPostComments,onChange:o=>t({...e,enableOptions:{...e.enableOptions,featuredPostComments:o}})}),(0,d.jsx)(i.ToggleControl,{label:(0,n.__)("Post Date","cozy-addons"),checked:e.enableOptions?.featuredPostDate,onChange:o=>t({...e,enableOptions:{...e.enableOptions,featuredPostDate:o}})}),(e.enableOptions?.featuredPostAuthor||e.enableOptions?.featuredPostComments||e.enableOptions?.featuredPostDate)&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(i.ToggleControl,{label:(0,n.__)("Enable Post Meta Icon","cozy-addons"),checked:e.enableOptions?.enableFeaturedMetaIcon,onChange:o=>t({...e,enableOptions:{...e.enableOptions,enableFeaturedMetaIcon:o}})}),(0,d.jsx)(i.ToggleControl,{label:(0,n.__)("Link Post Meta","cozy-addons"),checked:e.enableOptions?.linkPostMeta,onChange:o=>t({...e,enableOptions:{...e.enableOptions,linkPostMeta:o}})}),e.enableOptions?.linkPostMeta&&(0,d.jsx)(i.ToggleControl,{label:(0,n.__)("Open link in new tab","cozy-addons"),checked:e.enableOptions?.postMetaNewTab,onChange:o=>t({...e,enableOptions:{...e.enableOptions,postMetaNewTab:o}})})]}),(0,d.jsx)(i.ToggleControl,{label:(0,n.__)("Post Content","cozy-addons"),checked:e.enableOptions?.featuredPostContent,onChange:o=>t({...e,enableOptions:{...e.enableOptions,featuredPostContent:o}})}),e.enableOptions?.featuredPostContent&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(i.RangeControl,{label:(0,n.__)("Featured Post Excerpt","cozy-addons"),min:10,max:200,step:1,value:e.enableOptions.featuredPostExcerpt,onChange:o=>t({...e,enableOptions:{...e.enableOptions,featuredPostExcerpt:Math.abs(o)}})}),(0,d.jsx)(i.ToggleControl,{label:(0,n.__)("Read More","cozy-addons"),checked:e.enableOptions?.featuredReadMore,onChange:o=>t({...e,enableOptions:{...e.enableOptions,featuredReadMore:o}})}),e.enableOptions?.featuredReadMore&&(0,d.jsx)(i.ToggleControl,{label:(0,n.__)("Open link in new tab","cozy-addons"),checked:e.enableOptions?.readMoreNewTab,onChange:o=>t({...e,enableOptions:{...e.enableOptions,readMoreNewTab:o}})})]})]})]})})]}),(e.enableOptions.heading||e.enableOptions.subHeading)&&(0,d.jsxs)(i.PanelBody,{title:(0,n.__)("Header Options","cozy-addons"),opened:"header-options"===L,onToggle:()=>k("header-options"),children:[e.enableOptions.heading&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(i.SelectControl,{label:(0,n.__)("Heading Tag","cozy-addons"),options:H,value:e.headingTag,onChange:o=>t({...e,headingTag:o})}),(0,d.jsx)(i.TextControl,{label:(0,n.__)("Heading Label","cozy-addons"),value:e.headingLabel,onChange:o=>t({...e,headingLabel:o})})]}),e.enableOptions.subHeading&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(i.SelectControl,{label:(0,n.__)("Sub Heading Tag","cozy-addons"),options:H,value:e.subHeading.tag,onChange:o=>t({...e,subHeading:{...e.subHeading,tag:o}})}),(0,d.jsx)(i.TextControl,{label:(0,n.__)("Sub Heading Label","cozy-addons"),value:e.subHeading.label,onChange:o=>t({...e,subHeading:{...e.subHeading,label:o}})})]}),(0,d.jsxs)(i.__experimentalToggleGroupControl,{label:(0,n.__)("Heading Alignment","cozy-addons"),isBlock:!0,value:e.headerBox.tabAlign,onChange:o=>t({...e,headerBox:{...e.headerBox,tabAlign:o}}),children:[(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Left","cozy-addons"),value:"left",icon:c}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Center","cozy-addons"),value:"center",icon:p}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Right","cozy-addons"),value:"Right",icon:u}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Space Between","cozy-addons"),value:"space-between",icon:h})]}),"space-between"!==e.headerBox.tabAlign&&(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Gap","cozy-addons"),value:e.headingGap,onChange:o=>t({...e,headingGap:o})})})]}),e.featuredPostOptions.enabled&&(0,d.jsxs)(i.PanelBody,{title:(0,n.__)("Featured Post Options","cozy-addons"),opened:"featured-post-options"===L,onToggle:()=>k("featured-post-options"),children:[(0,d.jsx)(i.SelectControl,{label:(0,n.__)("Source","cozy-addons"),options:[{label:(0,n.__)("Latest","cozy-addons"),value:"default"},{label:(0,n.__)("Sticky","cozy-addons"),value:"sticky"},{label:(0,n.__)("Custom","cozy-addons"),value:"custom"}],value:e.featuredPostOptions.source,onChange:o=>{t("default"===o?{...e,featuredPostOptions:{...e.featuredPostOptions,source:o,postID:""}}:{...e,featuredPostOptions:{...e.featuredPostOptions,source:o}})}}),"sticky"===e.featuredPostOptions.source&&T.length>0&&(0,d.jsx)(i.SelectControl,{label:(0,n.__)("Sticky Posts","cozy-addons"),options:T,value:e.featuredPostOptions.postID,onChange:o=>t({...e,featuredPostOptions:{...e.featuredPostOptions,postID:o}})}),"custom"===e.featuredPostOptions.source&&$.length>0&&(0,d.jsx)(i.SelectControl,{label:(0,n.__)("Sticky Posts","cozy-addons"),options:$,value:e.featuredPostOptions.postID,onChange:o=>t({...e,featuredPostOptions:{...e.featuredPostOptions,postID:o}})}),(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Row Gap","cozy-addons"),value:e.featuredPostOptions.rowGap,onChange:o=>t({...e,featuredPostOptions:{...e.featuredPostOptions,rowGap:o}})})}),(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Column Gap","cozy-addons"),value:e.featuredPostOptions.columnGap,onChange:o=>t({...e,featuredPostOptions:{...e.featuredPostOptions,columnGap:o}})})}),(0,d.jsxs)(i.__experimentalToggleGroupControl,{label:(0,n.__)("Text Alignment","cozy-addons"),value:e.featuredPostOptions.textAlign,onChange:o=>t({...e,featuredPostOptions:{...e.featuredPostOptions,textAlign:o}}),children:[(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Left","cozy-addons"),value:"left",icon:g}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Center","cozy-addons"),value:"center",icon:f}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Right","cozy-addons"),value:"right",icon:_})]})]}),(0,d.jsxs)(i.PanelBody,{title:(0,n.__)("Post Options","cozy-addons"),opened:"post-options"===L,onToggle:()=>k("post-options"),children:[(0,d.jsx)(i.RangeControl,{label:(0,n.__)("Column","cozy-addons"),min:1,max:20,step:1,value:e.postOptions.column,onChange:o=>t({...e,postOptions:{...e.postOptions,column:o}})}),(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Column Gap","cozy-addons"),value:e.postOptions.gap,onChange:o=>t({...e,postOptions:{...e.postOptions,gap:o}})})}),(0,d.jsx)(i.ToggleControl,{label:(0,n.__)("Masonry","cozy-addons"),checked:e.postOptions.masonry,onChange:o=>t({...e,postOptions:{...e.postOptions,masonry:o}})}),(0,d.jsx)(i.ToggleControl,{label:(0,n.__)("Invert Layout","cozy-addons"),checked:e.postOptions.invert,onChange:o=>t({...e,postOptions:{...e.postOptions,invert:o}})}),e.postOptions.invert&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Content HGap","cozy-addons"),value:e.postOptions.content.gap,onChange:o=>t({...e,postOptions:{...e.postOptions,content:{...e.postOptions.content,gap:o}}})})}),(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Content VGap","cozy-addons"),value:e.postOptions.content?.rowGap,onChange:o=>t({...e,postOptions:{...e.postOptions,content:{...e.postOptions.content,rowGap:o}}})})})]}),(0,d.jsxs)(i.__experimentalToggleGroupControl,{label:(0,n.__)("Text Alignment","cozy-addons"),value:e.postOptions.textAlign,onChange:o=>t({...e,postOptions:{...e.postOptions,textAlign:o}}),children:[(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Left","cozy-addons"),value:"left",icon:g}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Center","cozy-addons"),value:"center",icon:f}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Right","cozy-addons"),value:"right",icon:_})]})]}),!e.featuredPostOptions.enabled&&e.ajaxLoader.enabled&&(0,d.jsxs)(i.PanelBody,{title:(0,n.__)("Ajax Loader Options","cozy-addons"),opened:"ajax-loader-options"===L,onToggle:()=>k("ajax-loader-options"),children:[(0,d.jsxs)(i.__experimentalToggleGroupControl,{label:(0,n.__)("Loader Type","cozy-addons"),isBlock:!0,value:e.ajaxLoader.type,onChange:o=>t({...e,ajaxLoader:{...e.ajaxLoader,type:o}}),children:[(0,d.jsx)(i.__experimentalToggleGroupControlOption,{label:(0,n.__)("Button","cozy-addons"),value:"default"}),(0,d.jsx)(i.__experimentalToggleGroupControlOption,{label:(0,n.__)("Scroll","cozy-addons"),value:"scroll"})]}),(0,d.jsx)(i.RangeControl,{label:(0,n.__)("Load More Content","cozy-addons"),min:1,max:10,step:1,value:e.ajaxLoader.content,onChange:o=>t({...e,ajaxLoader:{...e.ajaxLoader,content:o}})}),"default"===e.ajaxLoader.type&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(i.TextControl,{label:(0,n.__)("Button Label","cozy-addons"),value:e.ajaxLoader.label,onChange:o=>t({...e,ajaxLoader:{...e.ajaxLoader,label:o}})}),(0,d.jsxs)(i.__experimentalToggleGroupControl,{label:(0,n.__)("Alignment","cozy-addons"),value:e.ajaxLoader.textAlign,onChange:o=>t({...e,ajaxLoader:{...e.ajaxLoader,textAlign:o}}),children:[(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Left","cozy-addons"),value:"left",icon:c}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Center","cozy-addons"),value:"center",icon:p}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Right","cozy-addons"),value:"right",icon:u})]})]}),(0,d.jsx)(i.TextControl,{label:(0,n.__)("Loading Text","cozy-addons"),value:e.ajaxLoader.loadingText,onChange:o=>t({...e,ajaxLoader:{...e.ajaxLoader,loadingText:o}})})]})]},"setting"),(0,d.jsxs)(s.InspectorControls,{group:"styles",children:[(0,d.jsxs)(i.PanelBody,{title:(0,n.__)("Header Box Styles","cozy-addons"),opened:"header-box-styles"===L,onToggle:()=>k("header-box-styles"),children:[(0,d.jsxs)(i.BaseControl,{className:"cozy-box-control",children:[(0,d.jsx)(i.BaseControl.VisualLabel,{children:(0,n.__)("Padding","cozy-addons")}),(0,d.jsx)(i.__experimentalBoxControl,{label:"",resetValues:{top:"0",right:"0",bottom:"0",left:"0"},inputProps:{max:300},values:e.headerBox.padding,onChange:o=>t({...e,headerBox:{...e.headerBox,padding:o}})})]}),(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Margin Top","cozy-addons"),value:e.headerBox.margin.top,onChange:o=>t({...e,headerBox:{...e.headerBox,margin:{...e.headerBox.margin,top:o}}})})}),(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Margin Bottom","cozy-addons"),value:e.headerBox.margin.bottom,onChange:o=>t({...e,headerBox:{...e.headerBox,margin:{...e.headerBox.margin,bottom:o}}})})}),(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(i.__experimentalBorderBoxControl,{className:"cozy-border-box-control",enableAlpha:!0,colors:a,label:(0,n.__)("Border","cozy-addons"),value:e.headerBox.border,onChange:o=>t({...e,headerBox:{...e.headerBox,border:o}})})}),(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Border Radius","cozy-addons"),value:e.headerBox.radius,onChange:o=>t({...e,headerBox:{...e.headerBox,radius:o}})})}),(0,d.jsx)(s.PanelColorSettings,{className:"cozy-color-control",enableAlpha:!0,title:(0,n.__)("Color","cozy-addons"),colorSettings:[{label:(0,n.__)("Background","cozy-addons"),value:e.headerBox.color.bg,onChange:o=>t({...e,headerBox:{...e.headerBox,color:{...e.headerBox.color,bg:o}}})}]})]}),e.enableOptions.heading&&(0,d.jsxs)(i.PanelBody,{title:(0,n.__)("Heading Styles","cozy-addons"),opened:"heading-styles"===L,onToggle:()=>k("heading-styles"),children:[(0,d.jsxs)(i.BaseControl,{className:"cozy-box-control",children:[(0,d.jsx)(i.BaseControl.VisualLabel,{children:(0,n.__)("Padding","cozy-addons")}),(0,d.jsx)(i.__experimentalBoxControl,{label:"",resetValues:{top:"0",right:"0",bottom:"0",left:"0"},inputProps:{max:300},values:e.headingStyles.padding,onChange:o=>t({...e,headingStyles:{...e.headingStyles,padding:o}})})]}),(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(i.__experimentalBorderBoxControl,{className:"cozy-border-box-control",enableAlpha:!0,colors:a,label:(0,n.__)("Border","cozy-addons"),value:e.headingStyles.border,onChange:o=>t({...e,headingStyles:{...e.headingStyles,border:o}})})}),(0,d.jsxs)(i.BaseControl,{className:"cozy-box-control",children:[(0,d.jsx)(i.BaseControl.VisualLabel,{children:(0,n.__)("Border Radius","cozy-addons")}),(0,d.jsx)(i.__experimentalBoxControl,{label:"",resetValues:{top:"0",right:"0",bottom:"0",left:"0"},values:e.headingStyles.radius,onChange:o=>t({...e,headingStyles:{...e.headingStyles,radius:o}})})]}),(0,d.jsx)(i.TextareaControl,{label:(0,n.__)("Clip Path","cozy-addons"),value:e.headingStyles.clipPath,onChange:o=>t({...e,headingStyles:{...e.headingStyles,clipPath:o}})}),(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Font Size","cozy-addons"),value:e.headingStyles.font.size,onChange:o=>t({...e,headingStyles:{...e.headingStyles,font:{...e.headingStyles.font,size:o}}})})}),(0,d.jsx)(i.SelectControl,{label:(0,n.__)("Font Family","cozy-addons"),options:o,value:e.headingStyles.font.family,onChange:o=>t({...e,headingStyles:{...e.headingStyles,font:{...e.headingStyles.font,family:o}}})}),(0,d.jsx)(i.SelectControl,{label:(0,n.__)("Font Weight","cozy-addons"),options:w,value:e.headingStyles.font.weight,onChange:o=>t({...e,headingStyles:{...e.headingStyles,font:{...e.headingStyles.font,weight:o}}})}),(0,d.jsxs)("div",{className:"components-base-control",style:{display:"flex",justifyContent:"space-between",gap:"10px"},children:[(0,d.jsx)("div",{style:{width:"100%"},children:(0,d.jsxs)(i.__experimentalToggleGroupControl,{label:(0,n.__)("Letter Case","cozy-addons"),value:e.headingStyles?.letterCase,onChange:o=>t({...e,headingStyles:{...e.headingStyles,letterCase:o}}),children:[(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("None","cozy-addons"),value:"none",icon:x}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Uppercase","cozy-addons"),value:"uppercase",icon:b}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Lowercase","cozy-addons"),value:"lowercase",icon:y}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Capitalize","cozy-addons"),value:"capitalize",icon:m})]})}),(0,d.jsx)("div",{style:{width:"100%"},children:(0,d.jsxs)(i.__experimentalToggleGroupControl,{label:(0,n.__)("Decoration","cozy-addons"),value:e.headingStyles?.decoration,onChange:o=>t({...e,headingStyles:{...e.headingStyles,decoration:o}}),children:[(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("None","cozy-addons"),value:"none",icon:x}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Underline","cozy-addons"),value:"underline",icon:v}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Strikethrough","cozy-addons"),value:"line-through",icon:C})]})})]}),(0,d.jsxs)("div",{className:"components-base-control",style:{display:"flex",justifyContent:"space-between",gap:"10px"},children:[(0,d.jsx)("div",{style:{width:"100%"},children:(0,d.jsx)(i.__experimentalUnitControl,{label:(0,n.__)("Line Height","cozy-addons"),value:e.headingStyles?.lineHeight,onChange:o=>t({...e,headingStyles:{...e.headingStyles,lineHeight:o}})})}),(0,d.jsx)("div",{style:{width:"100%"},children:(0,d.jsx)(i.__experimentalUnitControl,{label:(0,n.__)("Letter Spacing","cozy-addons"),value:e.headingStyles?.letterSpacing,onChange:o=>t({...e,headingStyles:{...e.headingStyles,letterSpacing:o}})})})]}),(0,d.jsx)(s.PanelColorSettings,{className:"cozy-color-control",enableAlpha:!0,title:(0,n.__)("Color","cozy-addons"),colorSettings:[{label:(0,n.__)("Text","cozy-addons"),value:e.headingStyles.color.text,onChange:o=>t({...e,headingStyles:{...e.headingStyles,color:{...e.headingStyles.color,text:o}}})},{label:(0,n.__)("Background","cozy-addons"),value:e.headingStyles.color.bg,onChange:o=>t({...e,headingStyles:{...e.headingStyles,color:{...e.headingStyles.color,bg:o}}})}]})]}),e.enableOptions.subHeading&&(0,d.jsxs)(i.PanelBody,{title:(0,n.__)("Sub Heading Styles","cozy-addons"),opened:"sub-heading-styles"===L,onToggle:()=>k("sub-heading-styles"),children:[(0,d.jsxs)(i.__experimentalToolsPanel,{label:(0,n.__)("Sub Heading","cozy-addons"),resetAll:()=>t({...e,subHeading:{...e.subHeading,padding:{top:"0px",right:"0px",bottom:"0px",left:"0px"},border:{width:"",style:"",color:""},radius:"0px",font:{size:"16px",weight:"500",family:""},letterCase:"none",decoration:"none",lineHeight:"",letterSpacing:""}}),children:[(0,d.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>!!e.subHeading.padding,label:(0,n.__)("Padding","cozy-addons"),onDeselect:()=>t({...e,subHeading:{...e.subHeading,padding:{top:"0px",right:"0px",bottom:"0px",left:"0px"}}}),children:(0,d.jsxs)(i.BaseControl,{className:"cozy-box-control",children:[(0,d.jsx)(i.BaseControl.VisualLabel,{children:(0,n.__)("Padding","cozy-addons")}),(0,d.jsx)(i.__experimentalBoxControl,{label:"",resetValues:{top:"0",right:"0",bottom:"0",left:"0"},inputProps:{max:300},values:e.subHeading.padding,onChange:o=>t({...e,subHeading:{...e.subHeading,padding:o}})})]})}),(0,d.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>!!e.subHeading.border,label:(0,n.__)("Border","cozy-addons"),onDeselect:()=>t({...e,subHeading:{...e.subHeading,border:{width:"",style:"",color:""}}}),children:(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(i.__experimentalBorderControl,{label:(0,n.__)("Border","cozy-addons"),enableAlpha:!0,colors:a,isCompact:!0,value:e.subHeading.border,onChange:o=>t({...e,subHeading:{...e.subHeading,border:o}})})})}),(0,d.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>!!e.subHeading.radius,label:(0,n.__)("Border Radius","cozy-addons"),onDeselect:()=>t({...e,subHeading:{...e.subHeading,radius:"0px"}}),children:(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Border Radius","cozy-addons"),value:e.subHeading.radius,onChange:o=>t({...e,subHeading:{...e.subHeading,radius:o}})})})}),(0,d.jsxs)(i.__experimentalToolsPanelItem,{hasValue:()=>!!e.subHeading.font,label:(0,n.__)("Font","cozy-addons"),onDeselect:()=>t({...e,subHeading:{...e.subHeading,font:{size:"16px",weight:"500",family:""}}}),children:[(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Font Size","cozy-addons"),value:e.subHeading.font.size,onChange:o=>t({...e,subHeading:{...e.subHeading,font:{...e.subHeading.font,size:o}}})})}),(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(i.SelectControl,{label:(0,n.__)("Font Family","cozy-addons"),options:o,value:e.subHeading.font.family,onChange:o=>t({...e,subHeading:{...e.subHeading,font:{...e.subHeading.font,family:o}}})})}),(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(i.SelectControl,{label:(0,n.__)("Font Weight","cozy-addons"),options:w,value:e.subHeading.font.weight,onChange:o=>t({...e,subHeading:{...e.subHeading,font:{...e.subHeading.font,weight:o}}})})})]})]}),(0,d.jsxs)("div",{className:"components-base-control",style:{display:"flex",justifyContent:"space-between",gap:"10px"},children:[(0,d.jsx)("div",{style:{width:"100%"},children:(0,d.jsxs)(i.__experimentalToggleGroupControl,{label:(0,n.__)("Letter Case","cozy-addons"),value:e.subHeading?.letterCase,onChange:o=>t({...e,subHeading:{...e.subHeading,letterCase:o}}),children:[(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("None","cozy-addons"),value:"none",icon:x}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Uppercase","cozy-addons"),value:"uppercase",icon:b}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Lowercase","cozy-addons"),value:"lowercase",icon:y}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Capitalize","cozy-addons"),value:"capitalize",icon:m})]})}),(0,d.jsx)("div",{style:{width:"100%"},children:(0,d.jsxs)(i.__experimentalToggleGroupControl,{label:(0,n.__)("Decoration","cozy-addons"),value:e.subHeading?.decoration,onChange:o=>t({...e,subHeading:{...e.subHeading,decoration:o}}),children:[(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("None","cozy-addons"),value:"none",icon:x}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Underline","cozy-addons"),value:"underline",icon:v}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Strikethrough","cozy-addons"),value:"line-through",icon:C})]})})]}),(0,d.jsxs)("div",{className:"components-base-control",style:{display:"flex",justifyContent:"space-between",gap:"10px"},children:[(0,d.jsx)("div",{style:{width:"100%"},children:(0,d.jsx)(i.__experimentalUnitControl,{label:(0,n.__)("Line Height","cozy-addons"),value:e.subHeading?.lineHeight,onChange:o=>t({...e,subHeading:{...e.subHeading,lineHeight:o}})})}),(0,d.jsx)("div",{style:{width:"100%"},children:(0,d.jsx)(i.__experimentalUnitControl,{label:(0,n.__)("Letter Spacing","cozy-addons"),value:e.subHeading?.letterSpacing,onChange:o=>t({...e,subHeading:{...e.subHeading,letterSpacing:o}})})})]}),(0,d.jsx)(s.PanelColorSettings,{className:"cozy-color-control",enableAlpha:!0,title:(0,n.__)("Color","cozy-addons"),colorSettings:[{label:(0,n.__)("Text (Default)","cozy-addons"),value:e.subHeading.color.text,onChange:o=>t({...e,subHeading:{...e.subHeading,color:{...e.subHeading.color,text:o}}})},{label:(0,n.__)("Text (Hover)","cozy-addons"),value:e.subHeading.color.textHover,onChange:o=>t({...e,subHeading:{...e.subHeading,color:{...e.subHeading.color,textHover:o}}})},{label:(0,n.__)("Background (Default)","cozy-addons"),value:e.subHeading.color.bg,onChange:o=>t({...e,subHeading:{...e.subHeading,color:{...e.subHeading.color,bg:o}}})},{label:(0,n.__)("Background (Hover)","cozy-addons"),value:e.subHeading.color.bgHover,onChange:o=>t({...e,subHeading:{...e.subHeading,color:{...e.subHeading.color,bgHover:o}}})},{label:(0,n.__)("Border (Hover)","cozy-addons"),value:e.subHeading.color.borderHover,onChange:o=>t({...e,subHeading:{...e.subHeading,color:{...e.subHeading.color,borderHover:o}}})}]})]}),e.featuredPostOptions.enabled&&(0,d.jsx)(d.Fragment,{children:(0,d.jsxs)(i.PanelBody,{title:(0,n.__)("Featured Post Styles","cozy-addons"),opened:"featured-post-styles"===L,onToggle:()=>k("featured-post-styles"),children:[(0,d.jsx)(i.ToggleControl,{label:(0,n.__)("Image Overlay","cozy-addons"),checked:e.featuredPostOptions.imageOverlay,onChange:o=>t({...e,featuredPostOptions:{...e.featuredPostOptions,imageOverlay:o}})}),(0,d.jsx)(i.ToggleControl,{label:(0,n.__)("Sticky","cozy-addons"),checked:e.featuredPostOptions.sticky,onChange:o=>t({...e,featuredPostOptions:{...e.featuredPostOptions,sticky:o}})}),(0,d.jsxs)(i.__experimentalToolsPanel,{label:(0,n.__)("Post Image","cozy-addons"),resetAll:()=>t({...e,featuredPostOptions:{...e.featuredPostOptions,image:{margin:{top:"0px",bottom:"0px"},height:"",radius:"0px"}}}),children:[(0,d.jsxs)(i.__experimentalToolsPanelItem,{hasValue:()=>!!e.featuredPostOptions?.image?.margin,label:(0,n.__)("Margin","cozy-addons"),onDeselect:()=>t({...e,featuredPostOptions:{...e.featuredPostOptions,image:{...e.featuredPostOptions.image,margin:{top:"0px",bottom:"0px"}}}}),children:[(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Margin Top","cozy-addons"),value:e.featuredPostOptions?.image?.margin?.top,onChange:o=>t({...e,featuredPostOptions:{...e.featuredPostOptions,image:{...e.featuredPostOptions.image,margin:{...e.featuredPostOptions.image.margin,top:o}}}})})}),(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Margin Bottom","cozy-addons"),value:e.featuredPostOptions?.image?.margin?.bottom,onChange:o=>t({...e,featuredPostOptions:{...e.featuredPostOptions,image:{...e.featuredPostOptions.image,margin:{...e.featuredPostOptions.image.margin,bottom:o}}}})})})]}),(0,d.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>!!e.featuredPostOptions?.image?.height,label:(0,n.__)("Height","cozy-addons"),onDeselect:()=>t({...e,featuredPostOptions:{...e.featuredPostOptions,image:{...e.featuredPostOptions.image,height:""}}}),children:(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Height","cozy-addons"),value:e.featuredPostOptions?.image?.height,onChange:o=>t({...e,featuredPostOptions:{...e.featuredPostOptions,image:{...e.featuredPostOptions.image,height:o}}})})})}),(0,d.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>!!e.featuredPostOptions?.image?.radius,label:(0,n.__)("Radius","cozy-addons"),onDeselect:()=>t({...e,featuredPostOptions:{...e.featuredPostOptions,image:{...e.featuredPostOptions.image,radius:"0px"}}}),children:(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Radius","cozy-addons"),value:e.featuredPostOptions?.image?.radius,onChange:o=>t({...e,featuredPostOptions:{...e.featuredPostOptions,image:{...e.featuredPostOptions.image,radius:o}}})})})})]}),(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Outer Vertical Gap","cozy-addons"),value:e.featuredPostOptions.content.outerVGap,onChange:o=>t({...e,featuredPostOptions:{...e.featuredPostOptions,content:{...e.featuredPostOptions.content,outerVGap:o}}})})}),(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Outer Horizontal Gap","cozy-addons"),value:e.featuredPostOptions.content.outerHGap,onChange:o=>t({...e,featuredPostOptions:{...e.featuredPostOptions,content:{...e.featuredPostOptions.content,outerHGap:o}}})})}),(0,d.jsxs)(i.__experimentalToolsPanel,{label:(0,n.__)("Content Wrapper","cozy-addons"),resetAll:()=>t({...e,featuredPostOptions:{...e.featuredPostOptions,content:{...e.featuredPostOptions.content,padding:{top:"0px",right:"0px",bottom:"0px",left:"0px"},margin:{top:0,bottom:"0px"},radius:"0px",position:"relative"}}}),children:[(0,d.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>!!e.featuredPostOptions.content.padding,label:(0,n.__)("Padding","cozy-addons"),onDeselect:()=>t({...e,featuredPostOptions:{...e.featuredPostOptions,content:{...e.featuredPostOptions.content,padding:{top:"0px",right:"0px",bottom:"0px",left:"0px"}}}}),children:(0,d.jsxs)(i.BaseControl,{className:"cozy-box-control",children:[(0,d.jsx)(i.BaseControl.VisualLabel,{children:(0,n.__)("Padding","cozy-addons")}),(0,d.jsx)(i.__experimentalBoxControl,{label:"",resetValues:{top:"0",right:"0",bottom:"0",left:"0"},inputProps:{max:300},values:e.featuredPostOptions.content.padding,onChange:o=>t({...e,featuredPostOptions:{...e.featuredPostOptions,content:{...e.featuredPostOptions.content,padding:o}}})})]})}),(0,d.jsxs)(i.__experimentalToolsPanelItem,{hasValue:()=>!!e.featuredPostOptions.content.margin,label:(0,n.__)("Margin","cozy-addons"),onDeselect:()=>t({...e,featuredPostOptions:{...e.featuredPostOptions,content:{...e.featuredPostOptions.content,margin:{top:0,bottom:"0px"}}}}),children:[(0,d.jsx)(i.RangeControl,{label:(0,n.__)("Margin Top","cozy-addons"),min:-500,max:500,step:1,value:e.featuredPostOptions.content.margin.top,onChange:o=>t({...e,featuredPostOptions:{...e.featuredPostOptions,content:{...e.featuredPostOptions.content,margin:{...e.featuredPostOptions.content.margin,top:o}}}})}),(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(i.__experimentalUnitControl,{label:(0,n.__)("Margin Bottom","cozy-addons"),min:-500,max:500,step:1,value:e.featuredPostOptions.content.margin.bottom,onChange:o=>t({...e,featuredPostOptions:{...e.featuredPostOptions,content:{...e.featuredPostOptions.content,margin:{...e.featuredPostOptions.content.margin,bottom:o}}}})})})]}),(0,d.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>!!e.featuredPostOptions.content?.border,label:(0,n.__)("Border","cozy-addons"),onDeselect:()=>t({...e,featuredPostOptions:{...e.featuredPostOptions,content:{...e.featuredPostOptions.content,border:{width:"",style:"",color:""}}}}),children:(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(i.__experimentalBorderBoxControl,{className:"cozy-border-box-control",enableAlpha:!0,colors:a,label:(0,n.__)("Border","cozy-addons"),value:e.featuredPostOptions.content?.border,onChange:o=>t({...e,featuredPostOptions:{...e.featuredPostOptions,content:{...e.featuredPostOptions.content,border:o}}})})})}),(0,d.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>!!e.featuredPostOptions.content.radius,label:(0,n.__)("Radius","cozy-addons"),onDeselect:()=>t({...e,featuredPostOptions:{...e.featuredPostOptions,content:{...e.featuredPostOptions.content,radius:"0px"}}}),children:(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Border Radius","cozy-addons"),value:e.featuredPostOptions.content.radius,onChange:o=>t({...e,featuredPostOptions:{...e.featuredPostOptions,content:{...e.featuredPostOptions.content,radius:o}}})})})}),(0,d.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>!!e.featuredPostOptions.content.position,label:(0,n.__)("Position","cozy-addons"),onDeselect:()=>t({...e,featuredPostOptions:{...e.featuredPostOptions,content:{...e.featuredPostOptions.content,position:"relative"}}}),children:(0,d.jsxs)(i.__experimentalToggleGroupControl,{label:(0,n.__)("Position","cozy-addons"),isBlock:!0,value:e.featuredPostOptions.content.position,onChange:o=>t({...e,featuredPostOptions:{...e.featuredPostOptions,content:{...e.featuredPostOptions.content,position:o}}}),children:[(0,d.jsx)(i.__experimentalToggleGroupControlOption,{label:(0,n.__)("Relative","cozy-addons"),value:"relative"}),(0,d.jsx)(i.__experimentalToggleGroupControlOption,{label:(0,n.__)("Absolute","cozy-addons"),value:"absolute"}),(0,d.jsx)(i.__experimentalToggleGroupControlOption,{label:(0,n.__)("Unset","cozy-addons"),value:"unset"})]})})]}),(0,d.jsxs)(i.__experimentalToolsPanel,{label:(0,n.__)("Post Title","cozy-addons"),resetAll:()=>t({...e,featuredPostOptions:{...e.featuredPostOptions,title:{className:"",margin:{top:"0px",bottom:"0px"},font:{size:"18px",weight:"600",family:""},letterCase:"none",decoration:"none",lineHeight:"",letterSpacing:"",color:{text:"",textHover:""}}}}),children:[(0,d.jsxs)(i.__experimentalToolsPanelItem,{hasValue:()=>!!e.featuredPostOptions.title.margin,label:(0,n.__)("Margin","cozy-addons"),onDeselect:()=>t({...e,featuredPostOptions:{...e.featuredPostOptions,title:{...e.featuredPostOptions.title,margin:{top:"0px",bottom:"0px"}}}}),children:[(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Margin Top","cozy-addons"),value:e.featuredPostOptions.title.margin.top,onChange:o=>t({...e,featuredPostOptions:{...e.featuredPostOptions,title:{...e.featuredPostOptions.title,margin:{...e.featuredPostOptions.title.margin,top:o}}}})})}),(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Margin Bottom","cozy-addons"),value:e.featuredPostOptions.title.margin.bottom,onChange:o=>t({...e,featuredPostOptions:{...e.featuredPostOptions,title:{...e.featuredPostOptions.title,margin:{...e.featuredPostOptions.title.margin,bottom:o}}}})})})]}),(0,d.jsxs)(i.__experimentalToolsPanelItem,{hasValue:()=>!!e.featuredPostOptions.title.font,label:(0,n.__)("Font","cozy-addons"),onDeselect:()=>t({...e,featuredPostOptions:{...e.featuredPostOptions,title:{...e.featuredPostOptions.title,font:{size:"18px",weight:"600",family:""}}}}),children:[(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Font Size","cozy-addons"),value:e.featuredPostOptions.title.font.size,onChange:o=>t({...e,featuredPostOptions:{...e.featuredPostOptions,title:{...e.featuredPostOptions.title,font:{...e.featuredPostOptions.title.font,size:o}}}})})}),(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(i.SelectControl,{label:(0,n.__)("Font Family","cozy-addons"),options:o,value:e.featuredPostOptions.title.font.family,onChange:o=>t({...e,featuredPostOptions:{...e.featuredPostOptions,title:{...e.featuredPostOptions.title,font:{...e.featuredPostOptions.title.font,family:o}}}})})}),(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(i.SelectControl,{label:(0,n.__)("Font Weight","cozy-addons"),options:w,value:e.featuredPostOptions.title.font.weight,onChange:o=>t({...e,featuredPostOptions:{...e.featuredPostOptions,title:{...e.featuredPostOptions.title,font:{...e.featuredPostOptions.title.font,weight:o}}}})})})]})]}),(0,d.jsxs)("div",{className:"components-base-control",style:{display:"flex",justifyContent:"space-between",gap:"10px"},children:[(0,d.jsx)("div",{style:{width:"100%"},children:(0,d.jsxs)(i.__experimentalToggleGroupControl,{label:(0,n.__)("Letter Case","cozy-addons"),value:e.featuredPostOptions.title?.letterCase,onChange:o=>t({...e,featuredPostOptions:{...e.featuredPostOptions,title:{...e.featuredPostOptions.title,letterCase:o}}}),children:[(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("None","cozy-addons"),value:"none",icon:x}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Uppercase","cozy-addons"),value:"uppercase",icon:b}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Lowercase","cozy-addons"),value:"lowercase",icon:y}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Capitalize","cozy-addons"),value:"capitalize",icon:m})]})}),(0,d.jsx)("div",{style:{width:"100%"},children:(0,d.jsxs)(i.__experimentalToggleGroupControl,{label:(0,n.__)("Decoration","cozy-addons"),value:e.featuredPostOptions.title?.decoration,onChange:o=>t({...e,featuredPostOptions:{...e.featuredPostOptions,title:{...e.featuredPostOptions.title,decoration:o}}}),children:[(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("None","cozy-addons"),value:"none",icon:x}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Underline","cozy-addons"),value:"underline",icon:v}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Strikethrough","cozy-addons"),value:"line-through",icon:C})]})})]}),(0,d.jsxs)("div",{className:"components-base-control",style:{display:"flex",justifyContent:"space-between",gap:"10px"},children:[(0,d.jsx)("div",{style:{width:"100%"},children:(0,d.jsx)(i.__experimentalUnitControl,{label:(0,n.__)("Line Height","cozy-addons"),value:e.featuredPostOptions.title?.lineHeight,onChange:o=>t({...e,featuredPostOptions:{...e.featuredPostOptions,title:{...e.featuredPostOptions.title,lineHeight:o}}})})}),(0,d.jsx)("div",{style:{width:"100%"},children:(0,d.jsx)(i.__experimentalUnitControl,{label:(0,n.__)("Letter Spacing","cozy-addons"),value:e.featuredPostOptions.title?.letterSpacing,onChange:o=>t({...e,featuredPostOptions:{...e.featuredPostOptions,title:{...e.featuredPostOptions.title,letterSpacing:o}}})})})]}),(0,d.jsx)(i.TextareaControl,{label:(0,n.__)("Additional CSS class(es)","cozy-addons"),value:e.featuredPostOptions.title?.className,onChange:o=>t({...e,featuredPostOptions:{...e.featuredPostOptions,title:{...e.featuredPostOptions.title,className:o}}}),help:(0,n.__)("Separate multiple classes with spaces.","cozy-addons")}),(0,d.jsx)(s.PanelColorSettings,{className:"cozy-color-control",enableAlpha:!0,title:(0,n.__)("Color","cozy-addons"),colorSettings:[{label:(0,n.__)("Post Title (Default)","cozy-addons"),value:e.featuredPostOptions.title.color.text,onChange:o=>t({...e,featuredPostOptions:{...e.featuredPostOptions,title:{...e.featuredPostOptions.title,color:{...e.featuredPostOptions.title.color,text:o}}}})},{label:(0,n.__)("Post Title (Hover)","cozy-addons"),value:e.featuredPostOptions.title.color.textHover,onChange:o=>t({...e,featuredPostOptions:{...e.featuredPostOptions,title:{...e.featuredPostOptions.title,color:{...e.featuredPostOptions.title.color,textHover:o}}}})},{label:(0,n.__)("Content Background","cozy-addons"),value:e.featuredPostOptions.content.color.bg,onChange:o=>t({...e,featuredPostOptions:{...e.featuredPostOptions,content:{...e.featuredPostOptions.content,color:{...e.featuredPostOptions.content.color,bg:o}}}})}]})]})}),(0,d.jsxs)(i.PanelBody,{title:(0,n.__)("Post Box Styles","cozy-addons"),opened:"post-box-styles"===L,onToggle:()=>k("post-box-styles"),children:[(0,d.jsxs)(i.BaseControl,{className:"cozy-box-control",children:[(0,d.jsx)(i.BaseControl.VisualLabel,{children:(0,n.__)("Padding","cozy-addons")}),(0,d.jsx)(i.__experimentalBoxControl,{label:"",resetValues:{top:"0",right:"0",bottom:"0",left:"0"},inputProps:{max:300},values:e.postBoxStyles.padding,onChange:o=>t({...e,postBoxStyles:{...e.postBoxStyles,padding:o}})})]}),(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Margin Top","cozy-addons"),value:e.postBoxStyles.margin.top,onChange:o=>t({...e,postBoxStyles:{...e.postBoxStyles,margin:{...e.postBoxStyles.margin,top:o}}})})}),(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Margin Bottom","cozy-addons"),value:e.postBoxStyles.margin.bottom,onChange:o=>t({...e,postBoxStyles:{...e.postBoxStyles,margin:{...e.postBoxStyles.margin,bottom:o}}})})}),(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(i.__experimentalBorderBoxControl,{className:"cozy-border-box-control",enableAlpha:!0,colors:a,label:(0,n.__)("Border","cozy-addons"),value:e.postBoxStyles.border,onChange:o=>t({...e,postBoxStyles:{...e.postBoxStyles,border:o}})})}),(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Border Radius","cozy-addons"),value:e.postBoxStyles.radius,onChange:o=>t({...e,postBoxStyles:{...e.postBoxStyles,radius:o}})})}),(0,d.jsx)(i.ToggleControl,{label:(0,n.__)("Hover Effect","cozy-addons"),checked:e.postBoxStyles.hoverEffect,onChange:o=>t({...e,postBoxStyles:{...e.postBoxStyles,hoverEffect:o}})}),(0,d.jsx)(i.TabPanel,{className:"cozy-tab-panel",tabs:[{name:"cozy-tab__default",title:(0,n.__)("Default","cozy-addons"),className:"cozy-tab-one"},{name:"cozy-tab__active",title:(0,n.__)("Hover","cozy-addons"),className:"cozy-tab-two"}],activeClass:"active-tab",children:o=>(0,d.jsxs)(d.Fragment,{children:["cozy-tab__default"===o.name&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(i.ToggleControl,{label:(0,n.__)("Enable Box Shadow","cozy-addons"),checked:e.postBoxStyles.shadow.enabled,onChange:o=>t({...e,postBoxStyles:{...e.postBoxStyles,shadow:{...e.postBoxStyles.shadow,enabled:o}}})}),e.postBoxStyles.shadow.enabled&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(i.RangeControl,{label:(0,n.__)("Horizontal","cozy-addons"),min:-100,max:100,step:1,value:e.postBoxStyles.shadow.horizontal,onChange:o=>t({...e,postBoxStyles:{...e.postBoxStyles,shadow:{...e.postBoxStyles.shadow,horizontal:o}}})}),(0,d.jsx)(i.RangeControl,{label:(0,n.__)("Vertical","cozy-addons"),min:-100,max:100,step:1,value:e.postBoxStyles.shadow.vertical,onChange:o=>t({...e,postBoxStyles:{...e.postBoxStyles,shadow:{...e.postBoxStyles.shadow,vertical:o}}})}),(0,d.jsx)(i.RangeControl,{label:(0,n.__)("Blur","cozy-addons"),min:0,max:100,step:1,value:e.postBoxStyles.shadow.blur,onChange:o=>t({...e,postBoxStyles:{...e.postBoxStyles,shadow:{...e.postBoxStyles.shadow,blur:o}}})}),(0,d.jsx)(i.RangeControl,{label:(0,n.__)("Spread","cozy-addons"),min:-100,max:100,step:1,value:e.postBoxStyles.shadow.spread,onChange:o=>t({...e,postBoxStyles:{...e.postBoxStyles,shadow:{...e.postBoxStyles.shadow,spread:o}}})}),(0,d.jsxs)(i.__experimentalToggleGroupControl,{label:(0,n.__)("Position","cozy-addons"),isBlock:!0,value:e.postBoxStyles.shadow.position,onChange:o=>t({...e,postBoxStyles:{...e.postBoxStyles,shadow:{...e.postBoxStyles.shadow,position:o}}}),children:[(0,d.jsx)(i.__experimentalToggleGroupControlOption,{label:(0,n.__)("Inset","cozy-addons"),value:"inset"}),(0,d.jsx)(i.__experimentalToggleGroupControlOption,{label:(0,n.__)("Outline","cozy-addons"),value:""})]}),(0,d.jsx)(s.PanelColorSettings,{enableAlpha:!0,title:(0,n.__)("Color","cozy-addons"),colorSettings:[{label:(0,n.__)("Shadow","cozy-addons"),value:e.postBoxStyles.shadow.color,onChange:o=>t({...e,postBoxStyles:{...e.postBoxStyles,shadow:{...e.postBoxStyles.shadow,color:o}}})}]})]})]}),"cozy-tab__active"===o.name&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(i.ToggleControl,{label:(0,n.__)("Enable Box Shadow","cozy-addons"),checked:e.postBoxStyles.shadowHover.enabled,onChange:o=>t({...e,postBoxStyles:{...e.postBoxStyles,shadowHover:{...e.postBoxStyles.shadowHover,enabled:o}}})}),e.postBoxStyles.shadowHover.enabled&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(i.RangeControl,{label:(0,n.__)("Horizontal","cozy-addons"),min:-100,max:100,step:1,value:e.postBoxStyles.shadowHover.horizontal,onChange:o=>t({...e,postBoxStyles:{...e.postBoxStyles,shadowHover:{...e.postBoxStyles.shadowHover,horizontal:o}}})}),(0,d.jsx)(i.RangeControl,{label:(0,n.__)("Vertical","cozy-addons"),min:-100,max:100,step:1,value:e.postBoxStyles.shadowHover.vertical,onChange:o=>t({...e,postBoxStyles:{...e.postBoxStyles,shadowHover:{...e.postBoxStyles.shadowHover,vertical:o}}})}),(0,d.jsx)(i.RangeControl,{label:(0,n.__)("Blur","cozy-addons"),min:0,max:100,step:1,value:e.postBoxStyles.shadowHover.blur,onChange:o=>t({...e,postBoxStyles:{...e.postBoxStyles,shadowHover:{...e.postBoxStyles.shadowHover,blur:o}}})}),(0,d.jsx)(i.RangeControl,{label:(0,n.__)("Spread","cozy-addons"),min:-100,max:100,step:1,value:e.postBoxStyles.shadowHover.spread,onChange:o=>t({...e,postBoxStyles:{...e.postBoxStyles,shadowHover:{...e.postBoxStyles.shadowHover,spread:o}}})}),(0,d.jsxs)(i.__experimentalToggleGroupControl,{label:(0,n.__)("Position","cozy-addons"),isBlock:!0,value:e.postBoxStyles.shadowHover.position,onChange:o=>t({...e,postBoxStyles:{...e.postBoxStyles,shadowHover:{...e.postBoxStyles.shadowHover,position:o}}}),children:[(0,d.jsx)(i.__experimentalToggleGroupControlOption,{label:(0,n.__)("Inset","cozy-addons"),value:"inset"}),(0,d.jsx)(i.__experimentalToggleGroupControlOption,{label:(0,n.__)("Outline","cozy-addons"),value:""})]}),(0,d.jsx)(s.PanelColorSettings,{enableAlpha:!0,title:(0,n.__)("Color","cozy-addons"),colorSettings:[{label:(0,n.__)("Shadow","cozy-addons"),value:e.postBoxStyles.shadowHover.color,onChange:o=>t({...e,postBoxStyles:{...e.postBoxStyles,shadowHover:{...e.postBoxStyles.shadowHover,color:o}}})}]})]})]})]})}),(0,d.jsx)(s.PanelColorSettings,{className:"cozy-color-control",enableAlpha:!0,title:(0,n.__)("Color","cozy-addons"),colorSettings:[{label:(0,n.__)("Background (Default)","cozy-addons"),value:e.postBoxStyles.color.bg,onChange:o=>t({...e,postBoxStyles:{...e.postBoxStyles,color:{...e.postBoxStyles.color,bg:o}}})},{label:(0,n.__)("Background (Hover)","cozy-addons"),value:e.postBoxStyles.color.bgHover,onChange:o=>t({...e,postBoxStyles:{...e.postBoxStyles,color:{...e.postBoxStyles.color,bgHover:o}}})},{label:(0,n.__)("Border (Hover)","cozy-addons"),value:e.postBoxStyles.color.borderHover,onChange:o=>t({...e,postBoxStyles:{...e.postBoxStyles,color:{...e.postBoxStyles.color,borderHover:o}}})}]})]}),(0,d.jsxs)(i.PanelBody,{title:(0,n.__)("Post Styles","cozy-addons"),opened:"post-styles"===L,onToggle:()=>k("post-styles"),children:[(0,d.jsx)(i.ToggleControl,{label:(0,n.__)("Image Overlay","cozy-addons"),checked:e.postOptions.imageOverlay,onChange:o=>t({...e,postOptions:{...e.postOptions,imageOverlay:o}})}),(0,d.jsx)(i.ToggleControl,{label:(0,n.__)("Image Hover Effect","cozy-addons"),checked:e.postOptions.image.hoverEffect,onChange:o=>t({...e,postOptions:{...e.postOptions,image:{...e.postOptions.image,hoverEffect:o}}})}),(0,d.jsxs)(i.BaseControl,{className:"cozy-box-control",children:[(0,d.jsx)(i.BaseControl.VisualLabel,{children:(0,n.__)("Content Padding","cozy-addons")}),(0,d.jsx)(i.__experimentalBoxControl,{label:"",resetValues:{top:"0",right:"0",bottom:"0",left:"0"},inputProps:{max:300},values:e.postOptions.content.padding,onChange:o=>t({...e,postOptions:{...e.postOptions,content:{...e.postOptions.content,padding:o}}})})]}),(0,d.jsxs)(i.__experimentalToolsPanel,{label:(0,n.__)("Post Image","cozy-addons"),resetAll:()=>t({...e,postOptions:{...e.postOptions,image:{...e.postOptions.image,margin:{top:"0px",bottom:"0px"},width:"",height:"",radius:"0px",hoverEffect:!0}}}),children:[(0,d.jsxs)(i.__experimentalToolsPanelItem,{hasValue:()=>!!e.postOptions?.image?.margin,label:(0,n.__)("Margin","cozy-addons"),onDeselect:()=>t({...e,postOptions:{...e.postOptions,image:{...e.postOptions.image,margin:{top:"0px",bottom:"0px"}}}}),children:[(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Margin Top","cozy-addons"),value:e.postOptions?.image?.margin?.top,onChange:o=>t({...e,postOptions:{...e.postOptions,image:{...e.postOptions.image,margin:{...e.postOptions.image.margin,top:o}}}})})}),(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Margin Bottom","cozy-addons"),value:e.postOptions?.image?.margin?.bottom,onChange:o=>t({...e,postOptions:{...e.postOptions,image:{...e.postOptions.image,margin:{...e.postOptions.image.margin,bottom:o}}}})})})]}),(0,d.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>!!e.postOptions?.image?.width,label:(0,n.__)("Width","cozy-addons"),onDeselect:()=>t({...e,postOptions:{...e.postOptions,image:{...e.postOptions.image,width:""}}}),children:(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Width","cozy-addons"),value:e.postOptions?.image?.width,onChange:o=>t({...e,postOptions:{...e.postOptions,image:{...e.postOptions.image,width:o}}})})})}),(0,d.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>!!e.postOptions?.image?.height,label:(0,n.__)("Height","cozy-addons"),onDeselect:()=>t({...e,postOptions:{...e.postOptions,image:{...e.postOptions.image,height:""}}}),children:(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Height","cozy-addons"),value:e.postOptions?.image?.height,onChange:o=>t({...e,postOptions:{...e.postOptions,image:{...e.postOptions.image,height:o}}})})})}),(0,d.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>!!e.postOptions?.image?.radius,label:(0,n.__)("Radius","cozy-addons"),onDeselect:()=>t({...e,postOptions:{...e.postOptions,image:{...e.postOptions.image,radius:"0px"}}}),children:(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Radius","cozy-addons"),value:e.postOptions?.image?.radius,onChange:o=>t({...e,postOptions:{...e.postOptions,image:{...e.postOptions.image,radius:o}}})})})})]}),(0,d.jsxs)(i.__experimentalToolsPanel,{label:(0,n.__)("Post Title","cozy-addons"),resetAll:()=>t({...e,postOptions:{...e.postOptions,title:{...e.postOptions.title,margin:{top:"0px",bottom:"0px"},font:{size:"18px",weight:"600",family:""},letterCase:"none",decoration:"none",lineHeight:"",letterSpacing:""}}}),children:[(0,d.jsxs)(i.__experimentalToolsPanelItem,{hasValue:()=>!!e.postOptions.title.margin,label:(0,n.__)("Margin","cozy-addons"),onDeselect:()=>t({...e,postOptions:{...e.postOptions,title:{...e.postOptions.title,margin:{top:"0px",bottom:"0px"}}}}),children:[(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Margin Top","cozy-addons"),value:e.postOptions.title.margin.top,onChange:o=>t({...e,postOptions:{...e.postOptions,title:{...e.postOptions.title,margin:{...e.postOptions.title.margin,top:o}}}})})}),(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Margin Bottom","cozy-addons"),value:e.postOptions.title.margin.bottom,onChange:o=>t({...e,postOptions:{...e.postOptions,title:{...e.postOptions.title,margin:{...e.postOptions.title.margin,bottom:o}}}})})})]}),(0,d.jsxs)(i.__experimentalToolsPanelItem,{hasValue:()=>!!e.postOptions.title.font,label:(0,n.__)("Font","cozy-addons"),onDeselect:()=>t({...e,postOptions:{...e.postOptions,title:{...e.postOptions.title,font:{size:"18px",weight:"600",family:""}}}}),children:[(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Font Size","cozy-addons"),value:e.postOptions.title.font.size,onChange:o=>t({...e,postOptions:{...e.postOptions,title:{...e.postOptions.title,font:{...e.postOptions.title.font,size:o}}}})})}),(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(i.SelectControl,{label:(0,n.__)("Font Family","cozy-addons"),options:o,value:e.postOptions.title.font.family,onChange:o=>t({...e,postOptions:{...e.postOptions,title:{...e.postOptions.title,font:{...e.postOptions.title.font,family:o}}}})})}),(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(i.SelectControl,{label:(0,n.__)("Font Weight","cozy-addons"),options:w,value:e.postOptions.title.font.weight,onChange:o=>t({...e,postOptions:{...e.postOptions,title:{...e.postOptions.title,font:{...e.postOptions.title.font,weight:o}}}})})})]})]}),(0,d.jsxs)("div",{className:"components-base-control",style:{display:"flex",justifyContent:"space-between",gap:"10px"},children:[(0,d.jsx)("div",{style:{width:"100%"},children:(0,d.jsxs)(i.__experimentalToggleGroupControl,{label:(0,n.__)("Letter Case","cozy-addons"),value:e.postOptions.title?.letterCase,onChange:o=>t({...e,postOptions:{...e.postOptions,title:{...e.postOptions.title,letterCase:o}}}),children:[(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("None","cozy-addons"),value:"none",icon:x}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Uppercase","cozy-addons"),value:"uppercase",icon:b}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Lowercase","cozy-addons"),value:"lowercase",icon:y}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Capitalize","cozy-addons"),value:"capitalize",icon:m})]})}),(0,d.jsx)("div",{style:{width:"100%"},children:(0,d.jsxs)(i.__experimentalToggleGroupControl,{label:(0,n.__)("Decoration","cozy-addons"),value:e.postOptions.title?.decoration,onChange:o=>t({...e,postOptions:{...e.postOptions,title:{...e.postOptions.title,decoration:o}}}),children:[(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("None","cozy-addons"),value:"none",icon:x}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Underline","cozy-addons"),value:"underline",icon:v}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Strikethrough","cozy-addons"),value:"line-through",icon:C})]})})]}),(0,d.jsxs)("div",{className:"components-base-control",style:{display:"flex",justifyContent:"space-between",gap:"10px"},children:[(0,d.jsx)("div",{style:{width:"100%"},children:(0,d.jsx)(i.__experimentalUnitControl,{label:(0,n.__)("Line Height","cozy-addons"),value:e.postOptions.title?.lineHeight,onChange:o=>t({...e,postOptions:{...e.postOptions,title:{...e.postOptions.title,lineHeight:o}}})})}),(0,d.jsx)("div",{style:{width:"100%"},children:(0,d.jsx)(i.__experimentalUnitControl,{label:(0,n.__)("Letter Spacing","cozy-addons"),value:e.postOptions.title?.letterSpacing,onChange:o=>t({...e,postOptions:{...e.postOptions,title:{...e.postOptions.title,letterSpacing:o}}})})})]}),(0,d.jsx)(i.TextareaControl,{label:(0,n.__)("Additional CSS class(es)","cozy-addons"),value:e.postOptions.title?.className,onChange:o=>t({...e,postOptions:{...e.postOptions,title:{...e.postOptions.title,className:o}}}),help:(0,n.__)("Separate multiple classes with spaces.","cozy-addons")}),(0,d.jsx)(s.PanelColorSettings,{className:"cozy-color-control",enableAlpha:!0,title:(0,n.__)("Color","cozy-addons"),colorSettings:[{label:(0,n.__)("Post Title (Default)","cozy-addons"),value:e.postOptions.title.color.text,onChange:o=>t({...e,postOptions:{...e.postOptions,title:{...e.postOptions.title,color:{...e.postOptions.title.color,text:o}}}})},{label:(0,n.__)("Post Title (Hover)","cozy-addons"),value:e.postOptions.title.color.textHover,onChange:o=>t({...e,postOptions:{...e.postOptions,title:{...e.postOptions.title,color:{...e.postOptions.title.color,textHover:o}}}})}]})]}),(e.enableOptions.featuredPostCategories||e.enableOptions.postCategories)&&(0,d.jsxs)(i.PanelBody,{title:(0,n.__)("Post Category(s) Styles","cozy-addons"),opened:"post-category-styles"===L,onToggle:()=>k("post-category-styles"),children:[(0,d.jsxs)(i.BaseControl,{className:"cozy-box-control",children:[(0,d.jsx)(i.BaseControl.VisualLabel,{children:(0,n.__)("Padding","cozy-addons")}),(0,d.jsx)(i.__experimentalBoxControl,{label:"",resetValues:{top:"0",right:"0",bottom:"0",left:"0"},inputProps:{max:300},values:e.postCategories.padding,onChange:o=>t({...e,postCategories:{...e.postCategories,padding:o}})})]}),(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Margin Top","cozy-addons"),value:e.postCategories.margin.top,onChange:o=>t({...e,postCategories:{...e.postCategories,margin:{...e.postCategories.margin,top:o}}})})}),(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Margin Bottom","cozy-addons"),value:e.postCategories.margin.bottom,onChange:o=>t({...e,postCategories:{...e.postCategories,margin:{...e.postCategories.margin,bottom:o}}})})}),(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Gap","cozy-addons"),value:e.postCategories.gap,onChange:o=>t({...e,postCategories:{...e.postCategories,gap:o}})})}),(0,d.jsx)(i.ToggleControl,{label:(0,n.__)("Hover Effect","cozy-addons"),checked:e.postCategories.hoverEffect,onChange:o=>t({...e,postCategories:{...e.postCategories,hoverEffect:o}})}),(0,d.jsx)(i.TabPanel,{className:"cozy-tab-panel",activeClass:"active-tab",tabs:[{name:"cozy-tab__default",title:(0,n.__)("Default","cozy-addons")},{name:"cozy-tab__active",title:(0,n.__)("Featured","cozy-addons")}],children:r=>(0,d.jsxs)(d.Fragment,{children:["cozy-tab__default"===r.name&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(i.__experimentalToolsPanel,{label:(0,n.__)("Border & Radius","cozy-addons"),resetAll:()=>t({...e,postCategories:{...e.postCategories,border:{width:"",style:"",color:""},radius:"0px"}}),children:[(0,d.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>!!e.postCategories.border,label:(0,n.__)("Border","cozy-addons"),onDeselect:()=>t({...e,postCategories:{...e.postCategories,border:{width:"",style:"",color:""}}}),children:(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(i.__experimentalBorderControl,{label:(0,n.__)("Border","cozy-addons"),enableAlpha:!0,colors:a,isCompact:!0,value:e.postCategories.border,onChange:o=>t({...e,postCategories:{...e.postCategories,border:o}})})})}),(0,d.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>!!e.postCategories.radius,label:(0,n.__)("Radius","cozy-addons"),onDeselect:()=>t({...e,postCategories:{...e.postCategories,radius:"0px"}}),children:(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Border Radius","cozy-addons"),value:e.postCategories.radius,onChange:o=>t({...e,postCategories:{...e.postCategories,radius:o}})})})})]}),(0,d.jsx)(i.__experimentalToolsPanel,{label:(0,n.__)("Typography","cozy-addons"),resetAll:()=>t({...e,postCategories:{...e.postCategories,font:{size:"14px",weight:"500",family:""},letterCase:"none",decoration:"none",lineHeight:"",letterSpacing:""}}),children:(0,d.jsxs)(i.__experimentalToolsPanelItem,{hasValue:()=>!!e.postCategories.font,label:(0,n.__)("Font","cozy-addons"),onDeselect:()=>t({...e,postCategories:{...e.postCategories,font:{size:"14px",weight:"500",family:""}}}),children:[(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Font Size","cozy-addons"),value:e.postCategories.font.size,onChange:o=>t({...e,postCategories:{...e.postCategories,font:{...e.postCategories.font,size:o}}})})}),(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(i.SelectControl,{label:(0,n.__)("Font Family","cozy-addons"),options:o,value:e.postCategories.font.family,onChange:o=>t({...e,postCategories:{...e.postCategories,font:{...e.postCategories.font,family:o}}})})}),(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(i.SelectControl,{label:(0,n.__)("Font Weight","cozy-addons"),options:w,value:e.postCategories.font.weight,onChange:o=>t({...e,postCategories:{...e.postCategories,font:{...e.postCategories.font,weight:o}}})})})]})}),(0,d.jsxs)("div",{className:"components-base-control",style:{display:"flex",justifyContent:"space-between",gap:"10px"},children:[(0,d.jsx)("div",{style:{width:"100%"},children:(0,d.jsxs)(i.__experimentalToggleGroupControl,{label:(0,n.__)("Letter Case","cozy-addons"),value:e.postCategories?.letterCase,onChange:o=>t({...e,postCategories:{...e.postCategories,letterCase:o}}),children:[(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("None","cozy-addons"),value:"none",icon:x}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Uppercase","cozy-addons"),value:"uppercase",icon:b}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Lowercase","cozy-addons"),value:"lowercase",icon:y}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Capitalize","cozy-addons"),value:"capitalize",icon:m})]})}),(0,d.jsx)("div",{style:{width:"100%"},children:(0,d.jsxs)(i.__experimentalToggleGroupControl,{label:(0,n.__)("Decoration","cozy-addons"),value:e.postCategories?.decoration,onChange:o=>t({...e,postCategories:{...e.postCategories,decoration:o}}),children:[(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("None","cozy-addons"),value:"none",icon:x}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Underline","cozy-addons"),value:"underline",icon:v}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Strikethrough","cozy-addons"),value:"line-through",icon:C})]})})]}),(0,d.jsxs)("div",{className:"components-base-control",style:{display:"flex",justifyContent:"space-between",gap:"10px"},children:[(0,d.jsx)("div",{style:{width:"100%"},children:(0,d.jsx)(i.__experimentalUnitControl,{label:(0,n.__)("Line Height","cozy-addons"),value:e.postCategories?.lineHeight,onChange:o=>t({...e,postCategories:{...e.postCategories,lineHeight:o}})})}),(0,d.jsx)("div",{style:{width:"100%"},children:(0,d.jsx)(i.__experimentalUnitControl,{label:(0,n.__)("Letter Spacing","cozy-addons"),value:e.postCategories?.letterSpacing,onChange:o=>t({...e,postCategories:{...e.postCategories,letterSpacing:o}})})})]}),(0,d.jsx)(s.PanelColorSettings,{className:"cozy-color-control",enableAlpha:!0,title:(0,n.__)("Color","cozy-addons"),colorSettings:[{label:(0,n.__)("Text (Default)","cozy-addons"),value:e.postCategories.color.text,onChange:o=>t({...e,postCategories:{...e.postCategories,color:{...e.postCategories.color,text:o}}})},{label:(0,n.__)("Text (Hover)","cozy-addons"),value:e.postCategories.color.textHover,onChange:o=>t({...e,postCategories:{...e.postCategories,color:{...e.postCategories.color,textHover:o}}})},{label:(0,n.__)("Background (Default)","cozy-addons"),value:e.postCategories.color.bg,onChange:o=>t({...e,postCategories:{...e.postCategories,color:{...e.postCategories.color,bg:o}}})},{label:(0,n.__)("Background (Hover)","cozy-addons"),value:e.postCategories.color.bgHover,onChange:o=>t({...e,postCategories:{...e.postCategories,color:{...e.postCategories.color,bgHover:o}}})},{label:(0,n.__)("Border (Hover)","cozy-addons"),value:e.postCategories.color.borderHover,onChange:o=>t({...e,postCategories:{...e.postCategories,color:{...e.postCategories.color,borderHover:o}}})}]})]}),"cozy-tab__active"===r.name&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(i.__experimentalToolsPanel,{label:(0,n.__)("Border & Radius","cozy-addons"),resetAll:()=>t({...e,featuredPostCategories:{...e.featuredPostCategories,border:{width:"",style:"",color:""},radius:"0px"}}),children:[(0,d.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>!!e?.featuredPostCategories?.border,label:(0,n.__)("Border","cozy-addons"),onDeselect:()=>t({...e,featuredPostCategories:{...e.featuredPostCategories,border:{width:"",style:"",color:""}}}),children:(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(i.__experimentalBorderControl,{label:(0,n.__)("Border","cozy-addons"),enableAlpha:!0,colors:a,isCompact:!0,value:e?.featuredPostCategories?.border,onChange:o=>t({...e,featuredPostCategories:{...e.featuredPostCategories,border:o}})})})}),(0,d.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>!!e?.featuredPostCategories?.radius,label:(0,n.__)("Radius","cozy-addons"),onDeselect:()=>t({...e,featuredPostCategories:{...e.featuredPostCategories,radius:"0px"}}),children:(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Border Radius","cozy-addons"),value:e?.featuredPostCategories?.radius,onChange:o=>t({...e,featuredPostCategories:{...e.featuredPostCategories,radius:o}})})})})]}),(0,d.jsx)(i.__experimentalToolsPanel,{label:(0,n.__)("Typography","cozy-addons"),resetAll:()=>t({...e,featuredPostCategories:{...e.featuredPostCategories,font:{size:"14px",weight:"500",family:""},letterCase:"none",decoration:"none",lineHeight:"",letterSpacing:""}}),children:(0,d.jsxs)(i.__experimentalToolsPanelItem,{hasValue:()=>!!e?.featuredPostCategories?.font,label:(0,n.__)("Font","cozy-addons"),onDeselect:()=>t({...e,featuredPostCategories:{...e.featuredPostCategories,font:{size:"14px",weight:"500",family:""}}}),children:[(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Font Size","cozy-addons"),value:e?.featuredPostCategories?.font?.size,onChange:o=>t({...e,featuredPostCategories:{...e.featuredPostCategories,font:{...e.featuredPostCategories.font,size:o}}})})}),(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(i.SelectControl,{label:(0,n.__)("Font Family","cozy-addons"),options:o,value:e?.featuredPostCategories?.font?.family,onChange:o=>t({...e,featuredPostCategories:{...e.featuredPostCategories,font:{...e.featuredPostCategories.font,family:o}}})})}),(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(i.SelectControl,{label:(0,n.__)("Font Weight","cozy-addons"),options:w,value:e?.featuredPostCategories?.font?.weight,onChange:o=>t({...e,featuredPostCategories:{...e.featuredPostCategories,font:{...e.featuredPostCategories.font,weight:o}}})})})]})}),(0,d.jsxs)("div",{className:"components-base-control",style:{display:"flex",justifyContent:"space-between",gap:"10px"},children:[(0,d.jsx)("div",{style:{width:"100%"},children:(0,d.jsxs)(i.__experimentalToggleGroupControl,{label:(0,n.__)("Letter Case","cozy-addons"),value:e?.featuredPostCategories?.letterCase,onChange:o=>t({...e,featuredPostCategories:{...e.featuredPostCategories,letterCase:o}}),children:[(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("None","cozy-addons"),value:"none",icon:x}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Uppercase","cozy-addons"),value:"uppercase",icon:b}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Lowercase","cozy-addons"),value:"lowercase",icon:y}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Capitalize","cozy-addons"),value:"capitalize",icon:m})]})}),(0,d.jsx)("div",{style:{width:"100%"},children:(0,d.jsxs)(i.__experimentalToggleGroupControl,{label:(0,n.__)("Decoration","cozy-addons"),value:e?.featuredPostCategories?.decoration,onChange:o=>t({...e,featuredPostCategories:{...e.featuredPostCategories,decoration:o}}),children:[(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("None","cozy-addons"),value:"none",icon:x}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Underline","cozy-addons"),value:"underline",icon:v}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Strikethrough","cozy-addons"),value:"line-through",icon:C})]})})]}),(0,d.jsxs)("div",{className:"components-base-control",style:{display:"flex",justifyContent:"space-between",gap:"10px"},children:[(0,d.jsx)("div",{style:{width:"100%"},children:(0,d.jsx)(i.__experimentalUnitControl,{label:(0,n.__)("Line Height","cozy-addons"),value:e?.featuredPostCategories?.lineHeight,onChange:o=>t({...e,featuredPostCategories:{...e.featuredPostCategories,lineHeight:o}})})}),(0,d.jsx)("div",{style:{width:"100%"},children:(0,d.jsx)(i.__experimentalUnitControl,{label:(0,n.__)("Letter Spacing","cozy-addons"),value:e?.featuredPostCategories?.letterSpacing,onChange:o=>t({...e,featuredPostCategories:{...e.featuredPostCategories,letterSpacing:o}})})})]}),(0,d.jsx)(s.PanelColorSettings,{className:"cozy-color-control",enableAlpha:!0,title:(0,n.__)("Color","cozy-addons"),colorSettings:[{label:(0,n.__)("Text (Default)","cozy-addons"),value:e?.featuredPostCategories?.color?.text,onChange:o=>t({...e,featuredPostCategories:{...e.featuredPostCategories,color:{...e.featuredPostCategories.color,text:o}}})},{label:(0,n.__)("Text (Hover)","cozy-addons"),value:e?.featuredPostCategories?.color?.textHover,onChange:o=>t({...e,featuredPostCategories:{...e.featuredPostCategories,color:{...e.featuredPostCategories.color,textHover:o}}})},{label:(0,n.__)("Background (Default)","cozy-addons"),value:e?.featuredPostCategories?.color?.bg,onChange:o=>t({...e,featuredPostCategories:{...e.featuredPostCategories,color:{...e.featuredPostCategories.color,bg:o}}})},{label:(0,n.__)("Background (Hover)","cozy-addons"),value:e?.featuredPostCategories?.color?.bgHover,onChange:o=>t({...e,featuredPostCategories:{...e.featuredPostCategories,color:{...e.featuredPostCategories.color,bgHover:o}}})},{label:(0,n.__)("Border (Hover)","cozy-addons"),value:e?.featuredPostCategories?.color?.borderHover,onChange:o=>t({...e,featuredPostCategories:{...e.featuredPostCategories,color:{...e.featuredPostCategories.color,borderHover:o}}})}]})]})]})})]}),(e.enableOptions.postAuthor||e.enableOptions?.featuredPostAuthor||e.enableOptions.postComments||e.enableOptions?.featuredPostComments||e.enableOptions.postDate||e.enableOptions?.featuredPostDate)&&(0,d.jsxs)(i.PanelBody,{title:(0,n.__)("Post Meta Styles","cozy-addons"),opened:"post-meta-styles"===L,onToggle:()=>k("post-meta-styles"),children:[(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Margin Top","cozy-addons"),value:e.postMeta.margin.top,onChange:o=>t({...e,postMeta:{...e.postMeta,margin:{...e.postMeta.margin,top:o}}})})}),(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Margin Bottom","cozy-addons"),value:e.postMeta.margin.bottom,onChange:o=>t({...e,postMeta:{...e.postMeta,margin:{...e.postMeta.margin,bottom:o}}})})}),(0,d.jsx)(i.__experimentalToolsPanel,{label:(0,n.__)("Typography","cozy-addons"),resetAll:()=>t({...e,postMeta:{...e.postMeta,font:{size:"14px",weight:"500",family:""},letterCase:"none",decoration:"none",lineHeight:"",letterSpacing:""}}),children:(0,d.jsxs)(i.__experimentalToolsPanelItem,{hasValue:()=>!!e.postMeta.font,label:(0,n.__)("Font","cozy-addons"),onDeselect:()=>t({...e,postMeta:{...e.postMeta,font:{size:"14px",weight:"500",family:""}}}),children:[(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Font Size","cozy-addons"),value:e.postMeta.font.size,onChange:o=>t({...e,postMeta:{...e.postMeta,font:{...e.postMeta.font,size:o}}})})}),(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(i.SelectControl,{label:(0,n.__)("Font Family","cozy-addons"),options:o,value:e.postMeta.font.family,onChange:o=>t({...e,postMeta:{...e.postMeta,font:{...e.postMeta.font,family:o}}})})}),(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(i.SelectControl,{label:(0,n.__)("Font Weight","cozy-addons"),options:w,value:e.postMeta.font.weight,onChange:o=>t({...e,postMeta:{...e.postMeta,font:{...e.postMeta.font,weight:o}}})})})]})}),(0,d.jsxs)("div",{className:"components-base-control",style:{display:"flex",justifyContent:"space-between",gap:"10px"},children:[(0,d.jsx)("div",{style:{width:"100%"},children:(0,d.jsxs)(i.__experimentalToggleGroupControl,{label:(0,n.__)("Letter Case","cozy-addons"),value:e.postMeta?.letterCase,onChange:o=>t({...e,postMeta:{...e.postMeta,letterCase:o}}),children:[(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("None","cozy-addons"),value:"none",icon:x}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Uppercase","cozy-addons"),value:"uppercase",icon:b}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Lowercase","cozy-addons"),value:"lowercase",icon:y}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Capitalize","cozy-addons"),value:"capitalize",icon:m})]})}),(0,d.jsx)("div",{style:{width:"100%"},children:(0,d.jsxs)(i.__experimentalToggleGroupControl,{label:(0,n.__)("Decoration","cozy-addons"),value:e.postMeta?.decoration,onChange:o=>t({...e,postMeta:{...e.postMeta,decoration:o}}),children:[(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("None","cozy-addons"),value:"none",icon:x}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Underline","cozy-addons"),value:"underline",icon:v}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Strikethrough","cozy-addons"),value:"line-through",icon:C})]})})]}),(0,d.jsxs)("div",{className:"components-base-control",style:{display:"flex",justifyContent:"space-between",gap:"10px"},children:[(0,d.jsx)("div",{style:{width:"100%"},children:(0,d.jsx)(i.__experimentalUnitControl,{label:(0,n.__)("Line Height","cozy-addons"),value:e.postMeta?.lineHeight,onChange:o=>t({...e,postMeta:{...e.postMeta,lineHeight:o}})})}),(0,d.jsx)("div",{style:{width:"100%"},children:(0,d.jsx)(i.__experimentalUnitControl,{label:(0,n.__)("Letter Spacing","cozy-addons"),value:e.postMeta?.letterSpacing,onChange:o=>t({...e,postMeta:{...e.postMeta,letterSpacing:o}})})})]}),(0,d.jsx)(s.PanelColorSettings,{className:"cozy-color-control",enableAlpha:!0,title:(0,n.__)("Color","cozy-addons"),colorSettings:[{label:(0,n.__)("Featured (Default)","cozy-addons"),value:e.postMeta.color.featured,onChange:o=>t({...e,postMeta:{...e.postMeta,color:{...e.postMeta.color,featured:o}}})},{label:(0,n.__)("Featured (Hover)","cozy-addons"),value:e.postMeta.color.featuredHover,onChange:o=>t({...e,postMeta:{...e.postMeta,color:{...e.postMeta.color,featuredHover:o}}})},{label:(0,n.__)("Text (Default)","cozy-addons"),value:e.postMeta.color.text,onChange:o=>t({...e,postMeta:{...e.postMeta,color:{...e.postMeta.color,text:o}}})},{label:(0,n.__)("Text (Hover)","cozy-addons"),value:e.postMeta.color.textHover,onChange:o=>t({...e,postMeta:{...e.postMeta,color:{...e.postMeta.color,textHover:o}}})}]})]}),(e.enableOptions?.featuredReadMore||e.enableOptions.readMore)&&(0,d.jsxs)(i.PanelBody,{title:(0,n.__)("Read More Button Styles","cozy-addons"),opened:"read-more-btn-styles"===L,onToggle:()=>k("read-more-btn-styles"),children:[(0,d.jsxs)(i.BaseControl,{className:"cozy-box-control",children:[(0,d.jsx)(i.BaseControl.VisualLabel,{children:(0,n.__)("Padding","cozy-addons")}),(0,d.jsx)(i.__experimentalBoxControl,{label:"",resetValues:{top:"0",right:"0",bottom:"0",left:"0"},inputProps:{max:300},values:e.readMore.padding,onChange:o=>t({...e,readMore:{...e.readMore,padding:o}})})]}),(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Margin Top","cozy-addons"),value:e.readMore.margin.top,onChange:o=>t({...e,readMore:{...e.readMore,margin:{...e.readMore.margin,top:o}}})})}),(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Margin Bottom","cozy-addons"),value:e.readMore.margin.bottom,onChange:o=>t({...e,readMore:{...e.readMore,margin:{...e.readMore.margin,bottom:o}}})})}),(0,d.jsxs)(i.__experimentalToggleGroupControl,{label:(0,n.__)("Alignment","cozy-addons"),value:e.readMore.textAlign,onChange:o=>t({...e,readMore:{...e.readMore,textAlign:o}}),children:[(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Left","cozy-addons"),value:"left",icon:c}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Center","cozy-addons"),value:"center",icon:p}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Right","cozy-addons"),value:"right",icon:u})]}),(0,d.jsx)(i.TabPanel,{className:"cozy-tab-panel",activeClass:"active-tab",tabs:[{title:(0,n.__)("Default","cozy-addons"),name:"cozy-tab__default",className:"tab-one"},{title:(0,n.__)("Featured","cozy-addons"),name:"cozy-tab__active",className:"tab-one"}],children:r=>(0,d.jsxs)(d.Fragment,{children:["cozy-tab__default"===r.name&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(i.__experimentalToolsPanel,{label:(0,n.__)("Border & Radius","cozy-addons"),resetAll:()=>t({...e,readMore:{...e.readMore,border:{width:"",style:"",color:""},radius:"0px"}}),children:[(0,d.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>!!e.readMore.border,label:(0,n.__)("Border","cozy-addons"),onDeselect:()=>t({...e,readMore:{...e.readMore,border:{width:"",style:"",color:""}}}),children:(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(i.__experimentalBorderControl,{label:(0,n.__)("Border","cozy-addons"),enableAlpha:!0,colors:a,isCompact:!0,value:e.readMore.border,onChange:o=>t({...e,readMore:{...e.readMore,border:o}})})})}),(0,d.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>!!e.readMore.radius,label:(0,n.__)("Radius","cozy-addons"),onDeselect:()=>t({...e,readMore:{...e.readMore,radius:"0px"}}),children:(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Border Radius","cozy-addons"),value:e.readMore.radius,onChange:o=>t({...e,readMore:{...e.readMore,radius:o}})})})})]}),(0,d.jsx)(i.__experimentalToolsPanel,{label:(0,n.__)("Typography","cozy-addons"),resetAll:()=>t({...e,readMore:{...e.readMore,font:{size:"14px",weight:"500",family:""},letterCase:"none",decoration:"none",lineHeight:"",letterSpacing:""}}),children:(0,d.jsxs)(i.__experimentalToolsPanelItem,{hasValue:()=>!!e.readMore.font,label:(0,n.__)("Font","cozy-addons"),onDeselect:()=>t({...e,readMore:{...e.readMore,font:{size:"14px",weight:"500",family:""}}}),children:[(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Font Size","cozy-addons"),value:e.readMore.font.size,onChange:o=>t({...e,readMore:{...e.readMore,font:{...e.readMore.font,size:o}}})})}),(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(i.SelectControl,{label:(0,n.__)("Font Family","cozy-addons"),options:o,value:e.readMore.font.family,onChange:o=>t({...e,readMore:{...e.readMore,font:{...e.readMore.font,family:o}}})})}),(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(i.SelectControl,{label:(0,n.__)("Font Weight","cozy-addons"),options:w,value:e.readMore.font.weight,onChange:o=>t({...e,readMore:{...e.readMore,font:{...e.readMore.font,weight:o}}})})})]})}),(0,d.jsxs)("div",{className:"components-base-control",style:{display:"flex",justifyContent:"space-between",gap:"10px"},children:[(0,d.jsx)("div",{style:{width:"100%"},children:(0,d.jsxs)(i.__experimentalToggleGroupControl,{label:(0,n.__)("Letter Case","cozy-addons"),value:e.readMore?.letterCase,onChange:o=>t({...e,readMore:{...e.readMore,letterCase:o}}),children:[(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("None","cozy-addons"),value:"none",icon:x}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Uppercase","cozy-addons"),value:"uppercase",icon:b}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Lowercase","cozy-addons"),value:"lowercase",icon:y}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Capitalize","cozy-addons"),value:"capitalize",icon:m})]})}),(0,d.jsx)("div",{style:{width:"100%"},children:(0,d.jsxs)(i.__experimentalToggleGroupControl,{label:(0,n.__)("Decoration","cozy-addons"),value:e.readMore?.decoration,onChange:o=>t({...e,readMore:{...e.readMore,decoration:o}}),children:[(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("None","cozy-addons"),value:"none",icon:x}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Underline","cozy-addons"),value:"underline",icon:v}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Strikethrough","cozy-addons"),value:"line-through",icon:C})]})})]}),(0,d.jsxs)("div",{className:"components-base-control",style:{display:"flex",justifyContent:"space-between",gap:"10px"},children:[(0,d.jsx)("div",{style:{width:"100%"},children:(0,d.jsx)(i.__experimentalUnitControl,{label:(0,n.__)("Line Height","cozy-addons"),value:e.readMore?.lineHeight,onChange:o=>t({...e,readMore:{...e.readMore,lineHeight:o}})})}),(0,d.jsx)("div",{style:{width:"100%"},children:(0,d.jsx)(i.__experimentalUnitControl,{label:(0,n.__)("Letter Spacing","cozy-addons"),value:e.readMore?.letterSpacing,onChange:o=>t({...e,readMore:{...e.readMore,letterSpacing:o}})})})]}),(0,d.jsx)(s.PanelColorSettings,{className:"cozy-color-control",enableAlpha:!0,title:(0,n.__)("Color","cozy-addons"),colorSettings:[{label:(0,n.__)("Text (Default)","cozy-addons"),value:e.readMore.color.text,onChange:o=>t({...e,readMore:{...e.readMore,color:{...e.readMore.color,text:o}}})},{label:(0,n.__)("Text (Hover)","cozy-addons"),value:e.readMore.color.textHover,onChange:o=>t({...e,readMore:{...e.readMore,color:{...e.readMore.color,textHover:o}}})},{label:(0,n.__)("Background (Default)","cozy-addons"),value:e.readMore.color.bg,onChange:o=>t({...e,readMore:{...e.readMore,color:{...e.readMore.color,bg:o}}})},{label:(0,n.__)("Background (Hover)","cozy-addons"),value:e.readMore.color.bgHover,onChange:o=>t({...e,readMore:{...e.readMore,color:{...e.readMore.color,bgHover:o}}})},{label:(0,n.__)("Border (Hover)","cozy-addons"),value:e.readMore.color.borderHover,onChange:o=>t({...e,readMore:{...e.readMore,color:{...e.readMore.color,borderHover:o}}})}]})]}),"cozy-tab__active"===r.name&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(i.__experimentalToolsPanel,{label:(0,n.__)("Border & Radius","cozy-addons"),resetAll:()=>t({...e,featuredReadMore:{...e.featuredReadMore,border:{width:"",style:"",color:""},radius:"0px"}}),children:[(0,d.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>!!e?.featuredReadMore?.border,label:(0,n.__)("Border","cozy-addons"),onDeselect:()=>t({...e,featuredReadMore:{...e.featuredReadMore,border:{width:"",style:"",color:""}}}),children:(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(i.__experimentalBorderControl,{label:(0,n.__)("Border","cozy-addons"),enableAlpha:!0,colors:a,isCompact:!0,value:e?.featuredReadMore?.border,onChange:o=>t({...e,featuredReadMore:{...e.featuredReadMore,border:o}})})})}),(0,d.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>!!e?.featuredReadMore?.radius,label:(0,n.__)("Radius","cozy-addons"),onDeselect:()=>t({...e,featuredReadMore:{...e.featuredReadMore,radius:"0px"}}),children:(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Border Radius","cozy-addons"),value:e?.featuredReadMore?.radius,onChange:o=>t({...e,featuredReadMore:{...e.featuredReadMore,radius:o}})})})})]}),(0,d.jsx)(i.__experimentalToolsPanel,{label:(0,n.__)("Typography","cozy-addons"),resetAll:()=>t({...e,featuredReadMore:{...e.featuredReadMore,font:{size:"14px",weight:"500",family:""},letterCase:"none",decoration:"none",lineHeight:"",letterSpacing:""}}),children:(0,d.jsxs)(i.__experimentalToolsPanelItem,{hasValue:()=>!!e?.featuredReadMore?.font,label:(0,n.__)("Font","cozy-addons"),onDeselect:()=>t({...e,featuredReadMore:{...e.featuredReadMore,font:{size:"14px",weight:"500",family:""}}}),children:[(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Font Size","cozy-addons"),value:e?.featuredReadMore?.font?.size,onChange:o=>t({...e,featuredReadMore:{...e.featuredReadMore,font:{...e.featuredReadMore.font,size:o}}})})}),(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(i.SelectControl,{label:(0,n.__)("Font Family","cozy-addons"),options:o,value:e?.featuredReadMore?.font?.family,onChange:o=>t({...e,featuredReadMore:{...e.featuredReadMore,font:{...e.featuredReadMore.font,family:o}}})})}),(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(i.SelectControl,{label:(0,n.__)("Font Weight","cozy-addons"),options:w,value:e?.featuredReadMore?.font?.weight,onChange:o=>t({...e,featuredReadMore:{...e.featuredReadMore,font:{...e.featuredReadMore.font,weight:o}}})})})]})}),(0,d.jsxs)("div",{className:"components-base-control",style:{display:"flex",justifyContent:"space-between",gap:"10px"},children:[(0,d.jsx)("div",{style:{width:"100%"},children:(0,d.jsxs)(i.__experimentalToggleGroupControl,{label:(0,n.__)("Letter Case","cozy-addons"),value:e?.featuredReadMore?.letterCase,onChange:o=>t({...e,featuredReadMore:{...e.featuredReadMore,letterCase:o}}),children:[(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("None","cozy-addons"),value:"none",icon:x}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Uppercase","cozy-addons"),value:"uppercase",icon:b}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Lowercase","cozy-addons"),value:"lowercase",icon:y}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Capitalize","cozy-addons"),value:"capitalize",icon:m})]})}),(0,d.jsx)("div",{style:{width:"100%"},children:(0,d.jsxs)(i.__experimentalToggleGroupControl,{label:(0,n.__)("Decoration","cozy-addons"),value:e?.featuredReadMore?.decoration,onChange:o=>t({...e,featuredReadMore:{...e.featuredReadMore,decoration:o}}),children:[(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("None","cozy-addons"),value:"none",icon:x}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Underline","cozy-addons"),value:"underline",icon:v}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Strikethrough","cozy-addons"),value:"line-through",icon:C})]})})]}),(0,d.jsxs)("div",{className:"components-base-control",style:{display:"flex",justifyContent:"space-between",gap:"10px"},children:[(0,d.jsx)("div",{style:{width:"100%"},children:(0,d.jsx)(i.__experimentalUnitControl,{label:(0,n.__)("Line Height","cozy-addons"),value:e?.featuredReadMore?.lineHeight,onChange:o=>t({...e,featuredReadMore:{...e.featuredReadMore,lineHeight:o}})})}),(0,d.jsx)("div",{style:{width:"100%"},children:(0,d.jsx)(i.__experimentalUnitControl,{label:(0,n.__)("Letter Spacing","cozy-addons"),value:e?.featuredReadMore?.letterSpacing,onChange:o=>t({...e,featuredReadMore:{...e.featuredReadMore,letterSpacing:o}})})})]}),(0,d.jsx)(s.PanelColorSettings,{className:"cozy-color-control",enableAlpha:!0,title:(0,n.__)("Color","cozy-addons"),colorSettings:[{label:(0,n.__)("Text (Default)","cozy-addons"),value:e?.featuredReadMore?.color?.text,onChange:o=>t({...e,featuredReadMore:{...e.featuredReadMore,color:{...e.featuredReadMore.color,text:o}}})},{label:(0,n.__)("Text (Hover)","cozy-addons"),value:e?.featuredReadMore?.color?.textHover,onChange:o=>t({...e,featuredReadMore:{...e.featuredReadMore,color:{...e.featuredReadMore.color,textHover:o}}})},{label:(0,n.__)("Background (Default)","cozy-addons"),value:e?.featuredReadMore?.color?.bg,onChange:o=>t({...e,featuredReadMore:{...e.featuredReadMore,color:{...e.featuredReadMore.color,bg:o}}})},{label:(0,n.__)("Background (Hover)","cozy-addons"),value:e?.featuredReadMore?.color?.bgHover,onChange:o=>t({...e,featuredReadMore:{...e.featuredReadMore,color:{...e.featuredReadMore.color,bgHover:o}}})},{label:(0,n.__)("Border (Hover)","cozy-addons"),value:e?.featuredReadMore?.color?.borderHover,onChange:o=>t({...e,featuredReadMore:{...e.featuredReadMore,color:{...e.featuredReadMore.color,borderHover:o}}})}]})]})]})})]}),!e.featuredPostOptions.enabled&&e.ajaxLoader.enabled&&(0,d.jsxs)(i.PanelBody,{title:(0,n.__)("Ajax Loader Styles","cozy-addons"),opened:"ajax-loader-styles"===L,onToggle:()=>k("ajax-loader-styles"),children:[(0,d.jsxs)(i.BaseControl,{className:"cozy-box-control",children:[(0,d.jsx)(i.BaseControl.VisualLabel,{children:(0,n.__)("Padding","cozy-addons")}),(0,d.jsx)(i.__experimentalBoxControl,{label:"",resetValues:{top:"0",right:"0",bottom:"0",left:"0"},inputProps:{max:300},values:e.ajaxLoader.padding,onChange:o=>t({...e,ajaxLoader:{...e.ajaxLoader,padding:o}})})]}),(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Margin Top","cozy-addons"),value:e.ajaxLoader.margin.top,onChange:o=>t({...e,ajaxLoader:{...e.ajaxLoader,margin:{...e.ajaxLoader.margin,top:o}}})})}),(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Margin Bottom","cozy-addons"),value:e.ajaxLoader.margin.bottom,onChange:o=>t({...e,ajaxLoader:{...e.ajaxLoader,margin:{...e.ajaxLoader.margin,bottom:o}}})})}),"default"===e.ajaxLoader.type&&(0,d.jsx)(d.Fragment,{children:(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Min. Width","cozy-addons"),value:e.ajaxLoader.minWidth,onChange:o=>t({...e,ajaxLoader:{...e.ajaxLoader,minWidth:o}})})})}),(0,d.jsxs)(i.__experimentalToolsPanel,{label:(0,n.__)("Border & Radius","cozy-addons"),resetAll:()=>t({...e,ajaxLoader:{...e.ajaxLoader,border:{width:"",style:"",color:""},radius:"0px"}}),children:[(0,d.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>!!e.ajaxLoader.border,label:(0,n.__)("Border","cozy-addons"),onDeselect:()=>t({...e,ajaxLoader:{...e.ajaxLoader,border:{width:"",style:"",color:""}}}),children:(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(i.__experimentalBorderControl,{label:(0,n.__)("Border","cozy-addons"),enableAlpha:!0,colors:a,isCompact:!0,value:e.ajaxLoader.border,onChange:o=>t({...e,ajaxLoader:{...e.ajaxLoader,border:o}})})})}),(0,d.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>!!e.ajaxLoader.radius,label:(0,n.__)("Radius","cozy-addons"),onDeselect:()=>t({...e,ajaxLoader:{...e.ajaxLoader,radius:"0px"}}),children:(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Border Radius","cozy-addons"),value:e.ajaxLoader.radius,onChange:o=>t({...e,ajaxLoader:{...e.ajaxLoader,radius:o}})})})})]}),(0,d.jsx)(i.__experimentalToolsPanel,{label:(0,n.__)("Typography","cozy-addons"),resetAll:()=>t({...e,ajaxLoader:{...e.ajaxLoader,font:{size:"14px",weight:"500",family:""},letterCase:"none",decoration:"none",lineHeight:"",letterSpacing:""}}),children:(0,d.jsxs)(i.__experimentalToolsPanelItem,{hasValue:()=>!!e.ajaxLoader.font,label:(0,n.__)("Font","cozy-addons"),onDeselect:()=>t({...e,ajaxLoader:{...e.ajaxLoader,font:{size:"14px",weight:"500",family:""}}}),children:[(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(s.HeightControl,{label:(0,n.__)("Font Size","cozy-addons"),value:e.ajaxLoader.font.size,onChange:o=>t({...e,ajaxLoader:{...e.ajaxLoader,font:{...e.ajaxLoader.font,size:o}}})})}),(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(i.SelectControl,{label:(0,n.__)("Font Family","cozy-addons"),options:o,value:e.ajaxLoader.font.family,onChange:o=>t({...e,ajaxLoader:{...e.ajaxLoader,font:{...e.ajaxLoader.font,family:o}}})})}),(0,d.jsx)("div",{className:"components-base-control",children:(0,d.jsx)(i.SelectControl,{label:(0,n.__)("Font Weight","cozy-addons"),options:w,value:e.ajaxLoader.font.weight,onChange:o=>t({...e,ajaxLoader:{...e.ajaxLoader,font:{...e.ajaxLoader.font,weight:o}}})})})]})}),(0,d.jsxs)("div",{className:"components-base-control",style:{display:"flex",justifyContent:"space-between",gap:"10px"},children:[(0,d.jsx)("div",{style:{width:"100%"},children:(0,d.jsxs)(i.__experimentalToggleGroupControl,{label:(0,n.__)("Letter Case","cozy-addons"),value:e.ajaxLoader?.letterCase,onChange:o=>t({...e,ajaxLoader:{...e.ajaxLoader,letterCase:o}}),children:[(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("None","cozy-addons"),value:"none",icon:x}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Uppercase","cozy-addons"),value:"uppercase",icon:b}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Lowercase","cozy-addons"),value:"lowercase",icon:y}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Capitalize","cozy-addons"),value:"capitalize",icon:m})]})}),(0,d.jsx)("div",{style:{width:"100%"},children:(0,d.jsxs)(i.__experimentalToggleGroupControl,{label:(0,n.__)("Decoration","cozy-addons"),value:e.ajaxLoader?.decoration,onChange:o=>t({...e,ajaxLoader:{...e.ajaxLoader,decoration:o}}),children:[(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("None","cozy-addons"),value:"none",icon:x}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Underline","cozy-addons"),value:"underline",icon:v}),(0,d.jsx)(i.__experimentalToggleGroupControlOptionIcon,{label:(0,n.__)("Strikethrough","cozy-addons"),value:"line-through",icon:C})]})})]}),(0,d.jsxs)("div",{className:"components-base-control",style:{display:"flex",justifyContent:"space-between",gap:"10px"},children:[(0,d.jsx)("div",{style:{width:"100%"},children:(0,d.jsx)(i.__experimentalUnitControl,{label:(0,n.__)("Line Height","cozy-addons"),value:e.ajaxLoader?.lineHeight,onChange:o=>t({...e,ajaxLoader:{...e.ajaxLoader,lineHeight:o}})})}),(0,d.jsx)("div",{style:{width:"100%"},children:(0,d.jsx)(i.__experimentalUnitControl,{label:(0,n.__)("Letter Spacing","cozy-addons"),value:e.ajaxLoader?.letterSpacing,onChange:o=>t({...e,ajaxLoader:{...e.ajaxLoader,letterSpacing:o}})})})]}),(0,d.jsx)(s.PanelColorSettings,{className:"cozy-color-control",enableAlpha:!0,title:(0,n.__)("Color","cozy-addons"),colorSettings:[{label:(0,n.__)("Text (Default)","cozy-addons"),value:e.ajaxLoader.color.text,onChange:o=>t({...e,ajaxLoader:{...e.ajaxLoader,color:{...e.ajaxLoader.color,text:o}}})},{label:(0,n.__)("Text (Hover)","cozy-addons"),value:e.ajaxLoader.color.textHover,onChange:o=>t({...e,ajaxLoader:{...e.ajaxLoader,color:{...e.ajaxLoader.color,textHover:o}}})},{label:(0,n.__)("Spinner (Primary)","cozy-addons"),value:e.ajaxLoader.color.spinnerPrimary,onChange:o=>t({...e,ajaxLoader:{...e.ajaxLoader,color:{...e.ajaxLoader.color,spinnerPrimary:o}}})},{label:(0,n.__)("Spinner (Secondary)","cozy-addons"),value:e.ajaxLoader.color.spinnerSecondary,onChange:o=>t({...e,ajaxLoader:{...e.ajaxLoader,color:{...e.ajaxLoader.color,spinnerSecondary:o}}})},{label:(0,n.__)("Background (Default)","cozy-addons"),value:e.ajaxLoader.color.bg,onChange:o=>t({...e,ajaxLoader:{...e.ajaxLoader,color:{...e.ajaxLoader.color,bg:o}}})},{label:(0,n.__)("Background (Hover)","cozy-addons"),value:e.ajaxLoader.color.bgHover,onChange:o=>t({...e,ajaxLoader:{...e.ajaxLoader,color:{...e.ajaxLoader.color,bgHover:o}}})},{label:(0,n.__)("Border (Hover)","cozy-addons"),value:e.ajaxLoader.color.borderHover,onChange:o=>t({...e,ajaxLoader:{...e.ajaxLoader,color:{...e.ajaxLoader.color,borderHover:o}}})}]})]})]},"style")]})}));function L(e,t){function o(e,t){return t&&Object.keys(t).length<4?1===Object.keys(t).length?`\n ${e}: ${t};\n `:`\n ${e}: ${t.width} ${t.style} ${t.color};\n `:t&&4===Object.keys(t).length?"border"===e?`\n border-top: ${t?.top?.width} ${t?.top?.style} ${t?.top?.color};\n border-right: ${t?.right?.width} ${t?.right?.style} ${t?.right?.color};\n border-bottom: ${t?.bottom?.width} ${t?.bottom?.style} ${t?.bottom?.color};\n border-left: ${t?.left?.width} ${t?.left?.style} ${t?.left?.color};\n `:`\n ${e}: ${t.top} ${t.right} ${t.bottom} ${t.left};\n `:""}return`\n\t#${e} .cozy-block-magazine-grid__header {\n\t\t${o("padding",t.headerBox.padding)}\n\t\tmargin-top: ${t.headerBox.margin.top};\n\t\tmargin-bottom: ${t.headerBox.margin.bottom};\n\t\t${o("border",t.headerBox.border)}\n\t\tborder-radius: ${t.headerBox.radius};\n\t\tbackground-color: ${t.headerBox.color.bg};\n\t\tgap: ${t.headingGap};\n\t\tjustify-content: ${t.headerBox.tabAlign};\n\t}\n\n\t#${e} .cozy-block-magazine-grid__heading {\n\t\t${o("padding",t.headingStyles.padding)}\n\t\t${o("border",t.headingStyles.border)}\n\t\t${o("border-radius",t.headingStyles.radius)}\n\t\tfont-size: ${t.headingStyles.font.size};\n\t\tfont-weight: ${t.headingStyles.font.weight};\n\t\tfont-family: ${t.headingStyles.font.family};\n\t\ttext-transform: ${t.headingStyles?.letterCase};\n\t\ttext-decoration: ${t.headingStyles?.decoration};\n\t\tline-height: ${t.headingStyles?.lineHeight};\n\t\tletter-spacing: ${t.headingStyles?.letterSpacing};\n\t\tbackground-color: ${t.headingStyles.color.bg};\n\t\tcolor: ${t.headingStyles.color.text};\n\t\tclip-path: ${t.headingStyles.clipPath};\n\t}\n\t#${e} .cozy-block-magazine-grid__sub-heading {\n\t\t${o("padding",t.subHeading.padding)}\n\t\t${o("border",t.subHeading.border)}\n\t\tborder-radius: ${t.subHeading.radius};\n\t\tfont-size: ${t.subHeading.font.size};\n\t\tfont-weight: ${t.subHeading.font.weight};\n\t\tfont-family: ${t.subHeading.font.family};\n\t\ttext-transform: ${t.subHeading.letterCase};\n\t\ttext-decoration: ${t.subHeading?.decoration};\n\t\tline-height: ${t.subHeading?.lineHeight};\n\t\tletter-spacing: ${t.subHeading?.letterSpacing};\n\t\tbackground-color: ${t.subHeading.color.bg};\n\t}\n\t#${e} .cozy-block-magazine-grid__sub-heading, #${e} .cozy-block-magazine-grid__sub-heading a {\n\t\tcolor: ${t.subHeading.color.text};\n\t}\n\t#${e} .cozy-block-magazine-grid__sub-heading:hover, #${e} .cozy-block-magazine-grid__sub-heading:hover a {\n\t\tcolor: ${t.subHeading.color.textHover};\n\t}\n\t#${e} .cozy-block-magazine-grid__sub-heading:hover {\n\t\tbackground-color: ${t.subHeading.color.bgHover};\n\t\tborder-color: ${t.subHeading.color.borderHover};\n\t}\n\t\n\t#${e} .cozy-block-magazine-grid__body.has-featured-post {\n\t\tcolumn-gap: ${t.featuredPostOptions.columnGap};\n\t}\n\t@media only screen and (max-width: 767px) {\n\t\t#${e} .cozy-block-magazine-grid__body.has-featured-post {\n\t\t\trow-gap: ${t.featuredPostOptions.rowGap};\n\t\t}\n\t}\n\n\t#${e} .featured-post__image {\n\t\tmargin-top: ${t.featuredPostOptions?.image?.margin?.top};\n\t\tmargin-bottom: ${t.featuredPostOptions?.image?.margin?.bottom};\n\t\tmax-height: ${t.featuredPostOptions?.image?.height};\n\t}\n\t#${e} .featured-post__image img {\n\t\theight: ${t.featuredPostOptions?.image?.height};\n\t\tborder-radius: ${t.featuredPostOptions?.image?.radius};\n\t}\n\t#${e} .featured-post__content-overlay-wrapper {\n\t\tpadding: ${t.featuredPostOptions.content.outerVGap} ${t.featuredPostOptions.content.outerHGap};\n\t\tmargin-top: ${t.featuredPostOptions.content.margin.top}px;\n\t\tmargin-bottom: ${t.featuredPostOptions.content.margin.bottom};\n\t}\n\t#${e} .featured-post__content-wrapper {\n\t\t${o("padding",t.featuredPostOptions.content.padding)}\n\t\t${o("border",t.featuredPostOptions.content?.border)}\n\t\tborder-radius: ${t.featuredPostOptions.content.radius};\n\t\tbackground-color: ${t.featuredPostOptions.content.color.bg};\n\t\tposition: ${t.featuredPostOptions.content.position};\n\t\ttext-align: ${t.featuredPostOptions.textAlign};\n\t}\n\n\t#${e} .featured-post__category-item.post__category-item {\n\t\t${o("border",t?.featuredPostCategories?.border)}\n\t\tborder-radius: ${t?.featuredPostCategories?.radius};\n\t\tfont-size: ${t?.featuredPostCategories?.font?.size};\n\t\tfont-weight: ${t?.featuredPostCategories?.font?.weight};\n\t\tfont-family: ${t?.featuredPostCategories?.font?.family};\n\t\ttext-transform: ${t?.featuredPostCategories?.letterCase};\n\t\ttext-decoration: ${t?.featuredPostCategories?.decoration};\n\t\tline-height: ${t?.featuredPostCategories?.lineHeight};\n\t\tletter-spacing: ${t?.featuredPostCategories?.letterSpacing};\n\t\tcolor: ${t?.featuredPostCategories?.color?.text};\n\t\tbackground-color: ${t?.featuredPostCategories?.color?.bg};\n\t}\n\t#${e} .featured-post__category-item.post__category-item:hover {\n\t\tcolor: ${t?.featuredPostCategories?.color?.textHover};\n\t\tbackground-color: ${t?.featuredPostCategories?.color?.bgHover};\n\t\tborder-color: ${t?.featuredPostCategories?.color?.borderHover};\n\t}\n\n\t#${e} .featured-post__title {\n\t\tmargin-top: ${t.featuredPostOptions.title.margin.top};\n\t\tmargin-bottom: ${t.featuredPostOptions.title.margin.bottom};\n\t\tfont-size: ${t.featuredPostOptions.title.font.size};\n\t\tfont-weight: ${t.featuredPostOptions.title.font.weight};\n\t\tfont-family: ${t.featuredPostOptions.title.font.family};\n\t\ttext-transform: ${t.featuredPostOptions.title.letterCase};\n\t\ttext-decoration: ${t.featuredPostOptions.title?.decoration};\n\t\tline-height: ${t.featuredPostOptions.title?.lineHeight};\n\t\tletter-spacing: ${t.featuredPostOptions.title?.letterSpacing};\n\t}\n\t#${e} .featured-post__title a {\n\t\tcolor: ${t.featuredPostOptions.title.color.text};\n\t}\n\t#${e} .featured-post__title:hover a {\n\t\tcolor: ${t.featuredPostOptions.title.color.textHover};\n\t}\n\n\t#${e} .featured-post__meta.post__meta {\n\t\tjustify-content: ${t.featuredPostOptions.textAlign};\n\t}\n\t#${e} .featured-post__meta.post__meta .display-flex {\n\t\tcolor: ${t.postMeta.color.featured};\n\t}\n\t#${e} .featured-post__meta.post__meta svg {\n\t\tfill: ${t.postMeta.color.featured};\n\t}\n\t#${e} .featured-post__meta.post__meta .display-flex:hover p {\n\t\tcolor: ${t.postMeta.color.featuredHover};\n\t}\n\t#${e} .featured-post__meta.post__meta .display-flex:hover svg {\n\t\tfill: ${t.postMeta.color.featuredHover};\n\t}\n\n\t#${e} .featured-post__content .post__read-more-link {\n\t\t${o("border",t?.featuredReadMore?.border)}\n\t\tborder-radius: ${t?.featuredReadMore?.radius};\n\t\tfont-size: ${t?.featuredReadMore?.font?.size};\n\t\tfont-weight: ${t?.featuredReadMore?.font?.weight};\n\t\tfont-family: ${t?.featuredReadMore?.font?.family};\n\t\ttext-transform: ${t?.featuredReadMore?.letterCase};\n\t\ttext-decoration: ${t?.featuredReadMore?.decoration};\n\t\tline-height: ${t?.featuredReadMore?.lineHeight};\n\t\tletterSpacing: ${t?.featuredReadMore?.letterSpacing};\n\t\tcolor: ${t?.featuredReadMore?.color?.text};\n\t\tbackground-color: ${t?.featuredReadMore?.color?.bg};\n\t}\n\t#${e} .featured-post__content .post__read-more-link:hover {\n\t\tcolor: ${t?.featuredReadMore?.color?.textHover};\n\t\tbackground-color: ${t?.featuredReadMore?.color?.bgHover};\n\t\tborder-color: ${t?.featuredReadMore?.color?.borderHover};\n\t}\n\n\t#${e} .cozy-block-magazine-grid__posts {\n\t\ttext-align: ${t.postOptions.textAlign};\n\t}\n\t#${e} .cozy-block-magazine-grid__posts:not(.has-masonry) {\n\t\tgrid-template-columns: repeat(${t.postOptions.column}, 1fr);\n\t\tgap: ${t.postOptions.gap};\n\t}\n\t#${e} .cozy-block-magazine-grid__posts.has-masonry {\n\t\tcolumn-count: ${t.postOptions.column};\n\t\tcolumn-gap: ${t.postOptions.gap};\n\t}\n\t#${e} .cozy-block-magazine-grid__posts.has-masonry .cozy-block-magazine-grid__post-item {\n\t\tmargin-bottom: ${t.postOptions.gap};\n\t}\n\n\t#${e} .cozy-block-magazine-grid__post-item {\n\t\t${o("padding",t.postBoxStyles.padding)}\n\t\tmargin-top: ${t.postBoxStyles.margin.top};\n\t\tmargin-bottom: ${t.postBoxStyles.margin.bottom};\n\t\t${o("border",t.postBoxStyles.border)}\n\t\tborder-radius: ${t.postBoxStyles.radius};\n\t\tbackground-color: ${t.postBoxStyles.color.bg};\n\t}\n\t#${e} .has-invert-layout .cozy-block-magazine-grid__post-item {\n\t\tgap: ${t.postOptions.content.gap};\n\t}\n\t#${e} .cozy-block-magazine-grid__post-item.has-box-shadow {\n\t\tbox-shadow: ${t.postBoxStyles.shadow.horizontal}px ${t.postBoxStyles.shadow.vertical}px ${t.postBoxStyles.shadow.blur}px ${t.postBoxStyles.shadow.spread}px ${t.postBoxStyles.shadow.color} ${t.postBoxStyles.shadow.position?t.postBoxStyles.shadow.position:""};\n\t}\n\t#${e} .cozy-block-magazine-grid__post-item:hover {\n\t\tbackground-color: ${t.postBoxStyles.color.bgHover};\n\t\tborder-color: ${t.postBoxStyles.color.borderHover};\n\t}\n\t#${e} .cozy-block-magazine-grid__post-item.has-hover-box-shadow:hover {\n\t\tbox-shadow: ${t.postBoxStyles.shadowHover.horizontal}px ${t.postBoxStyles.shadowHover.vertical}px ${t.postBoxStyles.shadowHover.blur}px ${t.postBoxStyles.shadowHover.spread}px ${t.postBoxStyles.shadowHover.color} ${t.postBoxStyles.shadowHover.position?t.postBoxStyles.shadowHover.position:""};\n\t}\n\n\t#${e} .post__image {\n\t\tmargin-top: ${t.postOptions?.image?.margin?.top};\n\t\tmargin-bottom: ${t.postOptions?.image?.margin?.bottom};\n\t\tmax-height: ${t.postOptions?.image?.height};\n\t}\n\t#${e} .cozy-block-magazine-grid__posts:not(.has-invert-layout) .post__image {\n\t\tmax-width: ${t.postOptions?.image?.width};\n\t}\n\t#${e} .cozy-block-magazine-grid__posts.has-invert-layout .post__image {\n\t\tmin-width: ${t.postOptions?.image?.width};\n\t}\n\t#${e} .post__image img {\n\t\theight: ${t.postOptions?.image?.height};\n\t\tborder-radius: ${t.postOptions?.image?.radius};\n\t}\n\n\t#${e} .post__content-wrapper {\n\t\t${o("padding",t.postOptions.content.padding)}\n\t}\n\t\n\t#${e} .featured-post__categories.post__categories {\n\t\tjustify-content: ${t.featuredPostOptions.textAlign};\n\t}\n\t#${e} .post__categories {\n\t\tgap: ${t.postCategories.gap};\n\t\tmargin-top: ${t.postCategories.margin.top};\n\t\tmargin-bottom: ${t.postCategories.margin.bottom};\n\t\tjustify-content: ${t.postOptions.textAlign};\n\t}\n\t#${e} .post__category-item {\n\t\t${o("padding",t.postCategories.padding)}\n\t\t${o("border",t.postCategories.border)}\n\t\tborder-radius: ${t.postCategories.radius};\n\t\tfont-size: ${t.postCategories.font.size};\n\t\tfont-weight: ${t.postCategories.font.weight};\n\t\tfont-family: ${t.postCategories.font.family};\n\t\ttext-transform: ${t.postCategories.letterCase};\n\t\ttext-decoration: ${t.postCategories.decoration};\n\t\tline-height: ${t.postCategories.lineHeight};\n\t\tletter-spacing: ${t.postCategories.letterSpacing};\n\t\tcolor: ${t.postCategories.color.text};\n\t\tbackground-color: ${t.postCategories.color.bg};\n\t}\n\t#${e} .post__category-item:hover {\n\t\tcolor: ${t.postCategories.color.textHover};\n\t\tbackground-color: ${t.postCategories.color.bgHover};\n\t\tborder-color: ${t.postCategories.color.borderHover};\n\t}\n\n\t#${e} .post__title {\n\t\tmargin-top: ${t.postOptions.title.margin.top};\n\t\tmargin-bottom: ${t.postOptions.title.margin.bottom};\n\t\tfont-size: ${t.postOptions.title.font.size};\n\t\tfont-weight: ${t.postOptions.title.font.weight};\n\t\tfont-family: ${t.postOptions.title.font.family};\n\t\ttext-transform: ${t.postOptions.title.letterCase};\n\t\ttext-decoration: ${t.postOptions.title?.decoration};\n\t\tline-height: ${t.postOptions.title?.lineHeight};\n\t\tletter-spacing: ${t.postOptions.title?.letterSpacing};\n\t}\n\t#${e} .post__title a {\n\t\tcolor: ${t.postOptions.title.color.text};\n\t}\n\t#${e} .post__title:hover a {\n\t\tcolor: ${t.postOptions.title.color.textHover};\n\t}\n\n\t#${e} .post__meta {\n\t\tmargin-top: ${t.postMeta.margin.top};\n\t\tmargin-bottom: ${t.postMeta.margin.bottom};\n\t\tjustify-content: ${t.postOptions.textAlign};\n\t\tfont-size: ${t.postMeta.font.size};\n\t\tfont-weight: ${t.postMeta.font.weight};\n\t\tfont-family: ${t.postMeta.font.family};\n\t\ttext-transform: ${t.postMeta.letterCase};\n\t\ttext-decoration: ${t.postMeta?.decoration};\n\t\tline-height: ${t.postMeta?.lineHeight};\n\t\tletter-spacing: ${t.postMeta?.letterSpacing};\n\t}\n\t#${e} .post__meta .display-flex {\n\t\tcolor: ${t.postMeta.color.text};\n\t}\n\t#${e} .post__meta svg {\n\t\tfill: ${t.postMeta.color.text};\n\t}\n\t#${e} .post__meta .display-flex:hover p {\n\t\tcolor: ${t.postMeta.color.textHover};\n\t}\n\t#${e} .post__meta .display-flex:hover svg {\n\t\tfill: ${t.postMeta.color.textHover};\n\t}\n\n\t#${e} .post__read-more {\n\t\tmargin-top: ${t.readMore.margin.top};\n\t\tmargin-bottom: ${t.readMore.margin.bottom};\n\t\ttext-align: ${t.readMore.textAlign};\n\t}\n\t#${e} .post__read-more-link {\n\t\t${o("padding",t.readMore.padding)}\n\t\t${o("border",t.readMore.border)}\n\t\tborder-radius: ${t.readMore.radius};\n\t\tfont-size: ${t.readMore.font.size};\n\t\tfont-weight: ${t.readMore.font.weight};\n\t\tfont-family: ${t.readMore.font.family};\n\t\ttext-transform: ${t.readMore.letterCase};\n\t\ttext-decoration: ${t.readMore?.decoration};\n\t\tline-height: ${t.readMore?.lineHeight};\n\t\tletter-spacing: ${t.readMore?.letterSpacing};\n\t\tcolor: ${t.readMore.color.text};\n\t\tbackground-color: ${t.readMore.color.bg};\n\t}\n\t#${e} .post__read-more-link:hover {\n\t\tcolor: ${t.readMore.color.textHover};\n\t\tbackground-color: ${t.readMore.color.bgHover};\n\t\tborder-color: ${t.readMore.color.borderHover};\n\t}\n\n\t#${e} .cozy-block-magazine-grid__ajax-loader-wrapper {\n\t\tmargin-top: ${t.ajaxLoader.margin.top};\n\t\tmargin-bottom: ${t.ajaxLoader.margin.bottom};\n\t\ttext-align: ${t.ajaxLoader.textAlign};\n\t}\n\t#${e} .cozy-block-magazine-grid__ajax-loader {\n\t\t${o("padding",t.ajaxLoader.padding)}\n\t\t${o("border",t.ajaxLoader.border)}\n\t\tborder-radius: ${t.ajaxLoader.radius};\n\t\tfont-size: ${t.ajaxLoader.font.size};\n\t\tfont-weight: ${t.ajaxLoader.font.weight};\n\t\tfont-family: ${t.ajaxLoader.font.family};\n\t\ttext-transform: ${t.ajaxLoader.letterCase};\n\t\ttext-decoration: ${t.ajaxLoader?.decoration};\n\t\tline-height: ${t.ajaxLoader?.lineHeight};\n\t\tletter-spacing: ${t.ajaxLoader?.letterSpacing};\n\t\tcolor: ${t.ajaxLoader.color.text};\n\t\tbackground-color: ${t.ajaxLoader.color.bg};\n\t\tmin-width: ${t.ajaxLoader.minWidth};\n\t}\n\t#${e} .cozy-block-magazine-grid__ajax-loader:hover {\n\t\tcolor: ${t.ajaxLoader.color.textHover};\n\t\tbackground-color: ${t.ajaxLoader.color.bgHover};\n\t\tborder-color: ${t.ajaxLoader.color.borderHover};\n\t}\n\t`}const k=(0,r.memo)((({blockID:e,attributes:t,setAttributes:o})=>{let a=(0,j.useQuery)(["posts"],(()=>P())),r=[];r="default"===t.featuredPostOptions.source?a.data&&a.data.length>0?a.data[0]:[]:a.data&&a.data.length>0?a.data.find((e=>e.ID===parseInt(t.featuredPostOptions.postID))):[];let i=[];return i=-1!=t.perPage&&a.data&&a.data.length>0?a.data.slice(0,t.perPage):a.data,"category"===t.sortBy&&t.selectedCategory&&(i=a.data&&a.data.filter((e=>e.post_categories.some((e=>e.ID===parseInt(t.selectedCategory)))))),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("style",{dangerouslySetInnerHTML:{__html:L(e,t)}}),""!=t.headingStyles.font.family&&null!=t.headingStyles.font.family&&(0,d.jsx)("link",{rel:"stylesheet",href:`https://fonts.googleapis.com/css2?family=${t.headingStyles.font.family}:wght@100;200;300;400;500;600;700;800;900`}),""!=t.subHeading.font.family&&null!=t.subHeading.font.family&&(0,d.jsx)("link",{rel:"stylesheet",href:`https://fonts.googleapis.com/css2?family=${t.subHeading.font.family}:wght@100;200;300;400;500;600;700;800;900`}),""!=t?.featuredPostCategories?.font?.family&&null!=t?.featuredPostCategories?.font?.family&&(0,d.jsx)("link",{rel:"stylesheet",href:`https://fonts.googleapis.com/css2?family=${t?.featuredPostCategories?.font?.family}:wght@100;200;300;400;500;600;700;800;900`}),""!=t.postCategories.font.family&&null!=t.postCategories.font.family&&(0,d.jsx)("link",{rel:"stylesheet",href:`https://fonts.googleapis.com/css2?family=${t.postCategories.font.family}:wght@100;200;300;400;500;600;700;800;900`}),""!=t.featuredPostOptions.title.font.family&&null!=t.featuredPostOptions.title.font.family&&(0,d.jsx)("link",{rel:"stylesheet",href:`https://fonts.googleapis.com/css2?family=${t.featuredPostOptions.title.font.family}:wght@100;200;300;400;500;600;700;800;900`}),""!=t.postOptions.title.font.family&&null!=t.postOptions.title.font.family&&(0,d.jsx)("link",{rel:"stylesheet",href:`https://fonts.googleapis.com/css2?family=${t.postOptions.title.font.family}:wght@100;200;300;400;500;600;700;800;900`}),""!=t.postMeta.font.family&&null!=t.postMeta.font.family&&(0,d.jsx)("link",{rel:"stylesheet",href:`https://fonts.googleapis.com/css2?family=${t.postMeta.font.family}:wght@100;200;300;400;500;600;700;800;900`}),""!=t?.featuredReadMore?.font?.family&&null!=t?.featuredReadMore?.font?.family&&(0,d.jsx)("link",{rel:"stylesheet",href:`https://fonts.googleapis.com/css2?family=${t?.featuredReadMore?.font?.family}:wght@100;200;300;400;500;600;700;800;900`}),""!=t.readMore.font.family&&null!=t.readMore.font.family&&(0,d.jsx)("link",{rel:"stylesheet",href:`https://fonts.googleapis.com/css2?family=${t.readMore.font.family}:wght@100;200;300;400;500;600;700;800;900`}),""!=t.ajaxLoader.font.family&&null!=t.ajaxLoader.font.family&&(0,d.jsx)("link",{rel:"stylesheet",href:`https://fonts.googleapis.com/css2?family=${t.ajaxLoader.font.family}:wght@100;200;300;400;500;600;700;800;900`}),(0,d.jsxs)("div",{className:"cozy-block-magazine-grid",id:e,children:[(t.enableOptions.heading||t.enableOptions.subHeading)&&(0,d.jsxs)("article",{className:"cozy-block-magazine-grid__header",children:[t.enableOptions.heading&&(0,d.jsx)(s.RichText,{className:"cozy-block-magazine-grid__heading",placeholder:(0,n.__)("Heading","cozy-addons"),tagName:t.headingTag,value:t.headingLabel,onChange:e=>o({...t,headingLabel:e})}),t.enableOptions.subHeading&&(0,d.jsx)(s.RichText,{className:"cozy-block-magazine-grid__sub-heading",placeholder:(0,n.__)("Sub Heading","cozy-addons"),tagName:t.subHeading.tag,value:t.subHeading.label,onChange:e=>o({...t,subHeading:{...t.subHeading,label:e}})})]}),(0,d.jsxs)("div",{className:"cozy-block-magazine-grid__body"+(t.featuredPostOptions.enabled?" has-featured-post":""),children:[t.featuredPostOptions.enabled&&"left"===t.featuredPostOptions.position&&(0,d.jsx)(M,{attributes:t,data:r}),a.data&&a.data.length>0&&(0,d.jsx)("ul",{className:`cozy-block-magazine-grid__posts${t.postOptions.invert?" has-invert-layout":""}${t.postOptions.masonry?" has-masonry":""}`,children:i.map((e=>(0,d.jsx)(T,{attributes:t,data:e})))}),t.featuredPostOptions.enabled&&"right"===t.featuredPostOptions.position&&(0,d.jsx)(M,{attributes:t,data:r})]}),!t.featuredPostOptions.enabled&&t.ajaxLoader.enabled&&"default"===t.ajaxLoader.type&&(0,d.jsx)("div",{className:"cozy-block-magazine-grid__ajax-loader-wrapper",children:(0,d.jsx)("button",{className:"cozy-block-magazine-grid__ajax-loader",children:(0,d.jsx)(s.RichText,{placeholder:(0,n.__)("Load More","cozy-addons"),value:t.ajaxLoader.label,tagName:"p",onChange:e=>o({...t,ajaxLoader:{...t.ajaxLoader,label:e}})})})})]})]})})),R=(0,r.memo)((({children:e})=>{const t=new j.QueryClient;return(0,d.jsx)(j.QueryClientProvider,{client:t,children:e})})),N=JSON.parse('{"UU":"cozy-block/magazine-grid","h_":"Showcase your posts categorically with multiple layout options. Easily feature a specific post to highlight important content. Enhance your site\'s look and keep visitors engaged with our versatile and customizable \'Magazine Grid\' block."}'),I=(0,d.jsxs)("svg",{width:"27",height:"21",viewBox:"0 0 27 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,d.jsx)("rect",{x:"1",y:"1",width:"25",height:"19",stroke:"#0C50FF",strokeWidth:"2",fill:"none"}),(0,d.jsx)("rect",{x:"4",y:"4",width:"9",height:"8",fill:"#0C50FF"}),(0,d.jsx)("rect",{x:"14",y:"4",width:"4",height:"4",fill:"#0C50FF"}),(0,d.jsx)("path",{d:"M14 8.5H17V9.5H14V8.5Z",fill:"#0C50FF",fillOpacity:"0.5"}),(0,d.jsx)("rect",{x:"19",y:"4",width:"4",height:"4",fill:"#0C50FF"}),(0,d.jsx)("path",{d:"M19 8.5H22V9.5H19V8.5Z",fill:"#0C50FF",fillOpacity:"0.5"}),(0,d.jsx)("rect",{x:"14",y:"11",width:"4",height:"4",fill:"#0C50FF"}),(0,d.jsx)("path",{d:"M14 15.5H17V16.5H14V15.5Z",fill:"#0C50FF",fillOpacity:"0.5"}),(0,d.jsx)("rect",{x:"19",y:"11",width:"4",height:"4",fill:"#0C50FF"}),(0,d.jsx)("path",{d:"M19 15.5H22V16.5H19V15.5Z",fill:"#0C50FF",fillOpacity:"0.5"}),(0,d.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 14H4V13H10V14Z",fill:"#0C50FF",fillOpacity:"0.5"}),(0,d.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13 15.5H4V14.5H13V15.5Z",fill:"#0C50FF",fillOpacity:"0.5"})]});(0,a.registerBlockType)(N.UU,{title:(0,n.__)("Magazine Grid","cozy-addons"),description:(0,n.__)(N.h_,"cozy-addons"),icon:{src:I},edit:function({attributes:e,setAttributes:t,clientId:o}){if(e.cover)return(0,d.jsx)("img",{src:e.cover});e.clientId=o;const n=(0,s.useBlockProps)({className:"cozy-block-wrapper"}),a=`cozyBlock_${o.replace(/-/gi,"_")}`;return(0,d.jsx)(d.Fragment,{children:(0,d.jsxs)(R,{children:[(0,d.jsx)("div",{...n,children:(0,d.jsx)(k,{blockID:a,attributes:e,setAttributes:t})}),(0,d.jsx)($,{attributes:e,setAttributes:t})]})})},save:function({attributes:e}){}})},289:(e,t,o)=>{"use strict";o.d(t,{m:()=>r});var n=o(540),a=o(287),s=o(941),r=new(function(e){function t(){var t;return(t=e.call(this)||this).setup=function(e){var t;if(!s.S$&&(null==(t=window)?void 0:t.addEventListener)){var o=function(){return e()};return window.addEventListener("visibilitychange",o,!1),window.addEventListener("focus",o,!1),function(){window.removeEventListener("visibilitychange",o),window.removeEventListener("focus",o)}}},t}(0,n.A)(t,e);var o=t.prototype;return o.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},o.onUnsubscribe=function(){var e;this.hasListeners()||(null==(e=this.cleanup)||e.call(this),this.cleanup=void 0)},o.setEventListener=function(e){var t,o=this;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e((function(e){"boolean"==typeof e?o.setFocused(e):o.onFocus()}))},o.setFocused=function(e){this.focused=e,e&&this.onFocus()},o.onFocus=function(){this.listeners.forEach((function(e){e()}))},o.isFocused=function(){return"boolean"==typeof this.focused?this.focused:"undefined"==typeof document||[void 0,"visible","prerender"].includes(document.visibilityState)},t}(a.Q))},468:(e,t,o)=>{"use strict";o.d(t,{QueryClient:()=>n.E});var n=o(687),a=o(449);o.o(a,"QueryClientProvider")&&o.d(t,{QueryClientProvider:function(){return a.QueryClientProvider}}),o.o(a,"useQuery")&&o.d(t,{useQuery:function(){return a.useQuery}})},690:(e,t,o)=>{"use strict";o.d(t,{B:()=>s,t:()=>a});var n=console;function a(){return n}function s(e){n=e}},428:(e,t,o)=>{"use strict";o.d(t,{j:()=>a});var n=o(941),a=new(function(){function e(){this.queue=[],this.transactions=0,this.notifyFn=function(e){e()},this.batchNotifyFn=function(e){e()}}var t=e.prototype;return t.batch=function(e){var t;this.transactions++;try{t=e()}finally{this.transactions--,this.transactions||this.flush()}return t},t.schedule=function(e){var t=this;this.transactions?this.queue.push(e):(0,n.G6)((function(){t.notifyFn(e)}))},t.batchCalls=function(e){var t=this;return function(){for(var o=arguments.length,n=new Array(o),a=0;a<o;a++)n[a]=arguments[a];t.schedule((function(){e.apply(void 0,n)}))}},t.flush=function(){var e=this,t=this.queue;this.queue=[],t.length&&(0,n.G6)((function(){e.batchNotifyFn((function(){t.forEach((function(t){e.notifyFn(t)}))}))}))},t.setNotifyFunction=function(e){this.notifyFn=e},t.setBatchNotifyFunction=function(e){this.batchNotifyFn=e},e}())},622:(e,t,o)=>{"use strict";o.d(t,{t:()=>r});var n=o(540),a=o(287),s=o(941),r=new(function(e){function t(){var t;return(t=e.call(this)||this).setup=function(e){var t;if(!s.S$&&(null==(t=window)?void 0:t.addEventListener)){var o=function(){return e()};return window.addEventListener("online",o,!1),window.addEventListener("offline",o,!1),function(){window.removeEventListener("online",o),window.removeEventListener("offline",o)}}},t}(0,n.A)(t,e);var o=t.prototype;return o.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},o.onUnsubscribe=function(){var e;this.hasListeners()||(null==(e=this.cleanup)||e.call(this),this.cleanup=void 0)},o.setEventListener=function(e){var t,o=this;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e((function(e){"boolean"==typeof e?o.setOnline(e):o.onOnline()}))},o.setOnline=function(e){this.online=e,e&&this.onOnline()},o.onOnline=function(){this.listeners.forEach((function(e){e()}))},o.isOnline=function(){return"boolean"==typeof this.online?this.online:"undefined"==typeof navigator||void 0===navigator.onLine||navigator.onLine},t}(a.Q))},687:(e,t,o)=>{"use strict";o.d(t,{E:()=>x});var n=o(168),a=o(941),s=o(540),r=o(428),i=o(690),l=o(281),d=function(){function e(e){this.abortSignalConsumed=!1,this.hadObservers=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||this.getDefaultState(this.options),this.state=this.initialState,this.meta=e.meta,this.scheduleGc()}var t=e.prototype;return t.setOptions=function(e){var t;this.options=(0,n.A)({},this.defaultOptions,e),this.meta=null==e?void 0:e.meta,this.cacheTime=Math.max(this.cacheTime||0,null!=(t=this.options.cacheTime)?t:3e5)},t.setDefaultOptions=function(e){this.defaultOptions=e},t.scheduleGc=function(){var e=this;this.clearGcTimeout(),(0,a.gn)(this.cacheTime)&&(this.gcTimeout=setTimeout((function(){e.optionalRemove()}),this.cacheTime))},t.clearGcTimeout=function(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)},t.optionalRemove=function(){this.observers.length||(this.state.isFetching?this.hadObservers&&this.scheduleGc():this.cache.remove(this))},t.setData=function(e,t){var o,n,s=this.state.data,r=(0,a.Zw)(e,s);return(null==(o=(n=this.options).isDataEqual)?void 0:o.call(n,s,r))?r=s:!1!==this.options.structuralSharing&&(r=(0,a.BH)(s,r)),this.dispatch({data:r,type:"success",dataUpdatedAt:null==t?void 0:t.updatedAt}),r},t.setState=function(e,t){this.dispatch({type:"setState",state:e,setStateOptions:t})},t.cancel=function(e){var t,o=this.promise;return null==(t=this.retryer)||t.cancel(e),o?o.then(a.lQ).catch(a.lQ):Promise.resolve()},t.destroy=function(){this.clearGcTimeout(),this.cancel({silent:!0})},t.reset=function(){this.destroy(),this.setState(this.initialState)},t.isActive=function(){return this.observers.some((function(e){return!1!==e.options.enabled}))},t.isFetching=function(){return this.state.isFetching},t.isStale=function(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some((function(e){return e.getCurrentResult().isStale}))},t.isStaleByTime=function(e){return void 0===e&&(e=0),this.state.isInvalidated||!this.state.dataUpdatedAt||!(0,a.j3)(this.state.dataUpdatedAt,e)},t.onFocus=function(){var e,t=this.observers.find((function(e){return e.shouldFetchOnWindowFocus()}));t&&t.refetch(),null==(e=this.retryer)||e.continue()},t.onOnline=function(){var e,t=this.observers.find((function(e){return e.shouldFetchOnReconnect()}));t&&t.refetch(),null==(e=this.retryer)||e.continue()},t.addObserver=function(e){-1===this.observers.indexOf(e)&&(this.observers.push(e),this.hadObservers=!0,this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))},t.removeObserver=function(e){-1!==this.observers.indexOf(e)&&(this.observers=this.observers.filter((function(t){return t!==e})),this.observers.length||(this.retryer&&(this.retryer.isTransportCancelable||this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.cacheTime?this.scheduleGc():this.cache.remove(this)),this.cache.notify({type:"observerRemoved",query:this,observer:e}))},t.getObserversCount=function(){return this.observers.length},t.invalidate=function(){this.state.isInvalidated||this.dispatch({type:"invalidate"})},t.fetch=function(e,t){var o,n,s,r=this;if(this.state.isFetching)if(this.state.dataUpdatedAt&&(null==t?void 0:t.cancelRefetch))this.cancel({silent:!0});else if(this.promise){var d;return null==(d=this.retryer)||d.continueRetry(),this.promise}if(e&&this.setOptions(e),!this.options.queryFn){var c=this.observers.find((function(e){return e.options.queryFn}));c&&this.setOptions(c.options)}var u=(0,a.HN)(this.queryKey),p=(0,a.jY)(),h={queryKey:u,pageParam:void 0,meta:this.meta};Object.defineProperty(h,"signal",{enumerable:!0,get:function(){if(p)return r.abortSignalConsumed=!0,p.signal}});var g,f,_={fetchOptions:t,options:this.options,queryKey:u,state:this.state,fetchFn:function(){return r.options.queryFn?(r.abortSignalConsumed=!1,r.options.queryFn(h)):Promise.reject("Missing queryFn")},meta:this.meta};return(null==(o=this.options.behavior)?void 0:o.onFetch)&&(null==(g=this.options.behavior)||g.onFetch(_)),this.revertState=this.state,this.state.isFetching&&this.state.fetchMeta===(null==(n=_.fetchOptions)?void 0:n.meta)||this.dispatch({type:"fetch",meta:null==(f=_.fetchOptions)?void 0:f.meta}),this.retryer=new l.eJ({fn:_.fetchFn,abort:null==p||null==(s=p.abort)?void 0:s.bind(p),onSuccess:function(e){r.setData(e),null==r.cache.config.onSuccess||r.cache.config.onSuccess(e,r),0===r.cacheTime&&r.optionalRemove()},onError:function(e){(0,l.wm)(e)&&e.silent||r.dispatch({type:"error",error:e}),(0,l.wm)(e)||(null==r.cache.config.onError||r.cache.config.onError(e,r),(0,i.t)().error(e)),0===r.cacheTime&&r.optionalRemove()},onFail:function(){r.dispatch({type:"failed"})},onPause:function(){r.dispatch({type:"pause"})},onContinue:function(){r.dispatch({type:"continue"})},retry:_.options.retry,retryDelay:_.options.retryDelay}),this.promise=this.retryer.promise,this.promise},t.dispatch=function(e){var t=this;this.state=this.reducer(this.state,e),r.j.batch((function(){t.observers.forEach((function(t){t.onQueryUpdate(e)})),t.cache.notify({query:t,type:"queryUpdated",action:e})}))},t.getDefaultState=function(e){var t="function"==typeof e.initialData?e.initialData():e.initialData,o=void 0!==e.initialData?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0,n=void 0!==t;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?null!=o?o:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchMeta:null,isFetching:!1,isInvalidated:!1,isPaused:!1,status:n?"success":"idle"}},t.reducer=function(e,t){var o,a;switch(t.type){case"failed":return(0,n.A)({},e,{fetchFailureCount:e.fetchFailureCount+1});case"pause":return(0,n.A)({},e,{isPaused:!0});case"continue":return(0,n.A)({},e,{isPaused:!1});case"fetch":return(0,n.A)({},e,{fetchFailureCount:0,fetchMeta:null!=(o=t.meta)?o:null,isFetching:!0,isPaused:!1},!e.dataUpdatedAt&&{error:null,status:"loading"});case"success":return(0,n.A)({},e,{data:t.data,dataUpdateCount:e.dataUpdateCount+1,dataUpdatedAt:null!=(a=t.dataUpdatedAt)?a:Date.now(),error:null,fetchFailureCount:0,isFetching:!1,isInvalidated:!1,isPaused:!1,status:"success"});case"error":var s=t.error;return(0,l.wm)(s)&&s.revert&&this.revertState?(0,n.A)({},this.revertState):(0,n.A)({},e,{error:s,errorUpdateCount:e.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:e.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return(0,n.A)({},e,{isInvalidated:!0});case"setState":return(0,n.A)({},e,t.state);default:return e}},e}(),c=o(287),u=function(e){function t(t){var o;return(o=e.call(this)||this).config=t||{},o.queries=[],o.queriesMap={},o}(0,s.A)(t,e);var o=t.prototype;return o.build=function(e,t,o){var n,s=t.queryKey,r=null!=(n=t.queryHash)?n:(0,a.F$)(s,t),i=this.get(r);return i||(i=new d({cache:this,queryKey:s,queryHash:r,options:e.defaultQueryOptions(t),state:o,defaultOptions:e.getQueryDefaults(s),meta:t.meta}),this.add(i)),i},o.add=function(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"queryAdded",query:e}))},o.remove=function(e){var t=this.queriesMap[e.queryHash];t&&(e.destroy(),this.queries=this.queries.filter((function(t){return t!==e})),t===e&&delete this.queriesMap[e.queryHash],this.notify({type:"queryRemoved",query:e}))},o.clear=function(){var e=this;r.j.batch((function(){e.queries.forEach((function(t){e.remove(t)}))}))},o.get=function(e){return this.queriesMap[e]},o.getAll=function(){return this.queries},o.find=function(e,t){var o=(0,a.b_)(e,t)[0];return void 0===o.exact&&(o.exact=!0),this.queries.find((function(e){return(0,a.MK)(o,e)}))},o.findAll=function(e,t){var o=(0,a.b_)(e,t)[0];return Object.keys(o).length>0?this.queries.filter((function(e){return(0,a.MK)(o,e)})):this.queries},o.notify=function(e){var t=this;r.j.batch((function(){t.listeners.forEach((function(t){t(e)}))}))},o.onFocus=function(){var e=this;r.j.batch((function(){e.queries.forEach((function(e){e.onFocus()}))}))},o.onOnline=function(){var e=this;r.j.batch((function(){e.queries.forEach((function(e){e.onOnline()}))}))},t}(c.Q),p=function(){function e(e){this.options=(0,n.A)({},e.defaultOptions,e.options),this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.observers=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0},this.meta=e.meta}var t=e.prototype;return t.setState=function(e){this.dispatch({type:"setState",state:e})},t.addObserver=function(e){-1===this.observers.indexOf(e)&&this.observers.push(e)},t.removeObserver=function(e){this.observers=this.observers.filter((function(t){return t!==e}))},t.cancel=function(){return this.retryer?(this.retryer.cancel(),this.retryer.promise.then(a.lQ).catch(a.lQ)):Promise.resolve()},t.continue=function(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()},t.execute=function(){var e,t=this,o="loading"===this.state.status,n=Promise.resolve();return o||(this.dispatch({type:"loading",variables:this.options.variables}),n=n.then((function(){null==t.mutationCache.config.onMutate||t.mutationCache.config.onMutate(t.state.variables,t)})).then((function(){return null==t.options.onMutate?void 0:t.options.onMutate(t.state.variables)})).then((function(e){e!==t.state.context&&t.dispatch({type:"loading",context:e,variables:t.state.variables})}))),n.then((function(){return t.executeMutation()})).then((function(o){e=o,null==t.mutationCache.config.onSuccess||t.mutationCache.config.onSuccess(e,t.state.variables,t.state.context,t)})).then((function(){return null==t.options.onSuccess?void 0:t.options.onSuccess(e,t.state.variables,t.state.context)})).then((function(){return null==t.options.onSettled?void 0:t.options.onSettled(e,null,t.state.variables,t.state.context)})).then((function(){return t.dispatch({type:"success",data:e}),e})).catch((function(e){return null==t.mutationCache.config.onError||t.mutationCache.config.onError(e,t.state.variables,t.state.context,t),(0,i.t)().error(e),Promise.resolve().then((function(){return null==t.options.onError?void 0:t.options.onError(e,t.state.variables,t.state.context)})).then((function(){return null==t.options.onSettled?void 0:t.options.onSettled(void 0,e,t.state.variables,t.state.context)})).then((function(){throw t.dispatch({type:"error",error:e}),e}))}))},t.executeMutation=function(){var e,t=this;return this.retryer=new l.eJ({fn:function(){return t.options.mutationFn?t.options.mutationFn(t.state.variables):Promise.reject("No mutationFn found")},onFail:function(){t.dispatch({type:"failed"})},onPause:function(){t.dispatch({type:"pause"})},onContinue:function(){t.dispatch({type:"continue"})},retry:null!=(e=this.options.retry)?e:0,retryDelay:this.options.retryDelay}),this.retryer.promise},t.dispatch=function(e){var t=this;this.state=function(e,t){switch(t.type){case"failed":return(0,n.A)({},e,{failureCount:e.failureCount+1});case"pause":return(0,n.A)({},e,{isPaused:!0});case"continue":return(0,n.A)({},e,{isPaused:!1});case"loading":return(0,n.A)({},e,{context:t.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:t.variables});case"success":return(0,n.A)({},e,{data:t.data,error:null,status:"success",isPaused:!1});case"error":return(0,n.A)({},e,{data:void 0,error:t.error,failureCount:e.failureCount+1,isPaused:!1,status:"error"});case"setState":return(0,n.A)({},e,t.state);default:return e}}(this.state,e),r.j.batch((function(){t.observers.forEach((function(t){t.onMutationUpdate(e)})),t.mutationCache.notify(t)}))},e}(),h=function(e){function t(t){var o;return(o=e.call(this)||this).config=t||{},o.mutations=[],o.mutationId=0,o}(0,s.A)(t,e);var o=t.prototype;return o.build=function(e,t,o){var n=new p({mutationCache:this,mutationId:++this.mutationId,options:e.defaultMutationOptions(t),state:o,defaultOptions:t.mutationKey?e.getMutationDefaults(t.mutationKey):void 0,meta:t.meta});return this.add(n),n},o.add=function(e){this.mutations.push(e),this.notify(e)},o.remove=function(e){this.mutations=this.mutations.filter((function(t){return t!==e})),e.cancel(),this.notify(e)},o.clear=function(){var e=this;r.j.batch((function(){e.mutations.forEach((function(t){e.remove(t)}))}))},o.getAll=function(){return this.mutations},o.find=function(e){return void 0===e.exact&&(e.exact=!0),this.mutations.find((function(t){return(0,a.nJ)(e,t)}))},o.findAll=function(e){return this.mutations.filter((function(t){return(0,a.nJ)(e,t)}))},o.notify=function(e){var t=this;r.j.batch((function(){t.listeners.forEach((function(t){t(e)}))}))},o.onFocus=function(){this.resumePausedMutations()},o.onOnline=function(){this.resumePausedMutations()},o.resumePausedMutations=function(){var e=this.mutations.filter((function(e){return e.state.isPaused}));return r.j.batch((function(){return e.reduce((function(e,t){return e.then((function(){return t.continue().catch(a.lQ)}))}),Promise.resolve())}))},t}(c.Q),g=o(289),f=o(622);function _(e,t){return null==e.getNextPageParam?void 0:e.getNextPageParam(t[t.length-1],t)}var x=function(){function e(e){void 0===e&&(e={}),this.queryCache=e.queryCache||new u,this.mutationCache=e.mutationCache||new h,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var t=e.prototype;return t.mount=function(){var e=this;this.unsubscribeFocus=g.m.subscribe((function(){g.m.isFocused()&&f.t.isOnline()&&(e.mutationCache.onFocus(),e.queryCache.onFocus())})),this.unsubscribeOnline=f.t.subscribe((function(){g.m.isFocused()&&f.t.isOnline()&&(e.mutationCache.onOnline(),e.queryCache.onOnline())}))},t.unmount=function(){var e,t;null==(e=this.unsubscribeFocus)||e.call(this),null==(t=this.unsubscribeOnline)||t.call(this)},t.isFetching=function(e,t){var o=(0,a.b_)(e,t)[0];return o.fetching=!0,this.queryCache.findAll(o).length},t.isMutating=function(e){return this.mutationCache.findAll((0,n.A)({},e,{fetching:!0})).length},t.getQueryData=function(e,t){var o;return null==(o=this.queryCache.find(e,t))?void 0:o.state.data},t.getQueriesData=function(e){return this.getQueryCache().findAll(e).map((function(e){return[e.queryKey,e.state.data]}))},t.setQueryData=function(e,t,o){var n=(0,a.vh)(e),s=this.defaultQueryOptions(n);return this.queryCache.build(this,s).setData(t,o)},t.setQueriesData=function(e,t,o){var n=this;return r.j.batch((function(){return n.getQueryCache().findAll(e).map((function(e){var a=e.queryKey;return[a,n.setQueryData(a,t,o)]}))}))},t.getQueryState=function(e,t){var o;return null==(o=this.queryCache.find(e,t))?void 0:o.state},t.removeQueries=function(e,t){var o=(0,a.b_)(e,t)[0],n=this.queryCache;r.j.batch((function(){n.findAll(o).forEach((function(e){n.remove(e)}))}))},t.resetQueries=function(e,t,o){var s=this,i=(0,a.b_)(e,t,o),l=i[0],d=i[1],c=this.queryCache,u=(0,n.A)({},l,{active:!0});return r.j.batch((function(){return c.findAll(l).forEach((function(e){e.reset()})),s.refetchQueries(u,d)}))},t.cancelQueries=function(e,t,o){var n=this,s=(0,a.b_)(e,t,o),i=s[0],l=s[1],d=void 0===l?{}:l;void 0===d.revert&&(d.revert=!0);var c=r.j.batch((function(){return n.queryCache.findAll(i).map((function(e){return e.cancel(d)}))}));return Promise.all(c).then(a.lQ).catch(a.lQ)},t.invalidateQueries=function(e,t,o){var s,i,l,d=this,c=(0,a.b_)(e,t,o),u=c[0],p=c[1],h=(0,n.A)({},u,{active:null==(s=null!=(i=u.refetchActive)?i:u.active)||s,inactive:null!=(l=u.refetchInactive)&&l});return r.j.batch((function(){return d.queryCache.findAll(u).forEach((function(e){e.invalidate()})),d.refetchQueries(h,p)}))},t.refetchQueries=function(e,t,o){var s=this,i=(0,a.b_)(e,t,o),l=i[0],d=i[1],c=r.j.batch((function(){return s.queryCache.findAll(l).map((function(e){return e.fetch(void 0,(0,n.A)({},d,{meta:{refetchPage:null==l?void 0:l.refetchPage}}))}))})),u=Promise.all(c).then(a.lQ);return(null==d?void 0:d.throwOnError)||(u=u.catch(a.lQ)),u},t.fetchQuery=function(e,t,o){var n=(0,a.vh)(e,t,o),s=this.defaultQueryOptions(n);void 0===s.retry&&(s.retry=!1);var r=this.queryCache.build(this,s);return r.isStaleByTime(s.staleTime)?r.fetch(s):Promise.resolve(r.state.data)},t.prefetchQuery=function(e,t,o){return this.fetchQuery(e,t,o).then(a.lQ).catch(a.lQ)},t.fetchInfiniteQuery=function(e,t,o){var n=(0,a.vh)(e,t,o);return n.behavior={onFetch:function(e){e.fetchFn=function(){var t,o,n,s,r,i,d,c,u,p=null==(t=e.fetchOptions)||null==(o=t.meta)?void 0:o.refetchPage,h=null==(n=e.fetchOptions)||null==(s=n.meta)?void 0:s.fetchMore,g=null==h?void 0:h.pageParam,f="forward"===(null==h?void 0:h.direction),x="backward"===(null==h?void 0:h.direction),b=(null==(r=e.state.data)?void 0:r.pages)||[],y=(null==(i=e.state.data)?void 0:i.pageParams)||[],m=(0,a.jY)(),v=null==m?void 0:m.signal,C=y,j=!1,O=e.options.queryFn||function(){return Promise.reject("Missing queryFn")},z=function(e,t,o,n){return C=n?[t].concat(C):[].concat(C,[t]),n?[o].concat(e):[].concat(e,[o])},P=function(t,o,n,a){if(j)return Promise.reject("Cancelled");if(void 0===n&&!o&&t.length)return Promise.resolve(t);var s={queryKey:e.queryKey,signal:v,pageParam:n,meta:e.meta},r=O(s),i=Promise.resolve(r).then((function(e){return z(t,n,e,a)}));return(0,l.dd)(r)&&(i.cancel=r.cancel),i};if(b.length)if(f){var w=void 0!==g,S=w?g:_(e.options,b);d=P(b,w,S)}else if(x){var H=void 0!==g,M=H?g:(c=e.options,u=b,null==c.getPreviousPageParam?void 0:c.getPreviousPageParam(u[0],u));d=P(b,H,M,!0)}else!function(){C=[];var t=void 0===e.options.getNextPageParam,o=!p||!b[0]||p(b[0],0,b);d=o?P([],t,y[0]):Promise.resolve(z([],y[0],b[0]));for(var n=function(o){d=d.then((function(n){if(!p||!b[o]||p(b[o],o,b)){var a=t?y[o]:_(e.options,n);return P(n,t,a)}return Promise.resolve(z(n,y[o],b[o]))}))},a=1;a<b.length;a++)n(a)}();else d=P([]);var T=d.then((function(e){return{pages:e,pageParams:C}}));return T.cancel=function(){j=!0,null==m||m.abort(),(0,l.dd)(d)&&d.cancel()},T}}},this.fetchQuery(n)},t.prefetchInfiniteQuery=function(e,t,o){return this.fetchInfiniteQuery(e,t,o).then(a.lQ).catch(a.lQ)},t.cancelMutations=function(){var e=this,t=r.j.batch((function(){return e.mutationCache.getAll().map((function(e){return e.cancel()}))}));return Promise.all(t).then(a.lQ).catch(a.lQ)},t.resumePausedMutations=function(){return this.getMutationCache().resumePausedMutations()},t.executeMutation=function(e){return this.mutationCache.build(this,e).execute()},t.getQueryCache=function(){return this.queryCache},t.getMutationCache=function(){return this.mutationCache},t.getDefaultOptions=function(){return this.defaultOptions},t.setDefaultOptions=function(e){this.defaultOptions=e},t.setQueryDefaults=function(e,t){var o=this.queryDefaults.find((function(t){return(0,a.Od)(e)===(0,a.Od)(t.queryKey)}));o?o.defaultOptions=t:this.queryDefaults.push({queryKey:e,defaultOptions:t})},t.getQueryDefaults=function(e){var t;return e?null==(t=this.queryDefaults.find((function(t){return(0,a.Cp)(e,t.queryKey)})))?void 0:t.defaultOptions:void 0},t.setMutationDefaults=function(e,t){var o=this.mutationDefaults.find((function(t){return(0,a.Od)(e)===(0,a.Od)(t.mutationKey)}));o?o.defaultOptions=t:this.mutationDefaults.push({mutationKey:e,defaultOptions:t})},t.getMutationDefaults=function(e){var t;return e?null==(t=this.mutationDefaults.find((function(t){return(0,a.Cp)(e,t.mutationKey)})))?void 0:t.defaultOptions:void 0},t.defaultQueryOptions=function(e){if(null==e?void 0:e._defaulted)return e;var t=(0,n.A)({},this.defaultOptions.queries,this.getQueryDefaults(null==e?void 0:e.queryKey),e,{_defaulted:!0});return!t.queryHash&&t.queryKey&&(t.queryHash=(0,a.F$)(t.queryKey,t)),t},t.defaultQueryObserverOptions=function(e){return this.defaultQueryOptions(e)},t.defaultMutationOptions=function(e){return(null==e?void 0:e._defaulted)?e:(0,n.A)({},this.defaultOptions.mutations,this.getMutationDefaults(null==e?void 0:e.mutationKey),e,{_defaulted:!0})},t.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},e}()},281:(e,t,o)=>{"use strict";o.d(t,{dd:()=>i,eJ:()=>c,wm:()=>d});var n=o(289),a=o(622),s=o(941);function r(e){return Math.min(1e3*Math.pow(2,e),3e4)}function i(e){return"function"==typeof(null==e?void 0:e.cancel)}var l=function(e){this.revert=null==e?void 0:e.revert,this.silent=null==e?void 0:e.silent};function d(e){return e instanceof l}var c=function(e){var t,o,d,c,u=this,p=!1;this.abort=e.abort,this.cancel=function(e){return null==t?void 0:t(e)},this.cancelRetry=function(){p=!0},this.continueRetry=function(){p=!1},this.continue=function(){return null==o?void 0:o()},this.failureCount=0,this.isPaused=!1,this.isResolved=!1,this.isTransportCancelable=!1,this.promise=new Promise((function(e,t){d=e,c=t}));var h=function(t){u.isResolved||(u.isResolved=!0,null==e.onSuccess||e.onSuccess(t),null==o||o(),d(t))},g=function(t){u.isResolved||(u.isResolved=!0,null==e.onError||e.onError(t),null==o||o(),c(t))};!function d(){if(!u.isResolved){var c;try{c=e.fn()}catch(e){c=Promise.reject(e)}t=function(e){if(!u.isResolved&&(g(new l(e)),null==u.abort||u.abort(),i(c)))try{c.cancel()}catch(e){}},u.isTransportCancelable=i(c),Promise.resolve(c).then(h).catch((function(t){var i,l;if(!u.isResolved){var c=null!=(i=e.retry)?i:3,h=null!=(l=e.retryDelay)?l:r,f="function"==typeof h?h(u.failureCount,t):h,_=!0===c||"number"==typeof c&&u.failureCount<c||"function"==typeof c&&c(u.failureCount,t);!p&&_?(u.failureCount++,null==e.onFail||e.onFail(u.failureCount,t),(0,s.yy)(f).then((function(){if(!n.m.isFocused()||!a.t.isOnline())return new Promise((function(t){o=t,u.isPaused=!0,null==e.onPause||e.onPause()})).then((function(){o=void 0,u.isPaused=!1,null==e.onContinue||e.onContinue()}))})).then((function(){p?g(t):d()}))):g(t)}}))}}()}},287:(e,t,o)=>{"use strict";o.d(t,{Q:()=>n});var n=function(){function e(){this.listeners=[]}var t=e.prototype;return t.subscribe=function(e){var t=this,o=e||function(){};return this.listeners.push(o),this.onSubscribe(),function(){t.listeners=t.listeners.filter((function(e){return e!==o})),t.onUnsubscribe()}},t.hasListeners=function(){return this.listeners.length>0},t.onSubscribe=function(){},t.onUnsubscribe=function(){},e}()},449:()=>{},941:(e,t,o)=>{"use strict";o.d(t,{BH:()=>b,Cp:()=>_,F$:()=>g,G6:()=>O,HN:()=>l,MK:()=>p,Od:()=>f,S$:()=>a,Zw:()=>r,b_:()=>u,f8:()=>y,gn:()=>i,j3:()=>d,jY:()=>z,lQ:()=>s,nJ:()=>h,vh:()=>c,yy:()=>j});var n=o(168),a="undefined"==typeof window;function s(){}function r(e,t){return"function"==typeof e?e(t):e}function i(e){return"number"==typeof e&&e>=0&&e!==1/0}function l(e){return Array.isArray(e)?e:[e]}function d(e,t){return Math.max(e+(t||0)-Date.now(),0)}function c(e,t,o){return C(e)?"function"==typeof t?(0,n.A)({},o,{queryKey:e,queryFn:t}):(0,n.A)({},t,{queryKey:e}):e}function u(e,t,o){return C(e)?[(0,n.A)({},t,{queryKey:e}),o]:[e||{},t]}function p(e,t){var o=e.active,n=e.exact,a=e.fetching,s=e.inactive,r=e.predicate,i=e.queryKey,l=e.stale;if(C(i))if(n){if(t.queryHash!==g(i,t.options))return!1}else if(!_(t.queryKey,i))return!1;var d=function(e,t){return!0===e&&!0===t||null==e&&null==t?"all":!1===e&&!1===t?"none":(null!=e?e:!t)?"active":"inactive"}(o,s);if("none"===d)return!1;if("all"!==d){var c=t.isActive();if("active"===d&&!c)return!1;if("inactive"===d&&c)return!1}return!("boolean"==typeof l&&t.isStale()!==l||"boolean"==typeof a&&t.isFetching()!==a||r&&!r(t))}function h(e,t){var o=e.exact,n=e.fetching,a=e.predicate,s=e.mutationKey;if(C(s)){if(!t.options.mutationKey)return!1;if(o){if(f(t.options.mutationKey)!==f(s))return!1}else if(!_(t.options.mutationKey,s))return!1}return!("boolean"==typeof n&&"loading"===t.state.status!==n||a&&!a(t))}function g(e,t){return((null==t?void 0:t.queryKeyHashFn)||f)(e)}function f(e){var t;return t=l(e),JSON.stringify(t,(function(e,t){return m(t)?Object.keys(t).sort().reduce((function(e,o){return e[o]=t[o],e}),{}):t}))}function _(e,t){return x(l(e),l(t))}function x(e,t){return e===t||typeof e==typeof t&&!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&!Object.keys(t).some((function(o){return!x(e[o],t[o])}))}function b(e,t){if(e===t)return e;var o=Array.isArray(e)&&Array.isArray(t);if(o||m(e)&&m(t)){for(var n=o?e.length:Object.keys(e).length,a=o?t:Object.keys(t),s=a.length,r=o?[]:{},i=0,l=0;l<s;l++){var d=o?l:a[l];r[d]=b(e[d],t[d]),r[d]===e[d]&&i++}return n===s&&i===n?e:r}return t}function y(e,t){if(e&&!t||t&&!e)return!1;for(var o in e)if(e[o]!==t[o])return!1;return!0}function m(e){if(!v(e))return!1;var t=e.constructor;if(void 0===t)return!0;var o=t.prototype;return!!v(o)&&!!o.hasOwnProperty("isPrototypeOf")}function v(e){return"[object Object]"===Object.prototype.toString.call(e)}function C(e){return"string"==typeof e||Array.isArray(e)}function j(e){return new Promise((function(t){setTimeout(t,e)}))}function O(e){Promise.resolve().then(e).catch((function(e){return setTimeout((function(){throw e}))}))}function z(){if("function"==typeof AbortController)return new AbortController}},942:(e,t,o)=>{"use strict";o.d(t,{QueryClient:()=>n.QueryClient,QueryClientProvider:()=>a.QueryClientProvider,useQuery:()=>a.useQuery});var n=o(468);o.o(n,"QueryClientProvider")&&o.d(t,{QueryClientProvider:function(){return n.QueryClientProvider}}),o.o(n,"useQuery")&&o.d(t,{useQuery:function(){return n.useQuery}});var a=o(974)},974:(e,t,o)=>{"use strict";o.d(t,{QueryClientProvider:()=>g,useQuery:()=>H});var n=o(428);const a=window.ReactDOM;var s=o.n(a)().unstable_batchedUpdates;n.j.setBatchNotifyFunction(s);var r=o(690),i=console;(0,r.B)(i);const l=window.React;var d=o.n(l),c=d().createContext(void 0),u=d().createContext(!1);function p(e){return e&&"undefined"!=typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=c),window.ReactQueryClientContext):c}var h=function(){var e=d().useContext(p(d().useContext(u)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},g=function(e){var t=e.client,o=e.contextSharing,n=void 0!==o&&o,a=e.children;d().useEffect((function(){return t.mount(),function(){t.unmount()}}),[t]);var s=p(n);return d().createElement(u.Provider,{value:n},d().createElement(s.Provider,{value:t},a))},f=o(168),_=o(540),x=o(941),b=o(289),y=o(287),m=o(281),v=function(e){function t(t,o){var n;return(n=e.call(this)||this).client=t,n.options=o,n.trackedProps=[],n.selectError=null,n.bindMethods(),n.setOptions(o),n}(0,_.A)(t,e);var o=t.prototype;return o.bindMethods=function(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)},o.onSubscribe=function(){1===this.listeners.length&&(this.currentQuery.addObserver(this),C(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},o.onUnsubscribe=function(){this.listeners.length||this.destroy()},o.shouldFetchOnReconnect=function(){return j(this.currentQuery,this.options,this.options.refetchOnReconnect)},o.shouldFetchOnWindowFocus=function(){return j(this.currentQuery,this.options,this.options.refetchOnWindowFocus)},o.destroy=function(){this.listeners=[],this.clearTimers(),this.currentQuery.removeObserver(this)},o.setOptions=function(e,t){var o=this.options,n=this.currentQuery;if(this.options=this.client.defaultQueryObserverOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled)throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=o.queryKey),this.updateQuery();var a=this.hasListeners();a&&O(this.currentQuery,n,this.options,o)&&this.executeFetch(),this.updateResult(t),!a||this.currentQuery===n&&this.options.enabled===o.enabled&&this.options.staleTime===o.staleTime||this.updateStaleTimeout();var s=this.computeRefetchInterval();!a||this.currentQuery===n&&this.options.enabled===o.enabled&&s===this.currentRefetchInterval||this.updateRefetchInterval(s)},o.getOptimisticResult=function(e){var t=this.client.defaultQueryObserverOptions(e),o=this.client.getQueryCache().build(this.client,t);return this.createResult(o,t)},o.getCurrentResult=function(){return this.currentResult},o.trackResult=function(e,t){var o=this,n={},a=function(e){o.trackedProps.includes(e)||o.trackedProps.push(e)};return Object.keys(e).forEach((function(t){Object.defineProperty(n,t,{configurable:!1,enumerable:!0,get:function(){return a(t),e[t]}})})),(t.useErrorBoundary||t.suspense)&&a("error"),n},o.getNextResult=function(e){var t=this;return new Promise((function(o,n){var a=t.subscribe((function(t){t.isFetching||(a(),t.isError&&(null==e?void 0:e.throwOnError)?n(t.error):o(t))}))}))},o.getCurrentQuery=function(){return this.currentQuery},o.remove=function(){this.client.getQueryCache().remove(this.currentQuery)},o.refetch=function(e){return this.fetch((0,f.A)({},e,{meta:{refetchPage:null==e?void 0:e.refetchPage}}))},o.fetchOptimistic=function(e){var t=this,o=this.client.defaultQueryObserverOptions(e),n=this.client.getQueryCache().build(this.client,o);return n.fetch().then((function(){return t.createResult(n,o)}))},o.fetch=function(e){var t=this;return this.executeFetch(e).then((function(){return t.updateResult(),t.currentResult}))},o.executeFetch=function(e){this.updateQuery();var t=this.currentQuery.fetch(this.options,e);return(null==e?void 0:e.throwOnError)||(t=t.catch(x.lQ)),t},o.updateStaleTimeout=function(){var e=this;if(this.clearStaleTimeout(),!x.S$&&!this.currentResult.isStale&&(0,x.gn)(this.options.staleTime)){var t=(0,x.j3)(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout((function(){e.currentResult.isStale||e.updateResult()}),t)}},o.computeRefetchInterval=function(){var e;return"function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.currentResult.data,this.currentQuery):null!=(e=this.options.refetchInterval)&&e},o.updateRefetchInterval=function(e){var t=this;this.clearRefetchInterval(),this.currentRefetchInterval=e,!x.S$&&!1!==this.options.enabled&&(0,x.gn)(this.currentRefetchInterval)&&0!==this.currentRefetchInterval&&(this.refetchIntervalId=setInterval((function(){(t.options.refetchIntervalInBackground||b.m.isFocused())&&t.executeFetch()}),this.currentRefetchInterval))},o.updateTimers=function(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())},o.clearTimers=function(){this.clearStaleTimeout(),this.clearRefetchInterval()},o.clearStaleTimeout=function(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)},o.clearRefetchInterval=function(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)},o.createResult=function(e,t){var o,n=this.currentQuery,a=this.options,s=this.currentResult,i=this.currentResultState,l=this.currentResultOptions,d=e!==n,c=d?e.state:this.currentQueryInitialState,u=d?this.currentResult:this.previousQueryResult,p=e.state,h=p.dataUpdatedAt,g=p.error,f=p.errorUpdatedAt,_=p.isFetching,b=p.status,y=!1,m=!1;if(t.optimisticResults){var v=this.hasListeners(),j=!v&&C(e,t),P=v&&O(e,n,t,a);(j||P)&&(_=!0,h||(b="loading"))}if(t.keepPreviousData&&!p.dataUpdateCount&&(null==u?void 0:u.isSuccess)&&"error"!==b)o=u.data,h=u.dataUpdatedAt,b=u.status,y=!0;else if(t.select&&void 0!==p.data)if(s&&p.data===(null==i?void 0:i.data)&&t.select===this.selectFn)o=this.selectResult;else try{this.selectFn=t.select,o=t.select(p.data),!1!==t.structuralSharing&&(o=(0,x.BH)(null==s?void 0:s.data,o)),this.selectResult=o,this.selectError=null}catch(e){(0,r.t)().error(e),this.selectError=e}else o=p.data;if(void 0!==t.placeholderData&&void 0===o&&("loading"===b||"idle"===b)){var w;if((null==s?void 0:s.isPlaceholderData)&&t.placeholderData===(null==l?void 0:l.placeholderData))w=s.data;else if(w="function"==typeof t.placeholderData?t.placeholderData():t.placeholderData,t.select&&void 0!==w)try{w=t.select(w),!1!==t.structuralSharing&&(w=(0,x.BH)(null==s?void 0:s.data,w)),this.selectError=null}catch(e){(0,r.t)().error(e),this.selectError=e}void 0!==w&&(b="success",o=w,m=!0)}return this.selectError&&(g=this.selectError,o=this.selectResult,f=Date.now(),b="error"),{status:b,isLoading:"loading"===b,isSuccess:"success"===b,isError:"error"===b,isIdle:"idle"===b,data:o,dataUpdatedAt:h,error:g,errorUpdatedAt:f,failureCount:p.fetchFailureCount,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>c.dataUpdateCount||p.errorUpdateCount>c.errorUpdateCount,isFetching:_,isRefetching:_&&"loading"!==b,isLoadingError:"error"===b&&0===p.dataUpdatedAt,isPlaceholderData:m,isPreviousData:y,isRefetchError:"error"===b&&0!==p.dataUpdatedAt,isStale:z(e,t),refetch:this.refetch,remove:this.remove}},o.shouldNotifyListeners=function(e,t){if(!t)return!0;var o=this.options,n=o.notifyOnChangeProps,a=o.notifyOnChangePropsExclusions;if(!n&&!a)return!0;if("tracked"===n&&!this.trackedProps.length)return!0;var s="tracked"===n?this.trackedProps:n;return Object.keys(e).some((function(o){var n=o,r=e[n]!==t[n],i=null==s?void 0:s.some((function(e){return e===o})),l=null==a?void 0:a.some((function(e){return e===o}));return r&&!l&&(!s||i)}))},o.updateResult=function(e){var t=this.currentResult;if(this.currentResult=this.createResult(this.currentQuery,this.options),this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,!(0,x.f8)(this.currentResult,t)){var o={cache:!0};!1!==(null==e?void 0:e.listeners)&&this.shouldNotifyListeners(this.currentResult,t)&&(o.listeners=!0),this.notify((0,f.A)({},o,e))}},o.updateQuery=function(){var e=this.client.getQueryCache().build(this.client,this.options);if(e!==this.currentQuery){var t=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(null==t||t.removeObserver(this),e.addObserver(this))}},o.onQueryUpdate=function(e){var t={};"success"===e.type?t.onSuccess=!0:"error"!==e.type||(0,m.wm)(e.error)||(t.onError=!0),this.updateResult(t),this.hasListeners()&&this.updateTimers()},o.notify=function(e){var t=this;n.j.batch((function(){e.onSuccess?(null==t.options.onSuccess||t.options.onSuccess(t.currentResult.data),null==t.options.onSettled||t.options.onSettled(t.currentResult.data,null)):e.onError&&(null==t.options.onError||t.options.onError(t.currentResult.error),null==t.options.onSettled||t.options.onSettled(void 0,t.currentResult.error)),e.listeners&&t.listeners.forEach((function(e){e(t.currentResult)})),e.cache&&t.client.getQueryCache().notify({query:t.currentQuery,type:"observerResultsUpdated"})}))},t}(y.Q);function C(e,t){return function(e,t){return!(!1===t.enabled||e.state.dataUpdatedAt||"error"===e.state.status&&!1===t.retryOnMount)}(e,t)||e.state.dataUpdatedAt>0&&j(e,t,t.refetchOnMount)}function j(e,t,o){if(!1!==t.enabled){var n="function"==typeof o?o(e):o;return"always"===n||!1!==n&&z(e,t)}return!1}function O(e,t,o,n){return!1!==o.enabled&&(e!==t||!1===n.enabled)&&(!o.suspense||"error"!==e.state.status)&&z(e,o)}function z(e,t){return e.isStaleByTime(t.staleTime)}var P,w=d().createContext((P=!1,{clearReset:function(){P=!1},reset:function(){P=!0},isReset:function(){return P}})),S=function(){return d().useContext(w)};function H(e,t,o){return function(e,t){var o=d().useRef(!1),a=d().useState(0)[1],s=h(),r=S(),i=s.defaultQueryObserverOptions(e);i.optimisticResults=!0,i.onError&&(i.onError=n.j.batchCalls(i.onError)),i.onSuccess&&(i.onSuccess=n.j.batchCalls(i.onSuccess)),i.onSettled&&(i.onSettled=n.j.batchCalls(i.onSettled)),i.suspense&&("number"!=typeof i.staleTime&&(i.staleTime=1e3),0===i.cacheTime&&(i.cacheTime=1)),(i.suspense||i.useErrorBoundary)&&(r.isReset()||(i.retryOnMount=!1));var l,c,u,p=d().useState((function(){return new t(s,i)}))[0],g=p.getOptimisticResult(i);if(d().useEffect((function(){o.current=!0,r.clearReset();var e=p.subscribe(n.j.batchCalls((function(){o.current&&a((function(e){return e+1}))})));return p.updateResult(),function(){o.current=!1,e()}}),[r,p]),d().useEffect((function(){p.setOptions(i,{listeners:!1})}),[i,p]),i.suspense&&g.isLoading)throw p.fetchOptimistic(i).then((function(e){var t=e.data;null==i.onSuccess||i.onSuccess(t),null==i.onSettled||i.onSettled(t,null)})).catch((function(e){r.clearReset(),null==i.onError||i.onError(e),null==i.onSettled||i.onSettled(void 0,e)}));if(g.isError&&!r.isReset()&&!g.isFetching&&(l=i.suspense,c=i.useErrorBoundary,u=[g.error,p.getCurrentQuery()],"function"==typeof c?c.apply(void 0,u):"boolean"==typeof c?c:l))throw g.error;return"tracked"===i.notifyOnChangeProps&&(g=p.trackResult(g,i)),g}((0,x.vh)(e,t,o),v)}},168:(e,t,o)=>{"use strict";function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)({}).hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},n.apply(null,arguments)}o.d(t,{A:()=>n})},540:(e,t,o)=>{"use strict";function n(e,t){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},n(e,t)}function a(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,n(e,t)}o.d(t,{A:()=>a})}},o={};function n(e){var a=o[e];if(void 0!==a)return a.exports;var s=o[e]={exports:{}};return t[e](s,s.exports,n),s.exports}n.m=t,e=[],n.O=(t,o,a,s)=>{if(!o){var r=1/0;for(c=0;c<e.length;c++){for(var[o,a,s]=e[c],i=!0,l=0;l<o.length;l++)(!1&s||r>=s)&&Object.keys(n.O).every((e=>n.O[e](o[l])))?o.splice(l--,1):(i=!1,s<r&&(r=s));if(i){e.splice(c--,1);var d=a();void 0!==d&&(t=d)}}return t}s=s||0;for(var c=e.length;c>0&&e[c-1][2]>s;c--)e[c]=e[c-1];e[c]=[o,a,s]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(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=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={57:0,350:0};n.O.j=t=>0===e[t];var t=(t,o)=>{var a,s,[r,i,l]=o,d=0;if(r.some((t=>0!==e[t]))){for(a in i)n.o(i,a)&&(n.m[a]=i[a]);if(l)var c=l(n)}for(t&&t(o);d<r.length;d++)s=r[d],n.o(e,s)&&e[s]&&e[s][0](),e[s]=0;return n.O(c)},o=globalThis.webpackChunkmagazine_grid=globalThis.webpackChunkmagazine_grid||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})();var a=n.O(void 0,[350],(()=>n(453)));a=n.O(a)})();
Save
Back